// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_windows_amd64.go -trace-translation-units testdata/sqlite-amalgamation-3380500/sqlite3.c -full-path-comments -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_WIN=1 -D_MSC_VER=1900', DO NOT EDIT. package sqlite3 import ( "math" "reflect" "sync/atomic" "unsafe" "modernc.org/libc" "modernc.org/libc/sys/types" ) var _ = math.Pi var _ reflect.Kind var _ atomic.Value var _ unsafe.Pointer var _ *libc.TLS var _ types.Size_t const ( ABE_BOTTOM = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:136:1: ABE_LEFT = 0 // /usr/x86_64-w64-mingw32/include/shellapi.h:133:1: ABE_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/shellapi.h:135:1: ABE_TOP = 1 // /usr/x86_64-w64-mingw32/include/shellapi.h:134:1: ABM_ACTIVATE = 0x00000006 // /usr/x86_64-w64-mingw32/include/shellapi.h:114:1: ABM_GETAUTOHIDEBAR = 0x00000007 // /usr/x86_64-w64-mingw32/include/shellapi.h:115:1: ABM_GETSTATE = 0x00000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:112:1: ABM_GETTASKBARPOS = 0x00000005 // /usr/x86_64-w64-mingw32/include/shellapi.h:113:1: ABM_NEW = 0x00000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:108:1: ABM_QUERYPOS = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:110:1: ABM_REMOVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:109:1: ABM_SETAUTOHIDEBAR = 0x00000008 // /usr/x86_64-w64-mingw32/include/shellapi.h:116:1: ABM_SETPOS = 0x00000003 // /usr/x86_64-w64-mingw32/include/shellapi.h:111:1: ABM_SETSTATE = 0x0000000a // /usr/x86_64-w64-mingw32/include/shellapi.h:119:1: ABM_WINDOWPOSCHANGED = 0x0000009 // /usr/x86_64-w64-mingw32/include/shellapi.h:118:1: ABN_FULLSCREENAPP = 0x0000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:127:1: ABN_POSCHANGED = 0x0000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:126:1: ABN_STATECHANGE = 0x0000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:125:1: ABN_WINDOWARRANGE = 0x0000003 // /usr/x86_64-w64-mingw32/include/shellapi.h:128:1: ABORTDOC = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:235:1: ABOVE_NORMAL_PRIORITY_CLASS = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:392:1: ABSOLUTE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1435:1: ABS_ALWAYSONTOP = 0x0000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:131:1: ABS_AUTOHIDE = 0x0000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:130:1: ACCESS_ALLOWED_ACE_TYPE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:3303:1: ACCESS_ALLOWED_CALLBACK_ACE_TYPE = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:3322:1: ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:3324:1: ACCESS_ALLOWED_COMPOUND_ACE_TYPE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3309:1: ACCESS_ALLOWED_OBJECT_ACE_TYPE = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:3313:1: ACCESS_DENIED_ACE_TYPE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3304:1: ACCESS_DENIED_CALLBACK_ACE_TYPE = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:3323:1: ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:3325:1: ACCESS_DENIED_OBJECT_ACE_TYPE = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3314:1: ACCESS_DS_OBJECT_TYPE_NAME_A = "Directory Service Object" // /usr/x86_64-w64-mingw32/include/winnt.h:3578:1: ACCESS_DS_SOURCE_A = "DS" // /usr/x86_64-w64-mingw32/include/winnt.h:3576:1: ACCESS_FILTERKEYS = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:563:1: ACCESS_MAX_LEVEL = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3568:1: ACCESS_MAX_MS_ACE_TYPE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3320:1: ACCESS_MAX_MS_OBJECT_ACE_TYPE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3317:1: ACCESS_MAX_MS_V2_ACE_TYPE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3307:1: ACCESS_MAX_MS_V3_ACE_TYPE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3310:1: ACCESS_MAX_MS_V4_ACE_TYPE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3319:1: ACCESS_MAX_MS_V5_ACE_TYPE = 19 // /usr/x86_64-w64-mingw32/include/winnt.h:3334:1: ACCESS_MIN_MS_ACE_TYPE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:3302:1: ACCESS_MIN_MS_OBJECT_ACE_TYPE = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:3312:1: ACCESS_MOUSEKEYS = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:564:1: ACCESS_OBJECT_GUID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:3564:1: ACCESS_PROPERTY_GUID = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3566:1: ACCESS_PROPERTY_SET_GUID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3565:1: ACCESS_REASON_DATA_MASK = 0x0000ffff // /usr/x86_64-w64-mingw32/include/winnt.h:3597:1: ACCESS_REASON_EXDATA_MASK = 0x7f000000 // /usr/x86_64-w64-mingw32/include/winnt.h:3600:1: ACCESS_REASON_STAGING_MASK = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:3599:1: ACCESS_REASON_TYPE_MASK = 0x00ff0000 // /usr/x86_64-w64-mingw32/include/winnt.h:3596:1: ACCESS_STICKYKEYS = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:562:1: ACCESS_SYSTEM_SECURITY = 16777216 // /usr/x86_64-w64-mingw32/include/winnt.h:2895:1: ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:3498:1: ACE_OBJECT_TYPE_PRESENT = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:3497:1: ACL_REVISION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3276:1: ACL_REVISION1 = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3279:1: ACL_REVISION2 = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3281:1: ACL_REVISION3 = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3282:1: ACL_REVISION4 = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3283:1: ACL_REVISION_DS = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3277:1: ACPI_PPM_HARDWARE_ALL = 0xfe // /usr/x86_64-w64-mingw32/include/winnt.h:5790:1: ACPI_PPM_SOFTWARE_ALL = 0xfc // /usr/x86_64-w64-mingw32/include/winnt.h:5788:1: ACPI_PPM_SOFTWARE_ANY = 0xfd // /usr/x86_64-w64-mingw32/include/winnt.h:5789:1: ACTCTX_FLAG_APPLICATION_NAME_VALID = 32 // /usr/x86_64-w64-mingw32/include/winbase.h:2645:1: ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2642:1: ACTCTX_FLAG_HMODULE_VALID = 128 // /usr/x86_64-w64-mingw32/include/winbase.h:2647:1: ACTCTX_FLAG_LANGID_VALID = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2641:1: ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2640:1: ACTCTX_FLAG_RESOURCE_NAME_VALID = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:2643:1: ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 // /usr/x86_64-w64-mingw32/include/winbase.h:2644:1: ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF = 64 // /usr/x86_64-w64-mingw32/include/winbase.h:2646:1: ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2753:1: ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8258:1: ACTIVATION_CONTEXT_PATH_TYPE_NONE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8255:1: ACTIVATION_CONTEXT_PATH_TYPE_URL = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8257:1: ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8256:1: ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:9270:1: ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:9261:1: ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:9269:1: ACTIVATION_CONTEXT_SECTION_COMPATIBILITY_INFO = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:9271:1: ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:9265:1: ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:9267:1: ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:9264:1: ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:9266:1: ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:9262:1: ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:9268:1: ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:9263:1: ACTIVEOBJECT_STRONG = 0x0 // /usr/x86_64-w64-mingw32/include/oleauto.h:639:1: ACTIVEOBJECT_WEAK = 0x1 // /usr/x86_64-w64-mingw32/include/oleauto.h:640:1: AC_LINE_BACKUP_POWER = 0x02 // /usr/x86_64-w64-mingw32/include/winbase.h:2557:1: AC_LINE_OFFLINE = 0x00 // /usr/x86_64-w64-mingw32/include/winbase.h:2555:1: AC_LINE_ONLINE = 0x01 // /usr/x86_64-w64-mingw32/include/winbase.h:2556:1: AC_LINE_UNKNOWN = 0xff // /usr/x86_64-w64-mingw32/include/winbase.h:2558:1: AC_SRC_ALPHA = 0x01 // /usr/x86_64-w64-mingw32/include/wingdi.h:3266:1: AC_SRC_OVER = 0x00 // /usr/x86_64-w64-mingw32/include/wingdi.h:3265:1: ADDRESS_TAG_BIT = 0x40000000000 // /usr/x86_64-w64-mingw32/include/basetsd.h:60:1: AD_CLOCKWISE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1509:1: AD_COUNTERCLOCKWISE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1508:1: AF_APPLETALK = 16 // /usr/x86_64-w64-mingw32/include/winsock.h:218:1: AF_BAN = 21 // /usr/x86_64-w64-mingw32/include/winsock.h:223:1: AF_CCITT = 10 // /usr/x86_64-w64-mingw32/include/winsock.h:212:1: AF_CHAOS = 5 // /usr/x86_64-w64-mingw32/include/winsock.h:205:1: AF_DATAKIT = 9 // /usr/x86_64-w64-mingw32/include/winsock.h:211:1: AF_DECnet = 12 // /usr/x86_64-w64-mingw32/include/winsock.h:214:1: AF_DLI = 13 // /usr/x86_64-w64-mingw32/include/winsock.h:215:1: AF_ECMA = 8 // /usr/x86_64-w64-mingw32/include/winsock.h:210:1: AF_FIREFOX = 19 // /usr/x86_64-w64-mingw32/include/winsock.h:221:1: AF_HYLINK = 15 // /usr/x86_64-w64-mingw32/include/winsock.h:217:1: AF_IMPLINK = 3 // /usr/x86_64-w64-mingw32/include/winsock.h:203:1: AF_INET = 2 // /usr/x86_64-w64-mingw32/include/winsock.h:202:1: AF_IPX = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:206:1: AF_ISO = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:208:1: AF_LAT = 14 // /usr/x86_64-w64-mingw32/include/winsock.h:216:1: AF_MAX = 22 // /usr/x86_64-w64-mingw32/include/winsock.h:225:1: AF_NETBIOS = 17 // /usr/x86_64-w64-mingw32/include/winsock.h:219:1: AF_NS = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:207:1: AF_OSI = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:209:1: AF_PUP = 4 // /usr/x86_64-w64-mingw32/include/winsock.h:204:1: AF_SNA = 11 // /usr/x86_64-w64-mingw32/include/winsock.h:213:1: AF_UNIX = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:201:1: AF_UNKNOWN1 = 20 // /usr/x86_64-w64-mingw32/include/winsock.h:222:1: AF_UNSPEC = 0 // /usr/x86_64-w64-mingw32/include/winsock.h:200:1: AF_VOICEVIEW = 18 // /usr/x86_64-w64-mingw32/include/winsock.h:220:1: ALERT_SYSTEM_CRITICAL = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:6058:1: ALERT_SYSTEM_ERROR = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:6056:1: ALERT_SYSTEM_INFORMATIONAL = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6054:1: ALERT_SYSTEM_QUERY = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:6057:1: ALERT_SYSTEM_WARNING = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6055:1: ALGIDDEF = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:198:1: ALG_CLASS_ALL = 57344 // /usr/x86_64-w64-mingw32/include/wincrypt.h:89:1: ALG_CLASS_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:83:1: ALG_CLASS_DATA_ENCRYPT = 24576 // /usr/x86_64-w64-mingw32/include/wincrypt.h:86:1: ALG_CLASS_HASH = 32768 // /usr/x86_64-w64-mingw32/include/wincrypt.h:87:1: ALG_CLASS_KEY_EXCHANGE = 40960 // /usr/x86_64-w64-mingw32/include/wincrypt.h:88:1: ALG_CLASS_MSG_ENCRYPT = 16384 // /usr/x86_64-w64-mingw32/include/wincrypt.h:85:1: ALG_CLASS_SIGNATURE = 8192 // /usr/x86_64-w64-mingw32/include/wincrypt.h:84:1: ALG_SID_3DES = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:125:1: ALG_SID_3DES_112 = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:131:1: ALG_SID_AES = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:140:1: ALG_SID_AES_128 = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:137:1: ALG_SID_AES_192 = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:138:1: ALG_SID_AES_256 = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:139:1: ALG_SID_AGREED_KEY_ANY = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:156:1: ALG_SID_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:105:1: ALG_SID_CAST = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:128:1: ALG_SID_CYLINK_MEK = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:134:1: ALG_SID_DES = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:124:1: ALG_SID_DESX = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:126:1: ALG_SID_DH_EPHEM = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:155:1: ALG_SID_DH_SANDF = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:154:1: ALG_SID_DSS_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:117:1: ALG_SID_DSS_DMS = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:119:1: ALG_SID_DSS_PKCS = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:118:1: ALG_SID_EXAMPLE = 80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:195:1: ALG_SID_HASH_REPLACE_OWF = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:175:1: ALG_SID_HMAC = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:172:1: ALG_SID_IDEA = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:127:1: ALG_SID_KEA = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:157:1: ALG_SID_MAC = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:168:1: ALG_SID_MD2 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:163:1: ALG_SID_MD4 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:164:1: ALG_SID_MD5 = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:165:1: ALG_SID_PCT1_MASTER = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:186:1: ALG_SID_RC2 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:149:1: ALG_SID_RC4 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:151:1: ALG_SID_RC5 = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:135:1: ALG_SID_RIPEMD = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:169:1: ALG_SID_RIPEMD160 = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:170:1: ALG_SID_RSA_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:111:1: ALG_SID_RSA_ENTRUST = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:114:1: ALG_SID_RSA_MSATWORK = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:113:1: ALG_SID_RSA_PGP = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:115:1: ALG_SID_RSA_PKCS = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:112:1: ALG_SID_SAFERSK128 = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:130:1: ALG_SID_SAFERSK64 = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:129:1: ALG_SID_SCHANNEL_ENC_KEY = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:189:1: ALG_SID_SCHANNEL_MAC_KEY = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:185:1: ALG_SID_SCHANNEL_MASTER_HASH = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:184:1: ALG_SID_SEAL = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:152:1: ALG_SID_SHA = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:166:1: ALG_SID_SHA1 = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:167:1: ALG_SID_SHA_256 = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:178:1: ALG_SID_SHA_384 = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:179:1: ALG_SID_SHA_512 = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:180:1: ALG_SID_SKIPJACK = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:132:1: ALG_SID_SSL2_MASTER = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:187:1: ALG_SID_SSL3SHAMD5 = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:171:1: ALG_SID_SSL3_MASTER = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:183:1: ALG_SID_TEK = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:133:1: ALG_SID_TLS1PRF = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:173:1: ALG_SID_TLS1_MASTER = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:188:1: ALG_TYPE_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:91:1: ALG_TYPE_BLOCK = 1536 // /usr/x86_64-w64-mingw32/include/wincrypt.h:94:1: ALG_TYPE_DH = 2560 // /usr/x86_64-w64-mingw32/include/wincrypt.h:96:1: ALG_TYPE_DSS = 512 // /usr/x86_64-w64-mingw32/include/wincrypt.h:92:1: ALG_TYPE_RSA = 1024 // /usr/x86_64-w64-mingw32/include/wincrypt.h:93:1: ALG_TYPE_SECURECHANNEL = 3072 // /usr/x86_64-w64-mingw32/include/wincrypt.h:97:1: ALG_TYPE_STREAM = 2048 // /usr/x86_64-w64-mingw32/include/wincrypt.h:95:1: ALIGNMENT_MACHINE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:105:1: ALTERNATE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:100:1: ALTNUMPAD_BIT = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincon.h:59:1: ANSI_CHARSET = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1156:1: ANSI_FIXED_FONT = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1449:1: ANSI_VAR_FONT = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1450:1: ANTIALIASED_QUALITY = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1146:1: ANYSIZE_ARRAY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:21:1: APD_COPY_ALL_FILES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:545:1: APD_COPY_FROM_DIRECTORY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:547:1: APD_COPY_NEW_FILES = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:546:1: APD_STRICT_DOWNGRADE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:544:1: APD_STRICT_UPGRADE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:543:1: APIENTRY = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:103:1: APIPRIVATE = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:108:1: API_SET_EXTENSION_NAME_A = "EXT-" // /usr/x86_64-w64-mingw32/include/apiset.h:18:1: API_SET_LOAD_SCHEMA_ORDINAL = 1 // /usr/x86_64-w64-mingw32/include/apiset.h:29:1: API_SET_LOOKUP_ORDINAL = 2 // /usr/x86_64-w64-mingw32/include/apiset.h:30:1: API_SET_PREFIX_NAME_A = "API-" // /usr/x86_64-w64-mingw32/include/apiset.h:15:1: API_SET_RELEASE_SCHEMA_ORDINAL = 3 // /usr/x86_64-w64-mingw32/include/apiset.h:31:1: API_SET_SCHEMA_VERSION = 2 // /usr/x86_64-w64-mingw32/include/apiset.h:25:1: API_SET_SECTION_NAME = ".apiset" // /usr/x86_64-w64-mingw32/include/apiset.h:22:1: APPCLASS_MASK = 15 // /usr/x86_64-w64-mingw32/include/ddeml.h:181:1: APPCLASS_MONITOR = 1 // /usr/x86_64-w64-mingw32/include/ddeml.h:352:1: APPCLASS_STANDARD = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:180:1: APPCMD_CLIENTONLY = 16 // /usr/x86_64-w64-mingw32/include/ddeml.h:176:1: APPCMD_FILTERINITS = 32 // /usr/x86_64-w64-mingw32/include/ddeml.h:177:1: APPCMD_MASK = 4080 // /usr/x86_64-w64-mingw32/include/ddeml.h:178:1: APPCOMMAND_BASS_BOOST = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:585:1: APPCOMMAND_BASS_DOWN = 19 // /usr/x86_64-w64-mingw32/include/winuser.h:584:1: APPCOMMAND_BASS_UP = 21 // /usr/x86_64-w64-mingw32/include/winuser.h:586:1: APPCOMMAND_BROWSER_BACKWARD = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:566:1: APPCOMMAND_BROWSER_FAVORITES = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:571:1: APPCOMMAND_BROWSER_FORWARD = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:567:1: APPCOMMAND_BROWSER_HOME = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:572:1: APPCOMMAND_BROWSER_REFRESH = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:568:1: APPCOMMAND_BROWSER_SEARCH = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:570:1: APPCOMMAND_BROWSER_STOP = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:569:1: APPCOMMAND_CLOSE = 31 // /usr/x86_64-w64-mingw32/include/winuser.h:596:1: APPCOMMAND_COPY = 36 // /usr/x86_64-w64-mingw32/include/winuser.h:601:1: APPCOMMAND_CORRECTION_LIST = 45 // /usr/x86_64-w64-mingw32/include/winuser.h:610:1: APPCOMMAND_CUT = 37 // /usr/x86_64-w64-mingw32/include/winuser.h:602:1: APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43 // /usr/x86_64-w64-mingw32/include/winuser.h:608:1: APPCOMMAND_FIND = 28 // /usr/x86_64-w64-mingw32/include/winuser.h:593:1: APPCOMMAND_FORWARD_MAIL = 40 // /usr/x86_64-w64-mingw32/include/winuser.h:605:1: APPCOMMAND_HELP = 27 // /usr/x86_64-w64-mingw32/include/winuser.h:592:1: APPCOMMAND_LAUNCH_APP1 = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:582:1: APPCOMMAND_LAUNCH_APP2 = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:583:1: APPCOMMAND_LAUNCH_MAIL = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:580:1: APPCOMMAND_LAUNCH_MEDIA_SELECT = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:581:1: APPCOMMAND_MEDIA_CHANNEL_DOWN = 52 // /usr/x86_64-w64-mingw32/include/winuser.h:617:1: APPCOMMAND_MEDIA_CHANNEL_UP = 51 // /usr/x86_64-w64-mingw32/include/winuser.h:616:1: APPCOMMAND_MEDIA_FAST_FORWARD = 49 // /usr/x86_64-w64-mingw32/include/winuser.h:614:1: APPCOMMAND_MEDIA_NEXTTRACK = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:576:1: APPCOMMAND_MEDIA_PAUSE = 47 // /usr/x86_64-w64-mingw32/include/winuser.h:612:1: APPCOMMAND_MEDIA_PLAY = 46 // /usr/x86_64-w64-mingw32/include/winuser.h:611:1: APPCOMMAND_MEDIA_PLAY_PAUSE = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:579:1: APPCOMMAND_MEDIA_PREVIOUSTRACK = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:577:1: APPCOMMAND_MEDIA_RECORD = 48 // /usr/x86_64-w64-mingw32/include/winuser.h:613:1: APPCOMMAND_MEDIA_REWIND = 50 // /usr/x86_64-w64-mingw32/include/winuser.h:615:1: APPCOMMAND_MEDIA_STOP = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:578:1: APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25 // /usr/x86_64-w64-mingw32/include/winuser.h:590:1: APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24 // /usr/x86_64-w64-mingw32/include/winuser.h:589:1: APPCOMMAND_MICROPHONE_VOLUME_UP = 26 // /usr/x86_64-w64-mingw32/include/winuser.h:591:1: APPCOMMAND_MIC_ON_OFF_TOGGLE = 44 // /usr/x86_64-w64-mingw32/include/winuser.h:609:1: APPCOMMAND_NEW = 29 // /usr/x86_64-w64-mingw32/include/winuser.h:594:1: APPCOMMAND_OPEN = 30 // /usr/x86_64-w64-mingw32/include/winuser.h:595:1: APPCOMMAND_PASTE = 38 // /usr/x86_64-w64-mingw32/include/winuser.h:603:1: APPCOMMAND_PRINT = 33 // /usr/x86_64-w64-mingw32/include/winuser.h:598:1: APPCOMMAND_REDO = 35 // /usr/x86_64-w64-mingw32/include/winuser.h:600:1: APPCOMMAND_REPLY_TO_MAIL = 39 // /usr/x86_64-w64-mingw32/include/winuser.h:604:1: APPCOMMAND_SAVE = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:597:1: APPCOMMAND_SEND_MAIL = 41 // /usr/x86_64-w64-mingw32/include/winuser.h:606:1: APPCOMMAND_SPELL_CHECK = 42 // /usr/x86_64-w64-mingw32/include/winuser.h:607:1: APPCOMMAND_TREBLE_DOWN = 22 // /usr/x86_64-w64-mingw32/include/winuser.h:587:1: APPCOMMAND_TREBLE_UP = 23 // /usr/x86_64-w64-mingw32/include/winuser.h:588:1: APPCOMMAND_UNDO = 34 // /usr/x86_64-w64-mingw32/include/winuser.h:599:1: APPCOMMAND_VOLUME_DOWN = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:574:1: APPCOMMAND_VOLUME_MUTE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:573:1: APPCOMMAND_VOLUME_UP = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:575:1: APPIDREGFLAGS_ACTIVATE_IUSERVER_INDESKTOP = 0x1 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:249:1: APPIDREGFLAGS_ISSUE_ACTIVATION_RPC_AT_IDENTIFY = 0x4 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:251:1: APPIDREGFLAGS_IUSERVER_ACTIVATE_IN_CLIENT_SESSION_ONLY = 0x20 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:254:1: APPIDREGFLAGS_IUSERVER_SELF_SID_IN_LAUNCH_PERMISSION = 0x10 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:253:1: APPIDREGFLAGS_IUSERVER_UNMODIFIED_LOGON_TOKEN = 0x8 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:252:1: APPIDREGFLAGS_RESERVED1 = 0x40 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:255:1: APPIDREGFLAGS_SECURE_SERVER_PROCESS_SD_AND_BIND = 0x2 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:250:1: APPLICATION_ERROR_MASK = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:473:1: APPLICATION_VERIFIER_ACCESS_VIOLATION = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:8326:1: APPLICATION_VERIFIER_BAD_HEAP_HANDLE = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:8329:1: APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = 0x0401 // /usr/x86_64-w64-mingw32/include/winnt.h:8373:1: APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = 0x040A // /usr/x86_64-w64-mingw32/include/winnt.h:8382:1: APPLICATION_VERIFIER_COM_ERROR = 0x0400 // /usr/x86_64-w64-mingw32/include/winnt.h:8372:1: APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = 0x040B // /usr/x86_64-w64-mingw32/include/winnt.h:8383:1: APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = 0x0410 // /usr/x86_64-w64-mingw32/include/winnt.h:8388:1: APPLICATION_VERIFIER_COM_NULL_DACL = 0x0406 // /usr/x86_64-w64-mingw32/include/winnt.h:8378:1: APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = 0x040C // /usr/x86_64-w64-mingw32/include/winnt.h:8384:1: APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = 0x040D // /usr/x86_64-w64-mingw32/include/winnt.h:8385:1: APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = 0x0409 // /usr/x86_64-w64-mingw32/include/winnt.h:8381:1: APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = 0x0408 // /usr/x86_64-w64-mingw32/include/winnt.h:8380:1: APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = 0x0403 // /usr/x86_64-w64-mingw32/include/winnt.h:8375:1: APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = 0x0404 // /usr/x86_64-w64-mingw32/include/winnt.h:8376:1: APPLICATION_VERIFIER_COM_UNBALANCED_SWC = 0x0405 // /usr/x86_64-w64-mingw32/include/winnt.h:8377:1: APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = 0x0402 // /usr/x86_64-w64-mingw32/include/winnt.h:8374:1: APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = 0x0407 // /usr/x86_64-w64-mingw32/include/winnt.h:8379:1: APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = 0x040E // /usr/x86_64-w64-mingw32/include/winnt.h:8386:1: APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = 0x040F // /usr/x86_64-w64-mingw32/include/winnt.h:8387:1: APPLICATION_VERIFIER_CONTINUABLE_BREAK = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8323:1: APPLICATION_VERIFIER_CORRUPTED_FREED_HEAP_BLOCK = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:8338:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:8332:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_END_STAMP = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:8341:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_HEADER = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:8335:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_EXCEPTION_RAISED_FOR_PROBING = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:8336:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_HEADER = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:8337:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_PREFIX = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:8342:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_START_STAMP = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:8340:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK_SUFFIX = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:8339:1: APPLICATION_VERIFIER_CORRUPTED_HEAP_LIST = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:8344:1: APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:8333:1: APPLICATION_VERIFIER_DOUBLE_FREE = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:8331:1: APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:8350:1: APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:8328:1: APPLICATION_VERIFIER_FIRST_CHANCE_ACCESS_VIOLATION = 0x0013 // /usr/x86_64-w64-mingw32/include/winnt.h:8343:1: APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = 0x0302 // /usr/x86_64-w64-mingw32/include/winnt.h:8368:1: APPLICATION_VERIFIER_INTERNAL_ERROR = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8320:1: APPLICATION_VERIFIER_INTERNAL_WARNING = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8321:1: APPLICATION_VERIFIER_INVALID_ALLOCMEM = 0x0601 // /usr/x86_64-w64-mingw32/include/winnt.h:8393:1: APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = 0x0102 // /usr/x86_64-w64-mingw32/include/winnt.h:8348:1: APPLICATION_VERIFIER_INVALID_FREEMEM = 0x0600 // /usr/x86_64-w64-mingw32/include/winnt.h:8392:1: APPLICATION_VERIFIER_INVALID_HANDLE = 0x0300 // /usr/x86_64-w64-mingw32/include/winnt.h:8366:1: APPLICATION_VERIFIER_INVALID_MAPVIEW = 0x0602 // /usr/x86_64-w64-mingw32/include/winnt.h:8394:1: APPLICATION_VERIFIER_INVALID_TLS_VALUE = 0x0301 // /usr/x86_64-w64-mingw32/include/winnt.h:8367:1: APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = 0x0211 // /usr/x86_64-w64-mingw32/include/winnt.h:8361:1: APPLICATION_VERIFIER_LOCK_CORRUPTED = 0x0205 // /usr/x86_64-w64-mingw32/include/winnt.h:8355:1: APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = 0x0203 // /usr/x86_64-w64-mingw32/include/winnt.h:8353:1: APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = 0x0208 // /usr/x86_64-w64-mingw32/include/winnt.h:8358:1: APPLICATION_VERIFIER_LOCK_INVALID_OWNER = 0x0206 // /usr/x86_64-w64-mingw32/include/winnt.h:8356:1: APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = 0x0207 // /usr/x86_64-w64-mingw32/include/winnt.h:8357:1: APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = 0x0202 // /usr/x86_64-w64-mingw32/include/winnt.h:8352:1: APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = 0x0204 // /usr/x86_64-w64-mingw32/include/winnt.h:8354:1: APPLICATION_VERIFIER_LOCK_IN_FREED_VMEM = 0x0212 // /usr/x86_64-w64-mingw32/include/winnt.h:8362:1: APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = 0x0201 // /usr/x86_64-w64-mingw32/include/winnt.h:8351:1: APPLICATION_VERIFIER_LOCK_IN_UNMAPPED_MEM = 0x0213 // /usr/x86_64-w64-mingw32/include/winnt.h:8363:1: APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = 0x0210 // /usr/x86_64-w64-mingw32/include/winnt.h:8360:1: APPLICATION_VERIFIER_LOCK_OVER_RELEASED = 0x0209 // /usr/x86_64-w64-mingw32/include/winnt.h:8359:1: APPLICATION_VERIFIER_NO_BREAK = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8322:1: APPLICATION_VERIFIER_NULL_HANDLE = 0x0303 // /usr/x86_64-w64-mingw32/include/winnt.h:8369:1: APPLICATION_VERIFIER_PROBE_FREE_MEM = 0x0604 // /usr/x86_64-w64-mingw32/include/winnt.h:8396:1: APPLICATION_VERIFIER_PROBE_GUARD_PAGE = 0x0605 // /usr/x86_64-w64-mingw32/include/winnt.h:8397:1: APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = 0x0603 // /usr/x86_64-w64-mingw32/include/winnt.h:8395:1: APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = 0x0607 // /usr/x86_64-w64-mingw32/include/winnt.h:8399:1: APPLICATION_VERIFIER_PROBE_NULL = 0x0606 // /usr/x86_64-w64-mingw32/include/winnt.h:8398:1: APPLICATION_VERIFIER_RPC_ERROR = 0x0500 // /usr/x86_64-w64-mingw32/include/winnt.h:8390:1: APPLICATION_VERIFIER_SIZE_HEAP_UNEXPECTED_EXCEPTION = 0x0618 // /usr/x86_64-w64-mingw32/include/winnt.h:8400:1: APPLICATION_VERIFIER_STACK_OVERFLOW = 0x0101 // /usr/x86_64-w64-mingw32/include/winnt.h:8347:1: APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:8330:1: APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = 0x0100 // /usr/x86_64-w64-mingw32/include/winnt.h:8346:1: APPLICATION_VERIFIER_THREAD_NOT_LOCK_OWNER = 0x0214 // /usr/x86_64-w64-mingw32/include/winnt.h:8364:1: APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:8334:1: APPLICATION_VERIFIER_UNKNOWN_ERROR = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:8325:1: APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:8327:1: APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = 0x0304 // /usr/x86_64-w64-mingw32/include/winnt.h:8370:1: APPMODEL_ERROR_NO_APPLICATION = 15703 // /usr/x86_64-w64-mingw32/include/winerror.h:2201:1: APPMODEL_ERROR_NO_PACKAGE = 15700 // /usr/x86_64-w64-mingw32/include/winerror.h:2198:1: APPMODEL_ERROR_PACKAGE_IDENTITY_CORRUPT = 15702 // /usr/x86_64-w64-mingw32/include/winerror.h:2200:1: APPMODEL_ERROR_PACKAGE_RUNTIME_CORRUPT = 15701 // /usr/x86_64-w64-mingw32/include/winerror.h:2199:1: APP_LOCAL_DEVICE_ID_SIZE = 32 // /usr/x86_64-w64-mingw32/include/windef.h:114:1: ARABIC_CHARSET = 178 // /usr/x86_64-w64-mingw32/include/wingdi.h:1167:1: ARW_BOTTOMLEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5457:1: ARW_BOTTOMRIGHT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5458:1: ARW_DOWN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:5468:1: ARW_HIDE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:5469:1: ARW_LEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5465:1: ARW_RIGHT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5466:1: ARW_STARTMASK = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:5461:1: ARW_STARTRIGHT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5462:1: ARW_STARTTOP = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:5463:1: ARW_TOPLEFT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:5459:1: ARW_TOPRIGHT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:5460:1: ARW_UP = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:5467:1: ASPECTX = 40 // /usr/x86_64-w64-mingw32/include/wingdi.h:1531:1: ASPECTXY = 44 // /usr/x86_64-w64-mingw32/include/wingdi.h:1533:1: ASPECTY = 42 // /usr/x86_64-w64-mingw32/include/wingdi.h:1532:1: ASPECT_FILTERING = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:142:1: ASSERT_ALTERNATE = 0x9 // /usr/x86_64-w64-mingw32/include/winioctl.h:1223:1: ASSERT_PRIMARY = 0x8 // /usr/x86_64-w64-mingw32/include/winioctl.h:1222:1: ASYNCH = 0x80 // /usr/x86_64-w64-mingw32/include/nb30.h:165:1: ASYNC_MODE_COMPATIBILITY = 1 // /usr/x86_64-w64-mingw32/include/objbase.h:48:1: ASYNC_MODE_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:49:1: ATAPI_ID_CMD = 0xA1 // /usr/x86_64-w64-mingw32/include/winioctl.h:899:1: ATF_ONOFFFEEDBACK = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5727:1: ATF_TIMEOUTON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5726:1: ATOM_FLAG_GLOBAL = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:1772:1: ATTRIBUTE_SECURITY_INFORMATION = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4015:1: ATTR_CONVERTED = 0x02 // /usr/x86_64-w64-mingw32/include/imm.h:375:1: ATTR_FIXEDCONVERTED = 0x05 // /usr/x86_64-w64-mingw32/include/imm.h:378:1: ATTR_INPUT = 0x00 // /usr/x86_64-w64-mingw32/include/imm.h:373:1: ATTR_INPUT_ERROR = 0x04 // /usr/x86_64-w64-mingw32/include/imm.h:377:1: ATTR_TARGET_CONVERTED = 0x01 // /usr/x86_64-w64-mingw32/include/imm.h:374:1: ATTR_TARGET_NOTCONVERTED = 0x03 // /usr/x86_64-w64-mingw32/include/imm.h:376:1: AT_KEYEXCHANGE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:363:1: AT_SIGNATURE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:364:1: AUDIT_ALLOW_NO_PRIVILEGE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:3574:1: AUTHTYPE_CLIENT = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5557:1: AUTHTYPE_SERVER = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5558:1: AUXCAPS_AUXIN = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:915:1: AUXCAPS_CDAUDIO = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:914:1: AUXCAPS_LRVOLUME = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:918:1: AUXCAPS_VOLUME = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:917:1: AW_ACTIVATE = 0x00020000 // /usr/x86_64-w64-mingw32/include/winuser.h:234:1: AW_BLEND = 0x00080000 // /usr/x86_64-w64-mingw32/include/winuser.h:236:1: AW_CENTER = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:232:1: AW_HIDE = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:233:1: AW_HOR_NEGATIVE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:229:1: AW_HOR_POSITIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:228:1: AW_SLIDE = 0x00040000 // /usr/x86_64-w64-mingw32/include/winuser.h:235:1: AW_VER_NEGATIVE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:231:1: AW_VER_POSITIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:230:1: BACKGROUND_BLUE = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:123:1: BACKGROUND_GREEN = 0x20 // /usr/x86_64-w64-mingw32/include/wincon.h:124:1: BACKGROUND_INTENSITY = 0x80 // /usr/x86_64-w64-mingw32/include/wincon.h:126:1: BACKGROUND_RED = 0x40 // /usr/x86_64-w64-mingw32/include/wincon.h:125:1: BACKUP_ALTERNATE_DATA = 0x00000004 // /usr/x86_64-w64-mingw32/include/winbase.h:1468:1: BACKUP_DATA = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:1465:1: BACKUP_EA_DATA = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:1466:1: BACKUP_INVALID = 0x00000000 // /usr/x86_64-w64-mingw32/include/winbase.h:1464:1: BACKUP_LINK = 0x00000005 // /usr/x86_64-w64-mingw32/include/winbase.h:1469:1: BACKUP_OBJECT_ID = 0x00000007 // /usr/x86_64-w64-mingw32/include/winbase.h:1471:1: BACKUP_PROPERTY_DATA = 0x00000006 // /usr/x86_64-w64-mingw32/include/winbase.h:1470:1: BACKUP_REPARSE_DATA = 0x00000008 // /usr/x86_64-w64-mingw32/include/winbase.h:1472:1: BACKUP_SECURITY_DATA = 0x00000003 // /usr/x86_64-w64-mingw32/include/winbase.h:1467:1: BACKUP_SECURITY_INFORMATION = 65536 // /usr/x86_64-w64-mingw32/include/winnt.h:4017:1: BACKUP_SPARSE_BLOCK = 0x00000009 // /usr/x86_64-w64-mingw32/include/winbase.h:1473:1: BACKUP_TXFS_DATA = 0x0000000a // /usr/x86_64-w64-mingw32/include/winbase.h:1474:1: BALTIC_CHARSET = 186 // /usr/x86_64-w64-mingw32/include/wingdi.h:1176:1: BANDINFO = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:259:1: BASETYPES = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:23:1: BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE = 0x10000 // /usr/x86_64-w64-mingw32/include/winbase.h:1911:1: BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:1910:1: BASE_SEARCH_PATH_INVALID_FLAGS = -98306 // /usr/x86_64-w64-mingw32/include/winbase.h:1913:1: BASE_SEARCH_PATH_PERMANENT = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:1912:1: BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5570:1: BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5571:1: BATTERY_DISCHARGE_FLAGS_ENABLE = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5890:1: BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK = 0x00000007 // /usr/x86_64-w64-mingw32/include/winnt.h:5889:1: BATTERY_FLAG_CHARGING = 0x08 // /usr/x86_64-w64-mingw32/include/winbase.h:2563:1: BATTERY_FLAG_CRITICAL = 0x04 // /usr/x86_64-w64-mingw32/include/winbase.h:2562:1: BATTERY_FLAG_HIGH = 0x01 // /usr/x86_64-w64-mingw32/include/winbase.h:2560:1: BATTERY_FLAG_LOW = 0x02 // /usr/x86_64-w64-mingw32/include/winbase.h:2561:1: BATTERY_FLAG_NO_BATTERY = 0x80 // /usr/x86_64-w64-mingw32/include/winbase.h:2564:1: BATTERY_FLAG_UNKNOWN = 0xff // /usr/x86_64-w64-mingw32/include/winbase.h:2565:1: BATTERY_LIFE_UNKNOWN = 0xffffffff // /usr/x86_64-w64-mingw32/include/winbase.h:2569:1: BATTERY_PERCENTAGE_UNKNOWN = 0xff // /usr/x86_64-w64-mingw32/include/winbase.h:2567:1: BCRYPTBUFFER_VERSION = 0 // /usr/x86_64-w64-mingw32/include/bcrypt.h:140:1: BCRYPT_ALG_HANDLE_HMAC_FLAG = 0x00000008 // /usr/x86_64-w64-mingw32/include/bcrypt.h:318:1: BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 0x00000003 // /usr/x86_64-w64-mingw32/include/bcrypt.h:312:1: BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 0x00000004 // /usr/x86_64-w64-mingw32/include/bcrypt.h:326:1: BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:80:1: BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:82:1: BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:83:1: BCRYPT_BLOCK_PADDING = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:133:1: BCRYPT_BUFFERS_LOCKED_FLAG = 0x00000040 // /usr/x86_64-w64-mingw32/include/bcrypt.h:322:1: BCRYPT_CAPI_AES_FLAG = 0x00000010 // /usr/x86_64-w64-mingw32/include/bcrypt.h:319:1: BCRYPT_CIPHER_INTERFACE = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:310:1: BCRYPT_CIPHER_OPERATION = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:324:1: BCRYPT_DH_PARAMETERS_MAGIC = 0x4d504844 // /usr/x86_64-w64-mingw32/include/bcrypt.h:252:1: BCRYPT_DH_PRIVATE_MAGIC = 0x56504844 // /usr/x86_64-w64-mingw32/include/bcrypt.h:249:1: BCRYPT_DH_PUBLIC_MAGIC = 0x42504844 // /usr/x86_64-w64-mingw32/include/bcrypt.h:248:1: BCRYPT_DSA_PARAMETERS_MAGIC = 0x4d505344 // /usr/x86_64-w64-mingw32/include/bcrypt.h:270:1: BCRYPT_DSA_PARAMETERS_MAGIC_V2 = 0x324d5044 // /usr/x86_64-w64-mingw32/include/bcrypt.h:271:1: BCRYPT_DSA_PRIVATE_MAGIC = 0x56505344 // /usr/x86_64-w64-mingw32/include/bcrypt.h:262:1: BCRYPT_DSA_PRIVATE_MAGIC_V2 = 0x32565044 // /usr/x86_64-w64-mingw32/include/bcrypt.h:264:1: BCRYPT_DSA_PUBLIC_MAGIC = 0x42505344 // /usr/x86_64-w64-mingw32/include/bcrypt.h:261:1: BCRYPT_DSA_PUBLIC_MAGIC_V2 = 0x32425044 // /usr/x86_64-w64-mingw32/include/bcrypt.h:263:1: BCRYPT_ECDH_PRIVATE_P256_MAGIC = 0x324b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:230:1: BCRYPT_ECDH_PRIVATE_P384_MAGIC = 0x344b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:232:1: BCRYPT_ECDH_PRIVATE_P521_MAGIC = 0x364b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:234:1: BCRYPT_ECDH_PUBLIC_P256_MAGIC = 0x314b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:229:1: BCRYPT_ECDH_PUBLIC_P384_MAGIC = 0x334b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:231:1: BCRYPT_ECDH_PUBLIC_P521_MAGIC = 0x354b4345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:233:1: BCRYPT_ECDSA_PRIVATE_P256_MAGIC = 0x32534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:237:1: BCRYPT_ECDSA_PRIVATE_P384_MAGIC = 0x34534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:239:1: BCRYPT_ECDSA_PRIVATE_P521_MAGIC = 0x36534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:241:1: BCRYPT_ECDSA_PUBLIC_P256_MAGIC = 0x31534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:236:1: BCRYPT_ECDSA_PUBLIC_P384_MAGIC = 0x33534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:238:1: BCRYPT_ECDSA_PUBLIC_P521_MAGIC = 0x35534345 // /usr/x86_64-w64-mingw32/include/bcrypt.h:240:1: BCRYPT_HASH_INTERFACE = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:311:1: BCRYPT_HASH_OPERATION = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:325:1: BCRYPT_HASH_REUSABLE_FLAG = 0x00000020 // /usr/x86_64-w64-mingw32/include/bcrypt.h:320:1: BCRYPT_KEY_DATA_BLOB_MAGIC = 0x4d42444b // /usr/x86_64-w64-mingw32/include/bcrypt.h:266:1: BCRYPT_KEY_DATA_BLOB_VERSION1 = 0x1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:267:1: BCRYPT_KEY_DERIVATION_INTERFACE = 0x00000007 // /usr/x86_64-w64-mingw32/include/bcrypt.h:316:1: BCRYPT_KEY_DERIVATION_OPERATION = 0x00000040 // /usr/x86_64-w64-mingw32/include/bcrypt.h:330:1: BCRYPT_NO_KEY_VALIDATION = 0x00000008 // /usr/x86_64-w64-mingw32/include/bcrypt.h:335:1: BCRYPT_OBJECT_ALIGNMENT = 16 // /usr/x86_64-w64-mingw32/include/bcrypt.h:49:1: BCRYPT_PAD_NONE = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:135:1: BCRYPT_PAD_OAEP = 0x00000004 // /usr/x86_64-w64-mingw32/include/bcrypt.h:137:1: BCRYPT_PAD_PKCS1 = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:136:1: BCRYPT_PAD_PSS = 0x00000008 // /usr/x86_64-w64-mingw32/include/bcrypt.h:138:1: BCRYPT_PRIVATE_KEY_FLAG = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:333:1: BCRYPT_PROV_DISPATCH = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:131:1: BCRYPT_PUBLIC_KEY_FLAG = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:332:1: BCRYPT_RNG_INTERFACE = 0x00000006 // /usr/x86_64-w64-mingw32/include/bcrypt.h:315:1: BCRYPT_RNG_OPERATION = 0x00000020 // /usr/x86_64-w64-mingw32/include/bcrypt.h:329:1: BCRYPT_RNG_USE_ENTROPY_IN_BUFFER = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:337:1: BCRYPT_RSAFULLPRIVATE_MAGIC = 0x33415352 // /usr/x86_64-w64-mingw32/include/bcrypt.h:221:1: BCRYPT_RSAPRIVATE_MAGIC = 0x32415352 // /usr/x86_64-w64-mingw32/include/bcrypt.h:217:1: BCRYPT_RSAPUBLIC_MAGIC = 0x31415352 // /usr/x86_64-w64-mingw32/include/bcrypt.h:216:1: BCRYPT_SECRET_AGREEMENT_INTERFACE = 0x00000004 // /usr/x86_64-w64-mingw32/include/bcrypt.h:313:1: BCRYPT_SECRET_AGREEMENT_OPERATION = 0x00000008 // /usr/x86_64-w64-mingw32/include/bcrypt.h:327:1: BCRYPT_SIGNATURE_INTERFACE = 0x00000005 // /usr/x86_64-w64-mingw32/include/bcrypt.h:314:1: BCRYPT_SIGNATURE_OPERATION = 0x00000010 // /usr/x86_64-w64-mingw32/include/bcrypt.h:328:1: BCRYPT_STRUCT_ALIGNMENT = 0 // /usr/x86_64-w64-mingw32/include/bcrypt.h:51:1: BCRYPT_SUPPORTED_PAD_OAEP = 0x00000008 // /usr/x86_64-w64-mingw32/include/bcrypt.h:128:1: BCRYPT_SUPPORTED_PAD_PKCS1_ENC = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:126:1: BCRYPT_SUPPORTED_PAD_PKCS1_SIG = 0x00000004 // /usr/x86_64-w64-mingw32/include/bcrypt.h:127:1: BCRYPT_SUPPORTED_PAD_PSS = 0x00000010 // /usr/x86_64-w64-mingw32/include/bcrypt.h:129:1: BCRYPT_SUPPORTED_PAD_ROUTER = 0x00000001 // /usr/x86_64-w64-mingw32/include/bcrypt.h:125:1: BCRYPT_USE_SYSTEM_PREFERRED_RNG = 0x00000002 // /usr/x86_64-w64-mingw32/include/bcrypt.h:338:1: BDR_INNER = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:1668:1: BDR_OUTER = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1667:1: BDR_RAISED = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1669:1: BDR_RAISEDINNER = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1664:1: BDR_RAISEDOUTER = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1662:1: BDR_SUNKEN = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:1670:1: BDR_SUNKENINNER = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1665:1: BDR_SUNKENOUTER = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1663:1: BEGIN_INTERFACE = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:100:1: BEGIN_PATH = 4096 // /usr/x86_64-w64-mingw32/include/wingdi.h:293:1: BELOW_NORMAL_PRIORITY_CLASS = 0x4000 // /usr/x86_64-w64-mingw32/include/winbase.h:391:1: BF_ADJUST = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:1697:1: BF_BOTTOM = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1680:1: BF_BOTTOMLEFT = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:1684:1: BF_BOTTOMRIGHT = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:1685:1: BF_DIAGONAL = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1688:1: BF_DIAGONAL_ENDBOTTOMLEFT = 25 // /usr/x86_64-w64-mingw32/include/winuser.h:1692:1: BF_DIAGONAL_ENDBOTTOMRIGHT = 28 // /usr/x86_64-w64-mingw32/include/winuser.h:1693:1: BF_DIAGONAL_ENDTOPLEFT = 19 // /usr/x86_64-w64-mingw32/include/winuser.h:1691:1: BF_DIAGONAL_ENDTOPRIGHT = 22 // /usr/x86_64-w64-mingw32/include/winuser.h:1690:1: BF_FLAT = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:1698:1: BF_LEFT = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1677:1: BF_MIDDLE = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:1695:1: BF_MONO = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:1699:1: BF_RECT = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:1686:1: BF_RIGHT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1679:1: BF_SOFT = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:1696:1: BF_TOP = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1678:1: BF_TOPLEFT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1682:1: BF_TOPRIGHT = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:1683:1: BIDI_ACCESS_ADMINISTRATOR = 0x1 // /usr/x86_64-w64-mingw32/include/winspool.h:1092:1: BIDI_ACCESS_USER = 0x2 // /usr/x86_64-w64-mingw32/include/winspool.h:1093:1: BITSPIXEL = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1517:1: BITVEC_SZ = 512 // testdata/sqlite-amalgamation-3380500/sqlite3.c:50003:1: BITVEC_SZELEM = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:50016:1: BI_BITFIELDS = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:666:1: BI_JPEG = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:667:1: BI_PNG = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:668:1: BI_RGB = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:663:1: BI_RLE4 = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:665:1: BI_RLE8 = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:664:1: BKMODE_LAST = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1411:1: BLACKONWHITE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:89:1: BLACK_BRUSH = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1442:1: BLACK_PEN = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1446:1: BLTALIGNMENT = 119 // /usr/x86_64-w64-mingw32/include/wingdi.h:1552:1: BM_CLICK = 0x00F5 // /usr/x86_64-w64-mingw32/include/winuser.h:4520:1: BM_GETCHECK = 0x00F0 // /usr/x86_64-w64-mingw32/include/winuser.h:4515:1: BM_GETIMAGE = 0x00F6 // /usr/x86_64-w64-mingw32/include/winuser.h:4521:1: BM_GETSTATE = 0x00F2 // /usr/x86_64-w64-mingw32/include/winuser.h:4517:1: BM_SETCHECK = 0x00F1 // /usr/x86_64-w64-mingw32/include/winuser.h:4516:1: BM_SETIMAGE = 0x00F7 // /usr/x86_64-w64-mingw32/include/winuser.h:4522:1: BM_SETSTATE = 0x00F3 // /usr/x86_64-w64-mingw32/include/winuser.h:4518:1: BM_SETSTYLE = 0x00F4 // /usr/x86_64-w64-mingw32/include/winuser.h:4519:1: BN_CLICKED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4503:1: BN_DBLCLK = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4511:1: BN_DISABLE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4507:1: BN_DOUBLECLICKED = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4508:1: BN_HILITE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4505:1: BN_KILLFOCUS = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:4513:1: BN_PAINT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4504:1: BN_PUSHED = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4509:1: BN_SETFOCUS = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:4512:1: BN_UNHILITE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4506:1: BN_UNPUSHED = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4510:1: BOLD_FONTTYPE = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:470:1: BROADCAST_QUERY_DENY = 0x424D5144 // /usr/x86_64-w64-mingw32/include/winuser.h:2093:1: BSF_ALLOWSFW = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:2088:1: BSF_FLUSHDISK = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2083:1: BSF_FORCEIFHUNG = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:2086:1: BSF_IGNORECURRENTTASK = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2082:1: BSF_LUID = 0x00000400 // /usr/x86_64-w64-mingw32/include/winuser.h:2091:1: BSF_NOHANG = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:2084:1: BSF_NOTIMEOUTIFNOTHUNG = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:2087:1: BSF_POSTMESSAGE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:2085:1: BSF_QUERY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2081:1: BSF_RETURNHDESK = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:2090:1: BSF_SENDNOTIFYMESSAGE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:2089:1: BSM_ALLCOMPONENTS = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2074:1: BSM_ALLDESKTOPS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:2079:1: BSM_APPLICATIONS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:2078:1: BSM_INSTALLABLEDRIVERS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2077:1: BSM_NETDRIVER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2076:1: BSM_VXDS = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2075:1: BST_CHECKED = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4528:1: BST_FOCUS = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:4531:1: BST_INDETERMINATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4529:1: BST_PUSHED = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4530:1: BST_UNCHECKED = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:4527:1: BS_3STATE = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4479:1: BS_AUTO3STATE = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:4480:1: BS_AUTOCHECKBOX = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4477:1: BS_AUTORADIOBUTTON = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:4483:1: BS_BITMAP = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4490:1: BS_BOTTOM = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4495:1: BS_CENTER = 768 // /usr/x86_64-w64-mingw32/include/winuser.h:4493:1: BS_CHECKBOX = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4476:1: BS_DEFPUSHBUTTON = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4475:1: BS_DIBPATTERN = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1469:1: BS_DIBPATTERN8X8 = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1472:1: BS_DIBPATTERNPT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1470:1: BS_FLAT = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:4500:1: BS_GROUPBOX = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:4481:1: BS_HATCHED = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1466:1: BS_HOLLOW = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1465:1: BS_ICON = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4489:1: BS_INDEXED = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1468:1: BS_LEFT = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4491:1: BS_LEFTTEXT = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4487:1: BS_MONOPATTERN = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1473:1: BS_MULTILINE = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4498:1: BS_NOTIFY = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4499:1: BS_NULL = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1464:1: BS_OWNERDRAW = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:4485:1: BS_PATTERN = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1467:1: BS_PATTERN8X8 = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1471:1: BS_PUSHBOX = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:4484:1: BS_PUSHBUTTON = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4474:1: BS_PUSHLIKE = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4497:1: BS_RADIOBUTTON = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4478:1: BS_RIGHT = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4492:1: BS_RIGHTBUTTON = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4501:1: BS_SOLID = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1463:1: BS_TEXT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4488:1: BS_TOP = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4494:1: BS_TYPEMASK = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:4486:1: BS_USERBUTTON = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4482:1: BS_VCENTER = 3072 // /usr/x86_64-w64-mingw32/include/winuser.h:4496:1: BTALLOC_ANY = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:66206:1: BTALLOC_EXACT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:66207:1: BTALLOC_LE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:66208:1: BTCF_AtLast = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65689:1: BTCF_Incrblob = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65690:1: BTCF_Multiple = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65691:1: BTCF_Pinned = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65692:1: BTCF_ValidNKey = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65687:1: BTCF_ValidOvfl = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65688:1: BTCF_WriteFlag = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65686:1: BTCURSOR_MAX_DEPTH = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65627:1: BTREE_APPEND = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15187:1: BTREE_APPLICATION_ID = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15079:1: BTREE_AUTOVACUUM_FULL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14952:1: BTREE_AUTOVACUUM_INCR = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14953:1: BTREE_AUTOVACUUM_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14951:1: BTREE_AUXDELETE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15186:1: BTREE_BLOBKEY = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15042:1: BTREE_BULKLOAD = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15124:1: BTREE_DATA_VERSION = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15080:1: BTREE_DEFAULT_CACHE_SIZE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15074:1: BTREE_FILE_FORMAT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15073:1: BTREE_FORDELETE = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15151:1: BTREE_FREE_PAGE_COUNT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15071:1: BTREE_HINT_RANGE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15109:1: BTREE_INCR_VACUUM = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15078:1: BTREE_INTKEY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15041:1: BTREE_LARGEST_ROOT_PAGE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15075:1: BTREE_MEMORY = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14980:1: BTREE_OMIT_JOURNAL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14979:1: BTREE_PREFORMAT = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15188:1: BTREE_SAVEPOSITION = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15185:1: BTREE_SCHEMA_VERSION = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15072:1: BTREE_SEEK_EQ = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15125:1: BTREE_SINGLE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14981:1: BTREE_TEXT_ENCODING = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15076:1: BTREE_UNORDERED = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14982:1: BTREE_USER_VERSION = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15077:1: BTREE_WRCSR = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15150:1: BTS_EXCLUSIVE = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65602:1: BTS_FAST_SECURE = 0x000c // testdata/sqlite-amalgamation-3380500/sqlite3.c:65599:1: BTS_INITIALLY_EMPTY = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65600:1: BTS_NO_WAL = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65601:1: BTS_OVERWRITE = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65598:1: BTS_PAGESIZE_FIXED = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65596:1: BTS_PENDING = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65603:1: BTS_READ_ONLY = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65595:1: BTS_SECURE_DELETE = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65597:1: BUFSIZ = 512 // /usr/x86_64-w64-mingw32/include/stdio.h:17:1: C1_ALPHA = 0x0100 // /usr/x86_64-w64-mingw32/include/winnls.h:63:1: C1_BLANK = 0x0040 // /usr/x86_64-w64-mingw32/include/winnls.h:61:1: C1_CNTRL = 0x0020 // /usr/x86_64-w64-mingw32/include/winnls.h:60:1: C1_DEFINED = 0x0200 // /usr/x86_64-w64-mingw32/include/winnls.h:64:1: C1_DIGIT = 0x0004 // /usr/x86_64-w64-mingw32/include/winnls.h:57:1: C1_LOWER = 0x0002 // /usr/x86_64-w64-mingw32/include/winnls.h:56:1: C1_PUNCT = 0x0010 // /usr/x86_64-w64-mingw32/include/winnls.h:59:1: C1_SPACE = 0x0008 // /usr/x86_64-w64-mingw32/include/winnls.h:58:1: C1_UPPER = 0x0001 // /usr/x86_64-w64-mingw32/include/winnls.h:55:1: C1_XDIGIT = 0x0080 // /usr/x86_64-w64-mingw32/include/winnls.h:62:1: C2_ARABICNUMBER = 0x0006 // /usr/x86_64-w64-mingw32/include/winnls.h:71:1: C2_BLOCKSEPARATOR = 0x0008 // /usr/x86_64-w64-mingw32/include/winnls.h:73:1: C2_COMMONSEPARATOR = 0x0007 // /usr/x86_64-w64-mingw32/include/winnls.h:72:1: C2_EUROPENUMBER = 0x0003 // /usr/x86_64-w64-mingw32/include/winnls.h:68:1: C2_EUROPESEPARATOR = 0x0004 // /usr/x86_64-w64-mingw32/include/winnls.h:69:1: C2_EUROPETERMINATOR = 0x0005 // /usr/x86_64-w64-mingw32/include/winnls.h:70:1: C2_LEFTTORIGHT = 0x0001 // /usr/x86_64-w64-mingw32/include/winnls.h:66:1: C2_NOTAPPLICABLE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnls.h:78:1: C2_OTHERNEUTRAL = 0x000b // /usr/x86_64-w64-mingw32/include/winnls.h:76:1: C2_RIGHTTOLEFT = 0x0002 // /usr/x86_64-w64-mingw32/include/winnls.h:67:1: C2_SEGMENTSEPARATOR = 0x0009 // /usr/x86_64-w64-mingw32/include/winnls.h:74:1: C2_WHITESPACE = 0x000a // /usr/x86_64-w64-mingw32/include/winnls.h:75:1: C3_ALPHA = 0x8000 // /usr/x86_64-w64-mingw32/include/winnls.h:93:1: C3_DIACRITIC = 0x0002 // /usr/x86_64-w64-mingw32/include/winnls.h:81:1: C3_FULLWIDTH = 0x0080 // /usr/x86_64-w64-mingw32/include/winnls.h:87:1: C3_HALFWIDTH = 0x0040 // /usr/x86_64-w64-mingw32/include/winnls.h:86:1: C3_HIGHSURROGATE = 0x0800 // /usr/x86_64-w64-mingw32/include/winnls.h:91:1: C3_HIRAGANA = 0x0020 // /usr/x86_64-w64-mingw32/include/winnls.h:85:1: C3_IDEOGRAPH = 0x0100 // /usr/x86_64-w64-mingw32/include/winnls.h:88:1: C3_KASHIDA = 0x0200 // /usr/x86_64-w64-mingw32/include/winnls.h:89:1: C3_KATAKANA = 0x0010 // /usr/x86_64-w64-mingw32/include/winnls.h:84:1: C3_LEXICAL = 0x0400 // /usr/x86_64-w64-mingw32/include/winnls.h:90:1: C3_LOWSURROGATE = 0x1000 // /usr/x86_64-w64-mingw32/include/winnls.h:92:1: C3_NONSPACING = 0x0001 // /usr/x86_64-w64-mingw32/include/winnls.h:80:1: C3_NOTAPPLICABLE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnls.h:95:1: C3_SYMBOL = 0x0008 // /usr/x86_64-w64-mingw32/include/winnls.h:83:1: C3_VOWELMARK = 0x0004 // /usr/x86_64-w64-mingw32/include/winnls.h:82:1: CACHE_E_FIRST = 2147746160 // /usr/x86_64-w64-mingw32/include/winerror.h:2403:1: CACHE_E_LAST = 2147746175 // /usr/x86_64-w64-mingw32/include/winerror.h:2404:1: CACHE_FULLY_ASSOCIATIVE = 0xFF // /usr/x86_64-w64-mingw32/include/winnt.h:4616:1: CACHE_STALE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22170:1: CACHE_S_FIRST = 262512 // /usr/x86_64-w64-mingw32/include/winerror.h:2405:1: CACHE_S_LAST = 262527 // /usr/x86_64-w64-mingw32/include/winerror.h:2406:1: CADV_LATEACK = 0xFFFF // /usr/x86_64-w64-mingw32/include/ddeml.h:73:1: CALERT_SYSTEM = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:6059:1: CALG_3DES = 26115 // /usr/x86_64-w64-mingw32/include/wincrypt.h:216:1: CALG_3DES_112 = 26121 // /usr/x86_64-w64-mingw32/include/wincrypt.h:215:1: CALG_AES = 26129 // /usr/x86_64-w64-mingw32/include/wincrypt.h:245:1: CALG_AES_128 = 26126 // /usr/x86_64-w64-mingw32/include/wincrypt.h:242:1: CALG_AES_192 = 26127 // /usr/x86_64-w64-mingw32/include/wincrypt.h:243:1: CALG_AES_256 = 26128 // /usr/x86_64-w64-mingw32/include/wincrypt.h:244:1: CALG_AGREEDKEY_ANY = 43523 // /usr/x86_64-w64-mingw32/include/wincrypt.h:223:1: CALG_CYLINK_MEK = 26124 // /usr/x86_64-w64-mingw32/include/wincrypt.h:228:1: CALG_DES = 26113 // /usr/x86_64-w64-mingw32/include/wincrypt.h:214:1: CALG_DESX = 26116 // /usr/x86_64-w64-mingw32/include/wincrypt.h:217:1: CALG_DH_EPHEM = 43522 // /usr/x86_64-w64-mingw32/include/wincrypt.h:222:1: CALG_DH_SF = 43521 // /usr/x86_64-w64-mingw32/include/wincrypt.h:221:1: CALG_DSS_SIGN = 8704 // /usr/x86_64-w64-mingw32/include/wincrypt.h:209:1: CALG_HASH_REPLACE_OWF = 32779 // /usr/x86_64-w64-mingw32/include/wincrypt.h:241:1: CALG_HMAC = 32777 // /usr/x86_64-w64-mingw32/include/wincrypt.h:238:1: CALG_HUGHES_MD5 = 40963 // /usr/x86_64-w64-mingw32/include/wincrypt.h:225:1: CALG_KEA_KEYX = 43524 // /usr/x86_64-w64-mingw32/include/wincrypt.h:224:1: CALG_MAC = 32773 // /usr/x86_64-w64-mingw32/include/wincrypt.h:207:1: CALG_MD2 = 32769 // /usr/x86_64-w64-mingw32/include/wincrypt.h:202:1: CALG_MD4 = 32770 // /usr/x86_64-w64-mingw32/include/wincrypt.h:203:1: CALG_MD5 = 32771 // /usr/x86_64-w64-mingw32/include/wincrypt.h:204:1: CALG_NO_SIGN = 8192 // /usr/x86_64-w64-mingw32/include/wincrypt.h:211:1: CALG_OID_INFO_CNG_ONLY = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:2758:1: CALG_OID_INFO_PARAMETERS = 0xfffffffe // /usr/x86_64-w64-mingw32/include/wincrypt.h:2759:1: CALG_PCT1_MASTER = 19460 // /usr/x86_64-w64-mingw32/include/wincrypt.h:234:1: CALG_RC2 = 26114 // /usr/x86_64-w64-mingw32/include/wincrypt.h:218:1: CALG_RC4 = 26625 // /usr/x86_64-w64-mingw32/include/wincrypt.h:219:1: CALG_RC5 = 26125 // /usr/x86_64-w64-mingw32/include/wincrypt.h:237:1: CALG_RSA_KEYX = 41984 // /usr/x86_64-w64-mingw32/include/wincrypt.h:213:1: CALG_RSA_SIGN = 9216 // /usr/x86_64-w64-mingw32/include/wincrypt.h:208:1: CALG_SCHANNEL_ENC_KEY = 19463 // /usr/x86_64-w64-mingw32/include/wincrypt.h:233:1: CALG_SCHANNEL_MAC_KEY = 19459 // /usr/x86_64-w64-mingw32/include/wincrypt.h:232:1: CALG_SCHANNEL_MASTER_HASH = 19458 // /usr/x86_64-w64-mingw32/include/wincrypt.h:231:1: CALG_SEAL = 26626 // /usr/x86_64-w64-mingw32/include/wincrypt.h:220:1: CALG_SHA = 32772 // /usr/x86_64-w64-mingw32/include/wincrypt.h:205:1: CALG_SHA1 = 32772 // /usr/x86_64-w64-mingw32/include/wincrypt.h:206:1: CALG_SHA_256 = 32780 // /usr/x86_64-w64-mingw32/include/wincrypt.h:248:1: CALG_SHA_384 = 32781 // /usr/x86_64-w64-mingw32/include/wincrypt.h:249:1: CALG_SHA_512 = 32782 // /usr/x86_64-w64-mingw32/include/wincrypt.h:250:1: CALG_SKIPJACK = 26122 // /usr/x86_64-w64-mingw32/include/wincrypt.h:226:1: CALG_SSL2_MASTER = 19461 // /usr/x86_64-w64-mingw32/include/wincrypt.h:235:1: CALG_SSL3_MASTER = 19457 // /usr/x86_64-w64-mingw32/include/wincrypt.h:230:1: CALG_SSL3_SHAMD5 = 32776 // /usr/x86_64-w64-mingw32/include/wincrypt.h:229:1: CALG_TEK = 26123 // /usr/x86_64-w64-mingw32/include/wincrypt.h:227:1: CALG_TLS1PRF = 32778 // /usr/x86_64-w64-mingw32/include/wincrypt.h:239:1: CALG_TLS1_MASTER = 19462 // /usr/x86_64-w64-mingw32/include/wincrypt.h:236:1: CALLBACK = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:90:1: CALLBACK_CHUNK_FINISHED = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:105:1: CALLBACK_EVENT = 327680 // /usr/x86_64-w64-mingw32/include/mmsystem.h:225:1: CALLBACK_FUNCTION = 196608 // /usr/x86_64-w64-mingw32/include/mmsystem.h:223:1: CALLBACK_NULL = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:220:1: CALLBACK_STREAM_SWITCH = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:106:1: CALLBACK_TASK = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:222:1: CALLBACK_THREAD = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:224:1: CALLBACK_TYPEMASK = 458752 // /usr/x86_64-w64-mingw32/include/mmsystem.h:219:1: CALLBACK_WINDOW = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:221:1: CALL_PENDING = 0x02 // /usr/x86_64-w64-mingw32/include/nb30.h:103:1: CAL_GREGORIAN = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:576:1: CAL_GREGORIAN_ARABIC = 10 // /usr/x86_64-w64-mingw32/include/winnls.h:585:1: CAL_GREGORIAN_ME_FRENCH = 9 // /usr/x86_64-w64-mingw32/include/winnls.h:584:1: CAL_GREGORIAN_US = 2 // /usr/x86_64-w64-mingw32/include/winnls.h:577:1: CAL_GREGORIAN_XLIT_ENGLISH = 11 // /usr/x86_64-w64-mingw32/include/winnls.h:586:1: CAL_GREGORIAN_XLIT_FRENCH = 12 // /usr/x86_64-w64-mingw32/include/winnls.h:587:1: CAL_HEBREW = 8 // /usr/x86_64-w64-mingw32/include/winnls.h:583:1: CAL_HIJRI = 6 // /usr/x86_64-w64-mingw32/include/winnls.h:581:1: CAL_ICALINTVALUE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:511:1: CAL_ITWODIGITYEARMAX = 0x00000030 // /usr/x86_64-w64-mingw32/include/winnls.h:559:1: CAL_IYEAROFFSETRANGE = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnls.h:513:1: CAL_JAPAN = 3 // /usr/x86_64-w64-mingw32/include/winnls.h:578:1: CAL_KOREA = 5 // /usr/x86_64-w64-mingw32/include/winnls.h:580:1: CAL_NOUSEROVERRIDE = 2147483648 // /usr/x86_64-w64-mingw32/include/winnls.h:504:1: CAL_RETURN_NUMBER = 536870912 // /usr/x86_64-w64-mingw32/include/winnls.h:506:1: CAL_SABBREVDAYNAME1 = 0x0000000e // /usr/x86_64-w64-mingw32/include/winnls.h:524:1: CAL_SABBREVDAYNAME2 = 0x0000000f // /usr/x86_64-w64-mingw32/include/winnls.h:525:1: CAL_SABBREVDAYNAME3 = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:526:1: CAL_SABBREVDAYNAME4 = 0x00000011 // /usr/x86_64-w64-mingw32/include/winnls.h:527:1: CAL_SABBREVDAYNAME5 = 0x00000012 // /usr/x86_64-w64-mingw32/include/winnls.h:528:1: CAL_SABBREVDAYNAME6 = 0x00000013 // /usr/x86_64-w64-mingw32/include/winnls.h:529:1: CAL_SABBREVDAYNAME7 = 0x00000014 // /usr/x86_64-w64-mingw32/include/winnls.h:530:1: CAL_SABBREVMONTHNAME1 = 0x00000022 // /usr/x86_64-w64-mingw32/include/winnls.h:545:1: CAL_SABBREVMONTHNAME10 = 0x0000002b // /usr/x86_64-w64-mingw32/include/winnls.h:554:1: CAL_SABBREVMONTHNAME11 = 0x0000002c // /usr/x86_64-w64-mingw32/include/winnls.h:555:1: CAL_SABBREVMONTHNAME12 = 0x0000002d // /usr/x86_64-w64-mingw32/include/winnls.h:556:1: CAL_SABBREVMONTHNAME13 = 0x0000002e // /usr/x86_64-w64-mingw32/include/winnls.h:557:1: CAL_SABBREVMONTHNAME2 = 0x00000023 // /usr/x86_64-w64-mingw32/include/winnls.h:546:1: CAL_SABBREVMONTHNAME3 = 0x00000024 // /usr/x86_64-w64-mingw32/include/winnls.h:547:1: CAL_SABBREVMONTHNAME4 = 0x00000025 // /usr/x86_64-w64-mingw32/include/winnls.h:548:1: CAL_SABBREVMONTHNAME5 = 0x00000026 // /usr/x86_64-w64-mingw32/include/winnls.h:549:1: CAL_SABBREVMONTHNAME6 = 0x00000027 // /usr/x86_64-w64-mingw32/include/winnls.h:550:1: CAL_SABBREVMONTHNAME7 = 0x00000028 // /usr/x86_64-w64-mingw32/include/winnls.h:551:1: CAL_SABBREVMONTHNAME8 = 0x00000029 // /usr/x86_64-w64-mingw32/include/winnls.h:552:1: CAL_SABBREVMONTHNAME9 = 0x0000002a // /usr/x86_64-w64-mingw32/include/winnls.h:553:1: CAL_SCALNAME = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:512:1: CAL_SDAYNAME1 = 0x00000007 // /usr/x86_64-w64-mingw32/include/winnls.h:517:1: CAL_SDAYNAME2 = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:518:1: CAL_SDAYNAME3 = 0x00000009 // /usr/x86_64-w64-mingw32/include/winnls.h:519:1: CAL_SDAYNAME4 = 0x0000000a // /usr/x86_64-w64-mingw32/include/winnls.h:520:1: CAL_SDAYNAME5 = 0x0000000b // /usr/x86_64-w64-mingw32/include/winnls.h:521:1: CAL_SDAYNAME6 = 0x0000000c // /usr/x86_64-w64-mingw32/include/winnls.h:522:1: CAL_SDAYNAME7 = 0x0000000d // /usr/x86_64-w64-mingw32/include/winnls.h:523:1: CAL_SERASTRING = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:514:1: CAL_SLONGDATE = 0x00000006 // /usr/x86_64-w64-mingw32/include/winnls.h:516:1: CAL_SMONTHNAME1 = 0x00000015 // /usr/x86_64-w64-mingw32/include/winnls.h:532:1: CAL_SMONTHNAME10 = 0x0000001e // /usr/x86_64-w64-mingw32/include/winnls.h:541:1: CAL_SMONTHNAME11 = 0x0000001f // /usr/x86_64-w64-mingw32/include/winnls.h:542:1: CAL_SMONTHNAME12 = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:543:1: CAL_SMONTHNAME13 = 0x00000021 // /usr/x86_64-w64-mingw32/include/winnls.h:544:1: CAL_SMONTHNAME2 = 0x00000016 // /usr/x86_64-w64-mingw32/include/winnls.h:533:1: CAL_SMONTHNAME3 = 0x00000017 // /usr/x86_64-w64-mingw32/include/winnls.h:534:1: CAL_SMONTHNAME4 = 0x00000018 // /usr/x86_64-w64-mingw32/include/winnls.h:535:1: CAL_SMONTHNAME5 = 0x00000019 // /usr/x86_64-w64-mingw32/include/winnls.h:536:1: CAL_SMONTHNAME6 = 0x0000001a // /usr/x86_64-w64-mingw32/include/winnls.h:537:1: CAL_SMONTHNAME7 = 0x0000001b // /usr/x86_64-w64-mingw32/include/winnls.h:538:1: CAL_SMONTHNAME8 = 0x0000001c // /usr/x86_64-w64-mingw32/include/winnls.h:539:1: CAL_SMONTHNAME9 = 0x0000001d // /usr/x86_64-w64-mingw32/include/winnls.h:540:1: CAL_SSHORTDATE = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnls.h:515:1: CAL_SYEARMONTH = 0x0000002f // /usr/x86_64-w64-mingw32/include/winnls.h:558:1: CAL_TAIWAN = 4 // /usr/x86_64-w64-mingw32/include/winnls.h:579:1: CAL_THAI = 7 // /usr/x86_64-w64-mingw32/include/winnls.h:582:1: CAL_UMALQURA = 23 // /usr/x86_64-w64-mingw32/include/winnls.h:588:1: CAL_USE_CP_ACP = 1073741824 // /usr/x86_64-w64-mingw32/include/winnls.h:505:1: CAPSLOCK_ON = 0x80 // /usr/x86_64-w64-mingw32/include/wincon.h:51:1: CAP_ATAPI_ID_CMD = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:883:1: CAP_ATA_ID_CMD = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:882:1: CAP_SMART_CMD = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:884:1: CAT_E_FIRST = 2147746144 // /usr/x86_64-w64-mingw32/include/winerror.h:2385:1: CAT_E_LAST = 2147746145 // /usr/x86_64-w64-mingw32/include/winerror.h:2386:1: CA_LOG_FILTER = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:3350:1: CA_NEGATIVE = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:3349:1: CBF_FAIL_ADVISES = 0x00004000 // /usr/x86_64-w64-mingw32/include/ddeml.h:164:1: CBF_FAIL_ALLSVRXACTIONS = 0x0003f000 // /usr/x86_64-w64-mingw32/include/ddeml.h:168:1: CBF_FAIL_CONNECTIONS = 0x00002000 // /usr/x86_64-w64-mingw32/include/ddeml.h:163:1: CBF_FAIL_EXECUTES = 0x00008000 // /usr/x86_64-w64-mingw32/include/ddeml.h:165:1: CBF_FAIL_POKES = 0x00010000 // /usr/x86_64-w64-mingw32/include/ddeml.h:166:1: CBF_FAIL_REQUESTS = 0x00020000 // /usr/x86_64-w64-mingw32/include/ddeml.h:167:1: CBF_FAIL_SELFCONNECTIONS = 0x00001000 // /usr/x86_64-w64-mingw32/include/ddeml.h:162:1: CBF_SKIP_ALLNOTIFICATIONS = 0x003c0000 // /usr/x86_64-w64-mingw32/include/ddeml.h:174:1: CBF_SKIP_CONNECT_CONFIRMS = 0x00040000 // /usr/x86_64-w64-mingw32/include/ddeml.h:170:1: CBF_SKIP_DISCONNECTS = 0x00200000 // /usr/x86_64-w64-mingw32/include/ddeml.h:173:1: CBF_SKIP_REGISTRATIONS = 0x00080000 // /usr/x86_64-w64-mingw32/include/ddeml.h:171:1: CBF_SKIP_UNREGISTRATIONS = 0x00100000 // /usr/x86_64-w64-mingw32/include/ddeml.h:172:1: CBM_INIT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1661:1: CBN_CLOSEUP = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4777:1: CBN_DBLCLK = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4771:1: CBN_DROPDOWN = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:4776:1: CBN_EDITCHANGE = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4774:1: CBN_EDITUPDATE = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:4775:1: CBN_ERRSPACE = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:4769:1: CBN_KILLFOCUS = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4773:1: CBN_SELCHANGE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4770:1: CBN_SELENDCANCEL = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:4779:1: CBN_SELENDOK = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:4778:1: CBN_SETFOCUS = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4772:1: CBR_110 = 110 // /usr/x86_64-w64-mingw32/include/winbase.h:482:1: CBR_115200 = 115200 // /usr/x86_64-w64-mingw32/include/winbase.h:494:1: CBR_1200 = 1200 // /usr/x86_64-w64-mingw32/include/winbase.h:485:1: CBR_128000 = 128000 // /usr/x86_64-w64-mingw32/include/winbase.h:495:1: CBR_14400 = 14400 // /usr/x86_64-w64-mingw32/include/winbase.h:489:1: CBR_19200 = 19200 // /usr/x86_64-w64-mingw32/include/winbase.h:490:1: CBR_2400 = 2400 // /usr/x86_64-w64-mingw32/include/winbase.h:486:1: CBR_256000 = 256000 // /usr/x86_64-w64-mingw32/include/winbase.h:496:1: CBR_300 = 300 // /usr/x86_64-w64-mingw32/include/winbase.h:483:1: CBR_38400 = 38400 // /usr/x86_64-w64-mingw32/include/winbase.h:491:1: CBR_4800 = 4800 // /usr/x86_64-w64-mingw32/include/winbase.h:487:1: CBR_56000 = 56000 // /usr/x86_64-w64-mingw32/include/winbase.h:492:1: CBR_57600 = 57600 // /usr/x86_64-w64-mingw32/include/winbase.h:493:1: CBR_600 = 600 // /usr/x86_64-w64-mingw32/include/winbase.h:484:1: CBR_9600 = 9600 // /usr/x86_64-w64-mingw32/include/winbase.h:488:1: CBS_AUTOHSCROLL = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4788:1: CBS_DISABLENOSCROLL = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4793:1: CBS_DROPDOWN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4784:1: CBS_DROPDOWNLIST = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4785:1: CBS_HASSTRINGS = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4791:1: CBS_LOWERCASE = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4795:1: CBS_NOINTEGRALHEIGHT = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4792:1: CBS_OEMCONVERT = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4789:1: CBS_OWNERDRAWFIXED = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4786:1: CBS_OWNERDRAWVARIABLE = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4787:1: CBS_SIMPLE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4783:1: CBS_SORT = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4790:1: CBS_UPPERCASE = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4794:1: CB_ADDSTRING = 0x0143 // /usr/x86_64-w64-mingw32/include/winuser.h:4802:1: CB_DELETESTRING = 0x0144 // /usr/x86_64-w64-mingw32/include/winuser.h:4803:1: CB_DIR = 0x0145 // /usr/x86_64-w64-mingw32/include/winuser.h:4804:1: CB_ERR = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:4766:1: CB_ERRSPACE = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:4767:1: CB_FINDSTRING = 0x014C // /usr/x86_64-w64-mingw32/include/winuser.h:4811:1: CB_FINDSTRINGEXACT = 0x0158 // /usr/x86_64-w64-mingw32/include/winuser.h:4823:1: CB_GETCOMBOBOXINFO = 0x0164 // /usr/x86_64-w64-mingw32/include/winuser.h:4836:1: CB_GETCOUNT = 0x0146 // /usr/x86_64-w64-mingw32/include/winuser.h:4805:1: CB_GETCURSEL = 0x0147 // /usr/x86_64-w64-mingw32/include/winuser.h:4806:1: CB_GETDROPPEDCONTROLRECT = 0x0152 // /usr/x86_64-w64-mingw32/include/winuser.h:4817:1: CB_GETDROPPEDSTATE = 0x0157 // /usr/x86_64-w64-mingw32/include/winuser.h:4822:1: CB_GETDROPPEDWIDTH = 0x015f // /usr/x86_64-w64-mingw32/include/winuser.h:4830:1: CB_GETEDITSEL = 0x0140 // /usr/x86_64-w64-mingw32/include/winuser.h:4799:1: CB_GETEXTENDEDUI = 0x0156 // /usr/x86_64-w64-mingw32/include/winuser.h:4821:1: CB_GETHORIZONTALEXTENT = 0x015d // /usr/x86_64-w64-mingw32/include/winuser.h:4828:1: CB_GETITEMDATA = 0x0150 // /usr/x86_64-w64-mingw32/include/winuser.h:4815:1: CB_GETITEMHEIGHT = 0x0154 // /usr/x86_64-w64-mingw32/include/winuser.h:4819:1: CB_GETLBTEXT = 0x0148 // /usr/x86_64-w64-mingw32/include/winuser.h:4807:1: CB_GETLBTEXTLEN = 0x0149 // /usr/x86_64-w64-mingw32/include/winuser.h:4808:1: CB_GETLOCALE = 0x015A // /usr/x86_64-w64-mingw32/include/winuser.h:4825:1: CB_GETTOPINDEX = 0x015b // /usr/x86_64-w64-mingw32/include/winuser.h:4826:1: CB_INITSTORAGE = 0x0161 // /usr/x86_64-w64-mingw32/include/winuser.h:4832:1: CB_INSERTSTRING = 0x014A // /usr/x86_64-w64-mingw32/include/winuser.h:4809:1: CB_LIMITTEXT = 0x0141 // /usr/x86_64-w64-mingw32/include/winuser.h:4800:1: CB_MSGMAX = 0x0165 // /usr/x86_64-w64-mingw32/include/winuser.h:4838:1: CB_OKAY = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4765:1: CB_RESETCONTENT = 0x014B // /usr/x86_64-w64-mingw32/include/winuser.h:4810:1: CB_SELECTSTRING = 0x014D // /usr/x86_64-w64-mingw32/include/winuser.h:4812:1: CB_SETCURSEL = 0x014E // /usr/x86_64-w64-mingw32/include/winuser.h:4813:1: CB_SETDROPPEDWIDTH = 0x0160 // /usr/x86_64-w64-mingw32/include/winuser.h:4831:1: CB_SETEDITSEL = 0x0142 // /usr/x86_64-w64-mingw32/include/winuser.h:4801:1: CB_SETEXTENDEDUI = 0x0155 // /usr/x86_64-w64-mingw32/include/winuser.h:4820:1: CB_SETHORIZONTALEXTENT = 0x015e // /usr/x86_64-w64-mingw32/include/winuser.h:4829:1: CB_SETITEMDATA = 0x0151 // /usr/x86_64-w64-mingw32/include/winuser.h:4816:1: CB_SETITEMHEIGHT = 0x0153 // /usr/x86_64-w64-mingw32/include/winuser.h:4818:1: CB_SETLOCALE = 0x0159 // /usr/x86_64-w64-mingw32/include/winuser.h:4824:1: CB_SETTOPINDEX = 0x015c // /usr/x86_64-w64-mingw32/include/winuser.h:4827:1: CB_SHOWDROPDOWN = 0x014F // /usr/x86_64-w64-mingw32/include/winuser.h:4814:1: CCERR_CHOOSECOLORCODES = 0x5000 // /usr/x86_64-w64-mingw32/include/cderr.h:51:1: CCHDEVICENAME = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1666:1: CCHFORMNAME = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1668:1: CCHILDREN_SCROLLBAR = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:6164:1: CCHILDREN_TITLEBAR = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:6163:1: CCH_MAX_PROPSTG_NAME = 31 // /usr/x86_64-w64-mingw32/include/propidl.h:1092:1: CC_AND = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166852:1: CC_ANYCOLOR = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:320:1: CC_BANG = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166843:1: CC_BOM = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166858:1: CC_CHORD = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1569:1: CC_CIRCLES = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1567:1: CC_COMMA = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166851:1: CC_DIGIT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166831:1: CC_DOLLAR = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166832:1: CC_DOT = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166854:1: CC_ELLIPSES = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1570:1: CC_ENABLEHOOK = 0x10 // /usr/x86_64-w64-mingw32/include/commdlg.h:316:1: CC_ENABLETEMPLATE = 0x20 // /usr/x86_64-w64-mingw32/include/commdlg.h:317:1: CC_ENABLETEMPLATEHANDLE = 0x40 // /usr/x86_64-w64-mingw32/include/commdlg.h:318:1: CC_EQ = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166842:1: CC_FULLOPEN = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:313:1: CC_GT = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166841:1: CC_ID = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166855:1: CC_ILLEGAL = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166856:1: CC_INTERIORS = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1574:1: CC_KYWD = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166830:1: CC_KYWD0 = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166829:1: CC_LP = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166845:1: CC_LT = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166840:1: CC_MINUS = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166839:1: CC_NONE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1566:1: CC_NUL = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166857:1: CC_PERCENT = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166850:1: CC_PIE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1568:1: CC_PIPE = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166838:1: CC_PLUS = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166848:1: CC_PREVENTFULLOPEN = 0x4 // /usr/x86_64-w64-mingw32/include/commdlg.h:314:1: CC_QUOTE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166836:1: CC_QUOTE2 = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166837:1: CC_RGBINIT = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:312:1: CC_ROUNDRECT = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1575:1: CC_RP = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166846:1: CC_SEMI = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166847:1: CC_SHOWHELP = 0x8 // /usr/x86_64-w64-mingw32/include/commdlg.h:315:1: CC_SLASH = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166844:1: CC_SOLIDCOLOR = 0x80 // /usr/x86_64-w64-mingw32/include/commdlg.h:319:1: CC_SPACE = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166835:1: CC_STAR = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166849:1: CC_STYLED = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1572:1: CC_TILDA = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166853:1: CC_VARALPHA = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166833:1: CC_VARNUM = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166834:1: CC_WIDE = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1571:1: CC_WIDESTYLED = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1573:1: CC_X = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166828:1: CDECL = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:83:1: CDERR_DIALOGFAILURE = 0xFFFF // /usr/x86_64-w64-mingw32/include/cderr.h:9:1: CDERR_FINDRESFAILURE = 0x0006 // /usr/x86_64-w64-mingw32/include/cderr.h:17:1: CDERR_GENERALCODES = 0x0000 // /usr/x86_64-w64-mingw32/include/cderr.h:11:1: CDERR_INITIALIZATION = 0x0002 // /usr/x86_64-w64-mingw32/include/cderr.h:13:1: CDERR_LOADRESFAILURE = 0x0007 // /usr/x86_64-w64-mingw32/include/cderr.h:18:1: CDERR_LOADSTRFAILURE = 0x0005 // /usr/x86_64-w64-mingw32/include/cderr.h:16:1: CDERR_LOCKRESFAILURE = 0x0008 // /usr/x86_64-w64-mingw32/include/cderr.h:19:1: CDERR_MEMALLOCFAILURE = 0x0009 // /usr/x86_64-w64-mingw32/include/cderr.h:20:1: CDERR_MEMLOCKFAILURE = 0x000A // /usr/x86_64-w64-mingw32/include/cderr.h:21:1: CDERR_NOHINSTANCE = 0x0004 // /usr/x86_64-w64-mingw32/include/cderr.h:15:1: CDERR_NOHOOK = 0x000B // /usr/x86_64-w64-mingw32/include/cderr.h:22:1: CDERR_NOTEMPLATE = 0x0003 // /usr/x86_64-w64-mingw32/include/cderr.h:14:1: CDERR_REGISTERMSGFAIL = 0x000C // /usr/x86_64-w64-mingw32/include/cderr.h:23:1: CDERR_STRUCTSIZE = 0x0001 // /usr/x86_64-w64-mingw32/include/cderr.h:12:1: CDM_FIRST = 1124 // /usr/x86_64-w64-mingw32/include/commdlg.h:251:1: CDM_GETFILEPATH = 1125 // /usr/x86_64-w64-mingw32/include/commdlg.h:260:1: CDM_GETFOLDERIDLIST = 1127 // /usr/x86_64-w64-mingw32/include/commdlg.h:272:1: CDM_GETFOLDERPATH = 1126 // /usr/x86_64-w64-mingw32/include/commdlg.h:266:1: CDM_GETSPEC = 1124 // /usr/x86_64-w64-mingw32/include/commdlg.h:254:1: CDM_HIDECONTROL = 1129 // /usr/x86_64-w64-mingw32/include/commdlg.h:276:1: CDM_LAST = 1224 // /usr/x86_64-w64-mingw32/include/commdlg.h:252:1: CDM_SETCONTROLTEXT = 1128 // /usr/x86_64-w64-mingw32/include/commdlg.h:274:1: CDM_SETDEFEXT = 1130 // /usr/x86_64-w64-mingw32/include/commdlg.h:278:1: CDN_FILEOK = 18446744073709551010 // /usr/x86_64-w64-mingw32/include/commdlg.h:247:1: CDN_FIRST = 18446744073709551015 // /usr/x86_64-w64-mingw32/include/commdlg.h:239:1: CDN_FOLDERCHANGE = 18446744073709551013 // /usr/x86_64-w64-mingw32/include/commdlg.h:244:1: CDN_HELP = 18446744073709551011 // /usr/x86_64-w64-mingw32/include/commdlg.h:246:1: CDN_INCLUDEITEM = 18446744073709551008 // /usr/x86_64-w64-mingw32/include/commdlg.h:249:1: CDN_INITDONE = 18446744073709551015 // /usr/x86_64-w64-mingw32/include/commdlg.h:242:1: CDN_LAST = 18446744073709550917 // /usr/x86_64-w64-mingw32/include/commdlg.h:240:1: CDN_SELCHANGE = 18446744073709551014 // /usr/x86_64-w64-mingw32/include/commdlg.h:243:1: CDN_SHAREVIOLATION = 18446744073709551012 // /usr/x86_64-w64-mingw32/include/commdlg.h:245:1: CDN_TYPECHANGE = 18446744073709551009 // /usr/x86_64-w64-mingw32/include/commdlg.h:248:1: CDS_FULLSCREEN = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5565:1: CDS_GLOBAL = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5566:1: CDS_NORESET = 0x10000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5575:1: CDS_RESET = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5573:1: CDS_RESET_EX = 0x20000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5574:1: CDS_SET_PRIMARY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5567:1: CDS_TEST = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5564:1: CDS_UPDATEREGISTRY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5563:1: CDS_VIDEOPARAMETERS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5568:1: CD_LBSELADD = 2 // /usr/x86_64-w64-mingw32/include/commdlg.h:514:1: CD_LBSELCHANGE = 0 // /usr/x86_64-w64-mingw32/include/commdlg.h:512:1: CD_LBSELNOITEMS = -1 // /usr/x86_64-w64-mingw32/include/commdlg.h:511:1: CD_LBSELSUB = 1 // /usr/x86_64-w64-mingw32/include/commdlg.h:513:1: CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3692:1: CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3691:1: CERT_ACCESS_STATE_PROP_ID = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3556:1: CERT_ACCESS_STATE_SHARED_USER_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3693:1: CERT_ACCESS_STATE_SYSTEM_STORE_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3690:1: CERT_ACCESS_STATE_WRITE_PERSIST_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3689:1: CERT_AIA_URL_RETRIEVED_PROP_ID = 67 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3576:1: CERT_ALT_NAME_DIRECTORY_NAME = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1965:1: CERT_ALT_NAME_DNS_NAME = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1963:1: CERT_ALT_NAME_EDI_PARTY_NAME = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1966:1: CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK = 0xff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1975:1: CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1976:1: CERT_ALT_NAME_IP_ADDRESS = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1968:1: CERT_ALT_NAME_OTHER_NAME = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1961:1: CERT_ALT_NAME_REGISTERED_ID = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1969:1: CERT_ALT_NAME_RFC822_NAME = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1962:1: CERT_ALT_NAME_URL = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1967:1: CERT_ALT_NAME_VALUE_ERR_INDEX_MASK = 0x0000ffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1977:1: CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1978:1: CERT_ALT_NAME_X400_ADDRESS = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1964:1: CERT_ARCHIVED_KEY_HASH_PROP_ID = 65 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3574:1: CERT_ARCHIVED_PROP_ID = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3561:1: CERT_AUTHORITY_INFO_ACCESS_PROP_ID = 68 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3577:1: CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_PARTIAL_CHAIN_LOGGING_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3903:1: CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_UNTRUSTED_ROOT_LOGGING_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3902:1: CERT_AUTH_ROOT_CTL_FILENAME_A = "authroot.stl" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3908:1: CERT_AUTH_ROOT_SHA256_HASH_PROP_ID = 98 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3606:1: CERT_AUTO_ENROLL_PROP_ID = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3563:1: CERT_AUTO_ENROLL_RETRY_PROP_ID = 66 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3575:1: CERT_AUTO_UPDATE_DISABLE_RANDOM_QUERY_STRING_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3904:1: CERT_BACKED_UP_PROP_ID = 69 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3578:1: CERT_BIOMETRIC_OID_DATA_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2588:1: CERT_BIOMETRIC_PICTURE_TYPE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2590:1: CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2587:1: CERT_BIOMETRIC_SIGNATURE_TYPE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2591:1: CERT_BUNDLE_CERTIFICATE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1341:1: CERT_BUNDLE_CRL = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1342:1: CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4449:1: CERT_CA_DISABLE_CRL_PROP_ID = 82 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3591:1: CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID = 81 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3590:1: CERT_CA_SUBJECT_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1991:1: CERT_CEP_PROP_ID = 87 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3596:1: CERT_CHAIN_AUTO_CURRENT_USER = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5123:1: CERT_CHAIN_AUTO_FLUSH_DISABLE_FLAG = 0x00000001 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5134:1: CERT_CHAIN_AUTO_FLUSH_FIRST_DELTA_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5141:1: CERT_CHAIN_AUTO_FLUSH_NEXT_DELTA_SECONDS_DEFAULT = 1800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5143:1: CERT_CHAIN_AUTO_HPKP_RULE_INFO = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5130:1: CERT_CHAIN_AUTO_IMPERSONATED = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5125:1: CERT_CHAIN_AUTO_LOCAL_MACHINE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5124:1: CERT_CHAIN_AUTO_LOG_CREATE_FLAG = 0x00000002 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5135:1: CERT_CHAIN_AUTO_LOG_FLAGS = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5138:1: CERT_CHAIN_AUTO_LOG_FLUSH_FLAG = 0x00000008 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5137:1: CERT_CHAIN_AUTO_LOG_FREE_FLAG = 0x00000004 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5136:1: CERT_CHAIN_AUTO_NETWORK_INFO = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5128:1: CERT_CHAIN_AUTO_PINRULE_INFO = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5127:1: CERT_CHAIN_AUTO_PROCESS_INFO = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5126:1: CERT_CHAIN_AUTO_SERIAL_LOCAL_MACHINE = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5129:1: CERT_CHAIN_CACHE_END_CERT = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5236:1: CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5238:1: CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_DEFAULT = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5230:1: CERT_CHAIN_CROSS_CERT_DOWNLOAD_INTERVAL_HOURS_DEFAULT = 168 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5228:1: CERT_CHAIN_DISABLE_AIA = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5423:1: CERT_CHAIN_DISABLE_ALL_EKU_WEAK_FLAG = 0x00010000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5098:1: CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5418:1: CERT_CHAIN_DISABLE_CODE_SIGNING_WEAK_FLAG = 0x00400000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5103:1: CERT_CHAIN_DISABLE_FILE_HASH_WEAK_FLAG = 0x00001000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5112:1: CERT_CHAIN_DISABLE_FILE_HASH_WEAK_FLAGS = 12288 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5117:1: CERT_CHAIN_DISABLE_MD2_MD4 = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5422:1: CERT_CHAIN_DISABLE_MOTW_CODE_SIGNING_WEAK_FLAG = 0x00800000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5104:1: CERT_CHAIN_DISABLE_MOTW_FILE_HASH_WEAK_FLAG = 0x00002000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5113:1: CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_HASH_WEAK_FLAG = 0x00008000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5115:1: CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_WEAK_FLAG = 0x08000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5108:1: CERT_CHAIN_DISABLE_MY_PEER_TRUST = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5421:1: CERT_CHAIN_DISABLE_OPT_IN_SERVER_AUTH_WEAK_FLAG = 0x00040000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5100:1: CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5416:1: CERT_CHAIN_DISABLE_SERVER_AUTH_WEAK_FLAG = 0x00100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5101:1: CERT_CHAIN_DISABLE_TIMESTAMP_HASH_WEAK_FLAG = 0x00004000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5114:1: CERT_CHAIN_DISABLE_TIMESTAMP_HASH_WEAK_FLAGS = 49152 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5118:1: CERT_CHAIN_DISABLE_TIMESTAMP_WEAK_FLAG = 0x04000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5107:1: CERT_CHAIN_DISABLE_WEAK_FLAGS = 215285760 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5116:1: CERT_CHAIN_ENABLE_ALL_EKU_HYGIENE_FLAG = 0x00020000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5099:1: CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5240:1: CERT_CHAIN_ENABLE_CODE_SIGNING_HYGIENE_FLAG = 0x01000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5105:1: CERT_CHAIN_ENABLE_HYGIENE_FLAGS = 857866240 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5119:1: CERT_CHAIN_ENABLE_MD2_MD4_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5071:1: CERT_CHAIN_ENABLE_MOTW_CODE_SIGNING_HYGIENE_FLAG = 0x02000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5106:1: CERT_CHAIN_ENABLE_MOTW_TIMESTAMP_HYGIENE_FLAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5110:1: CERT_CHAIN_ENABLE_ONLY_WEAK_LOGGING_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5074:1: CERT_CHAIN_ENABLE_PEER_TRUST = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5420:1: CERT_CHAIN_ENABLE_SERVER_AUTH_HYGIENE_FLAG = 0x00200000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5102:1: CERT_CHAIN_ENABLE_SHARE_STORE = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5241:1: CERT_CHAIN_ENABLE_TIMESTAMP_HYGIENE_FLAG = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5109:1: CERT_CHAIN_ENABLE_WEAK_LOGGING_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5073:1: CERT_CHAIN_ENABLE_WEAK_RSA_ROOT_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5072:1: CERT_CHAIN_ENABLE_WEAK_SETTINGS_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5097:1: CERT_CHAIN_FIND_BY_ISSUER = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5459:1: CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5483:1: CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5480:1: CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5478:1: CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5479:1: CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5481:1: CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5482:1: CERT_CHAIN_HAS_MOTW = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5424:1: CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5054:1: CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT = 100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5058:1: CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5060:1: CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5056:1: CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DEFAULT = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5067:1: CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DISABLE = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/wincrypt.h:5068:1: CERT_CHAIN_MAX_URL_RETRIEVAL_BYTE_COUNT_DEFAULT = 104857600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5048:1: CERT_CHAIN_MIN_PUB_KEY_BIT_LENGTH_DISABLE = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/wincrypt.h:5095:1: CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DEFAULT = 1023 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5076:1: CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DISABLE = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:5077:1: CERT_CHAIN_MOTW_IGNORE_AFTER_TIME_WEAK_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5111:1: CERT_CHAIN_MOTW_WEAK_FLAGS = 1786773504 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5120:1: CERT_CHAIN_OCSP_VALIDITY_SECONDS_DEFAULT = 43200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5062:1: CERT_CHAIN_ONLY_ADDITIONAL_AND_AUTH_ROOT = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5425:1: CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5225:1: CERT_CHAIN_OPTION_ENABLE_SIA_URL_RETRIEVAL = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5226:1: CERT_CHAIN_OPT_IN_WEAK_FLAGS = 262144 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5121:1: CERT_CHAIN_OPT_IN_WEAK_SIGNATURE = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5426:1: CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5521:1: CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5506:1: CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5504:1: CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS = 3840 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5516:1: CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5513:1: CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5500:1: CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5512:1: CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5511:1: CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5502:1: CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5508:1: CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5509:1: CERT_CHAIN_POLICY_IGNORE_NOT_SUPPORTED_CRITICAL_EXT_FLAG = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5519:1: CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5501:1: CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5499:1: CERT_CHAIN_POLICY_IGNORE_PEER_TRUST_FLAG = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5518:1: CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5514:1: CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5507:1: CERT_CHAIN_POLICY_SSL_F12_ERROR_LEVEL = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5598:1: CERT_CHAIN_POLICY_SSL_F12_NONE_CATEGORY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5600:1: CERT_CHAIN_POLICY_SSL_F12_ROOT_PROGRAM_CATEGORY = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5602:1: CERT_CHAIN_POLICY_SSL_F12_SUCCESS_LEVEL = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5596:1: CERT_CHAIN_POLICY_SSL_F12_WARNING_LEVEL = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5597:1: CERT_CHAIN_POLICY_SSL_F12_WEAK_CRYPTO_CATEGORY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5601:1: CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_ERROR = -2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5628:1: CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_WARNING = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5632:1: CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_ERROR = -1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5629:1: CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_WARNING = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5631:1: CERT_CHAIN_POLICY_SSL_KEY_PIN_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5630:1: CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5520:1: CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5417:1: CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT = 0x8000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5431:1: CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5430:1: CERT_CHAIN_REVOCATION_CHECK_CHAIN = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5428:1: CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5429:1: CERT_CHAIN_REVOCATION_CHECK_END_CERT = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5427:1: CERT_CHAIN_REVOCATION_CHECK_OCSP_CERT = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5432:1: CERT_CHAIN_REV_ACCUMULATIVE_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5215:1: CERT_CHAIN_STRONG_SIGN_DISABLE_END_CHECK_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5415:1: CERT_CHAIN_THREAD_STORE_SYNC = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5237:1: CERT_CHAIN_TIMESTAMP_TIME = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5419:1: CERT_CHAIN_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 15000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5213:1: CERT_CHAIN_USE_LOCAL_MACHINE_STORE = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5239:1: CERT_CHAIN_WEAK_RSA_PUB_KEY_TIME_DEFAULT = 0x01ca8a755c6e0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5079:1: CERT_CLOSE_STORE_CHECK_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4065:1: CERT_CLOSE_STORE_FORCE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4064:1: CERT_CLR_DELETE_KEY_PROP_ID = 125 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3641:1: CERT_COMPARE_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4075:1: CERT_COMPARE_ATTR = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4078:1: CERT_COMPARE_CERT_ID = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4093:1: CERT_COMPARE_CROSS_CERT_DIST_POINTS = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4094:1: CERT_COMPARE_CTL_USAGE = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4087:1: CERT_COMPARE_ENHKEY_USAGE = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4086:1: CERT_COMPARE_EXISTING = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4090:1: CERT_COMPARE_HASH = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4082:1: CERT_COMPARE_HASH_STR = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4097:1: CERT_COMPARE_HAS_PRIVATE_KEY = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4098:1: CERT_COMPARE_ISSUER_OF = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4089:1: CERT_COMPARE_KEY_IDENTIFIER = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4092:1: CERT_COMPARE_KEY_SPEC = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4085:1: CERT_COMPARE_MASK = 0xffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:4073:1: CERT_COMPARE_MD5_HASH = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4079:1: CERT_COMPARE_NAME = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4077:1: CERT_COMPARE_NAME_STR_A = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4083:1: CERT_COMPARE_NAME_STR_W = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4084:1: CERT_COMPARE_PROPERTY = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4080:1: CERT_COMPARE_PUBKEY_MD5_HASH = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4095:1: CERT_COMPARE_PUBLIC_KEY = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4081:1: CERT_COMPARE_SHA1_HASH = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4076:1: CERT_COMPARE_SHIFT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4074:1: CERT_COMPARE_SIGNATURE_HASH = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4091:1: CERT_COMPARE_SUBJECT_CERT = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4088:1: CERT_COMPARE_SUBJECT_INFO_ACCESS = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4096:1: CERT_CONTEXT_REVOCATION_TYPE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4440:1: CERT_CREATE_CONTEXT_NOCOPY_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4262:1: CERT_CREATE_CONTEXT_NO_ENTRY_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4265:1: CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4264:1: CERT_CREATE_CONTEXT_SORTED_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4263:1: CERT_CREATE_SELFSIGN_NO_KEY_INFO = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5032:1: CERT_CREATE_SELFSIGN_NO_SIGN = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5031:1: CERT_CRL_SIGN_KEY_USAGE = 0x02 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1910:1: CERT_CROSS_CERT_DIST_POINTS_PROP_ID = 23 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3565:1: CERT_CTL_USAGE_PROP_ID = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3551:1: CERT_DATA_ENCIPHERMENT_KEY_USAGE = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1914:1: CERT_DATE_STAMP_PROP_ID = 27 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3569:1: CERT_DECIPHER_ONLY_KEY_USAGE = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1919:1: CERT_DESCRIPTION_PROP_ID = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3555:1: CERT_DIGITAL_SIGNATURE_KEY_USAGE = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1917:1: CERT_DISALLOWED_CERT_CTL_FILENAME_A = "disallowedcert.stl" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3917:1: CERT_DISALLOWED_ENHKEY_USAGE_PROP_ID = 122 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3637:1: CERT_DISALLOWED_FILETIME_PROP_ID = 104 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3612:1: CERT_DSS_R_LEN = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2201:1: CERT_DSS_SIGNATURE_LEN = 40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2203:1: CERT_DSS_S_LEN = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2202:1: CERT_EFS_PROP_ID = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3559:1: CERT_ENCIPHER_ONLY_KEY_USAGE = 0x01 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1909:1: CERT_ENCODING_TYPE_MASK = 0x0000ffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1428:1: CERT_END_ENTITY_SUBJECT_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1992:1: CERT_ENHKEY_USAGE_PROP_ID = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3550:1: CERT_ENROLLMENT_PROP_ID = 26 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3568:1: CERT_EXCLUDED_SUBTREE_BIT = 2147483648 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2185:1: CERT_EXTENDED_ERROR_INFO_PROP_ID = 30 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3572:1: CERT_FILE_STORE_COMMIT_ENABLE_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3954:1: CERT_FIND_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4100:1: CERT_FIND_CERT_ID = 1048576 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4124:1: CERT_FIND_CROSS_CERT_DIST_POINTS = 1114112 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4125:1: CERT_FIND_CTL_USAGE = 655360 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4120:1: CERT_FIND_ENHKEY_USAGE = 655360 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4119:1: CERT_FIND_EXISTING = 851968 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4123:1: CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4139:1: CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4132:1: CERT_FIND_HASH = 65536 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4105:1: CERT_FIND_HASH_STR = 1310720 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4128:1: CERT_FIND_HAS_PRIVATE_KEY = 1376256 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4129:1: CERT_FIND_ISSUER_ATTR = 196612 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4111:1: CERT_FIND_ISSUER_NAME = 131076 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4110:1: CERT_FIND_ISSUER_OF = 786432 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4122:1: CERT_FIND_ISSUER_STR = 524292 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4117:1: CERT_FIND_ISSUER_STR_A = 458756 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4115:1: CERT_FIND_ISSUER_STR_W = 524292 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4116:1: CERT_FIND_KEY_IDENTIFIER = 983040 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4104:1: CERT_FIND_KEY_SPEC = 589824 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4118:1: CERT_FIND_MD5_HASH = 262144 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4102:1: CERT_FIND_NO_CTL_USAGE_FLAG = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4141:1: CERT_FIND_NO_ENHKEY_USAGE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4134:1: CERT_FIND_OPTIONAL_CTL_USAGE_FLAG = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4138:1: CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4131:1: CERT_FIND_OR_CTL_USAGE_FLAG = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4142:1: CERT_FIND_OR_ENHKEY_USAGE_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4135:1: CERT_FIND_PROPERTY = 327680 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4106:1: CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4140:1: CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4133:1: CERT_FIND_PUBKEY_MD5_HASH = 1179648 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4126:1: CERT_FIND_PUBLIC_KEY = 393216 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4107:1: CERT_FIND_SHA1_HASH = 65536 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4101:1: CERT_FIND_SIGNATURE_HASH = 917504 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4103:1: CERT_FIND_SUBJECT_ATTR = 196615 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4109:1: CERT_FIND_SUBJECT_CERT = 720896 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4121:1: CERT_FIND_SUBJECT_INFO_ACCESS = 1245184 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4127:1: CERT_FIND_SUBJECT_NAME = 131079 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4108:1: CERT_FIND_SUBJECT_STR = 524295 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4114:1: CERT_FIND_SUBJECT_STR_A = 458759 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4112:1: CERT_FIND_SUBJECT_STR_W = 524295 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4113:1: CERT_FIND_VALID_CTL_USAGE_FLAG = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4143:1: CERT_FIND_VALID_ENHKEY_USAGE_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4136:1: CERT_FIRST_RESERVED_PROP_ID = 107 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3645:1: CERT_FIRST_USER_PROP_ID = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3647:1: CERT_FORTEZZA_DATA_PROP_ID = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3560:1: CERT_FRIENDLY_NAME_PROP_ID = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3553:1: CERT_HASH_PROP_ID = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3545:1: CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID = 79 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3588:1: CERT_HCRYPTPROV_TRANSFER_PROP_ID = 100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3608:1: CERT_ID_ISSUER_SERIAL_NUMBER = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2929:1: CERT_ID_KEY_IDENTIFIER = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2930:1: CERT_ID_SHA1_HASH = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2931:1: CERT_IE30_RESERVED_PROP_ID = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3548:1: CERT_INFO_EXTENSION_FLAG = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1317:1: CERT_INFO_ISSUER_FLAG = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1310:1: CERT_INFO_ISSUER_UNIQUE_ID_FLAG = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1315:1: CERT_INFO_NOT_AFTER_FLAG = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1312:1: CERT_INFO_NOT_BEFORE_FLAG = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1311:1: CERT_INFO_SERIAL_NUMBER_FLAG = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1308:1: CERT_INFO_SIGNATURE_ALGORITHM_FLAG = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1309:1: CERT_INFO_SUBJECT_FLAG = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1313:1: CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1314:1: CERT_INFO_SUBJECT_UNIQUE_ID_FLAG = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1316:1: CERT_INFO_VERSION_FLAG = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1307:1: CERT_ISOLATED_KEY_PROP_ID = 118 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3630:1: CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID = 96 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3604:1: CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID = 95 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3603:1: CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3566:1: CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID = 94 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3602:1: CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID = 28 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3570:1: CERT_KEYGEN_REQUEST_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1371:1: CERT_KEY_AGREEMENT_KEY_USAGE = 0x08 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1913:1: CERT_KEY_CERT_SIGN_KEY_USAGE = 0x04 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1912:1: CERT_KEY_CLASSIFICATION_PROP_ID = 120 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3633:1: CERT_KEY_CONTEXT_PROP_ID = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3546:1: CERT_KEY_ENCIPHERMENT_KEY_USAGE = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1915:1: CERT_KEY_IDENTIFIER_PROP_ID = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3562:1: CERT_KEY_PROV_HANDLE_PROP_ID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3541:1: CERT_KEY_PROV_INFO_PROP_ID = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3542:1: CERT_KEY_REPAIR_ATTEMPTED_PROP_ID = 103 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3611:1: CERT_KEY_SPEC_PROP_ID = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3547:1: CERT_LAST_RESERVED_PROP_ID = 0x00007fff // /usr/x86_64-w64-mingw32/include/wincrypt.h:3646:1: CERT_LAST_USER_PROP_ID = 0x0000ffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:3648:1: CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3956:1: CERT_LDAP_STORE_OPENED_FLAG = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3957:1: CERT_LDAP_STORE_SIGN_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3955:1: CERT_LDAP_STORE_UNBIND_FLAG = 0x80000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3964:1: CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2522:1: CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2519:1: CERT_LOGOTYPE_DIRECT_INFO_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2558:1: CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2518:1: CERT_LOGOTYPE_INDIRECT_INFO_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2559:1: CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2521:1: CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2523:1: CERT_MAX_ASN_ENCODED_DSS_SIGNATURE_LEN = 48 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2205:1: CERT_MD5_HASH_PROP_ID = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3544:1: CERT_NAME_ATTR_TYPE = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4615:1: CERT_NAME_DISABLE_IE4_UTF8_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4623:1: CERT_NAME_DNS_TYPE = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4618:1: CERT_NAME_EMAIL_TYPE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4613:1: CERT_NAME_FRIENDLY_DISPLAY_TYPE = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4617:1: CERT_NAME_ISSUER_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4622:1: CERT_NAME_RDN_TYPE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4614:1: CERT_NAME_SEARCH_ALL_NAMES_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4625:1: CERT_NAME_SIMPLE_DISPLAY_TYPE = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4616:1: CERT_NAME_STR_COMMA_FLAG = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4597:1: CERT_NAME_STR_CRLF_FLAG = 0x8000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4598:1: CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4591:1: CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG = 0x100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4602:1: CERT_NAME_STR_ENABLE_PUNYCODE_FLAG = 0x200000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4603:1: CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4592:1: CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4593:1: CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG = 0x80000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4594:1: CERT_NAME_STR_FORWARD_FLAG = 0x1000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4595:1: CERT_NAME_STR_NO_PLUS_FLAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4600:1: CERT_NAME_STR_NO_QUOTING_FLAG = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4599:1: CERT_NAME_STR_REVERSE_FLAG = 0x2000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4596:1: CERT_NAME_STR_SEMICOLON_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4601:1: CERT_NAME_UPN_TYPE = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4620:1: CERT_NAME_URL_TYPE = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4619:1: CERT_NCRYPT_KEY_HANDLE_PROP_ID = 78 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3587:1: CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID = 99 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3607:1: CERT_NCRYPT_KEY_SPEC = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:3719:1: CERT_NEW_KEY_PROP_ID = 74 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3583:1: CERT_NEXT_UPDATE_LOCATION_PROP_ID = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3552:1: CERT_NONCOMPLIANT_ROOT_URL_PROP_ID = 123 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3638:1: CERT_NON_REPUDIATION_KEY_USAGE = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1916:1: CERT_NOT_BEFORE_ENHKEY_USAGE_PROP_ID = 127 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3643:1: CERT_NOT_BEFORE_FILETIME_PROP_ID = 126 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3642:1: CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID = 77 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3586:1: CERT_NO_EXPIRE_NOTIFICATION_PROP_ID = 97 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3605:1: CERT_OCSP_CACHE_PREFIX_PROP_ID = 75 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3584:1: CERT_OCSP_MUST_STAPLE_PROP_ID = 121 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3635:1: CERT_OCSP_RESPONSE_PROP_ID = 70 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3579:1: CERT_OFFLINE_CRL_SIGN_KEY_USAGE = 0x02 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1911:1: CERT_OID_NAME_STR = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4587:1: CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4267:1: CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4270:1: CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4268:1: CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4332:1: CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4269:1: CERT_PIN_RULES_CTL_FILENAME_A = "pinrules.stl" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3926:1: CERT_PIN_SHA256_HASH_PROP_ID = 124 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3640:1: CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3859:1: CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3862:1: CERT_PROT_ROOT_DISABLE_NOT_DEFINED_NAME_CONSTRAINT_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3865:1: CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3864:1: CERT_PROT_ROOT_DISABLE_PEER_TRUST = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3866:1: CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3860:1: CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3861:1: CERT_PROT_ROOT_ONLY_LM_GPT_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3863:1: CERT_PROT_ROOT_PEER_USAGES_VALUE_NAME_A = "PeerUsages" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3868:1: CERT_PUBKEY_ALG_PARA_PROP_ID = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3564:1: CERT_PUBKEY_HASH_RESERVED_PROP_ID = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3549:1: CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID = 93 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3601:1: CERT_PVK_FILE_PROP_ID = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3554:1: CERT_QUERY_CONTENT_CERT = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4750:1: CERT_QUERY_CONTENT_CERT_PAIR = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4762:1: CERT_QUERY_CONTENT_CRL = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4752:1: CERT_QUERY_CONTENT_CTL = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4751:1: CERT_QUERY_CONTENT_FLAG_ALL = 16382 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4780:1: CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT = 818 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4781:1: CERT_QUERY_CONTENT_FLAG_CERT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4765:1: CERT_QUERY_CONTENT_FLAG_CERT_PAIR = 8192 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4777:1: CERT_QUERY_CONTENT_FLAG_CRL = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4767:1: CERT_QUERY_CONTENT_FLAG_CTL = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4766:1: CERT_QUERY_CONTENT_FLAG_PFX = 4096 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4776:1: CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD = 16384 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4778:1: CERT_QUERY_CONTENT_FLAG_PKCS10 = 2048 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4775:1: CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED = 256 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4772:1: CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED = 1024 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4774:1: CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED = 512 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4773:1: CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4769:1: CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL = 128 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4771:1: CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL = 64 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4770:1: CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4768:1: CERT_QUERY_CONTENT_PFX = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4761:1: CERT_QUERY_CONTENT_PFX_AND_LOAD = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4763:1: CERT_QUERY_CONTENT_PKCS10 = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4760:1: CERT_QUERY_CONTENT_PKCS7_SIGNED = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4757:1: CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4759:1: CERT_QUERY_CONTENT_PKCS7_UNSIGNED = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4758:1: CERT_QUERY_CONTENT_SERIALIZED_CERT = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4754:1: CERT_QUERY_CONTENT_SERIALIZED_CRL = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4756:1: CERT_QUERY_CONTENT_SERIALIZED_CTL = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4755:1: CERT_QUERY_CONTENT_SERIALIZED_STORE = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4753:1: CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4785:1: CERT_QUERY_FORMAT_BASE64_ENCODED = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4784:1: CERT_QUERY_FORMAT_BINARY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4783:1: CERT_QUERY_FORMAT_FLAG_ALL = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4791:1: CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4789:1: CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4788:1: CERT_QUERY_FORMAT_FLAG_BINARY = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4787:1: CERT_QUERY_OBJECT_BLOB = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4748:1: CERT_QUERY_OBJECT_FILE = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4747:1: CERT_RDN_ANY_TYPE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1186:1: CERT_RDN_BMP_STRING = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1201:1: CERT_RDN_DISABLE_CHECK_TYPE_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1211:1: CERT_RDN_DISABLE_IE4_UTF8_FLAG = 0x1000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1212:1: CERT_RDN_ENABLE_PUNYCODE_FLAG = 0x2000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1213:1: CERT_RDN_ENABLE_T61_UNICODE_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1208:1: CERT_RDN_ENABLE_UTF8_UNICODE_FLAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1209:1: CERT_RDN_ENCODED_BLOB = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1187:1: CERT_RDN_FLAGS_MASK = 0xff000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1206:1: CERT_RDN_FORCE_UTF8_UNICODE_FLAG = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1210:1: CERT_RDN_GENERAL_STRING = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1198:1: CERT_RDN_GRAPHIC_STRING = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1195:1: CERT_RDN_IA5_STRING = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1194:1: CERT_RDN_INT4_STRING = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1200:1: CERT_RDN_ISO646_STRING = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1197:1: CERT_RDN_NUMERIC_STRING = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1189:1: CERT_RDN_OCTET_STRING = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1188:1: CERT_RDN_PRINTABLE_STRING = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1190:1: CERT_RDN_T61_STRING = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1192:1: CERT_RDN_TELETEX_STRING = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1191:1: CERT_RDN_TYPE_MASK = 0x000000ff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1205:1: CERT_RDN_UNICODE_STRING = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1202:1: CERT_RDN_UNIVERSAL_STRING = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1199:1: CERT_RDN_UTF8_STRING = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1203:1: CERT_RDN_VIDEOTEX_STRING = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1193:1: CERT_RDN_VISIBLE_STRING = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1196:1: CERT_REGISTRY_STORE_CLIENT_GPT_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3934:1: CERT_REGISTRY_STORE_EXTERNAL_FLAG = 0x100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3950:1: CERT_REGISTRY_STORE_LM_GPT_FLAG = 0x1000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3935:1: CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG = 0x80000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3949:1: CERT_REGISTRY_STORE_REMOTE_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3932:1: CERT_REGISTRY_STORE_ROAMING_FLAG = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3942:1: CERT_REGISTRY_STORE_SERIALIZED_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3933:1: CERT_RENEWAL_PROP_ID = 64 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3573:1: CERT_REQUEST_ORIGINATOR_PROP_ID = 71 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3580:1: CERT_REQUEST_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1363:1: CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID = 83 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3592:1: CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID = 105 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3613:1: CERT_ROOT_PROGRAM_FLAG_ADDRESS = 0x08 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1824:1: CERT_ROOT_PROGRAM_FLAG_LSC = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1821:1: CERT_ROOT_PROGRAM_FLAG_ORG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1820:1: CERT_ROOT_PROGRAM_FLAG_OU = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1823:1: CERT_ROOT_PROGRAM_FLAG_SUBJECT_LOGO = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1822:1: CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID = 84 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3593:1: CERT_SCARD_PIN_ID_PROP_ID = 90 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3598:1: CERT_SCARD_PIN_INFO_PROP_ID = 91 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3599:1: CERT_SCEP_CA_CERT_PROP_ID = 111 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3621:1: CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID = 114 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3625:1: CERT_SCEP_FLAGS_PROP_ID = 115 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3626:1: CERT_SCEP_GUID_PROP_ID = 116 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3627:1: CERT_SCEP_NONCE_PROP_ID = 113 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3623:1: CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID = 110 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3620:1: CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID = 109 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3619:1: CERT_SCEP_SERVER_CERTS_PROP_ID = 108 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3618:1: CERT_SCEP_SIGNER_CERT_PROP_ID = 112 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3622:1: CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID = 102 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3610:1: CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID = 117 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3628:1: CERT_SERIAL_CHAIN_PROP_ID = 119 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3632:1: CERT_SET_KEY_CONTEXT_PROP_ID = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3717:1: CERT_SET_KEY_PROV_HANDLE_PROP_ID = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3716:1: CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4163:1: CERT_SET_PROPERTY_INHIBIT_PERSIST_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4162:1: CERT_SHA1_HASH_PROP_ID = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3543:1: CERT_SHA256_HASH_PROP_ID = 107 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3616:1: CERT_SIGNATURE_HASH_PROP_ID = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3557:1: CERT_SIGN_HASH_CNG_ALG_PROP_ID = 89 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3597:1: CERT_SIMPLE_NAME_STR = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4586:1: CERT_SMART_CARD_DATA_PROP_ID = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3558:1: CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID = 106 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3614:1: CERT_SMART_CARD_READER_PROP_ID = 101 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3609:1: CERT_SMART_CARD_ROOT_INFO_PROP_ID = 76 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3585:1: CERT_SOURCE_LOCATION_PROP_ID = 72 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3581:1: CERT_SOURCE_URL_PROP_ID = 73 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3582:1: CERT_SRV_OCSP_RESP_MAX_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 14400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5152:1: CERT_SRV_OCSP_RESP_MAX_SYNC_CERT_FILE_SECONDS_DEFAULT = 3600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5160:1: CERT_SRV_OCSP_RESP_MIN_AFTER_NEXT_UPDATE_SECONDS_DEFAULT = 60 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5156:1: CERT_SRV_OCSP_RESP_MIN_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 120 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5154:1: CERT_SRV_OCSP_RESP_MIN_SYNC_CERT_FILE_SECONDS_DEFAULT = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5158:1: CERT_SRV_OCSP_RESP_MIN_VALIDITY_SECONDS_DEFAULT = 600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5148:1: CERT_SRV_OCSP_RESP_URL_RETRIEVAL_TIMEOUT_MILLISECONDS_DEFAULT = 15000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5150:1: CERT_STORE_ADD_ALWAYS = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4181:1: CERT_STORE_ADD_NEW = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4178:1: CERT_STORE_ADD_NEWER = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4183:1: CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4184:1: CERT_STORE_ADD_REPLACE_EXISTING = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4180:1: CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4182:1: CERT_STORE_ADD_USE_EXISTING = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4179:1: CERT_STORE_ALL_CONTEXT_FLAG = 18446744073709551615 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4190:1: CERT_STORE_BACKUP_RESTORE_FLAG = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3804:1: CERT_STORE_BASE_CRL_FLAG = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3791:1: CERT_STORE_CERTIFICATE_CONTEXT = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4186:1: CERT_STORE_CERTIFICATE_CONTEXT_FLAG = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4191:1: CERT_STORE_CREATE_NEW_FLAG = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3807:1: CERT_STORE_CRL_CONTEXT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4187:1: CERT_STORE_CRL_CONTEXT_FLAG = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4192:1: CERT_STORE_CTL_CONTEXT = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4188:1: CERT_STORE_CTL_CONTEXT_FLAG = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4193:1: CERT_STORE_CTRL_AUTO_RESYNC = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4252:1: CERT_STORE_CTRL_CANCEL_NOTIFY = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4253:1: CERT_STORE_CTRL_COMMIT = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4251:1: CERT_STORE_CTRL_COMMIT_CLEAR_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4258:1: CERT_STORE_CTRL_COMMIT_FORCE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4257:1: CERT_STORE_CTRL_INHIBIT_DUPLICATE_HANDLE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4255:1: CERT_STORE_CTRL_NOTIFY_CHANGE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4250:1: CERT_STORE_CTRL_RESYNC = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4249:1: CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3796:1: CERT_STORE_DELETE_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3797:1: CERT_STORE_DELTA_CRL_FLAG = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3792:1: CERT_STORE_ENUM_ARCHIVED_FLAG = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3802:1: CERT_STORE_LOCALIZED_NAME_PROP_ID = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4260:1: CERT_STORE_MANIFOLD_FLAG = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3801:1: CERT_STORE_MAXIMUM_ALLOWED_FLAG = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3808:1: CERT_STORE_NO_CRL_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3788:1: CERT_STORE_NO_CRYPT_RELEASE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3794:1: CERT_STORE_NO_ISSUER_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3789:1: CERT_STORE_OPEN_EXISTING_FLAG = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3806:1: CERT_STORE_PROV_CLOSE_FUNC = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3991:1: CERT_STORE_PROV_CONTROL_FUNC = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4004:1: CERT_STORE_PROV_DELETED_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3984:1: CERT_STORE_PROV_DELETE_CERT_FUNC = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3994:1: CERT_STORE_PROV_DELETE_CRL_FUNC = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3998:1: CERT_STORE_PROV_DELETE_CTL_FUNC = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4002:1: CERT_STORE_PROV_EXTERNAL_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3983:1: CERT_STORE_PROV_FIND_CERT_FUNC = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4005:1: CERT_STORE_PROV_FIND_CRL_FUNC = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4008:1: CERT_STORE_PROV_FIND_CTL_FUNC = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4011:1: CERT_STORE_PROV_FREE_FIND_CERT_FUNC = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4006:1: CERT_STORE_PROV_FREE_FIND_CRL_FUNC = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4009:1: CERT_STORE_PROV_FREE_FIND_CTL_FUNC = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4012:1: CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4007:1: CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4010:1: CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4013:1: CERT_STORE_PROV_GP_SYSTEM_STORE_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3988:1: CERT_STORE_PROV_LM_SYSTEM_STORE_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3987:1: CERT_STORE_PROV_NO_PERSIST_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3985:1: CERT_STORE_PROV_READ_CERT_FUNC = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3992:1: CERT_STORE_PROV_READ_CRL_FUNC = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3996:1: CERT_STORE_PROV_READ_CTL_FUNC = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4000:1: CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3995:1: CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3999:1: CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4003:1: CERT_STORE_PROV_SHARED_USER_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3989:1: CERT_STORE_PROV_SYSTEM_STORE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3986:1: CERT_STORE_PROV_WRITE_ADD_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4015:1: CERT_STORE_PROV_WRITE_CERT_FUNC = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3993:1: CERT_STORE_PROV_WRITE_CRL_FUNC = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3997:1: CERT_STORE_PROV_WRITE_CTL_FUNC = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4001:1: CERT_STORE_READONLY_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3805:1: CERT_STORE_REVOCATION_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3787:1: CERT_STORE_SAVE_AS_PKCS12 = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4056:1: CERT_STORE_SAVE_AS_PKCS7 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4055:1: CERT_STORE_SAVE_AS_STORE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4054:1: CERT_STORE_SAVE_TO_FILE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4058:1: CERT_STORE_SAVE_TO_FILENAME = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4062:1: CERT_STORE_SAVE_TO_FILENAME_A = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4060:1: CERT_STORE_SAVE_TO_FILENAME_W = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4061:1: CERT_STORE_SAVE_TO_MEMORY = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4059:1: CERT_STORE_SET_LOCALIZED_NAME_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3795:1: CERT_STORE_SHARE_CONTEXT_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3800:1: CERT_STORE_SHARE_STORE_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3799:1: CERT_STORE_SIGNATURE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3785:1: CERT_STORE_TIME_VALIDITY_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3786:1: CERT_STORE_UNSAFE_PHYSICAL_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3798:1: CERT_STORE_UPDATE_KEYID_FLAG = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3803:1: CERT_STRONG_SIGN_ENABLE_CRL_CHECK = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2870:1: CERT_STRONG_SIGN_ENABLE_OCSP_CHECK = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2871:1: CERT_STRONG_SIGN_OID_INFO_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2868:1: CERT_STRONG_SIGN_SERIALIZED_INFO_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2867:1: CERT_SUBJECT_DISABLE_CRL_PROP_ID = 86 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3595:1: CERT_SUBJECT_INFO_ACCESS_PROP_ID = 80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3589:1: CERT_SUBJECT_NAME_MD5_HASH_PROP_ID = 29 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3571:1: CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID = 85 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3594:1: CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID = 25 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3567:1: CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID = 92 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3600:1: CERT_SYSTEM_STORE_CURRENT_SERVICE = 262144 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3844:1: CERT_SYSTEM_STORE_CURRENT_SERVICE_ID = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3834:1: CERT_SYSTEM_STORE_CURRENT_USER = 65536 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3842:1: CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY = 458752 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3847:1: CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3837:1: CERT_SYSTEM_STORE_CURRENT_USER_ID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3832:1: CERT_SYSTEM_STORE_DEFER_READ_FLAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3826:1: CERT_SYSTEM_STORE_LOCAL_MACHINE = 131072 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3843:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE = 589824 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3849:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3839:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY = 524288 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3848:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3838:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_ID = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3833:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_WCOS = 655360 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3850:1: CERT_SYSTEM_STORE_LOCAL_MACHINE_WCOS_ID = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3840:1: CERT_SYSTEM_STORE_LOCATION_MASK = 0x00ff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3829:1: CERT_SYSTEM_STORE_LOCATION_SHIFT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3830:1: CERT_SYSTEM_STORE_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3810:1: CERT_SYSTEM_STORE_RELOCATE_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3812:1: CERT_SYSTEM_STORE_SERVICES = 327680 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3845:1: CERT_SYSTEM_STORE_SERVICES_ID = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3835:1: CERT_SYSTEM_STORE_UNPROTECTED_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3827:1: CERT_SYSTEM_STORE_USERS = 393216 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3846:1: CERT_SYSTEM_STORE_USERS_ID = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3836:1: CERT_TRUST_AUTO_UPDATE_CA_REVOCATION = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5309:1: CERT_TRUST_AUTO_UPDATE_END_REVOCATION = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5310:1: CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5297:1: CERT_TRUST_CTL_IS_NOT_TIME_VALID = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5296:1: CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 0x80000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5298:1: CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5321:1: CERT_TRUST_HAS_EXACT_MATCH_ISSUER = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5305:1: CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5294:1: CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5318:1: CERT_TRUST_HAS_KEY_MATCH_ISSUER = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5306:1: CERT_TRUST_HAS_NAME_MATCH_ISSUER = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5307:1: CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5292:1: CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5293:1: CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x8000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5302:1: CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5291:1: CERT_TRUST_HAS_PREFERRED_ISSUER = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5317:1: CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5319:1: CERT_TRUST_HAS_WEAK_SIGNATURE = 0x100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5303:1: CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5289:1: CERT_TRUST_INVALID_EXTENSION = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5287:1: CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5290:1: CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5288:1: CERT_TRUST_IS_COMPLEX_CHAIN = 0x00010000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5328:1: CERT_TRUST_IS_CYCLIC = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5286:1: CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5301:1: CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5322:1: CERT_TRUST_IS_KEY_ROLLOVER = 0x00000080 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5312:1: CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5282:1: CERT_TRUST_IS_NOT_TIME_NESTED = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5280:1: CERT_TRUST_IS_NOT_TIME_VALID = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5279:1: CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5283:1: CERT_TRUST_IS_OFFLINE_REVOCATION = 0x1000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5299:1: CERT_TRUST_IS_PARTIAL_CHAIN = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5295:1: CERT_TRUST_IS_PEER_TRUSTED = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5320:1: CERT_TRUST_IS_REVOKED = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5281:1: CERT_TRUST_IS_SELF_SIGNED = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5308:1: CERT_TRUST_IS_UNTRUSTED_ROOT = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5284:1: CERT_TRUST_NO_ERROR = 0x0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5278:1: CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x2000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5300:1: CERT_TRUST_NO_OCSP_FAILOVER_TO_CRL = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5311:1: CERT_TRUST_NO_TIME_CHECK = 0x02000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5330:1: CERT_TRUST_PUB_ALLOW_END_USER_TRUST = 0x0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3877:1: CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3879:1: CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3878:1: CERT_TRUST_PUB_ALLOW_TRUST_MASK = 0x3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3876:1: CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3880:1: CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3881:1: CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5285:1: CERT_TRUST_SSL_HANDSHAKE_OCSP = 0x00040000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5313:1: CERT_TRUST_SSL_RECONNECT_OCSP = 0x00100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5315:1: CERT_TRUST_SSL_TIME_VALID = 0x01000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5329:1: CERT_TRUST_SSL_TIME_VALID_OCSP = 0x00080000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5314:1: CERT_UNICODE_ATTR_ERR_INDEX_MASK = 0x3f // /usr/x86_64-w64-mingw32/include/wincrypt.h:1883:1: CERT_UNICODE_ATTR_ERR_INDEX_SHIFT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1884:1: CERT_UNICODE_IS_RDN_ATTRS_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4448:1: CERT_UNICODE_RDN_ERR_INDEX_MASK = 0x3ff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1881:1: CERT_UNICODE_RDN_ERR_INDEX_SHIFT = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1882:1: CERT_UNICODE_VALUE_ERR_INDEX_MASK = 0xffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:1885:1: CERT_UNICODE_VALUE_ERR_INDEX_SHIFT = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1886:1: CERT_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1303:1: CERT_V2 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1304:1: CERT_V3 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1305:1: CERT_VERIFY_ALLOW_MORE_USAGE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4397:1: CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4443:1: CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4394:1: CERT_VERIFY_NO_TIME_CHECK_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4396:1: CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4444:1: CERT_VERIFY_REV_CHAIN_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4442:1: CERT_VERIFY_REV_NO_OCSP_FAILOVER_TO_CRL_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4446:1: CERT_VERIFY_REV_SERVER_OCSP_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4445:1: CERT_VERIFY_TRUSTED_SIGNERS_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4395:1: CERT_VERIFY_UPDATED_CTL_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4399:1: CERT_X500_NAME_STR = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4588:1: CERT_XML_NAME_STR = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4589:1: CE_BREAK = 0x10 // /usr/x86_64-w64-mingw32/include/winbase.h:502:1: CE_DNS = 0x800 // /usr/x86_64-w64-mingw32/include/winbase.h:506:1: CE_FRAME = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:501:1: CE_IOE = 0x400 // /usr/x86_64-w64-mingw32/include/winbase.h:505:1: CE_MODE = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:508:1: CE_OOP = 0x1000 // /usr/x86_64-w64-mingw32/include/winbase.h:507:1: CE_OVERRUN = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:499:1: CE_PTO = 0x200 // /usr/x86_64-w64-mingw32/include/winbase.h:504:1: CE_RXOVER = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:498:1: CE_RXPARITY = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:500:1: CE_TXFULL = 0x100 // /usr/x86_64-w64-mingw32/include/winbase.h:503:1: CFERR_CHOOSEFONTCODES = 0x2000 // /usr/x86_64-w64-mingw32/include/cderr.h:39:1: CFERR_MAXLESSTHANMIN = 0x2002 // /usr/x86_64-w64-mingw32/include/cderr.h:41:1: CFERR_NOFONTS = 0x2001 // /usr/x86_64-w64-mingw32/include/cderr.h:40:1: CFG_CALL_TARGET_CONVERT_EXPORT_SUPPRESSED_TO_VALID = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:4832:1: CFG_CALL_TARGET_PROCESSED = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:4831:1: CFG_CALL_TARGET_VALID = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:4830:1: CFSEPCHAR = 43 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1641:1: CFS_CANDIDATEPOS = 0x0040 // /usr/x86_64-w64-mingw32/include/imm.h:384:1: CFS_DEFAULT = 0x0000 // /usr/x86_64-w64-mingw32/include/imm.h:380:1: CFS_EXCLUDE = 0x0080 // /usr/x86_64-w64-mingw32/include/imm.h:385:1: CFS_FORCE_POSITION = 0x0020 // /usr/x86_64-w64-mingw32/include/imm.h:383:1: CFS_POINT = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:382:1: CFS_RECT = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:381:1: CF_ANSIONLY = 1024 // /usr/x86_64-w64-mingw32/include/commdlg.h:446:1: CF_APPLY = 512 // /usr/x86_64-w64-mingw32/include/commdlg.h:445:1: CF_BITMAP = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1773:1: CF_BOTH = 3 // /usr/x86_64-w64-mingw32/include/commdlg.h:437:1: CF_DIB = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1779:1: CF_DIBV5 = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:1788:1: CF_DIF = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1776:1: CF_DSPBITMAP = 0x0082 // /usr/x86_64-w64-mingw32/include/winuser.h:1799:1: CF_DSPENHMETAFILE = 0x008E // /usr/x86_64-w64-mingw32/include/winuser.h:1801:1: CF_DSPMETAFILEPICT = 0x0083 // /usr/x86_64-w64-mingw32/include/winuser.h:1800:1: CF_DSPTEXT = 0x0081 // /usr/x86_64-w64-mingw32/include/winuser.h:1798:1: CF_EFFECTS = 256 // /usr/x86_64-w64-mingw32/include/commdlg.h:444:1: CF_ENABLEHOOK = 8 // /usr/x86_64-w64-mingw32/include/commdlg.h:439:1: CF_ENABLETEMPLATE = 16 // /usr/x86_64-w64-mingw32/include/commdlg.h:440:1: CF_ENABLETEMPLATEHANDLE = 32 // /usr/x86_64-w64-mingw32/include/commdlg.h:441:1: CF_ENHMETAFILE = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:1785:1: CF_FIXEDPITCHONLY = 16384 // /usr/x86_64-w64-mingw32/include/commdlg.h:452:1: CF_FORCEFONTEXIST = 65536 // /usr/x86_64-w64-mingw32/include/commdlg.h:454:1: CF_GDIOBJFIRST = 0x0300 // /usr/x86_64-w64-mingw32/include/winuser.h:1806:1: CF_GDIOBJLAST = 0x03FF // /usr/x86_64-w64-mingw32/include/winuser.h:1807:1: CF_HDROP = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:1786:1: CF_INITTOLOGFONTSTRUCT = 64 // /usr/x86_64-w64-mingw32/include/commdlg.h:442:1: CF_LIMITSIZE = 8192 // /usr/x86_64-w64-mingw32/include/commdlg.h:451:1: CF_LOCALE = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:1787:1: CF_MAX = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:1790:1: CF_METAFILEPICT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1774:1: CF_NOFACESEL = 524288 // /usr/x86_64-w64-mingw32/include/commdlg.h:457:1: CF_NOOEMFONTS = 2048 // /usr/x86_64-w64-mingw32/include/commdlg.h:449:1: CF_NOSCRIPTSEL = 8388608 // /usr/x86_64-w64-mingw32/include/commdlg.h:461:1: CF_NOSIMULATIONS = 4096 // /usr/x86_64-w64-mingw32/include/commdlg.h:450:1: CF_NOSIZESEL = 2097152 // /usr/x86_64-w64-mingw32/include/commdlg.h:459:1: CF_NOSTYLESEL = 1048576 // /usr/x86_64-w64-mingw32/include/commdlg.h:458:1: CF_NOVECTORFONTS = 2048 // /usr/x86_64-w64-mingw32/include/commdlg.h:448:1: CF_NOVERTFONTS = 16777216 // /usr/x86_64-w64-mingw32/include/commdlg.h:462:1: CF_NULL = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:693:1: CF_OEMTEXT = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:1778:1: CF_OWNERDISPLAY = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:1797:1: CF_PALETTE = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:1780:1: CF_PENDATA = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:1781:1: CF_PRINTERFONTS = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:436:1: CF_PRIVATEFIRST = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1803:1: CF_PRIVATELAST = 0x02FF // /usr/x86_64-w64-mingw32/include/winuser.h:1804:1: CF_RIFF = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:1782:1: CF_SCALABLEONLY = 131072 // /usr/x86_64-w64-mingw32/include/commdlg.h:455:1: CF_SCREENFONTS = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:435:1: CF_SCRIPTSONLY = 1024 // /usr/x86_64-w64-mingw32/include/commdlg.h:447:1: CF_SELECTSCRIPT = 4194304 // /usr/x86_64-w64-mingw32/include/commdlg.h:460:1: CF_SHOWHELP = 4 // /usr/x86_64-w64-mingw32/include/commdlg.h:438:1: CF_SYLK = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1775:1: CF_TEXT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1772:1: CF_TIFF = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:1777:1: CF_TTONLY = 262144 // /usr/x86_64-w64-mingw32/include/commdlg.h:456:1: CF_UNICODETEXT = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:1784:1: CF_USESTYLE = 128 // /usr/x86_64-w64-mingw32/include/commdlg.h:443:1: CF_WAVE = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:1783:1: CF_WYSIWYG = 32768 // /usr/x86_64-w64-mingw32/include/commdlg.h:453:1: CHANGER_BAR_CODE_SCANNER_INSTALLED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1008:1: CHANGER_CARTRIDGE_MAGAZINE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winioctl.h:1018:1: CHANGER_CLEANER_ACCESS_NOT_VALID = 0x00040000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1032:1: CHANGER_CLEANER_AUTODISMOUNT = 0x80000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1051:1: CHANGER_CLEANER_OPS_NOT_SUPPORTED = 0x80000040 // /usr/x86_64-w64-mingw32/include/winioctl.h:1055:1: CHANGER_CLEANER_SLOT = 0x00000040 // /usr/x86_64-w64-mingw32/include/winioctl.h:1015:1: CHANGER_CLOSE_IEPORT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1010:1: CHANGER_DEVICE_REINITIALIZE_CAPABLE = 0x08000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1043:1: CHANGER_DRIVE_CLEANING_REQUIRED = 0x00010000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1028:1: CHANGER_DRIVE_EMPTY_ON_DOOR_ACCESS = 0x20000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1045:1: CHANGER_EXCHANGE_MEDIA = 0x00000020 // /usr/x86_64-w64-mingw32/include/winioctl.h:1014:1: CHANGER_IEPORT_USER_CONTROL_CLOSE = 0x80000100 // /usr/x86_64-w64-mingw32/include/winioctl.h:1057:1: CHANGER_IEPORT_USER_CONTROL_OPEN = 0x80000080 // /usr/x86_64-w64-mingw32/include/winioctl.h:1056:1: CHANGER_INIT_ELEM_STAT_WITH_RANGE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1009:1: CHANGER_KEYPAD_ENABLE_DISABLE = 0x10000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1044:1: CHANGER_LOCK_UNLOCK = 0x00000080 // /usr/x86_64-w64-mingw32/include/winioctl.h:1016:1: CHANGER_MEDIUM_FLIP = 0x00000200 // /usr/x86_64-w64-mingw32/include/winioctl.h:1019:1: CHANGER_MOVE_EXTENDS_IEPORT = 0x80000200 // /usr/x86_64-w64-mingw32/include/winioctl.h:1058:1: CHANGER_MOVE_RETRACTS_IEPORT = 0x80000400 // /usr/x86_64-w64-mingw32/include/winioctl.h:1059:1: CHANGER_OPEN_IEPORT = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:1011:1: CHANGER_POSITION_TO_ELEMENT = 0x00000400 // /usr/x86_64-w64-mingw32/include/winioctl.h:1020:1: CHANGER_PREDISMOUNT_ALIGN_TO_DRIVE = 0x80000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1050:1: CHANGER_PREDISMOUNT_ALIGN_TO_SLOT = 0x80000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1049:1: CHANGER_PREDISMOUNT_EJECT_REQUIRED = 0x00020000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1030:1: CHANGER_PREMOUNT_EJECT_REQUIRED = 0x00080000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1033:1: CHANGER_REPORT_IEPORT_STATE = 0x00000800 // /usr/x86_64-w64-mingw32/include/winioctl.h:1021:1: CHANGER_RESERVED_BIT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1047:1: CHANGER_RTN_MEDIA_TO_ORIGINAL_ADDR = 0x80000020 // /usr/x86_64-w64-mingw32/include/winioctl.h:1054:1: CHANGER_SERIAL_NUMBER_VALID = 0x04000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1041:1: CHANGER_SLOTS_USE_TRAYS = 0x80000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:1053:1: CHANGER_STATUS_NON_VOLATILE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:1013:1: CHANGER_STORAGE_DRIVE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1023:1: CHANGER_STORAGE_IEPORT = 0x00002000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1024:1: CHANGER_STORAGE_SLOT = 0x00004000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1025:1: CHANGER_STORAGE_TRANSPORT = 0x00008000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1026:1: CHANGER_TO_DRIVE = 0x08 // /usr/x86_64-w64-mingw32/include/winioctl.h:1064:1: CHANGER_TO_IEPORT = 0x04 // /usr/x86_64-w64-mingw32/include/winioctl.h:1063:1: CHANGER_TO_SLOT = 0x02 // /usr/x86_64-w64-mingw32/include/winioctl.h:1062:1: CHANGER_TO_TRANSPORT = 0x01 // /usr/x86_64-w64-mingw32/include/winioctl.h:1061:1: CHANGER_TRUE_EXCHANGE_CAPABLE = 0x80000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:1052:1: CHANGER_VOLUME_ASSERT = 0x00400000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1037:1: CHANGER_VOLUME_IDENTIFICATION = 0x00100000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1035:1: CHANGER_VOLUME_REPLACE = 0x00800000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1038:1: CHANGER_VOLUME_SEARCH = 0x00200000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1036:1: CHANGER_VOLUME_UNDEFINE = 0x01000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1039:1: CHAR_BIT = 8 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:64:1: CHAR_MAX = 127 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:99:1: CHAR_MIN = -128 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:97:1: CHECKJPEGFORMAT = 4119 // /usr/x86_64-w64-mingw32/include/wingdi.h:317:1: CHECKPNGFORMAT = 4120 // /usr/x86_64-w64-mingw32/include/wingdi.h:318:1: CHILDID_SELF = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5901:1: CHINESEBIG5_CHARSET = 136 // /usr/x86_64-w64-mingw32/include/wingdi.h:1163:1: CKCNSTRNT_COLUMN = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:126394:1: CKCNSTRNT_ROWID = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:126395:1: CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3973:1: CLAIM_SECURITY_ATTRIBUTES_INFORMATION_VERSION_V1 = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3971:1: CLAIM_SECURITY_ATTRIBUTE_CUSTOM_FLAGS = 0xffff0000 // /usr/x86_64-w64-mingw32/include/winnt.h:3939:1: CLAIM_SECURITY_ATTRIBUTE_DISABLED = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:3935:1: CLAIM_SECURITY_ATTRIBUTE_DISABLED_BY_DEFAULT = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:3934:1: CLAIM_SECURITY_ATTRIBUTE_MANDATORY = 0x0020 // /usr/x86_64-w64-mingw32/include/winnt.h:3936:1: CLAIM_SECURITY_ATTRIBUTE_NON_INHERITABLE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:3931:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_BOOLEAN = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:3918:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_FQBN = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:3916:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_INT64 = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:3913:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_INVALID = 0x00 // /usr/x86_64-w64-mingw32/include/winnt.h:3912:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_OCTET_STRING = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:3930:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_SID = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:3917:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_STRING = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:3915:1: CLAIM_SECURITY_ATTRIBUTE_TYPE_UINT64 = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:3914:1: CLAIM_SECURITY_ATTRIBUTE_USE_FOR_DENY_ONLY = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:3933:1: CLAIM_SECURITY_ATTRIBUTE_VALID_FLAGS = 63 // /usr/x86_64-w64-mingw32/include/winnt.h:3938:1: CLAIM_SECURITY_ATTRIBUTE_VALUE_CASE_SENSITIVE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:3932:1: CLASSFACTORY_E_FIRST = 2147746064 // /usr/x86_64-w64-mingw32/include/winerror.h:2354:1: CLASSFACTORY_E_LAST = 2147746079 // /usr/x86_64-w64-mingw32/include/winerror.h:2355:1: CLASSFACTORY_S_FIRST = 262416 // /usr/x86_64-w64-mingw32/include/winerror.h:2356:1: CLASSFACTORY_S_LAST = 262431 // /usr/x86_64-w64-mingw32/include/winerror.h:2357:1: CLEARTYPE_NATURAL_QUALITY = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1149:1: CLEARTYPE_QUALITY = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1148:1: CLIENTSITE_E_FIRST = 2147746192 // /usr/x86_64-w64-mingw32/include/winerror.h:2414:1: CLIENTSITE_E_LAST = 2147746207 // /usr/x86_64-w64-mingw32/include/winerror.h:2415:1: CLIENTSITE_S_FIRST = 262544 // /usr/x86_64-w64-mingw32/include/winerror.h:2416:1: CLIENTSITE_S_LAST = 262559 // /usr/x86_64-w64-mingw32/include/winerror.h:2417:1: CLIPBRD_E_FIRST = 2147746256 // /usr/x86_64-w64-mingw32/include/winerror.h:2439:1: CLIPBRD_E_LAST = 2147746271 // /usr/x86_64-w64-mingw32/include/winerror.h:2440:1: CLIPBRD_S_FIRST = 262608 // /usr/x86_64-w64-mingw32/include/winerror.h:2441:1: CLIPBRD_S_LAST = 262623 // /usr/x86_64-w64-mingw32/include/winerror.h:2442:1: CLIPCAPS = 36 // /usr/x86_64-w64-mingw32/include/wingdi.h:1529:1: CLIP_CHARACTER_PRECIS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1132:1: CLIP_DEFAULT_PRECIS = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1131:1: CLIP_EMBEDDED = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1140:1: CLIP_LH_ANGLES = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1135:1: CLIP_MASK = 0xf // /usr/x86_64-w64-mingw32/include/wingdi.h:1134:1: CLIP_STROKE_PRECIS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1133:1: CLIP_TO_PATH = 4097 // /usr/x86_64-w64-mingw32/include/wingdi.h:294:1: CLIP_TT_ALWAYS = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1136:1: CLK_TCK = 1000 // /usr/x86_64-w64-mingw32/include/time.h:245:1: CLOCKS_PER_SEC = 1000 // /usr/x86_64-w64-mingw32/include/time.h:110:1: CLOCK_MONOTONIC = 1 // /usr/x86_64-w64-mingw32/include/pthread_time.h:62:1: CLOCK_PROCESS_CPUTIME_ID = 2 // /usr/x86_64-w64-mingw32/include/pthread_time.h:66:1: CLOCK_REALTIME = 0 // /usr/x86_64-w64-mingw32/include/pthread_time.h:58:1: CLOCK_THREAD_CPUTIME_ID = 3 // /usr/x86_64-w64-mingw32/include/pthread_time.h:70:1: CLOSECHANNEL = 4112 // /usr/x86_64-w64-mingw32/include/wingdi.h:310:1: CLRBREAK = 9 // /usr/x86_64-w64-mingw32/include/winbase.h:541:1: CLRDTR = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:538:1: CLRRTS = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:536:1: CLR_INVALID = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/wingdi.h:1461:1: CLSID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:95:1: CMC_FAIL_BAD_ALG = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2451:1: CMC_FAIL_BAD_CERT_ID = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2455:1: CMC_FAIL_BAD_IDENTITY = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2458:1: CMC_FAIL_BAD_MESSAGE_CHECK = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2452:1: CMC_FAIL_BAD_REQUEST = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2453:1: CMC_FAIL_BAD_TIME = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2454:1: CMC_FAIL_INTERNAL_CA_ERROR = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2462:1: CMC_FAIL_MUST_ARCHIVE_KEYS = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2457:1: CMC_FAIL_NO_KEY_REUSE = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2461:1: CMC_FAIL_POP_FAILED = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2460:1: CMC_FAIL_POP_REQUIRED = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2459:1: CMC_FAIL_TRY_LATER = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2463:1: CMC_FAIL_UNSUPORTED_EXT = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2456:1: CMC_OTHER_INFO_FAIL_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2442:1: CMC_OTHER_INFO_NO_CHOICE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2441:1: CMC_OTHER_INFO_PEND_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2443:1: CMC_STATUS_CONFIRM_REQUIRED = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2449:1: CMC_STATUS_FAILED = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2446:1: CMC_STATUS_NO_SUPPORT = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2448:1: CMC_STATUS_PENDING = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2447:1: CMC_STATUS_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2445:1: CMC_TAGGED_CERT_REQUEST_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2391:1: CMSG_ALL_FLAGS = 18446744073709551615 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2907:1: CMSG_ATTR_CERT_COUNT_PARAM = 31 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3149:1: CMSG_ATTR_CERT_PARAM = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3150:1: CMSG_AUTHENTICATED_ATTRIBUTES_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3108:1: CMSG_BARE_CONTENT_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3105:1: CMSG_BARE_CONTENT_PARAM = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3125:1: CMSG_CERT_COUNT_PARAM = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3133:1: CMSG_CERT_PARAM = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3134:1: CMSG_CMS_ENCAPSULATED_CONTENT_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3111:1: CMSG_CMS_ENCAPSULATED_CTL_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4359:1: CMSG_CMS_RECIPIENT_COUNT_PARAM = 33 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3151:1: CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM = 35 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3153:1: CMSG_CMS_RECIPIENT_INDEX_PARAM = 34 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3152:1: CMSG_CMS_RECIPIENT_INFO_PARAM = 36 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3154:1: CMSG_CMS_SIGNER_INFO_PARAM = 39 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3157:1: CMSG_COMPUTED_HASH_PARAM = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3143:1: CMSG_CONTENTS_OCTETS_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3109:1: CMSG_CONTENT_ENCRYPT_FREE_OBJID_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3399:1: CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3398:1: CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3396:1: CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3400:1: CMSG_CONTENT_PARAM = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3124:1: CMSG_CRL_COUNT_PARAM = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3135:1: CMSG_CRL_PARAM = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3136:1: CMSG_CRYPT_RELEASE_CONTEXT_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3113:1: CMSG_CTRL_ADD_ATTR_CERT = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3273:1: CMSG_CTRL_ADD_CERT = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3269:1: CMSG_CTRL_ADD_CMS_SIGNER_INFO = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3279:1: CMSG_CTRL_ADD_CRL = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3271:1: CMSG_CTRL_ADD_SIGNER = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3265:1: CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3267:1: CMSG_CTRL_DECRYPT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3263:1: CMSG_CTRL_DEL_ATTR_CERT = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3274:1: CMSG_CTRL_DEL_CERT = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3270:1: CMSG_CTRL_DEL_CRL = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3272:1: CMSG_CTRL_DEL_SIGNER = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3266:1: CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3268:1: CMSG_CTRL_ENABLE_STRONG_SIGNATURE = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3280:1: CMSG_CTRL_KEY_AGREE_DECRYPT = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3276:1: CMSG_CTRL_KEY_TRANS_DECRYPT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3275:1: CMSG_CTRL_MAIL_LIST_DECRYPT = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3277:1: CMSG_CTRL_VERIFY_HASH = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3264:1: CMSG_CTRL_VERIFY_SIGNATURE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3262:1: CMSG_CTRL_VERIFY_SIGNATURE_EX = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3278:1: CMSG_DATA = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2900:1: CMSG_DATA_FLAG = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2908:1: CMSG_DETACHED_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3107:1: CMSG_ENCODED_MESSAGE = 29 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3147:1: CMSG_ENCODED_SIGNER = 28 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3146:1: CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4362:1: CMSG_ENCODE_SORTED_CTL_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4361:1: CMSG_ENCODING_TYPE_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1429:1: CMSG_ENCRYPTED = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2905:1: CMSG_ENCRYPTED_DIGEST = 27 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3145:1: CMSG_ENCRYPTED_FLAG = 64 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2913:1: CMSG_ENCRYPT_PARAM = 26 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3144:1: CMSG_ENVELOPED = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2902:1: CMSG_ENVELOPED_DATA_CMS_VERSION = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3201:1: CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3200:1: CMSG_ENVELOPED_DATA_V0 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3198:1: CMSG_ENVELOPED_DATA_V2 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3199:1: CMSG_ENVELOPED_FLAG = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2910:1: CMSG_ENVELOPED_RECIPIENT_V0 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3251:1: CMSG_ENVELOPED_RECIPIENT_V2 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3252:1: CMSG_ENVELOPED_RECIPIENT_V3 = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3253:1: CMSG_ENVELOPED_RECIPIENT_V4 = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3254:1: CMSG_ENVELOPE_ALGORITHM_PARAM = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3137:1: CMSG_HASHED = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2904:1: CMSG_HASHED_DATA_CMS_VERSION = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3196:1: CMSG_HASHED_DATA_PKCS_1_5_VERSION = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3195:1: CMSG_HASHED_DATA_V0 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3193:1: CMSG_HASHED_DATA_V2 = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3194:1: CMSG_HASHED_FLAG = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2912:1: CMSG_HASH_ALGORITHM_PARAM = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3141:1: CMSG_HASH_DATA_PARAM = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3142:1: CMSG_INDEFINITE_LENGTH = 4294967295 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3097:1: CMSG_INNER_CONTENT_TYPE_PARAM = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3126:1: CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3446:1: CMSG_KEY_AGREE_ENCRYPT_FREE_OBJID_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3450:1: CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3445:1: CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3447:1: CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3449:1: CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3448:1: CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3025:1: CMSG_KEY_AGREE_ORIGINATOR_CERT = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3230:1: CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3231:1: CMSG_KEY_AGREE_RECIPIENT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3046:1: CMSG_KEY_AGREE_STATIC_KEY_CHOICE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3026:1: CMSG_KEY_AGREE_VERSION = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3257:1: CMSG_KEY_TRANS_CMS_VERSION = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3256:1: CMSG_KEY_TRANS_ENCRYPT_FREE_OBJID_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3417:1: CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3416:1: CMSG_KEY_TRANS_PKCS_1_5_VERSION = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3255:1: CMSG_KEY_TRANS_RECIPIENT = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3045:1: CMSG_LENGTH_ONLY_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3106:1: CMSG_MAIL_LIST_ENCRYPT_FREE_OBJID_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3467:1: CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3466:1: CMSG_MAIL_LIST_HANDLE_KEY_CHOICE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3043:1: CMSG_MAIL_LIST_RECIPIENT = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3047:1: CMSG_MAIL_LIST_VERSION = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3258:1: CMSG_MAX_LENGTH_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3110:1: CMSG_OID_CNG_EXPORT_KEY_AGREE_FUNC = "CryptMsgDllCNGExportKeyAgree" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3454:1: CMSG_OID_CNG_EXPORT_KEY_TRANS_FUNC = "CryptMsgDllCNGExportKeyTrans" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3421:1: CMSG_OID_CNG_GEN_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllCNGGenContentEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3404:1: CMSG_OID_CNG_IMPORT_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllCNGImportContentEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3497:1: CMSG_OID_CNG_IMPORT_KEY_AGREE_FUNC = "CryptMsgDllCNGImportKeyAgree" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3496:1: CMSG_OID_CNG_IMPORT_KEY_TRANS_FUNC = "CryptMsgDllCNGImportKeyTrans" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3495:1: CMSG_OID_EXPORT_ENCRYPT_KEY_FUNC = "CryptMsgDllExportEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3364:1: CMSG_OID_EXPORT_KEY_AGREE_FUNC = "CryptMsgDllExportKeyAgree" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3452:1: CMSG_OID_EXPORT_KEY_TRANS_FUNC = "CryptMsgDllExportKeyTrans" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3419:1: CMSG_OID_EXPORT_MAIL_LIST_FUNC = "CryptMsgDllExportMailList" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3469:1: CMSG_OID_GEN_CONTENT_ENCRYPT_KEY_FUNC = "CryptMsgDllGenContentEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3402:1: CMSG_OID_GEN_ENCRYPT_KEY_FUNC = "CryptMsgDllGenEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3363:1: CMSG_OID_IMPORT_ENCRYPT_KEY_FUNC = "CryptMsgDllImportEncryptKey" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3365:1: CMSG_OID_IMPORT_KEY_AGREE_FUNC = "CryptMsgDllImportKeyAgree" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3473:1: CMSG_OID_IMPORT_KEY_TRANS_FUNC = "CryptMsgDllImportKeyTrans" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3471:1: CMSG_OID_IMPORT_MAIL_LIST_FUNC = "CryptMsgDllImportMailList" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3475:1: CMSG_RC4_NO_SALT_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3049:1: CMSG_RECIPIENT_COUNT_PARAM = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3138:1: CMSG_RECIPIENT_INDEX_PARAM = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3139:1: CMSG_RECIPIENT_INFO_PARAM = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3140:1: CMSG_SIGNED = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2901:1: CMSG_SIGNED_AND_ENVELOPED = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2903:1: CMSG_SIGNED_AND_ENVELOPED_FLAG = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2911:1: CMSG_SIGNED_DATA_CMS_VERSION = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3186:1: CMSG_SIGNED_DATA_NO_SIGN_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3112:1: CMSG_SIGNED_DATA_PKCS_1_5_VERSION = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3185:1: CMSG_SIGNED_DATA_V1 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3183:1: CMSG_SIGNED_DATA_V3 = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3184:1: CMSG_SIGNED_FLAG = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2909:1: CMSG_SIGNER_AUTH_ATTR_PARAM = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3131:1: CMSG_SIGNER_CERT_ID_PARAM = 38 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3156:1: CMSG_SIGNER_CERT_INFO_PARAM = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3129:1: CMSG_SIGNER_COUNT_PARAM = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3127:1: CMSG_SIGNER_HASH_ALGORITHM_PARAM = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3130:1: CMSG_SIGNER_INFO_CMS_VERSION = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3191:1: CMSG_SIGNER_INFO_PARAM = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3128:1: CMSG_SIGNER_INFO_PKCS_1_5_VERSION = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3190:1: CMSG_SIGNER_INFO_V1 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3188:1: CMSG_SIGNER_INFO_V3 = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3189:1: CMSG_SIGNER_ONLY_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4357:1: CMSG_SIGNER_UNAUTH_ATTR_PARAM = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3132:1: CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3050:1: CMSG_TRUSTED_SIGNER_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4356:1: CMSG_TYPE_PARAM = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3123:1: CMSG_UNPROTECTED_ATTR_PARAM = 37 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3155:1: CMSG_USE_SIGNER_INDEX_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4358:1: CMSG_VERIFY_COUNTER_SIGN_ENABLE_STRONG_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3353:1: CMSG_VERIFY_SIGNER_CERT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3291:1: CMSG_VERIFY_SIGNER_CHAIN = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3292:1: CMSG_VERIFY_SIGNER_NULL = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3293:1: CMSG_VERIFY_SIGNER_PUBKEY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3290:1: CMSG_VERSION_PARAM = 30 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3148:1: CM_CMYK_COLOR = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:1651:1: CM_DEVICE_ICM = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:1649:1: CM_GAMMA_RAMP = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:1650:1: CM_IN_GAMUT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:511:1: CM_NONE = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1648:1: CM_OUT_OF_GAMUT = 255 // /usr/x86_64-w64-mingw32/include/wingdi.h:510:1: CM_SERVICE_MEASURED_BOOT_LOAD = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8603:1: CM_SERVICE_NETWORK_BOOT_LOAD = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8598:1: CM_SERVICE_SD_DISK_BOOT_LOAD = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8601:1: CM_SERVICE_USB3_DISK_BOOT_LOAD = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8602:1: CM_SERVICE_USB_DISK_BOOT_LOAD = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8600:1: CM_SERVICE_VALID_PROMOTION_MASK = 255 // /usr/x86_64-w64-mingw32/include/winnt.h:8607:1: CM_SERVICE_VERIFIER_BOOT_LOAD = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8604:1: CM_SERVICE_VIRTUAL_DISK_BOOT_LOAD = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8599:1: CM_SERVICE_WINPE_BOOT_LOAD = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8605:1: COLFLAG_BUSY = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17379:1: COLFLAG_GENERATED = 0x0060 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17381:1: COLFLAG_HASCOLL = 0x0200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17380:1: COLFLAG_HASTYPE = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17373:1: COLFLAG_HIDDEN = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17372:1: COLFLAG_NOINSERT = 0x0062 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17382:1: COLFLAG_NOTAVAIL = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17378:1: COLFLAG_PRIMKEY = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17371:1: COLFLAG_SORTERREF = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17375:1: COLFLAG_STORED = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17377:1: COLFLAG_UNIQUE = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17374:1: COLFLAG_VIRTUAL = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17376:1: COLNAME_COLUMN = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15483:1: COLNAME_DATABASE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15481:1: COLNAME_DECLTYPE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15480:1: COLNAME_N = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15485:1: COLNAME_NAME = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15479:1: COLNAME_TABLE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15482:1: COLORMATCHTOTARGET_EMBEDED = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4207:1: COLORMGMTCAPS = 121 // /usr/x86_64-w64-mingw32/include/wingdi.h:1555:1: COLORMGMTDLGORD = 1551 // /usr/x86_64-w64-mingw32/include/dlgs.h:191:1: COLOROKSTRINGA = "commdlg_ColorOK" // /usr/x86_64-w64-mingw32/include/commdlg.h:490:1: COLORONCOLOR = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:91:1: COLORRES = 108 // /usr/x86_64-w64-mingw32/include/wingdi.h:1540:1: COLOR_3DDKSHADOW = 21 // /usr/x86_64-w64-mingw32/include/winuser.h:3829:1: COLOR_3DFACE = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:3840:1: COLOR_3DHIGHLIGHT = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:3842:1: COLOR_3DHILIGHT = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:3843:1: COLOR_3DLIGHT = 22 // /usr/x86_64-w64-mingw32/include/winuser.h:3830:1: COLOR_3DSHADOW = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3841:1: COLOR_ACTIVEBORDER = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:3817:1: COLOR_ACTIVECAPTION = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3809:1: COLOR_APPWORKSPACE = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:3819:1: COLOR_BACKGROUND = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3808:1: COLOR_BTNFACE = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:3822:1: COLOR_BTNHIGHLIGHT = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:3827:1: COLOR_BTNHILIGHT = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:3844:1: COLOR_BTNSHADOW = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3823:1: COLOR_BTNTEXT = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:3825:1: COLOR_CAPTIONTEXT = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:3816:1: COLOR_DESKTOP = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3839:1: COLOR_GRADIENTACTIVECAPTION = 27 // /usr/x86_64-w64-mingw32/include/winuser.h:3834:1: COLOR_GRADIENTINACTIVECAPTION = 28 // /usr/x86_64-w64-mingw32/include/winuser.h:3835:1: COLOR_GRAYTEXT = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:3824:1: COLOR_HIGHLIGHT = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:3820:1: COLOR_HIGHLIGHTTEXT = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:3821:1: COLOR_HOTLIGHT = 26 // /usr/x86_64-w64-mingw32/include/winuser.h:3833:1: COLOR_INACTIVEBORDER = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:3818:1: COLOR_INACTIVECAPTION = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3810:1: COLOR_INACTIVECAPTIONTEXT = 19 // /usr/x86_64-w64-mingw32/include/winuser.h:3826:1: COLOR_INFOBK = 24 // /usr/x86_64-w64-mingw32/include/winuser.h:3832:1: COLOR_INFOTEXT = 23 // /usr/x86_64-w64-mingw32/include/winuser.h:3831:1: COLOR_MENU = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3811:1: COLOR_MENUBAR = 30 // /usr/x86_64-w64-mingw32/include/winuser.h:3837:1: COLOR_MENUHILIGHT = 29 // /usr/x86_64-w64-mingw32/include/winuser.h:3836:1: COLOR_MENUTEXT = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:3814:1: COLOR_SCROLLBAR = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3807:1: COLOR_WINDOW = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:3812:1: COLOR_WINDOWFRAME = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3813:1: COLOR_WINDOWTEXT = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:3815:1: COLTYPE_ANY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17356:1: COLTYPE_BLOB = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17357:1: COLTYPE_CUSTOM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17355:1: COLTYPE_INT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17358:1: COLTYPE_INTEGER = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17359:1: COLTYPE_REAL = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17360:1: COLTYPE_TEXT = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17361:1: COMMON_LVB_GRID_HORIZONTAL = 0x400 // /usr/x86_64-w64-mingw32/include/wincon.h:129:1: COMMON_LVB_GRID_LVERTICAL = 0x800 // /usr/x86_64-w64-mingw32/include/wincon.h:130:1: COMMON_LVB_GRID_RVERTICAL = 0x1000 // /usr/x86_64-w64-mingw32/include/wincon.h:131:1: COMMON_LVB_LEADING_BYTE = 0x100 // /usr/x86_64-w64-mingw32/include/wincon.h:127:1: COMMON_LVB_REVERSE_VIDEO = 0x4000 // /usr/x86_64-w64-mingw32/include/wincon.h:132:1: COMMON_LVB_SBCSDBCS = 0x300 // /usr/x86_64-w64-mingw32/include/wincon.h:135:1: COMMON_LVB_TRAILING_BYTE = 0x200 // /usr/x86_64-w64-mingw32/include/wincon.h:128:1: COMMON_LVB_UNDERSCORE = 0x8000 // /usr/x86_64-w64-mingw32/include/wincon.h:133:1: COMPLEXREGION = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:78:1: COMPRESSION_ENGINE_HIBER = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:7861:1: COMPRESSION_ENGINE_MAXIMUM = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:7860:1: COMPRESSION_ENGINE_STANDARD = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7859:1: COMPRESSION_FORMAT_DEFAULT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7855:1: COMPRESSION_FORMAT_LZNT1 = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7856:1: COMPRESSION_FORMAT_NONE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7854:1: COMPRESSION_FORMAT_SPARSE = 16384 // /usr/x86_64-w64-mingw32/include/winioctl.h:1718:1: COMPRESSION_FORMAT_XPRESS = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7857:1: COMPRESSION_FORMAT_XPRESS_HUFF = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7858:1: COM_RIGHTS_ACTIVATE_LOCAL = 8 // /usr/x86_64-w64-mingw32/include/combaseapi.h:238:1: COM_RIGHTS_ACTIVATE_REMOTE = 16 // /usr/x86_64-w64-mingw32/include/combaseapi.h:239:1: COM_RIGHTS_EXECUTE = 1 // /usr/x86_64-w64-mingw32/include/combaseapi.h:235:1: COM_RIGHTS_EXECUTE_LOCAL = 2 // /usr/x86_64-w64-mingw32/include/combaseapi.h:236:1: COM_RIGHTS_EXECUTE_REMOTE = 4 // /usr/x86_64-w64-mingw32/include/combaseapi.h:237:1: CONCURRENCYSAL_HXX = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:8:1: CONDITION_VARIABLE_LOCKMODE_SHARED = 1 // /usr/x86_64-w64-mingw32/include/synchapi.h:29:1: CONFIRMSAFETYACTION_LOADOBJECT = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:9184:1: CONNDLG_CONN_POINT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:149:1: CONNDLG_HIDE_BOX = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:151:1: CONNDLG_NOT_PERSIST = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnetwk.h:154:1: CONNDLG_PERSIST = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnetwk.h:153:1: CONNDLG_RO_PATH = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:148:1: CONNDLG_USE_MRU = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:150:1: CONNECT_CMD_SAVECRED = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnetwk.h:92:1: CONNECT_COMMANDLINE = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnetwk.h:91:1: CONNECT_CURRENT_MEDIA = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnetwk.h:88:1: CONNECT_DEFERRED = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnetwk.h:89:1: CONNECT_INTERACTIVE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:82:1: CONNECT_LOCALDRIVE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnetwk.h:87:1: CONNECT_NEED_DRIVE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnetwk.h:84:1: CONNECT_PROMPT = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnetwk.h:83:1: CONNECT_REDIRECT = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnetwk.h:86:1: CONNECT_REFCOUNT = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnetwk.h:85:1: CONNECT_RESERVED = 0xFF000000 // /usr/x86_64-w64-mingw32/include/winnetwk.h:90:1: CONNECT_TEMPORARY = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:81:1: CONNECT_UPDATE_PROFILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:79:1: CONNECT_UPDATE_RECENT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:80:1: CONSOLE_APPLICATION_16BIT = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:5977:1: CONSOLE_CARET_SELECTION = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5981:1: CONSOLE_CARET_VISIBLE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5982:1: CONSOLE_FULLSCREEN = 1 // /usr/x86_64-w64-mingw32/include/wincon.h:278:1: CONSOLE_FULLSCREEN_HARDWARE = 2 // /usr/x86_64-w64-mingw32/include/wincon.h:279:1: CONSOLE_FULLSCREEN_MODE = 1 // /usr/x86_64-w64-mingw32/include/wincon.h:282:1: CONSOLE_MOUSE_DOWN = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:165:1: CONSOLE_MOUSE_SELECTION = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:164:1: CONSOLE_NO_SELECTION = 0x0 // /usr/x86_64-w64-mingw32/include/wincon.h:161:1: CONSOLE_SELECTION_IN_PROGRESS = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:162:1: CONSOLE_SELECTION_NOT_EMPTY = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:163:1: CONSOLE_TEXTMODE_BUFFER = 1 // /usr/x86_64-w64-mingw32/include/wincon.h:270:1: CONSOLE_WINDOWED_MODE = 2 // /usr/x86_64-w64-mingw32/include/wincon.h:283:1: CONST_VTBL = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:113:1: CONTAINER_INHERIT_ACE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3337:1: CONTEXT_ALL = 1048607 // /usr/x86_64-w64-mingw32/include/winnt.h:1668:1: CONTEXT_AMD64 = 0x100000 // /usr/x86_64-w64-mingw32/include/winnt.h:1659:1: CONTEXT_CONTROL = 1048577 // /usr/x86_64-w64-mingw32/include/winnt.h:1661:1: CONTEXT_DEBUG_REGISTERS = 1048592 // /usr/x86_64-w64-mingw32/include/winnt.h:1665:1: CONTEXT_EXCEPTION_ACTIVE = 0x8000000 // /usr/x86_64-w64-mingw32/include/winnt.h:1670:1: CONTEXT_EXCEPTION_REPORTING = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:1673:1: CONTEXT_EXCEPTION_REQUEST = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:1672:1: CONTEXT_E_FIRST = 2147803136 // /usr/x86_64-w64-mingw32/include/winerror.h:2573:1: CONTEXT_E_LAST = 2147803183 // /usr/x86_64-w64-mingw32/include/winerror.h:2574:1: CONTEXT_FLOATING_POINT = 1048584 // /usr/x86_64-w64-mingw32/include/winnt.h:1664:1: CONTEXT_FULL = 1048587 // /usr/x86_64-w64-mingw32/include/winnt.h:1667:1: CONTEXT_INTEGER = 1048578 // /usr/x86_64-w64-mingw32/include/winnt.h:1662:1: CONTEXT_OID_CREATE_OBJECT_CONTEXT_FUNC = "ContextDllCreateObjectContext" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4837:1: CONTEXT_SEGMENTS = 1048580 // /usr/x86_64-w64-mingw32/include/winnt.h:1663:1: CONTEXT_SERVICE_ACTIVE = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:1671:1: CONTEXT_S_FIRST = 319488 // /usr/x86_64-w64-mingw32/include/winerror.h:2575:1: CONTEXT_S_LAST = 319535 // /usr/x86_64-w64-mingw32/include/winerror.h:2576:1: CONVERT10_E_FIRST = 2147746240 // /usr/x86_64-w64-mingw32/include/winerror.h:2428:1: CONVERT10_E_LAST = 2147746255 // /usr/x86_64-w64-mingw32/include/winerror.h:2429:1: CONVERT10_S_FIRST = 262592 // /usr/x86_64-w64-mingw32/include/winerror.h:2430:1: CONVERT10_S_LAST = 262607 // /usr/x86_64-w64-mingw32/include/winerror.h:2431:1: COPYFILE_SIS_FLAGS = 0x0003 // /usr/x86_64-w64-mingw32/include/winioctl.h:1755:1: COPYFILE_SIS_LINK = 0x0001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1753:1: COPYFILE_SIS_REPLACE = 0x0002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1754:1: COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:111:1: COPY_FILE_FAIL_IF_EXISTS = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:108:1: COPY_FILE_OPEN_SOURCE_FOR_WRITE = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:110:1: COPY_FILE_RESTARTABLE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:109:1: CORE_PARKING_POLICY_CHANGE_IDEAL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5214:1: CORE_PARKING_POLICY_CHANGE_MAX = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5218:1: CORE_PARKING_POLICY_CHANGE_MULTISTEP = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5217:1: CORE_PARKING_POLICY_CHANGE_ROCKET = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5216:1: CORE_PARKING_POLICY_CHANGE_SINGLE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5215:1: CO_E_FIRST = 2147746288 // /usr/x86_64-w64-mingw32/include/winerror.h:2468:1: CO_E_LAST = 2147746303 // /usr/x86_64-w64-mingw32/include/winerror.h:2469:1: CO_S_FIRST = 262640 // /usr/x86_64-w64-mingw32/include/winerror.h:2470:1: CO_S_LAST = 262655 // /usr/x86_64-w64-mingw32/include/winerror.h:2471:1: CPS_CANCEL = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:259:1: CPS_COMPLETE = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:256:1: CPS_CONVERT = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:257:1: CPS_REVERT = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:258:1: CP_ACP = 0 // /usr/x86_64-w64-mingw32/include/winnls.h:177:1: CP_INSTALLED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:164:1: CP_MACCP = 2 // /usr/x86_64-w64-mingw32/include/winnls.h:179:1: CP_NONE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1599:1: CP_OEMCP = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:178:1: CP_RECTANGLE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1600:1: CP_REGION = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1601:1: CP_SUPPORTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:165:1: CP_SYMBOL = 42 // /usr/x86_64-w64-mingw32/include/winnls.h:181:1: CP_THREAD_ACP = 3 // /usr/x86_64-w64-mingw32/include/winnls.h:180:1: CP_UTF7 = 65000 // /usr/x86_64-w64-mingw32/include/winnls.h:183:1: CP_UTF8 = 65001 // /usr/x86_64-w64-mingw32/include/winnls.h:184:1: CP_WINANSI = 1004 // /usr/x86_64-w64-mingw32/include/ddeml.h:101:1: CP_WINNEUTRAL = 1004 // /usr/x86_64-w64-mingw32/include/ddeml.h:140:1: CP_WINUNICODE = 1200 // /usr/x86_64-w64-mingw32/include/ddeml.h:102:1: CREATECOLORSPACE_EMBEDED = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4196:1: CREATE_ALWAYS = 2 // /usr/x86_64-w64-mingw32/include/fileapi.h:19:1: CREATE_BOUNDARY_DESCRIPTOR_ADD_APPCONTAINER_SID = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:8266:1: CREATE_BREAKAWAY_FROM_JOB = 0x1000000 // /usr/x86_64-w64-mingw32/include/winbase.h:399:1: CREATE_DEFAULT_ERROR_MODE = 0x4000000 // /usr/x86_64-w64-mingw32/include/winbase.h:401:1: CREATE_FORCEDOS = 0x2000 // /usr/x86_64-w64-mingw32/include/winbase.h:390:1: CREATE_FOR_DIR = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:1397:1: CREATE_FOR_IMPORT = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1396:1: CREATE_IGNORE_SYSTEM_DEFAULT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winbase.h:406:1: CREATE_NEW = 1 // /usr/x86_64-w64-mingw32/include/fileapi.h:18:1: CREATE_NEW_CONSOLE = 0x10 // /usr/x86_64-w64-mingw32/include/winbase.h:381:1: CREATE_NEW_PROCESS_GROUP = 0x200 // /usr/x86_64-w64-mingw32/include/winbase.h:386:1: CREATE_NO_WINDOW = 0x8000000 // /usr/x86_64-w64-mingw32/include/winbase.h:402:1: CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 0x2000000 // /usr/x86_64-w64-mingw32/include/winbase.h:400:1: CREATE_PROCESS_DEBUG_EVENT = 3 // /usr/x86_64-w64-mingw32/include/minwinbase.h:226:1: CREATE_PROTECTED_PROCESS = 0x40000 // /usr/x86_64-w64-mingw32/include/winbase.h:395:1: CREATE_SEPARATE_WOW_VDM = 0x800 // /usr/x86_64-w64-mingw32/include/winbase.h:388:1: CREATE_SHARED_WOW_VDM = 0x1000 // /usr/x86_64-w64-mingw32/include/winbase.h:389:1: CREATE_SUSPENDED = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:379:1: CREATE_THREAD_DEBUG_EVENT = 2 // /usr/x86_64-w64-mingw32/include/minwinbase.h:225:1: CREATE_UNICODE_ENVIRONMENT = 0x400 // /usr/x86_64-w64-mingw32/include/winbase.h:387:1: CRITICAL_SECTION_NO_DEBUG_INFO = 16777216 // /usr/x86_64-w64-mingw32/include/winbase.h:1271:1: CRL_DIST_POINT_ERR_CRL_ISSUER_BIT = 2147483648 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2145:1: CRL_DIST_POINT_ERR_INDEX_MASK = 0x7f // /usr/x86_64-w64-mingw32/include/wincrypt.h:2141:1: CRL_DIST_POINT_ERR_INDEX_SHIFT = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2142:1: CRL_DIST_POINT_FULL_NAME = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2117:1: CRL_DIST_POINT_ISSUER_RDN_NAME = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2118:1: CRL_DIST_POINT_NO_NAME = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2116:1: CRL_FIND_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4167:1: CRL_FIND_EXISTING = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4169:1: CRL_FIND_ISSUED_BY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4168:1: CRL_FIND_ISSUED_BY_AKI_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4172:1: CRL_FIND_ISSUED_BY_BASE_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4175:1: CRL_FIND_ISSUED_BY_DELTA_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4174:1: CRL_FIND_ISSUED_BY_SIGNATURE_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4173:1: CRL_FIND_ISSUED_FOR = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4170:1: CRL_FIND_ISSUED_FOR_SET_STRONG_PROPERTIES_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4176:1: CRL_REASON_AA_COMPROMISE = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2107:1: CRL_REASON_AA_COMPROMISE_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2134:1: CRL_REASON_AFFILIATION_CHANGED = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2101:1: CRL_REASON_AFFILIATION_CHANGED_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2129:1: CRL_REASON_CA_COMPROMISE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2100:1: CRL_REASON_CA_COMPROMISE_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2128:1: CRL_REASON_CERTIFICATE_HOLD = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2104:1: CRL_REASON_CERTIFICATE_HOLD_FLAG = 0x02 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2132:1: CRL_REASON_CESSATION_OF_OPERATION = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2103:1: CRL_REASON_CESSATION_OF_OPERATION_FLAG = 0x04 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2131:1: CRL_REASON_KEY_COMPROMISE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2099:1: CRL_REASON_KEY_COMPROMISE_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2127:1: CRL_REASON_PRIVILEGE_WITHDRAWN = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2106:1: CRL_REASON_PRIVILEGE_WITHDRAWN_FLAG = 0x01 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2133:1: CRL_REASON_REMOVE_FROM_CRL = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2105:1: CRL_REASON_SUPERSEDED = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2102:1: CRL_REASON_SUPERSEDED_FLAG = 0x08 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2130:1: CRL_REASON_UNSPECIFIED = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2098:1: CRL_REASON_UNUSED_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2126:1: CRL_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1338:1: CRL_V2 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1339:1: CRM_PROTOCOL_DYNAMIC_MARSHAL_INFO = 0x00000002 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:32:1: CRM_PROTOCOL_EXPLICIT_MARSHAL_ONLY = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:31:1: CRM_PROTOCOL_MAXIMUM_OPTION = 0x00000003 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:33:1: CROSS_CERT_DIST_POINT_ERR_INDEX_MASK = 0xff // /usr/x86_64-w64-mingw32/include/wincrypt.h:2154:1: CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2155:1: CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT = 50 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5221:1: CRYPTNET_CRL_BEFORE_OCSP_ENABLE = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:5222:1: CRYPTNET_CRL_PRE_FETCH_MAX_AGE_SECONDS_DEFAULT = 7200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5201:1: CRYPTNET_CRL_PRE_FETCH_MAX_AGE_SECONDS_MIN = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5202:1: CRYPTNET_CRL_PRE_FETCH_MIN_AFTER_NEXT_UPDATE_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5210:1: CRYPTNET_CRL_PRE_FETCH_MIN_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5208:1: CRYPTNET_CRL_PRE_FETCH_PUBLISH_BEFORE_NEXT_UPDATE_SECONDS_DEFAULT = 3600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5204:1: CRYPTNET_CRL_PRE_FETCH_PUBLISH_RANDOM_INTERVAL_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5206:1: CRYPTNET_CRL_PRE_FETCH_TIMEOUT_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5199:1: CRYPTNET_MAX_CACHED_OCSP_PER_CRL_COUNT_DEFAULT = 500 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5162:1: CRYPTNET_OCSP_AFTER_CRL_DISABLE = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:5163:1: CRYPTNET_PRE_FETCH_AFTER_CURRENT_TIME_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 1800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5185:1: CRYPTNET_PRE_FETCH_AFTER_PUBLISH_PRE_FETCH_DIVISOR_DEFAULT = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5173:1: CRYPTNET_PRE_FETCH_BEFORE_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5175:1: CRYPTNET_PRE_FETCH_MAX_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 14400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5181:1: CRYPTNET_PRE_FETCH_MAX_MAX_AGE_SECONDS_DEFAULT = 1209600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5169:1: CRYPTNET_PRE_FETCH_MIN_AFTER_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 1800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5183:1: CRYPTNET_PRE_FETCH_MIN_BEFORE_NEXT_UPDATE_PRE_FETCH_PERIOD_SECONDS_DEFAULT = 3600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5177:1: CRYPTNET_PRE_FETCH_MIN_MAX_AGE_SECONDS_DEFAULT = 3600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5167:1: CRYPTNET_PRE_FETCH_MIN_OCSP_VALIDITY_PERIOD_SECONDS_DEFAULT = 1209600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5171:1: CRYPTNET_PRE_FETCH_RETRIEVAL_TIMEOUT_SECONDS_DEFAULT = 300 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5192:1: CRYPTNET_PRE_FETCH_SCAN_AFTER_TRIGGER_DELAY_SECONDS_DEFAULT = 30 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5190:1: CRYPTNET_PRE_FETCH_TRIGGER_DISABLE = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:5188:1: CRYPTNET_PRE_FETCH_TRIGGER_PERIOD_SECONDS_DEFAULT = 600 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5187:1: CRYPTNET_PRE_FETCH_VALIDITY_PERIOD_AFTER_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5179:1: CRYPTNET_URL_CACHE_DEFAULT_FLUSH = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4902:1: CRYPTNET_URL_CACHE_DEFAULT_FLUSH_EXEMPT_SECONDS_DEFAULT = 2419200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5165:1: CRYPTNET_URL_CACHE_DISABLE_FLUSH = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:4903:1: CRYPTNET_URL_CACHE_PRE_FETCH_AUTOROOT_CAB = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4892:1: CRYPTNET_URL_CACHE_PRE_FETCH_BLOB = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4889:1: CRYPTNET_URL_CACHE_PRE_FETCH_CRL = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4890:1: CRYPTNET_URL_CACHE_PRE_FETCH_DISALLOWED_CERT_CAB = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4893:1: CRYPTNET_URL_CACHE_PRE_FETCH_NONE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4888:1: CRYPTNET_URL_CACHE_PRE_FETCH_OCSP = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4891:1: CRYPTNET_URL_CACHE_PRE_FETCH_PIN_RULES_CAB = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4894:1: CRYPTNET_URL_CACHE_RESPONSE_HTTP = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4916:1: CRYPTNET_URL_CACHE_RESPONSE_NONE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4915:1: CRYPTNET_URL_CACHE_RESPONSE_VALIDATED = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4918:1: CRYPTO_BLOBS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:768:1: CRYPTPROTECTMEMORY_BLOCK_SIZE = 16 // /usr/x86_64-w64-mingw32/include/dpapi.h:87:1: CRYPTPROTECTMEMORY_CROSS_PROCESS = 0x1 // /usr/x86_64-w64-mingw32/include/dpapi.h:90:1: CRYPTPROTECTMEMORY_SAME_LOGON = 0x2 // /usr/x86_64-w64-mingw32/include/dpapi.h:91:1: CRYPTPROTECTMEMORY_SAME_PROCESS = 0x0 // /usr/x86_64-w64-mingw32/include/dpapi.h:89:1: CRYPTPROTECT_AUDIT = 0x10 // /usr/x86_64-w64-mingw32/include/dpapi.h:36:1: CRYPTPROTECT_CRED_REGENERATE = 0x80 // /usr/x86_64-w64-mingw32/include/dpapi.h:39:1: CRYPTPROTECT_CRED_SYNC = 0x8 // /usr/x86_64-w64-mingw32/include/dpapi.h:35:1: CRYPTPROTECT_FIRST_RESERVED_FLAGVAL = 0x0fffffff // /usr/x86_64-w64-mingw32/include/dpapi.h:41:1: CRYPTPROTECT_LAST_RESERVED_FLAGVAL = 0xffffffff // /usr/x86_64-w64-mingw32/include/dpapi.h:42:1: CRYPTPROTECT_LOCAL_MACHINE = 0x4 // /usr/x86_64-w64-mingw32/include/dpapi.h:34:1: CRYPTPROTECT_NO_RECOVERY = 0x20 // /usr/x86_64-w64-mingw32/include/dpapi.h:37:1: CRYPTPROTECT_PROMPT_ON_PROTECT = 0x2 // /usr/x86_64-w64-mingw32/include/dpapi.h:28:1: CRYPTPROTECT_PROMPT_ON_UNPROTECT = 0x1 // /usr/x86_64-w64-mingw32/include/dpapi.h:27:1: CRYPTPROTECT_PROMPT_REQUIRE_STRONG = 0x10 // /usr/x86_64-w64-mingw32/include/dpapi.h:31:1: CRYPTPROTECT_PROMPT_RESERVED = 0x04 // /usr/x86_64-w64-mingw32/include/dpapi.h:29:1: CRYPTPROTECT_PROMPT_STRONG = 0x08 // /usr/x86_64-w64-mingw32/include/dpapi.h:30:1: CRYPTPROTECT_UI_FORBIDDEN = 0x1 // /usr/x86_64-w64-mingw32/include/dpapi.h:33:1: CRYPTPROTECT_VERIFY_PROTECTION = 0x40 // /usr/x86_64-w64-mingw32/include/dpapi.h:38:1: CRYPT_ACCUMULATIVE_TIMEOUT = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4859:1: CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4548:1: CRYPT_ACQUIRE_CACHE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4540:1: CRYPT_ACQUIRE_COMPARE_KEY_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4542:1: CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK = 0x70000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4547:1: CRYPT_ACQUIRE_NO_HEALING = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4543:1: CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4550:1: CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4549:1: CRYPT_ACQUIRE_SILENT_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4544:1: CRYPT_ACQUIRE_USE_PROV_INFO_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4541:1: CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4545:1: CRYPT_AIA_RETRIEVAL = 0x80000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4867:1: CRYPT_ALL_FUNCTIONS = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:366:1: CRYPT_ALL_PROVIDERS = 2 // /usr/x86_64-w64-mingw32/include/bcrypt.h:367:1: CRYPT_ANY = 4 // /usr/x86_64-w64-mingw32/include/bcrypt.h:356:1: CRYPT_ARCHIVABLE = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:313:1: CRYPT_ARCHIVE = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:436:1: CRYPT_ASN_ENCODING = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1433:1: CRYPT_ASYNC_RETRIEVAL = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4852:1: CRYPT_BLOB_VER3 = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:333:1: CRYPT_CACHE_ONLY_RETRIEVAL = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4849:1: CRYPT_CHECK_FRESHNESS_TIME_VALIDITY = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4858:1: CRYPT_CREATE_IV = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:307:1: CRYPT_CREATE_NEW_FLUSH_ENTRY = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4876:1: CRYPT_CREATE_SALT = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:299:1: CRYPT_DATA_KEY = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:309:1: CRYPT_DECODE_ALLOC_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1492:1: CRYPT_DECODE_ENABLE_IA5CONVERSION_FLAG = 100663296 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1496:1: CRYPT_DECODE_ENABLE_PUNYCODE_FLAG = 0x2000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1494:1: CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1495:1: CRYPT_DECODE_NOCOPY_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1488:1: CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1491:1: CRYPT_DECODE_SHARE_OID_STRING_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1490:1: CRYPT_DECODE_TO_BE_SIGNED_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1489:1: CRYPT_DECRYPT = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:428:1: CRYPT_DECRYPT_RSA_NO_PADDING_CHECK = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:330:1: CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4469:1: CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4472:1: CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4473:1: CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4470:1: CRYPT_DEFAULT_OID = "DEFAULT" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2727:1: CRYPT_DELETEKEYSET = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:290:1: CRYPT_DELETE_DEFAULT = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:350:1: CRYPT_DELETE_KEYSET = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4556:1: CRYPT_DESTROYKEY = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:328:1: CRYPT_DOMAIN = 2 // /usr/x86_64-w64-mingw32/include/bcrypt.h:361:1: CRYPT_DONT_CACHE_RESULT = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4851:1: CRYPT_DONT_CHECK_TIME_VALIDITY = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4857:1: CRYPT_DONT_VERIFY_SIGNATURE = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4856:1: CRYPT_ECC_CMS_SHARED_INFO_SUPPPUBINFO_BYTE_LENGTH = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2241:1: CRYPT_ECC_PRIVATE_KEY_INFO_v1 = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1251:1: CRYPT_ENABLE_FILE_RETRIEVAL = 0x08000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4875:1: CRYPT_ENABLE_SSL_REVOCATION_RETRIEVAL = 0x800000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4871:1: CRYPT_ENCODE_ALLOC_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1469:1: CRYPT_ENCODE_DECODE_NONE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1498:1: CRYPT_ENCODE_ENABLE_IA5CONVERSION_FLAG = 393216 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1477:1: CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1475:1: CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1476:1: CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1468:1: CRYPT_ENCRYPT = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:427:1: CRYPT_ENCRYPT_ALG_OID_GROUP_ID = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2790:1: CRYPT_ENHKEY_USAGE_OID_GROUP_ID = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2795:1: CRYPT_EXCLUSIVE = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:363:1: CRYPT_EXPORT = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:429:1: CRYPT_EXPORTABLE = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:297:1: CRYPT_EXPORT_KEY = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:433:1: CRYPT_EXT_OR_ATTR_OID_GROUP_ID = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2794:1: CRYPT_FAILED = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:446:1: CRYPT_FASTSGC = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:517:1: CRYPT_FIND_MACHINE_KEYSET_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4553:1: CRYPT_FIND_SILENT_KEYSET_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4554:1: CRYPT_FIND_USER_KEYSET_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4552:1: CRYPT_FIRST = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:495:1: CRYPT_FIRST_ALG_OID_GROUP_ID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2801:1: CRYPT_FLAG_IPSEC = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:513:1: CRYPT_FLAG_PCT1 = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:509:1: CRYPT_FLAG_SIGNING = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:514:1: CRYPT_FLAG_SSL2 = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:510:1: CRYPT_FLAG_SSL3 = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:511:1: CRYPT_FLAG_TLS1 = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:512:1: CRYPT_FORMAT_COMMA = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1452:1: CRYPT_FORMAT_CRLF = 512 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1454:1: CRYPT_FORMAT_OID = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1447:1: CRYPT_FORMAT_RDN_CRLF = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1449:1: CRYPT_FORMAT_RDN_REVERSE = 0x800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1451:1: CRYPT_FORMAT_RDN_SEMICOLON = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1448:1: CRYPT_FORMAT_RDN_UNQUOTE = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1450:1: CRYPT_FORMAT_SEMICOLON = 256 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1453:1: CRYPT_FORMAT_SIMPLE = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1445:1: CRYPT_FORMAT_STR_MULTI_LINE = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1442:1: CRYPT_FORMAT_STR_NO_HEX = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1443:1: CRYPT_FORMAT_X509 = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1446:1: CRYPT_GET_INSTALLED_OID_FUNC_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2735:1: CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4962:1: CRYPT_GET_URL_FROM_EXTENSION = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4960:1: CRYPT_GET_URL_FROM_PROPERTY = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4959:1: CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4961:1: CRYPT_HASH_ALG_OID_GROUP_ID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2789:1: CRYPT_HTTP_POST_RETRIEVAL = 0x100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4868:1: CRYPT_IMPL_HARDWARE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:499:1: CRYPT_IMPL_MIXED = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:501:1: CRYPT_IMPL_REMOVABLE = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:503:1: CRYPT_IMPL_SOFTWARE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:500:1: CRYPT_IMPL_UNKNOWN = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:502:1: CRYPT_IMPORT_KEY = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:434:1: CRYPT_INITIATOR = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:304:1: CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2734:1: CRYPT_INSTALL_OID_INFO_BEFORE_FLAG = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2835:1: CRYPT_IPSEC_HMAC_KEY = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:335:1: CRYPT_KDF_OID_GROUP_ID = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2798:1: CRYPT_KEEP_TIME_VALID = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4855:1: CRYPT_KEK = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:308:1: CRYPT_KEYID_ALLOC_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5037:1: CRYPT_KEYID_DELETE_FLAG = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5034:1: CRYPT_KEYID_MACHINE_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5035:1: CRYPT_KEYID_SET_NEW_FLAG = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5036:1: CRYPT_KM = 2 // /usr/x86_64-w64-mingw32/include/bcrypt.h:354:1: CRYPT_LAST_ALG_OID_GROUP_ID = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2802:1: CRYPT_LAST_OID_GROUP_ID = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2799:1: CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL = 0x40000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4866:1: CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4863:1: CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4861:1: CRYPT_LDAP_SIGN_RETRIEVAL = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4864:1: CRYPT_LITTLE_ENDIAN = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:342:1: CRYPT_LOCAL = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:360:1: CRYPT_LOCALIZED_NAME_ENCODING_TYPE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2844:1: CRYPT_LOCALIZED_NAME_OID = "LocalizedNames" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2845:1: CRYPT_MAC = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:432:1: CRYPT_MACHINE_DEFAULT = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:348:1: CRYPT_MACHINE_KEYSET = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:291:1: CRYPT_MATCH_ANY_ENCODING_TYPE = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:2757:1: CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4651:1: CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4652:1: CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4677:1: CRYPT_MESSAGE_KEYID_SIGNER_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4653:1: CRYPT_MESSAGE_SILENT_KEYSET_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4654:1: CRYPT_MIN_DEPENDENCIES = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:350:1: CRYPT_MM = 3 // /usr/x86_64-w64-mingw32/include/bcrypt.h:355:1: CRYPT_MODE_CBC = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:421:1: CRYPT_MODE_CBCI = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:143:1: CRYPT_MODE_CBCOFM = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:146:1: CRYPT_MODE_CBCOFMI = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:147:1: CRYPT_MODE_CFB = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:424:1: CRYPT_MODE_CFBP = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:144:1: CRYPT_MODE_CTS = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:425:1: CRYPT_MODE_ECB = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:422:1: CRYPT_MODE_OFB = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:423:1: CRYPT_MODE_OFBP = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:145:1: CRYPT_NDR_ENCODING = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1434:1: CRYPT_NEWKEYSET = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:289:1: CRYPT_NEXT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:496:1: CRYPT_NOHASHOID = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:344:1: CRYPT_NOT_MODIFIED_RETRIEVAL = 0x400000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4870:1: CRYPT_NO_AUTH_RETRIEVAL = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4865:1: CRYPT_NO_OCSP_FAILOVER_TO_CRL_RETRIEVAL = 0x2000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4873:1: CRYPT_NO_SALT = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:301:1: CRYPT_OAEP = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:332:1: CRYPT_OCSP_ONLY_RETRIEVAL = 0x1000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4872:1: CRYPT_OFFLINE_CHECK_RETRIEVAL = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4862:1: CRYPT_OID_CREATE_COM_OBJECT_FUNC = "CryptDllCreateCOMObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2712:1: CRYPT_OID_DECODE_OBJECT_EX_FUNC = "CryptDllDecodeObjectEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2711:1: CRYPT_OID_DECODE_OBJECT_FUNC = "CryptDllDecodeObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2709:1: CRYPT_OID_DISABLE_SEARCH_DS_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2826:1: CRYPT_OID_ENCODE_OBJECT_EX_FUNC = "CryptDllEncodeObjectEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2710:1: CRYPT_OID_ENCODE_OBJECT_FUNC = "CryptDllEncodeObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2708:1: CRYPT_OID_ENUM_PHYSICAL_STORE_FUNC = "CertDllEnumPhysicalStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4353:1: CRYPT_OID_ENUM_SYSTEM_STORE_FUNC = "CertDllEnumSystemStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4350:1: CRYPT_OID_EXPORT_PRIVATE_KEY_INFO_FUNC = "CryptDllExportPrivateKeyInfoEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4538:1: CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = "CryptDllExportPublicKeyInfoEx2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4524:1: CRYPT_OID_EXPORT_PUBLIC_KEY_INFO_FUNC = "CryptDllExportPublicKeyInfoEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4523:1: CRYPT_OID_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = "CryptDllExtractEncodedSignatureParameters" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4465:1: CRYPT_OID_FIND_LOCALIZED_NAME_FUNC = "CryptDllFindLocalizedName" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2717:1: CRYPT_OID_FIND_OID_INFO_FUNC = "CryptDllFindOIDInfo" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2716:1: CRYPT_OID_FORMAT_OBJECT_FUNC = "CryptDllFormatObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2715:1: CRYPT_OID_IMPORT_PRIVATE_KEY_INFO_FUNC = "CryptDllImportPrivateKeyInfoEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4537:1: CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_FUNC = "CryptDllImportPublicKeyInfoEx" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4536:1: CRYPT_OID_INFO_ALGID_KEY = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2817:1: CRYPT_OID_INFO_CNG_ALGID_KEY = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2819:1: CRYPT_OID_INFO_CNG_SIGN_KEY = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2820:1: CRYPT_OID_INFO_NAME_KEY = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2816:1: CRYPT_OID_INFO_OID_GROUP_BIT_LEN_MASK = 0x0fff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2832:1: CRYPT_OID_INFO_OID_GROUP_BIT_LEN_SHIFT = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2833:1: CRYPT_OID_INFO_OID_KEY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2815:1: CRYPT_OID_INFO_OID_KEY_FLAGS_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2822:1: CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2824:1: CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2823:1: CRYPT_OID_INFO_SIGN_KEY = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2818:1: CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2804:1: CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2806:1: CRYPT_OID_OPEN_STORE_PROV_FUNC = "CertDllOpenStoreProv" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3970:1: CRYPT_OID_OPEN_SYSTEM_STORE_PROV_FUNC = "CertDllOpenSystemStoreProv" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4347:1: CRYPT_OID_PUBKEY_ENCRYPT_ONLY_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2808:1: CRYPT_OID_PUBKEY_SIGN_ONLY_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2809:1: CRYPT_OID_REGISTER_PHYSICAL_STORE_FUNC = "CertDllRegisterPhysicalStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4351:1: CRYPT_OID_REGISTER_SYSTEM_STORE_FUNC = "CertDllRegisterSystemStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4348:1: CRYPT_OID_REGPATH = "Software\\Microsoft\\Cryptography\\OID" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2719:1: CRYPT_OID_REG_ENCODING_TYPE_PREFIX = "EncodingType " // /usr/x86_64-w64-mingw32/include/wincrypt.h:2720:1: CRYPT_OID_REG_FUNC_NAME_VALUE_NAME_A = "FuncName" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2723:1: CRYPT_OID_SIGN_AND_ENCODE_HASH_FUNC = "CryptDllSignAndEncodeHash" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4466:1: CRYPT_OID_UNREGISTER_PHYSICAL_STORE_FUNC = "CertDllUnregisterPhysicalStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4352:1: CRYPT_OID_UNREGISTER_SYSTEM_STORE_FUNC = "CertDllUnregisterSystemStore" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4349:1: CRYPT_OID_USE_CURVE_NAME_FOR_ENCODE_FLAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2810:1: CRYPT_OID_USE_CURVE_PARAMETERS_FOR_ENCODE_FLAG = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2811:1: CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2805:1: CRYPT_OID_VERIFY_CERTIFICATE_CHAIN_POLICY_FUNC = "CertDllVerifyCertificateChainPolicy" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5525:1: CRYPT_OID_VERIFY_CTL_USAGE_FUNC = "CertDllVerifyCTLUsage" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2714:1: CRYPT_OID_VERIFY_ENCODED_SIGNATURE_FUNC = "CryptDllVerifyEncodedSignature" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4467:1: CRYPT_OID_VERIFY_REVOCATION_FUNC = "CertDllVerifyRevocation" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2713:1: CRYPT_ONLINE = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:305:1: CRYPT_OVERRIDE = 65536 // /usr/x86_64-w64-mingw32/include/bcrypt.h:364:1: CRYPT_OVERWRITE = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:358:1: CRYPT_OWF_REPL_LM_HASH = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:340:1: CRYPT_POLICY_OID_GROUP_ID = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2796:1: CRYPT_PREGEN = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:302:1: CRYPT_PRIORITY_BOTTOM = 4294967295 // /usr/x86_64-w64-mingw32/include/bcrypt.h:370:1: CRYPT_PRIORITY_TOP = 0 // /usr/x86_64-w64-mingw32/include/bcrypt.h:369:1: CRYPT_PROCESS_ISOLATE = 65536 // /usr/x86_64-w64-mingw32/include/bcrypt.h:351:1: CRYPT_PROXY_CACHE_RETRIEVAL = 0x200000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4869:1: CRYPT_PSTORE = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:506:1: CRYPT_PUBKEY_ALG_OID_GROUP_ID = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2791:1: CRYPT_RANDOM_QUERY_STRING_RETRIEVAL = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4874:1: CRYPT_RC2_128BIT_VERSION = 58 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2258:1: CRYPT_RC2_40BIT_VERSION = 160 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2255:1: CRYPT_RC2_56BIT_VERSION = 52 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2256:1: CRYPT_RC2_64BIT_VERSION = 120 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2257:1: CRYPT_RDN_ATTR_OID_GROUP_ID = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2793:1: CRYPT_READ = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:430:1: CRYPT_RECIPIENT = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:303:1: CRYPT_REGISTER_FIRST_INDEX = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2737:1: CRYPT_REGISTER_LAST_INDEX = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:2738:1: CRYPT_RETRIEVE_MAX_ERROR_CONTENT_LENGTH = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4933:1: CRYPT_RETRIEVE_MULTIPLE_OBJECTS = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4848:1: CRYPT_SECRETDIGEST = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:338:1: CRYPT_SEC_DESCR = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:505:1: CRYPT_SERVER = 0x400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:322:1: CRYPT_SF = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:306:1: CRYPT_SGC = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:516:1: CRYPT_SGCKEY = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:311:1: CRYPT_SGC_ENUM = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:497:1: CRYPT_SIGN_ALG_OID_GROUP_ID = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2792:1: CRYPT_SILENT = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:292:1: CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1474:1: CRYPT_SSL2_FALLBACK = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:327:1: CRYPT_STICKY_CACHE_RETRIEVAL = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4860:1: CRYPT_STRING_ANY = 0x00000007 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5649:1: CRYPT_STRING_BASE64 = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5643:1: CRYPT_STRING_BASE64HEADER = 0x0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5642:1: CRYPT_STRING_BASE64REQUESTHEADER = 0x00000003 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5645:1: CRYPT_STRING_BASE64URI = 0x0000000d // /usr/x86_64-w64-mingw32/include/wincrypt.h:5655:1: CRYPT_STRING_BASE64X509CRLHEADER = 0x00000009 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5651:1: CRYPT_STRING_BASE64_ANY = 0x00000006 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5648:1: CRYPT_STRING_BINARY = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5644:1: CRYPT_STRING_ENCODEMASK = 0x000000ff // /usr/x86_64-w64-mingw32/include/wincrypt.h:5657:1: CRYPT_STRING_HASHDATA = 0x10000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5662:1: CRYPT_STRING_HEX = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5646:1: CRYPT_STRING_HEXADDR = 0x0000000a // /usr/x86_64-w64-mingw32/include/wincrypt.h:5652:1: CRYPT_STRING_HEXASCII = 0x00000005 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5647:1: CRYPT_STRING_HEXASCIIADDR = 0x0000000b // /usr/x86_64-w64-mingw32/include/wincrypt.h:5653:1: CRYPT_STRING_HEXRAW = 0x0000000c // /usr/x86_64-w64-mingw32/include/wincrypt.h:5654:1: CRYPT_STRING_HEX_ANY = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5650:1: CRYPT_STRING_NOCR = 0x80000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5665:1: CRYPT_STRING_NOCRLF = 0x40000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5664:1: CRYPT_STRING_PERCENTESCAPE = 0x08000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5661:1: CRYPT_STRING_RESERVED100 = 0x00000100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5658:1: CRYPT_STRING_RESERVED200 = 0x00000200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5659:1: CRYPT_STRING_STRICT = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5663:1: CRYPT_SUCCEED = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:447:1: CRYPT_TEMPLATE_OID_GROUP_ID = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2797:1: CRYPT_TYPE2_FORMAT = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:345:1: CRYPT_UI_PROMPT = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:507:1: CRYPT_UM = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:353:1: CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG = 16777216 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1493:1: CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG = 1073741824 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1473:1: CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG = 2147483648 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1470:1: CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG = 536870912 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1471:1: CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG = 268435456 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1472:1: CRYPT_UPDATE_KEY = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:300:1: CRYPT_USERDATA = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:366:1: CRYPT_USER_DEFAULT = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:349:1: CRYPT_USER_KEYSET = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5691:1: CRYPT_USER_PROTECTED = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:298:1: CRYPT_USER_PROTECTED_STRONG = 0x100000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:318:1: CRYPT_VERIFYCONTEXT = 0xf0000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:288:1: CRYPT_VERIFY_CERT_SIGN_DISABLE_MD2_MD4_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4461:1: CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4457:1: CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4458:1: CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4459:1: CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4456:1: CRYPT_VERIFY_CERT_SIGN_RETURN_STRONG_PROPERTIES_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4463:1: CRYPT_VERIFY_CERT_SIGN_SET_STRONG_PROPERTIES_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4462:1: CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4451:1: CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4452:1: CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4453:1: CRYPT_VERIFY_CERT_SIGN_SUBJECT_OCSP_BASIC_SIGNED_RESPONSE = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4454:1: CRYPT_VERIFY_CONTEXT_SIGNATURE = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4853:1: CRYPT_VERIFY_DATA_HASH = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4854:1: CRYPT_VOLATILE = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:310:1: CRYPT_WIRE_ONLY_RETRIEVAL = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4850:1: CRYPT_WRITE = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:431:1: CRYPT_X931_FORMAT = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:346:1: CRYPT_X942_COUNTER_BYTE_LENGTH = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2230:1: CRYPT_X942_KEY_LENGTH_BYTE_LENGTH = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2231:1: CRYPT_X942_PUB_INFO_BYTE_LENGTH = 64 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2232:1: CRYPT_Y_ONLY = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:326:1: CSOUND_SYSTEM = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:6052:1: CSTR_EQUAL = 2 // /usr/x86_64-w64-mingw32/include/winnls.h:174:1: CSTR_GREATER_THAN = 3 // /usr/x86_64-w64-mingw32/include/winnls.h:175:1: CSTR_LESS_THAN = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:173:1: CS_BYTEALIGNCLIENT = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:1648:1: CS_BYTEALIGNWINDOW = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:1649:1: CS_CLASSDC = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:1644:1: CS_DBLCLKS = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1642:1: CS_DELETE_TRANSFORM = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:493:1: CS_DISABLE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:492:1: CS_DROPSHADOW = 0x00020000 // /usr/x86_64-w64-mingw32/include/winuser.h:1652:1: CS_ENABLE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:491:1: CS_E_FIRST = 2147746148 // /usr/x86_64-w64-mingw32/include/winerror.h:2389:1: CS_E_LAST = 2147746159 // /usr/x86_64-w64-mingw32/include/winerror.h:2390:1: CS_GLOBALCLASS = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:1650:1: CS_HREDRAW = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1641:1: CS_IME = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:1651:1: CS_INSERTCHAR = 0x2000 // /usr/x86_64-w64-mingw32/include/imm.h:308:1: CS_NOCLOSE = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1646:1: CS_NOMOVECARET = 0x4000 // /usr/x86_64-w64-mingw32/include/imm.h:309:1: CS_OWNDC = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1643:1: CS_PARENTDC = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:1645:1: CS_SAVEBITS = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:1647:1: CS_VREDRAW = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1640:1: CTLCOLOR_BTN = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3801:1: CTLCOLOR_DLG = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3802:1: CTLCOLOR_EDIT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3799:1: CTLCOLOR_LISTBOX = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3800:1: CTLCOLOR_MAX = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:3805:1: CTLCOLOR_MSGBOX = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3798:1: CTLCOLOR_SCROLLBAR = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:3803:1: CTLCOLOR_STATIC = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3804:1: CTL_ANY_SUBJECT_TYPE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4195:1: CTL_CERT_SUBJECT_TYPE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4196:1: CTL_ENTRY_FROM_PROP_CHAIN_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4165:1: CTL_FIND_ANY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4237:1: CTL_FIND_EXISTING = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4242:1: CTL_FIND_MD5_HASH = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4239:1: CTL_FIND_NO_LIST_ID_CBDATA = 0xffffffff // /usr/x86_64-w64-mingw32/include/wincrypt.h:4246:1: CTL_FIND_SAME_USAGE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4244:1: CTL_FIND_SHA1_HASH = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4238:1: CTL_FIND_SUBJECT = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4241:1: CTL_FIND_USAGE = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:4240:1: CTL_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1407:1: CTRL_BREAK_EVENT = 1 // /usr/x86_64-w64-mingw32/include/wincon.h:170:1: CTRL_CLOSE_EVENT = 2 // /usr/x86_64-w64-mingw32/include/wincon.h:171:1: CTRL_C_EVENT = 0 // /usr/x86_64-w64-mingw32/include/wincon.h:169:1: CTRL_LOGOFF_EVENT = 5 // /usr/x86_64-w64-mingw32/include/wincon.h:173:1: CTRL_SHUTDOWN_EVENT = 6 // /usr/x86_64-w64-mingw32/include/wincon.h:174:1: CTRY_ALBANIA = 355 // /usr/x86_64-w64-mingw32/include/winnls.h:188:1: CTRY_ALGERIA = 213 // /usr/x86_64-w64-mingw32/include/winnls.h:189:1: CTRY_ARGENTINA = 54 // /usr/x86_64-w64-mingw32/include/winnls.h:190:1: CTRY_ARMENIA = 374 // /usr/x86_64-w64-mingw32/include/winnls.h:191:1: CTRY_AUSTRALIA = 61 // /usr/x86_64-w64-mingw32/include/winnls.h:192:1: CTRY_AUSTRIA = 43 // /usr/x86_64-w64-mingw32/include/winnls.h:193:1: CTRY_AZERBAIJAN = 994 // /usr/x86_64-w64-mingw32/include/winnls.h:194:1: CTRY_BAHRAIN = 973 // /usr/x86_64-w64-mingw32/include/winnls.h:195:1: CTRY_BELARUS = 375 // /usr/x86_64-w64-mingw32/include/winnls.h:196:1: CTRY_BELGIUM = 32 // /usr/x86_64-w64-mingw32/include/winnls.h:197:1: CTRY_BELIZE = 501 // /usr/x86_64-w64-mingw32/include/winnls.h:198:1: CTRY_BOLIVIA = 591 // /usr/x86_64-w64-mingw32/include/winnls.h:199:1: CTRY_BRAZIL = 55 // /usr/x86_64-w64-mingw32/include/winnls.h:200:1: CTRY_BRUNEI_DARUSSALAM = 673 // /usr/x86_64-w64-mingw32/include/winnls.h:201:1: CTRY_BULGARIA = 359 // /usr/x86_64-w64-mingw32/include/winnls.h:202:1: CTRY_CANADA = 2 // /usr/x86_64-w64-mingw32/include/winnls.h:203:1: CTRY_CARIBBEAN = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:204:1: CTRY_CHILE = 56 // /usr/x86_64-w64-mingw32/include/winnls.h:205:1: CTRY_COLOMBIA = 57 // /usr/x86_64-w64-mingw32/include/winnls.h:206:1: CTRY_COSTA_RICA = 506 // /usr/x86_64-w64-mingw32/include/winnls.h:207:1: CTRY_CROATIA = 385 // /usr/x86_64-w64-mingw32/include/winnls.h:208:1: CTRY_CZECH = 420 // /usr/x86_64-w64-mingw32/include/winnls.h:209:1: CTRY_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/winnls.h:186:1: CTRY_DENMARK = 45 // /usr/x86_64-w64-mingw32/include/winnls.h:210:1: CTRY_DOMINICAN_REPUBLIC = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:211:1: CTRY_ECUADOR = 593 // /usr/x86_64-w64-mingw32/include/winnls.h:212:1: CTRY_EGYPT = 20 // /usr/x86_64-w64-mingw32/include/winnls.h:213:1: CTRY_EL_SALVADOR = 503 // /usr/x86_64-w64-mingw32/include/winnls.h:214:1: CTRY_ESTONIA = 372 // /usr/x86_64-w64-mingw32/include/winnls.h:215:1: CTRY_FAEROE_ISLANDS = 298 // /usr/x86_64-w64-mingw32/include/winnls.h:216:1: CTRY_FINLAND = 358 // /usr/x86_64-w64-mingw32/include/winnls.h:217:1: CTRY_FRANCE = 33 // /usr/x86_64-w64-mingw32/include/winnls.h:218:1: CTRY_GEORGIA = 995 // /usr/x86_64-w64-mingw32/include/winnls.h:219:1: CTRY_GERMANY = 49 // /usr/x86_64-w64-mingw32/include/winnls.h:220:1: CTRY_GREECE = 30 // /usr/x86_64-w64-mingw32/include/winnls.h:221:1: CTRY_GUATEMALA = 502 // /usr/x86_64-w64-mingw32/include/winnls.h:222:1: CTRY_HONDURAS = 504 // /usr/x86_64-w64-mingw32/include/winnls.h:223:1: CTRY_HONG_KONG = 852 // /usr/x86_64-w64-mingw32/include/winnls.h:224:1: CTRY_HUNGARY = 36 // /usr/x86_64-w64-mingw32/include/winnls.h:225:1: CTRY_ICELAND = 354 // /usr/x86_64-w64-mingw32/include/winnls.h:226:1: CTRY_INDIA = 91 // /usr/x86_64-w64-mingw32/include/winnls.h:227:1: CTRY_INDONESIA = 62 // /usr/x86_64-w64-mingw32/include/winnls.h:228:1: CTRY_IRAN = 981 // /usr/x86_64-w64-mingw32/include/winnls.h:229:1: CTRY_IRAQ = 964 // /usr/x86_64-w64-mingw32/include/winnls.h:230:1: CTRY_IRELAND = 353 // /usr/x86_64-w64-mingw32/include/winnls.h:231:1: CTRY_ISRAEL = 972 // /usr/x86_64-w64-mingw32/include/winnls.h:232:1: CTRY_ITALY = 39 // /usr/x86_64-w64-mingw32/include/winnls.h:233:1: CTRY_JAMAICA = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:234:1: CTRY_JAPAN = 81 // /usr/x86_64-w64-mingw32/include/winnls.h:235:1: CTRY_JORDAN = 962 // /usr/x86_64-w64-mingw32/include/winnls.h:236:1: CTRY_KAZAKSTAN = 7 // /usr/x86_64-w64-mingw32/include/winnls.h:237:1: CTRY_KENYA = 254 // /usr/x86_64-w64-mingw32/include/winnls.h:238:1: CTRY_KUWAIT = 965 // /usr/x86_64-w64-mingw32/include/winnls.h:239:1: CTRY_KYRGYZSTAN = 996 // /usr/x86_64-w64-mingw32/include/winnls.h:240:1: CTRY_LATVIA = 371 // /usr/x86_64-w64-mingw32/include/winnls.h:241:1: CTRY_LEBANON = 961 // /usr/x86_64-w64-mingw32/include/winnls.h:242:1: CTRY_LIBYA = 218 // /usr/x86_64-w64-mingw32/include/winnls.h:243:1: CTRY_LIECHTENSTEIN = 41 // /usr/x86_64-w64-mingw32/include/winnls.h:244:1: CTRY_LITHUANIA = 370 // /usr/x86_64-w64-mingw32/include/winnls.h:245:1: CTRY_LUXEMBOURG = 352 // /usr/x86_64-w64-mingw32/include/winnls.h:246:1: CTRY_MACAU = 853 // /usr/x86_64-w64-mingw32/include/winnls.h:247:1: CTRY_MACEDONIA = 389 // /usr/x86_64-w64-mingw32/include/winnls.h:248:1: CTRY_MALAYSIA = 60 // /usr/x86_64-w64-mingw32/include/winnls.h:249:1: CTRY_MALDIVES = 960 // /usr/x86_64-w64-mingw32/include/winnls.h:250:1: CTRY_MEXICO = 52 // /usr/x86_64-w64-mingw32/include/winnls.h:251:1: CTRY_MONACO = 33 // /usr/x86_64-w64-mingw32/include/winnls.h:252:1: CTRY_MONGOLIA = 976 // /usr/x86_64-w64-mingw32/include/winnls.h:253:1: CTRY_MOROCCO = 212 // /usr/x86_64-w64-mingw32/include/winnls.h:254:1: CTRY_NETHERLANDS = 31 // /usr/x86_64-w64-mingw32/include/winnls.h:255:1: CTRY_NEW_ZEALAND = 64 // /usr/x86_64-w64-mingw32/include/winnls.h:256:1: CTRY_NICARAGUA = 505 // /usr/x86_64-w64-mingw32/include/winnls.h:257:1: CTRY_NORWAY = 47 // /usr/x86_64-w64-mingw32/include/winnls.h:258:1: CTRY_OMAN = 968 // /usr/x86_64-w64-mingw32/include/winnls.h:259:1: CTRY_PAKISTAN = 92 // /usr/x86_64-w64-mingw32/include/winnls.h:260:1: CTRY_PANAMA = 507 // /usr/x86_64-w64-mingw32/include/winnls.h:261:1: CTRY_PARAGUAY = 595 // /usr/x86_64-w64-mingw32/include/winnls.h:262:1: CTRY_PERU = 51 // /usr/x86_64-w64-mingw32/include/winnls.h:263:1: CTRY_PHILIPPINES = 63 // /usr/x86_64-w64-mingw32/include/winnls.h:264:1: CTRY_POLAND = 48 // /usr/x86_64-w64-mingw32/include/winnls.h:265:1: CTRY_PORTUGAL = 351 // /usr/x86_64-w64-mingw32/include/winnls.h:266:1: CTRY_PRCHINA = 86 // /usr/x86_64-w64-mingw32/include/winnls.h:267:1: CTRY_PUERTO_RICO = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:268:1: CTRY_QATAR = 974 // /usr/x86_64-w64-mingw32/include/winnls.h:269:1: CTRY_ROMANIA = 40 // /usr/x86_64-w64-mingw32/include/winnls.h:270:1: CTRY_RUSSIA = 7 // /usr/x86_64-w64-mingw32/include/winnls.h:271:1: CTRY_SAUDI_ARABIA = 966 // /usr/x86_64-w64-mingw32/include/winnls.h:272:1: CTRY_SERBIA = 381 // /usr/x86_64-w64-mingw32/include/winnls.h:273:1: CTRY_SINGAPORE = 65 // /usr/x86_64-w64-mingw32/include/winnls.h:274:1: CTRY_SLOVAK = 421 // /usr/x86_64-w64-mingw32/include/winnls.h:275:1: CTRY_SLOVENIA = 386 // /usr/x86_64-w64-mingw32/include/winnls.h:276:1: CTRY_SOUTH_AFRICA = 27 // /usr/x86_64-w64-mingw32/include/winnls.h:277:1: CTRY_SOUTH_KOREA = 82 // /usr/x86_64-w64-mingw32/include/winnls.h:278:1: CTRY_SPAIN = 34 // /usr/x86_64-w64-mingw32/include/winnls.h:279:1: CTRY_SWEDEN = 46 // /usr/x86_64-w64-mingw32/include/winnls.h:280:1: CTRY_SWITZERLAND = 41 // /usr/x86_64-w64-mingw32/include/winnls.h:281:1: CTRY_SYRIA = 963 // /usr/x86_64-w64-mingw32/include/winnls.h:282:1: CTRY_TAIWAN = 886 // /usr/x86_64-w64-mingw32/include/winnls.h:283:1: CTRY_TATARSTAN = 7 // /usr/x86_64-w64-mingw32/include/winnls.h:284:1: CTRY_THAILAND = 66 // /usr/x86_64-w64-mingw32/include/winnls.h:285:1: CTRY_TRINIDAD_Y_TOBAGO = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:286:1: CTRY_TUNISIA = 216 // /usr/x86_64-w64-mingw32/include/winnls.h:287:1: CTRY_TURKEY = 90 // /usr/x86_64-w64-mingw32/include/winnls.h:288:1: CTRY_UAE = 971 // /usr/x86_64-w64-mingw32/include/winnls.h:289:1: CTRY_UKRAINE = 380 // /usr/x86_64-w64-mingw32/include/winnls.h:290:1: CTRY_UNITED_KINGDOM = 44 // /usr/x86_64-w64-mingw32/include/winnls.h:291:1: CTRY_UNITED_STATES = 1 // /usr/x86_64-w64-mingw32/include/winnls.h:292:1: CTRY_URUGUAY = 598 // /usr/x86_64-w64-mingw32/include/winnls.h:293:1: CTRY_UZBEKISTAN = 7 // /usr/x86_64-w64-mingw32/include/winnls.h:294:1: CTRY_VENEZUELA = 58 // /usr/x86_64-w64-mingw32/include/winnls.h:295:1: CTRY_VIET_NAM = 84 // /usr/x86_64-w64-mingw32/include/winnls.h:296:1: CTRY_YEMEN = 967 // /usr/x86_64-w64-mingw32/include/winnls.h:297:1: CTRY_ZIMBABWE = 263 // /usr/x86_64-w64-mingw32/include/winnls.h:298:1: CT_CTYPE1 = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:51:1: CT_CTYPE2 = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:52:1: CT_CTYPE3 = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:53:1: CURRENT_IMPORT_REDIRECTION_VERSION = 1 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:156:1: CURSOR_FAULT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65728:1: CURSOR_INVALID = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65725:1: CURSOR_REQUIRESEEK = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65727:1: CURSOR_SHOWING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:6174:1: CURSOR_SKIPNEXT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65726:1: CURSOR_VALID = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65724:1: CURTYPE_BTREE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22089:1: CURTYPE_PSEUDO = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22092:1: CURTYPE_SORTER = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22090:1: CURTYPE_VTAB = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22091:1: CURVECAPS = 28 // /usr/x86_64-w64-mingw32/include/wingdi.h:1525:1: CUR_BLOB_VERSION = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:625:1: CWCSTORAGENAME = 32 // /usr/x86_64-w64-mingw32/include/objbase.h:24:1: CWF_CREATE_ONLY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:828:1: CWMO_MAX_HANDLES = 56 // /usr/x86_64-w64-mingw32/include/combaseapi.h:349:1: CWP_ALL = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:3791:1: CWP_SKIPDISABLED = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3793:1: CWP_SKIPINVISIBLE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3792:1: CWP_SKIPTRANSPARENT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:3794:1: DACL_SECURITY_INFORMATION = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4012:1: DATA_E_FIRST = 2147746096 // /usr/x86_64-w64-mingw32/include/winerror.h:2365:1: DATA_E_LAST = 2147746111 // /usr/x86_64-w64-mingw32/include/winerror.h:2366:1: DATA_S_FIRST = 262448 // /usr/x86_64-w64-mingw32/include/winerror.h:2367:1: DATA_S_LAST = 262463 // /usr/x86_64-w64-mingw32/include/winerror.h:2368:1: DATE_LONGDATE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:494:1: DATE_LTRREADING = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:498:1: DATE_RTLREADING = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:499:1: DATE_SHORTDATE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:493:1: DATE_USE_ALT_CALENDAR = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:495:1: DATE_YEARMONTH = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:497:1: DBFLAG_EncodingFixed = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17005:1: DBFLAG_InternalFunc = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17004:1: DBFLAG_PreferBuiltin = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17000:1: DBFLAG_SchemaChange = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16999:1: DBFLAG_SchemaKnownOk = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17003:1: DBFLAG_Vacuum = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17001:1: DBFLAG_VacuumInto = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17002:1: DB_ResetWanted = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16625:1: DB_SchemaLoaded = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16623:1: DB_UnresetViews = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16624:1: DCBA_FACEDOWNCENTER = 0x0101 // /usr/x86_64-w64-mingw32/include/wingdi.h:2896:1: DCBA_FACEDOWNLEFT = 0x0102 // /usr/x86_64-w64-mingw32/include/wingdi.h:2897:1: DCBA_FACEDOWNNONE = 0x0100 // /usr/x86_64-w64-mingw32/include/wingdi.h:2895:1: DCBA_FACEDOWNRIGHT = 0x0103 // /usr/x86_64-w64-mingw32/include/wingdi.h:2898:1: DCBA_FACEUPCENTER = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2892:1: DCBA_FACEUPLEFT = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2893:1: DCBA_FACEUPNONE = 0x0000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2891:1: DCBA_FACEUPRIGHT = 0x0003 // /usr/x86_64-w64-mingw32/include/wingdi.h:2894:1: DCB_ACCUMULATE = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:145:1: DCB_DIRTY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:146:1: DCB_DISABLE = 0x0008 // /usr/x86_64-w64-mingw32/include/wingdi.h:149:1: DCB_ENABLE = 0x0004 // /usr/x86_64-w64-mingw32/include/wingdi.h:148:1: DCB_RESET = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:144:1: DCB_SET = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:147:1: DCE_C_ERROR_STRING_LEN = 256 // /usr/x86_64-w64-mingw32/include/rpcdce.h:499:1: DCOMSCM_ACTIVATION_DISALLOW_UNSECURE_CALL = 0x2 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:262:1: DCOMSCM_ACTIVATION_USE_ALL_AUTHNSERVICES = 0x1 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:261:1: DCOMSCM_PING_DISALLOW_UNSECURE_CALL = 0x20 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:266:1: DCOMSCM_PING_USE_MID_AUTHNSERVICE = 0x10 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:265:1: DCOMSCM_RESOLVE_DISALLOW_UNSECURE_CALL = 0x8 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:264:1: DCOMSCM_RESOLVE_USE_ALL_AUTHNSERVICES = 0x4 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:263:1: DCTT_BITMAP = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2886:1: DCTT_DOWNLOAD = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2887:1: DCTT_DOWNLOAD_OUTLINE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2889:1: DCTT_SUBDEV = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2888:1: DCX_CACHE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3530:1: DCX_CLIPCHILDREN = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:3532:1: DCX_CLIPSIBLINGS = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3533:1: DCX_EXCLUDERGN = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:3535:1: DCX_EXCLUDEUPDATE = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:3537:1: DCX_INTERSECTRGN = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:3536:1: DCX_INTERSECTUPDATE = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:3538:1: DCX_LOCKWINDOWUPDATE = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:3539:1: DCX_NORESETATTRS = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3531:1: DCX_PARENTCLIP = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:3534:1: DCX_VALIDATE = 2097152 // /usr/x86_64-w64-mingw32/include/winuser.h:3541:1: DCX_WINDOW = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3529:1: DC_ACTIVE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1751:1: DC_BINADJUST = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:2864:1: DC_BINNAMES = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:2857:1: DC_BINS = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:2851:1: DC_BRUSH = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:1456:1: DC_BUTTONS = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:1757:1: DC_COLLATE = 22 // /usr/x86_64-w64-mingw32/include/wingdi.h:2867:1: DC_COLORDEVICE = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:2881:1: DC_COPIES = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:2863:1: DC_DATATYPE_PRODUCED = 21 // /usr/x86_64-w64-mingw32/include/wingdi.h:2866:1: DC_DRIVER = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:2856:1: DC_DUPLEX = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:2852:1: DC_EMF_COMPLIANT = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:2865:1: DC_ENUMRESOLUTIONS = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:2858:1: DC_EXTRA = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:2854:1: DC_FIELDS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2846:1: DC_FILEDEPENDENCIES = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:2859:1: DC_GRADIENT = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1756:1: DC_HASDEFID = 0x534B // /usr/x86_64-w64-mingw32/include/winuser.h:4658:1: DC_ICON = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1753:1: DC_INBUTTON = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1755:1: DC_MANUFACTURER = 23 // /usr/x86_64-w64-mingw32/include/wingdi.h:2868:1: DC_MAXEXTENT = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:2850:1: DC_MEDIAREADY = 29 // /usr/x86_64-w64-mingw32/include/wingdi.h:2878:1: DC_MEDIATYPENAMES = 34 // /usr/x86_64-w64-mingw32/include/wingdi.h:2883:1: DC_MEDIATYPES = 35 // /usr/x86_64-w64-mingw32/include/wingdi.h:2884:1: DC_MINEXTENT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2849:1: DC_MODEL = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:2869:1: DC_NUP = 33 // /usr/x86_64-w64-mingw32/include/wingdi.h:2882:1: DC_ORIENTATION = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:2862:1: DC_PAPERNAMES = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:2861:1: DC_PAPERS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2847:1: DC_PAPERSIZE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2848:1: DC_PEN = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:1457:1: DC_PERSONALITY = 25 // /usr/x86_64-w64-mingw32/include/wingdi.h:2870:1: DC_PRINTERMEM = 28 // /usr/x86_64-w64-mingw32/include/wingdi.h:2877:1: DC_PRINTRATE = 26 // /usr/x86_64-w64-mingw32/include/wingdi.h:2871:1: DC_PRINTRATEPPM = 31 // /usr/x86_64-w64-mingw32/include/wingdi.h:2880:1: DC_PRINTRATEUNIT = 27 // /usr/x86_64-w64-mingw32/include/wingdi.h:2872:1: DC_SIZE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2853:1: DC_SMALLCAP = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1752:1: DC_STAPLE = 30 // /usr/x86_64-w64-mingw32/include/wingdi.h:2879:1: DC_TEXT = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1754:1: DC_TRUETYPE = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:2860:1: DC_VERSION = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:2855:1: DDD_EXACT_MATCH_ON_REMOVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winbase.h:1954:1: DDD_LUID_BROADCAST_DRIVE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winbase.h:1956:1: DDD_NO_BROADCAST_SYSTEM = 0x00000008 // /usr/x86_64-w64-mingw32/include/winbase.h:1955:1: DDD_RAW_TARGET_PATH = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:1952:1: DDD_REMOVE_DEFINITION = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:1953:1: DDE_FACK = 0x8000 // /usr/x86_64-w64-mingw32/include/ddeml.h:85:1: DDE_FACKREQ = 0x8000 // /usr/x86_64-w64-mingw32/include/ddeml.h:88:1: DDE_FACKRESERVED = -49408 // /usr/x86_64-w64-mingw32/include/ddeml.h:94:1: DDE_FADVRESERVED = -49153 // /usr/x86_64-w64-mingw32/include/ddeml.h:95:1: DDE_FAPPSTATUS = 0x00ff // /usr/x86_64-w64-mingw32/include/ddeml.h:91:1: DDE_FBUSY = 0x4000 // /usr/x86_64-w64-mingw32/include/ddeml.h:86:1: DDE_FDATRESERVED = -45057 // /usr/x86_64-w64-mingw32/include/ddeml.h:96:1: DDE_FDEFERUPD = 0x4000 // /usr/x86_64-w64-mingw32/include/ddeml.h:87:1: DDE_FNOTPROCESSED = 0x0000 // /usr/x86_64-w64-mingw32/include/ddeml.h:92:1: DDE_FPOKRESERVED = -8193 // /usr/x86_64-w64-mingw32/include/ddeml.h:97:1: DDE_FRELEASE = 0x2000 // /usr/x86_64-w64-mingw32/include/ddeml.h:89:1: DDE_FREQUESTED = 0x1000 // /usr/x86_64-w64-mingw32/include/ddeml.h:90:1: DDL_ARCHIVE = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:4602:1: DDL_DIRECTORY = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:4601:1: DDL_DRIVES = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:4605:1: DDL_EXCLUSIVE = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:4606:1: DDL_HIDDEN = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4599:1: DDL_POSTMSGS = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:4604:1: DDL_READONLY = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4598:1: DDL_READWRITE = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:4597:1: DDL_SYSTEM = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4600:1: DD_DEFDRAGDELAY = 200 // /usr/x86_64-w64-mingw32/include/oleidl.h:3500:1: DD_DEFDRAGMINDIST = 2 // /usr/x86_64-w64-mingw32/include/oleidl.h:3503:1: DD_DEFSCROLLDELAY = 50 // /usr/x86_64-w64-mingw32/include/oleidl.h:3494:1: DD_DEFSCROLLINSET = 11 // /usr/x86_64-w64-mingw32/include/oleidl.h:3491:1: DD_DEFSCROLLINTERVAL = 50 // /usr/x86_64-w64-mingw32/include/oleidl.h:3497:1: DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2691:1: DEBUG_ONLY_THIS_PROCESS = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:378:1: DEBUG_PROCESS = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:377:1: DECLSPEC_ADDRSAFE = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:330:1: DECLSPEC_DEPRECATED_DDK = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:254:1: DECLSPEC_NOVTABLE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:207:1: DEFAULT_CHARSET = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1157:1: DEFAULT_GUI_FONT = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:1455:1: DEFAULT_PALETTE = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1453:1: DEFAULT_PITCH = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1151:1: DEFAULT_QUALITY = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1142:1: DEFAULT_UNREACHABLE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:1316:1: DEFINDE_LPTYPEINFO = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:565:1: DEFINED_DISPID_MEMBERID = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:551:1: DEFINED_LPCREATETYPELIB = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:573:1: DEFINED_LPDISPATCH = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:607:1: DEFINED_LPTYPECOMP = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:569:1: DEFINED_LPTYPELIB = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:547:1: DEFINED_LPUINT = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:34:1: DEFINE_LPCREATETYPEINFO = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:577:1: DEF_PRIORITY = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:230:1: DELETE = 65536 // /usr/x86_64-w64-mingw32/include/winnt.h:2879:1: DEPRECATE_SUPPORTED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:247:1: DEREGISTERED = 0x05 // /usr/x86_64-w64-mingw32/include/nb30.h:82:1: DESKTOPHORZRES = 118 // /usr/x86_64-w64-mingw32/include/wingdi.h:1551:1: DESKTOPVERTRES = 117 // /usr/x86_64-w64-mingw32/include/wingdi.h:1550:1: DESKTOP_CREATEMENU = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:776:1: DESKTOP_CREATEWINDOW = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:775:1: DESKTOP_ENUMERATE = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:780:1: DESKTOP_HOOKCONTROL = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:777:1: DESKTOP_JOURNALPLAYBACK = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:779:1: DESKTOP_JOURNALRECORD = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:778:1: DESKTOP_READOBJECTS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:774:1: DESKTOP_SWITCHDESKTOP = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:782:1: DESKTOP_WRITEOBJECTS = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:781:1: DETACHED_PROCESS = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:380:1: DEVICEDATA = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:252:1: DEVICE_DEFAULT_FONT = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1452:1: DEVICE_FONTTYPE = 0x002 // /usr/x86_64-w64-mingw32/include/wingdi.h:1394:1: DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2102:1: DEVICE_NOTIFY_SERVICE_HANDLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2101:1: DEVICE_NOTIFY_WINDOW_HANDLE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2100:1: DFCS_ADJUSTRECT = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:1743:1: DFCS_BUTTON3STATE = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1733:1: DFCS_BUTTONCHECK = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1729:1: DFCS_BUTTONPUSH = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1734:1: DFCS_BUTTONRADIO = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1732:1: DFCS_BUTTONRADIOIMAGE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1730:1: DFCS_BUTTONRADIOMASK = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1731:1: DFCS_CAPTIONCLOSE = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1711:1: DFCS_CAPTIONHELP = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1715:1: DFCS_CAPTIONMAX = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1713:1: DFCS_CAPTIONMIN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1712:1: DFCS_CAPTIONRESTORE = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:1714:1: DFCS_CHECKED = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:1738:1: DFCS_FLAT = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:1744:1: DFCS_HOT = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:1741:1: DFCS_INACTIVE = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:1736:1: DFCS_MENUARROW = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1717:1: DFCS_MENUARROWRIGHT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1720:1: DFCS_MENUBULLET = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1719:1: DFCS_MENUCHECK = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1718:1: DFCS_MONO = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:1745:1: DFCS_PUSHED = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1737:1: DFCS_SCROLLCOMBOBOX = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:1725:1: DFCS_SCROLLDOWN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1722:1: DFCS_SCROLLLEFT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1723:1: DFCS_SCROLLRIGHT = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:1724:1: DFCS_SCROLLSIZEGRIP = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1726:1: DFCS_SCROLLSIZEGRIPRIGHT = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1727:1: DFCS_SCROLLUP = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1721:1: DFCS_TRANSPARENT = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:1740:1: DFC_BUTTON = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1708:1: DFC_CAPTION = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1705:1: DFC_MENU = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1706:1: DFC_POPUPMENU = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1709:1: DFC_SCROLL = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1707:1: DF_ALLOWOTHERACCOUNTHOOK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:784:1: DIAGNOSTIC_REASON_DETAILED_STRING = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5391:1: DIAGNOSTIC_REASON_INVALID_FLAGS = -2147483652 // /usr/x86_64-w64-mingw32/include/winnt.h:5393:1: DIAGNOSTIC_REASON_NOT_SPECIFIED = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5392:1: DIAGNOSTIC_REASON_SIMPLE_STRING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5390:1: DIAGNOSTIC_REASON_VERSION = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5387:1: DIALOPTION_BILLING = 0x00000040 // /usr/x86_64-w64-mingw32/include/mcx.h:47:1: DIALOPTION_DIALTONE = 0x00000100 // /usr/x86_64-w64-mingw32/include/mcx.h:49:1: DIALOPTION_QUIET = 0x00000080 // /usr/x86_64-w64-mingw32/include/mcx.h:48:1: DIB_PAL_COLORS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1654:1: DIB_RGB_COLORS = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1653:1: DIFFERENCE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:135:1: DIRECT_MODE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:59477:1: DISABLE_MAX_PRIVILEGE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:4003:1: DISABLE_NEWLINE_AUTO_RETURN = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:190:1: DISABLE_SMART = 0xD9 // /usr/x86_64-w64-mingw32/include/winioctl.h:966:1: DISCHARGE_POLICY_CRITICAL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5892:1: DISCHARGE_POLICY_LOW = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5893:1: DISC_NO_FORCE = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnetwk.h:181:1: DISC_UPDATE_PROFILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:180:1: DISK_BINNING = 3 // /usr/x86_64-w64-mingw32/include/winioctl.h:844:1: DISK_LOGGING_DUMP = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:843:1: DISK_LOGGING_START = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:841:1: DISK_LOGGING_STOP = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:842:1: DISPATCH_METHOD = 0x1 // /usr/x86_64-w64-mingw32/include/oleauto.h:559:1: DISPATCH_PROPERTYGET = 0x2 // /usr/x86_64-w64-mingw32/include/oleauto.h:560:1: DISPATCH_PROPERTYPUT = 0x4 // /usr/x86_64-w64-mingw32/include/oleauto.h:561:1: DISPATCH_PROPERTYPUTREF = 0x8 // /usr/x86_64-w64-mingw32/include/oleauto.h:562:1: DISPID_COLLECT = -8 // /usr/x86_64-w64-mingw32/include/oaidl.h:2153:1: DISPID_CONSTRUCTOR = -6 // /usr/x86_64-w64-mingw32/include/oaidl.h:2149:1: DISPID_DESTRUCTOR = -7 // /usr/x86_64-w64-mingw32/include/oaidl.h:2151:1: DISPID_EVALUATE = -5 // /usr/x86_64-w64-mingw32/include/oaidl.h:2147:1: DISPID_NEWENUM = -4 // /usr/x86_64-w64-mingw32/include/oaidl.h:2145:1: DISPID_PROPERTYPUT = -3 // /usr/x86_64-w64-mingw32/include/oaidl.h:2143:1: DISPID_UNKNOWN = -1 // /usr/x86_64-w64-mingw32/include/oaidl.h:2139:1: DISPID_VALUE = 0 // /usr/x86_64-w64-mingw32/include/oaidl.h:2141:1: DISPLAY_DEVICE_ACTIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2064:1: DISPLAY_DEVICE_ATTACHED = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2065:1: DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2046:1: DISPLAY_DEVICE_DISCONNECT = 0x02000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2062:1: DISPLAY_DEVICE_MIRRORING_DRIVER = 0x00000008 // /usr/x86_64-w64-mingw32/include/wingdi.h:2049:1: DISPLAY_DEVICE_MODESPRUNED = 0x08000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2059:1: DISPLAY_DEVICE_MULTI_DRIVER = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2047:1: DISPLAY_DEVICE_PRIMARY_DEVICE = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:2048:1: DISPLAY_DEVICE_RDPUDD = 0x01000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2060:1: DISPLAY_DEVICE_REMOTE = 0x04000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2061:1: DISPLAY_DEVICE_REMOVABLE = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:2051:1: DISPLAY_DEVICE_TS_COMPATIBLE = 0x00200000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2055:1: DISPLAY_DEVICE_VGA_COMPATIBLE = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:2050:1: DISP_CHANGE_BADDUALVIEW = -6 // /usr/x86_64-w64-mingw32/include/winuser.h:5586:1: DISP_CHANGE_BADFLAGS = -4 // /usr/x86_64-w64-mingw32/include/winuser.h:5584:1: DISP_CHANGE_BADMODE = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:5582:1: DISP_CHANGE_BADPARAM = -5 // /usr/x86_64-w64-mingw32/include/winuser.h:5585:1: DISP_CHANGE_FAILED = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:5581:1: DISP_CHANGE_NOTUPDATED = -3 // /usr/x86_64-w64-mingw32/include/winuser.h:5583:1: DISP_CHANGE_RESTART = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5580:1: DISP_CHANGE_SUCCESSFUL = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5579:1: DI_APPBANDING = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:3419:1: DI_CHANNEL = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:603:1: DI_COMPAT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4245:1: DI_DEFAULTSIZE = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:4246:1: DI_IMAGE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4243:1: DI_MASK = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4242:1: DI_MEMORYMAP_WRITE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:624:1: DI_NOMIRROR = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:4247:1: DI_NORMAL = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:4244:1: DI_READ_SPOOL_JOB = 3 // /usr/x86_64-w64-mingw32/include/winspool.h:604:1: DI_ROPS_READ_DESTINATION = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:3420:1: DKGRAY_BRUSH = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1441:1: DLGC_BUTTON = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:4670:1: DLGC_DEFPUSHBUTTON = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:4665:1: DLGC_HASSETSEL = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:4664:1: DLGC_RADIOBUTTON = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:4667:1: DLGC_STATIC = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:4669:1: DLGC_UNDEFPUSHBUTTON = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:4666:1: DLGC_WANTALLKEYS = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4662:1: DLGC_WANTARROWS = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4660:1: DLGC_WANTCHARS = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:4668:1: DLGC_WANTMESSAGE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4663:1: DLGC_WANTTAB = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4661:1: DLGWINDOWEXTRA = 30 // /usr/x86_64-w64-mingw32/include/winuser.h:2459:1: DLL_PROCESS_ATTACH = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8433:1: DLL_PROCESS_DETACH = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8436:1: DLL_PROCESS_VERIFIER = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8437:1: DLL_THREAD_ATTACH = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8434:1: DLL_THREAD_DETACH = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8435:1: DMBIN_AUTO = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1943:1: DMBIN_CASSETTE = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1948:1: DMBIN_ENVELOPE = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1941:1: DMBIN_ENVMANUAL = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1942:1: DMBIN_FIRST = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1935:1: DMBIN_FORMSOURCE = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1949:1: DMBIN_LARGECAPACITY = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1947:1: DMBIN_LARGEFMT = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1946:1: DMBIN_LAST = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1950:1: DMBIN_LOWER = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1938:1: DMBIN_MANUAL = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1940:1: DMBIN_MIDDLE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1939:1: DMBIN_ONLYONE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1937:1: DMBIN_SMALLFMT = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1945:1: DMBIN_TRACTOR = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1944:1: DMBIN_UPPER = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1936:1: DMBIN_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1952:1: DMCOLLATE_FALSE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1971:1: DMCOLLATE_TRUE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1972:1: DMCOLOR_COLOR = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1960:1: DMCOLOR_MONOCHROME = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1959:1: DMDFO_CENTER = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1981:1: DMDFO_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1979:1: DMDFO_STRETCH = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1980:1: DMDISPLAYFLAGS_TEXTMODE = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:1984:1: DMDITHER_COARSE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2010:1: DMDITHER_ERRORDIFFUSION = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:2013:1: DMDITHER_FINE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2011:1: DMDITHER_GRAYSCALE = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:2018:1: DMDITHER_LINEART = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2012:1: DMDITHER_NONE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2009:1: DMDITHER_RESERVED6 = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:2014:1: DMDITHER_RESERVED7 = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:2015:1: DMDITHER_RESERVED8 = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2016:1: DMDITHER_RESERVED9 = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:2017:1: DMDITHER_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:2020:1: DMDO_180 = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1976:1: DMDO_270 = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1977:1: DMDO_90 = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1975:1: DMDO_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1974:1: DMDUP_HORIZONTAL = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1964:1: DMDUP_SIMPLEX = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1962:1: DMDUP_VERTICAL = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1963:1: DMICMMETHOD_DEVICE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1992:1: DMICMMETHOD_DRIVER = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1991:1: DMICMMETHOD_NONE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1989:1: DMICMMETHOD_SYSTEM = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1990:1: DMICMMETHOD_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1994:1: DMICM_ABS_COLORIMETRIC = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1999:1: DMICM_COLORIMETRIC = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1998:1: DMICM_CONTRAST = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1997:1: DMICM_SATURATE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1996:1: DMICM_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:2001:1: DMLERR_ADVACKTIMEOUT = 0x4000 // /usr/x86_64-w64-mingw32/include/ddeml.h:223:1: DMLERR_BUSY = 0x4001 // /usr/x86_64-w64-mingw32/include/ddeml.h:224:1: DMLERR_DATAACKTIMEOUT = 0x4002 // /usr/x86_64-w64-mingw32/include/ddeml.h:225:1: DMLERR_DLL_NOT_INITIALIZED = 0x4003 // /usr/x86_64-w64-mingw32/include/ddeml.h:226:1: DMLERR_DLL_USAGE = 0x4004 // /usr/x86_64-w64-mingw32/include/ddeml.h:227:1: DMLERR_EXECACKTIMEOUT = 0x4005 // /usr/x86_64-w64-mingw32/include/ddeml.h:228:1: DMLERR_FIRST = 0x4000 // /usr/x86_64-w64-mingw32/include/ddeml.h:221:1: DMLERR_INVALIDPARAMETER = 0x4006 // /usr/x86_64-w64-mingw32/include/ddeml.h:229:1: DMLERR_LAST = 0x4011 // /usr/x86_64-w64-mingw32/include/ddeml.h:242:1: DMLERR_LOW_MEMORY = 0x4007 // /usr/x86_64-w64-mingw32/include/ddeml.h:230:1: DMLERR_MEMORY_ERROR = 0x4008 // /usr/x86_64-w64-mingw32/include/ddeml.h:231:1: DMLERR_NOTPROCESSED = 0x4009 // /usr/x86_64-w64-mingw32/include/ddeml.h:232:1: DMLERR_NO_CONV_ESTABLISHED = 0x400a // /usr/x86_64-w64-mingw32/include/ddeml.h:233:1: DMLERR_NO_ERROR = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:220:1: DMLERR_POKEACKTIMEOUT = 0x400b // /usr/x86_64-w64-mingw32/include/ddeml.h:234:1: DMLERR_POSTMSG_FAILED = 0x400c // /usr/x86_64-w64-mingw32/include/ddeml.h:235:1: DMLERR_REENTRANCY = 0x400d // /usr/x86_64-w64-mingw32/include/ddeml.h:236:1: DMLERR_SERVER_DIED = 0x400e // /usr/x86_64-w64-mingw32/include/ddeml.h:237:1: DMLERR_SYS_ERROR = 0x400f // /usr/x86_64-w64-mingw32/include/ddeml.h:238:1: DMLERR_UNADVACKTIMEOUT = 0x4010 // /usr/x86_64-w64-mingw32/include/ddeml.h:239:1: DMLERR_UNFOUND_QUEUE_ID = 0x4011 // /usr/x86_64-w64-mingw32/include/ddeml.h:240:1: DMMEDIA_GLOSSY = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2005:1: DMMEDIA_STANDARD = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2003:1: DMMEDIA_TRANSPARENCY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2004:1: DMMEDIA_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:2007:1: DMNUP_ONEUP = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1987:1: DMNUP_SYSTEM = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1986:1: DMORIENT_LANDSCAPE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1809:1: DMORIENT_PORTRAIT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1808:1: DMPAPER_10X11 = 45 // /usr/x86_64-w64-mingw32/include/wingdi.h:1856:1: DMPAPER_10X14 = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1827:1: DMPAPER_11X17 = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:1828:1: DMPAPER_12X11 = 90 // /usr/x86_64-w64-mingw32/include/wingdi.h:1901:1: DMPAPER_15X11 = 46 // /usr/x86_64-w64-mingw32/include/wingdi.h:1857:1: DMPAPER_9X11 = 44 // /usr/x86_64-w64-mingw32/include/wingdi.h:1855:1: DMPAPER_A2 = 66 // /usr/x86_64-w64-mingw32/include/wingdi.h:1877:1: DMPAPER_A3 = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1819:1: DMPAPER_A3_EXTRA = 63 // /usr/x86_64-w64-mingw32/include/wingdi.h:1874:1: DMPAPER_A3_EXTRA_TRANSVERSE = 68 // /usr/x86_64-w64-mingw32/include/wingdi.h:1879:1: DMPAPER_A3_ROTATED = 76 // /usr/x86_64-w64-mingw32/include/wingdi.h:1887:1: DMPAPER_A3_TRANSVERSE = 67 // /usr/x86_64-w64-mingw32/include/wingdi.h:1878:1: DMPAPER_A4 = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1820:1: DMPAPER_A4SMALL = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1821:1: DMPAPER_A4_EXTRA = 53 // /usr/x86_64-w64-mingw32/include/wingdi.h:1864:1: DMPAPER_A4_PLUS = 60 // /usr/x86_64-w64-mingw32/include/wingdi.h:1871:1: DMPAPER_A4_ROTATED = 77 // /usr/x86_64-w64-mingw32/include/wingdi.h:1888:1: DMPAPER_A4_TRANSVERSE = 55 // /usr/x86_64-w64-mingw32/include/wingdi.h:1866:1: DMPAPER_A5 = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1822:1: DMPAPER_A5_EXTRA = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1875:1: DMPAPER_A5_ROTATED = 78 // /usr/x86_64-w64-mingw32/include/wingdi.h:1889:1: DMPAPER_A5_TRANSVERSE = 61 // /usr/x86_64-w64-mingw32/include/wingdi.h:1872:1: DMPAPER_A6 = 70 // /usr/x86_64-w64-mingw32/include/wingdi.h:1881:1: DMPAPER_A6_ROTATED = 83 // /usr/x86_64-w64-mingw32/include/wingdi.h:1894:1: DMPAPER_A_PLUS = 57 // /usr/x86_64-w64-mingw32/include/wingdi.h:1868:1: DMPAPER_B4 = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1823:1: DMPAPER_B4_JIS_ROTATED = 79 // /usr/x86_64-w64-mingw32/include/wingdi.h:1890:1: DMPAPER_B5 = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:1824:1: DMPAPER_B5_EXTRA = 65 // /usr/x86_64-w64-mingw32/include/wingdi.h:1876:1: DMPAPER_B5_JIS_ROTATED = 80 // /usr/x86_64-w64-mingw32/include/wingdi.h:1891:1: DMPAPER_B5_TRANSVERSE = 62 // /usr/x86_64-w64-mingw32/include/wingdi.h:1873:1: DMPAPER_B6_JIS = 88 // /usr/x86_64-w64-mingw32/include/wingdi.h:1899:1: DMPAPER_B6_JIS_ROTATED = 89 // /usr/x86_64-w64-mingw32/include/wingdi.h:1900:1: DMPAPER_B_PLUS = 58 // /usr/x86_64-w64-mingw32/include/wingdi.h:1869:1: DMPAPER_CSHEET = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:1835:1: DMPAPER_DBL_JAPANESE_POSTCARD = 69 // /usr/x86_64-w64-mingw32/include/wingdi.h:1880:1: DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82 // /usr/x86_64-w64-mingw32/include/wingdi.h:1893:1: DMPAPER_DSHEET = 25 // /usr/x86_64-w64-mingw32/include/wingdi.h:1836:1: DMPAPER_ENV_10 = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:1831:1: DMPAPER_ENV_11 = 21 // /usr/x86_64-w64-mingw32/include/wingdi.h:1832:1: DMPAPER_ENV_12 = 22 // /usr/x86_64-w64-mingw32/include/wingdi.h:1833:1: DMPAPER_ENV_14 = 23 // /usr/x86_64-w64-mingw32/include/wingdi.h:1834:1: DMPAPER_ENV_9 = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:1830:1: DMPAPER_ENV_B4 = 33 // /usr/x86_64-w64-mingw32/include/wingdi.h:1844:1: DMPAPER_ENV_B5 = 34 // /usr/x86_64-w64-mingw32/include/wingdi.h:1845:1: DMPAPER_ENV_B6 = 35 // /usr/x86_64-w64-mingw32/include/wingdi.h:1846:1: DMPAPER_ENV_C3 = 29 // /usr/x86_64-w64-mingw32/include/wingdi.h:1840:1: DMPAPER_ENV_C4 = 30 // /usr/x86_64-w64-mingw32/include/wingdi.h:1841:1: DMPAPER_ENV_C5 = 28 // /usr/x86_64-w64-mingw32/include/wingdi.h:1839:1: DMPAPER_ENV_C6 = 31 // /usr/x86_64-w64-mingw32/include/wingdi.h:1842:1: DMPAPER_ENV_C65 = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1843:1: DMPAPER_ENV_DL = 27 // /usr/x86_64-w64-mingw32/include/wingdi.h:1838:1: DMPAPER_ENV_INVITE = 47 // /usr/x86_64-w64-mingw32/include/wingdi.h:1858:1: DMPAPER_ENV_ITALY = 36 // /usr/x86_64-w64-mingw32/include/wingdi.h:1847:1: DMPAPER_ENV_MONARCH = 37 // /usr/x86_64-w64-mingw32/include/wingdi.h:1848:1: DMPAPER_ENV_PERSONAL = 38 // /usr/x86_64-w64-mingw32/include/wingdi.h:1849:1: DMPAPER_ESHEET = 26 // /usr/x86_64-w64-mingw32/include/wingdi.h:1837:1: DMPAPER_EXECUTIVE = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1818:1: DMPAPER_FANFOLD_LGL_GERMAN = 41 // /usr/x86_64-w64-mingw32/include/wingdi.h:1852:1: DMPAPER_FANFOLD_STD_GERMAN = 40 // /usr/x86_64-w64-mingw32/include/wingdi.h:1851:1: DMPAPER_FANFOLD_US = 39 // /usr/x86_64-w64-mingw32/include/wingdi.h:1850:1: DMPAPER_FIRST = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1811:1: DMPAPER_FOLIO = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1825:1: DMPAPER_ISO_B4 = 42 // /usr/x86_64-w64-mingw32/include/wingdi.h:1853:1: DMPAPER_JAPANESE_POSTCARD = 43 // /usr/x86_64-w64-mingw32/include/wingdi.h:1854:1: DMPAPER_JAPANESE_POSTCARD_ROTATED = 81 // /usr/x86_64-w64-mingw32/include/wingdi.h:1892:1: DMPAPER_JENV_CHOU3 = 73 // /usr/x86_64-w64-mingw32/include/wingdi.h:1884:1: DMPAPER_JENV_CHOU3_ROTATED = 86 // /usr/x86_64-w64-mingw32/include/wingdi.h:1897:1: DMPAPER_JENV_CHOU4 = 74 // /usr/x86_64-w64-mingw32/include/wingdi.h:1885:1: DMPAPER_JENV_CHOU4_ROTATED = 87 // /usr/x86_64-w64-mingw32/include/wingdi.h:1898:1: DMPAPER_JENV_KAKU2 = 71 // /usr/x86_64-w64-mingw32/include/wingdi.h:1882:1: DMPAPER_JENV_KAKU2_ROTATED = 84 // /usr/x86_64-w64-mingw32/include/wingdi.h:1895:1: DMPAPER_JENV_KAKU3 = 72 // /usr/x86_64-w64-mingw32/include/wingdi.h:1883:1: DMPAPER_JENV_KAKU3_ROTATED = 85 // /usr/x86_64-w64-mingw32/include/wingdi.h:1896:1: DMPAPER_JENV_YOU4 = 91 // /usr/x86_64-w64-mingw32/include/wingdi.h:1902:1: DMPAPER_JENV_YOU4_ROTATED = 92 // /usr/x86_64-w64-mingw32/include/wingdi.h:1903:1: DMPAPER_LAST = 118 // /usr/x86_64-w64-mingw32/include/wingdi.h:1931:1: DMPAPER_LEDGER = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1815:1: DMPAPER_LEGAL = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1816:1: DMPAPER_LEGAL_EXTRA = 51 // /usr/x86_64-w64-mingw32/include/wingdi.h:1862:1: DMPAPER_LETTER = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1812:1: DMPAPER_LETTERSMALL = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1813:1: DMPAPER_LETTER_EXTRA = 50 // /usr/x86_64-w64-mingw32/include/wingdi.h:1861:1: DMPAPER_LETTER_EXTRA_TRANSVERSE = 56 // /usr/x86_64-w64-mingw32/include/wingdi.h:1867:1: DMPAPER_LETTER_PLUS = 59 // /usr/x86_64-w64-mingw32/include/wingdi.h:1870:1: DMPAPER_LETTER_ROTATED = 75 // /usr/x86_64-w64-mingw32/include/wingdi.h:1886:1: DMPAPER_LETTER_TRANSVERSE = 54 // /usr/x86_64-w64-mingw32/include/wingdi.h:1865:1: DMPAPER_NOTE = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:1829:1: DMPAPER_P16K = 93 // /usr/x86_64-w64-mingw32/include/wingdi.h:1904:1: DMPAPER_P16K_ROTATED = 106 // /usr/x86_64-w64-mingw32/include/wingdi.h:1917:1: DMPAPER_P32K = 94 // /usr/x86_64-w64-mingw32/include/wingdi.h:1905:1: DMPAPER_P32KBIG = 95 // /usr/x86_64-w64-mingw32/include/wingdi.h:1906:1: DMPAPER_P32KBIG_ROTATED = 108 // /usr/x86_64-w64-mingw32/include/wingdi.h:1919:1: DMPAPER_P32K_ROTATED = 107 // /usr/x86_64-w64-mingw32/include/wingdi.h:1918:1: DMPAPER_PENV_1 = 96 // /usr/x86_64-w64-mingw32/include/wingdi.h:1907:1: DMPAPER_PENV_10 = 105 // /usr/x86_64-w64-mingw32/include/wingdi.h:1916:1: DMPAPER_PENV_10_ROTATED = 118 // /usr/x86_64-w64-mingw32/include/wingdi.h:1929:1: DMPAPER_PENV_1_ROTATED = 109 // /usr/x86_64-w64-mingw32/include/wingdi.h:1920:1: DMPAPER_PENV_2 = 97 // /usr/x86_64-w64-mingw32/include/wingdi.h:1908:1: DMPAPER_PENV_2_ROTATED = 110 // /usr/x86_64-w64-mingw32/include/wingdi.h:1921:1: DMPAPER_PENV_3 = 98 // /usr/x86_64-w64-mingw32/include/wingdi.h:1909:1: DMPAPER_PENV_3_ROTATED = 111 // /usr/x86_64-w64-mingw32/include/wingdi.h:1922:1: DMPAPER_PENV_4 = 99 // /usr/x86_64-w64-mingw32/include/wingdi.h:1910:1: DMPAPER_PENV_4_ROTATED = 112 // /usr/x86_64-w64-mingw32/include/wingdi.h:1923:1: DMPAPER_PENV_5 = 100 // /usr/x86_64-w64-mingw32/include/wingdi.h:1911:1: DMPAPER_PENV_5_ROTATED = 113 // /usr/x86_64-w64-mingw32/include/wingdi.h:1924:1: DMPAPER_PENV_6 = 101 // /usr/x86_64-w64-mingw32/include/wingdi.h:1912:1: DMPAPER_PENV_6_ROTATED = 114 // /usr/x86_64-w64-mingw32/include/wingdi.h:1925:1: DMPAPER_PENV_7 = 102 // /usr/x86_64-w64-mingw32/include/wingdi.h:1913:1: DMPAPER_PENV_7_ROTATED = 115 // /usr/x86_64-w64-mingw32/include/wingdi.h:1926:1: DMPAPER_PENV_8 = 103 // /usr/x86_64-w64-mingw32/include/wingdi.h:1914:1: DMPAPER_PENV_8_ROTATED = 116 // /usr/x86_64-w64-mingw32/include/wingdi.h:1927:1: DMPAPER_PENV_9 = 104 // /usr/x86_64-w64-mingw32/include/wingdi.h:1915:1: DMPAPER_PENV_9_ROTATED = 117 // /usr/x86_64-w64-mingw32/include/wingdi.h:1928:1: DMPAPER_QUARTO = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1826:1: DMPAPER_RESERVED_48 = 48 // /usr/x86_64-w64-mingw32/include/wingdi.h:1859:1: DMPAPER_RESERVED_49 = 49 // /usr/x86_64-w64-mingw32/include/wingdi.h:1860:1: DMPAPER_STATEMENT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1817:1: DMPAPER_TABLOID = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1814:1: DMPAPER_TABLOID_EXTRA = 52 // /usr/x86_64-w64-mingw32/include/wingdi.h:1863:1: DMPAPER_USER = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1933:1: DMRES_DRAFT = -1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1954:1: DMRES_HIGH = -4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1957:1: DMRES_LOW = -2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1955:1: DMRES_MEDIUM = -3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1956:1: DMTT_BITMAP = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1966:1: DMTT_DOWNLOAD = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1967:1: DMTT_DOWNLOAD_OUTLINE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1969:1: DMTT_SUBDEV = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1968:1: DM_BITSPERPEL = 262144 // /usr/x86_64-w64-mingw32/include/wingdi.h:1795:1: DM_COLLATE = 32768 // /usr/x86_64-w64-mingw32/include/wingdi.h:1792:1: DM_COLOR = 2048 // /usr/x86_64-w64-mingw32/include/wingdi.h:1788:1: DM_COPIES = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1785:1: DM_COPY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2837:1: DM_DEFAULTSOURCE = 512 // /usr/x86_64-w64-mingw32/include/wingdi.h:1786:1: DM_DISPLAYFIXEDOUTPUT = 536870912 // /usr/x86_64-w64-mingw32/include/wingdi.h:1806:1: DM_DISPLAYFLAGS = 2097152 // /usr/x86_64-w64-mingw32/include/wingdi.h:1798:1: DM_DISPLAYFREQUENCY = 4194304 // /usr/x86_64-w64-mingw32/include/wingdi.h:1799:1: DM_DISPLAYORIENTATION = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1784:1: DM_DITHERTYPE = 67108864 // /usr/x86_64-w64-mingw32/include/wingdi.h:1803:1: DM_DUPLEX = 4096 // /usr/x86_64-w64-mingw32/include/wingdi.h:1789:1: DM_FORMNAME = 65536 // /usr/x86_64-w64-mingw32/include/wingdi.h:1793:1: DM_GETDEFID = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4654:1: DM_ICMINTENT = 16777216 // /usr/x86_64-w64-mingw32/include/wingdi.h:1801:1: DM_ICMMETHOD = 8388608 // /usr/x86_64-w64-mingw32/include/wingdi.h:1800:1: DM_INTERLACED = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:1983:1: DM_IN_BUFFER = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2841:1: DM_IN_PROMPT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2842:1: DM_LOGPIXELS = 131072 // /usr/x86_64-w64-mingw32/include/wingdi.h:1794:1: DM_MEDIATYPE = 33554432 // /usr/x86_64-w64-mingw32/include/wingdi.h:1802:1: DM_MODIFY = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2839:1: DM_NUP = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1783:1: DM_ORIENTATION = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1777:1: DM_OUT_BUFFER = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2843:1: DM_OUT_DEFAULT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2844:1: DM_PANNINGHEIGHT = 268435456 // /usr/x86_64-w64-mingw32/include/wingdi.h:1805:1: DM_PANNINGWIDTH = 134217728 // /usr/x86_64-w64-mingw32/include/wingdi.h:1804:1: DM_PAPERLENGTH = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1779:1: DM_PAPERSIZE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1778:1: DM_PAPERWIDTH = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1780:1: DM_PELSHEIGHT = 1048576 // /usr/x86_64-w64-mingw32/include/wingdi.h:1797:1: DM_PELSWIDTH = 524288 // /usr/x86_64-w64-mingw32/include/wingdi.h:1796:1: DM_POSITION = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1782:1: DM_PRINTQUALITY = 1024 // /usr/x86_64-w64-mingw32/include/wingdi.h:1787:1: DM_PROMPT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2838:1: DM_REPOSITION = 1026 // /usr/x86_64-w64-mingw32/include/winuser.h:4656:1: DM_SCALE = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1781:1: DM_SETDEFID = 1025 // /usr/x86_64-w64-mingw32/include/winuser.h:4655:1: DM_SPECVERSION = 0x0401 // /usr/x86_64-w64-mingw32/include/wingdi.h:1775:1: DM_TTOPTION = 16384 // /usr/x86_64-w64-mingw32/include/wingdi.h:1791:1: DM_UPDATE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2836:1: DM_YRESOLUTION = 8192 // /usr/x86_64-w64-mingw32/include/wingdi.h:1790:1: DNS_ERROR_AUTOZONE_ALREADY_EXISTS = 9610 // /usr/x86_64-w64-mingw32/include/winerror.h:1587:1: DNS_ERROR_AXFR = 9752 // /usr/x86_64-w64-mingw32/include/winerror.h:1627:1: DNS_ERROR_BAD_PACKET = 9502 // /usr/x86_64-w64-mingw32/include/winerror.h:1553:1: DNS_ERROR_CANNOT_FIND_ROOT_HINTS = 9564 // /usr/x86_64-w64-mingw32/include/winerror.h:1575:1: DNS_ERROR_CNAME_COLLISION = 9709 // /usr/x86_64-w64-mingw32/include/winerror.h:1614:1: DNS_ERROR_CNAME_LOOP = 9707 // /usr/x86_64-w64-mingw32/include/winerror.h:1612:1: DNS_ERROR_DATABASE_BASE = 9700 // /usr/x86_64-w64-mingw32/include/winerror.h:1605:1: DNS_ERROR_DATAFILE_BASE = 9650 // /usr/x86_64-w64-mingw32/include/winerror.h:1599:1: DNS_ERROR_DATAFILE_OPEN_FAILURE = 9653 // /usr/x86_64-w64-mingw32/include/winerror.h:1602:1: DNS_ERROR_DATAFILE_PARSING = 9655 // /usr/x86_64-w64-mingw32/include/winerror.h:1604:1: DNS_ERROR_DP_ALREADY_ENLISTED = 9904 // /usr/x86_64-w64-mingw32/include/winerror.h:1638:1: DNS_ERROR_DP_ALREADY_EXISTS = 9902 // /usr/x86_64-w64-mingw32/include/winerror.h:1636:1: DNS_ERROR_DP_BASE = 9900 // /usr/x86_64-w64-mingw32/include/winerror.h:1634:1: DNS_ERROR_DP_DOES_NOT_EXIST = 9901 // /usr/x86_64-w64-mingw32/include/winerror.h:1635:1: DNS_ERROR_DP_FSMO_ERROR = 9906 // /usr/x86_64-w64-mingw32/include/winerror.h:1640:1: DNS_ERROR_DP_NOT_AVAILABLE = 9905 // /usr/x86_64-w64-mingw32/include/winerror.h:1639:1: DNS_ERROR_DP_NOT_ENLISTED = 9903 // /usr/x86_64-w64-mingw32/include/winerror.h:1637:1: DNS_ERROR_DS_UNAVAILABLE = 9717 // /usr/x86_64-w64-mingw32/include/winerror.h:1622:1: DNS_ERROR_DS_ZONE_ALREADY_EXISTS = 9718 // /usr/x86_64-w64-mingw32/include/winerror.h:1623:1: DNS_ERROR_FILE_WRITEBACK_FAILED = 9654 // /usr/x86_64-w64-mingw32/include/winerror.h:1603:1: DNS_ERROR_FORWARDER_ALREADY_EXISTS = 9619 // /usr/x86_64-w64-mingw32/include/winerror.h:1596:1: DNS_ERROR_GENERAL_API_BASE = 9550 // /usr/x86_64-w64-mingw32/include/winerror.h:1561:1: DNS_ERROR_INCONSISTENT_ROOT_HINTS = 9565 // /usr/x86_64-w64-mingw32/include/winerror.h:1576:1: DNS_ERROR_INVALID_DATA = 13 // /usr/x86_64-w64-mingw32/include/winerror.h:1560:1: DNS_ERROR_INVALID_DATAFILE_NAME = 9652 // /usr/x86_64-w64-mingw32/include/winerror.h:1601:1: DNS_ERROR_INVALID_IP_ADDRESS = 9552 // /usr/x86_64-w64-mingw32/include/winerror.h:1563:1: DNS_ERROR_INVALID_NAME = 123 // /usr/x86_64-w64-mingw32/include/winerror.h:1559:1: DNS_ERROR_INVALID_NAME_CHAR = 9560 // /usr/x86_64-w64-mingw32/include/winerror.h:1571:1: DNS_ERROR_INVALID_PROPERTY = 9553 // /usr/x86_64-w64-mingw32/include/winerror.h:1564:1: DNS_ERROR_INVALID_TYPE = 9551 // /usr/x86_64-w64-mingw32/include/winerror.h:1562:1: DNS_ERROR_INVALID_ZONE_OPERATION = 9603 // /usr/x86_64-w64-mingw32/include/winerror.h:1580:1: DNS_ERROR_INVALID_ZONE_TYPE = 9611 // /usr/x86_64-w64-mingw32/include/winerror.h:1588:1: DNS_ERROR_MASK = 0x00002328 // /usr/x86_64-w64-mingw32/include/winerror.h:1536:1: DNS_ERROR_NAME_DOES_NOT_EXIST = 9714 // /usr/x86_64-w64-mingw32/include/winerror.h:1619:1: DNS_ERROR_NAME_NOT_IN_ZONE = 9706 // /usr/x86_64-w64-mingw32/include/winerror.h:1611:1: DNS_ERROR_NBSTAT_INIT_FAILED = 9617 // /usr/x86_64-w64-mingw32/include/winerror.h:1594:1: DNS_ERROR_NEED_SECONDARY_ADDRESSES = 9614 // /usr/x86_64-w64-mingw32/include/winerror.h:1591:1: DNS_ERROR_NEED_WINS_SERVERS = 9616 // /usr/x86_64-w64-mingw32/include/winerror.h:1593:1: DNS_ERROR_NODE_CREATION_FAILED = 9703 // /usr/x86_64-w64-mingw32/include/winerror.h:1608:1: DNS_ERROR_NODE_IS_CNAME = 9708 // /usr/x86_64-w64-mingw32/include/winerror.h:1613:1: DNS_ERROR_NON_RFC_NAME = 9556 // /usr/x86_64-w64-mingw32/include/winerror.h:1567:1: DNS_ERROR_NOT_ALLOWED_ON_ROOT_SERVER = 9562 // /usr/x86_64-w64-mingw32/include/winerror.h:1573:1: DNS_ERROR_NOT_ALLOWED_UNDER_DELEGATION = 9563 // /usr/x86_64-w64-mingw32/include/winerror.h:1574:1: DNS_ERROR_NOT_UNIQUE = 9555 // /usr/x86_64-w64-mingw32/include/winerror.h:1566:1: DNS_ERROR_NO_BOOTFILE_IF_DS_ZONE = 9719 // /usr/x86_64-w64-mingw32/include/winerror.h:1624:1: DNS_ERROR_NO_CREATE_CACHE_DATA = 9713 // /usr/x86_64-w64-mingw32/include/winerror.h:1618:1: DNS_ERROR_NO_DNS_SERVERS = 9852 // /usr/x86_64-w64-mingw32/include/winerror.h:1633:1: DNS_ERROR_NO_MEMORY = 14 // /usr/x86_64-w64-mingw32/include/winerror.h:1558:1: DNS_ERROR_NO_PACKET = 9503 // /usr/x86_64-w64-mingw32/include/winerror.h:1554:1: DNS_ERROR_NO_TCPIP = 9851 // /usr/x86_64-w64-mingw32/include/winerror.h:1632:1: DNS_ERROR_NO_ZONE_INFO = 9602 // /usr/x86_64-w64-mingw32/include/winerror.h:1579:1: DNS_ERROR_NUMERIC_NAME = 9561 // /usr/x86_64-w64-mingw32/include/winerror.h:1572:1: DNS_ERROR_OPERATION_BASE = 9750 // /usr/x86_64-w64-mingw32/include/winerror.h:1625:1: DNS_ERROR_PACKET_FMT_BASE = 9500 // /usr/x86_64-w64-mingw32/include/winerror.h:1551:1: DNS_ERROR_PRIMARY_REQUIRES_DATAFILE = 9651 // /usr/x86_64-w64-mingw32/include/winerror.h:1600:1: DNS_ERROR_RCODE = 9504 // /usr/x86_64-w64-mingw32/include/winerror.h:1555:1: DNS_ERROR_RCODE_BADKEY = 9017 // /usr/x86_64-w64-mingw32/include/winerror.h:1548:1: DNS_ERROR_RCODE_BADSIG = 9016 // /usr/x86_64-w64-mingw32/include/winerror.h:1547:1: DNS_ERROR_RCODE_BADTIME = 9018 // /usr/x86_64-w64-mingw32/include/winerror.h:1549:1: DNS_ERROR_RCODE_FORMAT_ERROR = 9001 // /usr/x86_64-w64-mingw32/include/winerror.h:1537:1: DNS_ERROR_RCODE_LAST = 9018 // /usr/x86_64-w64-mingw32/include/winerror.h:1550:1: DNS_ERROR_RCODE_NAME_ERROR = 9003 // /usr/x86_64-w64-mingw32/include/winerror.h:1539:1: DNS_ERROR_RCODE_NOTAUTH = 9009 // /usr/x86_64-w64-mingw32/include/winerror.h:1545:1: DNS_ERROR_RCODE_NOTZONE = 9010 // /usr/x86_64-w64-mingw32/include/winerror.h:1546:1: DNS_ERROR_RCODE_NOT_IMPLEMENTED = 9004 // /usr/x86_64-w64-mingw32/include/winerror.h:1540:1: DNS_ERROR_RCODE_NO_ERROR = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:1535:1: DNS_ERROR_RCODE_NXRRSET = 9008 // /usr/x86_64-w64-mingw32/include/winerror.h:1544:1: DNS_ERROR_RCODE_REFUSED = 9005 // /usr/x86_64-w64-mingw32/include/winerror.h:1541:1: DNS_ERROR_RCODE_SERVER_FAILURE = 9002 // /usr/x86_64-w64-mingw32/include/winerror.h:1538:1: DNS_ERROR_RCODE_YXDOMAIN = 9006 // /usr/x86_64-w64-mingw32/include/winerror.h:1542:1: DNS_ERROR_RCODE_YXRRSET = 9007 // /usr/x86_64-w64-mingw32/include/winerror.h:1543:1: DNS_ERROR_RECORD_ALREADY_EXISTS = 9711 // /usr/x86_64-w64-mingw32/include/winerror.h:1616:1: DNS_ERROR_RECORD_DOES_NOT_EXIST = 9701 // /usr/x86_64-w64-mingw32/include/winerror.h:1606:1: DNS_ERROR_RECORD_FORMAT = 9702 // /usr/x86_64-w64-mingw32/include/winerror.h:1607:1: DNS_ERROR_RECORD_ONLY_AT_ZONE_ROOT = 9710 // /usr/x86_64-w64-mingw32/include/winerror.h:1615:1: DNS_ERROR_RECORD_TIMED_OUT = 9705 // /usr/x86_64-w64-mingw32/include/winerror.h:1610:1: DNS_ERROR_RESPONSE_CODES_BASE = 9000 // /usr/x86_64-w64-mingw32/include/winerror.h:1534:1: DNS_ERROR_SECONDARY_DATA = 9712 // /usr/x86_64-w64-mingw32/include/winerror.h:1617:1: DNS_ERROR_SECONDARY_REQUIRES_MASTER_IP = 9612 // /usr/x86_64-w64-mingw32/include/winerror.h:1589:1: DNS_ERROR_SECURE_BASE = 9800 // /usr/x86_64-w64-mingw32/include/winerror.h:1629:1: DNS_ERROR_SETUP_BASE = 9850 // /usr/x86_64-w64-mingw32/include/winerror.h:1631:1: DNS_ERROR_SOA_DELETE_INVALID = 9618 // /usr/x86_64-w64-mingw32/include/winerror.h:1595:1: DNS_ERROR_TRY_AGAIN_LATER = 9554 // /usr/x86_64-w64-mingw32/include/winerror.h:1565:1: DNS_ERROR_UNKNOWN_RECORD_TYPE = 9704 // /usr/x86_64-w64-mingw32/include/winerror.h:1609:1: DNS_ERROR_UNSECURE_PACKET = 9505 // /usr/x86_64-w64-mingw32/include/winerror.h:1556:1: DNS_ERROR_WINS_INIT_FAILED = 9615 // /usr/x86_64-w64-mingw32/include/winerror.h:1592:1: DNS_ERROR_ZONE_ALREADY_EXISTS = 9609 // /usr/x86_64-w64-mingw32/include/winerror.h:1586:1: DNS_ERROR_ZONE_BASE = 9600 // /usr/x86_64-w64-mingw32/include/winerror.h:1577:1: DNS_ERROR_ZONE_CONFIGURATION_ERROR = 9604 // /usr/x86_64-w64-mingw32/include/winerror.h:1581:1: DNS_ERROR_ZONE_CREATION_FAILED = 9608 // /usr/x86_64-w64-mingw32/include/winerror.h:1585:1: DNS_ERROR_ZONE_DOES_NOT_EXIST = 9601 // /usr/x86_64-w64-mingw32/include/winerror.h:1578:1: DNS_ERROR_ZONE_HAS_NO_NS_RECORDS = 9606 // /usr/x86_64-w64-mingw32/include/winerror.h:1583:1: DNS_ERROR_ZONE_HAS_NO_SOA_RECORD = 9605 // /usr/x86_64-w64-mingw32/include/winerror.h:1582:1: DNS_ERROR_ZONE_IS_SHUTDOWN = 9621 // /usr/x86_64-w64-mingw32/include/winerror.h:1598:1: DNS_ERROR_ZONE_LOCKED = 9607 // /usr/x86_64-w64-mingw32/include/winerror.h:1584:1: DNS_ERROR_ZONE_NOT_SECONDARY = 9613 // /usr/x86_64-w64-mingw32/include/winerror.h:1590:1: DNS_ERROR_ZONE_REQUIRES_MASTER_IP = 9620 // /usr/x86_64-w64-mingw32/include/winerror.h:1597:1: DNS_FILTEROFF = 0x0008 // /usr/x86_64-w64-mingw32/include/ddeml.h:205:1: DNS_FILTERON = 0x0004 // /usr/x86_64-w64-mingw32/include/ddeml.h:204:1: DNS_INFO_ADDED_LOCAL_WINS = 9753 // /usr/x86_64-w64-mingw32/include/winerror.h:1628:1: DNS_INFO_AXFR_COMPLETE = 9751 // /usr/x86_64-w64-mingw32/include/winerror.h:1626:1: DNS_INFO_NO_RECORDS = 9501 // /usr/x86_64-w64-mingw32/include/winerror.h:1552:1: DNS_REGISTER = 0x0001 // /usr/x86_64-w64-mingw32/include/ddeml.h:202:1: DNS_STATUS_CONTINUE_NEEDED = 9801 // /usr/x86_64-w64-mingw32/include/winerror.h:1630:1: DNS_STATUS_DOTTED_NAME = 9558 // /usr/x86_64-w64-mingw32/include/winerror.h:1569:1: DNS_STATUS_FQDN = 9557 // /usr/x86_64-w64-mingw32/include/winerror.h:1568:1: DNS_STATUS_PACKET_UNSECURE = 9505 // /usr/x86_64-w64-mingw32/include/winerror.h:1557:1: DNS_STATUS_SINGLE_PART_NAME = 9559 // /usr/x86_64-w64-mingw32/include/winerror.h:1570:1: DNS_UNREGISTER = 0x0002 // /usr/x86_64-w64-mingw32/include/ddeml.h:203:1: DNS_WARNING_DOMAIN_UNDELETED = 9716 // /usr/x86_64-w64-mingw32/include/winerror.h:1621:1: DNS_WARNING_PTR_CREATE_FAILED = 9715 // /usr/x86_64-w64-mingw32/include/winerror.h:1620:1: DN_DEFAULTPRN = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:704:1: DOCKINFO_DOCKED = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2473:1: DOCKINFO_UNDOCKED = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2472:1: DOCKINFO_USER_DOCKED = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:2476:1: DOCKINFO_USER_SUPPLIED = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2474:1: DOCKINFO_USER_UNDOCKED = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:2475:1: DOF_DIRECTORY = 0x8003 // /usr/x86_64-w64-mingw32/include/winuser.h:3423:1: DOF_DOCUMENT = 0x8002 // /usr/x86_64-w64-mingw32/include/winuser.h:3422:1: DOF_EXECUTABLE = 0x8001 // /usr/x86_64-w64-mingw32/include/winuser.h:3421:1: DOF_MULTIPLE = 0x8004 // /usr/x86_64-w64-mingw32/include/winuser.h:3424:1: DOF_PROGMAN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3425:1: DOF_SHELLDATA = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3426:1: DOMAIN = 1 // /usr/x86_64-w64-mingw32/include/math.h:29:1: DOMAIN_ALIAS_RID_ACCESS_CONTROL_ASSISTANCE_OPS = 579 // /usr/x86_64-w64-mingw32/include/winnt.h:3133:1: DOMAIN_ALIAS_RID_ACCOUNT_OPS = 548 // /usr/x86_64-w64-mingw32/include/winnt.h:3105:1: DOMAIN_ALIAS_RID_ADMINS = 544 // /usr/x86_64-w64-mingw32/include/winnt.h:3100:1: DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = 560 // /usr/x86_64-w64-mingw32/include/winnt.h:3119:1: DOMAIN_ALIAS_RID_BACKUP_OPS = 551 // /usr/x86_64-w64-mingw32/include/winnt.h:3108:1: DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 571 // /usr/x86_64-w64-mingw32/include/winnt.h:3125:1: DOMAIN_ALIAS_RID_CERTSVC_DCOM_ACCESS_GROUP = 574 // /usr/x86_64-w64-mingw32/include/winnt.h:3128:1: DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 569 // /usr/x86_64-w64-mingw32/include/winnt.h:3124:1: DOMAIN_ALIAS_RID_DCOM_USERS = 562 // /usr/x86_64-w64-mingw32/include/winnt.h:3121:1: DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 573 // /usr/x86_64-w64-mingw32/include/winnt.h:3127:1: DOMAIN_ALIAS_RID_GUESTS = 546 // /usr/x86_64-w64-mingw32/include/winnt.h:3102:1: DOMAIN_ALIAS_RID_HYPER_V_ADMINS = 578 // /usr/x86_64-w64-mingw32/include/winnt.h:3132:1: DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = 557 // /usr/x86_64-w64-mingw32/include/winnt.h:3115:1: DOMAIN_ALIAS_RID_IUSERS = 568 // /usr/x86_64-w64-mingw32/include/winnt.h:3123:1: DOMAIN_ALIAS_RID_LOGGING_USERS = 559 // /usr/x86_64-w64-mingw32/include/winnt.h:3118:1: DOMAIN_ALIAS_RID_MONITORING_USERS = 558 // /usr/x86_64-w64-mingw32/include/winnt.h:3117:1: DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = 556 // /usr/x86_64-w64-mingw32/include/winnt.h:3114:1: DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 572 // /usr/x86_64-w64-mingw32/include/winnt.h:3126:1: DOMAIN_ALIAS_RID_POWER_USERS = 547 // /usr/x86_64-w64-mingw32/include/winnt.h:3103:1: DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = 554 // /usr/x86_64-w64-mingw32/include/winnt.h:3112:1: DOMAIN_ALIAS_RID_PRINT_OPS = 550 // /usr/x86_64-w64-mingw32/include/winnt.h:3107:1: DOMAIN_ALIAS_RID_RAS_SERVERS = 553 // /usr/x86_64-w64-mingw32/include/winnt.h:3111:1: DOMAIN_ALIAS_RID_RDS_ENDPOINT_SERVERS = 576 // /usr/x86_64-w64-mingw32/include/winnt.h:3130:1: DOMAIN_ALIAS_RID_RDS_MANAGEMENT_SERVERS = 577 // /usr/x86_64-w64-mingw32/include/winnt.h:3131:1: DOMAIN_ALIAS_RID_RDS_REMOTE_ACCESS_SERVERS = 575 // /usr/x86_64-w64-mingw32/include/winnt.h:3129:1: DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = 555 // /usr/x86_64-w64-mingw32/include/winnt.h:3113:1: DOMAIN_ALIAS_RID_REMOTE_MANAGEMENT_USERS = 580 // /usr/x86_64-w64-mingw32/include/winnt.h:3134:1: DOMAIN_ALIAS_RID_REPLICATOR = 552 // /usr/x86_64-w64-mingw32/include/winnt.h:3110:1: DOMAIN_ALIAS_RID_SYSTEM_OPS = 549 // /usr/x86_64-w64-mingw32/include/winnt.h:3106:1: DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = 561 // /usr/x86_64-w64-mingw32/include/winnt.h:3120:1: DOMAIN_ALIAS_RID_USERS = 545 // /usr/x86_64-w64-mingw32/include/winnt.h:3101:1: DOMAIN_GROUP_RID_ADMINS = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:3088:1: DOMAIN_GROUP_RID_AUTHORIZATION_DATA_CONTAINS_CLAIMS = 497 // /usr/x86_64-w64-mingw32/include/winnt.h:3077:1: DOMAIN_GROUP_RID_AUTHORIZATION_DATA_IS_COMPOUNDED = 496 // /usr/x86_64-w64-mingw32/include/winnt.h:3076:1: DOMAIN_GROUP_RID_CERT_ADMINS = 517 // /usr/x86_64-w64-mingw32/include/winnt.h:3093:1: DOMAIN_GROUP_RID_CLONEABLE_CONTROLLERS = 522 // /usr/x86_64-w64-mingw32/include/winnt.h:3098:1: DOMAIN_GROUP_RID_COMPUTERS = 515 // /usr/x86_64-w64-mingw32/include/winnt.h:3091:1: DOMAIN_GROUP_RID_CONTROLLERS = 516 // /usr/x86_64-w64-mingw32/include/winnt.h:3092:1: DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = 519 // /usr/x86_64-w64-mingw32/include/winnt.h:3095:1: DOMAIN_GROUP_RID_ENTERPRISE_READONLY_DOMAIN_CONTROLLERS = 498 // /usr/x86_64-w64-mingw32/include/winnt.h:3078:1: DOMAIN_GROUP_RID_GUESTS = 514 // /usr/x86_64-w64-mingw32/include/winnt.h:3090:1: DOMAIN_GROUP_RID_POLICY_ADMINS = 520 // /usr/x86_64-w64-mingw32/include/winnt.h:3096:1: DOMAIN_GROUP_RID_READONLY_CONTROLLERS = 521 // /usr/x86_64-w64-mingw32/include/winnt.h:3097:1: DOMAIN_GROUP_RID_SCHEMA_ADMINS = 518 // /usr/x86_64-w64-mingw32/include/winnt.h:3094:1: DOMAIN_GROUP_RID_USERS = 513 // /usr/x86_64-w64-mingw32/include/winnt.h:3089:1: DOMAIN_USER_RID_ADMIN = 500 // /usr/x86_64-w64-mingw32/include/winnt.h:3082:1: DOMAIN_USER_RID_GUEST = 501 // /usr/x86_64-w64-mingw32/include/winnt.h:3083:1: DOMAIN_USER_RID_KRBTGT = 502 // /usr/x86_64-w64-mingw32/include/winnt.h:3084:1: DOMAIN_USER_RID_MAX = 999 // /usr/x86_64-w64-mingw32/include/winnt.h:3086:1: DONT_RESOLVE_DLL_REFERENCES = 0x1 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:59:1: DOUBLE_CLICK = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:76:1: DOWNLOADFACE = 514 // /usr/x86_64-w64-mingw32/include/wingdi.h:282:1: DOWNLOADHEADER = 4111 // /usr/x86_64-w64-mingw32/include/wingdi.h:309:1: DO_DROPFILE = 1162627398 // /usr/x86_64-w64-mingw32/include/winuser.h:3428:1: DO_PRINTFILE = 1414419024 // /usr/x86_64-w64-mingw32/include/winuser.h:3429:1: DPD_DELETE_ALL_FILES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:541:1: DPD_DELETE_SPECIFIC_VERSION = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:540:1: DPD_DELETE_UNUSED_FILES = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:539:1: DRAFTMODE = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:240:1: DRAFT_QUALITY = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1143:1: DRAGDROP_E_FIRST = 2147746048 // /usr/x86_64-w64-mingw32/include/winerror.h:2347:1: DRAGDROP_E_LAST = 2147746063 // /usr/x86_64-w64-mingw32/include/winerror.h:2348:1: DRAGDROP_S_FIRST = 262400 // /usr/x86_64-w64-mingw32/include/winerror.h:2349:1: DRAGDROP_S_LAST = 262415 // /usr/x86_64-w64-mingw32/include/winerror.h:2350:1: DRAWPATTERNRECT = 25 // /usr/x86_64-w64-mingw32/include/wingdi.h:260:1: DRIVERSPECS_H = 0 // /usr/x86_64-w64-mingw32/include/driverspecs.h:10:1: DRIVERVERSION = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1511:1: DRIVER_KERNELMODE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:536:1: DRIVER_USERMODE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:537:1: DRIVE_CDROM = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:454:1: DRIVE_FIXED = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:452:1: DRIVE_NO_ROOT_DIR = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:450:1: DRIVE_RAMDISK = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:455:1: DRIVE_REMOTE = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:453:1: DRIVE_REMOVABLE = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:451:1: DRIVE_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:449:1: DROPEFFECT_COPY = 1 // /usr/x86_64-w64-mingw32/include/oleidl.h:3482:1: DROPEFFECT_LINK = 4 // /usr/x86_64-w64-mingw32/include/oleidl.h:3486:1: DROPEFFECT_MOVE = 2 // /usr/x86_64-w64-mingw32/include/oleidl.h:3484:1: DROPEFFECT_NONE = 0 // /usr/x86_64-w64-mingw32/include/oleidl.h:3480:1: DROPEFFECT_SCROLL = 2147483648 // /usr/x86_64-w64-mingw32/include/oleidl.h:3488:1: DRVCNF_CANCEL = 0x0000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:198:1: DRVCNF_OK = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:199:1: DRVCNF_RESTART = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:200:1: DRV_CANCEL = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:212:1: DRV_CLOSE = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:180:1: DRV_CONFIGURE = 0x0007 // /usr/x86_64-w64-mingw32/include/mmsystem.h:183:1: DRV_DISABLE = 0x0005 // /usr/x86_64-w64-mingw32/include/mmsystem.h:181:1: DRV_ENABLE = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:178:1: DRV_EXITSESSION = 0x000B // /usr/x86_64-w64-mingw32/include/mmsystem.h:187:1: DRV_FREE = 0x0006 // /usr/x86_64-w64-mingw32/include/mmsystem.h:182:1: DRV_INSTALL = 0x0009 // /usr/x86_64-w64-mingw32/include/mmsystem.h:185:1: DRV_LOAD = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:177:1: DRV_MCI_FIRST = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:215:1: DRV_MCI_LAST = 6143 // /usr/x86_64-w64-mingw32/include/mmsystem.h:216:1: DRV_OK = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:213:1: DRV_OPEN = 0x0003 // /usr/x86_64-w64-mingw32/include/mmsystem.h:179:1: DRV_POWER = 0x000F // /usr/x86_64-w64-mingw32/include/mmsystem.h:188:1: DRV_QUERYCONFIGURE = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:184:1: DRV_REMOVE = 0x000A // /usr/x86_64-w64-mingw32/include/mmsystem.h:186:1: DRV_RESERVED = 0x0800 // /usr/x86_64-w64-mingw32/include/mmsystem.h:189:1: DRV_RESTART = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:214:1: DRV_USER = 0x4000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:190:1: DSPRINT_PENDING = 0x80000000 // /usr/x86_64-w64-mingw32/include/winspool.h:151:1: DSPRINT_PUBLISH = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:147:1: DSPRINT_REPUBLISH = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:150:1: DSPRINT_UNPUBLISH = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:149:1: DSPRINT_UPDATE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:148:1: DSS_DISABLED = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:3518:1: DSS_HIDEPREFIX = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:3520:1: DSS_MONO = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:3519:1: DSS_NORMAL = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:3516:1: DSS_PREFIXONLY = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:3521:1: DSS_RIGHT = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:3522:1: DSS_UNION = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:3517:1: DST_BITMAP = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:3514:1: DST_COMPLEX = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:3510:1: DST_ICON = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:3513:1: DST_PREFIXTEXT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3512:1: DST_TEXT = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3511:1: DS_3DLOOK = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4640:1: DS_ABSALIGN = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4632:1: DS_CENTER = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4644:1: DS_CENTERMOUSE = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4645:1: DS_CONTEXTHELP = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4646:1: DS_CONTROL = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4643:1: DS_FIXEDSYS = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4641:1: DS_LOCALEDIT = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4634:1: DS_MODALFRAME = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4636:1: DS_NOFAILCREATE = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4642:1: DS_NOIDLEMSG = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4637:1: DS_SETFONT = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4635:1: DS_SETFOREGROUND = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4638:1: DS_SHELLFONT = 72 // /usr/x86_64-w64-mingw32/include/winuser.h:4648:1: DS_SYSMODAL = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4633:1: DS_S_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:1155:1: DTR_CONTROL_DISABLE = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:276:1: DTR_CONTROL_ENABLE = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:277:1: DTR_CONTROL_HANDSHAKE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:278:1: DT_BOTTOM = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:3444:1: DT_CALCRECT = 0x00000400 // /usr/x86_64-w64-mingw32/include/winuser.h:3451:1: DT_CENTER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3441:1: DT_CHARSTREAM = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1562:1: DT_DISPFILE = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1564:1: DT_EDITCONTROL = 0x00002000 // /usr/x86_64-w64-mingw32/include/winuser.h:3454:1: DT_END_ELLIPSIS = 0x00008000 // /usr/x86_64-w64-mingw32/include/winuser.h:3456:1: DT_EXPANDTABS = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:3447:1: DT_EXTERNALLEADING = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:3450:1: DT_HIDEPREFIX = 0x00100000 // /usr/x86_64-w64-mingw32/include/winuser.h:3461:1: DT_INTERNAL = 0x00001000 // /usr/x86_64-w64-mingw32/include/winuser.h:3453:1: DT_LEFT = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3440:1: DT_METAFILE = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1563:1: DT_MODIFYSTRING = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:3457:1: DT_NOCLIP = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:3449:1: DT_NOFULLWIDTHCHARBREAK = 0x00080000 // /usr/x86_64-w64-mingw32/include/winuser.h:3460:1: DT_NOPREFIX = 0x00000800 // /usr/x86_64-w64-mingw32/include/winuser.h:3452:1: DT_PATH_ELLIPSIS = 0x00004000 // /usr/x86_64-w64-mingw32/include/winuser.h:3455:1: DT_PLOTTER = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1558:1: DT_PREFIXONLY = 0x00200000 // /usr/x86_64-w64-mingw32/include/winuser.h:3462:1: DT_RASCAMERA = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1561:1: DT_RASDISPLAY = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1559:1: DT_RASPRINTER = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1560:1: DT_RIGHT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:3442:1: DT_RTLREADING = 0x00020000 // /usr/x86_64-w64-mingw32/include/winuser.h:3458:1: DT_SINGLELINE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:3446:1: DT_TABSTOP = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:3448:1: DT_TOP = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3439:1: DT_VCENTER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:3443:1: DT_WORDBREAK = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:3445:1: DT_WORD_ELLIPSIS = 0x00040000 // /usr/x86_64-w64-mingw32/include/winuser.h:3459:1: DUPLICATE = 0x06 // /usr/x86_64-w64-mingw32/include/nb30.h:83:1: DUPLICATE_CLOSE_SOURCE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5186:1: DUPLICATE_DEREG = 0x07 // /usr/x86_64-w64-mingw32/include/nb30.h:84:1: DUPLICATE_SAME_ACCESS = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5187:1: DWLP_MSGRESULT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4593:1: E2BIG = 7 // /usr/x86_64-w64-mingw32/include/errno.h:31:1: EACCES = 13 // /usr/x86_64-w64-mingw32/include/errno.h:37:1: EADDRINUSE = 100 // /usr/x86_64-w64-mingw32/include/errno.h:86:1: EADDRNOTAVAIL = 101 // /usr/x86_64-w64-mingw32/include/errno.h:90:1: EAFNOSUPPORT = 102 // /usr/x86_64-w64-mingw32/include/errno.h:82:1: EAGAIN = 11 // /usr/x86_64-w64-mingw32/include/errno.h:35:1: EALREADY = 103 // /usr/x86_64-w64-mingw32/include/errno.h:106:1: EASTEUROPE_CHARSET = 238 // /usr/x86_64-w64-mingw32/include/wingdi.h:1172:1: EBADF = 9 // /usr/x86_64-w64-mingw32/include/errno.h:33:1: EBADMSG = 104 // /usr/x86_64-w64-mingw32/include/errno.h:182:1: EBUSY = 16 // /usr/x86_64-w64-mingw32/include/errno.h:39:1: ECANCELED = 105 // /usr/x86_64-w64-mingw32/include/errno.h:154:1: ECHILD = 10 // /usr/x86_64-w64-mingw32/include/errno.h:34:1: ECONNABORTED = 106 // /usr/x86_64-w64-mingw32/include/errno.h:102:1: ECONNREFUSED = 107 // /usr/x86_64-w64-mingw32/include/errno.h:110:1: ECONNRESET = 108 // /usr/x86_64-w64-mingw32/include/errno.h:114:1: EC_DISABLE = 8 // /usr/x86_64-w64-mingw32/include/ddeml.h:199:1: EC_ENABLEALL = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:197:1: EC_ENABLEONE = 128 // /usr/x86_64-w64-mingw32/include/ddeml.h:198:1: EC_LEFTMARGIN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4413:1: EC_QUERYWAITING = 2 // /usr/x86_64-w64-mingw32/include/ddeml.h:200:1: EC_RIGHTMARGIN = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4414:1: EC_USEFONTINFO = 0xffff // /usr/x86_64-w64-mingw32/include/winuser.h:4415:1: EDD_GET_DEVICE_INTERFACE_NAME = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5616:1: EDEADLK = 36 // /usr/x86_64-w64-mingw32/include/errno.h:55:1: EDEADLOCK = 36 // /usr/x86_64-w64-mingw32/include/errno.h:71:1: EDESTADDRREQ = 109 // /usr/x86_64-w64-mingw32/include/errno.h:118:1: EDGE_BUMP = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:1675:1: EDGE_ETCHED = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:1674:1: EDGE_RAISED = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1672:1: EDGE_SUNKEN = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:1673:1: EDOM = 33 // /usr/x86_64-w64-mingw32/include/math.h:253:1: EDS_RAWMODE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5610:1: EDS_ROTATEDMODE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5611:1: EEInfoGCCOM = 11 // /usr/x86_64-w64-mingw32/include/rpcasync.h:106:1: EEInfoGCFRS = 12 // /usr/x86_64-w64-mingw32/include/rpcasync.h:107:1: EEInfoNextRecordsMissing = 2 // /usr/x86_64-w64-mingw32/include/rpcasync.h:103:1: EEInfoPreviousRecordsMissing = 1 // /usr/x86_64-w64-mingw32/include/rpcasync.h:102:1: EEInfoUseFileTime = 4 // /usr/x86_64-w64-mingw32/include/rpcasync.h:104:1: EEXIST = 17 // /usr/x86_64-w64-mingw32/include/errno.h:40:1: EFAULT = 14 // /usr/x86_64-w64-mingw32/include/errno.h:38:1: EFBIG = 27 // /usr/x86_64-w64-mingw32/include/errno.h:48:1: EFSRPC_SECURE_ONLY = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:1399:1: EFS_USE_RECOVERY_KEYS = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1394:1: EHOSTUNREACH = 110 // /usr/x86_64-w64-mingw32/include/errno.h:122:1: EIDRM = 111 // /usr/x86_64-w64-mingw32/include/errno.h:186:1: EILSEQ = 42 // /usr/x86_64-w64-mingw32/include/errno.h:66:1: EIMES_CANCELCOMPSTRINFOCUS = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4421:1: EIMES_COMPLETECOMPSTRKILLFOCUS = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4422:1: EIMES_GETCOMPSTRATONCE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4420:1: EINPROGRESS = 112 // /usr/x86_64-w64-mingw32/include/errno.h:158:1: EINTR = 4 // /usr/x86_64-w64-mingw32/include/errno.h:28:1: EINVAL = 22 // /usr/x86_64-w64-mingw32/include/errno.h:64:1: EIO = 5 // /usr/x86_64-w64-mingw32/include/errno.h:29:1: EISCONN = 113 // /usr/x86_64-w64-mingw32/include/errno.h:94:1: EISDIR = 21 // /usr/x86_64-w64-mingw32/include/errno.h:44:1: ELEMENT_STATUS_ACCESS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:1154:1: ELEMENT_STATUS_AVOLTAG = 0x20000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1167:1: ELEMENT_STATUS_EXCEPT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1153:1: ELEMENT_STATUS_EXENAB = 0x00000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:1155:1: ELEMENT_STATUS_FULL = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1151:1: ELEMENT_STATUS_ID_VALID = 0x00002000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1161:1: ELEMENT_STATUS_IMPEXP = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1152:1: ELEMENT_STATUS_INENAB = 0x00000020 // /usr/x86_64-w64-mingw32/include/winioctl.h:1156:1: ELEMENT_STATUS_INVERT = 0x00400000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1163:1: ELEMENT_STATUS_LUN_VALID = 0x00001000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1160:1: ELEMENT_STATUS_NOT_BUS = 0x00008000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1162:1: ELEMENT_STATUS_PRODUCT_DATA = 0x00000040 // /usr/x86_64-w64-mingw32/include/winioctl.h:1158:1: ELEMENT_STATUS_PVOLTAG = 0x10000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1166:1: ELEMENT_STATUS_SVALID = 0x00800000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1164:1: ELF_CULTURE_LATIN = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1391:1: ELF_VENDOR_SIZE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1356:1: ELF_VERSION = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1390:1: ELOOP = 114 // /usr/x86_64-w64-mingw32/include/errno.h:227:1: EMARCH_ENC_I17_IC_INST_WORD_POS_X = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:7021:1: EMARCH_ENC_I17_IC_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7019:1: EMARCH_ENC_I17_IC_SIZE_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7020:1: EMARCH_ENC_I17_IC_VAL_POS_X = 21 // /usr/x86_64-w64-mingw32/include/winnt.h:7022:1: EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:7026:1: EMARCH_ENC_I17_IMM41a_INST_WORD_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7024:1: EMARCH_ENC_I17_IMM41a_SIZE_X = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:7025:1: EMARCH_ENC_I17_IMM41a_VAL_POS_X = 22 // /usr/x86_64-w64-mingw32/include/winnt.h:7027:1: EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X = 24 // /usr/x86_64-w64-mingw32/include/winnt.h:7031:1: EMARCH_ENC_I17_IMM41b_INST_WORD_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7029:1: EMARCH_ENC_I17_IMM41b_SIZE_X = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:7030:1: EMARCH_ENC_I17_IMM41b_VAL_POS_X = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:7032:1: EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7036:1: EMARCH_ENC_I17_IMM41c_INST_WORD_X = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7034:1: EMARCH_ENC_I17_IMM41c_SIZE_X = 23 // /usr/x86_64-w64-mingw32/include/winnt.h:7035:1: EMARCH_ENC_I17_IMM41c_VAL_POS_X = 40 // /usr/x86_64-w64-mingw32/include/winnt.h:7037:1: EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:7016:1: EMARCH_ENC_I17_IMM5C_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7014:1: EMARCH_ENC_I17_IMM5C_SIZE_X = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7015:1: EMARCH_ENC_I17_IMM5C_VAL_POS_X = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:7017:1: EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7006:1: EMARCH_ENC_I17_IMM7B_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7004:1: EMARCH_ENC_I17_IMM7B_SIZE_X = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7005:1: EMARCH_ENC_I17_IMM7B_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7007:1: EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:7011:1: EMARCH_ENC_I17_IMM9D_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7009:1: EMARCH_ENC_I17_IMM9D_SIZE_X = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7010:1: EMARCH_ENC_I17_IMM9D_VAL_POS_X = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7012:1: EMARCH_ENC_I17_SIGN_INST_WORD_POS_X = 27 // /usr/x86_64-w64-mingw32/include/winnt.h:7041:1: EMARCH_ENC_I17_SIGN_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7039:1: EMARCH_ENC_I17_SIGN_SIZE_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7040:1: EMARCH_ENC_I17_SIGN_VAL_POS_X = 63 // /usr/x86_64-w64-mingw32/include/winnt.h:7042:1: EMBDHLP_CREATENOW = 0 // /usr/x86_64-w64-mingw32/include/ole2.h:33:1: EMBDHLP_DELAYCREATE = 65536 // /usr/x86_64-w64-mingw32/include/ole2.h:34:1: EMBDHLP_INPROC_HANDLER = 0 // /usr/x86_64-w64-mingw32/include/ole2.h:31:1: EMBDHLP_INPROC_SERVER = 1 // /usr/x86_64-w64-mingw32/include/ole2.h:32:1: EMFILE = 24 // /usr/x86_64-w64-mingw32/include/errno.h:46:1: EMLINK = 31 // /usr/x86_64-w64-mingw32/include/errno.h:52:1: EMR_ABORTPATH = 68 // /usr/x86_64-w64-mingw32/include/wingdi.h:3614:1: EMR_ALPHABLEND = 114 // /usr/x86_64-w64-mingw32/include/wingdi.h:3661:1: EMR_ANGLEARC = 41 // /usr/x86_64-w64-mingw32/include/wingdi.h:3587:1: EMR_ARC = 45 // /usr/x86_64-w64-mingw32/include/wingdi.h:3591:1: EMR_ARCTO = 55 // /usr/x86_64-w64-mingw32/include/wingdi.h:3601:1: EMR_BEGINPATH = 59 // /usr/x86_64-w64-mingw32/include/wingdi.h:3605:1: EMR_BITBLT = 76 // /usr/x86_64-w64-mingw32/include/wingdi.h:3622:1: EMR_CHORD = 46 // /usr/x86_64-w64-mingw32/include/wingdi.h:3592:1: EMR_CLOSEFIGURE = 61 // /usr/x86_64-w64-mingw32/include/wingdi.h:3607:1: EMR_COLORCORRECTPALETTE = 111 // /usr/x86_64-w64-mingw32/include/wingdi.h:3658:1: EMR_COLORMATCHTOTARGETW = 121 // /usr/x86_64-w64-mingw32/include/wingdi.h:3668:1: EMR_CREATEBRUSHINDIRECT = 39 // /usr/x86_64-w64-mingw32/include/wingdi.h:3585:1: EMR_CREATECOLORSPACE = 99 // /usr/x86_64-w64-mingw32/include/wingdi.h:3646:1: EMR_CREATECOLORSPACEW = 122 // /usr/x86_64-w64-mingw32/include/wingdi.h:3669:1: EMR_CREATEDIBPATTERNBRUSHPT = 94 // /usr/x86_64-w64-mingw32/include/wingdi.h:3640:1: EMR_CREATEMONOBRUSH = 93 // /usr/x86_64-w64-mingw32/include/wingdi.h:3639:1: EMR_CREATEPALETTE = 49 // /usr/x86_64-w64-mingw32/include/wingdi.h:3595:1: EMR_CREATEPEN = 38 // /usr/x86_64-w64-mingw32/include/wingdi.h:3584:1: EMR_DELETECOLORSPACE = 101 // /usr/x86_64-w64-mingw32/include/wingdi.h:3648:1: EMR_DELETEOBJECT = 40 // /usr/x86_64-w64-mingw32/include/wingdi.h:3586:1: EMR_ELLIPSE = 42 // /usr/x86_64-w64-mingw32/include/wingdi.h:3588:1: EMR_ENDPATH = 60 // /usr/x86_64-w64-mingw32/include/wingdi.h:3606:1: EMR_EOF = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:3560:1: EMR_EXCLUDECLIPRECT = 29 // /usr/x86_64-w64-mingw32/include/wingdi.h:3575:1: EMR_EXTCREATEFONTINDIRECTW = 82 // /usr/x86_64-w64-mingw32/include/wingdi.h:3628:1: EMR_EXTCREATEPEN = 95 // /usr/x86_64-w64-mingw32/include/wingdi.h:3641:1: EMR_EXTFLOODFILL = 53 // /usr/x86_64-w64-mingw32/include/wingdi.h:3599:1: EMR_EXTSELECTCLIPRGN = 75 // /usr/x86_64-w64-mingw32/include/wingdi.h:3621:1: EMR_EXTTEXTOUTA = 83 // /usr/x86_64-w64-mingw32/include/wingdi.h:3629:1: EMR_EXTTEXTOUTW = 84 // /usr/x86_64-w64-mingw32/include/wingdi.h:3630:1: EMR_FILLPATH = 62 // /usr/x86_64-w64-mingw32/include/wingdi.h:3608:1: EMR_FILLRGN = 71 // /usr/x86_64-w64-mingw32/include/wingdi.h:3617:1: EMR_FLATTENPATH = 65 // /usr/x86_64-w64-mingw32/include/wingdi.h:3611:1: EMR_FRAMERGN = 72 // /usr/x86_64-w64-mingw32/include/wingdi.h:3618:1: EMR_GDICOMMENT = 70 // /usr/x86_64-w64-mingw32/include/wingdi.h:3616:1: EMR_GLSBOUNDEDRECORD = 103 // /usr/x86_64-w64-mingw32/include/wingdi.h:3650:1: EMR_GLSRECORD = 102 // /usr/x86_64-w64-mingw32/include/wingdi.h:3649:1: EMR_GRADIENTFILL = 118 // /usr/x86_64-w64-mingw32/include/wingdi.h:3665:1: EMR_HEADER = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:3547:1: EMR_INTERSECTCLIPRECT = 30 // /usr/x86_64-w64-mingw32/include/wingdi.h:3576:1: EMR_INVERTRGN = 73 // /usr/x86_64-w64-mingw32/include/wingdi.h:3619:1: EMR_LINETO = 54 // /usr/x86_64-w64-mingw32/include/wingdi.h:3600:1: EMR_MASKBLT = 78 // /usr/x86_64-w64-mingw32/include/wingdi.h:3624:1: EMR_MAX = 122 // /usr/x86_64-w64-mingw32/include/wingdi.h:3673:1: EMR_MIN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:3671:1: EMR_MODIFYWORLDTRANSFORM = 36 // /usr/x86_64-w64-mingw32/include/wingdi.h:3582:1: EMR_MOVETOEX = 27 // /usr/x86_64-w64-mingw32/include/wingdi.h:3573:1: EMR_OFFSETCLIPRGN = 26 // /usr/x86_64-w64-mingw32/include/wingdi.h:3572:1: EMR_PAINTRGN = 74 // /usr/x86_64-w64-mingw32/include/wingdi.h:3620:1: EMR_PIE = 47 // /usr/x86_64-w64-mingw32/include/wingdi.h:3593:1: EMR_PIXELFORMAT = 104 // /usr/x86_64-w64-mingw32/include/wingdi.h:3651:1: EMR_PLGBLT = 79 // /usr/x86_64-w64-mingw32/include/wingdi.h:3625:1: EMR_POLYBEZIER = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:3548:1: EMR_POLYBEZIER16 = 85 // /usr/x86_64-w64-mingw32/include/wingdi.h:3631:1: EMR_POLYBEZIERTO = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:3551:1: EMR_POLYBEZIERTO16 = 88 // /usr/x86_64-w64-mingw32/include/wingdi.h:3634:1: EMR_POLYDRAW = 56 // /usr/x86_64-w64-mingw32/include/wingdi.h:3602:1: EMR_POLYDRAW16 = 92 // /usr/x86_64-w64-mingw32/include/wingdi.h:3638:1: EMR_POLYGON = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:3549:1: EMR_POLYGON16 = 86 // /usr/x86_64-w64-mingw32/include/wingdi.h:3632:1: EMR_POLYLINE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:3550:1: EMR_POLYLINE16 = 87 // /usr/x86_64-w64-mingw32/include/wingdi.h:3633:1: EMR_POLYLINETO = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:3552:1: EMR_POLYLINETO16 = 89 // /usr/x86_64-w64-mingw32/include/wingdi.h:3635:1: EMR_POLYPOLYGON = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:3554:1: EMR_POLYPOLYGON16 = 91 // /usr/x86_64-w64-mingw32/include/wingdi.h:3637:1: EMR_POLYPOLYLINE = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:3553:1: EMR_POLYPOLYLINE16 = 90 // /usr/x86_64-w64-mingw32/include/wingdi.h:3636:1: EMR_POLYTEXTOUTA = 96 // /usr/x86_64-w64-mingw32/include/wingdi.h:3642:1: EMR_POLYTEXTOUTW = 97 // /usr/x86_64-w64-mingw32/include/wingdi.h:3643:1: EMR_REALIZEPALETTE = 52 // /usr/x86_64-w64-mingw32/include/wingdi.h:3598:1: EMR_RECTANGLE = 43 // /usr/x86_64-w64-mingw32/include/wingdi.h:3589:1: EMR_RESERVED_105 = 105 // /usr/x86_64-w64-mingw32/include/wingdi.h:3652:1: EMR_RESERVED_106 = 106 // /usr/x86_64-w64-mingw32/include/wingdi.h:3653:1: EMR_RESERVED_107 = 107 // /usr/x86_64-w64-mingw32/include/wingdi.h:3654:1: EMR_RESERVED_108 = 108 // /usr/x86_64-w64-mingw32/include/wingdi.h:3655:1: EMR_RESERVED_109 = 109 // /usr/x86_64-w64-mingw32/include/wingdi.h:3656:1: EMR_RESERVED_110 = 110 // /usr/x86_64-w64-mingw32/include/wingdi.h:3657:1: EMR_RESERVED_117 = 117 // /usr/x86_64-w64-mingw32/include/wingdi.h:3664:1: EMR_RESERVED_119 = 119 // /usr/x86_64-w64-mingw32/include/wingdi.h:3666:1: EMR_RESERVED_120 = 120 // /usr/x86_64-w64-mingw32/include/wingdi.h:3667:1: EMR_RESIZEPALETTE = 51 // /usr/x86_64-w64-mingw32/include/wingdi.h:3597:1: EMR_RESTOREDC = 34 // /usr/x86_64-w64-mingw32/include/wingdi.h:3580:1: EMR_ROUNDRECT = 44 // /usr/x86_64-w64-mingw32/include/wingdi.h:3590:1: EMR_SAVEDC = 33 // /usr/x86_64-w64-mingw32/include/wingdi.h:3579:1: EMR_SCALEVIEWPORTEXTEX = 31 // /usr/x86_64-w64-mingw32/include/wingdi.h:3577:1: EMR_SCALEWINDOWEXTEX = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:3578:1: EMR_SELECTCLIPPATH = 67 // /usr/x86_64-w64-mingw32/include/wingdi.h:3613:1: EMR_SELECTOBJECT = 37 // /usr/x86_64-w64-mingw32/include/wingdi.h:3583:1: EMR_SELECTPALETTE = 48 // /usr/x86_64-w64-mingw32/include/wingdi.h:3594:1: EMR_SETARCDIRECTION = 57 // /usr/x86_64-w64-mingw32/include/wingdi.h:3603:1: EMR_SETBKCOLOR = 25 // /usr/x86_64-w64-mingw32/include/wingdi.h:3571:1: EMR_SETBKMODE = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:3564:1: EMR_SETBRUSHORGEX = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:3559:1: EMR_SETCOLORADJUSTMENT = 23 // /usr/x86_64-w64-mingw32/include/wingdi.h:3569:1: EMR_SETCOLORSPACE = 100 // /usr/x86_64-w64-mingw32/include/wingdi.h:3647:1: EMR_SETDIBITSTODEVICE = 80 // /usr/x86_64-w64-mingw32/include/wingdi.h:3626:1: EMR_SETICMMODE = 98 // /usr/x86_64-w64-mingw32/include/wingdi.h:3645:1: EMR_SETICMPROFILEA = 112 // /usr/x86_64-w64-mingw32/include/wingdi.h:3659:1: EMR_SETICMPROFILEW = 113 // /usr/x86_64-w64-mingw32/include/wingdi.h:3660:1: EMR_SETLAYOUT = 115 // /usr/x86_64-w64-mingw32/include/wingdi.h:3662:1: EMR_SETMAPMODE = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:3563:1: EMR_SETMAPPERFLAGS = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:3562:1: EMR_SETMETARGN = 28 // /usr/x86_64-w64-mingw32/include/wingdi.h:3574:1: EMR_SETMITERLIMIT = 58 // /usr/x86_64-w64-mingw32/include/wingdi.h:3604:1: EMR_SETPALETTEENTRIES = 50 // /usr/x86_64-w64-mingw32/include/wingdi.h:3596:1: EMR_SETPIXELV = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:3561:1: EMR_SETPOLYFILLMODE = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:3565:1: EMR_SETROP2 = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:3566:1: EMR_SETSTRETCHBLTMODE = 21 // /usr/x86_64-w64-mingw32/include/wingdi.h:3567:1: EMR_SETTEXTALIGN = 22 // /usr/x86_64-w64-mingw32/include/wingdi.h:3568:1: EMR_SETTEXTCOLOR = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:3570:1: EMR_SETVIEWPORTEXTEX = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:3557:1: EMR_SETVIEWPORTORGEX = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:3558:1: EMR_SETWINDOWEXTEX = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:3555:1: EMR_SETWINDOWORGEX = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:3556:1: EMR_SETWORLDTRANSFORM = 35 // /usr/x86_64-w64-mingw32/include/wingdi.h:3581:1: EMR_STRETCHBLT = 77 // /usr/x86_64-w64-mingw32/include/wingdi.h:3623:1: EMR_STRETCHDIBITS = 81 // /usr/x86_64-w64-mingw32/include/wingdi.h:3627:1: EMR_STROKEANDFILLPATH = 63 // /usr/x86_64-w64-mingw32/include/wingdi.h:3609:1: EMR_STROKEPATH = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:3610:1: EMR_TRANSPARENTBLT = 116 // /usr/x86_64-w64-mingw32/include/wingdi.h:3663:1: EMR_WIDENPATH = 66 // /usr/x86_64-w64-mingw32/include/wingdi.h:3612:1: EMSGSIZE = 115 // /usr/x86_64-w64-mingw32/include/errno.h:126:1: EMSIS_COMPOSITIONSTRING = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4418:1: EM_CANUNDO = 0x00C6 // /usr/x86_64-w64-mingw32/include/winuser.h:4445:1: EM_CHARFROMPOS = 0x00D7 // /usr/x86_64-w64-mingw32/include/winuser.h:4462:1: EM_EMPTYUNDOBUFFER = 0x00CD // /usr/x86_64-w64-mingw32/include/winuser.h:4451:1: EM_FMTLINES = 0x00C8 // /usr/x86_64-w64-mingw32/include/winuser.h:4447:1: EM_GETFIRSTVISIBLELINE = 0x00CE // /usr/x86_64-w64-mingw32/include/winuser.h:4452:1: EM_GETHANDLE = 0x00BD // /usr/x86_64-w64-mingw32/include/winuser.h:4439:1: EM_GETIMESTATUS = 0x00D9 // /usr/x86_64-w64-mingw32/include/winuser.h:4464:1: EM_GETLIMITTEXT = 0x00D5 // /usr/x86_64-w64-mingw32/include/winuser.h:4460:1: EM_GETLINE = 0x00C4 // /usr/x86_64-w64-mingw32/include/winuser.h:4443:1: EM_GETLINECOUNT = 0x00BA // /usr/x86_64-w64-mingw32/include/winuser.h:4436:1: EM_GETMARGINS = 0x00D4 // /usr/x86_64-w64-mingw32/include/winuser.h:4458:1: EM_GETMODIFY = 0x00B8 // /usr/x86_64-w64-mingw32/include/winuser.h:4434:1: EM_GETPASSWORDCHAR = 0x00D2 // /usr/x86_64-w64-mingw32/include/winuser.h:4456:1: EM_GETRECT = 0x00B2 // /usr/x86_64-w64-mingw32/include/winuser.h:4428:1: EM_GETSEL = 0x00B0 // /usr/x86_64-w64-mingw32/include/winuser.h:4426:1: EM_GETTHUMB = 0x00BE // /usr/x86_64-w64-mingw32/include/winuser.h:4440:1: EM_GETWORDBREAKPROC = 0x00D1 // /usr/x86_64-w64-mingw32/include/winuser.h:4455:1: EM_LIMITTEXT = 0x00C5 // /usr/x86_64-w64-mingw32/include/winuser.h:4444:1: EM_LINEFROMCHAR = 0x00C9 // /usr/x86_64-w64-mingw32/include/winuser.h:4448:1: EM_LINEINDEX = 0x00BB // /usr/x86_64-w64-mingw32/include/winuser.h:4437:1: EM_LINELENGTH = 0x00C1 // /usr/x86_64-w64-mingw32/include/winuser.h:4441:1: EM_LINESCROLL = 0x00B6 // /usr/x86_64-w64-mingw32/include/winuser.h:4432:1: EM_POSFROMCHAR = 0x00D6 // /usr/x86_64-w64-mingw32/include/winuser.h:4461:1: EM_REPLACESEL = 0x00C2 // /usr/x86_64-w64-mingw32/include/winuser.h:4442:1: EM_SCROLL = 0x00B5 // /usr/x86_64-w64-mingw32/include/winuser.h:4431:1: EM_SCROLLCARET = 0x00B7 // /usr/x86_64-w64-mingw32/include/winuser.h:4433:1: EM_SETHANDLE = 0x00BC // /usr/x86_64-w64-mingw32/include/winuser.h:4438:1: EM_SETIMESTATUS = 0x00D8 // /usr/x86_64-w64-mingw32/include/winuser.h:4463:1: EM_SETLIMITTEXT = 197 // /usr/x86_64-w64-mingw32/include/winuser.h:4459:1: EM_SETMARGINS = 0x00D3 // /usr/x86_64-w64-mingw32/include/winuser.h:4457:1: EM_SETMODIFY = 0x00B9 // /usr/x86_64-w64-mingw32/include/winuser.h:4435:1: EM_SETPASSWORDCHAR = 0x00CC // /usr/x86_64-w64-mingw32/include/winuser.h:4450:1: EM_SETREADONLY = 0x00CF // /usr/x86_64-w64-mingw32/include/winuser.h:4453:1: EM_SETRECT = 0x00B3 // /usr/x86_64-w64-mingw32/include/winuser.h:4429:1: EM_SETRECTNP = 0x00B4 // /usr/x86_64-w64-mingw32/include/winuser.h:4430:1: EM_SETSEL = 0x00B1 // /usr/x86_64-w64-mingw32/include/winuser.h:4427:1: EM_SETTABSTOPS = 0x00CB // /usr/x86_64-w64-mingw32/include/winuser.h:4449:1: EM_SETWORDBREAKPROC = 0x00D0 // /usr/x86_64-w64-mingw32/include/winuser.h:4454:1: EM_UNDO = 0x00C7 // /usr/x86_64-w64-mingw32/include/winuser.h:4446:1: ENABLEDUPLEX = 28 // /usr/x86_64-w64-mingw32/include/wingdi.h:263:1: ENABLEPAIRKERNING = 769 // /usr/x86_64-w64-mingw32/include/wingdi.h:284:1: ENABLERELATIVEWIDTHS = 768 // /usr/x86_64-w64-mingw32/include/wingdi.h:283:1: ENABLE_AUTO_POSITION = 0x100 // /usr/x86_64-w64-mingw32/include/wincon.h:184:1: ENABLE_DISABLE_AUTOSAVE = 0xD2 // /usr/x86_64-w64-mingw32/include/winioctl.h:960:1: ENABLE_DISABLE_AUTO_OFFLINE = 0xDB // /usr/x86_64-w64-mingw32/include/winioctl.h:968:1: ENABLE_ECHO_INPUT = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:178:1: ENABLE_EXTENDED_FLAGS = 0x80 // /usr/x86_64-w64-mingw32/include/wincon.h:183:1: ENABLE_INSERT_MODE = 0x20 // /usr/x86_64-w64-mingw32/include/wincon.h:181:1: ENABLE_LINE_INPUT = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:177:1: ENABLE_LVB_GRID_WORLDWIDE = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:191:1: ENABLE_MOUSE_INPUT = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:180:1: ENABLE_PROCESSED_INPUT = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:176:1: ENABLE_PROCESSED_OUTPUT = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:187:1: ENABLE_QUICK_EDIT_MODE = 0x40 // /usr/x86_64-w64-mingw32/include/wincon.h:182:1: ENABLE_SMART = 0xD8 // /usr/x86_64-w64-mingw32/include/winioctl.h:965:1: ENABLE_VIRTUAL_TERMINAL_INPUT = 0x200 // /usr/x86_64-w64-mingw32/include/wincon.h:185:1: ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:189:1: ENABLE_WINDOW_INPUT = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:179:1: ENABLE_WRAP_AT_EOL_OUTPUT = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:188:1: ENAMETOOLONG = 38 // /usr/x86_64-w64-mingw32/include/errno.h:56:1: ENAME_NAME = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18269:1: ENAME_SPAN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18270:1: ENAME_TAB = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18271:1: ENCAPSULATED_POSTSCRIPT = 4116 // /usr/x86_64-w64-mingw32/include/wingdi.h:312:1: ENCRYPTION_FORMAT_DEFAULT = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1717:1: ENDDOC = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:244:1: ENDSESSION_CLOSEAPP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2012:1: ENDSESSION_CRITICAL = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2013:1: ENDSESSION_LOGOFF = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2014:1: END_INTERFACE = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:101:1: END_PATH = 4098 // /usr/x86_64-w64-mingw32/include/wingdi.h:295:1: ENETDOWN = 116 // /usr/x86_64-w64-mingw32/include/errno.h:130:1: ENETRESET = 117 // /usr/x86_64-w64-mingw32/include/errno.h:134:1: ENETUNREACH = 118 // /usr/x86_64-w64-mingw32/include/errno.h:138:1: ENFILE = 23 // /usr/x86_64-w64-mingw32/include/errno.h:45:1: ENHANCED_KEY = 0x100 // /usr/x86_64-w64-mingw32/include/wincon.h:52:1: ENHMETA_SIGNATURE = 0x464D4520 // /usr/x86_64-w64-mingw32/include/wingdi.h:3544:1: ENHMETA_STOCK_OBJECT = 0x80000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:3545:1: ENLISTMENT_ALL_ACCESS = 983071 // /usr/x86_64-w64-mingw32/include/winnt.h:8995:1: ENLISTMENT_GENERIC_EXECUTE = 131100 // /usr/x86_64-w64-mingw32/include/winnt.h:8994:1: ENLISTMENT_GENERIC_READ = 131073 // /usr/x86_64-w64-mingw32/include/winnt.h:8992:1: ENLISTMENT_GENERIC_WRITE = 131102 // /usr/x86_64-w64-mingw32/include/winnt.h:8993:1: ENLISTMENT_MAXIMUM_OPTION = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:36:1: ENLISTMENT_QUERY_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8986:1: ENLISTMENT_RECOVER = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8988:1: ENLISTMENT_SET_INFORMATION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8987:1: ENLISTMENT_SUBORDINATE_RIGHTS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8989:1: ENLISTMENT_SUPERIOR = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:35:1: ENLISTMENT_SUPERIOR_RIGHTS = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:8990:1: ENOBUFS = 119 // /usr/x86_64-w64-mingw32/include/errno.h:98:1: ENODATA = 120 // /usr/x86_64-w64-mingw32/include/errno.h:190:1: ENODEV = 19 // /usr/x86_64-w64-mingw32/include/errno.h:42:1: ENOENT = 2 // /usr/x86_64-w64-mingw32/include/errno.h:25:1: ENOEXEC = 8 // /usr/x86_64-w64-mingw32/include/errno.h:32:1: ENOFILE = 2 // /usr/x86_64-w64-mingw32/include/errno.h:26:1: ENOLCK = 39 // /usr/x86_64-w64-mingw32/include/errno.h:57:1: ENOLINK = 121 // /usr/x86_64-w64-mingw32/include/errno.h:194:1: ENOMEM = 12 // /usr/x86_64-w64-mingw32/include/errno.h:36:1: ENOMSG = 122 // /usr/x86_64-w64-mingw32/include/errno.h:198:1: ENOPROTOOPT = 123 // /usr/x86_64-w64-mingw32/include/errno.h:142:1: ENOSPC = 28 // /usr/x86_64-w64-mingw32/include/errno.h:49:1: ENOSR = 124 // /usr/x86_64-w64-mingw32/include/errno.h:202:1: ENOSTR = 125 // /usr/x86_64-w64-mingw32/include/errno.h:206:1: ENOSYS = 40 // /usr/x86_64-w64-mingw32/include/errno.h:58:1: ENOTCONN = 126 // /usr/x86_64-w64-mingw32/include/errno.h:150:1: ENOTDIR = 20 // /usr/x86_64-w64-mingw32/include/errno.h:43:1: ENOTEMPTY = 41 // /usr/x86_64-w64-mingw32/include/errno.h:59:1: ENOTRECOVERABLE = 127 // /usr/x86_64-w64-mingw32/include/errno.h:210:1: ENOTSOCK = 128 // /usr/x86_64-w64-mingw32/include/errno.h:146:1: ENOTSUP = 129 // /usr/x86_64-w64-mingw32/include/errno.h:76:1: ENOTTY = 25 // /usr/x86_64-w64-mingw32/include/errno.h:47:1: ENUMPAPERBINS = 31 // /usr/x86_64-w64-mingw32/include/wingdi.h:266:1: ENUMPAPERMETRICS = 34 // /usr/x86_64-w64-mingw32/include/wingdi.h:269:1: ENUM_ALL_CALENDARS = 0xffffffff // /usr/x86_64-w64-mingw32/include/winnls.h:574:1: ENUM_E_FIRST = 2147746224 // /usr/x86_64-w64-mingw32/include/winerror.h:2424:1: ENUM_E_LAST = 2147746239 // /usr/x86_64-w64-mingw32/include/winerror.h:2425:1: ENUM_S_FIRST = 262576 // /usr/x86_64-w64-mingw32/include/winerror.h:2426:1: ENUM_S_LAST = 262591 // /usr/x86_64-w64-mingw32/include/winerror.h:2427:1: ENXIO = 6 // /usr/x86_64-w64-mingw32/include/errno.h:30:1: EN_ALIGN_LTR_EC = 0x0700 // /usr/x86_64-w64-mingw32/include/winuser.h:4405:1: EN_ALIGN_RTL_EC = 0x0701 // /usr/x86_64-w64-mingw32/include/winuser.h:4406:1: EN_CHANGE = 0x0300 // /usr/x86_64-w64-mingw32/include/winuser.h:4398:1: EN_ERRSPACE = 0x0500 // /usr/x86_64-w64-mingw32/include/winuser.h:4400:1: EN_HSCROLL = 0x0601 // /usr/x86_64-w64-mingw32/include/winuser.h:4402:1: EN_KILLFOCUS = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:4397:1: EN_MAXTEXT = 0x0501 // /usr/x86_64-w64-mingw32/include/winuser.h:4401:1: EN_SETFOCUS = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:4396:1: EN_UPDATE = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:4399:1: EN_VSCROLL = 0x0602 // /usr/x86_64-w64-mingw32/include/winuser.h:4403:1: EOF = -1 // /usr/x86_64-w64-mingw32/include/stdio.h:21:1: EOPNOTSUPP = 130 // /usr/x86_64-w64-mingw32/include/errno.h:162:1: EOVERFLOW = 132 // /usr/x86_64-w64-mingw32/include/errno.h:235:1: EOWNERDEAD = 133 // /usr/x86_64-w64-mingw32/include/errno.h:170:1: EPERM = 1 // /usr/x86_64-w64-mingw32/include/errno.h:24:1: EPIPE = 32 // /usr/x86_64-w64-mingw32/include/errno.h:53:1: EPROTO = 134 // /usr/x86_64-w64-mingw32/include/errno.h:174:1: EPROTONOSUPPORT = 135 // /usr/x86_64-w64-mingw32/include/errno.h:178:1: EPROTOTYPE = 136 // /usr/x86_64-w64-mingw32/include/errno.h:231:1: EPSPRINTING = 33 // /usr/x86_64-w64-mingw32/include/wingdi.h:268:1: EPS_SIGNATURE = 0x46535045 // /usr/x86_64-w64-mingw32/include/wingdi.h:4282:1: EPT_S_CANT_CREATE = 1899 // /usr/x86_64-w64-mingw32/include/winerror.h:822:1: EPT_S_CANT_PERFORM_OP = 1752 // /usr/x86_64-w64-mingw32/include/winerror.h:741:1: EPT_S_INVALID_ENTRY = 1751 // /usr/x86_64-w64-mingw32/include/winerror.h:740:1: EPT_S_NOT_REGISTERED = 1753 // /usr/x86_64-w64-mingw32/include/winerror.h:742:1: EP_Agg = 0x000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18120:1: EP_CanBeNull = 0x100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18136:1: EP_Collate = 0x000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18124:1: EP_Commuted = 0x000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18125:1: EP_ConstFunc = 0x080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18135:1: EP_DblQuoted = 0x000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18122:1: EP_Distinct = 0x000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18117:1: EP_FixedCol = 0x000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18119:1: EP_FromDDL = 0x40000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18146:1: EP_FromJoin = 0x000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18116:1: EP_HasFunc = 0x000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18118:1: EP_IfNullRow = 0x020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18133:1: EP_Immutable = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18178:1: EP_InfixFunc = 0x000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18123:1: EP_IntValue = 0x000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18126:1: EP_IsFalse = 0x20000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18145:1: EP_IsTrue = 0x10000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18144:1: EP_Leaf = 0x800000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18139:1: EP_MemToken = 0x010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18132:1: EP_NoReduce = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18177:1: EP_Propagate = 2097412 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18152:1: EP_Quoted = 0x4000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18142:1: EP_Reduced = 0x002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18129:1: EP_Skip = 0x001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18128:1: EP_Static = 0x8000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18143:1: EP_Subquery = 0x200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18137:1: EP_Subrtn = 0x2000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18141:1: EP_TokenOnly = 0x004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18130:1: EP_Unlikely = 0x040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18134:1: EP_VarSelect = 0x000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18121:1: EP_Win = 0x008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18131:1: EP_WinFunc = 0x1000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18140:1: EP_xIsSelect = 0x000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18127:1: ERANGE = 34 // /usr/x86_64-w64-mingw32/include/math.h:254:1: EROFS = 30 // /usr/x86_64-w64-mingw32/include/errno.h:51:1: ERROR = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:75:1: ERROR_ABANDONED_WAIT_0 = 735 // /usr/x86_64-w64-mingw32/include/winerror.h:256:1: ERROR_ABANDONED_WAIT_63 = 736 // /usr/x86_64-w64-mingw32/include/winerror.h:257:1: ERROR_ACCESS_DENIED = 5 // /usr/x86_64-w64-mingw32/include/winerror.h:50:1: ERROR_ACCESS_DISABLED_BY_POLICY = 1260 // /usr/x86_64-w64-mingw32/include/winerror.h:450:1: ERROR_ACCESS_DISABLED_WEBBLADE = 1277 // /usr/x86_64-w64-mingw32/include/winerror.h:461:1: ERROR_ACCESS_DISABLED_WEBBLADE_TAMPER = 1278 // /usr/x86_64-w64-mingw32/include/winerror.h:462:1: ERROR_ACCOUNT_DISABLED = 1331 // /usr/x86_64-w64-mingw32/include/winerror.h:503:1: ERROR_ACCOUNT_EXPIRED = 1793 // /usr/x86_64-w64-mingw32/include/winerror.h:781:1: ERROR_ACCOUNT_LOCKED_OUT = 1909 // /usr/x86_64-w64-mingw32/include/winerror.h:832:1: ERROR_ACCOUNT_RESTRICTION = 1327 // /usr/x86_64-w64-mingw32/include/winerror.h:499:1: ERROR_ACTIVATION_COUNT_EXCEEDED = 7059 // /usr/x86_64-w64-mingw32/include/winerror.h:1137:1: ERROR_ACTIVE_CONNECTIONS = 2402 // /usr/x86_64-w64-mingw32/include/winerror.h:884:1: ERROR_ADAP_HDW_ERR = 57 // /usr/x86_64-w64-mingw32/include/winerror.h:90:1: ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227 // /usr/x86_64-w64-mingw32/include/winerror.h:417:1: ERROR_ADDRESS_NOT_ASSOCIATED = 1228 // /usr/x86_64-w64-mingw32/include/winerror.h:418:1: ERROR_ADVANCED_INSTALLER_FAILED = 14099 // /usr/x86_64-w64-mingw32/include/winerror.h:1899:1: ERROR_ALERTED = 739 // /usr/x86_64-w64-mingw32/include/winerror.h:260:1: ERROR_ALIAS_EXISTS = 1379 // /usr/x86_64-w64-mingw32/include/winerror.h:550:1: ERROR_ALLOTTED_SPACE_EXCEEDED = 1344 // /usr/x86_64-w64-mingw32/include/winerror.h:515:1: ERROR_ALL_NODES_NOT_AVAILABLE = 5037 // /usr/x86_64-w64-mingw32/include/winerror.h:1011:1: ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = 1933 // /usr/x86_64-w64-mingw32/include/winerror.h:856:1: ERROR_ALREADY_ASSIGNED = 85 // /usr/x86_64-w64-mingw32/include/winerror.h:110:1: ERROR_ALREADY_EXISTS = 183 // /usr/x86_64-w64-mingw32/include/winerror.h:183:1: ERROR_ALREADY_FIBER = 1280 // /usr/x86_64-w64-mingw32/include/winerror.h:464:1: ERROR_ALREADY_INITIALIZED = 1247 // /usr/x86_64-w64-mingw32/include/winerror.h:437:1: ERROR_ALREADY_REGISTERED = 1242 // /usr/x86_64-w64-mingw32/include/winerror.h:432:1: ERROR_ALREADY_RUNNING_LKG = 1074 // /usr/x86_64-w64-mingw32/include/winerror.h:312:1: ERROR_ALREADY_THREAD = 1281 // /usr/x86_64-w64-mingw32/include/winerror.h:465:1: ERROR_ALREADY_WAITING = 1904 // /usr/x86_64-w64-mingw32/include/winerror.h:827:1: ERROR_AMBIGUOUS_SYSTEM_DEVICE = 15250 // /usr/x86_64-w64-mingw32/include/winerror.h:2153:1: ERROR_API_UNAVAILABLE = 15841 // /usr/x86_64-w64-mingw32/include/winerror.h:2221:1: ERROR_APPHELP_BLOCK = 1259 // /usr/x86_64-w64-mingw32/include/winerror.h:449:1: ERROR_APPX_INTEGRITY_FAILURE_CLR_NGEN = 15624 // /usr/x86_64-w64-mingw32/include/winerror.h:2195:1: ERROR_APP_WRONG_OS = 1151 // /usr/x86_64-w64-mingw32/include/winerror.h:360:1: ERROR_ARENA_TRASHED = 7 // /usr/x86_64-w64-mingw32/include/winerror.h:52:1: ERROR_ARITHMETIC_OVERFLOW = 534 // /usr/x86_64-w64-mingw32/include/winerror.h:248:1: ERROR_ATOMIC_LOCKS_NOT_SUPPORTED = 174 // /usr/x86_64-w64-mingw32/include/winerror.h:180:1: ERROR_AUTHENTICATION_FIREWALL_FAILED = 1935 // /usr/x86_64-w64-mingw32/include/winerror.h:858:1: ERROR_AUTHIP_FAILURE = 1469 // /usr/x86_64-w64-mingw32/include/winerror.h:640:1: ERROR_AUTODATASEG_EXCEEDS_64k = 199 // /usr/x86_64-w64-mingw32/include/winerror.h:197:1: ERROR_BADDB = 1009 // /usr/x86_64-w64-mingw32/include/winerror.h:275:1: ERROR_BADKEY = 1010 // /usr/x86_64-w64-mingw32/include/winerror.h:276:1: ERROR_BAD_ARGUMENTS = 160 // /usr/x86_64-w64-mingw32/include/winerror.h:173:1: ERROR_BAD_COMMAND = 22 // /usr/x86_64-w64-mingw32/include/winerror.h:67:1: ERROR_BAD_CONFIGURATION = 1610 // /usr/x86_64-w64-mingw32/include/winerror.h:656:1: ERROR_BAD_DESCRIPTOR_FORMAT = 1361 // /usr/x86_64-w64-mingw32/include/winerror.h:532:1: ERROR_BAD_DEVICE = 1200 // /usr/x86_64-w64-mingw32/include/winerror.h:390:1: ERROR_BAD_DEV_TYPE = 66 // /usr/x86_64-w64-mingw32/include/winerror.h:99:1: ERROR_BAD_DRIVER = 2001 // /usr/x86_64-w64-mingw32/include/winerror.h:861:1: ERROR_BAD_DRIVER_LEVEL = 119 // /usr/x86_64-w64-mingw32/include/winerror.h:132:1: ERROR_BAD_ENVIRONMENT = 10 // /usr/x86_64-w64-mingw32/include/winerror.h:55:1: ERROR_BAD_EXE_FORMAT = 193 // /usr/x86_64-w64-mingw32/include/winerror.h:191:1: ERROR_BAD_FILE_TYPE = 222 // /usr/x86_64-w64-mingw32/include/winerror.h:216:1: ERROR_BAD_FORMAT = 11 // /usr/x86_64-w64-mingw32/include/winerror.h:56:1: ERROR_BAD_IMPERSONATION_LEVEL = 1346 // /usr/x86_64-w64-mingw32/include/winerror.h:517:1: ERROR_BAD_INHERITANCE_ACL = 1340 // /usr/x86_64-w64-mingw32/include/winerror.h:511:1: ERROR_BAD_LENGTH = 24 // /usr/x86_64-w64-mingw32/include/winerror.h:69:1: ERROR_BAD_LOGON_SESSION_STATE = 1365 // /usr/x86_64-w64-mingw32/include/winerror.h:536:1: ERROR_BAD_NETPATH = 53 // /usr/x86_64-w64-mingw32/include/winerror.h:86:1: ERROR_BAD_NET_NAME = 67 // /usr/x86_64-w64-mingw32/include/winerror.h:100:1: ERROR_BAD_NET_RESP = 58 // /usr/x86_64-w64-mingw32/include/winerror.h:91:1: ERROR_BAD_PATHNAME = 161 // /usr/x86_64-w64-mingw32/include/winerror.h:174:1: ERROR_BAD_PIPE = 230 // /usr/x86_64-w64-mingw32/include/winerror.h:220:1: ERROR_BAD_PROFILE = 1206 // /usr/x86_64-w64-mingw32/include/winerror.h:396:1: ERROR_BAD_PROVIDER = 1204 // /usr/x86_64-w64-mingw32/include/winerror.h:394:1: ERROR_BAD_QUERY_SYNTAX = 1615 // /usr/x86_64-w64-mingw32/include/winerror.h:661:1: ERROR_BAD_RECOVERY_POLICY = 6012 // /usr/x86_64-w64-mingw32/include/winerror.h:1091:1: ERROR_BAD_REM_ADAP = 60 // /usr/x86_64-w64-mingw32/include/winerror.h:93:1: ERROR_BAD_THREADID_ADDR = 159 // /usr/x86_64-w64-mingw32/include/winerror.h:172:1: ERROR_BAD_TOKEN_TYPE = 1349 // /usr/x86_64-w64-mingw32/include/winerror.h:520:1: ERROR_BAD_UNIT = 20 // /usr/x86_64-w64-mingw32/include/winerror.h:65:1: ERROR_BAD_USERNAME = 2202 // /usr/x86_64-w64-mingw32/include/winerror.h:881:1: ERROR_BAD_USER_PROFILE = 1253 // /usr/x86_64-w64-mingw32/include/winerror.h:443:1: ERROR_BAD_VALIDATION_CLASS = 1348 // /usr/x86_64-w64-mingw32/include/winerror.h:519:1: ERROR_BEGINNING_OF_MEDIA = 1102 // /usr/x86_64-w64-mingw32/include/winerror.h:325:1: ERROR_BIDI_DEVICE_OFFLINE = 13004 // /usr/x86_64-w64-mingw32/include/winspool.h:1102:1: ERROR_BIDI_ERROR_BASE = 13000 // /usr/x86_64-w64-mingw32/include/winspool.h:1098:1: ERROR_BIDI_NOT_SUPPORTED = 50 // /usr/x86_64-w64-mingw32/include/winspool.h:1096:1: ERROR_BIDI_SCHEMA_NOT_SUPPORTED = 13005 // /usr/x86_64-w64-mingw32/include/winspool.h:1103:1: ERROR_BIDI_SCHEMA_READ_ONLY = 13002 // /usr/x86_64-w64-mingw32/include/winspool.h:1100:1: ERROR_BIDI_SERVER_OFFLINE = 13003 // /usr/x86_64-w64-mingw32/include/winspool.h:1101:1: ERROR_BIDI_STATUS_OK = 0 // /usr/x86_64-w64-mingw32/include/winspool.h:1095:1: ERROR_BIDI_STATUS_WARNING = 13001 // /usr/x86_64-w64-mingw32/include/winspool.h:1099:1: ERROR_BOOT_ALREADY_ACCEPTED = 1076 // /usr/x86_64-w64-mingw32/include/winerror.h:314:1: ERROR_BROKEN_PIPE = 109 // /usr/x86_64-w64-mingw32/include/winerror.h:124:1: ERROR_BUFFER_OVERFLOW = 111 // /usr/x86_64-w64-mingw32/include/winerror.h:126:1: ERROR_BUSY = 170 // /usr/x86_64-w64-mingw32/include/winerror.h:178:1: ERROR_BUSY_DRIVE = 142 // /usr/x86_64-w64-mingw32/include/winerror.h:155:1: ERROR_BUS_RESET = 1111 // /usr/x86_64-w64-mingw32/include/winerror.h:334:1: ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273 // /usr/x86_64-w64-mingw32/include/winerror.h:457:1: ERROR_CALL_NOT_IMPLEMENTED = 120 // /usr/x86_64-w64-mingw32/include/winerror.h:133:1: ERROR_CANCELLED = 1223 // /usr/x86_64-w64-mingw32/include/winerror.h:413:1: ERROR_CANCEL_VIOLATION = 173 // /usr/x86_64-w64-mingw32/include/winerror.h:179:1: ERROR_CANNOT_COPY = 266 // /usr/x86_64-w64-mingw32/include/winerror.h:230:1: ERROR_CANNOT_DETECT_DRIVER_FAILURE = 1080 // /usr/x86_64-w64-mingw32/include/winerror.h:318:1: ERROR_CANNOT_DETECT_PROCESS_ABORT = 1081 // /usr/x86_64-w64-mingw32/include/winerror.h:319:1: ERROR_CANNOT_FIND_WND_CLASS = 1407 // /usr/x86_64-w64-mingw32/include/winerror.h:578:1: ERROR_CANNOT_IMPERSONATE = 1368 // /usr/x86_64-w64-mingw32/include/winerror.h:539:1: ERROR_CANNOT_MAKE = 82 // /usr/x86_64-w64-mingw32/include/winerror.h:107:1: ERROR_CANNOT_OPEN_PROFILE = 1205 // /usr/x86_64-w64-mingw32/include/winerror.h:395:1: ERROR_CANNOT_SWITCH_RUNLEVEL = 15400 // /usr/x86_64-w64-mingw32/include/winerror.h:2164:1: ERROR_CANTOPEN = 1011 // /usr/x86_64-w64-mingw32/include/winerror.h:277:1: ERROR_CANTREAD = 1012 // /usr/x86_64-w64-mingw32/include/winerror.h:278:1: ERROR_CANTWRITE = 1013 // /usr/x86_64-w64-mingw32/include/winerror.h:279:1: ERROR_CANT_ACCESS_DOMAIN_INFO = 1351 // /usr/x86_64-w64-mingw32/include/winerror.h:522:1: ERROR_CANT_ACCESS_FILE = 1920 // /usr/x86_64-w64-mingw32/include/winerror.h:843:1: ERROR_CANT_DELETE_LAST_ITEM = 4335 // /usr/x86_64-w64-mingw32/include/winerror.h:959:1: ERROR_CANT_DISABLE_MANDATORY = 1310 // /usr/x86_64-w64-mingw32/include/winerror.h:482:1: ERROR_CANT_EVICT_ACTIVE_NODE = 5009 // /usr/x86_64-w64-mingw32/include/winerror.h:983:1: ERROR_CANT_OPEN_ANONYMOUS = 1347 // /usr/x86_64-w64-mingw32/include/winerror.h:518:1: ERROR_CANT_RESOLVE_FILENAME = 1921 // /usr/x86_64-w64-mingw32/include/winerror.h:844:1: ERROR_CAN_NOT_COMPLETE = 1003 // /usr/x86_64-w64-mingw32/include/winerror.h:269:1: ERROR_CAN_NOT_DEL_LOCAL_WINS = 4001 // /usr/x86_64-w64-mingw32/include/winerror.h:902:1: ERROR_CHECKOUT_REQUIRED = 221 // /usr/x86_64-w64-mingw32/include/winerror.h:215:1: ERROR_CHILD_MUST_BE_VOLATILE = 1021 // /usr/x86_64-w64-mingw32/include/winerror.h:287:1: ERROR_CHILD_NOT_COMPLETE = 129 // /usr/x86_64-w64-mingw32/include/winerror.h:142:1: ERROR_CHILD_WINDOW_MENU = 1436 // /usr/x86_64-w64-mingw32/include/winerror.h:607:1: ERROR_CIRCULAR_DEPENDENCY = 1059 // /usr/x86_64-w64-mingw32/include/winerror.h:297:1: ERROR_CLASS_ALREADY_EXISTS = 1410 // /usr/x86_64-w64-mingw32/include/winerror.h:581:1: ERROR_CLASS_DOES_NOT_EXIST = 1411 // /usr/x86_64-w64-mingw32/include/winerror.h:582:1: ERROR_CLASS_HAS_WINDOWS = 1412 // /usr/x86_64-w64-mingw32/include/winerror.h:583:1: ERROR_CLEANER_CARTRIDGE_INSTALLED = 4340 // /usr/x86_64-w64-mingw32/include/winerror.h:964:1: ERROR_CLEANER_CARTRIDGE_SPENT = 4333 // /usr/x86_64-w64-mingw32/include/winerror.h:957:1: ERROR_CLEANER_SLOT_NOT_SET = 4332 // /usr/x86_64-w64-mingw32/include/winerror.h:956:1: ERROR_CLEANER_SLOT_SET = 4331 // /usr/x86_64-w64-mingw32/include/winerror.h:955:1: ERROR_CLIPBOARD_NOT_OPEN = 1418 // /usr/x86_64-w64-mingw32/include/winerror.h:589:1: ERROR_CLIPPING_NOT_SUPPORTED = 2005 // /usr/x86_64-w64-mingw32/include/winerror.h:865:1: ERROR_CLUSCFG_ALREADY_COMMITTED = 5901 // /usr/x86_64-w64-mingw32/include/winerror.h:1074:1: ERROR_CLUSCFG_ROLLBACK_FAILED = 5902 // /usr/x86_64-w64-mingw32/include/winerror.h:1075:1: ERROR_CLUSCFG_SYSTEM_DISK_DRIVE_LETTER_CONFLICT = 5903 // /usr/x86_64-w64-mingw32/include/winerror.h:1076:1: ERROR_CLUSTERLOG_CHKPOINT_NOT_FOUND = 5032 // /usr/x86_64-w64-mingw32/include/winerror.h:1006:1: ERROR_CLUSTERLOG_CORRUPT = 5029 // /usr/x86_64-w64-mingw32/include/winerror.h:1003:1: ERROR_CLUSTERLOG_EXCEEDS_MAXSIZE = 5031 // /usr/x86_64-w64-mingw32/include/winerror.h:1005:1: ERROR_CLUSTERLOG_NOT_ENOUGH_SPACE = 5033 // /usr/x86_64-w64-mingw32/include/winerror.h:1007:1: ERROR_CLUSTERLOG_RECORD_EXCEEDS_MAXSIZE = 5030 // /usr/x86_64-w64-mingw32/include/winerror.h:1004:1: ERROR_CLUSTER_CANT_CREATE_DUP_CLUSTER_NAME = 5900 // /usr/x86_64-w64-mingw32/include/winerror.h:1073:1: ERROR_CLUSTER_DATABASE_SEQMISMATCH = 5083 // /usr/x86_64-w64-mingw32/include/winerror.h:1056:1: ERROR_CLUSTER_EVICT_WITHOUT_CLEANUP = 5896 // /usr/x86_64-w64-mingw32/include/winerror.h:1069:1: ERROR_CLUSTER_GUM_NOT_LOCKER = 5085 // /usr/x86_64-w64-mingw32/include/winerror.h:1058:1: ERROR_CLUSTER_INCOMPATIBLE_VERSIONS = 5075 // /usr/x86_64-w64-mingw32/include/winerror.h:1048:1: ERROR_CLUSTER_INSTANCE_ID_MISMATCH = 5893 // /usr/x86_64-w64-mingw32/include/winerror.h:1066:1: ERROR_CLUSTER_INVALID_NETWORK = 5054 // /usr/x86_64-w64-mingw32/include/winerror.h:1028:1: ERROR_CLUSTER_INVALID_NETWORK_PROVIDER = 5049 // /usr/x86_64-w64-mingw32/include/winerror.h:1023:1: ERROR_CLUSTER_INVALID_NODE = 5039 // /usr/x86_64-w64-mingw32/include/winerror.h:1013:1: ERROR_CLUSTER_INVALID_REQUEST = 5048 // /usr/x86_64-w64-mingw32/include/winerror.h:1022:1: ERROR_CLUSTER_IPADDR_IN_USE = 5057 // /usr/x86_64-w64-mingw32/include/winerror.h:1030:1: ERROR_CLUSTER_JOIN_ABORTED = 5074 // /usr/x86_64-w64-mingw32/include/winerror.h:1047:1: ERROR_CLUSTER_JOIN_IN_PROGRESS = 5041 // /usr/x86_64-w64-mingw32/include/winerror.h:1015:1: ERROR_CLUSTER_JOIN_NOT_IN_PROGRESS = 5053 // /usr/x86_64-w64-mingw32/include/winerror.h:1027:1: ERROR_CLUSTER_LAST_INTERNAL_NETWORK = 5066 // /usr/x86_64-w64-mingw32/include/winerror.h:1039:1: ERROR_CLUSTER_LOCAL_NODE_NOT_FOUND = 5043 // /usr/x86_64-w64-mingw32/include/winerror.h:1017:1: ERROR_CLUSTER_MAXNUM_OF_RESOURCES_EXCEEDED = 5076 // /usr/x86_64-w64-mingw32/include/winerror.h:1049:1: ERROR_CLUSTER_MEMBERSHIP_HALT = 5892 // /usr/x86_64-w64-mingw32/include/winerror.h:1065:1: ERROR_CLUSTER_MEMBERSHIP_INVALID_STATE = 5890 // /usr/x86_64-w64-mingw32/include/winerror.h:1063:1: ERROR_CLUSTER_MISMATCHED_COMPUTER_ACCT_NAME = 5905 // /usr/x86_64-w64-mingw32/include/winerror.h:1078:1: ERROR_CLUSTER_NETINTERFACE_EXISTS = 5046 // /usr/x86_64-w64-mingw32/include/winerror.h:1020:1: ERROR_CLUSTER_NETINTERFACE_NOT_FOUND = 5047 // /usr/x86_64-w64-mingw32/include/winerror.h:1021:1: ERROR_CLUSTER_NETWORK_ALREADY_OFFLINE = 5064 // /usr/x86_64-w64-mingw32/include/winerror.h:1037:1: ERROR_CLUSTER_NETWORK_ALREADY_ONLINE = 5063 // /usr/x86_64-w64-mingw32/include/winerror.h:1036:1: ERROR_CLUSTER_NETWORK_EXISTS = 5044 // /usr/x86_64-w64-mingw32/include/winerror.h:1018:1: ERROR_CLUSTER_NETWORK_HAS_DEPENDENTS = 5067 // /usr/x86_64-w64-mingw32/include/winerror.h:1040:1: ERROR_CLUSTER_NETWORK_NOT_FOUND = 5045 // /usr/x86_64-w64-mingw32/include/winerror.h:1019:1: ERROR_CLUSTER_NETWORK_NOT_FOUND_FOR_IP = 5894 // /usr/x86_64-w64-mingw32/include/winerror.h:1067:1: ERROR_CLUSTER_NETWORK_NOT_INTERNAL = 5060 // /usr/x86_64-w64-mingw32/include/winerror.h:1033:1: ERROR_CLUSTER_NODE_ALREADY_DOWN = 5062 // /usr/x86_64-w64-mingw32/include/winerror.h:1035:1: ERROR_CLUSTER_NODE_ALREADY_HAS_DFS_ROOT = 5088 // /usr/x86_64-w64-mingw32/include/winerror.h:1061:1: ERROR_CLUSTER_NODE_ALREADY_MEMBER = 5065 // /usr/x86_64-w64-mingw32/include/winerror.h:1038:1: ERROR_CLUSTER_NODE_ALREADY_UP = 5061 // /usr/x86_64-w64-mingw32/include/winerror.h:1034:1: ERROR_CLUSTER_NODE_DOWN = 5050 // /usr/x86_64-w64-mingw32/include/winerror.h:1024:1: ERROR_CLUSTER_NODE_EXISTS = 5040 // /usr/x86_64-w64-mingw32/include/winerror.h:1014:1: ERROR_CLUSTER_NODE_NOT_FOUND = 5042 // /usr/x86_64-w64-mingw32/include/winerror.h:1016:1: ERROR_CLUSTER_NODE_NOT_MEMBER = 5052 // /usr/x86_64-w64-mingw32/include/winerror.h:1026:1: ERROR_CLUSTER_NODE_NOT_PAUSED = 5058 // /usr/x86_64-w64-mingw32/include/winerror.h:1031:1: ERROR_CLUSTER_NODE_NOT_READY = 5072 // /usr/x86_64-w64-mingw32/include/winerror.h:1045:1: ERROR_CLUSTER_NODE_PAUSED = 5070 // /usr/x86_64-w64-mingw32/include/winerror.h:1043:1: ERROR_CLUSTER_NODE_SHUTTING_DOWN = 5073 // /usr/x86_64-w64-mingw32/include/winerror.h:1046:1: ERROR_CLUSTER_NODE_UNREACHABLE = 5051 // /usr/x86_64-w64-mingw32/include/winerror.h:1025:1: ERROR_CLUSTER_NODE_UP = 5056 // /usr/x86_64-w64-mingw32/include/winerror.h:1029:1: ERROR_CLUSTER_NO_RPC_PACKAGES_REGISTERED = 5081 // /usr/x86_64-w64-mingw32/include/winerror.h:1054:1: ERROR_CLUSTER_NO_SECURITY_CONTEXT = 5059 // /usr/x86_64-w64-mingw32/include/winerror.h:1032:1: ERROR_CLUSTER_OLD_VERSION = 5904 // /usr/x86_64-w64-mingw32/include/winerror.h:1077:1: ERROR_CLUSTER_OWNER_NOT_IN_PREFLIST = 5082 // /usr/x86_64-w64-mingw32/include/winerror.h:1055:1: ERROR_CLUSTER_PARAMETER_MISMATCH = 5897 // /usr/x86_64-w64-mingw32/include/winerror.h:1070:1: ERROR_CLUSTER_PROPERTY_DATA_TYPE_MISMATCH = 5895 // /usr/x86_64-w64-mingw32/include/winerror.h:1068:1: ERROR_CLUSTER_QUORUMLOG_NOT_FOUND = 5891 // /usr/x86_64-w64-mingw32/include/winerror.h:1064:1: ERROR_CLUSTER_RESNAME_NOT_FOUND = 5080 // /usr/x86_64-w64-mingw32/include/winerror.h:1053:1: ERROR_CLUSTER_RESOURCE_TYPE_NOT_FOUND = 5078 // /usr/x86_64-w64-mingw32/include/winerror.h:1051:1: ERROR_CLUSTER_RESTYPE_NOT_SUPPORTED = 5079 // /usr/x86_64-w64-mingw32/include/winerror.h:1052:1: ERROR_CLUSTER_SHUTTING_DOWN = 5022 // /usr/x86_64-w64-mingw32/include/winerror.h:996:1: ERROR_CLUSTER_SYSTEM_CONFIG_CHANGED = 5077 // /usr/x86_64-w64-mingw32/include/winerror.h:1050:1: ERROR_CLUSTER_WRONG_OS_VERSION = 5899 // /usr/x86_64-w64-mingw32/include/winerror.h:1072:1: ERROR_COLORSPACE_MISMATCH = 2021 // /usr/x86_64-w64-mingw32/include/winerror.h:877:1: ERROR_COMMITMENT_LIMIT = 1455 // /usr/x86_64-w64-mingw32/include/winerror.h:626:1: ERROR_COM_TASK_STOP_PENDING = 15501 // /usr/x86_64-w64-mingw32/include/winerror.h:2170:1: ERROR_CONNECTED_OTHER_PASSWORD = 2108 // /usr/x86_64-w64-mingw32/include/winerror.h:879:1: ERROR_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109 // /usr/x86_64-w64-mingw32/include/winerror.h:880:1: ERROR_CONNECTION_ABORTED = 1236 // /usr/x86_64-w64-mingw32/include/winerror.h:426:1: ERROR_CONNECTION_ACTIVE = 1230 // /usr/x86_64-w64-mingw32/include/winerror.h:420:1: ERROR_CONNECTION_COUNT_LIMIT = 1238 // /usr/x86_64-w64-mingw32/include/winerror.h:428:1: ERROR_CONNECTION_INVALID = 1229 // /usr/x86_64-w64-mingw32/include/winerror.h:419:1: ERROR_CONNECTION_REFUSED = 1225 // /usr/x86_64-w64-mingw32/include/winerror.h:415:1: ERROR_CONNECTION_UNAVAIL = 1201 // /usr/x86_64-w64-mingw32/include/winerror.h:391:1: ERROR_CONTEXT_EXPIRED = 1931 // /usr/x86_64-w64-mingw32/include/winerror.h:854:1: ERROR_CONTINUE = 1246 // /usr/x86_64-w64-mingw32/include/winerror.h:436:1: ERROR_CONTROLLING_IEPORT = 4329 // /usr/x86_64-w64-mingw32/include/winerror.h:953:1: ERROR_CONTROL_ID_NOT_FOUND = 1421 // /usr/x86_64-w64-mingw32/include/winerror.h:592:1: ERROR_CORE_RESOURCE = 5026 // /usr/x86_64-w64-mingw32/include/winerror.h:1000:1: ERROR_COUNTER_TIMEOUT = 1121 // /usr/x86_64-w64-mingw32/include/winerror.h:344:1: ERROR_CRC = 23 // /usr/x86_64-w64-mingw32/include/winerror.h:68:1: ERROR_CREATE_FAILED = 1631 // /usr/x86_64-w64-mingw32/include/winerror.h:677:1: ERROR_CSCSHARE_OFFLINE = 1262 // /usr/x86_64-w64-mingw32/include/winerror.h:452:1: ERROR_CTX_BAD_VIDEO_MODE = 7025 // /usr/x86_64-w64-mingw32/include/winerror.h:1118:1: ERROR_CTX_CANNOT_MAKE_EVENTLOG_ENTRY = 7005 // /usr/x86_64-w64-mingw32/include/winerror.h:1102:1: ERROR_CTX_CLIENT_LICENSE_IN_USE = 7052 // /usr/x86_64-w64-mingw32/include/winerror.h:1130:1: ERROR_CTX_CLIENT_LICENSE_NOT_SET = 7053 // /usr/x86_64-w64-mingw32/include/winerror.h:1131:1: ERROR_CTX_CLIENT_QUERY_TIMEOUT = 7040 // /usr/x86_64-w64-mingw32/include/winerror.h:1122:1: ERROR_CTX_CLOSE_PENDING = 7007 // /usr/x86_64-w64-mingw32/include/winerror.h:1104:1: ERROR_CTX_CONSOLE_CONNECT = 7042 // /usr/x86_64-w64-mingw32/include/winerror.h:1124:1: ERROR_CTX_CONSOLE_DISCONNECT = 7041 // /usr/x86_64-w64-mingw32/include/winerror.h:1123:1: ERROR_CTX_GRAPHICS_INVALID = 7035 // /usr/x86_64-w64-mingw32/include/winerror.h:1119:1: ERROR_CTX_INVALID_MODEMNAME = 7010 // /usr/x86_64-w64-mingw32/include/winerror.h:1107:1: ERROR_CTX_INVALID_PD = 7002 // /usr/x86_64-w64-mingw32/include/winerror.h:1099:1: ERROR_CTX_INVALID_WD = 7049 // /usr/x86_64-w64-mingw32/include/winerror.h:1127:1: ERROR_CTX_LICENSE_CLIENT_INVALID = 7055 // /usr/x86_64-w64-mingw32/include/winerror.h:1133:1: ERROR_CTX_LICENSE_EXPIRED = 7056 // /usr/x86_64-w64-mingw32/include/winerror.h:1134:1: ERROR_CTX_LICENSE_NOT_AVAILABLE = 7054 // /usr/x86_64-w64-mingw32/include/winerror.h:1132:1: ERROR_CTX_LOGON_DISABLED = 7037 // /usr/x86_64-w64-mingw32/include/winerror.h:1120:1: ERROR_CTX_MODEM_INF_NOT_FOUND = 7009 // /usr/x86_64-w64-mingw32/include/winerror.h:1106:1: ERROR_CTX_MODEM_RESPONSE_BUSY = 7015 // /usr/x86_64-w64-mingw32/include/winerror.h:1112:1: ERROR_CTX_MODEM_RESPONSE_ERROR = 7011 // /usr/x86_64-w64-mingw32/include/winerror.h:1108:1: ERROR_CTX_MODEM_RESPONSE_NO_CARRIER = 7013 // /usr/x86_64-w64-mingw32/include/winerror.h:1110:1: ERROR_CTX_MODEM_RESPONSE_NO_DIALTONE = 7014 // /usr/x86_64-w64-mingw32/include/winerror.h:1111:1: ERROR_CTX_MODEM_RESPONSE_TIMEOUT = 7012 // /usr/x86_64-w64-mingw32/include/winerror.h:1109:1: ERROR_CTX_MODEM_RESPONSE_VOICE = 7016 // /usr/x86_64-w64-mingw32/include/winerror.h:1113:1: ERROR_CTX_NOT_CONSOLE = 7038 // /usr/x86_64-w64-mingw32/include/winerror.h:1121:1: ERROR_CTX_NO_OUTBUF = 7008 // /usr/x86_64-w64-mingw32/include/winerror.h:1105:1: ERROR_CTX_PD_NOT_FOUND = 7003 // /usr/x86_64-w64-mingw32/include/winerror.h:1100:1: ERROR_CTX_SERVICE_NAME_COLLISION = 7006 // /usr/x86_64-w64-mingw32/include/winerror.h:1103:1: ERROR_CTX_SHADOW_DENIED = 7044 // /usr/x86_64-w64-mingw32/include/winerror.h:1125:1: ERROR_CTX_SHADOW_DISABLED = 7051 // /usr/x86_64-w64-mingw32/include/winerror.h:1129:1: ERROR_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 7058 // /usr/x86_64-w64-mingw32/include/winerror.h:1136:1: ERROR_CTX_SHADOW_INVALID = 7050 // /usr/x86_64-w64-mingw32/include/winerror.h:1128:1: ERROR_CTX_SHADOW_NOT_RUNNING = 7057 // /usr/x86_64-w64-mingw32/include/winerror.h:1135:1: ERROR_CTX_TD_ERROR = 7017 // /usr/x86_64-w64-mingw32/include/winerror.h:1114:1: ERROR_CTX_WD_NOT_FOUND = 7004 // /usr/x86_64-w64-mingw32/include/winerror.h:1101:1: ERROR_CTX_WINSTATION_ACCESS_DENIED = 7045 // /usr/x86_64-w64-mingw32/include/winerror.h:1126:1: ERROR_CTX_WINSTATION_ALREADY_EXISTS = 7023 // /usr/x86_64-w64-mingw32/include/winerror.h:1116:1: ERROR_CTX_WINSTATION_BUSY = 7024 // /usr/x86_64-w64-mingw32/include/winerror.h:1117:1: ERROR_CTX_WINSTATION_NAME_INVALID = 7001 // /usr/x86_64-w64-mingw32/include/winerror.h:1098:1: ERROR_CTX_WINSTATION_NOT_FOUND = 7022 // /usr/x86_64-w64-mingw32/include/winerror.h:1115:1: ERROR_CURRENT_DIRECTORY = 16 // /usr/x86_64-w64-mingw32/include/winerror.h:61:1: ERROR_CURRENT_DOMAIN_NOT_ALLOWED = 1399 // /usr/x86_64-w64-mingw32/include/winerror.h:570:1: ERROR_DATABASE_BACKUP_CORRUPT = 5087 // /usr/x86_64-w64-mingw32/include/winerror.h:1060:1: ERROR_DATABASE_DOES_NOT_EXIST = 1065 // /usr/x86_64-w64-mingw32/include/winerror.h:303:1: ERROR_DATABASE_FAILURE = 4313 // /usr/x86_64-w64-mingw32/include/winerror.h:937:1: ERROR_DATABASE_FULL = 4314 // /usr/x86_64-w64-mingw32/include/winerror.h:938:1: ERROR_DATATYPE_MISMATCH = 1629 // /usr/x86_64-w64-mingw32/include/winerror.h:675:1: ERROR_DC_NOT_FOUND = 1425 // /usr/x86_64-w64-mingw32/include/winerror.h:596:1: ERROR_DDE_FAIL = 1156 // /usr/x86_64-w64-mingw32/include/winerror.h:365:1: ERROR_DEBUGGER_INACTIVE = 1284 // /usr/x86_64-w64-mingw32/include/winerror.h:468:1: ERROR_DECRYPTION_FAILED = 6001 // /usr/x86_64-w64-mingw32/include/winerror.h:1080:1: ERROR_DELAY_LOAD_FAILED = 1285 // /usr/x86_64-w64-mingw32/include/winerror.h:469:1: ERROR_DELETE_PENDING = 303 // /usr/x86_64-w64-mingw32/include/winerror.h:243:1: ERROR_DELETING_EXISTING_APPLICATIONDATA_STORE_FAILED = 15621 // /usr/x86_64-w64-mingw32/include/winerror.h:2192:1: ERROR_DELETING_ICM_XFORM = 2019 // /usr/x86_64-w64-mingw32/include/winerror.h:875:1: ERROR_DEPENDENCY_ALREADY_EXISTS = 5003 // /usr/x86_64-w64-mingw32/include/winerror.h:977:1: ERROR_DEPENDENCY_NOT_ALLOWED = 5069 // /usr/x86_64-w64-mingw32/include/winerror.h:1042:1: ERROR_DEPENDENCY_NOT_FOUND = 5002 // /usr/x86_64-w64-mingw32/include/winerror.h:976:1: ERROR_DEPENDENT_RESOURCE_EXISTS = 5001 // /usr/x86_64-w64-mingw32/include/winerror.h:975:1: ERROR_DEPENDENT_SERVICES_RUNNING = 1051 // /usr/x86_64-w64-mingw32/include/winerror.h:289:1: ERROR_DEPLOYMENT_BLOCKED_BY_POLICY = 15617 // /usr/x86_64-w64-mingw32/include/winerror.h:2188:1: ERROR_DESTINATION_ELEMENT_FULL = 1161 // /usr/x86_64-w64-mingw32/include/winerror.h:370:1: ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435 // /usr/x86_64-w64-mingw32/include/winerror.h:606:1: ERROR_DEVICE_ALREADY_REMEMBERED = 1202 // /usr/x86_64-w64-mingw32/include/winerror.h:392:1: ERROR_DEVICE_DOOR_OPEN = 1166 // /usr/x86_64-w64-mingw32/include/winerror.h:375:1: ERROR_DEVICE_IN_USE = 2404 // /usr/x86_64-w64-mingw32/include/winerror.h:885:1: ERROR_DEVICE_NOT_AVAILABLE = 4319 // /usr/x86_64-w64-mingw32/include/winerror.h:943:1: ERROR_DEVICE_NOT_CONNECTED = 1167 // /usr/x86_64-w64-mingw32/include/winerror.h:376:1: ERROR_DEVICE_NOT_PARTITIONED = 1107 // /usr/x86_64-w64-mingw32/include/winerror.h:330:1: ERROR_DEVICE_REINITIALIZATION_NEEDED = 1164 // /usr/x86_64-w64-mingw32/include/winerror.h:373:1: ERROR_DEVICE_REMOVED = 1617 // /usr/x86_64-w64-mingw32/include/winerror.h:663:1: ERROR_DEVICE_REQUIRES_CLEANING = 1165 // /usr/x86_64-w64-mingw32/include/winerror.h:374:1: ERROR_DEV_NOT_EXIST = 55 // /usr/x86_64-w64-mingw32/include/winerror.h:88:1: ERROR_DHCP_ADDRESS_CONFLICT = 4100 // /usr/x86_64-w64-mingw32/include/winerror.h:908:1: ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079 // /usr/x86_64-w64-mingw32/include/winerror.h:317:1: ERROR_DIRECTORY = 267 // /usr/x86_64-w64-mingw32/include/winerror.h:231:1: ERROR_DIRECT_ACCESS_HANDLE = 130 // /usr/x86_64-w64-mingw32/include/winerror.h:143:1: ERROR_DIR_EFS_DISALLOWED = 6010 // /usr/x86_64-w64-mingw32/include/winerror.h:1089:1: ERROR_DIR_NOT_EMPTY = 145 // /usr/x86_64-w64-mingw32/include/winerror.h:158:1: ERROR_DIR_NOT_ROOT = 144 // /usr/x86_64-w64-mingw32/include/winerror.h:157:1: ERROR_DISCARDED = 157 // /usr/x86_64-w64-mingw32/include/winerror.h:170:1: ERROR_DISK_CHANGE = 107 // /usr/x86_64-w64-mingw32/include/winerror.h:122:1: ERROR_DISK_CORRUPT = 1393 // /usr/x86_64-w64-mingw32/include/winerror.h:564:1: ERROR_DISK_FULL = 112 // /usr/x86_64-w64-mingw32/include/winerror.h:127:1: ERROR_DISK_OPERATION_FAILED = 1127 // /usr/x86_64-w64-mingw32/include/winerror.h:350:1: ERROR_DISK_RECALIBRATE_FAILED = 1126 // /usr/x86_64-w64-mingw32/include/winerror.h:349:1: ERROR_DISK_RESET_FAILED = 1128 // /usr/x86_64-w64-mingw32/include/winerror.h:351:1: ERROR_DISK_TOO_FRAGMENTED = 302 // /usr/x86_64-w64-mingw32/include/winerror.h:242:1: ERROR_DLL_INIT_FAILED = 1114 // /usr/x86_64-w64-mingw32/include/winerror.h:337:1: ERROR_DLL_NOT_FOUND = 1157 // /usr/x86_64-w64-mingw32/include/winerror.h:366:1: ERROR_DOMAIN_CONTROLLER_EXISTS = 1250 // /usr/x86_64-w64-mingw32/include/winerror.h:440:1: ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908 // /usr/x86_64-w64-mingw32/include/winerror.h:831:1: ERROR_DOMAIN_EXISTS = 1356 // /usr/x86_64-w64-mingw32/include/winerror.h:527:1: ERROR_DOMAIN_LIMIT_EXCEEDED = 1357 // /usr/x86_64-w64-mingw32/include/winerror.h:528:1: ERROR_DOMAIN_TRUST_INCONSISTENT = 1810 // /usr/x86_64-w64-mingw32/include/winerror.h:798:1: ERROR_DOWNGRADE_DETECTED = 1265 // /usr/x86_64-w64-mingw32/include/winerror.h:455:1: ERROR_DRIVER_BLOCKED = 1275 // /usr/x86_64-w64-mingw32/include/winerror.h:459:1: ERROR_DRIVE_LOCKED = 108 // /usr/x86_64-w64-mingw32/include/winerror.h:123:1: ERROR_DRIVE_MEDIA_MISMATCH = 4303 // /usr/x86_64-w64-mingw32/include/winerror.h:927:1: ERROR_DRIVE_NOT_INSTALLED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:1172:1: ERROR_DS_ADD_REPLICA_INHIBITED = 8302 // /usr/x86_64-w64-mingw32/include/winerror.h:1219:1: ERROR_DS_ADMIN_LIMIT_EXCEEDED = 8228 // /usr/x86_64-w64-mingw32/include/winerror.h:1183:1: ERROR_DS_AFFECTS_MULTIPLE_DSAS = 8249 // /usr/x86_64-w64-mingw32/include/winerror.h:1204:1: ERROR_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 8578 // /usr/x86_64-w64-mingw32/include/winerror.h:1494:1: ERROR_DS_ALIASED_OBJ_MISSING = 8334 // /usr/x86_64-w64-mingw32/include/winerror.h:1250:1: ERROR_DS_ALIAS_DEREF_PROBLEM = 8244 // /usr/x86_64-w64-mingw32/include/winerror.h:1199:1: ERROR_DS_ALIAS_POINTS_TO_ALIAS = 8336 // /usr/x86_64-w64-mingw32/include/winerror.h:1252:1: ERROR_DS_ALIAS_PROBLEM = 8241 // /usr/x86_64-w64-mingw32/include/winerror.h:1196:1: ERROR_DS_ATTRIBUTE_OR_VALUE_EXISTS = 8205 // /usr/x86_64-w64-mingw32/include/winerror.h:1161:1: ERROR_DS_ATTRIBUTE_OWNED_BY_SAM = 8346 // /usr/x86_64-w64-mingw32/include/winerror.h:1262:1: ERROR_DS_ATTRIBUTE_TYPE_UNDEFINED = 8204 // /usr/x86_64-w64-mingw32/include/winerror.h:1160:1: ERROR_DS_ATT_ALREADY_EXISTS = 8318 // /usr/x86_64-w64-mingw32/include/winerror.h:1235:1: ERROR_DS_ATT_IS_NOT_ON_OBJ = 8310 // /usr/x86_64-w64-mingw32/include/winerror.h:1227:1: ERROR_DS_ATT_NOT_DEF_FOR_CLASS = 8317 // /usr/x86_64-w64-mingw32/include/winerror.h:1234:1: ERROR_DS_ATT_NOT_DEF_IN_SCHEMA = 8303 // /usr/x86_64-w64-mingw32/include/winerror.h:1220:1: ERROR_DS_ATT_SCHEMA_REQ_ID = 8399 // /usr/x86_64-w64-mingw32/include/winerror.h:1315:1: ERROR_DS_ATT_SCHEMA_REQ_SYNTAX = 8416 // /usr/x86_64-w64-mingw32/include/winerror.h:1332:1: ERROR_DS_ATT_VAL_ALREADY_EXISTS = 8323 // /usr/x86_64-w64-mingw32/include/winerror.h:1239:1: ERROR_DS_AUTHORIZATION_FAILED = 8599 // /usr/x86_64-w64-mingw32/include/winerror.h:1515:1: ERROR_DS_AUTH_METHOD_NOT_SUPPORTED = 8231 // /usr/x86_64-w64-mingw32/include/winerror.h:1186:1: ERROR_DS_AUTH_UNKNOWN = 8234 // /usr/x86_64-w64-mingw32/include/winerror.h:1189:1: ERROR_DS_AUX_CLS_TEST_FAIL = 8389 // /usr/x86_64-w64-mingw32/include/winerror.h:1305:1: ERROR_DS_BACKLINK_WITHOUT_LINK = 8482 // /usr/x86_64-w64-mingw32/include/winerror.h:1398:1: ERROR_DS_BAD_ATT_SCHEMA_SYNTAX = 8400 // /usr/x86_64-w64-mingw32/include/winerror.h:1316:1: ERROR_DS_BAD_HIERARCHY_FILE = 8425 // /usr/x86_64-w64-mingw32/include/winerror.h:1341:1: ERROR_DS_BAD_INSTANCE_TYPE = 8313 // /usr/x86_64-w64-mingw32/include/winerror.h:1230:1: ERROR_DS_BAD_NAME_SYNTAX = 8335 // /usr/x86_64-w64-mingw32/include/winerror.h:1251:1: ERROR_DS_BAD_RDN_ATT_ID_SYNTAX = 8392 // /usr/x86_64-w64-mingw32/include/winerror.h:1308:1: ERROR_DS_BUILD_HIERARCHY_TABLE_FAILED = 8426 // /usr/x86_64-w64-mingw32/include/winerror.h:1342:1: ERROR_DS_BUSY = 8206 // /usr/x86_64-w64-mingw32/include/winerror.h:1162:1: ERROR_DS_CANT_ACCESS_REMOTE_PART_OF_AD = 8585 // /usr/x86_64-w64-mingw32/include/winerror.h:1501:1: ERROR_DS_CANT_ADD_ATT_VALUES = 8320 // /usr/x86_64-w64-mingw32/include/winerror.h:1236:1: ERROR_DS_CANT_ADD_SYSTEM_ONLY = 8358 // /usr/x86_64-w64-mingw32/include/winerror.h:1274:1: ERROR_DS_CANT_ADD_TO_GC = 8550 // /usr/x86_64-w64-mingw32/include/winerror.h:1466:1: ERROR_DS_CANT_CACHE_ATT = 8401 // /usr/x86_64-w64-mingw32/include/winerror.h:1317:1: ERROR_DS_CANT_CACHE_CLASS = 8402 // /usr/x86_64-w64-mingw32/include/winerror.h:1318:1: ERROR_DS_CANT_CREATE_IN_NONDOMAIN_NC = 8553 // /usr/x86_64-w64-mingw32/include/winerror.h:1469:1: ERROR_DS_CANT_CREATE_UNDER_SCHEMA = 8510 // /usr/x86_64-w64-mingw32/include/winerror.h:1426:1: ERROR_DS_CANT_DELETE = 8398 // /usr/x86_64-w64-mingw32/include/winerror.h:1314:1: ERROR_DS_CANT_DELETE_DSA_OBJ = 8340 // /usr/x86_64-w64-mingw32/include/winerror.h:1256:1: ERROR_DS_CANT_DEL_MASTER_CROSSREF = 8375 // /usr/x86_64-w64-mingw32/include/winerror.h:1291:1: ERROR_DS_CANT_DEMOTE_WITH_WRITEABLE_NC = 8604 // /usr/x86_64-w64-mingw32/include/winerror.h:1520:1: ERROR_DS_CANT_DEREF_ALIAS = 8337 // /usr/x86_64-w64-mingw32/include/winerror.h:1253:1: ERROR_DS_CANT_DERIVE_SPN_FOR_DELETED_DOMAIN = 8603 // /usr/x86_64-w64-mingw32/include/winerror.h:1519:1: ERROR_DS_CANT_DERIVE_SPN_WITHOUT_SERVER_REF = 8589 // /usr/x86_64-w64-mingw32/include/winerror.h:1505:1: ERROR_DS_CANT_FIND_DC_FOR_SRC_DOMAIN = 8537 // /usr/x86_64-w64-mingw32/include/winerror.h:1453:1: ERROR_DS_CANT_FIND_DSA_OBJ = 8419 // /usr/x86_64-w64-mingw32/include/winerror.h:1335:1: ERROR_DS_CANT_FIND_EXPECTED_NC = 8420 // /usr/x86_64-w64-mingw32/include/winerror.h:1336:1: ERROR_DS_CANT_FIND_NC_IN_CACHE = 8421 // /usr/x86_64-w64-mingw32/include/winerror.h:1337:1: ERROR_DS_CANT_MIX_MASTER_AND_REPS = 8331 // /usr/x86_64-w64-mingw32/include/winerror.h:1247:1: ERROR_DS_CANT_MOD_OBJ_CLASS = 8215 // /usr/x86_64-w64-mingw32/include/winerror.h:1171:1: ERROR_DS_CANT_MOD_PRIMARYGROUPID = 8506 // /usr/x86_64-w64-mingw32/include/winerror.h:1422:1: ERROR_DS_CANT_MOD_SYSTEM_ONLY = 8369 // /usr/x86_64-w64-mingw32/include/winerror.h:1285:1: ERROR_DS_CANT_MOVE_ACCOUNT_GROUP = 8498 // /usr/x86_64-w64-mingw32/include/winerror.h:1414:1: ERROR_DS_CANT_MOVE_APP_BASIC_GROUP = 8608 // /usr/x86_64-w64-mingw32/include/winerror.h:1524:1: ERROR_DS_CANT_MOVE_APP_QUERY_GROUP = 8609 // /usr/x86_64-w64-mingw32/include/winerror.h:1525:1: ERROR_DS_CANT_MOVE_DELETED_OBJECT = 8489 // /usr/x86_64-w64-mingw32/include/winerror.h:1405:1: ERROR_DS_CANT_MOVE_RESOURCE_GROUP = 8499 // /usr/x86_64-w64-mingw32/include/winerror.h:1415:1: ERROR_DS_CANT_ON_NON_LEAF = 8213 // /usr/x86_64-w64-mingw32/include/winerror.h:1169:1: ERROR_DS_CANT_ON_RDN = 8214 // /usr/x86_64-w64-mingw32/include/winerror.h:1170:1: ERROR_DS_CANT_REMOVE_ATT_CACHE = 8403 // /usr/x86_64-w64-mingw32/include/winerror.h:1319:1: ERROR_DS_CANT_REMOVE_CLASS_CACHE = 8404 // /usr/x86_64-w64-mingw32/include/winerror.h:1320:1: ERROR_DS_CANT_REM_MISSING_ATT = 8324 // /usr/x86_64-w64-mingw32/include/winerror.h:1240:1: ERROR_DS_CANT_REM_MISSING_ATT_VAL = 8325 // /usr/x86_64-w64-mingw32/include/winerror.h:1241:1: ERROR_DS_CANT_REPLACE_HIDDEN_REC = 8424 // /usr/x86_64-w64-mingw32/include/winerror.h:1340:1: ERROR_DS_CANT_RETRIEVE_ATTS = 8481 // /usr/x86_64-w64-mingw32/include/winerror.h:1397:1: ERROR_DS_CANT_RETRIEVE_CHILD = 8422 // /usr/x86_64-w64-mingw32/include/winerror.h:1338:1: ERROR_DS_CANT_RETRIEVE_DN = 8405 // /usr/x86_64-w64-mingw32/include/winerror.h:1321:1: ERROR_DS_CANT_RETRIEVE_INSTANCE = 8407 // /usr/x86_64-w64-mingw32/include/winerror.h:1323:1: ERROR_DS_CANT_RETRIEVE_SD = 8526 // /usr/x86_64-w64-mingw32/include/winerror.h:1442:1: ERROR_DS_CANT_START = 8531 // /usr/x86_64-w64-mingw32/include/winerror.h:1447:1: ERROR_DS_CANT_TREE_DELETE_CRITICAL_OBJ = 8560 // /usr/x86_64-w64-mingw32/include/winerror.h:1476:1: ERROR_DS_CANT_WITH_ACCT_GROUP_MEMBERSHPS = 8493 // /usr/x86_64-w64-mingw32/include/winerror.h:1409:1: ERROR_DS_CHILDREN_EXIST = 8332 // /usr/x86_64-w64-mingw32/include/winerror.h:1248:1: ERROR_DS_CLASS_MUST_BE_CONCRETE = 8359 // /usr/x86_64-w64-mingw32/include/winerror.h:1275:1: ERROR_DS_CLASS_NOT_DSA = 8343 // /usr/x86_64-w64-mingw32/include/winerror.h:1259:1: ERROR_DS_CLIENT_LOOP = 8259 // /usr/x86_64-w64-mingw32/include/winerror.h:1214:1: ERROR_DS_CODE_INCONSISTENCY = 8408 // /usr/x86_64-w64-mingw32/include/winerror.h:1324:1: ERROR_DS_COMPARE_FALSE = 8229 // /usr/x86_64-w64-mingw32/include/winerror.h:1184:1: ERROR_DS_COMPARE_TRUE = 8230 // /usr/x86_64-w64-mingw32/include/winerror.h:1185:1: ERROR_DS_CONFIDENTIALITY_REQUIRED = 8237 // /usr/x86_64-w64-mingw32/include/winerror.h:1192:1: ERROR_DS_CONFIG_PARAM_MISSING = 8427 // /usr/x86_64-w64-mingw32/include/winerror.h:1343:1: ERROR_DS_CONSTRAINT_VIOLATION = 8239 // /usr/x86_64-w64-mingw32/include/winerror.h:1194:1: ERROR_DS_CONSTRUCTED_ATT_MOD = 8475 // /usr/x86_64-w64-mingw32/include/winerror.h:1391:1: ERROR_DS_CONTROL_NOT_FOUND = 8258 // /usr/x86_64-w64-mingw32/include/winerror.h:1213:1: ERROR_DS_COULDNT_CONTACT_FSMO = 8367 // /usr/x86_64-w64-mingw32/include/winerror.h:1283:1: ERROR_DS_COULDNT_IDENTIFY_OBJECTS_FOR_TREE_DELETE = 8503 // /usr/x86_64-w64-mingw32/include/winerror.h:1419:1: ERROR_DS_COULDNT_LOCK_TREE_FOR_DELETE = 8502 // /usr/x86_64-w64-mingw32/include/winerror.h:1418:1: ERROR_DS_COULDNT_UPDATE_SPNS = 8525 // /usr/x86_64-w64-mingw32/include/winerror.h:1441:1: ERROR_DS_COUNTING_AB_INDICES_FAILED = 8428 // /usr/x86_64-w64-mingw32/include/winerror.h:1344:1: ERROR_DS_CROSS_DOMAIN_CLEANUP_REQD = 8491 // /usr/x86_64-w64-mingw32/include/winerror.h:1407:1: ERROR_DS_CROSS_DOM_MOVE_ERROR = 8216 // /usr/x86_64-w64-mingw32/include/winerror.h:1172:1: ERROR_DS_CROSS_NC_DN_RENAME = 8368 // /usr/x86_64-w64-mingw32/include/winerror.h:1284:1: ERROR_DS_CROSS_REF_BUSY = 8602 // /usr/x86_64-w64-mingw32/include/winerror.h:1518:1: ERROR_DS_CROSS_REF_EXISTS = 8374 // /usr/x86_64-w64-mingw32/include/winerror.h:1290:1: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE = 8495 // /usr/x86_64-w64-mingw32/include/winerror.h:1411:1: ERROR_DS_CR_IMPOSSIBLE_TO_VALIDATE_V2 = 8586 // /usr/x86_64-w64-mingw32/include/winerror.h:1502:1: ERROR_DS_DATABASE_ERROR = 8409 // /usr/x86_64-w64-mingw32/include/winerror.h:1325:1: ERROR_DS_DECODING_ERROR = 8253 // /usr/x86_64-w64-mingw32/include/winerror.h:1208:1: ERROR_DS_DESTINATION_AUDITING_NOT_ENABLED = 8536 // /usr/x86_64-w64-mingw32/include/winerror.h:1452:1: ERROR_DS_DESTINATION_DOMAIN_NOT_IN_FOREST = 8535 // /usr/x86_64-w64-mingw32/include/winerror.h:1451:1: ERROR_DS_DIFFERENT_REPL_EPOCHS = 8593 // /usr/x86_64-w64-mingw32/include/winerror.h:1509:1: ERROR_DS_DISALLOWED_IN_SYSTEM_CONTAINER = 8615 // /usr/x86_64-w64-mingw32/include/winerror.h:1531:1: ERROR_DS_DNS_LOOKUP_FAILURE = 8524 // /usr/x86_64-w64-mingw32/include/winerror.h:1440:1: ERROR_DS_DOMAIN_RENAME_IN_PROGRESS = 8612 // /usr/x86_64-w64-mingw32/include/winerror.h:1528:1: ERROR_DS_DOMAIN_VERSION_TOO_HIGH = 8564 // /usr/x86_64-w64-mingw32/include/winerror.h:1480:1: ERROR_DS_DOMAIN_VERSION_TOO_LOW = 8566 // /usr/x86_64-w64-mingw32/include/winerror.h:1482:1: ERROR_DS_DRA_ABANDON_SYNC = 8462 // /usr/x86_64-w64-mingw32/include/winerror.h:1378:1: ERROR_DS_DRA_ACCESS_DENIED = 8453 // /usr/x86_64-w64-mingw32/include/winerror.h:1369:1: ERROR_DS_DRA_BAD_DN = 8439 // /usr/x86_64-w64-mingw32/include/winerror.h:1355:1: ERROR_DS_DRA_BAD_INSTANCE_TYPE = 8445 // /usr/x86_64-w64-mingw32/include/winerror.h:1361:1: ERROR_DS_DRA_BAD_NC = 8440 // /usr/x86_64-w64-mingw32/include/winerror.h:1356:1: ERROR_DS_DRA_BUSY = 8438 // /usr/x86_64-w64-mingw32/include/winerror.h:1354:1: ERROR_DS_DRA_CONNECTION_FAILED = 8444 // /usr/x86_64-w64-mingw32/include/winerror.h:1360:1: ERROR_DS_DRA_DB_ERROR = 8451 // /usr/x86_64-w64-mingw32/include/winerror.h:1367:1: ERROR_DS_DRA_DN_EXISTS = 8441 // /usr/x86_64-w64-mingw32/include/winerror.h:1357:1: ERROR_DS_DRA_EARLIER_SCHEMA_CONFLICT = 8544 // /usr/x86_64-w64-mingw32/include/winerror.h:1460:1: ERROR_DS_DRA_EXTN_CONNECTION_FAILED = 8466 // /usr/x86_64-w64-mingw32/include/winerror.h:1382:1: ERROR_DS_DRA_GENERIC = 8436 // /usr/x86_64-w64-mingw32/include/winerror.h:1352:1: ERROR_DS_DRA_INCOMPATIBLE_PARTIAL_SET = 8464 // /usr/x86_64-w64-mingw32/include/winerror.h:1380:1: ERROR_DS_DRA_INCONSISTENT_DIT = 8443 // /usr/x86_64-w64-mingw32/include/winerror.h:1359:1: ERROR_DS_DRA_INTERNAL_ERROR = 8442 // /usr/x86_64-w64-mingw32/include/winerror.h:1358:1: ERROR_DS_DRA_INVALID_PARAMETER = 8437 // /usr/x86_64-w64-mingw32/include/winerror.h:1353:1: ERROR_DS_DRA_MAIL_PROBLEM = 8447 // /usr/x86_64-w64-mingw32/include/winerror.h:1363:1: ERROR_DS_DRA_MISSING_PARENT = 8460 // /usr/x86_64-w64-mingw32/include/winerror.h:1376:1: ERROR_DS_DRA_NAME_COLLISION = 8458 // /usr/x86_64-w64-mingw32/include/winerror.h:1374:1: ERROR_DS_DRA_NOT_SUPPORTED = 8454 // /usr/x86_64-w64-mingw32/include/winerror.h:1370:1: ERROR_DS_DRA_NO_REPLICA = 8452 // /usr/x86_64-w64-mingw32/include/winerror.h:1368:1: ERROR_DS_DRA_OBJ_IS_REP_SOURCE = 8450 // /usr/x86_64-w64-mingw32/include/winerror.h:1366:1: ERROR_DS_DRA_OBJ_NC_MISMATCH = 8545 // /usr/x86_64-w64-mingw32/include/winerror.h:1461:1: ERROR_DS_DRA_OUT_OF_MEM = 8446 // /usr/x86_64-w64-mingw32/include/winerror.h:1362:1: ERROR_DS_DRA_OUT_SCHEDULE_WINDOW = 8617 // /usr/x86_64-w64-mingw32/include/winerror.h:1533:1: ERROR_DS_DRA_PREEMPTED = 8461 // /usr/x86_64-w64-mingw32/include/winerror.h:1377:1: ERROR_DS_DRA_REF_ALREADY_EXISTS = 8448 // /usr/x86_64-w64-mingw32/include/winerror.h:1364:1: ERROR_DS_DRA_REF_NOT_FOUND = 8449 // /usr/x86_64-w64-mingw32/include/winerror.h:1365:1: ERROR_DS_DRA_REPL_PENDING = 8477 // /usr/x86_64-w64-mingw32/include/winerror.h:1393:1: ERROR_DS_DRA_RPC_CANCELLED = 8455 // /usr/x86_64-w64-mingw32/include/winerror.h:1371:1: ERROR_DS_DRA_SCHEMA_CONFLICT = 8543 // /usr/x86_64-w64-mingw32/include/winerror.h:1459:1: ERROR_DS_DRA_SCHEMA_INFO_SHIP = 8542 // /usr/x86_64-w64-mingw32/include/winerror.h:1458:1: ERROR_DS_DRA_SCHEMA_MISMATCH = 8418 // /usr/x86_64-w64-mingw32/include/winerror.h:1334:1: ERROR_DS_DRA_SHUTDOWN = 8463 // /usr/x86_64-w64-mingw32/include/winerror.h:1379:1: ERROR_DS_DRA_SINK_DISABLED = 8457 // /usr/x86_64-w64-mingw32/include/winerror.h:1373:1: ERROR_DS_DRA_SOURCE_DISABLED = 8456 // /usr/x86_64-w64-mingw32/include/winerror.h:1372:1: ERROR_DS_DRA_SOURCE_IS_PARTIAL_REPLICA = 8465 // /usr/x86_64-w64-mingw32/include/winerror.h:1381:1: ERROR_DS_DRA_SOURCE_REINSTALLED = 8459 // /usr/x86_64-w64-mingw32/include/winerror.h:1375:1: ERROR_DS_DRS_EXTENSIONS_CHANGED = 8594 // /usr/x86_64-w64-mingw32/include/winerror.h:1510:1: ERROR_DS_DSA_MUST_BE_INT_MASTER = 8342 // /usr/x86_64-w64-mingw32/include/winerror.h:1258:1: ERROR_DS_DST_DOMAIN_NOT_NATIVE = 8496 // /usr/x86_64-w64-mingw32/include/winerror.h:1412:1: ERROR_DS_DST_NC_MISMATCH = 8486 // /usr/x86_64-w64-mingw32/include/winerror.h:1402:1: ERROR_DS_DS_REQUIRED = 8478 // /usr/x86_64-w64-mingw32/include/winerror.h:1394:1: ERROR_DS_DUPLICATE_ID_FOUND = 8605 // /usr/x86_64-w64-mingw32/include/winerror.h:1521:1: ERROR_DS_DUP_LDAP_DISPLAY_NAME = 8382 // /usr/x86_64-w64-mingw32/include/winerror.h:1298:1: ERROR_DS_DUP_LINK_ID = 8468 // /usr/x86_64-w64-mingw32/include/winerror.h:1384:1: ERROR_DS_DUP_MAPI_ID = 8380 // /usr/x86_64-w64-mingw32/include/winerror.h:1296:1: ERROR_DS_DUP_MSDS_INTID = 8597 // /usr/x86_64-w64-mingw32/include/winerror.h:1513:1: ERROR_DS_DUP_OID = 8379 // /usr/x86_64-w64-mingw32/include/winerror.h:1295:1: ERROR_DS_DUP_RDN = 8378 // /usr/x86_64-w64-mingw32/include/winerror.h:1294:1: ERROR_DS_DUP_SCHEMA_ID_GUID = 8381 // /usr/x86_64-w64-mingw32/include/winerror.h:1297:1: ERROR_DS_ENCODING_ERROR = 8252 // /usr/x86_64-w64-mingw32/include/winerror.h:1207:1: ERROR_DS_EPOCH_MISMATCH = 8483 // /usr/x86_64-w64-mingw32/include/winerror.h:1399:1: ERROR_DS_EXISTING_AD_CHILD_NC = 8613 // /usr/x86_64-w64-mingw32/include/winerror.h:1529:1: ERROR_DS_EXISTS_IN_AUX_CLS = 8393 // /usr/x86_64-w64-mingw32/include/winerror.h:1309:1: ERROR_DS_EXISTS_IN_MAY_HAVE = 8386 // /usr/x86_64-w64-mingw32/include/winerror.h:1302:1: ERROR_DS_EXISTS_IN_MUST_HAVE = 8385 // /usr/x86_64-w64-mingw32/include/winerror.h:1301:1: ERROR_DS_EXISTS_IN_POSS_SUP = 8395 // /usr/x86_64-w64-mingw32/include/winerror.h:1311:1: ERROR_DS_EXISTS_IN_RDNATTID = 8598 // /usr/x86_64-w64-mingw32/include/winerror.h:1514:1: ERROR_DS_EXISTS_IN_SUB_CLS = 8394 // /usr/x86_64-w64-mingw32/include/winerror.h:1310:1: ERROR_DS_FILTER_UNKNOWN = 8254 // /usr/x86_64-w64-mingw32/include/winerror.h:1209:1: ERROR_DS_FILTER_USES_CONTRUCTED_ATTRS = 8555 // /usr/x86_64-w64-mingw32/include/winerror.h:1471:1: ERROR_DS_FOREST_VERSION_TOO_HIGH = 8563 // /usr/x86_64-w64-mingw32/include/winerror.h:1479:1: ERROR_DS_FOREST_VERSION_TOO_LOW = 8565 // /usr/x86_64-w64-mingw32/include/winerror.h:1481:1: ERROR_DS_GCVERIFY_ERROR = 8417 // /usr/x86_64-w64-mingw32/include/winerror.h:1333:1: ERROR_DS_GC_NOT_AVAILABLE = 8217 // /usr/x86_64-w64-mingw32/include/winerror.h:1173:1: ERROR_DS_GC_REQUIRED = 8547 // /usr/x86_64-w64-mingw32/include/winerror.h:1463:1: ERROR_DS_GENERIC_ERROR = 8341 // /usr/x86_64-w64-mingw32/include/winerror.h:1257:1: ERROR_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 8519 // /usr/x86_64-w64-mingw32/include/winerror.h:1435:1: ERROR_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 8516 // /usr/x86_64-w64-mingw32/include/winerror.h:1432:1: ERROR_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 8517 // /usr/x86_64-w64-mingw32/include/winerror.h:1433:1: ERROR_DS_GOVERNSID_MISSING = 8410 // /usr/x86_64-w64-mingw32/include/winerror.h:1326:1: ERROR_DS_GROUP_CONVERSION_ERROR = 8607 // /usr/x86_64-w64-mingw32/include/winerror.h:1523:1: ERROR_DS_HAVE_PRIMARY_MEMBERS = 8521 // /usr/x86_64-w64-mingw32/include/winerror.h:1437:1: ERROR_DS_HIERARCHY_TABLE_MALLOC_FAILED = 8429 // /usr/x86_64-w64-mingw32/include/winerror.h:1345:1: ERROR_DS_ILLEGAL_BASE_SCHEMA_MOD = 8507 // /usr/x86_64-w64-mingw32/include/winerror.h:1423:1: ERROR_DS_ILLEGAL_MOD_OPERATION = 8311 // /usr/x86_64-w64-mingw32/include/winerror.h:1228:1: ERROR_DS_ILLEGAL_SUPERIOR = 8345 // /usr/x86_64-w64-mingw32/include/winerror.h:1261:1: ERROR_DS_ILLEGAL_XDOM_MOVE_OPERATION = 8492 // /usr/x86_64-w64-mingw32/include/winerror.h:1408:1: ERROR_DS_INAPPROPRIATE_AUTH = 8233 // /usr/x86_64-w64-mingw32/include/winerror.h:1188:1: ERROR_DS_INAPPROPRIATE_MATCHING = 8238 // /usr/x86_64-w64-mingw32/include/winerror.h:1193:1: ERROR_DS_INCOMPATIBLE_CONTROLS_USED = 8574 // /usr/x86_64-w64-mingw32/include/winerror.h:1490:1: ERROR_DS_INCOMPATIBLE_VERSION = 8567 // /usr/x86_64-w64-mingw32/include/winerror.h:1483:1: ERROR_DS_INCORRECT_ROLE_OWNER = 8210 // /usr/x86_64-w64-mingw32/include/winerror.h:1166:1: ERROR_DS_INIT_FAILURE = 8532 // /usr/x86_64-w64-mingw32/include/winerror.h:1448:1: ERROR_DS_INIT_FAILURE_CONSOLE = 8561 // /usr/x86_64-w64-mingw32/include/winerror.h:1477:1: ERROR_DS_INSTALL_NO_SCH_VERSION_IN_INIFILE = 8512 // /usr/x86_64-w64-mingw32/include/winerror.h:1428:1: ERROR_DS_INSTALL_NO_SRC_SCH_VERSION = 8511 // /usr/x86_64-w64-mingw32/include/winerror.h:1427:1: ERROR_DS_INSTALL_SCHEMA_MISMATCH = 8467 // /usr/x86_64-w64-mingw32/include/winerror.h:1383:1: ERROR_DS_INSUFFICIENT_ATTR_TO_CREATE_OBJECT = 8606 // /usr/x86_64-w64-mingw32/include/winerror.h:1522:1: ERROR_DS_INSUFF_ACCESS_RIGHTS = 8344 // /usr/x86_64-w64-mingw32/include/winerror.h:1260:1: ERROR_DS_INTERNAL_FAILURE = 8430 // /usr/x86_64-w64-mingw32/include/winerror.h:1346:1: ERROR_DS_INVALID_ATTRIBUTE_SYNTAX = 8203 // /usr/x86_64-w64-mingw32/include/winerror.h:1159:1: ERROR_DS_INVALID_DMD = 8360 // /usr/x86_64-w64-mingw32/include/winerror.h:1276:1: ERROR_DS_INVALID_DN_SYNTAX = 8242 // /usr/x86_64-w64-mingw32/include/winerror.h:1197:1: ERROR_DS_INVALID_GROUP_TYPE = 8513 // /usr/x86_64-w64-mingw32/include/winerror.h:1429:1: ERROR_DS_INVALID_LDAP_DISPLAY_NAME = 8479 // /usr/x86_64-w64-mingw32/include/winerror.h:1395:1: ERROR_DS_INVALID_NAME_FOR_SPN = 8554 // /usr/x86_64-w64-mingw32/include/winerror.h:1470:1: ERROR_DS_INVALID_ROLE_OWNER = 8366 // /usr/x86_64-w64-mingw32/include/winerror.h:1282:1: ERROR_DS_INVALID_SCRIPT = 8600 // /usr/x86_64-w64-mingw32/include/winerror.h:1516:1: ERROR_DS_INVALID_SEARCH_FLAG = 8500 // /usr/x86_64-w64-mingw32/include/winerror.h:1416:1: ERROR_DS_IS_LEAF = 8243 // /usr/x86_64-w64-mingw32/include/winerror.h:1198:1: ERROR_DS_KEY_NOT_UNIQUE = 8527 // /usr/x86_64-w64-mingw32/include/winerror.h:1443:1: ERROR_DS_LDAP_SEND_QUEUE_FULL = 8616 // /usr/x86_64-w64-mingw32/include/winerror.h:1532:1: ERROR_DS_LINK_ID_NOT_AVAILABLE = 8577 // /usr/x86_64-w64-mingw32/include/winerror.h:1493:1: ERROR_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 8520 // /usr/x86_64-w64-mingw32/include/winerror.h:1436:1: ERROR_DS_LOCAL_ERROR = 8251 // /usr/x86_64-w64-mingw32/include/winerror.h:1206:1: ERROR_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 8548 // /usr/x86_64-w64-mingw32/include/winerror.h:1464:1: ERROR_DS_LOOP_DETECT = 8246 // /usr/x86_64-w64-mingw32/include/winerror.h:1201:1: ERROR_DS_LOW_DSA_VERSION = 8568 // /usr/x86_64-w64-mingw32/include/winerror.h:1484:1: ERROR_DS_MACHINE_ACCOUNT_CREATED_PRENT4 = 8572 // /usr/x86_64-w64-mingw32/include/winerror.h:1488:1: ERROR_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 8557 // /usr/x86_64-w64-mingw32/include/winerror.h:1473:1: ERROR_DS_MASTERDSA_REQUIRED = 8314 // /usr/x86_64-w64-mingw32/include/winerror.h:1231:1: ERROR_DS_MAX_OBJ_SIZE_EXCEEDED = 8304 // /usr/x86_64-w64-mingw32/include/winerror.h:1221:1: ERROR_DS_MEMBERSHIP_EVALUATED_LOCALLY = 8201 // /usr/x86_64-w64-mingw32/include/winerror.h:1157:1: ERROR_DS_MISSING_EXPECTED_ATT = 8411 // /usr/x86_64-w64-mingw32/include/winerror.h:1327:1: ERROR_DS_MISSING_FSMO_SETTINGS = 8434 // /usr/x86_64-w64-mingw32/include/winerror.h:1350:1: ERROR_DS_MISSING_INFRASTRUCTURE_CONTAINER = 8497 // /usr/x86_64-w64-mingw32/include/winerror.h:1413:1: ERROR_DS_MISSING_REQUIRED_ATT = 8316 // /usr/x86_64-w64-mingw32/include/winerror.h:1233:1: ERROR_DS_MISSING_SUPREF = 8406 // /usr/x86_64-w64-mingw32/include/winerror.h:1322:1: ERROR_DS_MODIFYDN_DISALLOWED_BY_FLAG = 8581 // /usr/x86_64-w64-mingw32/include/winerror.h:1497:1: ERROR_DS_MODIFYDN_DISALLOWED_BY_INSTANCE_TYPE = 8579 // /usr/x86_64-w64-mingw32/include/winerror.h:1495:1: ERROR_DS_MODIFYDN_WRONG_GRANDPARENT = 8582 // /usr/x86_64-w64-mingw32/include/winerror.h:1498:1: ERROR_DS_MUST_BE_RUN_ON_DST_DC = 8558 // /usr/x86_64-w64-mingw32/include/winerror.h:1474:1: ERROR_DS_NAME_ERROR_DOMAIN_ONLY = 8473 // /usr/x86_64-w64-mingw32/include/winerror.h:1389:1: ERROR_DS_NAME_ERROR_NOT_FOUND = 8470 // /usr/x86_64-w64-mingw32/include/winerror.h:1386:1: ERROR_DS_NAME_ERROR_NOT_UNIQUE = 8471 // /usr/x86_64-w64-mingw32/include/winerror.h:1387:1: ERROR_DS_NAME_ERROR_NO_MAPPING = 8472 // /usr/x86_64-w64-mingw32/include/winerror.h:1388:1: ERROR_DS_NAME_ERROR_NO_SYNTACTICAL_MAPPING = 8474 // /usr/x86_64-w64-mingw32/include/winerror.h:1390:1: ERROR_DS_NAME_ERROR_RESOLVING = 8469 // /usr/x86_64-w64-mingw32/include/winerror.h:1385:1: ERROR_DS_NAME_ERROR_TRUST_REFERRAL = 8583 // /usr/x86_64-w64-mingw32/include/winerror.h:1499:1: ERROR_DS_NAME_NOT_UNIQUE = 8571 // /usr/x86_64-w64-mingw32/include/winerror.h:1487:1: ERROR_DS_NAME_REFERENCE_INVALID = 8373 // /usr/x86_64-w64-mingw32/include/winerror.h:1289:1: ERROR_DS_NAME_TOO_LONG = 8348 // /usr/x86_64-w64-mingw32/include/winerror.h:1264:1: ERROR_DS_NAME_TOO_MANY_PARTS = 8347 // /usr/x86_64-w64-mingw32/include/winerror.h:1263:1: ERROR_DS_NAME_TYPE_UNKNOWN = 8351 // /usr/x86_64-w64-mingw32/include/winerror.h:1267:1: ERROR_DS_NAME_UNPARSEABLE = 8350 // /usr/x86_64-w64-mingw32/include/winerror.h:1266:1: ERROR_DS_NAME_VALUE_TOO_LONG = 8349 // /usr/x86_64-w64-mingw32/include/winerror.h:1265:1: ERROR_DS_NAMING_MASTER_GC = 8523 // /usr/x86_64-w64-mingw32/include/winerror.h:1439:1: ERROR_DS_NAMING_VIOLATION = 8247 // /usr/x86_64-w64-mingw32/include/winerror.h:1202:1: ERROR_DS_NCNAME_MISSING_CR_REF = 8412 // /usr/x86_64-w64-mingw32/include/winerror.h:1328:1: ERROR_DS_NCNAME_MUST_BE_NC = 8357 // /usr/x86_64-w64-mingw32/include/winerror.h:1273:1: ERROR_DS_NC_MUST_HAVE_NC_PARENT = 8494 // /usr/x86_64-w64-mingw32/include/winerror.h:1410:1: ERROR_DS_NC_STILL_HAS_DSAS = 8546 // /usr/x86_64-w64-mingw32/include/winerror.h:1462:1: ERROR_DS_NONEXISTENT_MAY_HAVE = 8387 // /usr/x86_64-w64-mingw32/include/winerror.h:1303:1: ERROR_DS_NONEXISTENT_MUST_HAVE = 8388 // /usr/x86_64-w64-mingw32/include/winerror.h:1304:1: ERROR_DS_NONEXISTENT_POSS_SUP = 8390 // /usr/x86_64-w64-mingw32/include/winerror.h:1306:1: ERROR_DS_NONSAFE_SCHEMA_CHANGE = 8508 // /usr/x86_64-w64-mingw32/include/winerror.h:1424:1: ERROR_DS_NON_BASE_SEARCH = 8480 // /usr/x86_64-w64-mingw32/include/winerror.h:1396:1: ERROR_DS_NOTIFY_FILTER_TOO_COMPLEX = 8377 // /usr/x86_64-w64-mingw32/include/winerror.h:1293:1: ERROR_DS_NOT_AN_OBJECT = 8352 // /usr/x86_64-w64-mingw32/include/winerror.h:1268:1: ERROR_DS_NOT_AUTHORITIVE_FOR_DST_NC = 8487 // /usr/x86_64-w64-mingw32/include/winerror.h:1403:1: ERROR_DS_NOT_CLOSEST = 8588 // /usr/x86_64-w64-mingw32/include/winerror.h:1504:1: ERROR_DS_NOT_INSTALLED = 8200 // /usr/x86_64-w64-mingw32/include/winerror.h:1156:1: ERROR_DS_NOT_ON_BACKLINK = 8362 // /usr/x86_64-w64-mingw32/include/winerror.h:1278:1: ERROR_DS_NOT_SUPPORTED = 8256 // /usr/x86_64-w64-mingw32/include/winerror.h:1211:1: ERROR_DS_NOT_SUPPORTED_SORT_ORDER = 8570 // /usr/x86_64-w64-mingw32/include/winerror.h:1486:1: ERROR_DS_NO_ATTRIBUTE_OR_VALUE = 8202 // /usr/x86_64-w64-mingw32/include/winerror.h:1158:1: ERROR_DS_NO_BEHAVIOR_VERSION_IN_MIXEDDOMAIN = 8569 // /usr/x86_64-w64-mingw32/include/winerror.h:1485:1: ERROR_DS_NO_CHAINED_EVAL = 8328 // /usr/x86_64-w64-mingw32/include/winerror.h:1244:1: ERROR_DS_NO_CHAINING = 8327 // /usr/x86_64-w64-mingw32/include/winerror.h:1243:1: ERROR_DS_NO_CHECKPOINT_WITH_PDC = 8551 // /usr/x86_64-w64-mingw32/include/winerror.h:1467:1: ERROR_DS_NO_CROSSREF_FOR_NC = 8363 // /usr/x86_64-w64-mingw32/include/winerror.h:1279:1: ERROR_DS_NO_DELETED_NAME = 8355 // /usr/x86_64-w64-mingw32/include/winerror.h:1271:1: ERROR_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 8549 // /usr/x86_64-w64-mingw32/include/winerror.h:1465:1: ERROR_DS_NO_MORE_RIDS = 8209 // /usr/x86_64-w64-mingw32/include/winerror.h:1165:1: ERROR_DS_NO_MSDS_INTID = 8596 // /usr/x86_64-w64-mingw32/include/winerror.h:1512:1: ERROR_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 8514 // /usr/x86_64-w64-mingw32/include/winerror.h:1430:1: ERROR_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 8515 // /usr/x86_64-w64-mingw32/include/winerror.h:1431:1: ERROR_DS_NO_OBJECT_MOVE_IN_SCHEMA_NC = 8580 // /usr/x86_64-w64-mingw32/include/winerror.h:1496:1: ERROR_DS_NO_PARENT_OBJECT = 8329 // /usr/x86_64-w64-mingw32/include/winerror.h:1245:1: ERROR_DS_NO_PKT_PRIVACY_ON_CONNECTION = 8533 // /usr/x86_64-w64-mingw32/include/winerror.h:1449:1: ERROR_DS_NO_RDN_DEFINED_IN_SCHEMA = 8306 // /usr/x86_64-w64-mingw32/include/winerror.h:1223:1: ERROR_DS_NO_REF_DOMAIN = 8575 // /usr/x86_64-w64-mingw32/include/winerror.h:1491:1: ERROR_DS_NO_REQUESTED_ATTS_FOUND = 8308 // /usr/x86_64-w64-mingw32/include/winerror.h:1225:1: ERROR_DS_NO_RESULTS_RETURNED = 8257 // /usr/x86_64-w64-mingw32/include/winerror.h:1212:1: ERROR_DS_NO_RIDS_ALLOCATED = 8208 // /usr/x86_64-w64-mingw32/include/winerror.h:1164:1: ERROR_DS_NO_SUCH_OBJECT = 8240 // /usr/x86_64-w64-mingw32/include/winerror.h:1195:1: ERROR_DS_NO_TREE_DELETE_ABOVE_NC = 8501 // /usr/x86_64-w64-mingw32/include/winerror.h:1417:1: ERROR_DS_NTDSCRIPT_PROCESS_ERROR = 8592 // /usr/x86_64-w64-mingw32/include/winerror.h:1508:1: ERROR_DS_NTDSCRIPT_SYNTAX_ERROR = 8591 // /usr/x86_64-w64-mingw32/include/winerror.h:1507:1: ERROR_DS_OBJECT_BEING_REMOVED = 8339 // /usr/x86_64-w64-mingw32/include/winerror.h:1255:1: ERROR_DS_OBJECT_CLASS_REQUIRED = 8315 // /usr/x86_64-w64-mingw32/include/winerror.h:1232:1: ERROR_DS_OBJECT_RESULTS_TOO_LARGE = 8248 // /usr/x86_64-w64-mingw32/include/winerror.h:1203:1: ERROR_DS_OBJ_CLASS_NOT_DEFINED = 8371 // /usr/x86_64-w64-mingw32/include/winerror.h:1287:1: ERROR_DS_OBJ_CLASS_NOT_SUBCLASS = 8372 // /usr/x86_64-w64-mingw32/include/winerror.h:1288:1: ERROR_DS_OBJ_CLASS_VIOLATION = 8212 // /usr/x86_64-w64-mingw32/include/winerror.h:1168:1: ERROR_DS_OBJ_GUID_EXISTS = 8361 // /usr/x86_64-w64-mingw32/include/winerror.h:1277:1: ERROR_DS_OBJ_NOT_FOUND = 8333 // /usr/x86_64-w64-mingw32/include/winerror.h:1249:1: ERROR_DS_OBJ_STRING_NAME_EXISTS = 8305 // /usr/x86_64-w64-mingw32/include/winerror.h:1222:1: ERROR_DS_OBJ_TOO_LARGE = 8312 // /usr/x86_64-w64-mingw32/include/winerror.h:1229:1: ERROR_DS_OFFSET_RANGE_ERROR = 8262 // /usr/x86_64-w64-mingw32/include/winerror.h:1217:1: ERROR_DS_OPERATIONS_ERROR = 8224 // /usr/x86_64-w64-mingw32/include/winerror.h:1179:1: ERROR_DS_OUT_OF_SCOPE = 8338 // /usr/x86_64-w64-mingw32/include/winerror.h:1254:1: ERROR_DS_OUT_OF_VERSION_STORE = 8573 // /usr/x86_64-w64-mingw32/include/winerror.h:1489:1: ERROR_DS_PARAM_ERROR = 8255 // /usr/x86_64-w64-mingw32/include/winerror.h:1210:1: ERROR_DS_PARENT_IS_AN_ALIAS = 8330 // /usr/x86_64-w64-mingw32/include/winerror.h:1246:1: ERROR_DS_PDC_OPERATION_IN_PROGRESS = 8490 // /usr/x86_64-w64-mingw32/include/winerror.h:1406:1: ERROR_DS_PROTOCOL_ERROR = 8225 // /usr/x86_64-w64-mingw32/include/winerror.h:1180:1: ERROR_DS_RANGE_CONSTRAINT = 8322 // /usr/x86_64-w64-mingw32/include/winerror.h:1238:1: ERROR_DS_RDN_DOESNT_MATCH_SCHEMA = 8307 // /usr/x86_64-w64-mingw32/include/winerror.h:1224:1: ERROR_DS_RECALCSCHEMA_FAILED = 8396 // /usr/x86_64-w64-mingw32/include/winerror.h:1312:1: ERROR_DS_REFERRAL = 8235 // /usr/x86_64-w64-mingw32/include/winerror.h:1190:1: ERROR_DS_REFERRAL_LIMIT_EXCEEDED = 8260 // /usr/x86_64-w64-mingw32/include/winerror.h:1215:1: ERROR_DS_REFUSING_FSMO_ROLES = 8433 // /usr/x86_64-w64-mingw32/include/winerror.h:1349:1: ERROR_DS_REMOTE_CROSSREF_OP_FAILED = 8601 // /usr/x86_64-w64-mingw32/include/winerror.h:1517:1: ERROR_DS_REPLICATOR_ONLY = 8370 // /usr/x86_64-w64-mingw32/include/winerror.h:1286:1: ERROR_DS_REPLICA_SET_CHANGE_NOT_ALLOWED_ON_DISABLED_CR = 8595 // /usr/x86_64-w64-mingw32/include/winerror.h:1511:1: ERROR_DS_REPL_LIFETIME_EXCEEDED = 8614 // /usr/x86_64-w64-mingw32/include/winerror.h:1530:1: ERROR_DS_RESERVED_LINK_ID = 8576 // /usr/x86_64-w64-mingw32/include/winerror.h:1492:1: ERROR_DS_RIDMGR_INIT_ERROR = 8211 // /usr/x86_64-w64-mingw32/include/winerror.h:1167:1: ERROR_DS_ROLE_NOT_VERIFIED = 8610 // /usr/x86_64-w64-mingw32/include/winerror.h:1526:1: ERROR_DS_ROOT_CANT_BE_SUBREF = 8326 // /usr/x86_64-w64-mingw32/include/winerror.h:1242:1: ERROR_DS_ROOT_MUST_BE_NC = 8301 // /usr/x86_64-w64-mingw32/include/winerror.h:1218:1: ERROR_DS_ROOT_REQUIRES_CLASS_TOP = 8432 // /usr/x86_64-w64-mingw32/include/winerror.h:1348:1: ERROR_DS_SAM_INIT_FAILURE = 8504 // /usr/x86_64-w64-mingw32/include/winerror.h:1420:1: ERROR_DS_SAM_INIT_FAILURE_CONSOLE = 8562 // /usr/x86_64-w64-mingw32/include/winerror.h:1478:1: ERROR_DS_SAM_NEED_BOOTKEY_FLOPPY = 8530 // /usr/x86_64-w64-mingw32/include/winerror.h:1446:1: ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD = 8529 // /usr/x86_64-w64-mingw32/include/winerror.h:1445:1: ERROR_DS_SCHEMA_ALLOC_FAILED = 8415 // /usr/x86_64-w64-mingw32/include/winerror.h:1331:1: ERROR_DS_SCHEMA_NOT_LOADED = 8414 // /usr/x86_64-w64-mingw32/include/winerror.h:1330:1: ERROR_DS_SCHEMA_UPDATE_DISALLOWED = 8509 // /usr/x86_64-w64-mingw32/include/winerror.h:1425:1: ERROR_DS_SECURITY_CHECKING_ERROR = 8413 // /usr/x86_64-w64-mingw32/include/winerror.h:1329:1: ERROR_DS_SECURITY_ILLEGAL_MODIFY = 8423 // /usr/x86_64-w64-mingw32/include/winerror.h:1339:1: ERROR_DS_SEC_DESC_INVALID = 8354 // /usr/x86_64-w64-mingw32/include/winerror.h:1270:1: ERROR_DS_SEC_DESC_TOO_SHORT = 8353 // /usr/x86_64-w64-mingw32/include/winerror.h:1269:1: ERROR_DS_SEMANTIC_ATT_TEST = 8383 // /usr/x86_64-w64-mingw32/include/winerror.h:1299:1: ERROR_DS_SENSITIVE_GROUP_VIOLATION = 8505 // /usr/x86_64-w64-mingw32/include/winerror.h:1421:1: ERROR_DS_SERVER_DOWN = 8250 // /usr/x86_64-w64-mingw32/include/winerror.h:1205:1: ERROR_DS_SHUTTING_DOWN = 8364 // /usr/x86_64-w64-mingw32/include/winerror.h:1280:1: ERROR_DS_SINGLE_USER_MODE_FAILED = 8590 // /usr/x86_64-w64-mingw32/include/winerror.h:1506:1: ERROR_DS_SINGLE_VALUE_CONSTRAINT = 8321 // /usr/x86_64-w64-mingw32/include/winerror.h:1237:1: ERROR_DS_SIZELIMIT_EXCEEDED = 8227 // /usr/x86_64-w64-mingw32/include/winerror.h:1182:1: ERROR_DS_SORT_CONTROL_MISSING = 8261 // /usr/x86_64-w64-mingw32/include/winerror.h:1216:1: ERROR_DS_SOURCE_AUDITING_NOT_ENABLED = 8552 // /usr/x86_64-w64-mingw32/include/winerror.h:1468:1: ERROR_DS_SOURCE_DOMAIN_IN_FOREST = 8534 // /usr/x86_64-w64-mingw32/include/winerror.h:1450:1: ERROR_DS_SRC_AND_DST_NC_IDENTICAL = 8485 // /usr/x86_64-w64-mingw32/include/winerror.h:1401:1: ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH = 8540 // /usr/x86_64-w64-mingw32/include/winerror.h:1456:1: ERROR_DS_SRC_DC_MUST_BE_SP4_OR_GREATER = 8559 // /usr/x86_64-w64-mingw32/include/winerror.h:1475:1: ERROR_DS_SRC_GUID_MISMATCH = 8488 // /usr/x86_64-w64-mingw32/include/winerror.h:1404:1: ERROR_DS_SRC_NAME_MISMATCH = 8484 // /usr/x86_64-w64-mingw32/include/winerror.h:1400:1: ERROR_DS_SRC_OBJ_NOT_GROUP_OR_USER = 8538 // /usr/x86_64-w64-mingw32/include/winerror.h:1454:1: ERROR_DS_SRC_SID_EXISTS_IN_FOREST = 8539 // /usr/x86_64-w64-mingw32/include/winerror.h:1455:1: ERROR_DS_STRING_SD_CONVERSION_FAILED = 8522 // /usr/x86_64-w64-mingw32/include/winerror.h:1438:1: ERROR_DS_STRONG_AUTH_REQUIRED = 8232 // /usr/x86_64-w64-mingw32/include/winerror.h:1187:1: ERROR_DS_SUBREF_MUST_HAVE_PARENT = 8356 // /usr/x86_64-w64-mingw32/include/winerror.h:1272:1: ERROR_DS_SUBTREE_NOTIFY_NOT_NC_HEAD = 8376 // /usr/x86_64-w64-mingw32/include/winerror.h:1292:1: ERROR_DS_SUB_CLS_TEST_FAIL = 8391 // /usr/x86_64-w64-mingw32/include/winerror.h:1307:1: ERROR_DS_SYNTAX_MISMATCH = 8384 // /usr/x86_64-w64-mingw32/include/winerror.h:1300:1: ERROR_DS_THREAD_LIMIT_EXCEEDED = 8587 // /usr/x86_64-w64-mingw32/include/winerror.h:1503:1: ERROR_DS_TIMELIMIT_EXCEEDED = 8226 // /usr/x86_64-w64-mingw32/include/winerror.h:1181:1: ERROR_DS_TREE_DELETE_NOT_FINISHED = 8397 // /usr/x86_64-w64-mingw32/include/winerror.h:1313:1: ERROR_DS_UNABLE_TO_SURRENDER_ROLES = 8435 // /usr/x86_64-w64-mingw32/include/winerror.h:1351:1: ERROR_DS_UNAVAILABLE = 8207 // /usr/x86_64-w64-mingw32/include/winerror.h:1163:1: ERROR_DS_UNAVAILABLE_CRIT_EXTENSION = 8236 // /usr/x86_64-w64-mingw32/include/winerror.h:1191:1: ERROR_DS_UNICODEPWD_NOT_IN_QUOTES = 8556 // /usr/x86_64-w64-mingw32/include/winerror.h:1472:1: ERROR_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 8518 // /usr/x86_64-w64-mingw32/include/winerror.h:1434:1: ERROR_DS_UNKNOWN_ERROR = 8431 // /usr/x86_64-w64-mingw32/include/winerror.h:1347:1: ERROR_DS_UNKNOWN_OPERATION = 8365 // /usr/x86_64-w64-mingw32/include/winerror.h:1281:1: ERROR_DS_UNWILLING_TO_PERFORM = 8245 // /usr/x86_64-w64-mingw32/include/winerror.h:1200:1: ERROR_DS_USER_BUFFER_TO_SMALL = 8309 // /usr/x86_64-w64-mingw32/include/winerror.h:1226:1: ERROR_DS_WKO_CONTAINER_CANNOT_BE_SPECIAL = 8611 // /usr/x86_64-w64-mingw32/include/winerror.h:1527:1: ERROR_DS_WRONG_LINKED_ATT_SYNTAX = 8528 // /usr/x86_64-w64-mingw32/include/winerror.h:1444:1: ERROR_DS_WRONG_OM_OBJ_CLASS = 8476 // /usr/x86_64-w64-mingw32/include/winerror.h:1392:1: ERROR_DUPLICATE_SERVICE_NAME = 1078 // /usr/x86_64-w64-mingw32/include/winerror.h:316:1: ERROR_DUPLICATE_TAG = 2014 // /usr/x86_64-w64-mingw32/include/winerror.h:870:1: ERROR_DUP_DOMAINNAME = 1221 // /usr/x86_64-w64-mingw32/include/winerror.h:411:1: ERROR_DUP_NAME = 52 // /usr/x86_64-w64-mingw32/include/winerror.h:85:1: ERROR_DYNLINK_FROM_INVALID_RING = 196 // /usr/x86_64-w64-mingw32/include/winerror.h:194:1: ERROR_EAS_DIDNT_FIT = 275 // /usr/x86_64-w64-mingw32/include/winerror.h:232:1: ERROR_EAS_NOT_SUPPORTED = 282 // /usr/x86_64-w64-mingw32/include/winerror.h:236:1: ERROR_EA_ACCESS_DENIED = 994 // /usr/x86_64-w64-mingw32/include/winerror.h:261:1: ERROR_EA_FILE_CORRUPT = 276 // /usr/x86_64-w64-mingw32/include/winerror.h:233:1: ERROR_EA_LIST_INCONSISTENT = 255 // /usr/x86_64-w64-mingw32/include/winerror.h:227:1: ERROR_EA_TABLE_FULL = 277 // /usr/x86_64-w64-mingw32/include/winerror.h:234:1: ERROR_EC_CIRCULAR_FORWARDING = 15082 // /usr/x86_64-w64-mingw32/include/winerror.h:2111:1: ERROR_EC_CREDSTORE_FULL = 15083 // /usr/x86_64-w64-mingw32/include/winerror.h:2112:1: ERROR_EC_CRED_NOT_FOUND = 15084 // /usr/x86_64-w64-mingw32/include/winerror.h:2113:1: ERROR_EC_LOG_DISABLED = 15081 // /usr/x86_64-w64-mingw32/include/winerror.h:2110:1: ERROR_EC_NO_ACTIVE_CHANNEL = 15085 // /usr/x86_64-w64-mingw32/include/winerror.h:2114:1: ERROR_EC_SUBSCRIPTION_CANNOT_ACTIVATE = 15080 // /usr/x86_64-w64-mingw32/include/winerror.h:2109:1: ERROR_EFS_ALG_BLOB_TOO_BIG = 6013 // /usr/x86_64-w64-mingw32/include/winerror.h:1092:1: ERROR_EFS_DISABLED = 6015 // /usr/x86_64-w64-mingw32/include/winerror.h:1094:1: ERROR_EFS_SERVER_NOT_TRUSTED = 6011 // /usr/x86_64-w64-mingw32/include/winerror.h:1090:1: ERROR_EFS_VERSION_NOT_SUPPORT = 6016 // /usr/x86_64-w64-mingw32/include/winerror.h:1095:1: ERROR_EMPTY = 4306 // /usr/x86_64-w64-mingw32/include/winerror.h:930:1: ERROR_ENCRYPTION_FAILED = 6000 // /usr/x86_64-w64-mingw32/include/winerror.h:1079:1: ERROR_END_OF_MEDIA = 1100 // /usr/x86_64-w64-mingw32/include/winerror.h:323:1: ERROR_ENVVAR_NOT_FOUND = 203 // /usr/x86_64-w64-mingw32/include/winerror.h:201:1: ERROR_EOM_OVERFLOW = 1129 // /usr/x86_64-w64-mingw32/include/winerror.h:352:1: ERROR_EVENTLOG_CANT_START = 1501 // /usr/x86_64-w64-mingw32/include/winerror.h:644:1: ERROR_EVENTLOG_FILE_CHANGED = 1503 // /usr/x86_64-w64-mingw32/include/winerror.h:646:1: ERROR_EVENTLOG_FILE_CORRUPT = 1500 // /usr/x86_64-w64-mingw32/include/winerror.h:643:1: ERROR_EVT_CANNOT_OPEN_CHANNEL_OF_QUERY = 15036 // /usr/x86_64-w64-mingw32/include/winerror.h:2106:1: ERROR_EVT_CHANNEL_CANNOT_ACTIVATE = 15025 // /usr/x86_64-w64-mingw32/include/winerror.h:2095:1: ERROR_EVT_CHANNEL_NOT_FOUND = 15007 // /usr/x86_64-w64-mingw32/include/winerror.h:2077:1: ERROR_EVT_CONFIGURATION_ERROR = 15010 // /usr/x86_64-w64-mingw32/include/winerror.h:2080:1: ERROR_EVT_EVENT_DEFINITION_NOT_FOUND = 15032 // /usr/x86_64-w64-mingw32/include/winerror.h:2102:1: ERROR_EVT_EVENT_TEMPLATE_NOT_FOUND = 15003 // /usr/x86_64-w64-mingw32/include/winerror.h:2074:1: ERROR_EVT_FILTER_ALREADYSCOPED = 15014 // /usr/x86_64-w64-mingw32/include/winerror.h:2084:1: ERROR_EVT_FILTER_INVARG = 15016 // /usr/x86_64-w64-mingw32/include/winerror.h:2086:1: ERROR_EVT_FILTER_INVTEST = 15017 // /usr/x86_64-w64-mingw32/include/winerror.h:2087:1: ERROR_EVT_FILTER_INVTYPE = 15018 // /usr/x86_64-w64-mingw32/include/winerror.h:2088:1: ERROR_EVT_FILTER_NOTELTSET = 15015 // /usr/x86_64-w64-mingw32/include/winerror.h:2085:1: ERROR_EVT_FILTER_OUT_OF_RANGE = 15038 // /usr/x86_64-w64-mingw32/include/winerror.h:2108:1: ERROR_EVT_FILTER_PARSEERR = 15019 // /usr/x86_64-w64-mingw32/include/winerror.h:2089:1: ERROR_EVT_FILTER_TOO_COMPLEX = 15026 // /usr/x86_64-w64-mingw32/include/winerror.h:2096:1: ERROR_EVT_FILTER_UNEXPECTEDTOKEN = 15021 // /usr/x86_64-w64-mingw32/include/winerror.h:2091:1: ERROR_EVT_FILTER_UNSUPPORTEDOP = 15020 // /usr/x86_64-w64-mingw32/include/winerror.h:2090:1: ERROR_EVT_INVALID_CHANNEL_PATH = 15000 // /usr/x86_64-w64-mingw32/include/winerror.h:2071:1: ERROR_EVT_INVALID_CHANNEL_PROPERTY_VALUE = 15023 // /usr/x86_64-w64-mingw32/include/winerror.h:2093:1: ERROR_EVT_INVALID_EVENT_DATA = 15005 // /usr/x86_64-w64-mingw32/include/winerror.h:2076:1: ERROR_EVT_INVALID_OPERATION_OVER_ENABLED_DIRECT_CHANNEL = 15022 // /usr/x86_64-w64-mingw32/include/winerror.h:2092:1: ERROR_EVT_INVALID_PUBLISHER_NAME = 15004 // /usr/x86_64-w64-mingw32/include/winerror.h:2075:1: ERROR_EVT_INVALID_PUBLISHER_PROPERTY_VALUE = 15024 // /usr/x86_64-w64-mingw32/include/winerror.h:2094:1: ERROR_EVT_INVALID_QUERY = 15001 // /usr/x86_64-w64-mingw32/include/winerror.h:2072:1: ERROR_EVT_MALFORMED_XML_TEXT = 15008 // /usr/x86_64-w64-mingw32/include/winerror.h:2078:1: ERROR_EVT_MAX_INSERTS_REACHED = 15031 // /usr/x86_64-w64-mingw32/include/winerror.h:2101:1: ERROR_EVT_MESSAGE_ID_NOT_FOUND = 15028 // /usr/x86_64-w64-mingw32/include/winerror.h:2098:1: ERROR_EVT_MESSAGE_LOCALE_NOT_FOUND = 15033 // /usr/x86_64-w64-mingw32/include/winerror.h:2103:1: ERROR_EVT_MESSAGE_NOT_FOUND = 15027 // /usr/x86_64-w64-mingw32/include/winerror.h:2097:1: ERROR_EVT_NON_VALIDATING_MSXML = 15013 // /usr/x86_64-w64-mingw32/include/winerror.h:2083:1: ERROR_EVT_PUBLISHER_DISABLED = 15037 // /usr/x86_64-w64-mingw32/include/winerror.h:2107:1: ERROR_EVT_PUBLISHER_METADATA_NOT_FOUND = 15002 // /usr/x86_64-w64-mingw32/include/winerror.h:2073:1: ERROR_EVT_QUERY_RESULT_INVALID_POSITION = 15012 // /usr/x86_64-w64-mingw32/include/winerror.h:2082:1: ERROR_EVT_QUERY_RESULT_STALE = 15011 // /usr/x86_64-w64-mingw32/include/winerror.h:2081:1: ERROR_EVT_SUBSCRIPTION_TO_DIRECT_CHANNEL = 15009 // /usr/x86_64-w64-mingw32/include/winerror.h:2079:1: ERROR_EVT_UNRESOLVED_PARAMETER_INSERT = 15030 // /usr/x86_64-w64-mingw32/include/winerror.h:2100:1: ERROR_EVT_UNRESOLVED_VALUE_INSERT = 15029 // /usr/x86_64-w64-mingw32/include/winerror.h:2099:1: ERROR_EVT_VERSION_TOO_NEW = 15035 // /usr/x86_64-w64-mingw32/include/winerror.h:2105:1: ERROR_EVT_VERSION_TOO_OLD = 15034 // /usr/x86_64-w64-mingw32/include/winerror.h:2104:1: ERROR_EXCEPTION_IN_SERVICE = 1064 // /usr/x86_64-w64-mingw32/include/winerror.h:302:1: ERROR_EXCL_SEM_ALREADY_OWNED = 101 // /usr/x86_64-w64-mingw32/include/winerror.h:116:1: ERROR_EXE_CANNOT_MODIFY_SIGNED_BINARY = 217 // /usr/x86_64-w64-mingw32/include/winerror.h:212:1: ERROR_EXE_CANNOT_MODIFY_STRONG_SIGNED_BINARY = 218 // /usr/x86_64-w64-mingw32/include/winerror.h:213:1: ERROR_EXE_MACHINE_TYPE_MISMATCH = 216 // /usr/x86_64-w64-mingw32/include/winerror.h:211:1: ERROR_EXE_MARKED_INVALID = 192 // /usr/x86_64-w64-mingw32/include/winerror.h:190:1: ERROR_EXTENDED_ERROR = 1208 // /usr/x86_64-w64-mingw32/include/winerror.h:398:1: ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063 // /usr/x86_64-w64-mingw32/include/winerror.h:301:1: ERROR_FAIL_I24 = 83 // /usr/x86_64-w64-mingw32/include/winerror.h:108:1: ERROR_FILEMARK_DETECTED = 1101 // /usr/x86_64-w64-mingw32/include/winerror.h:324:1: ERROR_FILENAME_EXCED_RANGE = 206 // /usr/x86_64-w64-mingw32/include/winerror.h:203:1: ERROR_FILE_CHECKED_OUT = 220 // /usr/x86_64-w64-mingw32/include/winerror.h:214:1: ERROR_FILE_CORRUPT = 1392 // /usr/x86_64-w64-mingw32/include/winerror.h:563:1: ERROR_FILE_ENCRYPTED = 6002 // /usr/x86_64-w64-mingw32/include/winerror.h:1081:1: ERROR_FILE_EXISTS = 80 // /usr/x86_64-w64-mingw32/include/winerror.h:106:1: ERROR_FILE_INVALID = 1006 // /usr/x86_64-w64-mingw32/include/winerror.h:272:1: ERROR_FILE_NOT_ENCRYPTED = 6007 // /usr/x86_64-w64-mingw32/include/winerror.h:1086:1: ERROR_FILE_NOT_FOUND = 2 // /usr/x86_64-w64-mingw32/include/winerror.h:47:1: ERROR_FILE_OFFLINE = 4350 // /usr/x86_64-w64-mingw32/include/winerror.h:966:1: ERROR_FILE_READ_ONLY = 6009 // /usr/x86_64-w64-mingw32/include/winerror.h:1088:1: ERROR_FILE_TOO_LARGE = 223 // /usr/x86_64-w64-mingw32/include/winerror.h:217:1: ERROR_FLOPPY_BAD_REGISTERS = 1125 // /usr/x86_64-w64-mingw32/include/winerror.h:348:1: ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122 // /usr/x86_64-w64-mingw32/include/winerror.h:345:1: ERROR_FLOPPY_UNKNOWN_ERROR = 1124 // /usr/x86_64-w64-mingw32/include/winerror.h:347:1: ERROR_FLOPPY_WRONG_CYLINDER = 1123 // /usr/x86_64-w64-mingw32/include/winerror.h:346:1: ERROR_FORMS_AUTH_REQUIRED = 224 // /usr/x86_64-w64-mingw32/include/winerror.h:218:1: ERROR_FULLSCREEN_MODE = 1007 // /usr/x86_64-w64-mingw32/include/winerror.h:273:1: ERROR_FULL_BACKUP = 4004 // /usr/x86_64-w64-mingw32/include/winerror.h:905:1: ERROR_FUNCTION_FAILED = 1627 // /usr/x86_64-w64-mingw32/include/winerror.h:673:1: ERROR_FUNCTION_NOT_CALLED = 1626 // /usr/x86_64-w64-mingw32/include/winerror.h:672:1: ERROR_GENERIC_COMMAND_FAILED = 14109 // /usr/x86_64-w64-mingw32/include/winerror.h:1909:1: ERROR_GENERIC_NOT_MAPPED = 1360 // /usr/x86_64-w64-mingw32/include/winerror.h:531:1: ERROR_GEN_FAILURE = 31 // /usr/x86_64-w64-mingw32/include/winerror.h:76:1: ERROR_GLOBAL_ONLY_HOOK = 1429 // /usr/x86_64-w64-mingw32/include/winerror.h:600:1: ERROR_GPIO_CLIENT_INFORMATION_INVALID = 15322 // /usr/x86_64-w64-mingw32/include/winerror.h:2158:1: ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE = 15326 // /usr/x86_64-w64-mingw32/include/winerror.h:2162:1: ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED = 15327 // /usr/x86_64-w64-mingw32/include/winerror.h:2163:1: ERROR_GPIO_INVALID_REGISTRATION_PACKET = 15324 // /usr/x86_64-w64-mingw32/include/winerror.h:2160:1: ERROR_GPIO_OPERATION_DENIED = 15325 // /usr/x86_64-w64-mingw32/include/winerror.h:2161:1: ERROR_GPIO_VERSION_NOT_SUPPORTED = 15323 // /usr/x86_64-w64-mingw32/include/winerror.h:2159:1: ERROR_GRACEFUL_DISCONNECT = 1226 // /usr/x86_64-w64-mingw32/include/winerror.h:416:1: ERROR_GROUP_EXISTS = 1318 // /usr/x86_64-w64-mingw32/include/winerror.h:490:1: ERROR_GROUP_NOT_AVAILABLE = 5012 // /usr/x86_64-w64-mingw32/include/winerror.h:986:1: ERROR_GROUP_NOT_FOUND = 5013 // /usr/x86_64-w64-mingw32/include/winerror.h:987:1: ERROR_GROUP_NOT_ONLINE = 5014 // /usr/x86_64-w64-mingw32/include/winerror.h:988:1: ERROR_HANDLE_DISK_FULL = 39 // /usr/x86_64-w64-mingw32/include/winerror.h:82:1: ERROR_HANDLE_EOF = 38 // /usr/x86_64-w64-mingw32/include/winerror.h:81:1: ERROR_HASH_NOT_PRESENT = 15301 // /usr/x86_64-w64-mingw32/include/winerror.h:2156:1: ERROR_HASH_NOT_SUPPORTED = 15300 // /usr/x86_64-w64-mingw32/include/winerror.h:2155:1: ERROR_HOOK_NEEDS_HMOD = 1428 // /usr/x86_64-w64-mingw32/include/winerror.h:599:1: ERROR_HOOK_NOT_INSTALLED = 1431 // /usr/x86_64-w64-mingw32/include/winerror.h:602:1: ERROR_HOOK_TYPE_NOT_ALLOWED = 1458 // /usr/x86_64-w64-mingw32/include/winerror.h:629:1: ERROR_HOST_DOWN = 1256 // /usr/x86_64-w64-mingw32/include/winerror.h:446:1: ERROR_HOST_NODE_NOT_AVAILABLE = 5005 // /usr/x86_64-w64-mingw32/include/winerror.h:979:1: ERROR_HOST_NODE_NOT_GROUP_OWNER = 5016 // /usr/x86_64-w64-mingw32/include/winerror.h:990:1: ERROR_HOST_NODE_NOT_RESOURCE_OWNER = 5015 // /usr/x86_64-w64-mingw32/include/winerror.h:989:1: ERROR_HOST_UNREACHABLE = 1232 // /usr/x86_64-w64-mingw32/include/winerror.h:422:1: ERROR_HOTKEY_ALREADY_REGISTERED = 1409 // /usr/x86_64-w64-mingw32/include/winerror.h:580:1: ERROR_HOTKEY_NOT_REGISTERED = 1419 // /usr/x86_64-w64-mingw32/include/winerror.h:590:1: ERROR_HWNDS_HAVE_DIFF_PARENT = 1441 // /usr/x86_64-w64-mingw32/include/winerror.h:612:1: ERROR_ICM_NOT_ENABLED = 2018 // /usr/x86_64-w64-mingw32/include/winerror.h:874:1: ERROR_IEPORT_FULL = 4341 // /usr/x86_64-w64-mingw32/include/winerror.h:965:1: ERROR_ILLEGAL_ELEMENT_ADDRESS = 1162 // /usr/x86_64-w64-mingw32/include/winerror.h:371:1: ERROR_ILL_FORMED_PASSWORD = 1324 // /usr/x86_64-w64-mingw32/include/winerror.h:496:1: ERROR_INCORRECT_ADDRESS = 1241 // /usr/x86_64-w64-mingw32/include/winerror.h:431:1: ERROR_INCORRECT_SIZE = 1462 // /usr/x86_64-w64-mingw32/include/winerror.h:633:1: ERROR_INC_BACKUP = 4003 // /usr/x86_64-w64-mingw32/include/winerror.h:904:1: ERROR_INDEX_ABSENT = 1611 // /usr/x86_64-w64-mingw32/include/winerror.h:657:1: ERROR_INDIGENOUS_TYPE = 4338 // /usr/x86_64-w64-mingw32/include/winerror.h:962:1: ERROR_INFLOOP_IN_RELOC_CHAIN = 202 // /usr/x86_64-w64-mingw32/include/winerror.h:200:1: ERROR_INIT_STATUS_NEEDED = 0x00000011 // /usr/x86_64-w64-mingw32/include/winioctl.h:1174:1: ERROR_INSTALL_ALREADY_RUNNING = 1618 // /usr/x86_64-w64-mingw32/include/winerror.h:664:1: ERROR_INSTALL_CANCEL = 15608 // /usr/x86_64-w64-mingw32/include/winerror.h:2179:1: ERROR_INSTALL_DEREGISTRATION_FAILURE = 15607 // /usr/x86_64-w64-mingw32/include/winerror.h:2178:1: ERROR_INSTALL_FAILED = 15609 // /usr/x86_64-w64-mingw32/include/winerror.h:2180:1: ERROR_INSTALL_FAILURE = 1603 // /usr/x86_64-w64-mingw32/include/winerror.h:649:1: ERROR_INSTALL_FIREWALL_SERVICE_NOT_RUNNING = 15626 // /usr/x86_64-w64-mingw32/include/winerror.h:2197:1: ERROR_INSTALL_INVALID_PACKAGE = 15602 // /usr/x86_64-w64-mingw32/include/winerror.h:2173:1: ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623 // /usr/x86_64-w64-mingw32/include/winerror.h:669:1: ERROR_INSTALL_LOG_FAILURE = 1622 // /usr/x86_64-w64-mingw32/include/winerror.h:668:1: ERROR_INSTALL_NETWORK_FAILURE = 15605 // /usr/x86_64-w64-mingw32/include/winerror.h:2176:1: ERROR_INSTALL_NOTUSED = 1634 // /usr/x86_64-w64-mingw32/include/winerror.h:680:1: ERROR_INSTALL_OPEN_PACKAGE_FAILED = 15600 // /usr/x86_64-w64-mingw32/include/winerror.h:2171:1: ERROR_INSTALL_OUT_OF_DISK_SPACE = 15604 // /usr/x86_64-w64-mingw32/include/winerror.h:2175:1: ERROR_INSTALL_PACKAGE_DOWNGRADE = 15622 // /usr/x86_64-w64-mingw32/include/winerror.h:2193:1: ERROR_INSTALL_PACKAGE_INVALID = 1620 // /usr/x86_64-w64-mingw32/include/winerror.h:666:1: ERROR_INSTALL_PACKAGE_NOT_FOUND = 15601 // /usr/x86_64-w64-mingw32/include/winerror.h:2172:1: ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619 // /usr/x86_64-w64-mingw32/include/winerror.h:665:1: ERROR_INSTALL_PACKAGE_REJECTED = 1625 // /usr/x86_64-w64-mingw32/include/winerror.h:671:1: ERROR_INSTALL_PACKAGE_VERSION = 1613 // /usr/x86_64-w64-mingw32/include/winerror.h:659:1: ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633 // /usr/x86_64-w64-mingw32/include/winerror.h:679:1: ERROR_INSTALL_POLICY_FAILURE = 15615 // /usr/x86_64-w64-mingw32/include/winerror.h:2186:1: ERROR_INSTALL_PREREQUISITE_FAILED = 15613 // /usr/x86_64-w64-mingw32/include/winerror.h:2184:1: ERROR_INSTALL_REGISTRATION_FAILURE = 15606 // /usr/x86_64-w64-mingw32/include/winerror.h:2177:1: ERROR_INSTALL_REMOTE_DISALLOWED = 1640 // /usr/x86_64-w64-mingw32/include/winerror.h:686:1: ERROR_INSTALL_REMOTE_PROHIBITED = 1645 // /usr/x86_64-w64-mingw32/include/winerror.h:691:1: ERROR_INSTALL_RESOLVE_DEPENDENCY_FAILED = 15603 // /usr/x86_64-w64-mingw32/include/winerror.h:2174:1: ERROR_INSTALL_SERVICE_FAILURE = 1601 // /usr/x86_64-w64-mingw32/include/winerror.h:647:1: ERROR_INSTALL_SOURCE_ABSENT = 1612 // /usr/x86_64-w64-mingw32/include/winerror.h:658:1: ERROR_INSTALL_SUSPEND = 1604 // /usr/x86_64-w64-mingw32/include/winerror.h:650:1: ERROR_INSTALL_TEMP_UNWRITABLE = 1632 // /usr/x86_64-w64-mingw32/include/winerror.h:678:1: ERROR_INSTALL_TRANSFORM_FAILURE = 1624 // /usr/x86_64-w64-mingw32/include/winerror.h:670:1: ERROR_INSTALL_TRANSFORM_REJECTED = 1644 // /usr/x86_64-w64-mingw32/include/winerror.h:690:1: ERROR_INSTALL_UI_FAILURE = 1621 // /usr/x86_64-w64-mingw32/include/winerror.h:667:1: ERROR_INSTALL_USEREXIT = 1602 // /usr/x86_64-w64-mingw32/include/winerror.h:648:1: ERROR_INSUFFICIENT_BUFFER = 122 // /usr/x86_64-w64-mingw32/include/winerror.h:135:1: ERROR_INTERNAL_DB_CORRUPTION = 1358 // /usr/x86_64-w64-mingw32/include/winerror.h:529:1: ERROR_INTERNAL_DB_ERROR = 1383 // /usr/x86_64-w64-mingw32/include/winerror.h:554:1: ERROR_INTERNAL_ERROR = 1359 // /usr/x86_64-w64-mingw32/include/winerror.h:530:1: ERROR_INVALID_ACCEL_HANDLE = 1403 // /usr/x86_64-w64-mingw32/include/winerror.h:574:1: ERROR_INVALID_ACCESS = 12 // /usr/x86_64-w64-mingw32/include/winerror.h:57:1: ERROR_INVALID_ACCOUNT_NAME = 1315 // /usr/x86_64-w64-mingw32/include/winerror.h:487:1: ERROR_INVALID_ACL = 1336 // /usr/x86_64-w64-mingw32/include/winerror.h:508:1: ERROR_INVALID_ADDRESS = 487 // /usr/x86_64-w64-mingw32/include/winerror.h:247:1: ERROR_INVALID_AT_INTERRUPT_TIME = 104 // /usr/x86_64-w64-mingw32/include/winerror.h:119:1: ERROR_INVALID_BLOCK = 9 // /usr/x86_64-w64-mingw32/include/winerror.h:54:1: ERROR_INVALID_BLOCK_LENGTH = 1106 // /usr/x86_64-w64-mingw32/include/winerror.h:329:1: ERROR_INVALID_CATEGORY = 117 // /usr/x86_64-w64-mingw32/include/winerror.h:130:1: ERROR_INVALID_CLEANER = 4310 // /usr/x86_64-w64-mingw32/include/winerror.h:934:1: ERROR_INVALID_CMM = 2010 // /usr/x86_64-w64-mingw32/include/winerror.h:866:1: ERROR_INVALID_COLORINDEX = 2022 // /usr/x86_64-w64-mingw32/include/winerror.h:878:1: ERROR_INVALID_COLORSPACE = 2017 // /usr/x86_64-w64-mingw32/include/winerror.h:873:1: ERROR_INVALID_COMBOBOX_MESSAGE = 1422 // /usr/x86_64-w64-mingw32/include/winerror.h:593:1: ERROR_INVALID_COMMAND_LINE = 1639 // /usr/x86_64-w64-mingw32/include/winerror.h:685:1: ERROR_INVALID_COMPUTERNAME = 1210 // /usr/x86_64-w64-mingw32/include/winerror.h:400:1: ERROR_INVALID_CURSOR_HANDLE = 1402 // /usr/x86_64-w64-mingw32/include/winerror.h:573:1: ERROR_INVALID_DATA = 13 // /usr/x86_64-w64-mingw32/include/winerror.h:58:1: ERROR_INVALID_DATATYPE = 1804 // /usr/x86_64-w64-mingw32/include/winerror.h:792:1: ERROR_INVALID_DLL = 1154 // /usr/x86_64-w64-mingw32/include/winerror.h:363:1: ERROR_INVALID_DOMAINNAME = 1212 // /usr/x86_64-w64-mingw32/include/winerror.h:402:1: ERROR_INVALID_DOMAIN_ROLE = 1354 // /usr/x86_64-w64-mingw32/include/winerror.h:525:1: ERROR_INVALID_DOMAIN_STATE = 1353 // /usr/x86_64-w64-mingw32/include/winerror.h:524:1: ERROR_INVALID_DRIVE = 15 // /usr/x86_64-w64-mingw32/include/winerror.h:60:1: ERROR_INVALID_DRIVE_OBJECT = 4321 // /usr/x86_64-w64-mingw32/include/winerror.h:945:1: ERROR_INVALID_DWP_HANDLE = 1405 // /usr/x86_64-w64-mingw32/include/winerror.h:576:1: ERROR_INVALID_EA_HANDLE = 278 // /usr/x86_64-w64-mingw32/include/winerror.h:235:1: ERROR_INVALID_EA_NAME = 254 // /usr/x86_64-w64-mingw32/include/winerror.h:226:1: ERROR_INVALID_EDIT_HEIGHT = 1424 // /usr/x86_64-w64-mingw32/include/winerror.h:595:1: ERROR_INVALID_ENVIRONMENT = 1805 // /usr/x86_64-w64-mingw32/include/winerror.h:793:1: ERROR_INVALID_EVENTNAME = 1211 // /usr/x86_64-w64-mingw32/include/winerror.h:401:1: ERROR_INVALID_EVENT_COUNT = 151 // /usr/x86_64-w64-mingw32/include/winerror.h:164:1: ERROR_INVALID_EXE_SIGNATURE = 191 // /usr/x86_64-w64-mingw32/include/winerror.h:189:1: ERROR_INVALID_FIELD = 1616 // /usr/x86_64-w64-mingw32/include/winerror.h:662:1: ERROR_INVALID_FILTER_PROC = 1427 // /usr/x86_64-w64-mingw32/include/winerror.h:598:1: ERROR_INVALID_FLAGS = 1004 // /usr/x86_64-w64-mingw32/include/winerror.h:270:1: ERROR_INVALID_FLAG_NUMBER = 186 // /usr/x86_64-w64-mingw32/include/winerror.h:184:1: ERROR_INVALID_FORM_NAME = 1902 // /usr/x86_64-w64-mingw32/include/winerror.h:825:1: ERROR_INVALID_FORM_SIZE = 1903 // /usr/x86_64-w64-mingw32/include/winerror.h:826:1: ERROR_INVALID_FUNCTION = 1 // /usr/x86_64-w64-mingw32/include/winerror.h:46:1: ERROR_INVALID_GROUPNAME = 1209 // /usr/x86_64-w64-mingw32/include/winerror.h:399:1: ERROR_INVALID_GROUP_ATTRIBUTES = 1345 // /usr/x86_64-w64-mingw32/include/winerror.h:516:1: ERROR_INVALID_GW_COMMAND = 1443 // /usr/x86_64-w64-mingw32/include/winerror.h:614:1: ERROR_INVALID_HANDLE = 6 // /usr/x86_64-w64-mingw32/include/winerror.h:51:1: ERROR_INVALID_HANDLE_STATE = 1609 // /usr/x86_64-w64-mingw32/include/winerror.h:655:1: ERROR_INVALID_HOOK_FILTER = 1426 // /usr/x86_64-w64-mingw32/include/winerror.h:597:1: ERROR_INVALID_HOOK_HANDLE = 1404 // /usr/x86_64-w64-mingw32/include/winerror.h:575:1: ERROR_INVALID_ICON_HANDLE = 1414 // /usr/x86_64-w64-mingw32/include/winerror.h:585:1: ERROR_INVALID_ID_AUTHORITY = 1343 // /usr/x86_64-w64-mingw32/include/winerror.h:514:1: ERROR_INVALID_IMPORT_OF_NON_DLL = 1276 // /usr/x86_64-w64-mingw32/include/winerror.h:460:1: ERROR_INVALID_INDEX = 1413 // /usr/x86_64-w64-mingw32/include/winerror.h:584:1: ERROR_INVALID_KEYBOARD_HANDLE = 1457 // /usr/x86_64-w64-mingw32/include/winerror.h:628:1: ERROR_INVALID_LB_MESSAGE = 1432 // /usr/x86_64-w64-mingw32/include/winerror.h:603:1: ERROR_INVALID_LEVEL = 124 // /usr/x86_64-w64-mingw32/include/winerror.h:137:1: ERROR_INVALID_LIBRARY = 4301 // /usr/x86_64-w64-mingw32/include/winerror.h:925:1: ERROR_INVALID_LIST_FORMAT = 153 // /usr/x86_64-w64-mingw32/include/winerror.h:166:1: ERROR_INVALID_LOGON_HOURS = 1328 // /usr/x86_64-w64-mingw32/include/winerror.h:500:1: ERROR_INVALID_LOGON_TYPE = 1367 // /usr/x86_64-w64-mingw32/include/winerror.h:538:1: ERROR_INVALID_MEDIA = 4300 // /usr/x86_64-w64-mingw32/include/winerror.h:924:1: ERROR_INVALID_MEDIA_POOL = 4302 // /usr/x86_64-w64-mingw32/include/winerror.h:926:1: ERROR_INVALID_MEMBER = 1388 // /usr/x86_64-w64-mingw32/include/winerror.h:559:1: ERROR_INVALID_MENU_HANDLE = 1401 // /usr/x86_64-w64-mingw32/include/winerror.h:572:1: ERROR_INVALID_MESSAGE = 1002 // /usr/x86_64-w64-mingw32/include/winerror.h:268:1: ERROR_INVALID_MESSAGEDEST = 1218 // /usr/x86_64-w64-mingw32/include/winerror.h:408:1: ERROR_INVALID_MESSAGENAME = 1217 // /usr/x86_64-w64-mingw32/include/winerror.h:407:1: ERROR_INVALID_MINALLOCSIZE = 195 // /usr/x86_64-w64-mingw32/include/winerror.h:193:1: ERROR_INVALID_MODULETYPE = 190 // /usr/x86_64-w64-mingw32/include/winerror.h:188:1: ERROR_INVALID_MONITOR_HANDLE = 1461 // /usr/x86_64-w64-mingw32/include/winerror.h:632:1: ERROR_INVALID_MSGBOX_STYLE = 1438 // /usr/x86_64-w64-mingw32/include/winerror.h:609:1: ERROR_INVALID_NAME = 123 // /usr/x86_64-w64-mingw32/include/winerror.h:136:1: ERROR_INVALID_NETNAME = 1214 // /usr/x86_64-w64-mingw32/include/winerror.h:404:1: ERROR_INVALID_OPERATION = 4317 // /usr/x86_64-w64-mingw32/include/winerror.h:941:1: ERROR_INVALID_OPERATION_ON_QUORUM = 5068 // /usr/x86_64-w64-mingw32/include/winerror.h:1041:1: ERROR_INVALID_OPLOCK_PROTOCOL = 301 // /usr/x86_64-w64-mingw32/include/winerror.h:241:1: ERROR_INVALID_ORDINAL = 182 // /usr/x86_64-w64-mingw32/include/winerror.h:182:1: ERROR_INVALID_OWNER = 1307 // /usr/x86_64-w64-mingw32/include/winerror.h:479:1: ERROR_INVALID_PARAMETER = 87 // /usr/x86_64-w64-mingw32/include/winerror.h:112:1: ERROR_INVALID_PASSWORD = 86 // /usr/x86_64-w64-mingw32/include/winerror.h:111:1: ERROR_INVALID_PASSWORDNAME = 1216 // /usr/x86_64-w64-mingw32/include/winerror.h:406:1: ERROR_INVALID_PIXEL_FORMAT = 2000 // /usr/x86_64-w64-mingw32/include/winerror.h:860:1: ERROR_INVALID_PRIMARY_GROUP = 1308 // /usr/x86_64-w64-mingw32/include/winerror.h:480:1: ERROR_INVALID_PRINTER_COMMAND = 1803 // /usr/x86_64-w64-mingw32/include/winerror.h:791:1: ERROR_INVALID_PRINTER_NAME = 1801 // /usr/x86_64-w64-mingw32/include/winerror.h:789:1: ERROR_INVALID_PRINTER_STATE = 1906 // /usr/x86_64-w64-mingw32/include/winerror.h:829:1: ERROR_INVALID_PRINT_MONITOR = 3007 // /usr/x86_64-w64-mingw32/include/winerror.h:893:1: ERROR_INVALID_PRIORITY = 1800 // /usr/x86_64-w64-mingw32/include/winerror.h:788:1: ERROR_INVALID_PROFILE = 2011 // /usr/x86_64-w64-mingw32/include/winerror.h:867:1: ERROR_INVALID_REPARSE_DATA = 4392 // /usr/x86_64-w64-mingw32/include/winerror.h:971:1: ERROR_INVALID_RUNLEVEL_SETTING = 15401 // /usr/x86_64-w64-mingw32/include/winerror.h:2165:1: ERROR_INVALID_SCROLLBAR_RANGE = 1448 // /usr/x86_64-w64-mingw32/include/winerror.h:619:1: ERROR_INVALID_SECURITY_DESCR = 1338 // /usr/x86_64-w64-mingw32/include/winerror.h:510:1: ERROR_INVALID_SEGDPL = 198 // /usr/x86_64-w64-mingw32/include/winerror.h:196:1: ERROR_INVALID_SEGMENT_NUMBER = 180 // /usr/x86_64-w64-mingw32/include/winerror.h:181:1: ERROR_INVALID_SEPARATOR_FILE = 1799 // /usr/x86_64-w64-mingw32/include/winerror.h:787:1: ERROR_INVALID_SERVER_STATE = 1352 // /usr/x86_64-w64-mingw32/include/winerror.h:523:1: ERROR_INVALID_SERVICENAME = 1213 // /usr/x86_64-w64-mingw32/include/winerror.h:403:1: ERROR_INVALID_SERVICE_ACCOUNT = 1057 // /usr/x86_64-w64-mingw32/include/winerror.h:295:1: ERROR_INVALID_SERVICE_CONTROL = 1052 // /usr/x86_64-w64-mingw32/include/winerror.h:290:1: ERROR_INVALID_SERVICE_LOCK = 1071 // /usr/x86_64-w64-mingw32/include/winerror.h:309:1: ERROR_INVALID_SHARENAME = 1215 // /usr/x86_64-w64-mingw32/include/winerror.h:405:1: ERROR_INVALID_SHOWWIN_COMMAND = 1449 // /usr/x86_64-w64-mingw32/include/winerror.h:620:1: ERROR_INVALID_SID = 1337 // /usr/x86_64-w64-mingw32/include/winerror.h:509:1: ERROR_INVALID_SIGNAL_NUMBER = 209 // /usr/x86_64-w64-mingw32/include/winerror.h:206:1: ERROR_INVALID_SPI_VALUE = 1439 // /usr/x86_64-w64-mingw32/include/winerror.h:610:1: ERROR_INVALID_STACKSEG = 189 // /usr/x86_64-w64-mingw32/include/winerror.h:187:1: ERROR_INVALID_STAGED_SIGNATURE = 15620 // /usr/x86_64-w64-mingw32/include/winerror.h:2191:1: ERROR_INVALID_STARTING_CODESEG = 188 // /usr/x86_64-w64-mingw32/include/winerror.h:186:1: ERROR_INVALID_STATE = 5023 // /usr/x86_64-w64-mingw32/include/winerror.h:997:1: ERROR_INVALID_SUB_AUTHORITY = 1335 // /usr/x86_64-w64-mingw32/include/winerror.h:507:1: ERROR_INVALID_TABLE = 1628 // /usr/x86_64-w64-mingw32/include/winerror.h:674:1: ERROR_INVALID_TARGET_HANDLE = 114 // /usr/x86_64-w64-mingw32/include/winerror.h:129:1: ERROR_INVALID_THREAD_ID = 1444 // /usr/x86_64-w64-mingw32/include/winerror.h:615:1: ERROR_INVALID_TIME = 1901 // /usr/x86_64-w64-mingw32/include/winerror.h:824:1: ERROR_INVALID_TOKEN = 315 // /usr/x86_64-w64-mingw32/include/winerror.h:244:1: ERROR_INVALID_TRANSFORM = 2020 // /usr/x86_64-w64-mingw32/include/winerror.h:876:1: ERROR_INVALID_USER_BUFFER = 1784 // /usr/x86_64-w64-mingw32/include/winerror.h:772:1: ERROR_INVALID_VERIFY_SWITCH = 118 // /usr/x86_64-w64-mingw32/include/winerror.h:131:1: ERROR_INVALID_WINDOW_HANDLE = 1400 // /usr/x86_64-w64-mingw32/include/winerror.h:571:1: ERROR_INVALID_WINDOW_STYLE = 2002 // /usr/x86_64-w64-mingw32/include/winerror.h:862:1: ERROR_INVALID_WORKSTATION = 1329 // /usr/x86_64-w64-mingw32/include/winerror.h:501:1: ERROR_IOPL_NOT_ENABLED = 197 // /usr/x86_64-w64-mingw32/include/winerror.h:195:1: ERROR_IO_DEVICE = 1117 // /usr/x86_64-w64-mingw32/include/winerror.h:340:1: ERROR_IO_INCOMPLETE = 996 // /usr/x86_64-w64-mingw32/include/winerror.h:263:1: ERROR_IO_PENDING = 997 // /usr/x86_64-w64-mingw32/include/winerror.h:264:1: ERROR_IPSEC_AUTH_FIREWALL_DROP = 13917 // /usr/x86_64-w64-mingw32/include/winerror.h:2061:1: ERROR_IPSEC_BAD_SPI = 13910 // /usr/x86_64-w64-mingw32/include/winerror.h:2054:1: ERROR_IPSEC_CLEAR_TEXT_DROP = 13916 // /usr/x86_64-w64-mingw32/include/winerror.h:2060:1: ERROR_IPSEC_DEFAULT_MM_AUTH_NOT_FOUND = 13014 // /usr/x86_64-w64-mingw32/include/winerror.h:1925:1: ERROR_IPSEC_DEFAULT_MM_POLICY_NOT_FOUND = 13013 // /usr/x86_64-w64-mingw32/include/winerror.h:1924:1: ERROR_IPSEC_DEFAULT_QM_POLICY_NOT_FOUND = 13015 // /usr/x86_64-w64-mingw32/include/winerror.h:1926:1: ERROR_IPSEC_DOSP_BLOCK = 13925 // /usr/x86_64-w64-mingw32/include/winerror.h:2063:1: ERROR_IPSEC_DOSP_INVALID_PACKET = 13927 // /usr/x86_64-w64-mingw32/include/winerror.h:2065:1: ERROR_IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 13930 // /usr/x86_64-w64-mingw32/include/winerror.h:2068:1: ERROR_IPSEC_DOSP_MAX_ENTRIES = 13929 // /usr/x86_64-w64-mingw32/include/winerror.h:2067:1: ERROR_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 13932 // /usr/x86_64-w64-mingw32/include/winerror.h:2070:1: ERROR_IPSEC_DOSP_NOT_INSTALLED = 13931 // /usr/x86_64-w64-mingw32/include/winerror.h:2069:1: ERROR_IPSEC_DOSP_RECEIVED_MULTICAST = 13926 // /usr/x86_64-w64-mingw32/include/winerror.h:2064:1: ERROR_IPSEC_DOSP_STATE_LOOKUP_FAILED = 13928 // /usr/x86_64-w64-mingw32/include/winerror.h:2066:1: ERROR_IPSEC_IKE_ADD_UPDATE_KEY_FAILED = 13860 // /usr/x86_64-w64-mingw32/include/winerror.h:1995:1: ERROR_IPSEC_IKE_ATTRIB_FAIL = 13802 // /usr/x86_64-w64-mingw32/include/winerror.h:1939:1: ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE = 13905 // /usr/x86_64-w64-mingw32/include/winerror.h:2049:1: ERROR_IPSEC_IKE_AUTHORIZATION_FAILURE_WITH_OPTIONAL_RETRY = 13907 // /usr/x86_64-w64-mingw32/include/winerror.h:2051:1: ERROR_IPSEC_IKE_AUTH_FAIL = 13801 // /usr/x86_64-w64-mingw32/include/winerror.h:1938:1: ERROR_IPSEC_IKE_BENIGN_REINIT = 13878 // /usr/x86_64-w64-mingw32/include/winerror.h:2013:1: ERROR_IPSEC_IKE_CERT_CHAIN_POLICY_MISMATCH = 13887 // /usr/x86_64-w64-mingw32/include/winerror.h:2031:1: ERROR_IPSEC_IKE_CGA_AUTH_FAILED = 13892 // /usr/x86_64-w64-mingw32/include/winerror.h:2036:1: ERROR_IPSEC_IKE_COEXISTENCE_SUPPRESS = 13902 // /usr/x86_64-w64-mingw32/include/winerror.h:2046:1: ERROR_IPSEC_IKE_CRL_FAILED = 13817 // /usr/x86_64-w64-mingw32/include/winerror.h:1954:1: ERROR_IPSEC_IKE_DECRYPT = 13867 // /usr/x86_64-w64-mingw32/include/winerror.h:2002:1: ERROR_IPSEC_IKE_DH_FAIL = 13822 // /usr/x86_64-w64-mingw32/include/winerror.h:1958:1: ERROR_IPSEC_IKE_DH_FAILURE = 13864 // /usr/x86_64-w64-mingw32/include/winerror.h:1999:1: ERROR_IPSEC_IKE_DOS_COOKIE_SENT = 13890 // /usr/x86_64-w64-mingw32/include/winerror.h:2034:1: ERROR_IPSEC_IKE_DROP_NO_RESPONSE = 13813 // /usr/x86_64-w64-mingw32/include/winerror.h:1950:1: ERROR_IPSEC_IKE_ENCRYPT = 13866 // /usr/x86_64-w64-mingw32/include/winerror.h:2001:1: ERROR_IPSEC_IKE_ERROR = 13816 // /usr/x86_64-w64-mingw32/include/winerror.h:1953:1: ERROR_IPSEC_IKE_FAILQUERYSSP = 13854 // /usr/x86_64-w64-mingw32/include/winerror.h:1989:1: ERROR_IPSEC_IKE_FAILSSPINIT = 13853 // /usr/x86_64-w64-mingw32/include/winerror.h:1988:1: ERROR_IPSEC_IKE_GENERAL_PROCESSING_ERROR = 13804 // /usr/x86_64-w64-mingw32/include/winerror.h:1941:1: ERROR_IPSEC_IKE_GETSPIFAIL = 13857 // /usr/x86_64-w64-mingw32/include/winerror.h:1992:1: ERROR_IPSEC_IKE_INNER_IP_ASSIGNMENT_FAILURE = 13899 // /usr/x86_64-w64-mingw32/include/winerror.h:2043:1: ERROR_IPSEC_IKE_INVALID_AUTH_ALG = 13874 // /usr/x86_64-w64-mingw32/include/winerror.h:2009:1: ERROR_IPSEC_IKE_INVALID_AUTH_PAYLOAD = 13889 // /usr/x86_64-w64-mingw32/include/winerror.h:2033:1: ERROR_IPSEC_IKE_INVALID_CERT_KEYLEN = 13881 // /usr/x86_64-w64-mingw32/include/winerror.h:2015:1: ERROR_IPSEC_IKE_INVALID_CERT_TYPE = 13819 // /usr/x86_64-w64-mingw32/include/winerror.h:1956:1: ERROR_IPSEC_IKE_INVALID_COOKIE = 13846 // /usr/x86_64-w64-mingw32/include/winerror.h:1981:1: ERROR_IPSEC_IKE_INVALID_ENCRYPT_ALG = 13873 // /usr/x86_64-w64-mingw32/include/winerror.h:2008:1: ERROR_IPSEC_IKE_INVALID_FILTER = 13858 // /usr/x86_64-w64-mingw32/include/winerror.h:1993:1: ERROR_IPSEC_IKE_INVALID_GROUP = 13865 // /usr/x86_64-w64-mingw32/include/winerror.h:2000:1: ERROR_IPSEC_IKE_INVALID_HASH = 13870 // /usr/x86_64-w64-mingw32/include/winerror.h:2005:1: ERROR_IPSEC_IKE_INVALID_HASH_ALG = 13871 // /usr/x86_64-w64-mingw32/include/winerror.h:2006:1: ERROR_IPSEC_IKE_INVALID_HASH_SIZE = 13872 // /usr/x86_64-w64-mingw32/include/winerror.h:2007:1: ERROR_IPSEC_IKE_INVALID_HEADER = 13824 // /usr/x86_64-w64-mingw32/include/winerror.h:1959:1: ERROR_IPSEC_IKE_INVALID_KEY_USAGE = 13818 // /usr/x86_64-w64-mingw32/include/winerror.h:1955:1: ERROR_IPSEC_IKE_INVALID_MM_FOR_QM = 13894 // /usr/x86_64-w64-mingw32/include/winerror.h:2038:1: ERROR_IPSEC_IKE_INVALID_PAYLOAD = 13843 // /usr/x86_64-w64-mingw32/include/winerror.h:1978:1: ERROR_IPSEC_IKE_INVALID_POLICY = 13861 // /usr/x86_64-w64-mingw32/include/winerror.h:1996:1: ERROR_IPSEC_IKE_INVALID_RESPONDER_LIFETIME_NOTIFY = 13879 // /usr/x86_64-w64-mingw32/include/winerror.h:2014:1: ERROR_IPSEC_IKE_INVALID_SIG = 13875 // /usr/x86_64-w64-mingw32/include/winerror.h:2010:1: ERROR_IPSEC_IKE_INVALID_SIGNATURE = 13826 // /usr/x86_64-w64-mingw32/include/winerror.h:1961:1: ERROR_IPSEC_IKE_INVALID_SITUATION = 13863 // /usr/x86_64-w64-mingw32/include/winerror.h:1998:1: ERROR_IPSEC_IKE_KERBEROS_ERROR = 13827 // /usr/x86_64-w64-mingw32/include/winerror.h:1962:1: ERROR_IPSEC_IKE_KILL_DUMMY_NAP_TUNNEL = 13898 // /usr/x86_64-w64-mingw32/include/winerror.h:2042:1: ERROR_IPSEC_IKE_LOAD_FAILED = 13876 // /usr/x86_64-w64-mingw32/include/winerror.h:2011:1: ERROR_IPSEC_IKE_LOAD_SOFT_SA = 13844 // /usr/x86_64-w64-mingw32/include/winerror.h:1979:1: ERROR_IPSEC_IKE_MM_ACQUIRE_DROP = 13809 // /usr/x86_64-w64-mingw32/include/winerror.h:1946:1: ERROR_IPSEC_IKE_MM_DELAY_DROP = 13814 // /usr/x86_64-w64-mingw32/include/winerror.h:1951:1: ERROR_IPSEC_IKE_MM_EXPIRED = 13885 // /usr/x86_64-w64-mingw32/include/winerror.h:2029:1: ERROR_IPSEC_IKE_MM_LIMIT = 13882 // /usr/x86_64-w64-mingw32/include/winerror.h:2016:1: ERROR_IPSEC_IKE_NEGOTIATION_DISABLED = 13883 // /usr/x86_64-w64-mingw32/include/winerror.h:2017:1: ERROR_IPSEC_IKE_NEGOTIATION_PENDING = 13803 // /usr/x86_64-w64-mingw32/include/winerror.h:1940:1: ERROR_IPSEC_IKE_NEG_STATUS_BEGIN = 13800 // /usr/x86_64-w64-mingw32/include/winerror.h:1937:1: ERROR_IPSEC_IKE_NEG_STATUS_END = 13897 // /usr/x86_64-w64-mingw32/include/winerror.h:2041:1: ERROR_IPSEC_IKE_NEG_STATUS_EXTENDED_END = 13909 // /usr/x86_64-w64-mingw32/include/winerror.h:2053:1: ERROR_IPSEC_IKE_NOTCBPRIV = 13851 // /usr/x86_64-w64-mingw32/include/winerror.h:1986:1: ERROR_IPSEC_IKE_NO_CERT = 13806 // /usr/x86_64-w64-mingw32/include/winerror.h:1943:1: ERROR_IPSEC_IKE_NO_MM_POLICY = 13850 // /usr/x86_64-w64-mingw32/include/winerror.h:1985:1: ERROR_IPSEC_IKE_NO_PEER_CERT = 13847 // /usr/x86_64-w64-mingw32/include/winerror.h:1982:1: ERROR_IPSEC_IKE_NO_POLICY = 13825 // /usr/x86_64-w64-mingw32/include/winerror.h:1960:1: ERROR_IPSEC_IKE_NO_PRIVATE_KEY = 13820 // /usr/x86_64-w64-mingw32/include/winerror.h:1957:1: ERROR_IPSEC_IKE_NO_PUBLIC_KEY = 13828 // /usr/x86_64-w64-mingw32/include/winerror.h:1963:1: ERROR_IPSEC_IKE_OUT_OF_MEMORY = 13859 // /usr/x86_64-w64-mingw32/include/winerror.h:1994:1: ERROR_IPSEC_IKE_PEER_CRL_FAILED = 13848 // /usr/x86_64-w64-mingw32/include/winerror.h:1983:1: ERROR_IPSEC_IKE_PEER_DOESNT_SUPPORT_MOBIKE = 13904 // /usr/x86_64-w64-mingw32/include/winerror.h:2048:1: ERROR_IPSEC_IKE_PEER_MM_ASSUMED_INVALID = 13886 // /usr/x86_64-w64-mingw32/include/winerror.h:2030:1: ERROR_IPSEC_IKE_POLICY_CHANGE = 13849 // /usr/x86_64-w64-mingw32/include/winerror.h:1984:1: ERROR_IPSEC_IKE_POLICY_MATCH = 13868 // /usr/x86_64-w64-mingw32/include/winerror.h:2003:1: ERROR_IPSEC_IKE_PROCESS_ERR = 13829 // /usr/x86_64-w64-mingw32/include/winerror.h:1964:1: ERROR_IPSEC_IKE_PROCESS_ERR_CERT = 13835 // /usr/x86_64-w64-mingw32/include/winerror.h:1970:1: ERROR_IPSEC_IKE_PROCESS_ERR_CERT_REQ = 13836 // /usr/x86_64-w64-mingw32/include/winerror.h:1971:1: ERROR_IPSEC_IKE_PROCESS_ERR_DELETE = 13841 // /usr/x86_64-w64-mingw32/include/winerror.h:1976:1: ERROR_IPSEC_IKE_PROCESS_ERR_HASH = 13837 // /usr/x86_64-w64-mingw32/include/winerror.h:1972:1: ERROR_IPSEC_IKE_PROCESS_ERR_ID = 13834 // /usr/x86_64-w64-mingw32/include/winerror.h:1969:1: ERROR_IPSEC_IKE_PROCESS_ERR_KE = 13833 // /usr/x86_64-w64-mingw32/include/winerror.h:1968:1: ERROR_IPSEC_IKE_PROCESS_ERR_NATOA = 13893 // /usr/x86_64-w64-mingw32/include/winerror.h:2037:1: ERROR_IPSEC_IKE_PROCESS_ERR_NONCE = 13839 // /usr/x86_64-w64-mingw32/include/winerror.h:1974:1: ERROR_IPSEC_IKE_PROCESS_ERR_NOTIFY = 13840 // /usr/x86_64-w64-mingw32/include/winerror.h:1975:1: ERROR_IPSEC_IKE_PROCESS_ERR_PROP = 13831 // /usr/x86_64-w64-mingw32/include/winerror.h:1966:1: ERROR_IPSEC_IKE_PROCESS_ERR_SA = 13830 // /usr/x86_64-w64-mingw32/include/winerror.h:1965:1: ERROR_IPSEC_IKE_PROCESS_ERR_SIG = 13838 // /usr/x86_64-w64-mingw32/include/winerror.h:1973:1: ERROR_IPSEC_IKE_PROCESS_ERR_TRANS = 13832 // /usr/x86_64-w64-mingw32/include/winerror.h:1967:1: ERROR_IPSEC_IKE_PROCESS_ERR_VENDOR = 13842 // /usr/x86_64-w64-mingw32/include/winerror.h:1977:1: ERROR_IPSEC_IKE_QM_ACQUIRE_DROP = 13810 // /usr/x86_64-w64-mingw32/include/winerror.h:1947:1: ERROR_IPSEC_IKE_QM_DELAY_DROP = 13815 // /usr/x86_64-w64-mingw32/include/winerror.h:1952:1: ERROR_IPSEC_IKE_QM_EXPIRED = 13895 // /usr/x86_64-w64-mingw32/include/winerror.h:2039:1: ERROR_IPSEC_IKE_QM_LIMIT = 13884 // /usr/x86_64-w64-mingw32/include/winerror.h:2028:1: ERROR_IPSEC_IKE_QUEUE_DROP_MM = 13811 // /usr/x86_64-w64-mingw32/include/winerror.h:1948:1: ERROR_IPSEC_IKE_QUEUE_DROP_NO_MM = 13812 // /usr/x86_64-w64-mingw32/include/winerror.h:1949:1: ERROR_IPSEC_IKE_RATELIMIT_DROP = 13903 // /usr/x86_64-w64-mingw32/include/winerror.h:2047:1: ERROR_IPSEC_IKE_REQUIRE_CP_PAYLOAD_MISSING = 13900 // /usr/x86_64-w64-mingw32/include/winerror.h:2044:1: ERROR_IPSEC_IKE_RPC_DELETE = 13877 // /usr/x86_64-w64-mingw32/include/winerror.h:2012:1: ERROR_IPSEC_IKE_SA_DELETED = 13807 // /usr/x86_64-w64-mingw32/include/winerror.h:1944:1: ERROR_IPSEC_IKE_SA_REAPED = 13808 // /usr/x86_64-w64-mingw32/include/winerror.h:1945:1: ERROR_IPSEC_IKE_SECLOADFAIL = 13852 // /usr/x86_64-w64-mingw32/include/winerror.h:1987:1: ERROR_IPSEC_IKE_SHUTTING_DOWN = 13891 // /usr/x86_64-w64-mingw32/include/winerror.h:2035:1: ERROR_IPSEC_IKE_SOFT_SA_TORN_DOWN = 13845 // /usr/x86_64-w64-mingw32/include/winerror.h:1980:1: ERROR_IPSEC_IKE_SRVACQFAIL = 13855 // /usr/x86_64-w64-mingw32/include/winerror.h:1990:1: ERROR_IPSEC_IKE_SRVQUERYCRED = 13856 // /usr/x86_64-w64-mingw32/include/winerror.h:1991:1: ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_AND_CERTMAP_FAILURE = 13908 // /usr/x86_64-w64-mingw32/include/winerror.h:2052:1: ERROR_IPSEC_IKE_STRONG_CRED_AUTHORIZATION_FAILURE = 13906 // /usr/x86_64-w64-mingw32/include/winerror.h:2050:1: ERROR_IPSEC_IKE_TIMED_OUT = 13805 // /usr/x86_64-w64-mingw32/include/winerror.h:1942:1: ERROR_IPSEC_IKE_TOO_MANY_FILTERS = 13896 // /usr/x86_64-w64-mingw32/include/winerror.h:2040:1: ERROR_IPSEC_IKE_UNEXPECTED_MESSAGE_ID = 13888 // /usr/x86_64-w64-mingw32/include/winerror.h:2032:1: ERROR_IPSEC_IKE_UNKNOWN_DOI = 13862 // /usr/x86_64-w64-mingw32/include/winerror.h:1997:1: ERROR_IPSEC_IKE_UNSUPPORTED_ID = 13869 // /usr/x86_64-w64-mingw32/include/winerror.h:2004:1: ERROR_IPSEC_INTEGRITY_CHECK_FAILED = 13915 // /usr/x86_64-w64-mingw32/include/winerror.h:2059:1: ERROR_IPSEC_INVALID_PACKET = 13914 // /usr/x86_64-w64-mingw32/include/winerror.h:2058:1: ERROR_IPSEC_KEY_MODULE_IMPERSONATION_NEGOTIATION_PENDING = 13901 // /usr/x86_64-w64-mingw32/include/winerror.h:2045:1: ERROR_IPSEC_MM_AUTH_EXISTS = 13010 // /usr/x86_64-w64-mingw32/include/winerror.h:1921:1: ERROR_IPSEC_MM_AUTH_IN_USE = 13012 // /usr/x86_64-w64-mingw32/include/winerror.h:1923:1: ERROR_IPSEC_MM_AUTH_NOT_FOUND = 13011 // /usr/x86_64-w64-mingw32/include/winerror.h:1922:1: ERROR_IPSEC_MM_AUTH_PENDING_DELETION = 13022 // /usr/x86_64-w64-mingw32/include/winerror.h:1933:1: ERROR_IPSEC_MM_FILTER_EXISTS = 13006 // /usr/x86_64-w64-mingw32/include/winerror.h:1917:1: ERROR_IPSEC_MM_FILTER_NOT_FOUND = 13007 // /usr/x86_64-w64-mingw32/include/winerror.h:1918:1: ERROR_IPSEC_MM_FILTER_PENDING_DELETION = 13018 // /usr/x86_64-w64-mingw32/include/winerror.h:1929:1: ERROR_IPSEC_MM_POLICY_EXISTS = 13003 // /usr/x86_64-w64-mingw32/include/winerror.h:1914:1: ERROR_IPSEC_MM_POLICY_IN_USE = 13005 // /usr/x86_64-w64-mingw32/include/winerror.h:1916:1: ERROR_IPSEC_MM_POLICY_NOT_FOUND = 13004 // /usr/x86_64-w64-mingw32/include/winerror.h:1915:1: ERROR_IPSEC_MM_POLICY_PENDING_DELETION = 13021 // /usr/x86_64-w64-mingw32/include/winerror.h:1932:1: ERROR_IPSEC_QM_POLICY_EXISTS = 13000 // /usr/x86_64-w64-mingw32/include/winerror.h:1911:1: ERROR_IPSEC_QM_POLICY_IN_USE = 13002 // /usr/x86_64-w64-mingw32/include/winerror.h:1913:1: ERROR_IPSEC_QM_POLICY_NOT_FOUND = 13001 // /usr/x86_64-w64-mingw32/include/winerror.h:1912:1: ERROR_IPSEC_QM_POLICY_PENDING_DELETION = 13023 // /usr/x86_64-w64-mingw32/include/winerror.h:1934:1: ERROR_IPSEC_REPLAY_CHECK_FAILED = 13913 // /usr/x86_64-w64-mingw32/include/winerror.h:2057:1: ERROR_IPSEC_SA_LIFETIME_EXPIRED = 13911 // /usr/x86_64-w64-mingw32/include/winerror.h:2055:1: ERROR_IPSEC_THROTTLE_DROP = 13918 // /usr/x86_64-w64-mingw32/include/winerror.h:2062:1: ERROR_IPSEC_TRANSPORT_FILTER_EXISTS = 13008 // /usr/x86_64-w64-mingw32/include/winerror.h:1919:1: ERROR_IPSEC_TRANSPORT_FILTER_NOT_FOUND = 13009 // /usr/x86_64-w64-mingw32/include/winerror.h:1920:1: ERROR_IPSEC_TRANSPORT_FILTER_PENDING_DELETION = 13019 // /usr/x86_64-w64-mingw32/include/winerror.h:1930:1: ERROR_IPSEC_TUNNEL_FILTER_EXISTS = 13016 // /usr/x86_64-w64-mingw32/include/winerror.h:1927:1: ERROR_IPSEC_TUNNEL_FILTER_NOT_FOUND = 13017 // /usr/x86_64-w64-mingw32/include/winerror.h:1928:1: ERROR_IPSEC_TUNNEL_FILTER_PENDING_DELETION = 13020 // /usr/x86_64-w64-mingw32/include/winerror.h:1931:1: ERROR_IPSEC_WRONG_SA = 13912 // /usr/x86_64-w64-mingw32/include/winerror.h:2056:1: ERROR_IRQ_BUSY = 1119 // /usr/x86_64-w64-mingw32/include/winerror.h:342:1: ERROR_IS_JOINED = 134 // /usr/x86_64-w64-mingw32/include/winerror.h:147:1: ERROR_IS_JOIN_PATH = 147 // /usr/x86_64-w64-mingw32/include/winerror.h:160:1: ERROR_IS_JOIN_TARGET = 133 // /usr/x86_64-w64-mingw32/include/winerror.h:146:1: ERROR_IS_SUBSTED = 135 // /usr/x86_64-w64-mingw32/include/winerror.h:148:1: ERROR_IS_SUBST_PATH = 146 // /usr/x86_64-w64-mingw32/include/winerror.h:159:1: ERROR_IS_SUBST_TARGET = 149 // /usr/x86_64-w64-mingw32/include/winerror.h:162:1: ERROR_ITERATED_DATA_EXCEEDS_64k = 194 // /usr/x86_64-w64-mingw32/include/winerror.h:192:1: ERROR_JOIN_TO_JOIN = 138 // /usr/x86_64-w64-mingw32/include/winerror.h:151:1: ERROR_JOIN_TO_SUBST = 140 // /usr/x86_64-w64-mingw32/include/winerror.h:153:1: ERROR_JOURNAL_DELETE_IN_PROGRESS = 1178 // /usr/x86_64-w64-mingw32/include/winerror.h:386:1: ERROR_JOURNAL_ENTRY_DELETED = 1181 // /usr/x86_64-w64-mingw32/include/winerror.h:389:1: ERROR_JOURNAL_HOOK_SET = 1430 // /usr/x86_64-w64-mingw32/include/winerror.h:601:1: ERROR_JOURNAL_NOT_ACTIVE = 1179 // /usr/x86_64-w64-mingw32/include/winerror.h:387:1: ERROR_KERNEL_APC = 738 // /usr/x86_64-w64-mingw32/include/winerror.h:259:1: ERROR_KEY_DELETED = 1018 // /usr/x86_64-w64-mingw32/include/winerror.h:284:1: ERROR_KEY_HAS_CHILDREN = 1020 // /usr/x86_64-w64-mingw32/include/winerror.h:286:1: ERROR_KM_DRIVER_BLOCKED = 1930 // /usr/x86_64-w64-mingw32/include/winerror.h:853:1: ERROR_LABEL_QUESTIONABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1170:1: ERROR_LABEL_TOO_LONG = 154 // /usr/x86_64-w64-mingw32/include/winerror.h:167:1: ERROR_LABEL_UNREADABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1169:1: ERROR_LAST_ADMIN = 1322 // /usr/x86_64-w64-mingw32/include/winerror.h:494:1: ERROR_LB_WITHOUT_TABSTOPS = 1434 // /usr/x86_64-w64-mingw32/include/winerror.h:605:1: ERROR_LIBRARY_FULL = 4322 // /usr/x86_64-w64-mingw32/include/winerror.h:946:1: ERROR_LIBRARY_OFFLINE = 4305 // /usr/x86_64-w64-mingw32/include/winerror.h:929:1: ERROR_LICENSE_QUOTA_EXCEEDED = 1395 // /usr/x86_64-w64-mingw32/include/winerror.h:566:1: ERROR_LISTBOX_ID_NOT_FOUND = 1416 // /usr/x86_64-w64-mingw32/include/winerror.h:587:1: ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390 // /usr/x86_64-w64-mingw32/include/winerror.h:561:1: ERROR_LOCAL_USER_SESSION_KEY = 1303 // /usr/x86_64-w64-mingw32/include/winerror.h:475:1: ERROR_LOCKED = 212 // /usr/x86_64-w64-mingw32/include/winerror.h:208:1: ERROR_LOCK_FAILED = 167 // /usr/x86_64-w64-mingw32/include/winerror.h:177:1: ERROR_LOCK_VIOLATION = 33 // /usr/x86_64-w64-mingw32/include/winerror.h:78:1: ERROR_LOGIN_TIME_RESTRICTION = 1239 // /usr/x86_64-w64-mingw32/include/winerror.h:429:1: ERROR_LOGIN_WKSTA_RESTRICTION = 1240 // /usr/x86_64-w64-mingw32/include/winerror.h:430:1: ERROR_LOGON_FAILURE = 1326 // /usr/x86_64-w64-mingw32/include/winerror.h:498:1: ERROR_LOGON_NOT_GRANTED = 1380 // /usr/x86_64-w64-mingw32/include/winerror.h:551:1: ERROR_LOGON_SESSION_COLLISION = 1366 // /usr/x86_64-w64-mingw32/include/winerror.h:537:1: ERROR_LOGON_SESSION_EXISTS = 1363 // /usr/x86_64-w64-mingw32/include/winerror.h:534:1: ERROR_LOGON_TYPE_NOT_GRANTED = 1385 // /usr/x86_64-w64-mingw32/include/winerror.h:556:1: ERROR_LOG_FILE_FULL = 1502 // /usr/x86_64-w64-mingw32/include/winerror.h:645:1: ERROR_LUIDS_EXHAUSTED = 1334 // /usr/x86_64-w64-mingw32/include/winerror.h:506:1: ERROR_MACHINE_LOCKED = 1271 // /usr/x86_64-w64-mingw32/include/winerror.h:456:1: ERROR_MAGAZINE_NOT_PRESENT = 1163 // /usr/x86_64-w64-mingw32/include/winerror.h:372:1: ERROR_MALFORMED_SUBSTITUTION_STRING = 14094 // /usr/x86_64-w64-mingw32/include/winerror.h:1894:1: ERROR_MAPPED_ALIGNMENT = 1132 // /usr/x86_64-w64-mingw32/include/winerror.h:355:1: ERROR_MAX_THRDS_REACHED = 164 // /usr/x86_64-w64-mingw32/include/winerror.h:176:1: ERROR_MCA_INTERNAL_ERROR = 15205 // /usr/x86_64-w64-mingw32/include/winerror.h:2150:1: ERROR_MCA_INVALID_CAPABILITIES_STRING = 15200 // /usr/x86_64-w64-mingw32/include/winerror.h:2145:1: ERROR_MCA_INVALID_TECHNOLOGY_TYPE_RETURNED = 15206 // /usr/x86_64-w64-mingw32/include/winerror.h:2151:1: ERROR_MCA_INVALID_VCP_VERSION = 15201 // /usr/x86_64-w64-mingw32/include/winerror.h:2146:1: ERROR_MCA_MCCS_VERSION_MISMATCH = 15203 // /usr/x86_64-w64-mingw32/include/winerror.h:2148:1: ERROR_MCA_MONITOR_VIOLATES_MCCS_SPECIFICATION = 15202 // /usr/x86_64-w64-mingw32/include/winerror.h:2147:1: ERROR_MCA_UNSUPPORTED_COLOR_TEMPERATURE = 15207 // /usr/x86_64-w64-mingw32/include/winerror.h:2152:1: ERROR_MCA_UNSUPPORTED_MCCS_VERSION = 15204 // /usr/x86_64-w64-mingw32/include/winerror.h:2149:1: ERROR_MEDIA_CHANGED = 1110 // /usr/x86_64-w64-mingw32/include/winerror.h:333:1: ERROR_MEDIA_INCOMPATIBLE = 4315 // /usr/x86_64-w64-mingw32/include/winerror.h:939:1: ERROR_MEDIA_NOT_AVAILABLE = 4318 // /usr/x86_64-w64-mingw32/include/winerror.h:942:1: ERROR_MEDIA_OFFLINE = 4304 // /usr/x86_64-w64-mingw32/include/winerror.h:928:1: ERROR_MEDIA_UNAVAILABLE = 4308 // /usr/x86_64-w64-mingw32/include/winerror.h:932:1: ERROR_MEDIUM_NOT_ACCESSIBLE = 4323 // /usr/x86_64-w64-mingw32/include/winerror.h:947:1: ERROR_MEMBERS_PRIMARY_GROUP = 1374 // /usr/x86_64-w64-mingw32/include/winerror.h:545:1: ERROR_MEMBER_IN_ALIAS = 1378 // /usr/x86_64-w64-mingw32/include/winerror.h:549:1: ERROR_MEMBER_IN_GROUP = 1320 // /usr/x86_64-w64-mingw32/include/winerror.h:492:1: ERROR_MEMBER_NOT_IN_ALIAS = 1377 // /usr/x86_64-w64-mingw32/include/winerror.h:548:1: ERROR_MEMBER_NOT_IN_GROUP = 1321 // /usr/x86_64-w64-mingw32/include/winerror.h:493:1: ERROR_MENU_ITEM_NOT_FOUND = 1456 // /usr/x86_64-w64-mingw32/include/winerror.h:627:1: ERROR_MESSAGE_EXCEEDS_MAX_SIZE = 4336 // /usr/x86_64-w64-mingw32/include/winerror.h:960:1: ERROR_MESSAGE_SYNC_ONLY = 1159 // /usr/x86_64-w64-mingw32/include/winerror.h:368:1: ERROR_METAFILE_NOT_SUPPORTED = 2003 // /usr/x86_64-w64-mingw32/include/winerror.h:863:1: ERROR_META_EXPANSION_TOO_LONG = 208 // /usr/x86_64-w64-mingw32/include/winerror.h:205:1: ERROR_MOD_NOT_FOUND = 126 // /usr/x86_64-w64-mingw32/include/winerror.h:139:1: ERROR_MORE_DATA = 234 // /usr/x86_64-w64-mingw32/include/winerror.h:224:1: ERROR_MORE_WRITES = 1120 // /usr/x86_64-w64-mingw32/include/winerror.h:343:1: ERROR_MRM_AUTOMERGE_ENABLED = 15139 // /usr/x86_64-w64-mingw32/include/winerror.h:2143:1: ERROR_MRM_DUPLICATE_ENTRY = 15119 // /usr/x86_64-w64-mingw32/include/winerror.h:2133:1: ERROR_MRM_DUPLICATE_MAP_NAME = 15118 // /usr/x86_64-w64-mingw32/include/winerror.h:2132:1: ERROR_MRM_FILEPATH_TOO_LONG = 15121 // /usr/x86_64-w64-mingw32/include/winerror.h:2135:1: ERROR_MRM_INDETERMINATE_QUALIFIER_VALUE = 15138 // /usr/x86_64-w64-mingw32/include/winerror.h:2142:1: ERROR_MRM_INVALID_FILE_TYPE = 15112 // /usr/x86_64-w64-mingw32/include/winerror.h:2126:1: ERROR_MRM_INVALID_PRICONFIG = 15111 // /usr/x86_64-w64-mingw32/include/winerror.h:2125:1: ERROR_MRM_INVALID_PRI_FILE = 15126 // /usr/x86_64-w64-mingw32/include/winerror.h:2137:1: ERROR_MRM_INVALID_QUALIFIER_OPERATOR = 15137 // /usr/x86_64-w64-mingw32/include/winerror.h:2141:1: ERROR_MRM_INVALID_QUALIFIER_VALUE = 15114 // /usr/x86_64-w64-mingw32/include/winerror.h:2128:1: ERROR_MRM_INVALID_RESOURCE_IDENTIFIER = 15120 // /usr/x86_64-w64-mingw32/include/winerror.h:2134:1: ERROR_MRM_MAP_NOT_FOUND = 15135 // /usr/x86_64-w64-mingw32/include/winerror.h:2139:1: ERROR_MRM_NAMED_RESOURCE_NOT_FOUND = 15127 // /usr/x86_64-w64-mingw32/include/winerror.h:2138:1: ERROR_MRM_NO_CANDIDATE = 15115 // /usr/x86_64-w64-mingw32/include/winerror.h:2129:1: ERROR_MRM_NO_MATCH_OR_DEFAULT_CANDIDATE = 15116 // /usr/x86_64-w64-mingw32/include/winerror.h:2130:1: ERROR_MRM_RESOURCE_TYPE_MISMATCH = 15117 // /usr/x86_64-w64-mingw32/include/winerror.h:2131:1: ERROR_MRM_RUNTIME_NO_DEFAULT_OR_NEUTRAL_RESOURCE = 15110 // /usr/x86_64-w64-mingw32/include/winerror.h:2124:1: ERROR_MRM_TOO_MANY_RESOURCES = 15140 // /usr/x86_64-w64-mingw32/include/winerror.h:2144:1: ERROR_MRM_UNKNOWN_QUALIFIER = 15113 // /usr/x86_64-w64-mingw32/include/winerror.h:2127:1: ERROR_MRM_UNSUPPORTED_DIRECTORY_TYPE = 15122 // /usr/x86_64-w64-mingw32/include/winerror.h:2136:1: ERROR_MRM_UNSUPPORTED_PROFILE_TYPE = 15136 // /usr/x86_64-w64-mingw32/include/winerror.h:2140:1: ERROR_MR_MID_NOT_FOUND = 317 // /usr/x86_64-w64-mingw32/include/winerror.h:245:1: ERROR_MUI_FILE_NOT_FOUND = 15100 // /usr/x86_64-w64-mingw32/include/winerror.h:2115:1: ERROR_MUI_FILE_NOT_LOADED = 15105 // /usr/x86_64-w64-mingw32/include/winerror.h:2120:1: ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME = 15108 // /usr/x86_64-w64-mingw32/include/winerror.h:2123:1: ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED = 15107 // /usr/x86_64-w64-mingw32/include/winerror.h:2122:1: ERROR_MUI_INVALID_FILE = 15101 // /usr/x86_64-w64-mingw32/include/winerror.h:2116:1: ERROR_MUI_INVALID_LOCALE_NAME = 15103 // /usr/x86_64-w64-mingw32/include/winerror.h:2118:1: ERROR_MUI_INVALID_RC_CONFIG = 15102 // /usr/x86_64-w64-mingw32/include/winerror.h:2117:1: ERROR_MUI_INVALID_ULTIMATEFALLBACK_NAME = 15104 // /usr/x86_64-w64-mingw32/include/winerror.h:2119:1: ERROR_MUTUAL_AUTH_FAILED = 1397 // /usr/x86_64-w64-mingw32/include/winerror.h:568:1: ERROR_NEEDS_REMEDIATION = 15612 // /usr/x86_64-w64-mingw32/include/winerror.h:2183:1: ERROR_NEGATIVE_SEEK = 131 // /usr/x86_64-w64-mingw32/include/winerror.h:144:1: ERROR_NESTING_NOT_ALLOWED = 215 // /usr/x86_64-w64-mingw32/include/winerror.h:210:1: ERROR_NETLOGON_NOT_STARTED = 1792 // /usr/x86_64-w64-mingw32/include/winerror.h:780:1: ERROR_NETNAME_DELETED = 64 // /usr/x86_64-w64-mingw32/include/winerror.h:97:1: ERROR_NETWORK_ACCESS_DENIED = 65 // /usr/x86_64-w64-mingw32/include/winerror.h:98:1: ERROR_NETWORK_BUSY = 54 // /usr/x86_64-w64-mingw32/include/winerror.h:87:1: ERROR_NETWORK_NOT_AVAILABLE = 5035 // /usr/x86_64-w64-mingw32/include/winerror.h:1009:1: ERROR_NETWORK_UNREACHABLE = 1231 // /usr/x86_64-w64-mingw32/include/winerror.h:421:1: ERROR_NET_WRITE_FAULT = 88 // /usr/x86_64-w64-mingw32/include/winerror.h:113:1: ERROR_NOACCESS = 998 // /usr/x86_64-w64-mingw32/include/winerror.h:265:1: ERROR_NODE_CANNOT_BE_CLUSTERED = 5898 // /usr/x86_64-w64-mingw32/include/winerror.h:1071:1: ERROR_NODE_CANT_HOST_RESOURCE = 5071 // /usr/x86_64-w64-mingw32/include/winerror.h:1044:1: ERROR_NODE_NOT_AVAILABLE = 5036 // /usr/x86_64-w64-mingw32/include/winerror.h:1010:1: ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807 // /usr/x86_64-w64-mingw32/include/winerror.h:795:1: ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809 // /usr/x86_64-w64-mingw32/include/winerror.h:797:1: ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808 // /usr/x86_64-w64-mingw32/include/winerror.h:796:1: ERROR_NONE_MAPPED = 1332 // /usr/x86_64-w64-mingw32/include/winerror.h:504:1: ERROR_NONPAGED_SYSTEM_RESOURCES = 1451 // /usr/x86_64-w64-mingw32/include/winerror.h:622:1: ERROR_NON_ACCOUNT_SID = 1257 // /usr/x86_64-w64-mingw32/include/winerror.h:447:1: ERROR_NON_DOMAIN_SID = 1258 // /usr/x86_64-w64-mingw32/include/winerror.h:448:1: ERROR_NON_MDICHILD_WINDOW = 1445 // /usr/x86_64-w64-mingw32/include/winerror.h:616:1: ERROR_NOTIFY_ENUM_DIR = 1022 // /usr/x86_64-w64-mingw32/include/winerror.h:288:1: ERROR_NOT_ALL_ASSIGNED = 1300 // /usr/x86_64-w64-mingw32/include/winerror.h:472:1: ERROR_NOT_AUTHENTICATED = 1244 // /usr/x86_64-w64-mingw32/include/winerror.h:434:1: ERROR_NOT_A_REPARSE_POINT = 4390 // /usr/x86_64-w64-mingw32/include/winerror.h:969:1: ERROR_NOT_CHILD_WINDOW = 1442 // /usr/x86_64-w64-mingw32/include/winerror.h:613:1: ERROR_NOT_CONNECTED = 2250 // /usr/x86_64-w64-mingw32/include/winerror.h:882:1: ERROR_NOT_CONTAINER = 1207 // /usr/x86_64-w64-mingw32/include/winerror.h:397:1: ERROR_NOT_DOS_DISK = 26 // /usr/x86_64-w64-mingw32/include/winerror.h:71:1: ERROR_NOT_EMPTY = 4307 // /usr/x86_64-w64-mingw32/include/winerror.h:931:1: ERROR_NOT_ENOUGH_MEMORY = 8 // /usr/x86_64-w64-mingw32/include/winerror.h:53:1: ERROR_NOT_ENOUGH_QUOTA = 1816 // /usr/x86_64-w64-mingw32/include/winerror.h:804:1: ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130 // /usr/x86_64-w64-mingw32/include/winerror.h:353:1: ERROR_NOT_EXPORT_FORMAT = 6008 // /usr/x86_64-w64-mingw32/include/winerror.h:1087:1: ERROR_NOT_FOUND = 1168 // /usr/x86_64-w64-mingw32/include/winerror.h:377:1: ERROR_NOT_GUI_PROCESS = 1471 // /usr/x86_64-w64-mingw32/include/winerror.h:642:1: ERROR_NOT_JOINED = 136 // /usr/x86_64-w64-mingw32/include/winerror.h:149:1: ERROR_NOT_LOCKED = 158 // /usr/x86_64-w64-mingw32/include/winerror.h:171:1: ERROR_NOT_LOGGED_ON = 1245 // /usr/x86_64-w64-mingw32/include/winerror.h:435:1: ERROR_NOT_LOGON_PROCESS = 1362 // /usr/x86_64-w64-mingw32/include/winerror.h:533:1: ERROR_NOT_OWNER = 288 // /usr/x86_64-w64-mingw32/include/winerror.h:237:1: ERROR_NOT_QUORUM_CAPABLE = 5021 // /usr/x86_64-w64-mingw32/include/winerror.h:995:1: ERROR_NOT_QUORUM_CLASS = 5025 // /usr/x86_64-w64-mingw32/include/winerror.h:999:1: ERROR_NOT_READY = 21 // /usr/x86_64-w64-mingw32/include/winerror.h:66:1: ERROR_NOT_REGISTRY_FILE = 1017 // /usr/x86_64-w64-mingw32/include/winerror.h:283:1: ERROR_NOT_SAFEBOOT_SERVICE = 1084 // /usr/x86_64-w64-mingw32/include/winerror.h:322:1: ERROR_NOT_SAME_DEVICE = 17 // /usr/x86_64-w64-mingw32/include/winerror.h:62:1: ERROR_NOT_SUBSTED = 137 // /usr/x86_64-w64-mingw32/include/winerror.h:150:1: ERROR_NOT_SUPPORTED = 50 // /usr/x86_64-w64-mingw32/include/winerror.h:83:1: ERROR_NOT_SUPPORTED_ON_SBS = 1254 // /usr/x86_64-w64-mingw32/include/winerror.h:444:1: ERROR_NOT_SUPPORTED_ON_STANDARD_SERVER = 8584 // /usr/x86_64-w64-mingw32/include/winerror.h:1500:1: ERROR_NO_ASSOCIATION = 1155 // /usr/x86_64-w64-mingw32/include/winerror.h:364:1: ERROR_NO_BROWSER_SERVERS_FOUND = 6118 // /usr/x86_64-w64-mingw32/include/winerror.h:1096:1: ERROR_NO_DATA = 232 // /usr/x86_64-w64-mingw32/include/winerror.h:222:1: ERROR_NO_DATA_DETECTED = 1104 // /usr/x86_64-w64-mingw32/include/winerror.h:327:1: ERROR_NO_EFS = 6004 // /usr/x86_64-w64-mingw32/include/winerror.h:1083:1: ERROR_NO_IMPERSONATION_TOKEN = 1309 // /usr/x86_64-w64-mingw32/include/winerror.h:481:1: ERROR_NO_INHERITANCE = 1391 // /usr/x86_64-w64-mingw32/include/winerror.h:562:1: ERROR_NO_LOGON_SERVERS = 1311 // /usr/x86_64-w64-mingw32/include/winerror.h:483:1: ERROR_NO_LOG_SPACE = 1019 // /usr/x86_64-w64-mingw32/include/winerror.h:285:1: ERROR_NO_MATCH = 1169 // /usr/x86_64-w64-mingw32/include/winerror.h:378:1: ERROR_NO_MEDIA_IN_DRIVE = 1112 // /usr/x86_64-w64-mingw32/include/winerror.h:335:1: ERROR_NO_MORE_DEVICES = 1248 // /usr/x86_64-w64-mingw32/include/winerror.h:438:1: ERROR_NO_MORE_FILES = 18 // /usr/x86_64-w64-mingw32/include/winerror.h:63:1: ERROR_NO_MORE_ITEMS = 259 // /usr/x86_64-w64-mingw32/include/winerror.h:229:1: ERROR_NO_MORE_SEARCH_HANDLES = 113 // /usr/x86_64-w64-mingw32/include/winerror.h:128:1: ERROR_NO_MORE_USER_HANDLES = 1158 // /usr/x86_64-w64-mingw32/include/winerror.h:367:1: ERROR_NO_NETWORK = 1222 // /usr/x86_64-w64-mingw32/include/winerror.h:412:1: ERROR_NO_NET_OR_BAD_PATH = 1203 // /usr/x86_64-w64-mingw32/include/winerror.h:393:1: ERROR_NO_NVRAM_RESOURCES = 1470 // /usr/x86_64-w64-mingw32/include/winerror.h:641:1: ERROR_NO_PROC_SLOTS = 89 // /usr/x86_64-w64-mingw32/include/winerror.h:114:1: ERROR_NO_PROMOTION_ACTIVE = 8222 // /usr/x86_64-w64-mingw32/include/winerror.h:1178:1: ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302 // /usr/x86_64-w64-mingw32/include/winerror.h:474:1: ERROR_NO_RECOVERY_POLICY = 6003 // /usr/x86_64-w64-mingw32/include/winerror.h:1082:1: ERROR_NO_RECOVERY_PROGRAM = 1082 // /usr/x86_64-w64-mingw32/include/winerror.h:320:1: ERROR_NO_SCROLLBARS = 1447 // /usr/x86_64-w64-mingw32/include/winerror.h:618:1: ERROR_NO_SECURITY_ON_OBJECT = 1350 // /usr/x86_64-w64-mingw32/include/winerror.h:521:1: ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116 // /usr/x86_64-w64-mingw32/include/winerror.h:339:1: ERROR_NO_SIGNAL_SENT = 205 // /usr/x86_64-w64-mingw32/include/winerror.h:202:1: ERROR_NO_SITENAME = 1919 // /usr/x86_64-w64-mingw32/include/winerror.h:842:1: ERROR_NO_SPOOL_SPACE = 62 // /usr/x86_64-w64-mingw32/include/winerror.h:95:1: ERROR_NO_SUCH_ALIAS = 1376 // /usr/x86_64-w64-mingw32/include/winerror.h:547:1: ERROR_NO_SUCH_DOMAIN = 1355 // /usr/x86_64-w64-mingw32/include/winerror.h:526:1: ERROR_NO_SUCH_GROUP = 1319 // /usr/x86_64-w64-mingw32/include/winerror.h:491:1: ERROR_NO_SUCH_LOGON_SESSION = 1312 // /usr/x86_64-w64-mingw32/include/winerror.h:484:1: ERROR_NO_SUCH_MEMBER = 1387 // /usr/x86_64-w64-mingw32/include/winerror.h:558:1: ERROR_NO_SUCH_PACKAGE = 1364 // /usr/x86_64-w64-mingw32/include/winerror.h:535:1: ERROR_NO_SUCH_PRIVILEGE = 1313 // /usr/x86_64-w64-mingw32/include/winerror.h:485:1: ERROR_NO_SUCH_SITE = 1249 // /usr/x86_64-w64-mingw32/include/winerror.h:439:1: ERROR_NO_SUCH_USER = 1317 // /usr/x86_64-w64-mingw32/include/winerror.h:489:1: ERROR_NO_SUPPORTING_DRIVES = 4339 // /usr/x86_64-w64-mingw32/include/winerror.h:963:1: ERROR_NO_SYSTEM_MENU = 1437 // /usr/x86_64-w64-mingw32/include/winerror.h:608:1: ERROR_NO_SYSTEM_RESOURCES = 1450 // /usr/x86_64-w64-mingw32/include/winerror.h:621:1: ERROR_NO_TOKEN = 1008 // /usr/x86_64-w64-mingw32/include/winerror.h:274:1: ERROR_NO_TRACKING_SERVICE = 1172 // /usr/x86_64-w64-mingw32/include/winerror.h:381:1: ERROR_NO_TRUST_LSA_SECRET = 1786 // /usr/x86_64-w64-mingw32/include/winerror.h:774:1: ERROR_NO_TRUST_SAM_ACCOUNT = 1787 // /usr/x86_64-w64-mingw32/include/winerror.h:775:1: ERROR_NO_UNICODE_TRANSLATION = 1113 // /usr/x86_64-w64-mingw32/include/winerror.h:336:1: ERROR_NO_USER_KEYS = 6006 // /usr/x86_64-w64-mingw32/include/winerror.h:1085:1: ERROR_NO_USER_SESSION_KEY = 1394 // /usr/x86_64-w64-mingw32/include/winerror.h:565:1: ERROR_NO_VOLUME_ID = 1173 // /usr/x86_64-w64-mingw32/include/winerror.h:382:1: ERROR_NO_VOLUME_LABEL = 125 // /usr/x86_64-w64-mingw32/include/winerror.h:138:1: ERROR_NO_WILDCARD_CHARACTERS = 1417 // /usr/x86_64-w64-mingw32/include/winerror.h:588:1: ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386 // /usr/x86_64-w64-mingw32/include/winerror.h:557:1: ERROR_NULL_LM_PASSWORD = 1304 // /usr/x86_64-w64-mingw32/include/winerror.h:476:1: ERROR_OBJECT_ALREADY_EXISTS = 5010 // /usr/x86_64-w64-mingw32/include/winerror.h:984:1: ERROR_OBJECT_IN_LIST = 5011 // /usr/x86_64-w64-mingw32/include/winerror.h:985:1: ERROR_OBJECT_NOT_FOUND = 4312 // /usr/x86_64-w64-mingw32/include/winerror.h:936:1: ERROR_OLD_WIN_VERSION = 1150 // /usr/x86_64-w64-mingw32/include/winerror.h:359:1: ERROR_ONLY_IF_CONNECTED = 1251 // /usr/x86_64-w64-mingw32/include/winerror.h:441:1: ERROR_OPEN_FAILED = 110 // /usr/x86_64-w64-mingw32/include/winerror.h:125:1: ERROR_OPEN_FILES = 2401 // /usr/x86_64-w64-mingw32/include/winerror.h:883:1: ERROR_OPERATION_ABORTED = 995 // /usr/x86_64-w64-mingw32/include/winerror.h:262:1: ERROR_OPLOCK_NOT_GRANTED = 300 // /usr/x86_64-w64-mingw32/include/winerror.h:240:1: ERROR_OUTOFMEMORY = 14 // /usr/x86_64-w64-mingw32/include/winerror.h:59:1: ERROR_OUT_OF_PAPER = 28 // /usr/x86_64-w64-mingw32/include/winerror.h:73:1: ERROR_OUT_OF_STRUCTURES = 84 // /usr/x86_64-w64-mingw32/include/winerror.h:109:1: ERROR_OVERRIDE_NOCHANGES = 1252 // /usr/x86_64-w64-mingw32/include/winerror.h:442:1: ERROR_PACKAGES_IN_USE = 15618 // /usr/x86_64-w64-mingw32/include/winerror.h:2189:1: ERROR_PACKAGE_ALREADY_EXISTS = 15611 // /usr/x86_64-w64-mingw32/include/winerror.h:2182:1: ERROR_PACKAGE_REPOSITORY_CORRUPTED = 15614 // /usr/x86_64-w64-mingw32/include/winerror.h:2185:1: ERROR_PACKAGE_UPDATING = 15616 // /usr/x86_64-w64-mingw32/include/winerror.h:2187:1: ERROR_PAGED_SYSTEM_RESOURCES = 1452 // /usr/x86_64-w64-mingw32/include/winerror.h:623:1: ERROR_PAGEFILE_QUOTA = 1454 // /usr/x86_64-w64-mingw32/include/winerror.h:625:1: ERROR_PARAMETER_QUOTA_EXCEEDED = 1283 // /usr/x86_64-w64-mingw32/include/winerror.h:467:1: ERROR_PARTIAL_COPY = 299 // /usr/x86_64-w64-mingw32/include/winerror.h:239:1: ERROR_PARTITION_FAILURE = 1105 // /usr/x86_64-w64-mingw32/include/winerror.h:328:1: ERROR_PASSWORD_EXPIRED = 1330 // /usr/x86_64-w64-mingw32/include/winerror.h:502:1: ERROR_PASSWORD_MUST_CHANGE = 1907 // /usr/x86_64-w64-mingw32/include/winerror.h:830:1: ERROR_PASSWORD_RESTRICTION = 1325 // /usr/x86_64-w64-mingw32/include/winerror.h:497:1: ERROR_PATCH_PACKAGE_INVALID = 1636 // /usr/x86_64-w64-mingw32/include/winerror.h:682:1: ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635 // /usr/x86_64-w64-mingw32/include/winerror.h:681:1: ERROR_PATCH_PACKAGE_REJECTED = 1643 // /usr/x86_64-w64-mingw32/include/winerror.h:689:1: ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637 // /usr/x86_64-w64-mingw32/include/winerror.h:683:1: ERROR_PATCH_TARGET_NOT_FOUND = 1642 // /usr/x86_64-w64-mingw32/include/winerror.h:688:1: ERROR_PATH_BUSY = 148 // /usr/x86_64-w64-mingw32/include/winerror.h:161:1: ERROR_PATH_NOT_FOUND = 3 // /usr/x86_64-w64-mingw32/include/winerror.h:48:1: ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = 1932 // /usr/x86_64-w64-mingw32/include/winerror.h:855:1: ERROR_PIPE_BUSY = 231 // /usr/x86_64-w64-mingw32/include/winerror.h:221:1: ERROR_PIPE_CONNECTED = 535 // /usr/x86_64-w64-mingw32/include/winerror.h:249:1: ERROR_PIPE_LISTENING = 536 // /usr/x86_64-w64-mingw32/include/winerror.h:250:1: ERROR_PIPE_LOCAL = 229 // /usr/x86_64-w64-mingw32/include/winerror.h:219:1: ERROR_PIPE_NOT_CONNECTED = 233 // /usr/x86_64-w64-mingw32/include/winerror.h:223:1: ERROR_PKINIT_FAILURE = 1263 // /usr/x86_64-w64-mingw32/include/winerror.h:453:1: ERROR_POINT_NOT_FOUND = 1171 // /usr/x86_64-w64-mingw32/include/winerror.h:380:1: ERROR_POLICY_OBJECT_NOT_FOUND = 8219 // /usr/x86_64-w64-mingw32/include/winerror.h:1175:1: ERROR_POLICY_ONLY_IN_DS = 8220 // /usr/x86_64-w64-mingw32/include/winerror.h:1176:1: ERROR_POPUP_ALREADY_ACTIVE = 1446 // /usr/x86_64-w64-mingw32/include/winerror.h:617:1: ERROR_PORT_UNREACHABLE = 1234 // /usr/x86_64-w64-mingw32/include/winerror.h:424:1: ERROR_POSSIBLE_DEADLOCK = 1131 // /usr/x86_64-w64-mingw32/include/winerror.h:354:1: ERROR_POTENTIAL_FILE_FOUND = 1180 // /usr/x86_64-w64-mingw32/include/winerror.h:388:1: ERROR_PRINTER_ALREADY_EXISTS = 1802 // /usr/x86_64-w64-mingw32/include/winerror.h:790:1: ERROR_PRINTER_DELETED = 1905 // /usr/x86_64-w64-mingw32/include/winerror.h:828:1: ERROR_PRINTER_DRIVER_ALREADY_INSTALLED = 1795 // /usr/x86_64-w64-mingw32/include/winerror.h:783:1: ERROR_PRINTER_DRIVER_BLOCKED = 3014 // /usr/x86_64-w64-mingw32/include/winerror.h:900:1: ERROR_PRINTER_DRIVER_IN_USE = 3001 // /usr/x86_64-w64-mingw32/include/winerror.h:887:1: ERROR_PRINTER_DRIVER_WARNED = 3013 // /usr/x86_64-w64-mingw32/include/winerror.h:899:1: ERROR_PRINTER_HAS_JOBS_QUEUED = 3009 // /usr/x86_64-w64-mingw32/include/winerror.h:895:1: ERROR_PRINTER_NOT_FOUND = 3012 // /usr/x86_64-w64-mingw32/include/winerror.h:898:1: ERROR_PRINTQ_FULL = 61 // /usr/x86_64-w64-mingw32/include/winerror.h:94:1: ERROR_PRINT_CANCELLED = 63 // /usr/x86_64-w64-mingw32/include/winerror.h:96:1: ERROR_PRINT_MONITOR_ALREADY_INSTALLED = 3006 // /usr/x86_64-w64-mingw32/include/winerror.h:892:1: ERROR_PRINT_MONITOR_IN_USE = 3008 // /usr/x86_64-w64-mingw32/include/winerror.h:894:1: ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED = 3005 // /usr/x86_64-w64-mingw32/include/winerror.h:891:1: ERROR_PRIVATE_DIALOG_INDEX = 1415 // /usr/x86_64-w64-mingw32/include/winerror.h:586:1: ERROR_PRIVILEGE_NOT_HELD = 1314 // /usr/x86_64-w64-mingw32/include/winerror.h:486:1: ERROR_PROCESS_ABORTED = 1067 // /usr/x86_64-w64-mingw32/include/winerror.h:305:1: ERROR_PROC_NOT_FOUND = 127 // /usr/x86_64-w64-mingw32/include/winerror.h:140:1: ERROR_PRODUCT_UNINSTALLED = 1614 // /usr/x86_64-w64-mingw32/include/winerror.h:660:1: ERROR_PRODUCT_VERSION = 1638 // /usr/x86_64-w64-mingw32/include/winerror.h:684:1: ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015 // /usr/x86_64-w64-mingw32/include/winerror.h:871:1: ERROR_PROFILE_NOT_FOUND = 2016 // /usr/x86_64-w64-mingw32/include/winerror.h:872:1: ERROR_PROMOTION_ACTIVE = 8221 // /usr/x86_64-w64-mingw32/include/winerror.h:1177:1: ERROR_PROTOCOL_UNREACHABLE = 1233 // /usr/x86_64-w64-mingw32/include/winerror.h:423:1: ERROR_QUORUMLOG_OPEN_FAILED = 5028 // /usr/x86_64-w64-mingw32/include/winerror.h:1002:1: ERROR_QUORUM_DISK_NOT_FOUND = 5086 // /usr/x86_64-w64-mingw32/include/winerror.h:1059:1: ERROR_QUORUM_OWNER_ALIVE = 5034 // /usr/x86_64-w64-mingw32/include/winerror.h:1008:1: ERROR_QUORUM_RESOURCE = 5020 // /usr/x86_64-w64-mingw32/include/winerror.h:994:1: ERROR_QUORUM_RESOURCE_ONLINE_FAILED = 5027 // /usr/x86_64-w64-mingw32/include/winerror.h:1001:1: ERROR_READ_FAULT = 30 // /usr/x86_64-w64-mingw32/include/winerror.h:75:1: ERROR_RECOVERY_FAILURE = 1279 // /usr/x86_64-w64-mingw32/include/winerror.h:463:1: ERROR_RECOVERY_FILE_CORRUPT = 15619 // /usr/x86_64-w64-mingw32/include/winerror.h:2190:1: ERROR_REC_NON_EXISTENT = 4005 // /usr/x86_64-w64-mingw32/include/winerror.h:906:1: ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794 // /usr/x86_64-w64-mingw32/include/winerror.h:782:1: ERROR_REDIR_PAUSED = 72 // /usr/x86_64-w64-mingw32/include/winerror.h:105:1: ERROR_REGISTRY_CORRUPT = 1015 // /usr/x86_64-w64-mingw32/include/winerror.h:281:1: ERROR_REGISTRY_IO_FAILED = 1016 // /usr/x86_64-w64-mingw32/include/winerror.h:282:1: ERROR_REGISTRY_RECOVERED = 1014 // /usr/x86_64-w64-mingw32/include/winerror.h:280:1: ERROR_REG_NAT_CONSUMPTION = 1261 // /usr/x86_64-w64-mingw32/include/winerror.h:451:1: ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201 // /usr/x86_64-w64-mingw32/include/winerror.h:199:1: ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED = 1936 // /usr/x86_64-w64-mingw32/include/winerror.h:859:1: ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220 // /usr/x86_64-w64-mingw32/include/winerror.h:410:1: ERROR_REMOTE_STORAGE_MEDIA_ERROR = 4352 // /usr/x86_64-w64-mingw32/include/winerror.h:968:1: ERROR_REMOTE_STORAGE_NOT_ACTIVE = 4351 // /usr/x86_64-w64-mingw32/include/winerror.h:967:1: ERROR_REMOVE_FAILED = 15610 // /usr/x86_64-w64-mingw32/include/winerror.h:2181:1: ERROR_REM_NOT_LIST = 51 // /usr/x86_64-w64-mingw32/include/winerror.h:84:1: ERROR_REPARSE_ATTRIBUTE_CONFLICT = 4391 // /usr/x86_64-w64-mingw32/include/winerror.h:970:1: ERROR_REPARSE_TAG_INVALID = 4393 // /usr/x86_64-w64-mingw32/include/winerror.h:972:1: ERROR_REPARSE_TAG_MISMATCH = 4394 // /usr/x86_64-w64-mingw32/include/winerror.h:973:1: ERROR_REQUEST_ABORTED = 1235 // /usr/x86_64-w64-mingw32/include/winerror.h:425:1: ERROR_REQUEST_REFUSED = 4320 // /usr/x86_64-w64-mingw32/include/winerror.h:944:1: ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = 1459 // /usr/x86_64-w64-mingw32/include/winerror.h:630:1: ERROR_REQ_NOT_ACCEP = 71 // /usr/x86_64-w64-mingw32/include/winerror.h:104:1: ERROR_RESILIENCY_FILE_CORRUPT = 15625 // /usr/x86_64-w64-mingw32/include/winerror.h:2196:1: ERROR_RESMON_CREATE_FAILED = 5017 // /usr/x86_64-w64-mingw32/include/winerror.h:991:1: ERROR_RESMON_INVALID_STATE = 5084 // /usr/x86_64-w64-mingw32/include/winerror.h:1057:1: ERROR_RESMON_ONLINE_FAILED = 5018 // /usr/x86_64-w64-mingw32/include/winerror.h:992:1: ERROR_RESOURCE_DATA_NOT_FOUND = 1812 // /usr/x86_64-w64-mingw32/include/winerror.h:800:1: ERROR_RESOURCE_DISABLED = 4309 // /usr/x86_64-w64-mingw32/include/winerror.h:933:1: ERROR_RESOURCE_ENUM_USER_STOP = 15106 // /usr/x86_64-w64-mingw32/include/winerror.h:2121:1: ERROR_RESOURCE_FAILED = 5038 // /usr/x86_64-w64-mingw32/include/winerror.h:1012:1: ERROR_RESOURCE_LANG_NOT_FOUND = 1815 // /usr/x86_64-w64-mingw32/include/winerror.h:803:1: ERROR_RESOURCE_NAME_NOT_FOUND = 1814 // /usr/x86_64-w64-mingw32/include/winerror.h:802:1: ERROR_RESOURCE_NOT_AVAILABLE = 5006 // /usr/x86_64-w64-mingw32/include/winerror.h:980:1: ERROR_RESOURCE_NOT_FOUND = 5007 // /usr/x86_64-w64-mingw32/include/winerror.h:981:1: ERROR_RESOURCE_NOT_ONLINE = 5004 // /usr/x86_64-w64-mingw32/include/winerror.h:978:1: ERROR_RESOURCE_NOT_PRESENT = 4316 // /usr/x86_64-w64-mingw32/include/winerror.h:940:1: ERROR_RESOURCE_ONLINE = 5019 // /usr/x86_64-w64-mingw32/include/winerror.h:993:1: ERROR_RESOURCE_PROPERTIES_STORED = 5024 // /usr/x86_64-w64-mingw32/include/winerror.h:998:1: ERROR_RESOURCE_PROPERTY_UNCHANGEABLE = 5089 // /usr/x86_64-w64-mingw32/include/winerror.h:1062:1: ERROR_RESOURCE_TYPE_NOT_FOUND = 1813 // /usr/x86_64-w64-mingw32/include/winerror.h:801:1: ERROR_RESTART_APPLICATION = 1467 // /usr/x86_64-w64-mingw32/include/winerror.h:638:1: ERROR_RETRY = 1237 // /usr/x86_64-w64-mingw32/include/winerror.h:427:1: ERROR_REVISION_MISMATCH = 1306 // /usr/x86_64-w64-mingw32/include/winerror.h:478:1: ERROR_RING2SEG_MUST_BE_MOVABLE = 200 // /usr/x86_64-w64-mingw32/include/winerror.h:198:1: ERROR_RING2_STACK_IN_USE = 207 // /usr/x86_64-w64-mingw32/include/winerror.h:204:1: ERROR_RMODE_APP = 1153 // /usr/x86_64-w64-mingw32/include/winerror.h:362:1: ERROR_RPL_NOT_ALLOWED = 4006 // /usr/x86_64-w64-mingw32/include/winerror.h:907:1: ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT = 15403 // /usr/x86_64-w64-mingw32/include/winerror.h:2167:1: ERROR_RUNLEVEL_SWITCH_IN_PROGRESS = 15404 // /usr/x86_64-w64-mingw32/include/winerror.h:2168:1: ERROR_RUNLEVEL_SWITCH_TIMEOUT = 15402 // /usr/x86_64-w64-mingw32/include/winerror.h:2166:1: ERROR_RXACT_COMMIT_FAILURE = 1370 // /usr/x86_64-w64-mingw32/include/winerror.h:541:1: ERROR_RXACT_INVALID_STATE = 1369 // /usr/x86_64-w64-mingw32/include/winerror.h:540:1: ERROR_SAME_DRIVE = 143 // /usr/x86_64-w64-mingw32/include/winerror.h:156:1: ERROR_SAM_INIT_FAILURE = 8541 // /usr/x86_64-w64-mingw32/include/winerror.h:1457:1: ERROR_SCOPE_NOT_FOUND = 318 // /usr/x86_64-w64-mingw32/include/winerror.h:246:1: ERROR_SCREEN_ALREADY_LOCKED = 1440 // /usr/x86_64-w64-mingw32/include/winerror.h:611:1: ERROR_SECONDARY_IC_PROVIDER_NOT_REGISTERED = 15321 // /usr/x86_64-w64-mingw32/include/winerror.h:2157:1: ERROR_SECRET_TOO_LONG = 1382 // /usr/x86_64-w64-mingw32/include/winerror.h:553:1: ERROR_SECTOR_NOT_FOUND = 27 // /usr/x86_64-w64-mingw32/include/winerror.h:72:1: ERROR_SEEK = 25 // /usr/x86_64-w64-mingw32/include/winerror.h:70:1: ERROR_SEEK_ON_DEVICE = 132 // /usr/x86_64-w64-mingw32/include/winerror.h:145:1: ERROR_SEM_IS_SET = 102 // /usr/x86_64-w64-mingw32/include/winerror.h:117:1: ERROR_SEM_NOT_FOUND = 187 // /usr/x86_64-w64-mingw32/include/winerror.h:185:1: ERROR_SEM_OWNER_DIED = 105 // /usr/x86_64-w64-mingw32/include/winerror.h:120:1: ERROR_SEM_TIMEOUT = 121 // /usr/x86_64-w64-mingw32/include/winerror.h:134:1: ERROR_SEM_USER_LIMIT = 106 // /usr/x86_64-w64-mingw32/include/winerror.h:121:1: ERROR_SERIAL_NO_DEVICE = 1118 // /usr/x86_64-w64-mingw32/include/winerror.h:341:1: ERROR_SERVER_DISABLED = 1341 // /usr/x86_64-w64-mingw32/include/winerror.h:512:1: ERROR_SERVER_HAS_OPEN_HANDLES = 1811 // /usr/x86_64-w64-mingw32/include/winerror.h:799:1: ERROR_SERVER_NOT_DISABLED = 1342 // /usr/x86_64-w64-mingw32/include/winerror.h:513:1: ERROR_SERVER_SHUTDOWN_IN_PROGRESS = 1255 // /usr/x86_64-w64-mingw32/include/winerror.h:445:1: ERROR_SERVICES_FAILED_AUTOSTART = 15405 // /usr/x86_64-w64-mingw32/include/winerror.h:2169:1: ERROR_SERVICE_ALREADY_RUNNING = 1056 // /usr/x86_64-w64-mingw32/include/winerror.h:294:1: ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061 // /usr/x86_64-w64-mingw32/include/winerror.h:299:1: ERROR_SERVICE_DATABASE_LOCKED = 1055 // /usr/x86_64-w64-mingw32/include/winerror.h:293:1: ERROR_SERVICE_DEPENDENCY_DELETED = 1075 // /usr/x86_64-w64-mingw32/include/winerror.h:313:1: ERROR_SERVICE_DEPENDENCY_FAIL = 1068 // /usr/x86_64-w64-mingw32/include/winerror.h:306:1: ERROR_SERVICE_DISABLED = 1058 // /usr/x86_64-w64-mingw32/include/winerror.h:296:1: ERROR_SERVICE_DOES_NOT_EXIST = 1060 // /usr/x86_64-w64-mingw32/include/winerror.h:298:1: ERROR_SERVICE_EXISTS = 1073 // /usr/x86_64-w64-mingw32/include/winerror.h:311:1: ERROR_SERVICE_LOGON_FAILED = 1069 // /usr/x86_64-w64-mingw32/include/winerror.h:307:1: ERROR_SERVICE_MARKED_FOR_DELETE = 1072 // /usr/x86_64-w64-mingw32/include/winerror.h:310:1: ERROR_SERVICE_NEVER_STARTED = 1077 // /usr/x86_64-w64-mingw32/include/winerror.h:315:1: ERROR_SERVICE_NOT_ACTIVE = 1062 // /usr/x86_64-w64-mingw32/include/winerror.h:300:1: ERROR_SERVICE_NOT_FOUND = 1243 // /usr/x86_64-w64-mingw32/include/winerror.h:433:1: ERROR_SERVICE_NOT_IN_EXE = 1083 // /usr/x86_64-w64-mingw32/include/winerror.h:321:1: ERROR_SERVICE_NO_THREAD = 1054 // /usr/x86_64-w64-mingw32/include/winerror.h:292:1: ERROR_SERVICE_REQUEST_TIMEOUT = 1053 // /usr/x86_64-w64-mingw32/include/winerror.h:291:1: ERROR_SERVICE_SPECIFIC_ERROR = 1066 // /usr/x86_64-w64-mingw32/include/winerror.h:304:1: ERROR_SERVICE_START_HANG = 1070 // /usr/x86_64-w64-mingw32/include/winerror.h:308:1: ERROR_SESSION_CREDENTIAL_CONFLICT = 1219 // /usr/x86_64-w64-mingw32/include/winerror.h:409:1: ERROR_SETCOUNT_ON_BAD_LB = 1433 // /usr/x86_64-w64-mingw32/include/winerror.h:604:1: ERROR_SETMARK_DETECTED = 1103 // /usr/x86_64-w64-mingw32/include/winerror.h:326:1: ERROR_SET_NOT_FOUND = 1170 // /usr/x86_64-w64-mingw32/include/winerror.h:379:1: ERROR_SET_POWER_STATE_FAILED = 1141 // /usr/x86_64-w64-mingw32/include/winerror.h:357:1: ERROR_SET_POWER_STATE_VETOED = 1140 // /usr/x86_64-w64-mingw32/include/winerror.h:356:1: ERROR_SEVERITY_ERROR = 0xC0000000 // /usr/x86_64-w64-mingw32/include/winnt.h:477:1: ERROR_SEVERITY_INFORMATIONAL = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:475:1: ERROR_SEVERITY_SUCCESS = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:474:1: ERROR_SEVERITY_WARNING = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:476:1: ERROR_SHARED_POLICY = 8218 // /usr/x86_64-w64-mingw32/include/winerror.h:1174:1: ERROR_SHARING_BUFFER_EXCEEDED = 36 // /usr/x86_64-w64-mingw32/include/winerror.h:80:1: ERROR_SHARING_PAUSED = 70 // /usr/x86_64-w64-mingw32/include/winerror.h:103:1: ERROR_SHARING_VIOLATION = 32 // /usr/x86_64-w64-mingw32/include/winerror.h:77:1: ERROR_SHUTDOWN_CLUSTER = 5008 // /usr/x86_64-w64-mingw32/include/winerror.h:982:1: ERROR_SHUTDOWN_IN_PROGRESS = 1115 // /usr/x86_64-w64-mingw32/include/winerror.h:338:1: ERROR_SIGNAL_PENDING = 162 // /usr/x86_64-w64-mingw32/include/winerror.h:175:1: ERROR_SIGNAL_REFUSED = 156 // /usr/x86_64-w64-mingw32/include/winerror.h:169:1: ERROR_SINGLE_INSTANCE_APP = 1152 // /usr/x86_64-w64-mingw32/include/winerror.h:361:1: ERROR_SLOT_NOT_PRESENT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1171:1: ERROR_SMARTCARD_SUBSYSTEM_FAILURE = 1264 // /usr/x86_64-w64-mingw32/include/winerror.h:454:1: ERROR_SMI_PRIMITIVE_INSTALLER_FAILED = 14108 // /usr/x86_64-w64-mingw32/include/winerror.h:1908:1: ERROR_SOME_NOT_MAPPED = 1301 // /usr/x86_64-w64-mingw32/include/winerror.h:473:1: ERROR_SOURCE_ELEMENT_EMPTY = 1160 // /usr/x86_64-w64-mingw32/include/winerror.h:369:1: ERROR_SPECIAL_ACCOUNT = 1371 // /usr/x86_64-w64-mingw32/include/winerror.h:542:1: ERROR_SPECIAL_GROUP = 1372 // /usr/x86_64-w64-mingw32/include/winerror.h:543:1: ERROR_SPECIAL_USER = 1373 // /usr/x86_64-w64-mingw32/include/winerror.h:544:1: ERROR_SPL_NO_ADDJOB = 3004 // /usr/x86_64-w64-mingw32/include/winerror.h:890:1: ERROR_SPL_NO_STARTDOC = 3003 // /usr/x86_64-w64-mingw32/include/winerror.h:889:1: ERROR_SPOOL_FILE_NOT_FOUND = 3002 // /usr/x86_64-w64-mingw32/include/winerror.h:888:1: ERROR_STACK_BUFFER_OVERRUN = 1282 // /usr/x86_64-w64-mingw32/include/winerror.h:466:1: ERROR_STACK_OVERFLOW = 1001 // /usr/x86_64-w64-mingw32/include/winerror.h:267:1: ERROR_STATE_COMPOSITE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED = 15815 // /usr/x86_64-w64-mingw32/include/winerror.h:2217:1: ERROR_STATE_CONTAINER_NAME_SIZE_LIMIT_EXCEEDED = 15818 // /usr/x86_64-w64-mingw32/include/winerror.h:2220:1: ERROR_STATE_CREATE_CONTAINER_FAILED = 15805 // /usr/x86_64-w64-mingw32/include/winerror.h:2207:1: ERROR_STATE_DELETE_CONTAINER_FAILED = 15806 // /usr/x86_64-w64-mingw32/include/winerror.h:2208:1: ERROR_STATE_DELETE_SETTING_FAILED = 15809 // /usr/x86_64-w64-mingw32/include/winerror.h:2211:1: ERROR_STATE_ENUMERATE_CONTAINER_FAILED = 15813 // /usr/x86_64-w64-mingw32/include/winerror.h:2215:1: ERROR_STATE_ENUMERATE_SETTINGS_FAILED = 15814 // /usr/x86_64-w64-mingw32/include/winerror.h:2216:1: ERROR_STATE_GET_VERSION_FAILED = 15801 // /usr/x86_64-w64-mingw32/include/winerror.h:2203:1: ERROR_STATE_LOAD_STORE_FAILED = 15800 // /usr/x86_64-w64-mingw32/include/winerror.h:2202:1: ERROR_STATE_OPEN_CONTAINER_FAILED = 15804 // /usr/x86_64-w64-mingw32/include/winerror.h:2206:1: ERROR_STATE_QUERY_SETTING_FAILED = 15810 // /usr/x86_64-w64-mingw32/include/winerror.h:2212:1: ERROR_STATE_READ_COMPOSITE_SETTING_FAILED = 15811 // /usr/x86_64-w64-mingw32/include/winerror.h:2213:1: ERROR_STATE_READ_SETTING_FAILED = 15807 // /usr/x86_64-w64-mingw32/include/winerror.h:2209:1: ERROR_STATE_SETTING_NAME_SIZE_LIMIT_EXCEEDED = 15817 // /usr/x86_64-w64-mingw32/include/winerror.h:2219:1: ERROR_STATE_SETTING_VALUE_SIZE_LIMIT_EXCEEDED = 15816 // /usr/x86_64-w64-mingw32/include/winerror.h:2218:1: ERROR_STATE_SET_VERSION_FAILED = 15802 // /usr/x86_64-w64-mingw32/include/winerror.h:2204:1: ERROR_STATE_STRUCTURED_RESET_FAILED = 15803 // /usr/x86_64-w64-mingw32/include/winerror.h:2205:1: ERROR_STATE_WRITE_COMPOSITE_SETTING_FAILED = 15812 // /usr/x86_64-w64-mingw32/include/winerror.h:2214:1: ERROR_STATE_WRITE_SETTING_FAILED = 15808 // /usr/x86_64-w64-mingw32/include/winerror.h:2210:1: ERROR_STATIC_INIT = 4002 // /usr/x86_64-w64-mingw32/include/winerror.h:903:1: ERROR_SUBST_TO_JOIN = 141 // /usr/x86_64-w64-mingw32/include/winerror.h:154:1: ERROR_SUBST_TO_SUBST = 139 // /usr/x86_64-w64-mingw32/include/winerror.h:152:1: ERROR_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:43:1: ERROR_SUCCESS_REBOOT_INITIATED = 1641 // /usr/x86_64-w64-mingw32/include/winerror.h:687:1: ERROR_SUCCESS_REBOOT_REQUIRED = 3010 // /usr/x86_64-w64-mingw32/include/winerror.h:896:1: ERROR_SUCCESS_RESTART_REQUIRED = 3011 // /usr/x86_64-w64-mingw32/include/winerror.h:897:1: ERROR_SWAPERROR = 999 // /usr/x86_64-w64-mingw32/include/winerror.h:266:1: ERROR_SXS_ACTIVATION_CONTEXT_DISABLED = 14006 // /usr/x86_64-w64-mingw32/include/winerror.h:1806:1: ERROR_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 14103 // /usr/x86_64-w64-mingw32/include/winerror.h:1903:1: ERROR_SXS_ASSEMBLY_MISSING = 14081 // /usr/x86_64-w64-mingw32/include/winerror.h:1881:1: ERROR_SXS_ASSEMBLY_NOT_FOUND = 14003 // /usr/x86_64-w64-mingw32/include/winerror.h:1803:1: ERROR_SXS_ASSEMBLY_NOT_LOCKED = 14097 // /usr/x86_64-w64-mingw32/include/winerror.h:1897:1: ERROR_SXS_CANT_GEN_ACTCTX = 14001 // /usr/x86_64-w64-mingw32/include/winerror.h:1801:1: ERROR_SXS_COMPONENT_STORE_CORRUPT = 14098 // /usr/x86_64-w64-mingw32/include/winerror.h:1898:1: ERROR_SXS_CORRUPTION = 14083 // /usr/x86_64-w64-mingw32/include/winerror.h:1883:1: ERROR_SXS_CORRUPT_ACTIVATION_STACK = 14082 // /usr/x86_64-w64-mingw32/include/winerror.h:1882:1: ERROR_SXS_DUPLICATE_ASSEMBLY_NAME = 14027 // /usr/x86_64-w64-mingw32/include/winerror.h:1827:1: ERROR_SXS_DUPLICATE_CLSID = 14023 // /usr/x86_64-w64-mingw32/include/winerror.h:1823:1: ERROR_SXS_DUPLICATE_DLL_NAME = 14021 // /usr/x86_64-w64-mingw32/include/winerror.h:1821:1: ERROR_SXS_DUPLICATE_IID = 14024 // /usr/x86_64-w64-mingw32/include/winerror.h:1824:1: ERROR_SXS_DUPLICATE_PROGID = 14026 // /usr/x86_64-w64-mingw32/include/winerror.h:1826:1: ERROR_SXS_DUPLICATE_TLBID = 14025 // /usr/x86_64-w64-mingw32/include/winerror.h:1825:1: ERROR_SXS_DUPLICATE_WINDOWCLASS_NAME = 14022 // /usr/x86_64-w64-mingw32/include/winerror.h:1822:1: ERROR_SXS_EARLY_DEACTIVATION = 14084 // /usr/x86_64-w64-mingw32/include/winerror.h:1884:1: ERROR_SXS_FILE_HASH_MISMATCH = 14028 // /usr/x86_64-w64-mingw32/include/winerror.h:1828:1: ERROR_SXS_FILE_HASH_MISSING = 14110 // /usr/x86_64-w64-mingw32/include/winerror.h:1910:1: ERROR_SXS_FILE_NOT_PART_OF_ASSEMBLY = 14104 // /usr/x86_64-w64-mingw32/include/winerror.h:1904:1: ERROR_SXS_IDENTITIES_DIFFERENT = 14102 // /usr/x86_64-w64-mingw32/include/winerror.h:1902:1: ERROR_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 14092 // /usr/x86_64-w64-mingw32/include/winerror.h:1892:1: ERROR_SXS_IDENTITY_PARSE_ERROR = 14093 // /usr/x86_64-w64-mingw32/include/winerror.h:1893:1: ERROR_SXS_INCORRECT_PUBLIC_KEY_TOKEN = 14095 // /usr/x86_64-w64-mingw32/include/winerror.h:1895:1: ERROR_SXS_INVALID_ACTCTXDATA_FORMAT = 14002 // /usr/x86_64-w64-mingw32/include/winerror.h:1802:1: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE = 14017 // /usr/x86_64-w64-mingw32/include/winerror.h:1817:1: ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME = 14080 // /usr/x86_64-w64-mingw32/include/winerror.h:1880:1: ERROR_SXS_INVALID_DEACTIVATION = 14085 // /usr/x86_64-w64-mingw32/include/winerror.h:1885:1: ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 14091 // /usr/x86_64-w64-mingw32/include/winerror.h:1891:1: ERROR_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 14090 // /usr/x86_64-w64-mingw32/include/winerror.h:1890:1: ERROR_SXS_INVALID_XML_NAMESPACE_URI = 14014 // /usr/x86_64-w64-mingw32/include/winerror.h:1814:1: ERROR_SXS_KEY_NOT_FOUND = 14007 // /usr/x86_64-w64-mingw32/include/winerror.h:1807:1: ERROR_SXS_LEAF_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14016 // /usr/x86_64-w64-mingw32/include/winerror.h:1816:1: ERROR_SXS_MANIFEST_FORMAT_ERROR = 14004 // /usr/x86_64-w64-mingw32/include/winerror.h:1804:1: ERROR_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 14101 // /usr/x86_64-w64-mingw32/include/winerror.h:1901:1: ERROR_SXS_MANIFEST_INVALID_REQUIRED_DEFAULT_NAMESPACE = 14019 // /usr/x86_64-w64-mingw32/include/winerror.h:1819:1: ERROR_SXS_MANIFEST_MISSING_REQUIRED_DEFAULT_NAMESPACE = 14018 // /usr/x86_64-w64-mingw32/include/winerror.h:1818:1: ERROR_SXS_MANIFEST_PARSE_ERROR = 14005 // /usr/x86_64-w64-mingw32/include/winerror.h:1805:1: ERROR_SXS_MANIFEST_TOO_BIG = 14105 // /usr/x86_64-w64-mingw32/include/winerror.h:1905:1: ERROR_SXS_MISSING_ASSEMBLY_IDENTITY_ATTRIBUTE = 14079 // /usr/x86_64-w64-mingw32/include/winerror.h:1879:1: ERROR_SXS_MULTIPLE_DEACTIVATION = 14086 // /usr/x86_64-w64-mingw32/include/winerror.h:1886:1: ERROR_SXS_POLICY_PARSE_ERROR = 14029 // /usr/x86_64-w64-mingw32/include/winerror.h:1829:1: ERROR_SXS_PRIVATE_MANIFEST_CROSS_PATH_WITH_REPARSE_POINT = 14020 // /usr/x86_64-w64-mingw32/include/winerror.h:1820:1: ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET = 14011 // /usr/x86_64-w64-mingw32/include/winerror.h:1811:1: ERROR_SXS_PROCESS_TERMINATION_REQUESTED = 14087 // /usr/x86_64-w64-mingw32/include/winerror.h:1887:1: ERROR_SXS_PROTECTION_CATALOG_FILE_MISSING = 14078 // /usr/x86_64-w64-mingw32/include/winerror.h:1878:1: ERROR_SXS_PROTECTION_CATALOG_NOT_VALID = 14076 // /usr/x86_64-w64-mingw32/include/winerror.h:1876:1: ERROR_SXS_PROTECTION_PUBLIC_KEY_TOO_SHORT = 14075 // /usr/x86_64-w64-mingw32/include/winerror.h:1875:1: ERROR_SXS_PROTECTION_RECOVERY_FAILED = 14074 // /usr/x86_64-w64-mingw32/include/winerror.h:1874:1: ERROR_SXS_RELEASE_ACTIVATION_CONTEXT = 14088 // /usr/x86_64-w64-mingw32/include/winerror.h:1888:1: ERROR_SXS_ROOT_MANIFEST_DEPENDENCY_NOT_INSTALLED = 14015 // /usr/x86_64-w64-mingw32/include/winerror.h:1815:1: ERROR_SXS_SECTION_NOT_FOUND = 14000 // /usr/x86_64-w64-mingw32/include/winerror.h:1800:1: ERROR_SXS_SETTING_NOT_REGISTERED = 14106 // /usr/x86_64-w64-mingw32/include/winerror.h:1906:1: ERROR_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 14089 // /usr/x86_64-w64-mingw32/include/winerror.h:1889:1: ERROR_SXS_THREAD_QUERIES_DISABLED = 14010 // /usr/x86_64-w64-mingw32/include/winerror.h:1810:1: ERROR_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 14107 // /usr/x86_64-w64-mingw32/include/winerror.h:1907:1: ERROR_SXS_UNKNOWN_ENCODING = 14013 // /usr/x86_64-w64-mingw32/include/winerror.h:1813:1: ERROR_SXS_UNKNOWN_ENCODING_GROUP = 14012 // /usr/x86_64-w64-mingw32/include/winerror.h:1812:1: ERROR_SXS_UNTRANSLATABLE_HRESULT = 14077 // /usr/x86_64-w64-mingw32/include/winerror.h:1877:1: ERROR_SXS_VERSION_CONFLICT = 14008 // /usr/x86_64-w64-mingw32/include/winerror.h:1808:1: ERROR_SXS_WRONG_SECTION_TYPE = 14009 // /usr/x86_64-w64-mingw32/include/winerror.h:1809:1: ERROR_SXS_XML_E_BADCHARDATA = 14036 // /usr/x86_64-w64-mingw32/include/winerror.h:1836:1: ERROR_SXS_XML_E_BADCHARINSTRING = 14034 // /usr/x86_64-w64-mingw32/include/winerror.h:1834:1: ERROR_SXS_XML_E_BADNAMECHAR = 14033 // /usr/x86_64-w64-mingw32/include/winerror.h:1833:1: ERROR_SXS_XML_E_BADPEREFINSUBSET = 14059 // /usr/x86_64-w64-mingw32/include/winerror.h:1859:1: ERROR_SXS_XML_E_BADSTARTNAMECHAR = 14032 // /usr/x86_64-w64-mingw32/include/winerror.h:1832:1: ERROR_SXS_XML_E_BADXMLCASE = 14069 // /usr/x86_64-w64-mingw32/include/winerror.h:1869:1: ERROR_SXS_XML_E_BADXMLDECL = 14056 // /usr/x86_64-w64-mingw32/include/winerror.h:1856:1: ERROR_SXS_XML_E_COMMENTSYNTAX = 14031 // /usr/x86_64-w64-mingw32/include/winerror.h:1831:1: ERROR_SXS_XML_E_DUPLICATEATTRIBUTE = 14053 // /usr/x86_64-w64-mingw32/include/winerror.h:1853:1: ERROR_SXS_XML_E_EXPECTINGCLOSEQUOTE = 14045 // /usr/x86_64-w64-mingw32/include/winerror.h:1845:1: ERROR_SXS_XML_E_EXPECTINGTAGEND = 14038 // /usr/x86_64-w64-mingw32/include/winerror.h:1838:1: ERROR_SXS_XML_E_INCOMPLETE_ENCODING = 14043 // /usr/x86_64-w64-mingw32/include/winerror.h:1843:1: ERROR_SXS_XML_E_INTERNALERROR = 14041 // /usr/x86_64-w64-mingw32/include/winerror.h:1841:1: ERROR_SXS_XML_E_INVALIDATROOTLEVEL = 14055 // /usr/x86_64-w64-mingw32/include/winerror.h:1855:1: ERROR_SXS_XML_E_INVALIDENCODING = 14067 // /usr/x86_64-w64-mingw32/include/winerror.h:1867:1: ERROR_SXS_XML_E_INVALIDSWITCH = 14068 // /usr/x86_64-w64-mingw32/include/winerror.h:1868:1: ERROR_SXS_XML_E_INVALID_DECIMAL = 14047 // /usr/x86_64-w64-mingw32/include/winerror.h:1847:1: ERROR_SXS_XML_E_INVALID_HEXIDECIMAL = 14048 // /usr/x86_64-w64-mingw32/include/winerror.h:1848:1: ERROR_SXS_XML_E_INVALID_STANDALONE = 14070 // /usr/x86_64-w64-mingw32/include/winerror.h:1870:1: ERROR_SXS_XML_E_INVALID_UNICODE = 14049 // /usr/x86_64-w64-mingw32/include/winerror.h:1849:1: ERROR_SXS_XML_E_INVALID_VERSION = 14072 // /usr/x86_64-w64-mingw32/include/winerror.h:1872:1: ERROR_SXS_XML_E_MISSINGEQUALS = 14073 // /usr/x86_64-w64-mingw32/include/winerror.h:1873:1: ERROR_SXS_XML_E_MISSINGQUOTE = 14030 // /usr/x86_64-w64-mingw32/include/winerror.h:1830:1: ERROR_SXS_XML_E_MISSINGROOT = 14057 // /usr/x86_64-w64-mingw32/include/winerror.h:1857:1: ERROR_SXS_XML_E_MISSINGSEMICOLON = 14039 // /usr/x86_64-w64-mingw32/include/winerror.h:1839:1: ERROR_SXS_XML_E_MISSINGWHITESPACE = 14037 // /usr/x86_64-w64-mingw32/include/winerror.h:1837:1: ERROR_SXS_XML_E_MISSING_PAREN = 14044 // /usr/x86_64-w64-mingw32/include/winerror.h:1844:1: ERROR_SXS_XML_E_MULTIPLEROOTS = 14054 // /usr/x86_64-w64-mingw32/include/winerror.h:1854:1: ERROR_SXS_XML_E_MULTIPLE_COLONS = 14046 // /usr/x86_64-w64-mingw32/include/winerror.h:1846:1: ERROR_SXS_XML_E_RESERVEDNAMESPACE = 14066 // /usr/x86_64-w64-mingw32/include/winerror.h:1866:1: ERROR_SXS_XML_E_UNBALANCEDPAREN = 14040 // /usr/x86_64-w64-mingw32/include/winerror.h:1840:1: ERROR_SXS_XML_E_UNCLOSEDCDATA = 14065 // /usr/x86_64-w64-mingw32/include/winerror.h:1865:1: ERROR_SXS_XML_E_UNCLOSEDCOMMENT = 14063 // /usr/x86_64-w64-mingw32/include/winerror.h:1863:1: ERROR_SXS_XML_E_UNCLOSEDDECL = 14064 // /usr/x86_64-w64-mingw32/include/winerror.h:1864:1: ERROR_SXS_XML_E_UNCLOSEDENDTAG = 14061 // /usr/x86_64-w64-mingw32/include/winerror.h:1861:1: ERROR_SXS_XML_E_UNCLOSEDSTARTTAG = 14060 // /usr/x86_64-w64-mingw32/include/winerror.h:1860:1: ERROR_SXS_XML_E_UNCLOSEDSTRING = 14062 // /usr/x86_64-w64-mingw32/include/winerror.h:1862:1: ERROR_SXS_XML_E_UNCLOSEDTAG = 14052 // /usr/x86_64-w64-mingw32/include/winerror.h:1852:1: ERROR_SXS_XML_E_UNEXPECTEDENDTAG = 14051 // /usr/x86_64-w64-mingw32/include/winerror.h:1851:1: ERROR_SXS_XML_E_UNEXPECTEDEOF = 14058 // /usr/x86_64-w64-mingw32/include/winerror.h:1858:1: ERROR_SXS_XML_E_UNEXPECTED_STANDALONE = 14071 // /usr/x86_64-w64-mingw32/include/winerror.h:1871:1: ERROR_SXS_XML_E_UNEXPECTED_WHITESPACE = 14042 // /usr/x86_64-w64-mingw32/include/winerror.h:1842:1: ERROR_SXS_XML_E_WHITESPACEORQUESTIONMARK = 14050 // /usr/x86_64-w64-mingw32/include/winerror.h:1850:1: ERROR_SXS_XML_E_XMLDECLSYNTAX = 14035 // /usr/x86_64-w64-mingw32/include/winerror.h:1835:1: ERROR_SYMLINK_CLASS_DISABLED = 1463 // /usr/x86_64-w64-mingw32/include/winerror.h:634:1: ERROR_SYMLINK_NOT_SUPPORTED = 1464 // /usr/x86_64-w64-mingw32/include/winerror.h:635:1: ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED = 1274 // /usr/x86_64-w64-mingw32/include/winerror.h:458:1: ERROR_SYSTEM_DEVICE_NOT_FOUND = 15299 // /usr/x86_64-w64-mingw32/include/winerror.h:2154:1: ERROR_SYSTEM_NEEDS_REMEDIATION = 15623 // /usr/x86_64-w64-mingw32/include/winerror.h:2194:1: ERROR_SYSTEM_TRACE = 150 // /usr/x86_64-w64-mingw32/include/winerror.h:163:1: ERROR_TAG_NOT_FOUND = 2012 // /usr/x86_64-w64-mingw32/include/winerror.h:868:1: ERROR_TAG_NOT_PRESENT = 2013 // /usr/x86_64-w64-mingw32/include/winerror.h:869:1: ERROR_THREAD_1_INACTIVE = 210 // /usr/x86_64-w64-mingw32/include/winerror.h:207:1: ERROR_TIMEOUT = 1460 // /usr/x86_64-w64-mingw32/include/winerror.h:631:1: ERROR_TIME_SKEW = 1398 // /usr/x86_64-w64-mingw32/include/winerror.h:569:1: ERROR_TLW_WITH_WSCHILD = 1406 // /usr/x86_64-w64-mingw32/include/winerror.h:577:1: ERROR_TOKEN_ALREADY_IN_USE = 1375 // /usr/x86_64-w64-mingw32/include/winerror.h:546:1: ERROR_TOO_MANY_CMDS = 56 // /usr/x86_64-w64-mingw32/include/winerror.h:89:1: ERROR_TOO_MANY_CONTEXT_IDS = 1384 // /usr/x86_64-w64-mingw32/include/winerror.h:555:1: ERROR_TOO_MANY_LINKS = 1142 // /usr/x86_64-w64-mingw32/include/winerror.h:358:1: ERROR_TOO_MANY_LUIDS_REQUESTED = 1333 // /usr/x86_64-w64-mingw32/include/winerror.h:505:1: ERROR_TOO_MANY_MODULES = 214 // /usr/x86_64-w64-mingw32/include/winerror.h:209:1: ERROR_TOO_MANY_MUXWAITERS = 152 // /usr/x86_64-w64-mingw32/include/winerror.h:165:1: ERROR_TOO_MANY_NAMES = 68 // /usr/x86_64-w64-mingw32/include/winerror.h:101:1: ERROR_TOO_MANY_OPEN_FILES = 4 // /usr/x86_64-w64-mingw32/include/winerror.h:49:1: ERROR_TOO_MANY_POSTS = 298 // /usr/x86_64-w64-mingw32/include/winerror.h:238:1: ERROR_TOO_MANY_SECRETS = 1381 // /usr/x86_64-w64-mingw32/include/winerror.h:552:1: ERROR_TOO_MANY_SEMAPHORES = 100 // /usr/x86_64-w64-mingw32/include/winerror.h:115:1: ERROR_TOO_MANY_SEM_REQUESTS = 103 // /usr/x86_64-w64-mingw32/include/winerror.h:118:1: ERROR_TOO_MANY_SESS = 69 // /usr/x86_64-w64-mingw32/include/winerror.h:102:1: ERROR_TOO_MANY_SIDS = 1389 // /usr/x86_64-w64-mingw32/include/winerror.h:560:1: ERROR_TOO_MANY_TCBS = 155 // /usr/x86_64-w64-mingw32/include/winerror.h:168:1: ERROR_TRANSFORM_NOT_SUPPORTED = 2004 // /usr/x86_64-w64-mingw32/include/winerror.h:864:1: ERROR_TRANSPORT_FULL = 4328 // /usr/x86_64-w64-mingw32/include/winerror.h:952:1: ERROR_TRAY_MALFUNCTION = 0x00000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:1173:1: ERROR_TRUSTED_DOMAIN_FAILURE = 1788 // /usr/x86_64-w64-mingw32/include/winerror.h:776:1: ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789 // /usr/x86_64-w64-mingw32/include/winerror.h:777:1: ERROR_TRUST_FAILURE = 1790 // /usr/x86_64-w64-mingw32/include/winerror.h:778:1: ERROR_UNABLE_TO_CLEAN = 4311 // /usr/x86_64-w64-mingw32/include/winerror.h:935:1: ERROR_UNABLE_TO_EJECT_MOUNTED_MEDIA = 4330 // /usr/x86_64-w64-mingw32/include/winerror.h:954:1: ERROR_UNABLE_TO_INVENTORY_DRIVE = 4325 // /usr/x86_64-w64-mingw32/include/winerror.h:949:1: ERROR_UNABLE_TO_INVENTORY_SLOT = 4326 // /usr/x86_64-w64-mingw32/include/winerror.h:950:1: ERROR_UNABLE_TO_INVENTORY_TRANSPORT = 4327 // /usr/x86_64-w64-mingw32/include/winerror.h:951:1: ERROR_UNABLE_TO_LOAD_MEDIUM = 4324 // /usr/x86_64-w64-mingw32/include/winerror.h:948:1: ERROR_UNABLE_TO_LOCK_MEDIA = 1108 // /usr/x86_64-w64-mingw32/include/winerror.h:331:1: ERROR_UNABLE_TO_MOVE_REPLACEMENT = 1176 // /usr/x86_64-w64-mingw32/include/winerror.h:384:1: ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = 1177 // /usr/x86_64-w64-mingw32/include/winerror.h:385:1: ERROR_UNABLE_TO_REMOVE_REPLACED = 1175 // /usr/x86_64-w64-mingw32/include/winerror.h:383:1: ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109 // /usr/x86_64-w64-mingw32/include/winerror.h:332:1: ERROR_UNEXPECTED_OMID = 4334 // /usr/x86_64-w64-mingw32/include/winerror.h:958:1: ERROR_UNEXP_NET_ERR = 59 // /usr/x86_64-w64-mingw32/include/winerror.h:92:1: ERROR_UNHANDLED_ERROR = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/winioctl.h:1175:1: ERROR_UNIDENTIFIED_ERROR = 1287 // /usr/x86_64-w64-mingw32/include/winerror.h:471:1: ERROR_UNKNOWN_COMPONENT = 1607 // /usr/x86_64-w64-mingw32/include/winerror.h:653:1: ERROR_UNKNOWN_FEATURE = 1606 // /usr/x86_64-w64-mingw32/include/winerror.h:652:1: ERROR_UNKNOWN_PORT = 1796 // /usr/x86_64-w64-mingw32/include/winerror.h:784:1: ERROR_UNKNOWN_PRINTER_DRIVER = 1797 // /usr/x86_64-w64-mingw32/include/winerror.h:785:1: ERROR_UNKNOWN_PRINTPROCESSOR = 1798 // /usr/x86_64-w64-mingw32/include/winerror.h:786:1: ERROR_UNKNOWN_PRINT_MONITOR = 3000 // /usr/x86_64-w64-mingw32/include/winerror.h:886:1: ERROR_UNKNOWN_PRODUCT = 1605 // /usr/x86_64-w64-mingw32/include/winerror.h:651:1: ERROR_UNKNOWN_PROPERTY = 1608 // /usr/x86_64-w64-mingw32/include/winerror.h:654:1: ERROR_UNKNOWN_REVISION = 1305 // /usr/x86_64-w64-mingw32/include/winerror.h:477:1: ERROR_UNMAPPED_SUBSTITUTION_STRING = 14096 // /usr/x86_64-w64-mingw32/include/winerror.h:1896:1: ERROR_UNRECOGNIZED_MEDIA = 1785 // /usr/x86_64-w64-mingw32/include/winerror.h:773:1: ERROR_UNRECOGNIZED_VOLUME = 1005 // /usr/x86_64-w64-mingw32/include/winerror.h:271:1: ERROR_UNSUPPORTED_TYPE = 1630 // /usr/x86_64-w64-mingw32/include/winerror.h:676:1: ERROR_USER_APC = 737 // /usr/x86_64-w64-mingw32/include/winerror.h:258:1: ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED = 1934 // /usr/x86_64-w64-mingw32/include/winerror.h:857:1: ERROR_USER_EXISTS = 1316 // /usr/x86_64-w64-mingw32/include/winerror.h:488:1: ERROR_USER_MAPPED_FILE = 1224 // /usr/x86_64-w64-mingw32/include/winerror.h:414:1: ERROR_VC_DISCONNECTED = 240 // /usr/x86_64-w64-mingw32/include/winerror.h:225:1: ERROR_VDM_DISALLOWED = 1286 // /usr/x86_64-w64-mingw32/include/winerror.h:470:1: ERROR_VOLUME_CONTAINS_SYS_FILES = 4337 // /usr/x86_64-w64-mingw32/include/winerror.h:961:1: ERROR_VOLUME_NOT_SIS_ENABLED = 4500 // /usr/x86_64-w64-mingw32/include/winerror.h:974:1: ERROR_VOLUME_NOT_SUPPORT_EFS = 6014 // /usr/x86_64-w64-mingw32/include/winerror.h:1093:1: ERROR_WAIT_1 = 731 // /usr/x86_64-w64-mingw32/include/winerror.h:252:1: ERROR_WAIT_2 = 732 // /usr/x86_64-w64-mingw32/include/winerror.h:253:1: ERROR_WAIT_3 = 733 // /usr/x86_64-w64-mingw32/include/winerror.h:254:1: ERROR_WAIT_63 = 734 // /usr/x86_64-w64-mingw32/include/winerror.h:255:1: ERROR_WAIT_NO_CHILDREN = 128 // /usr/x86_64-w64-mingw32/include/winerror.h:141:1: ERROR_WAKE_SYSTEM = 730 // /usr/x86_64-w64-mingw32/include/winerror.h:251:1: ERROR_WINDOW_NOT_COMBOBOX = 1423 // /usr/x86_64-w64-mingw32/include/winerror.h:594:1: ERROR_WINDOW_NOT_DIALOG = 1420 // /usr/x86_64-w64-mingw32/include/winerror.h:591:1: ERROR_WINDOW_OF_OTHER_THREAD = 1408 // /usr/x86_64-w64-mingw32/include/winerror.h:579:1: ERROR_WINS_INTERNAL = 4000 // /usr/x86_64-w64-mingw32/include/winerror.h:901:1: ERROR_WMI_ALREADY_DISABLED = 4212 // /usr/x86_64-w64-mingw32/include/winerror.h:921:1: ERROR_WMI_ALREADY_ENABLED = 4206 // /usr/x86_64-w64-mingw32/include/winerror.h:915:1: ERROR_WMI_DP_FAILED = 4209 // /usr/x86_64-w64-mingw32/include/winerror.h:918:1: ERROR_WMI_DP_NOT_FOUND = 4204 // /usr/x86_64-w64-mingw32/include/winerror.h:913:1: ERROR_WMI_GUID_DISCONNECTED = 4207 // /usr/x86_64-w64-mingw32/include/winerror.h:916:1: ERROR_WMI_GUID_NOT_FOUND = 4200 // /usr/x86_64-w64-mingw32/include/winerror.h:909:1: ERROR_WMI_INSTANCE_NOT_FOUND = 4201 // /usr/x86_64-w64-mingw32/include/winerror.h:910:1: ERROR_WMI_INVALID_MOF = 4210 // /usr/x86_64-w64-mingw32/include/winerror.h:919:1: ERROR_WMI_INVALID_REGINFO = 4211 // /usr/x86_64-w64-mingw32/include/winerror.h:920:1: ERROR_WMI_ITEMID_NOT_FOUND = 4202 // /usr/x86_64-w64-mingw32/include/winerror.h:911:1: ERROR_WMI_READ_ONLY = 4213 // /usr/x86_64-w64-mingw32/include/winerror.h:922:1: ERROR_WMI_SERVER_UNAVAILABLE = 4208 // /usr/x86_64-w64-mingw32/include/winerror.h:917:1: ERROR_WMI_SET_FAILURE = 4214 // /usr/x86_64-w64-mingw32/include/winerror.h:923:1: ERROR_WMI_TRY_AGAIN = 4203 // /usr/x86_64-w64-mingw32/include/winerror.h:912:1: ERROR_WMI_UNRESOLVED_INSTANCE_REF = 4205 // /usr/x86_64-w64-mingw32/include/winerror.h:914:1: ERROR_WORKING_SET_QUOTA = 1453 // /usr/x86_64-w64-mingw32/include/winerror.h:624:1: ERROR_WRITE_FAULT = 29 // /usr/x86_64-w64-mingw32/include/winerror.h:74:1: ERROR_WRITE_PROTECT = 19 // /usr/x86_64-w64-mingw32/include/winerror.h:64:1: ERROR_WRONG_COMPARTMENT = 1468 // /usr/x86_64-w64-mingw32/include/winerror.h:639:1: ERROR_WRONG_DISK = 34 // /usr/x86_64-w64-mingw32/include/winerror.h:79:1: ERROR_WRONG_EFS = 6005 // /usr/x86_64-w64-mingw32/include/winerror.h:1084:1: ERROR_WRONG_PASSWORD = 1323 // /usr/x86_64-w64-mingw32/include/winerror.h:495:1: ERROR_WRONG_TARGET_NAME = 1396 // /usr/x86_64-w64-mingw32/include/winerror.h:567:1: ERROR_XMLDSIG_ERROR = 1466 // /usr/x86_64-w64-mingw32/include/winerror.h:637:1: ERROR_XML_ENCODING_MISMATCH = 14100 // /usr/x86_64-w64-mingw32/include/winerror.h:1900:1: ERROR_XML_PARSE_ERROR = 1465 // /usr/x86_64-w64-mingw32/include/winerror.h:636:1: ESB_DISABLE_BOTH = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:3601:1: ESB_DISABLE_DOWN = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3606:1: ESB_DISABLE_LEFT = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3602:1: ESB_DISABLE_LTUP = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3608:1: ESB_DISABLE_RIGHT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3603:1: ESB_DISABLE_RTDN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3609:1: ESB_DISABLE_UP = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3605:1: ESB_ENABLE_BOTH = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:3600:1: ESPIPE = 29 // /usr/x86_64-w64-mingw32/include/errno.h:50:1: ESRCH = 3 // /usr/x86_64-w64-mingw32/include/errno.h:27:1: ES_AUTOHSCROLL = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4388:1: ES_AUTOVSCROLL = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4387:1: ES_CENTER = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4381:1: ES_LEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4380:1: ES_LOWERCASE = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4385:1: ES_MULTILINE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4383:1: ES_NOHIDESEL = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4389:1: ES_NUMBER = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4393:1: ES_OEMCONVERT = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4390:1: ES_PASSWORD = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4386:1: ES_READONLY = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4391:1: ES_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4382:1: ES_UPPERCASE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4384:1: ES_WANTRETURN = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4392:1: ETIME = 137 // /usr/x86_64-w64-mingw32/include/errno.h:214:1: ETIMEDOUT = 138 // /usr/x86_64-w64-mingw32/include/errno.h:223:1: ETO_CLIPPED = 0x0004 // /usr/x86_64-w64-mingw32/include/wingdi.h:131:1: ETO_GLYPH_INDEX = 0x0010 // /usr/x86_64-w64-mingw32/include/wingdi.h:132:1: ETO_IGNORELANGUAGE = 0x1000 // /usr/x86_64-w64-mingw32/include/wingdi.h:136:1: ETO_NUMERICSLATIN = 0x0800 // /usr/x86_64-w64-mingw32/include/wingdi.h:135:1: ETO_NUMERICSLOCAL = 0x0400 // /usr/x86_64-w64-mingw32/include/wingdi.h:134:1: ETO_OPAQUE = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:130:1: ETO_PDY = 0x2000 // /usr/x86_64-w64-mingw32/include/wingdi.h:137:1: ETO_RTLREADING = 0x0080 // /usr/x86_64-w64-mingw32/include/wingdi.h:133:1: ETXTBSY = 139 // /usr/x86_64-w64-mingw32/include/errno.h:218:1: EVENPARITY = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:471:1: EVENTLOG_AUDIT_FAILURE = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:8449:1: EVENTLOG_AUDIT_SUCCESS = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:8448:1: EVENTLOG_BACKWARDS_READ = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:8442:1: EVENTLOG_END_ALL_PAIRED_EVENTS = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:8453:1: EVENTLOG_END_PAIRED_EVENT = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:8452:1: EVENTLOG_ERROR_TYPE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:8445:1: EVENTLOG_FORWARDS_READ = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:8441:1: EVENTLOG_FULL_INFO = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:2280:1: EVENTLOG_INFORMATION_TYPE = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:8447:1: EVENTLOG_PAIRED_EVENT_ACTIVE = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:8454:1: EVENTLOG_PAIRED_EVENT_INACTIVE = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:8455:1: EVENTLOG_SEEK_READ = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:8440:1: EVENTLOG_SEQUENTIAL_READ = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:8439:1: EVENTLOG_START_PAIRED_EVENT = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:8451:1: EVENTLOG_SUCCESS = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:8444:1: EVENTLOG_WARNING_TYPE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:8446:1: EVENT_ALL_ACCESS = 2031619 // /usr/x86_64-w64-mingw32/include/winnt.h:4588:1: EVENT_CONSOLE_CARET = 0x4001 // /usr/x86_64-w64-mingw32/include/winuser.h:5968:1: EVENT_CONSOLE_END_APPLICATION = 0x4007 // /usr/x86_64-w64-mingw32/include/winuser.h:5974:1: EVENT_CONSOLE_LAYOUT = 0x4005 // /usr/x86_64-w64-mingw32/include/winuser.h:5972:1: EVENT_CONSOLE_START_APPLICATION = 0x4006 // /usr/x86_64-w64-mingw32/include/winuser.h:5973:1: EVENT_CONSOLE_UPDATE_REGION = 0x4002 // /usr/x86_64-w64-mingw32/include/winuser.h:5969:1: EVENT_CONSOLE_UPDATE_SCROLL = 0x4004 // /usr/x86_64-w64-mingw32/include/winuser.h:5971:1: EVENT_CONSOLE_UPDATE_SIMPLE = 0x4003 // /usr/x86_64-w64-mingw32/include/winuser.h:5970:1: EVENT_E_FIRST = 2147746304 // /usr/x86_64-w64-mingw32/include/winerror.h:2488:1: EVENT_E_LAST = 2147746335 // /usr/x86_64-w64-mingw32/include/winerror.h:2489:1: EVENT_MAX = 0x7FFFFFFF // /usr/x86_64-w64-mingw32/include/winuser.h:5921:1: EVENT_MIN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5920:1: EVENT_MODIFY_STATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:4587:1: EVENT_OBJECT_ACCELERATORCHANGE = 0x8012 // /usr/x86_64-w64-mingw32/include/winuser.h:6005:1: EVENT_OBJECT_CREATE = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:5987:1: EVENT_OBJECT_DEFACTIONCHANGE = 0x8011 // /usr/x86_64-w64-mingw32/include/winuser.h:6004:1: EVENT_OBJECT_DESCRIPTIONCHANGE = 0x800D // /usr/x86_64-w64-mingw32/include/winuser.h:6000:1: EVENT_OBJECT_DESTROY = 0x8001 // /usr/x86_64-w64-mingw32/include/winuser.h:5988:1: EVENT_OBJECT_FOCUS = 0x8005 // /usr/x86_64-w64-mingw32/include/winuser.h:5992:1: EVENT_OBJECT_HELPCHANGE = 0x8010 // /usr/x86_64-w64-mingw32/include/winuser.h:6003:1: EVENT_OBJECT_HIDE = 0x8003 // /usr/x86_64-w64-mingw32/include/winuser.h:5990:1: EVENT_OBJECT_LOCATIONCHANGE = 0x800B // /usr/x86_64-w64-mingw32/include/winuser.h:5998:1: EVENT_OBJECT_NAMECHANGE = 0x800C // /usr/x86_64-w64-mingw32/include/winuser.h:5999:1: EVENT_OBJECT_PARENTCHANGE = 0x800F // /usr/x86_64-w64-mingw32/include/winuser.h:6002:1: EVENT_OBJECT_REORDER = 0x8004 // /usr/x86_64-w64-mingw32/include/winuser.h:5991:1: EVENT_OBJECT_SELECTION = 0x8006 // /usr/x86_64-w64-mingw32/include/winuser.h:5993:1: EVENT_OBJECT_SELECTIONADD = 0x8007 // /usr/x86_64-w64-mingw32/include/winuser.h:5994:1: EVENT_OBJECT_SELECTIONREMOVE = 0x8008 // /usr/x86_64-w64-mingw32/include/winuser.h:5995:1: EVENT_OBJECT_SELECTIONWITHIN = 0x8009 // /usr/x86_64-w64-mingw32/include/winuser.h:5996:1: EVENT_OBJECT_SHOW = 0x8002 // /usr/x86_64-w64-mingw32/include/winuser.h:5989:1: EVENT_OBJECT_STATECHANGE = 0x800A // /usr/x86_64-w64-mingw32/include/winuser.h:5997:1: EVENT_OBJECT_VALUECHANGE = 0x800E // /usr/x86_64-w64-mingw32/include/winuser.h:6001:1: EVENT_SYSTEM_ALERT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5924:1: EVENT_SYSTEM_CAPTUREEND = 0x0009 // /usr/x86_64-w64-mingw32/include/winuser.h:5931:1: EVENT_SYSTEM_CAPTURESTART = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:5930:1: EVENT_SYSTEM_CONTEXTHELPEND = 0x000D // /usr/x86_64-w64-mingw32/include/winuser.h:5935:1: EVENT_SYSTEM_CONTEXTHELPSTART = 0x000C // /usr/x86_64-w64-mingw32/include/winuser.h:5934:1: EVENT_SYSTEM_DIALOGEND = 0x0011 // /usr/x86_64-w64-mingw32/include/winuser.h:5939:1: EVENT_SYSTEM_DIALOGSTART = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:5938:1: EVENT_SYSTEM_DRAGDROPEND = 0x000F // /usr/x86_64-w64-mingw32/include/winuser.h:5937:1: EVENT_SYSTEM_DRAGDROPSTART = 0x000E // /usr/x86_64-w64-mingw32/include/winuser.h:5936:1: EVENT_SYSTEM_FOREGROUND = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:5925:1: EVENT_SYSTEM_MENUEND = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:5927:1: EVENT_SYSTEM_MENUPOPUPEND = 0x0007 // /usr/x86_64-w64-mingw32/include/winuser.h:5929:1: EVENT_SYSTEM_MENUPOPUPSTART = 0x0006 // /usr/x86_64-w64-mingw32/include/winuser.h:5928:1: EVENT_SYSTEM_MENUSTART = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:5926:1: EVENT_SYSTEM_MINIMIZEEND = 0x0017 // /usr/x86_64-w64-mingw32/include/winuser.h:5945:1: EVENT_SYSTEM_MINIMIZESTART = 0x0016 // /usr/x86_64-w64-mingw32/include/winuser.h:5944:1: EVENT_SYSTEM_MOVESIZEEND = 0x000B // /usr/x86_64-w64-mingw32/include/winuser.h:5933:1: EVENT_SYSTEM_MOVESIZESTART = 0x000A // /usr/x86_64-w64-mingw32/include/winuser.h:5932:1: EVENT_SYSTEM_SCROLLINGEND = 0x0013 // /usr/x86_64-w64-mingw32/include/winuser.h:5941:1: EVENT_SYSTEM_SCROLLINGSTART = 0x0012 // /usr/x86_64-w64-mingw32/include/winuser.h:5940:1: EVENT_SYSTEM_SOUND = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5923:1: EVENT_SYSTEM_SWITCHEND = 0x0015 // /usr/x86_64-w64-mingw32/include/winuser.h:5943:1: EVENT_SYSTEM_SWITCHSTART = 0x0014 // /usr/x86_64-w64-mingw32/include/winuser.h:5942:1: EVENT_S_FIRST = 262656 // /usr/x86_64-w64-mingw32/include/winerror.h:2490:1: EVENT_S_LAST = 262687 // /usr/x86_64-w64-mingw32/include/winerror.h:2491:1: EV_BREAK = 0x40 // /usr/x86_64-w64-mingw32/include/winbase.h:525:1: EV_CTS = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:522:1: EV_DSR = 0x10 // /usr/x86_64-w64-mingw32/include/winbase.h:523:1: EV_ERR = 0x80 // /usr/x86_64-w64-mingw32/include/winbase.h:526:1: EV_EVENT1 = 0x800 // /usr/x86_64-w64-mingw32/include/winbase.h:530:1: EV_EVENT2 = 0x1000 // /usr/x86_64-w64-mingw32/include/winbase.h:531:1: EV_PERR = 0x200 // /usr/x86_64-w64-mingw32/include/winbase.h:528:1: EV_RING = 0x100 // /usr/x86_64-w64-mingw32/include/winbase.h:527:1: EV_RLSD = 0x20 // /usr/x86_64-w64-mingw32/include/winbase.h:524:1: EV_RX80FULL = 0x400 // /usr/x86_64-w64-mingw32/include/winbase.h:529:1: EV_RXCHAR = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:519:1: EV_RXFLAG = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:520:1: EV_TXEMPTY = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:521:1: EWOULDBLOCK = 140 // /usr/x86_64-w64-mingw32/include/errno.h:166:1: EWX_ARSO = 0x04000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2028:1: EWX_BOOTOPTIONS = 0x01000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2027:1: EWX_CHECK_SAFE_FOR_SERVER = 0x08000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2029:1: EWX_FORCE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2019:1: EWX_FORCEIFHUNG = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:2021:1: EWX_HYBRID_SHUTDOWN = 0x00400000 // /usr/x86_64-w64-mingw32/include/winuser.h:2026:1: EWX_LOGOFF = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2016:1: EWX_POWEROFF = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:2020:1: EWX_QUICKRESOLVE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:2022:1: EWX_REBOOT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2018:1: EWX_SHUTDOWN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2017:1: EXCEPTION_COLLIDED_UNWIND = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:2768:1: EXCEPTION_CONTINUE_EXECUTION = -1 // /usr/x86_64-w64-mingw32/include/excpt.h:63:1: EXCEPTION_CONTINUE_SEARCH = 0 // /usr/x86_64-w64-mingw32/include/excpt.h:62:1: EXCEPTION_DEBUG_EVENT = 1 // /usr/x86_64-w64-mingw32/include/minwinbase.h:224:1: EXCEPTION_EXECUTE_FAULT = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:1655:1: EXCEPTION_EXECUTE_HANDLER = 1 // /usr/x86_64-w64-mingw32/include/excpt.h:61:1: EXCEPTION_EXIT_UNWIND = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:2764:1: EXCEPTION_MAXIMUM_PARAMETERS = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:2775:1: EXCEPTION_NESTED_CALL = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:2766:1: EXCEPTION_NONCONTINUABLE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:2762:1: EXCEPTION_READ_FAULT = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:1653:1: EXCEPTION_STACK_INVALID = 0x8 // /usr/x86_64-w64-mingw32/include/winnt.h:2765:1: EXCEPTION_TARGET_UNWIND = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:2767:1: EXCEPTION_UNWIND = 0x66 // /usr/x86_64-w64-mingw32/include/winnt.h:2769:1: EXCEPTION_UNWINDING = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:2763:1: EXCEPTION_WRITE_FAULT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:1654:1: EXCLUDED_TABLE_NUMBER = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:100448:1: EXCLUSIVE_LOCK = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16323:1: EXDEV = 18 // /usr/x86_64-w64-mingw32/include/errno.h:41:1: EXECUTE_OFFLINE_DIAGS = 0xD4 // /usr/x86_64-w64-mingw32/include/winioctl.h:962:1: EXIT_FAILURE = 1 // /usr/x86_64-w64-mingw32/include/stdlib.h:45:1: EXIT_PROCESS_DEBUG_EVENT = 5 // /usr/x86_64-w64-mingw32/include/minwinbase.h:228:1: EXIT_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:44:1: EXIT_THREAD_DEBUG_EVENT = 4 // /usr/x86_64-w64-mingw32/include/minwinbase.h:227:1: EXPAND_LOCAL_DRIVES = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:1966:1: EXPENTRY = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:19:1: EXPORT_PRIVATE_KEYS = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5713:1: EXPO_OFFLOAD_FUNC_NAME = "OffloadModExpo" // /usr/x86_64-w64-mingw32/include/wincrypt.h:608:1: EXPO_OFFLOAD_REG_VALUE = "ExpoOffload" // /usr/x86_64-w64-mingw32/include/wincrypt.h:607:1: EXPRDUP_REDUCE = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18207:1: EXTENDED_STARTUPINFO_PRESENT = 0x80000 // /usr/x86_64-w64-mingw32/include/winbase.h:396:1: EXTEND_IEPORT = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1111:1: EXTTEXTOUT = 512 // /usr/x86_64-w64-mingw32/include/wingdi.h:280:1: EXT_DEVICE_CAPS = 4099 // /usr/x86_64-w64-mingw32/include/wingdi.h:296:1: ExceptionCollidedUnwind = 3 // /usr/x86_64-w64-mingw32/include/excpt.h:25:1: ExceptionContinueExecution = 0 // /usr/x86_64-w64-mingw32/include/excpt.h:22:1: ExceptionContinueSearch = 1 // /usr/x86_64-w64-mingw32/include/excpt.h:23:1: ExceptionExecuteHandler = 4 // /usr/x86_64-w64-mingw32/include/excpt.h:26:1: ExceptionNestedException = 2 // /usr/x86_64-w64-mingw32/include/excpt.h:24:1: FACILITY_AAF = 18 // /usr/x86_64-w64-mingw32/include/winerror.h:41:1: FACILITY_ACS = 20 // /usr/x86_64-w64-mingw32/include/winerror.h:40:1: FACILITY_AUDCLNT = 2185 // /usr/x86_64-w64-mingw32/include/winerror.h:42:1: FACILITY_BACKGROUNDCOPY = 32 // /usr/x86_64-w64-mingw32/include/winerror.h:39:1: FACILITY_CERT = 11 // /usr/x86_64-w64-mingw32/include/winerror.h:38:1: FACILITY_COMPLUS = 17 // /usr/x86_64-w64-mingw32/include/winerror.h:37:1: FACILITY_CONFIGURATION = 33 // /usr/x86_64-w64-mingw32/include/winerror.h:36:1: FACILITY_CONTROL = 10 // /usr/x86_64-w64-mingw32/include/winerror.h:25:1: FACILITY_DIRECTORYSERVICE = 37 // /usr/x86_64-w64-mingw32/include/winerror.h:35:1: FACILITY_DISPATCH = 2 // /usr/x86_64-w64-mingw32/include/winerror.h:34:1: FACILITY_DPLAY = 21 // /usr/x86_64-w64-mingw32/include/winerror.h:33:1: FACILITY_HTTP = 25 // /usr/x86_64-w64-mingw32/include/winerror.h:32:1: FACILITY_INTERNET = 12 // /usr/x86_64-w64-mingw32/include/winerror.h:30:1: FACILITY_ITF = 4 // /usr/x86_64-w64-mingw32/include/winerror.h:31:1: FACILITY_MEDIASERVER = 13 // /usr/x86_64-w64-mingw32/include/winerror.h:29:1: FACILITY_METADIRECTORY = 35 // /usr/x86_64-w64-mingw32/include/winerror.h:27:1: FACILITY_MSMQ = 14 // /usr/x86_64-w64-mingw32/include/winerror.h:28:1: FACILITY_NT_BIT = 0x10000000 // /usr/x86_64-w64-mingw32/include/winerror.h:2235:1: FACILITY_NULL = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:26:1: FACILITY_RPC = 1 // /usr/x86_64-w64-mingw32/include/winerror.h:23:1: FACILITY_SCARD = 16 // /usr/x86_64-w64-mingw32/include/winerror.h:20:1: FACILITY_SECURITY = 9 // /usr/x86_64-w64-mingw32/include/winerror.h:22:1: FACILITY_SETUPAPI = 15 // /usr/x86_64-w64-mingw32/include/winerror.h:21:1: FACILITY_SSPI = 9 // /usr/x86_64-w64-mingw32/include/winerror.h:19:1: FACILITY_STATE_MANAGEMENT = 34 // /usr/x86_64-w64-mingw32/include/winerror.h:18:1: FACILITY_STORAGE = 3 // /usr/x86_64-w64-mingw32/include/winerror.h:17:1: FACILITY_SXS = 23 // /usr/x86_64-w64-mingw32/include/winerror.h:16:1: FACILITY_UMI = 22 // /usr/x86_64-w64-mingw32/include/winerror.h:15:1: FACILITY_URT = 19 // /usr/x86_64-w64-mingw32/include/winerror.h:14:1: FACILITY_USERMODE_FILTER_MANAGER = 0x1f // /usr/x86_64-w64-mingw32/include/fltwinerror.h:12:1: FACILITY_WIN32 = 7 // /usr/x86_64-w64-mingw32/include/winerror.h:24:1: FACILITY_WINDOWS = 8 // /usr/x86_64-w64-mingw32/include/winerror.h:13:1: FACILITY_WINDOWSUPDATE = 36 // /usr/x86_64-w64-mingw32/include/winerror.h:11:1: FACILITY_WINDOWS_CE = 24 // /usr/x86_64-w64-mingw32/include/winerror.h:12:1: FADF_AUTO = 1 // /usr/x86_64-w64-mingw32/include/oaidl.h:449:1: FADF_BSTR = 256 // /usr/x86_64-w64-mingw32/include/oaidl.h:463:1: FADF_DISPATCH = 1024 // /usr/x86_64-w64-mingw32/include/oaidl.h:467:1: FADF_EMBEDDED = 4 // /usr/x86_64-w64-mingw32/include/oaidl.h:453:1: FADF_FIXEDSIZE = 16 // /usr/x86_64-w64-mingw32/include/oaidl.h:455:1: FADF_HAVEIID = 64 // /usr/x86_64-w64-mingw32/include/oaidl.h:459:1: FADF_HAVEVARTYPE = 128 // /usr/x86_64-w64-mingw32/include/oaidl.h:461:1: FADF_RECORD = 32 // /usr/x86_64-w64-mingw32/include/oaidl.h:457:1: FADF_RESERVED = 61448 // /usr/x86_64-w64-mingw32/include/oaidl.h:471:1: FADF_STATIC = 2 // /usr/x86_64-w64-mingw32/include/oaidl.h:451:1: FADF_UNKNOWN = 512 // /usr/x86_64-w64-mingw32/include/oaidl.h:465:1: FADF_VARIANT = 2048 // /usr/x86_64-w64-mingw32/include/oaidl.h:469:1: FAILED_ACCESS_ACE_FLAG = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:3344:1: FAIL_FAST_GENERATE_EXCEPTION_ADDRESS = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:157:1: FAIL_FAST_NO_HARD_ERROR_DLG = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:158:1: FALSE = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:48:1: FALT = 0x10 // /usr/x86_64-w64-mingw32/include/winuser.h:1814:1: FAPPCOMMAND_KEY = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:624:1: FAPPCOMMAND_MASK = 0xF000 // /usr/x86_64-w64-mingw32/include/winuser.h:626:1: FAPPCOMMAND_MOUSE = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:623:1: FAPPCOMMAND_OEM = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:625:1: FAR = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:118:1: FARSTRUCT = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:122:1: FASTCALL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:264:1: FAST_FAIL_CORRUPT_LIST_ENTRY = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7801:1: FAST_FAIL_FATAL_APP_EXIT = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7805:1: FAST_FAIL_GS_COOKIE_INIT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:7804:1: FAST_FAIL_INCORRECT_STACK = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7802:1: FAST_FAIL_INVALID_ARG = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7803:1: FAST_FAIL_INVALID_FAST_FAIL_CODE = 0xffffffff // /usr/x86_64-w64-mingw32/include/winnt.h:7808:1: FAST_FAIL_LEGACY_GS_VIOLATION = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7798:1: FAST_FAIL_RANGE_CHECK_FAILURE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:7806:1: FAST_FAIL_STACK_COOKIE_CHECK_FAILURE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7800:1: FAST_FAIL_UNSAFE_REGISTRY_ACCESS = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7807:1: FAST_FAIL_VTGUARD_CHECK_FAILURE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7799:1: FCONTROL = 0x08 // /usr/x86_64-w64-mingw32/include/winuser.h:1813:1: FD_ACCEPT = 0x08 // /usr/x86_64-w64-mingw32/include/winsock.h:270:1: FD_CLOSE = 0x20 // /usr/x86_64-w64-mingw32/include/winsock.h:272:1: FD_CONNECT = 0x10 // /usr/x86_64-w64-mingw32/include/winsock.h:271:1: FD_OOB = 0x04 // /usr/x86_64-w64-mingw32/include/winsock.h:269:1: FD_READ = 0x01 // /usr/x86_64-w64-mingw32/include/winsock.h:267:1: FD_SETSIZE = 64 // /usr/x86_64-w64-mingw32/include/psdk_inc/_fd_types.h:13:1: FD_WRITE = 0x02 // /usr/x86_64-w64-mingw32/include/winsock.h:268:1: FEATURESETTING_CUSTPAPER = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:384:1: FEATURESETTING_MIRROR = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:385:1: FEATURESETTING_NEGATIVE = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:386:1: FEATURESETTING_NUP = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:381:1: FEATURESETTING_OUTPUT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:382:1: FEATURESETTING_PRIVATE_BEGIN = 0x1000 // /usr/x86_64-w64-mingw32/include/wingdi.h:389:1: FEATURESETTING_PRIVATE_END = 0x1FFF // /usr/x86_64-w64-mingw32/include/wingdi.h:390:1: FEATURESETTING_PROTOCOL = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:387:1: FEATURESETTING_PSLEVEL = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:383:1: FE_FONTSMOOTHINGCLEARTYPE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5292:1: FE_FONTSMOOTHINGDOCKING = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:5293:1: FE_FONTSMOOTHINGORIENTATIONBGR = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:5397:1: FE_FONTSMOOTHINGORIENTATIONRGB = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5398:1: FE_FONTSMOOTHINGSTANDARD = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5291:1: FF_DECORATIVE = 80 // /usr/x86_64-w64-mingw32/include/wingdi.h:1203:1: FF_DONTCARE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1195:1: FF_MODERN = 48 // /usr/x86_64-w64-mingw32/include/wingdi.h:1200:1: FF_ROMAN = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1196:1: FF_SCRIPT = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1202:1: FF_SWISS = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1198:1: FIBER_FLAG_FLOAT_SWITCH = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:1192:1: FIEF_FLAG_FORCE_JITUI = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:648:1: FIEF_FLAG_PEEK = 0x2 // /usr/x86_64-w64-mingw32/include/urlmon.h:649:1: FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK = 0x4 // /usr/x86_64-w64-mingw32/include/urlmon.h:650:1: FILENAME_MAX = 260 // /usr/x86_64-w64-mingw32/include/stdio.h:61:1: FILEOKSTRINGA = "commdlg_FileNameOK" // /usr/x86_64-w64-mingw32/include/commdlg.h:489:1: FILEOPENORD = 1536 // /usr/x86_64-w64-mingw32/include/dlgs.h:176:1: FILESYSTEM_STATISTICS_TYPE_FAT = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1571:1: FILESYSTEM_STATISTICS_TYPE_NTFS = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1570:1: FILE_ACTION_ADDED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5040:1: FILE_ACTION_MODIFIED = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnt.h:5042:1: FILE_ACTION_REMOVED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5041:1: FILE_ACTION_RENAMED_NEW_NAME = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnt.h:5044:1: FILE_ACTION_RENAMED_OLD_NAME = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5043:1: FILE_ADD_FILE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4961:1: FILE_ADD_SUBDIRECTORY = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4964:1: FILE_ALL_ACCESS = 2032127 // /usr/x86_64-w64-mingw32/include/winnt.h:4975:1: FILE_ANY_ACCESS = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:147:1: FILE_APPEND_DATA = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4963:1: FILE_ATTRIBUTE_ARCHIVE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:5021:1: FILE_ATTRIBUTE_COMPRESSED = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:5027:1: FILE_ATTRIBUTE_DEVICE = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:5022:1: FILE_ATTRIBUTE_DIRECTORY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:5020:1: FILE_ATTRIBUTE_ENCRYPTED = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:5030:1: FILE_ATTRIBUTE_HIDDEN = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5018:1: FILE_ATTRIBUTE_MASK = 262135 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43157:1: FILE_ATTRIBUTE_NORMAL = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:5023:1: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:5029:1: FILE_ATTRIBUTE_OFFLINE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:5028:1: FILE_ATTRIBUTE_READONLY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5017:1: FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:5026:1: FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:5025:1: FILE_ATTRIBUTE_SYSTEM = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5019:1: FILE_ATTRIBUTE_TEMPORARY = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:5024:1: FILE_ATTRIBUTE_VIRTUAL = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:5031:1: FILE_BEGIN = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:69:1: FILE_CACHE_FLAGS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/memoryapi.h:75:1: FILE_CACHE_MAX_HARD_DISABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/memoryapi.h:77:1: FILE_CACHE_MAX_HARD_ENABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/memoryapi.h:76:1: FILE_CACHE_MIN_HARD_DISABLE = 0x00000008 // /usr/x86_64-w64-mingw32/include/memoryapi.h:79:1: FILE_CACHE_MIN_HARD_ENABLE = 0x00000004 // /usr/x86_64-w64-mingw32/include/memoryapi.h:78:1: FILE_CASE_PRESERVED_NAMES = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5048:1: FILE_CASE_SENSITIVE_SEARCH = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5047:1: FILE_CLEAR_ENCRYPTION = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:1707:1: FILE_COMPLETE_IF_OPLOCKED = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:4996:1: FILE_CREATE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4982:1: FILE_CREATE_PIPE_INSTANCE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4965:1: FILE_CREATE_TREE_CONNECTION = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:4995:1: FILE_CURRENT = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:70:1: FILE_DELETE_CHILD = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4971:1: FILE_DELETE_ON_CLOSE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:5000:1: FILE_DEVICE_8042_PORT = 0x00000027 // /usr/x86_64-w64-mingw32/include/winioctl.h:87:1: FILE_DEVICE_ACPI = 0x00000032 // /usr/x86_64-w64-mingw32/include/winioctl.h:98:1: FILE_DEVICE_BATTERY = 0x00000029 // /usr/x86_64-w64-mingw32/include/winioctl.h:89:1: FILE_DEVICE_BEEP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:49:1: FILE_DEVICE_BIOMETRIC = 0x00000044 // /usr/x86_64-w64-mingw32/include/winioctl.h:114:1: FILE_DEVICE_BLUETOOTH = 0x00000041 // /usr/x86_64-w64-mingw32/include/winioctl.h:111:1: FILE_DEVICE_BUS_EXTENDER = 0x0000002a // /usr/x86_64-w64-mingw32/include/winioctl.h:90:1: FILE_DEVICE_CD_ROM = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:50:1: FILE_DEVICE_CD_ROM_FILE_SYSTEM = 0x00000003 // /usr/x86_64-w64-mingw32/include/winioctl.h:51:1: FILE_DEVICE_CHANGER = 0x00000030 // /usr/x86_64-w64-mingw32/include/winioctl.h:96:1: FILE_DEVICE_CONSOLE = 0x00000050 // /usr/x86_64-w64-mingw32/include/winioctl.h:120:1: FILE_DEVICE_CONTROLLER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:52:1: FILE_DEVICE_CRYPT_PROVIDER = 0x0000003F // /usr/x86_64-w64-mingw32/include/winioctl.h:109:1: FILE_DEVICE_DATALINK = 0x00000005 // /usr/x86_64-w64-mingw32/include/winioctl.h:53:1: FILE_DEVICE_DEVAPI = 0x00000047 // /usr/x86_64-w64-mingw32/include/winioctl.h:117:1: FILE_DEVICE_DFS = 0x00000006 // /usr/x86_64-w64-mingw32/include/winioctl.h:54:1: FILE_DEVICE_DFS_FILE_SYSTEM = 0x00000035 // /usr/x86_64-w64-mingw32/include/winioctl.h:101:1: FILE_DEVICE_DFS_VOLUME = 0x00000036 // /usr/x86_64-w64-mingw32/include/winioctl.h:102:1: FILE_DEVICE_DISK = 0x00000007 // /usr/x86_64-w64-mingw32/include/winioctl.h:55:1: FILE_DEVICE_DISK_FILE_SYSTEM = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:56:1: FILE_DEVICE_DVD = 0x00000033 // /usr/x86_64-w64-mingw32/include/winioctl.h:99:1: FILE_DEVICE_EHSTOR = 0x00000046 // /usr/x86_64-w64-mingw32/include/winioctl.h:116:1: FILE_DEVICE_FILE_SYSTEM = 0x00000009 // /usr/x86_64-w64-mingw32/include/winioctl.h:57:1: FILE_DEVICE_FIPS = 0x0000003A // /usr/x86_64-w64-mingw32/include/winioctl.h:106:1: FILE_DEVICE_FULLSCREEN_VIDEO = 0x00000034 // /usr/x86_64-w64-mingw32/include/winioctl.h:100:1: FILE_DEVICE_GPIO = 0x00000048 // /usr/x86_64-w64-mingw32/include/winioctl.h:118:1: FILE_DEVICE_HOLOGRAPHIC = 0x0000005b // /usr/x86_64-w64-mingw32/include/winioctl.h:131:1: FILE_DEVICE_INFINIBAND = 0x0000003B // /usr/x86_64-w64-mingw32/include/winioctl.h:107:1: FILE_DEVICE_INPORT_PORT = 0x0000000a // /usr/x86_64-w64-mingw32/include/winioctl.h:58:1: FILE_DEVICE_KEYBOARD = 0x0000000b // /usr/x86_64-w64-mingw32/include/winioctl.h:59:1: FILE_DEVICE_KS = 0x0000002f // /usr/x86_64-w64-mingw32/include/winioctl.h:95:1: FILE_DEVICE_KSEC = 0x00000039 // /usr/x86_64-w64-mingw32/include/winioctl.h:105:1: FILE_DEVICE_MAILSLOT = 0x0000000c // /usr/x86_64-w64-mingw32/include/winioctl.h:60:1: FILE_DEVICE_MASS_STORAGE = 0x0000002d // /usr/x86_64-w64-mingw32/include/winioctl.h:93:1: FILE_DEVICE_MIDI_IN = 0x0000000d // /usr/x86_64-w64-mingw32/include/winioctl.h:61:1: FILE_DEVICE_MIDI_OUT = 0x0000000e // /usr/x86_64-w64-mingw32/include/winioctl.h:62:1: FILE_DEVICE_MODEM = 0x0000002b // /usr/x86_64-w64-mingw32/include/winioctl.h:91:1: FILE_DEVICE_MOUSE = 0x0000000f // /usr/x86_64-w64-mingw32/include/winioctl.h:63:1: FILE_DEVICE_MT_COMPOSITE = 0x00000042 // /usr/x86_64-w64-mingw32/include/winioctl.h:112:1: FILE_DEVICE_MT_TRANSPORT = 0x00000043 // /usr/x86_64-w64-mingw32/include/winioctl.h:113:1: FILE_DEVICE_MULTI_UNC_PROVIDER = 0x00000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:64:1: FILE_DEVICE_NAMED_PIPE = 0x00000011 // /usr/x86_64-w64-mingw32/include/winioctl.h:65:1: FILE_DEVICE_NETWORK = 0x00000012 // /usr/x86_64-w64-mingw32/include/winioctl.h:66:1: FILE_DEVICE_NETWORK_BROWSER = 0x00000013 // /usr/x86_64-w64-mingw32/include/winioctl.h:67:1: FILE_DEVICE_NETWORK_FILE_SYSTEM = 0x00000014 // /usr/x86_64-w64-mingw32/include/winioctl.h:68:1: FILE_DEVICE_NETWORK_REDIRECTOR = 0x00000028 // /usr/x86_64-w64-mingw32/include/winioctl.h:88:1: FILE_DEVICE_NFP = 0x00000051 // /usr/x86_64-w64-mingw32/include/winioctl.h:121:1: FILE_DEVICE_NULL = 0x00000015 // /usr/x86_64-w64-mingw32/include/winioctl.h:69:1: FILE_DEVICE_NVDIMM = 0x0000005a // /usr/x86_64-w64-mingw32/include/winioctl.h:130:1: FILE_DEVICE_PARALLEL_PORT = 0x00000016 // /usr/x86_64-w64-mingw32/include/winioctl.h:70:1: FILE_DEVICE_PERSISTENT_MEMORY = 0x00000059 // /usr/x86_64-w64-mingw32/include/winioctl.h:129:1: FILE_DEVICE_PHYSICAL_NETCARD = 0x00000017 // /usr/x86_64-w64-mingw32/include/winioctl.h:71:1: FILE_DEVICE_PMI = 0x00000045 // /usr/x86_64-w64-mingw32/include/winioctl.h:115:1: FILE_DEVICE_POINT_OF_SERVICE = 0x00000054 // /usr/x86_64-w64-mingw32/include/winioctl.h:124:1: FILE_DEVICE_PRINTER = 0x00000018 // /usr/x86_64-w64-mingw32/include/winioctl.h:72:1: FILE_DEVICE_SCANNER = 0x00000019 // /usr/x86_64-w64-mingw32/include/winioctl.h:73:1: FILE_DEVICE_SCREEN = 0x0000001c // /usr/x86_64-w64-mingw32/include/winioctl.h:76:1: FILE_DEVICE_SDFXHCI = 0x0000005c // /usr/x86_64-w64-mingw32/include/winioctl.h:132:1: FILE_DEVICE_SERENUM = 0x00000037 // /usr/x86_64-w64-mingw32/include/winioctl.h:103:1: FILE_DEVICE_SERIAL_MOUSE_PORT = 0x0000001a // /usr/x86_64-w64-mingw32/include/winioctl.h:74:1: FILE_DEVICE_SERIAL_PORT = 0x0000001b // /usr/x86_64-w64-mingw32/include/winioctl.h:75:1: FILE_DEVICE_SMARTCARD = 0x00000031 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:34:1: FILE_DEVICE_SMB = 0x0000002e // /usr/x86_64-w64-mingw32/include/winioctl.h:94:1: FILE_DEVICE_SOUND = 0x0000001d // /usr/x86_64-w64-mingw32/include/winioctl.h:77:1: FILE_DEVICE_STORAGE_REPLICATION = 0x00000055 // /usr/x86_64-w64-mingw32/include/winioctl.h:125:1: FILE_DEVICE_STREAMS = 0x0000001e // /usr/x86_64-w64-mingw32/include/winioctl.h:78:1: FILE_DEVICE_SYSENV = 0x00000052 // /usr/x86_64-w64-mingw32/include/winioctl.h:122:1: FILE_DEVICE_TAPE = 0x0000001f // /usr/x86_64-w64-mingw32/include/winioctl.h:79:1: FILE_DEVICE_TAPE_FILE_SYSTEM = 0x00000020 // /usr/x86_64-w64-mingw32/include/winioctl.h:80:1: FILE_DEVICE_TERMSRV = 0x00000038 // /usr/x86_64-w64-mingw32/include/winioctl.h:104:1: FILE_DEVICE_TRANSPORT = 0x00000021 // /usr/x86_64-w64-mingw32/include/winioctl.h:81:1: FILE_DEVICE_TRUST_ENV = 0x00000056 // /usr/x86_64-w64-mingw32/include/winioctl.h:126:1: FILE_DEVICE_UCM = 0x00000057 // /usr/x86_64-w64-mingw32/include/winioctl.h:127:1: FILE_DEVICE_UCMTCPCI = 0x00000058 // /usr/x86_64-w64-mingw32/include/winioctl.h:128:1: FILE_DEVICE_UCMUCSI = 0x0000005d // /usr/x86_64-w64-mingw32/include/winioctl.h:133:1: FILE_DEVICE_UNKNOWN = 0x00000022 // /usr/x86_64-w64-mingw32/include/winioctl.h:82:1: FILE_DEVICE_USBEX = 0x00000049 // /usr/x86_64-w64-mingw32/include/winioctl.h:119:1: FILE_DEVICE_VDM = 0x0000002c // /usr/x86_64-w64-mingw32/include/winioctl.h:92:1: FILE_DEVICE_VIDEO = 0x00000023 // /usr/x86_64-w64-mingw32/include/winioctl.h:83:1: FILE_DEVICE_VIRTUAL_BLOCK = 0x00000053 // /usr/x86_64-w64-mingw32/include/winioctl.h:123:1: FILE_DEVICE_VIRTUAL_DISK = 0x00000024 // /usr/x86_64-w64-mingw32/include/winioctl.h:84:1: FILE_DEVICE_VMBUS = 0x0000003E // /usr/x86_64-w64-mingw32/include/winioctl.h:108:1: FILE_DEVICE_WAVE_IN = 0x00000025 // /usr/x86_64-w64-mingw32/include/winioctl.h:85:1: FILE_DEVICE_WAVE_OUT = 0x00000026 // /usr/x86_64-w64-mingw32/include/winioctl.h:86:1: FILE_DEVICE_WPD = 0x00000040 // /usr/x86_64-w64-mingw32/include/winioctl.h:110:1: FILE_DIRECTORY_FILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4988:1: FILE_DIR_DISALLOWED = 9 // /usr/x86_64-w64-mingw32/include/winbase.h:1390:1: FILE_ENCRYPTABLE = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:1381:1: FILE_END = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:71:1: FILE_EXECUTE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4969:1: FILE_FILE_COMPRESSION = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:5051:1: FILE_FLAG_BACKUP_SEMANTICS = 0x2000000 // /usr/x86_64-w64-mingw32/include/winbase.h:90:1: FILE_FLAG_DELETE_ON_CLOSE = 0x4000000 // /usr/x86_64-w64-mingw32/include/winbase.h:89:1: FILE_FLAG_FIRST_PIPE_INSTANCE = 0x80000 // /usr/x86_64-w64-mingw32/include/winbase.h:95:1: FILE_FLAG_MASK = 4282122240 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43153:1: FILE_FLAG_NO_BUFFERING = 0x20000000 // /usr/x86_64-w64-mingw32/include/winbase.h:86:1: FILE_FLAG_OPEN_NO_RECALL = 0x100000 // /usr/x86_64-w64-mingw32/include/winbase.h:94:1: FILE_FLAG_OPEN_REPARSE_POINT = 0x200000 // /usr/x86_64-w64-mingw32/include/winbase.h:93:1: FILE_FLAG_OVERLAPPED = 0x40000000 // /usr/x86_64-w64-mingw32/include/winbase.h:85:1: FILE_FLAG_POSIX_SEMANTICS = 0x1000000 // /usr/x86_64-w64-mingw32/include/winbase.h:91:1: FILE_FLAG_RANDOM_ACCESS = 0x10000000 // /usr/x86_64-w64-mingw32/include/winbase.h:87:1: FILE_FLAG_SEQUENTIAL_SCAN = 0x8000000 // /usr/x86_64-w64-mingw32/include/winbase.h:88:1: FILE_FLAG_SESSION_AWARE = 0x800000 // /usr/x86_64-w64-mingw32/include/winbase.h:92:1: FILE_FLAG_WRITE_THROUGH = 0x80000000 // /usr/x86_64-w64-mingw32/include/winbase.h:84:1: FILE_GENERIC_EXECUTE = 1179808 // /usr/x86_64-w64-mingw32/include/winnt.h:4978:1: FILE_GENERIC_READ = 1179785 // /usr/x86_64-w64-mingw32/include/winnt.h:4976:1: FILE_GENERIC_WRITE = 1179926 // /usr/x86_64-w64-mingw32/include/winnt.h:4977:1: FILE_IS_ENCRYPTED = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1382:1: FILE_LIST_DIRECTORY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4958:1: FILE_MAP_ALL_ACCESS = 983071 // /usr/x86_64-w64-mingw32/include/memoryapi.h:39:1: FILE_MAP_COPY = 0x1 // /usr/x86_64-w64-mingw32/include/memoryapi.h:40:1: FILE_MAP_EXECUTE = 32 // /usr/x86_64-w64-mingw32/include/memoryapi.h:73:1: FILE_MAP_LARGE_PAGES = 0x20000000 // /usr/x86_64-w64-mingw32/include/memoryapi.h:43:1: FILE_MAP_READ = 4 // /usr/x86_64-w64-mingw32/include/memoryapi.h:38:1: FILE_MAP_RESERVE = 0x80000000 // /usr/x86_64-w64-mingw32/include/memoryapi.h:41:1: FILE_MAP_TARGETS_INVALID = 0x40000000 // /usr/x86_64-w64-mingw32/include/memoryapi.h:42:1: FILE_MAP_WRITE = 2 // /usr/x86_64-w64-mingw32/include/memoryapi.h:37:1: FILE_MAXIMUM_DISPOSITION = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnt.h:4986:1: FILE_NAMED_STREAMS = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:5059:1: FILE_NAME_NORMALIZED = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:428:1: FILE_NAME_OPENED = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:429:1: FILE_NON_DIRECTORY_FILE = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:4994:1: FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5034:1: FILE_NOTIFY_CHANGE_CREATION = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:5038:1: FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5033:1: FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5032:1: FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:5037:1: FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:5036:1: FILE_NOTIFY_CHANGE_SECURITY = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:5039:1: FILE_NOTIFY_CHANGE_SIZE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:5035:1: FILE_NO_COMPRESSION = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:5003:1: FILE_NO_EA_KNOWLEDGE = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:4997:1: FILE_NO_INTERMEDIATE_BUFFERING = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:4991:1: FILE_OPEN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4981:1: FILE_OPEN_BY_FILE_ID = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:5001:1: FILE_OPEN_FOR_BACKUP_INTENT = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:5002:1: FILE_OPEN_FOR_FREE_SPACE_QUERY = 0x00800000 // /usr/x86_64-w64-mingw32/include/winnt.h:5011:1: FILE_OPEN_IF = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnt.h:4983:1: FILE_OPEN_NO_RECALL = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnt.h:5010:1: FILE_OPEN_REMOTE_INSTANCE = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:4998:1: FILE_OPEN_REPARSE_POINT = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnt.h:5009:1: FILE_OVERWRITE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4984:1: FILE_OVERWRITE_IF = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnt.h:4985:1: FILE_PERSISTENT_ACLS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:5050:1: FILE_PREFETCH_TYPE_FOR_CREATE = 0x1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1550:1: FILE_RANDOM_ACCESS = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:4999:1: FILE_READ_ACCESS = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:149:1: FILE_READ_ATTRIBUTES = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:4972:1: FILE_READ_DATA = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4957:1: FILE_READ_EA = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4967:1: FILE_READ_ONLY = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:1389:1: FILE_READ_ONLY_VOLUME = 0x00080000 // /usr/x86_64-w64-mingw32/include/winnt.h:5060:1: FILE_RESERVE_OPFILTER = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnt.h:5008:1: FILE_ROOT_DIR = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:1384:1: FILE_SEQUENTIAL_ONLY = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4990:1: FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnt.h:5061:1: FILE_SET_ENCRYPTION = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:1706:1: FILE_SHARE_DELETE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5015:1: FILE_SHARE_READ = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5013:1: FILE_SHARE_VALID_FLAGS = 0x00000007 // /usr/x86_64-w64-mingw32/include/winnt.h:5016:1: FILE_SHARE_WRITE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5014:1: FILE_SPECIAL_ACCESS = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:148:1: FILE_SUPERSEDE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4980:1: FILE_SUPPORTS_ENCRYPTION = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:5058:1: FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000 // /usr/x86_64-w64-mingw32/include/winnt.h:5064:1: FILE_SUPPORTS_HARD_LINKS = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnt.h:5063:1: FILE_SUPPORTS_INTEGRITY_STREAMS = 0x04000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5067:1: FILE_SUPPORTS_OBJECT_IDS = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:5057:1: FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5065:1: FILE_SUPPORTS_REMOTE_STORAGE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:5055:1: FILE_SUPPORTS_REPARSE_POINTS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:5054:1: FILE_SUPPORTS_SPARSE_FILES = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:5053:1: FILE_SUPPORTS_TRANSACTIONS = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnt.h:5062:1: FILE_SUPPORTS_USN_JOURNAL = 0x02000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5066:1: FILE_SYNCHRONOUS_IO_ALERT = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:4992:1: FILE_SYNCHRONOUS_IO_NONALERT = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:4993:1: FILE_SYSTEM_ATTR = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:1383:1: FILE_SYSTEM_DIR = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:1385:1: FILE_SYSTEM_NOT_SUPPORT = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:1387:1: FILE_TRAVERSE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4970:1: FILE_TYPE_CHAR = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:461:1: FILE_TYPE_DISK = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:460:1: FILE_TYPE_PIPE = 0x3 // /usr/x86_64-w64-mingw32/include/winbase.h:462:1: FILE_TYPE_REMOTE = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:463:1: FILE_TYPE_UNKNOWN = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:459:1: FILE_UNICODE_ON_DISK = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5049:1: FILE_UNKNOWN = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:1386:1: FILE_USER_DISALLOWED = 7 // /usr/x86_64-w64-mingw32/include/winbase.h:1388:1: FILE_VER_GET_LOCALISED = 0x01 // /usr/x86_64-w64-mingw32/include/winver.h:114:1: FILE_VER_GET_NEUTRAL = 0x02 // /usr/x86_64-w64-mingw32/include/winver.h:115:1: FILE_VER_GET_PREFETCHED = 0x04 // /usr/x86_64-w64-mingw32/include/winver.h:116:1: FILE_VOLUME_IS_COMPRESSED = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:5056:1: FILE_VOLUME_QUOTAS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:5052:1: FILE_WRITE_ACCESS = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:150:1: FILE_WRITE_ATTRIBUTES = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:4973:1: FILE_WRITE_DATA = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4960:1: FILE_WRITE_EA = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4968:1: FILE_WRITE_THROUGH = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4989:1: FINDDLGORD = 1540 // /usr/x86_64-w64-mingw32/include/dlgs.h:180:1: FINDMSGSTRINGA = "commdlg_FindReplace" // /usr/x86_64-w64-mingw32/include/commdlg.h:493:1: FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2737:1: FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2736:1: FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2735:1: FIND_ENDSWITH = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnls.h:140:1: FIND_FIRST_EX_CASE_SENSITIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/minwinbase.h:108:1: FIND_FIRST_EX_LARGE_FETCH = 0x00000002 // /usr/x86_64-w64-mingw32/include/minwinbase.h:109:1: FIND_FROMEND = 0x00800000 // /usr/x86_64-w64-mingw32/include/winnls.h:142:1: FIND_FROMSTART = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnls.h:141:1: FIND_RESOURCE_DIRECTORY_LANGUAGES = 1024 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:49:1: FIND_RESOURCE_DIRECTORY_NAMES = 512 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:48:1: FIND_RESOURCE_DIRECTORY_TYPES = 256 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:47:1: FIND_STARTSWITH = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnls.h:139:1: FIRMWARE_PTR = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:18:1: FIXED_PITCH = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1152:1: FKF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5652:1: FKF_CLICKON = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:5657:1: FKF_CONFIRMHOTKEY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5654:1: FKF_FILTERKEYSON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5651:1: FKF_HOTKEYACTIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5653:1: FKF_HOTKEYSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5655:1: FKF_INDICATOR = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5656:1: FLAG_SIGNED = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29490:1: FLAG_STRING = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29491:1: FLASHW_ALL = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:2261:1: FLASHW_CAPTION = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2259:1: FLASHW_STOP = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:2258:1: FLASHW_TIMER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2262:1: FLASHW_TIMERNOFG = 0x0000000c // /usr/x86_64-w64-mingw32/include/winuser.h:2263:1: FLASHW_TRAY = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2260:1: FLI_GLYPHS = 262144 // /usr/x86_64-w64-mingw32/include/wingdi.h:2627:1: FLI_MASK = 0x103B // /usr/x86_64-w64-mingw32/include/wingdi.h:2624:1: FLOODFILLBORDER = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1663:1: FLOODFILLSURFACE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1664:1: FLS_MAXIMUM_AVAILABLE = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:4098:1: FLUSHOUTPUT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:239:1: FMFD_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:665:1: FMFD_RESPECTTEXTPLAIN = 0x10 // /usr/x86_64-w64-mingw32/include/urlmon.h:673:1: FMFD_RETURNUPDATEDIMGMIMES = 0x20 // /usr/x86_64-w64-mingw32/include/urlmon.h:674:1: FMFD_SERVERMIME = 0x8 // /usr/x86_64-w64-mingw32/include/urlmon.h:672:1: FMFD_URLASFILENAME = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:666:1: FNERR_BUFFERTOOSMALL = 0x3003 // /usr/x86_64-w64-mingw32/include/cderr.h:46:1: FNERR_FILENAMECODES = 0x3000 // /usr/x86_64-w64-mingw32/include/cderr.h:43:1: FNERR_INVALIDFILENAME = 0x3002 // /usr/x86_64-w64-mingw32/include/cderr.h:45:1: FNERR_SUBCLASSFAILURE = 0x3001 // /usr/x86_64-w64-mingw32/include/cderr.h:44:1: FNOINVERT = 0x02 // /usr/x86_64-w64-mingw32/include/winuser.h:1811:1: FOCUS_EVENT = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:109:1: FOF_ALLOWUNDO = 0x40 // /usr/x86_64-w64-mingw32/include/shellapi.h:169:1: FOF_CONFIRMMOUSE = 0x2 // /usr/x86_64-w64-mingw32/include/shellapi.h:164:1: FOF_FILESONLY = 0x80 // /usr/x86_64-w64-mingw32/include/shellapi.h:170:1: FOF_MULTIDESTFILES = 0x1 // /usr/x86_64-w64-mingw32/include/shellapi.h:163:1: FOF_NOCONFIRMATION = 0x10 // /usr/x86_64-w64-mingw32/include/shellapi.h:167:1: FOF_NOCONFIRMMKDIR = 0x200 // /usr/x86_64-w64-mingw32/include/shellapi.h:172:1: FOF_NOCOPYSECURITYATTRIBS = 0x800 // /usr/x86_64-w64-mingw32/include/shellapi.h:174:1: FOF_NOERRORUI = 0x400 // /usr/x86_64-w64-mingw32/include/shellapi.h:173:1: FOF_NORECURSEREPARSE = 0x8000 // /usr/x86_64-w64-mingw32/include/shellapi.h:178:1: FOF_NORECURSION = 0x1000 // /usr/x86_64-w64-mingw32/include/shellapi.h:175:1: FOF_NO_CONNECTED_ELEMENTS = 0x2000 // /usr/x86_64-w64-mingw32/include/shellapi.h:176:1: FOF_NO_UI = 1556 // /usr/x86_64-w64-mingw32/include/shellapi.h:180:1: FOF_RENAMEONCOLLISION = 0x8 // /usr/x86_64-w64-mingw32/include/shellapi.h:166:1: FOF_SILENT = 0x4 // /usr/x86_64-w64-mingw32/include/shellapi.h:165:1: FOF_SIMPLEPROGRESS = 0x100 // /usr/x86_64-w64-mingw32/include/shellapi.h:171:1: FOF_WANTMAPPINGHANDLE = 0x20 // /usr/x86_64-w64-mingw32/include/shellapi.h:168:1: FOF_WANTNUKEWARNING = 0x4000 // /usr/x86_64-w64-mingw32/include/shellapi.h:177:1: FONTDLGORD = 1542 // /usr/x86_64-w64-mingw32/include/dlgs.h:182:1: FONTMAPPER_MAX = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:3485:1: FOPEN_MAX = 20 // /usr/x86_64-w64-mingw32/include/stdio.h:62:1: FOREGROUND_BLUE = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:119:1: FOREGROUND_GREEN = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:120:1: FOREGROUND_INTENSITY = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:122:1: FOREGROUND_RED = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:121:1: FOREST_USER_RID_MAX = 499 // /usr/x86_64-w64-mingw32/include/winnt.h:3080:1: FORMATDLGORD30 = 1544 // /usr/x86_64-w64-mingw32/include/dlgs.h:184:1: FORMATDLGORD31 = 1543 // /usr/x86_64-w64-mingw32/include/dlgs.h:183:1: FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100 // /usr/x86_64-w64-mingw32/include/winbase.h:1392:1: FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000 // /usr/x86_64-w64-mingw32/include/winbase.h:1373:1: FORMAT_MESSAGE_FROM_HMODULE = 0x00000800 // /usr/x86_64-w64-mingw32/include/winbase.h:1371:1: FORMAT_MESSAGE_FROM_STRING = 0x00000400 // /usr/x86_64-w64-mingw32/include/winbase.h:1370:1: FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000 // /usr/x86_64-w64-mingw32/include/winbase.h:1372:1: FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200 // /usr/x86_64-w64-mingw32/include/winbase.h:1369:1: FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000ff // /usr/x86_64-w64-mingw32/include/winbase.h:1374:1: FORM_BUILTIN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:627:1: FORM_PRINTER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:628:1: FORM_USER = 0x00000000 // /usr/x86_64-w64-mingw32/include/winspool.h:626:1: FO_COPY = 0x2 // /usr/x86_64-w64-mingw32/include/shellapi.h:159:1: FO_DELETE = 0x3 // /usr/x86_64-w64-mingw32/include/shellapi.h:160:1: FO_MOVE = 0x1 // /usr/x86_64-w64-mingw32/include/shellapi.h:158:1: FO_RENAME = 0x4 // /usr/x86_64-w64-mingw32/include/shellapi.h:161:1: FP_INFINITE = 1280 // /usr/x86_64-w64-mingw32/include/math.h:385:1: FP_NAN = 0x0100 // /usr/x86_64-w64-mingw32/include/math.h:383:1: FP_NDENORM = 16 // /usr/x86_64-w64-mingw32/include/math.h:324:1: FP_NINF = 4 // /usr/x86_64-w64-mingw32/include/math.h:322:1: FP_NNORM = 8 // /usr/x86_64-w64-mingw32/include/math.h:328:1: FP_NORMAL = 0x0400 // /usr/x86_64-w64-mingw32/include/math.h:384:1: FP_NZERO = 32 // /usr/x86_64-w64-mingw32/include/math.h:326:1: FP_PDENORM = 128 // /usr/x86_64-w64-mingw32/include/math.h:325:1: FP_PINF = 512 // /usr/x86_64-w64-mingw32/include/math.h:323:1: FP_PNORM = 256 // /usr/x86_64-w64-mingw32/include/math.h:329:1: FP_PZERO = 64 // /usr/x86_64-w64-mingw32/include/math.h:327:1: FP_QNAN = 2 // /usr/x86_64-w64-mingw32/include/math.h:321:1: FP_SNAN = 1 // /usr/x86_64-w64-mingw32/include/math.h:320:1: FP_SUBNORMAL = 17408 // /usr/x86_64-w64-mingw32/include/math.h:387:1: FP_ZERO = 0x4000 // /usr/x86_64-w64-mingw32/include/math.h:386:1: FRAME_FPO = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7501:1: FRAME_NONFPO = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7504:1: FRAME_TRAP = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7502:1: FRAME_TSS = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7503:1: FRERR_BUFFERLENGTHZERO = 0x4001 // /usr/x86_64-w64-mingw32/include/cderr.h:49:1: FRERR_FINDREPLACECODES = 0x4000 // /usr/x86_64-w64-mingw32/include/cderr.h:48:1: FROM_LEFT_1ST_BUTTON_PRESSED = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:69:1: FROM_LEFT_2ND_BUTTON_PRESSED = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:71:1: FROM_LEFT_3RD_BUTTON_PRESSED = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:72:1: FROM_LEFT_4TH_BUTTON_PRESSED = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:73:1: FRS_ERR_AUTHENTICATION = 8008 // /usr/x86_64-w64-mingw32/include/winerror.h:1145:1: FRS_ERR_CHILD_TO_PARENT_COMM = 8011 // /usr/x86_64-w64-mingw32/include/winerror.h:1148:1: FRS_ERR_INSUFFICIENT_PRIV = 8007 // /usr/x86_64-w64-mingw32/include/winerror.h:1144:1: FRS_ERR_INTERNAL = 8005 // /usr/x86_64-w64-mingw32/include/winerror.h:1142:1: FRS_ERR_INTERNAL_API = 8004 // /usr/x86_64-w64-mingw32/include/winerror.h:1141:1: FRS_ERR_INVALID_API_SEQUENCE = 8001 // /usr/x86_64-w64-mingw32/include/winerror.h:1138:1: FRS_ERR_INVALID_SERVICE_PARAMETER = 8017 // /usr/x86_64-w64-mingw32/include/winerror.h:1154:1: FRS_ERR_PARENT_AUTHENTICATION = 8010 // /usr/x86_64-w64-mingw32/include/winerror.h:1147:1: FRS_ERR_PARENT_INSUFFICIENT_PRIV = 8009 // /usr/x86_64-w64-mingw32/include/winerror.h:1146:1: FRS_ERR_PARENT_TO_CHILD_COMM = 8012 // /usr/x86_64-w64-mingw32/include/winerror.h:1149:1: FRS_ERR_SERVICE_COMM = 8006 // /usr/x86_64-w64-mingw32/include/winerror.h:1143:1: FRS_ERR_STARTING_SERVICE = 8002 // /usr/x86_64-w64-mingw32/include/winerror.h:1139:1: FRS_ERR_STOPPING_SERVICE = 8003 // /usr/x86_64-w64-mingw32/include/winerror.h:1140:1: FRS_ERR_SYSVOL_DEMOTE = 8016 // /usr/x86_64-w64-mingw32/include/winerror.h:1153:1: FRS_ERR_SYSVOL_IS_BUSY = 8015 // /usr/x86_64-w64-mingw32/include/winerror.h:1152:1: FRS_ERR_SYSVOL_POPULATE = 8013 // /usr/x86_64-w64-mingw32/include/winerror.h:1150:1: FRS_ERR_SYSVOL_POPULATE_TIMEOUT = 8014 // /usr/x86_64-w64-mingw32/include/winerror.h:1151:1: FR_DIALOGTERM = 0x40 // /usr/x86_64-w64-mingw32/include/commdlg.h:361:1: FR_DOWN = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:355:1: FR_ENABLEHOOK = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:363:1: FR_ENABLETEMPLATE = 0x200 // /usr/x86_64-w64-mingw32/include/commdlg.h:364:1: FR_ENABLETEMPLATEHANDLE = 0x2000 // /usr/x86_64-w64-mingw32/include/commdlg.h:368:1: FR_FINDNEXT = 0x8 // /usr/x86_64-w64-mingw32/include/commdlg.h:358:1: FR_HIDEMATCHCASE = 0x8000 // /usr/x86_64-w64-mingw32/include/commdlg.h:370:1: FR_HIDEUPDOWN = 0x4000 // /usr/x86_64-w64-mingw32/include/commdlg.h:369:1: FR_HIDEWHOLEWORD = 0x10000 // /usr/x86_64-w64-mingw32/include/commdlg.h:371:1: FR_MATCHALEFHAMZA = 0x80000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:375:1: FR_MATCHCASE = 0x4 // /usr/x86_64-w64-mingw32/include/commdlg.h:357:1: FR_MATCHDIAC = 0x20000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:373:1: FR_MATCHKASHIDA = 0x40000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:374:1: FR_NOMATCHCASE = 0x800 // /usr/x86_64-w64-mingw32/include/commdlg.h:366:1: FR_NOT_ENUM = 0x20 // /usr/x86_64-w64-mingw32/include/wingdi.h:3063:1: FR_NOUPDOWN = 0x400 // /usr/x86_64-w64-mingw32/include/commdlg.h:365:1: FR_NOWHOLEWORD = 0x1000 // /usr/x86_64-w64-mingw32/include/commdlg.h:367:1: FR_PRIVATE = 0x10 // /usr/x86_64-w64-mingw32/include/wingdi.h:3062:1: FR_RAW = 0x20000 // /usr/x86_64-w64-mingw32/include/commdlg.h:372:1: FR_REPLACE = 0x10 // /usr/x86_64-w64-mingw32/include/commdlg.h:359:1: FR_REPLACEALL = 0x20 // /usr/x86_64-w64-mingw32/include/commdlg.h:360:1: FR_SHOWHELP = 0x80 // /usr/x86_64-w64-mingw32/include/commdlg.h:362:1: FR_WHOLEWORD = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:356:1: FSCTL_ALLOW_EXTENDED_DASD_IO = 589955 // /usr/x86_64-w64-mingw32/include/winioctl.h:1300:1: FSCTL_CREATE_OR_GET_OBJECT_ID = 590016 // /usr/x86_64-w64-mingw32/include/winioctl.h:1312:1: FSCTL_CREATE_USN_JOURNAL = 590055 // /usr/x86_64-w64-mingw32/include/winioctl.h:1320:1: FSCTL_DELETE_OBJECT_ID = 589984 // /usr/x86_64-w64-mingw32/include/winioctl.h:1304:1: FSCTL_DELETE_REPARSE_POINT = 589996 // /usr/x86_64-w64-mingw32/include/winioctl.h:1307:1: FSCTL_DELETE_USN_JOURNAL = 590072 // /usr/x86_64-w64-mingw32/include/winioctl.h:1325:1: FSCTL_DISMOUNT_VOLUME = 589856 // /usr/x86_64-w64-mingw32/include/winioctl.h:1278:1: FSCTL_ENCRYPTION_FSCTL_IO = 590043 // /usr/x86_64-w64-mingw32/include/winioctl.h:1317:1: FSCTL_ENUM_USN_DATA = 590003 // /usr/x86_64-w64-mingw32/include/winioctl.h:1308:1: FSCTL_EXTEND_VOLUME = 590064 // /usr/x86_64-w64-mingw32/include/winioctl.h:1323:1: FSCTL_FILESYSTEM_GET_STATISTICS = 589920 // /usr/x86_64-w64-mingw32/include/winioctl.h:1293:1: FSCTL_FILE_PREFETCH = 590112 // /usr/x86_64-w64-mingw32/include/winioctl.h:1333:1: FSCTL_FIND_FILES_BY_SID = 589967 // /usr/x86_64-w64-mingw32/include/winioctl.h:1301:1: FSCTL_GET_COMPRESSION = 589884 // /usr/x86_64-w64-mingw32/include/winioctl.h:1285:1: FSCTL_GET_NTFS_FILE_RECORD = 589928 // /usr/x86_64-w64-mingw32/include/winioctl.h:1295:1: FSCTL_GET_NTFS_VOLUME_DATA = 589924 // /usr/x86_64-w64-mingw32/include/winioctl.h:1294:1: FSCTL_GET_OBJECT_ID = 589980 // /usr/x86_64-w64-mingw32/include/winioctl.h:1303:1: FSCTL_GET_REPARSE_POINT = 589992 // /usr/x86_64-w64-mingw32/include/winioctl.h:1306:1: FSCTL_GET_RETRIEVAL_POINTERS = 589939 // /usr/x86_64-w64-mingw32/include/winioctl.h:1297:1: FSCTL_GET_VOLUME_BITMAP = 589935 // /usr/x86_64-w64-mingw32/include/winioctl.h:1296:1: FSCTL_HSM_DATA = 639251 // /usr/x86_64-w64-mingw32/include/winioctl.h:1330:1: FSCTL_HSM_MSG = 639240 // /usr/x86_64-w64-mingw32/include/winioctl.h:1329:1: FSCTL_INVALIDATE_VOLUMES = 589908 // /usr/x86_64-w64-mingw32/include/winioctl.h:1290:1: FSCTL_IS_PATHNAME_VALID = 589868 // /usr/x86_64-w64-mingw32/include/winioctl.h:1281:1: FSCTL_IS_VOLUME_DIRTY = 589944 // /usr/x86_64-w64-mingw32/include/winioctl.h:1299:1: FSCTL_IS_VOLUME_MOUNTED = 589864 // /usr/x86_64-w64-mingw32/include/winioctl.h:1280:1: FSCTL_LOCK_VOLUME = 589848 // /usr/x86_64-w64-mingw32/include/winioctl.h:1276:1: FSCTL_MARK_AS_SYSTEM_HIVE = 589903 // /usr/x86_64-w64-mingw32/include/winioctl.h:1288:1: FSCTL_MARK_HANDLE = 590076 // /usr/x86_64-w64-mingw32/include/winioctl.h:1326:1: FSCTL_MARK_VOLUME_DIRTY = 589872 // /usr/x86_64-w64-mingw32/include/winioctl.h:1282:1: FSCTL_MOVE_FILE = 589940 // /usr/x86_64-w64-mingw32/include/winioctl.h:1298:1: FSCTL_OPBATCH_ACK_CLOSE_PENDING = 589840 // /usr/x86_64-w64-mingw32/include/winioctl.h:1274:1: FSCTL_OPLOCK_BREAK_ACKNOWLEDGE = 589836 // /usr/x86_64-w64-mingw32/include/winioctl.h:1273:1: FSCTL_OPLOCK_BREAK_ACK_NO_2 = 589904 // /usr/x86_64-w64-mingw32/include/winioctl.h:1289:1: FSCTL_OPLOCK_BREAK_NOTIFY = 589844 // /usr/x86_64-w64-mingw32/include/winioctl.h:1275:1: FSCTL_QUERY_ALLOCATED_RANGES = 606415 // /usr/x86_64-w64-mingw32/include/winioctl.h:1315:1: FSCTL_QUERY_FAT_BPB = 589912 // /usr/x86_64-w64-mingw32/include/winioctl.h:1291:1: FSCTL_QUERY_RETRIEVAL_POINTERS = 589883 // /usr/x86_64-w64-mingw32/include/winioctl.h:1284:1: FSCTL_QUERY_USN_JOURNAL = 590068 // /usr/x86_64-w64-mingw32/include/winioctl.h:1324:1: FSCTL_READ_FILE_USN_DATA = 590059 // /usr/x86_64-w64-mingw32/include/winioctl.h:1321:1: FSCTL_READ_FROM_PLEX = 606494 // /usr/x86_64-w64-mingw32/include/winioctl.h:1332:1: FSCTL_READ_RAW_ENCRYPTED = 590051 // /usr/x86_64-w64-mingw32/include/winioctl.h:1319:1: FSCTL_READ_USN_JOURNAL = 590011 // /usr/x86_64-w64-mingw32/include/winioctl.h:1310:1: FSCTL_RECALL_FILE = 590103 // /usr/x86_64-w64-mingw32/include/winioctl.h:1331:1: FSCTL_REQUEST_BATCH_OPLOCK = 589832 // /usr/x86_64-w64-mingw32/include/winioctl.h:1272:1: FSCTL_REQUEST_FILTER_OPLOCK = 589916 // /usr/x86_64-w64-mingw32/include/winioctl.h:1292:1: FSCTL_REQUEST_OPLOCK_LEVEL_1 = 589824 // /usr/x86_64-w64-mingw32/include/winioctl.h:1270:1: FSCTL_REQUEST_OPLOCK_LEVEL_2 = 589828 // /usr/x86_64-w64-mingw32/include/winioctl.h:1271:1: FSCTL_SECURITY_ID_CHECK = 606391 // /usr/x86_64-w64-mingw32/include/winioctl.h:1309:1: FSCTL_SET_COMPRESSION = 639040 // /usr/x86_64-w64-mingw32/include/winioctl.h:1286:1: FSCTL_SET_ENCRYPTION = 590039 // /usr/x86_64-w64-mingw32/include/winioctl.h:1316:1: FSCTL_SET_OBJECT_ID = 589976 // /usr/x86_64-w64-mingw32/include/winioctl.h:1302:1: FSCTL_SET_OBJECT_ID_EXTENDED = 590012 // /usr/x86_64-w64-mingw32/include/winioctl.h:1311:1: FSCTL_SET_REPARSE_POINT = 589988 // /usr/x86_64-w64-mingw32/include/winioctl.h:1305:1: FSCTL_SET_SPARSE = 590020 // /usr/x86_64-w64-mingw32/include/winioctl.h:1313:1: FSCTL_SET_ZERO_DATA = 622792 // /usr/x86_64-w64-mingw32/include/winioctl.h:1314:1: FSCTL_SIS_COPYFILE = 590080 // /usr/x86_64-w64-mingw32/include/winioctl.h:1327:1: FSCTL_SIS_LINK_FILES = 639236 // /usr/x86_64-w64-mingw32/include/winioctl.h:1328:1: FSCTL_UNLOCK_VOLUME = 589852 // /usr/x86_64-w64-mingw32/include/winioctl.h:1277:1: FSCTL_WRITE_RAW_ENCRYPTED = 590047 // /usr/x86_64-w64-mingw32/include/winioctl.h:1318:1: FSCTL_WRITE_USN_CLOSE_RECORD = 590063 // /usr/x86_64-w64-mingw32/include/winioctl.h:1322:1: FSHIFT = 0x04 // /usr/x86_64-w64-mingw32/include/winuser.h:1812:1: FS_ARABIC = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1184:1: FS_BALTIC = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1185:1: FS_CASE_IS_PRESERVED = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:593:1: FS_CASE_SENSITIVE = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:594:1: FS_CHINESESIMP = 262144 // /usr/x86_64-w64-mingw32/include/wingdi.h:1189:1: FS_CHINESETRAD = 1048576 // /usr/x86_64-w64-mingw32/include/wingdi.h:1191:1: FS_CYRILLIC = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1180:1: FS_FILE_COMPRESSION = 16 // /usr/x86_64-w64-mingw32/include/winbase.h:598:1: FS_FILE_ENCRYPTION = 131072 // /usr/x86_64-w64-mingw32/include/winbase.h:599:1: FS_GREEK = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1181:1: FS_HEBREW = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1183:1: FS_JISJAPAN = 131072 // /usr/x86_64-w64-mingw32/include/wingdi.h:1188:1: FS_JOHAB = 2097152 // /usr/x86_64-w64-mingw32/include/wingdi.h:1192:1: FS_LATIN1 = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1178:1: FS_LATIN2 = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1179:1: FS_PERSISTENT_ACLS = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:596:1: FS_SYMBOL = 2147483648 // /usr/x86_64-w64-mingw32/include/wingdi.h:1193:1: FS_THAI = 65536 // /usr/x86_64-w64-mingw32/include/wingdi.h:1187:1: FS_TURKISH = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1182:1: FS_UNICODE_STORED_ON_DISK = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:595:1: FS_VIETNAMESE = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1186:1: FS_VOL_IS_COMPRESSED = 32768 // /usr/x86_64-w64-mingw32/include/winbase.h:597:1: FS_WANSUNG = 524288 // /usr/x86_64-w64-mingw32/include/wingdi.h:1190:1: FTS5CSR_EOF = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231938:1: FTS5CSR_FREE_ZRANK = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231942:1: FTS5CSR_REQUIRE_CONTENT = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231939:1: FTS5CSR_REQUIRE_DOCSIZE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231940:1: FTS5CSR_REQUIRE_INST = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231941:1: FTS5CSR_REQUIRE_POSLIST = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231944:1: FTS5CSR_REQUIRE_RESEEK = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231943:1: FTS5INDEX_QUERY_DESC = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217202:1: FTS5INDEX_QUERY_NOOUTPUT = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217210:1: FTS5INDEX_QUERY_PREFIX = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217201:1: FTS5INDEX_QUERY_SCAN = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217204:1: FTS5INDEX_QUERY_SKIPEMPTY = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217209:1: FTS5INDEX_QUERY_TEST_NOIDX = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217203:1: FTS5_AND = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217685:1: FTS5_AVERAGES_ROWID = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225111:1: FTS5_BI_MATCH = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231925:1: FTS5_BI_ORDER_DESC = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231933:1: FTS5_BI_ORDER_RANK = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231931:1: FTS5_BI_ORDER_ROWID = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231932:1: FTS5_BI_RANK = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231926:1: FTS5_BI_ROWID_EQ = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231927:1: FTS5_BI_ROWID_GE = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231929:1: FTS5_BI_ROWID_LE = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:231928:1: FTS5_CARET = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217695:1: FTS5_COLON = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217688:1: FTS5_COMMA = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217696:1: FTS5_CONTENT_EXTERNAL = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217049:1: FTS5_CONTENT_NONE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217048:1: FTS5_CONTENT_NORMAL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217047:1: FTS5_CORRUPT = 267 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216917:1: FTS5_CURRENT_VERSION = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217045:1: FTS5_DATA_DLI_B = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225126:1: FTS5_DATA_HEIGHT_B = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225127:1: FTS5_DATA_ID_B = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225125:1: FTS5_DATA_PADDING = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225151:1: FTS5_DATA_PAGE_B = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225128:1: FTS5_DATA_ZERO_PADDING = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225150:1: FTS5_DEFAULT_AUTOMERGE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220322:1: FTS5_DEFAULT_CRISISMERGE = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220324:1: FTS5_DEFAULT_HASHSIZE = 1048576 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220325:1: FTS5_DEFAULT_NEARDIST = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216906:1: FTS5_DEFAULT_PAGE_SIZE = 4050 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220321:1: FTS5_DEFAULT_RANK = "bm25" // testdata/sqlite-amalgamation-3380500/sqlite3.c:216907:1: FTS5_DEFAULT_USERMERGE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220323:1: FTS5_DETAIL_COLUMNS = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217053:1: FTS5_DETAIL_FULL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217051:1: FTS5_DETAIL_NONE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217052:1: FTS5_EOF = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:221291:1: FTS5_LCP = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217690:1: FTS5_LP = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217693:1: FTS5_MAIN_PREFIX = 48 // testdata/sqlite-amalgamation-3380500/sqlite3.c:224949:1: FTS5_MAX_PAGE_SIZE = 65536 // testdata/sqlite-amalgamation-3380500/sqlite3.c:220328:1: FTS5_MAX_PREFIX_INDEXES = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216899:1: FTS5_MAX_SEGMENT = 2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216904:1: FTS5_MAX_TOKEN_SIZE = 32768 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216892:1: FTS5_MERGE_NLIST = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:229960:1: FTS5_MINUS = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217689:1: FTS5_MIN_DLIDX_SIZE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:224947:1: FTS5_NOT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217686:1: FTS5_OPT_WORK_UNIT = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:224944:1: FTS5_OR = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217684:1: FTS5_PATTERN_GLOB = 66 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217057:1: FTS5_PATTERN_LIKE = 65 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217056:1: FTS5_PATTERN_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217055:1: FTS5_PLAN_MATCH = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232164:1: FTS5_PLAN_ROWID = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232169:1: FTS5_PLAN_SCAN = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232168:1: FTS5_PLAN_SORTED_MATCH = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232167:1: FTS5_PLAN_SOURCE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232165:1: FTS5_PLAN_SPECIAL = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:232166:1: FTS5_PLUS = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217697:1: FTS5_PORTER_MAX_TOKEN = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:236362:1: FTS5_RANK_NAME = "rank" // testdata/sqlite-amalgamation-3380500/sqlite3.c:216910:1: FTS5_RCP = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217691:1: FTS5_REMOVE_DIACRITICS_COMPLEX = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:236061:1: FTS5_REMOVE_DIACRITICS_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:236059:1: FTS5_REMOVE_DIACRITICS_SIMPLE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:236060:1: FTS5_ROWID_NAME = "rowid" // testdata/sqlite-amalgamation-3380500/sqlite3.c:216911:1: FTS5_RP = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217694:1: FTS5_SEGITER_ONETERM = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225367:1: FTS5_SEGITER_REVERSE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225368:1: FTS5_STAR = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217698:1: FTS5_STMT_DELETE_CONTENT = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234686:1: FTS5_STMT_DELETE_DOCSIZE = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234688:1: FTS5_STMT_INSERT_CONTENT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234684:1: FTS5_STMT_LOOKUP = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217469:1: FTS5_STMT_LOOKUP_DOCSIZE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234689:1: FTS5_STMT_REPLACE_CONFIG = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234690:1: FTS5_STMT_REPLACE_CONTENT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234685:1: FTS5_STMT_REPLACE_DOCSIZE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234687:1: FTS5_STMT_SCAN = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234691:1: FTS5_STMT_SCAN_ASC = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217467:1: FTS5_STMT_SCAN_DESC = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217468:1: FTS5_STRING = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217692:1: FTS5_STRUCTURE_ROWID = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:225112:1: FTS5_TERM = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217687:1: FTS5_TOKENIZE_AUX = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13058:1: FTS5_TOKENIZE_DOCUMENT = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13057:1: FTS5_TOKENIZE_PREFIX = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13056:1: FTS5_TOKENIZE_QUERY = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13055:1: FTS5_TOKEN_COLOCATED = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13062:1: FTS5_VOCAB_COL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238436:1: FTS5_VOCAB_COL_SCHEMA = "term, col, doc, cnt" // testdata/sqlite-amalgamation-3380500/sqlite3.c:238440:1: FTS5_VOCAB_INSTANCE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238438:1: FTS5_VOCAB_INST_SCHEMA = "term, doc, col, offset" // testdata/sqlite-amalgamation-3380500/sqlite3.c:238442:1: FTS5_VOCAB_ROW = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238437:1: FTS5_VOCAB_ROW_SCHEMA = "term, doc, cnt" // testdata/sqlite-amalgamation-3380500/sqlite3.c:238441:1: FTS5_VOCAB_TERM_EQ = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238447:1: FTS5_VOCAB_TERM_GE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238448:1: FTS5_VOCAB_TERM_LE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:238449:1: FTS5_WORK_UNIT = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:224945:1: FULLY_WITHIN = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10803:1: FUNC_PERFECT_MATCH = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:119879:1: FVIRTKEY = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1810:1: FW_BLACK = 900 // /usr/x86_64-w64-mingw32/include/wingdi.h:1220:1: FW_BOLD = 700 // /usr/x86_64-w64-mingw32/include/wingdi.h:1212:1: FW_DEMIBOLD = 600 // /usr/x86_64-w64-mingw32/include/wingdi.h:1218:1: FW_DONTCARE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1205:1: FW_EXTRABOLD = 800 // /usr/x86_64-w64-mingw32/include/wingdi.h:1213:1: FW_EXTRALIGHT = 200 // /usr/x86_64-w64-mingw32/include/wingdi.h:1207:1: FW_HEAVY = 900 // /usr/x86_64-w64-mingw32/include/wingdi.h:1214:1: FW_LIGHT = 300 // /usr/x86_64-w64-mingw32/include/wingdi.h:1208:1: FW_MEDIUM = 500 // /usr/x86_64-w64-mingw32/include/wingdi.h:1210:1: FW_NORMAL = 400 // /usr/x86_64-w64-mingw32/include/wingdi.h:1209:1: FW_REGULAR = 400 // /usr/x86_64-w64-mingw32/include/wingdi.h:1217:1: FW_SEMIBOLD = 600 // /usr/x86_64-w64-mingw32/include/wingdi.h:1211:1: FW_THIN = 100 // /usr/x86_64-w64-mingw32/include/wingdi.h:1206:1: FW_ULTRABOLD = 800 // /usr/x86_64-w64-mingw32/include/wingdi.h:1219:1: FW_ULTRALIGHT = 200 // /usr/x86_64-w64-mingw32/include/wingdi.h:1216:1: GA_PARENT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6251:1: GA_ROOT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6252:1: GA_ROOTOWNER = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:6253:1: GB2312_CHARSET = 134 // /usr/x86_64-w64-mingw32/include/wingdi.h:1162:1: GCC_VERSION = 10000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:218:1: GCLP_HBRBACKGROUND = -10 // /usr/x86_64-w64-mingw32/include/winuser.h:1018:1: GCLP_HCURSOR = -12 // /usr/x86_64-w64-mingw32/include/winuser.h:1019:1: GCLP_HICON = -14 // /usr/x86_64-w64-mingw32/include/winuser.h:1020:1: GCLP_HICONSM = -34 // /usr/x86_64-w64-mingw32/include/winuser.h:1023:1: GCLP_HMODULE = -16 // /usr/x86_64-w64-mingw32/include/winuser.h:1021:1: GCLP_MENUNAME = -8 // /usr/x86_64-w64-mingw32/include/winuser.h:1017:1: GCLP_WNDPROC = -24 // /usr/x86_64-w64-mingw32/include/winuser.h:1022:1: GCL_CBCLSEXTRA = -20 // /usr/x86_64-w64-mingw32/include/winuser.h:1001:1: GCL_CBWNDEXTRA = -18 // /usr/x86_64-w64-mingw32/include/winuser.h:1000:1: GCL_CONVERSION = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:387:1: GCL_REVERSECONVERSION = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:388:1: GCL_REVERSE_LENGTH = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:389:1: GCL_STYLE = -26 // /usr/x86_64-w64-mingw32/include/winuser.h:1003:1: GCPCLASS_ARABIC = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2640:1: GCPCLASS_HEBREW = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2639:1: GCPCLASS_LATIN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2638:1: GCPCLASS_LATINNUMBER = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:2643:1: GCPCLASS_LATINNUMERICSEPARATOR = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:2645:1: GCPCLASS_LATINNUMERICTERMINATOR = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:2644:1: GCPCLASS_LOCALNUMBER = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2642:1: GCPCLASS_NEUTRAL = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2641:1: GCPCLASS_NUMERICSEPARATOR = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:2646:1: GCPCLASS_POSTBOUNDLTR = 0x20 // /usr/x86_64-w64-mingw32/include/wingdi.h:2649:1: GCPCLASS_POSTBOUNDRTL = 0x10 // /usr/x86_64-w64-mingw32/include/wingdi.h:2650:1: GCPCLASS_PREBOUNDLTR = 0x80 // /usr/x86_64-w64-mingw32/include/wingdi.h:2647:1: GCPCLASS_PREBOUNDRTL = 0x40 // /usr/x86_64-w64-mingw32/include/wingdi.h:2648:1: GCPGLYPH_LINKAFTER = 0x4000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2653:1: GCPGLYPH_LINKBEFORE = 0x8000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2652:1: GCP_CLASSIN = 524288 // /usr/x86_64-w64-mingw32/include/wingdi.h:2628:1: GCP_DBCS = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2616:1: GCP_DIACRITIC = 0x0100 // /usr/x86_64-w64-mingw32/include/wingdi.h:2621:1: GCP_DISPLAYZWG = 4194304 // /usr/x86_64-w64-mingw32/include/wingdi.h:2631:1: GCP_ERROR = 0x8000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2623:1: GCP_GLYPHSHAPE = 0x0010 // /usr/x86_64-w64-mingw32/include/wingdi.h:2619:1: GCP_JUSTIFY = 65536 // /usr/x86_64-w64-mingw32/include/wingdi.h:2626:1: GCP_JUSTIFYIN = 2097152 // /usr/x86_64-w64-mingw32/include/wingdi.h:2630:1: GCP_KASHIDA = 0x0400 // /usr/x86_64-w64-mingw32/include/wingdi.h:2622:1: GCP_LIGATE = 0x0020 // /usr/x86_64-w64-mingw32/include/wingdi.h:2620:1: GCP_MAXEXTENT = 1048576 // /usr/x86_64-w64-mingw32/include/wingdi.h:2629:1: GCP_NEUTRALOVERRIDE = 33554432 // /usr/x86_64-w64-mingw32/include/wingdi.h:2634:1: GCP_NUMERICOVERRIDE = 16777216 // /usr/x86_64-w64-mingw32/include/wingdi.h:2633:1: GCP_NUMERICSLATIN = 67108864 // /usr/x86_64-w64-mingw32/include/wingdi.h:2635:1: GCP_NUMERICSLOCAL = 134217728 // /usr/x86_64-w64-mingw32/include/wingdi.h:2636:1: GCP_REORDER = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2617:1: GCP_SYMSWAPOFF = 8388608 // /usr/x86_64-w64-mingw32/include/wingdi.h:2632:1: GCP_USEKERNING = 0x0008 // /usr/x86_64-w64-mingw32/include/wingdi.h:2618:1: GCS_COMPATTR = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:299:1: GCS_COMPCLAUSE = 0x0020 // /usr/x86_64-w64-mingw32/include/imm.h:300:1: GCS_COMPREADATTR = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:296:1: GCS_COMPREADCLAUSE = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:297:1: GCS_COMPREADSTR = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:295:1: GCS_COMPSTR = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:298:1: GCS_CURSORPOS = 0x0080 // /usr/x86_64-w64-mingw32/include/imm.h:301:1: GCS_DELTASTART = 0x0100 // /usr/x86_64-w64-mingw32/include/imm.h:302:1: GCS_RESULTCLAUSE = 0x1000 // /usr/x86_64-w64-mingw32/include/imm.h:306:1: GCS_RESULTREADCLAUSE = 0x0400 // /usr/x86_64-w64-mingw32/include/imm.h:304:1: GCS_RESULTREADSTR = 0x0200 // /usr/x86_64-w64-mingw32/include/imm.h:303:1: GCS_RESULTSTR = 0x0800 // /usr/x86_64-w64-mingw32/include/imm.h:305:1: GCW_ATOM = -32 // /usr/x86_64-w64-mingw32/include/winuser.h:1004:1: GDICOMMENT_BEGINGROUP = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:4279:1: GDICOMMENT_ENDGROUP = 0x00000003 // /usr/x86_64-w64-mingw32/include/wingdi.h:4280:1: GDICOMMENT_IDENTIFIER = 0x43494447 // /usr/x86_64-w64-mingw32/include/wingdi.h:4277:1: GDICOMMENT_MULTIFORMATS = 0x40000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:4281:1: GDICOMMENT_UNICODE_END = 0x00000080 // /usr/x86_64-w64-mingw32/include/wingdi.h:4284:1: GDICOMMENT_UNICODE_STRING = 0x00000040 // /usr/x86_64-w64-mingw32/include/wingdi.h:4283:1: GDICOMMENT_WINDOWS_METAFILE = 0x80000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4278:1: GDIPLUS_TS_QUERYVER = 4122 // /usr/x86_64-w64-mingw32/include/wingdi.h:321:1: GDIPLUS_TS_RECORD = 4123 // /usr/x86_64-w64-mingw32/include/wingdi.h:322:1: GDI_ERROR = 4294967295 // /usr/x86_64-w64-mingw32/include/wingdi.h:72:1: GDI_OBJ_LAST = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:441:1: GENERIC_ALL = 268435456 // /usr/x86_64-w64-mingw32/include/winnt.h:2901:1: GENERIC_EXECUTE = 536870912 // /usr/x86_64-w64-mingw32/include/winnt.h:2900:1: GENERIC_READ = 2147483648 // /usr/x86_64-w64-mingw32/include/winnt.h:2898:1: GENERIC_WRITE = 1073741824 // /usr/x86_64-w64-mingw32/include/winnt.h:2899:1: GEOID_NOT_AVAILABLE = -1 // /usr/x86_64-w64-mingw32/include/winnls.h:754:1: GEOPOLY_PI = 3.1415926535897932385 // testdata/sqlite-amalgamation-3380500/sqlite3.c:200887:1: GETCOLORTABLE = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:238:1: GETDEVICEUNITS = 42 // /usr/x86_64-w64-mingw32/include/wingdi.h:274:1: GETEXTENDEDTEXTMETRICS = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:276:1: GETEXTENTTABLE = 257 // /usr/x86_64-w64-mingw32/include/wingdi.h:277:1: GETFACENAME = 513 // /usr/x86_64-w64-mingw32/include/wingdi.h:281:1: GETPAIRKERNTABLE = 258 // /usr/x86_64-w64-mingw32/include/wingdi.h:278:1: GETPENWIDTH = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:249:1: GETPHYSPAGESIZE = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:245:1: GETPRINTINGOFFSET = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:246:1: GETSCALINGFACTOR = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:247:1: GETSETPAPERBINS = 29 // /usr/x86_64-w64-mingw32/include/wingdi.h:264:1: GETSETPAPERMETRICS = 35 // /usr/x86_64-w64-mingw32/include/wingdi.h:270:1: GETSETPRINTORIENT = 30 // /usr/x86_64-w64-mingw32/include/wingdi.h:265:1: GETSETSCREENPARAMS = 3072 // /usr/x86_64-w64-mingw32/include/wingdi.h:291:1: GETTECHNOLGY = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:254:1: GETTECHNOLOGY = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:255:1: GETTRACKKERNTABLE = 259 // /usr/x86_64-w64-mingw32/include/wingdi.h:279:1: GETVECTORBRUSHSIZE = 27 // /usr/x86_64-w64-mingw32/include/wingdi.h:262:1: GETVECTORPENSIZE = 26 // /usr/x86_64-w64-mingw32/include/wingdi.h:261:1: GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 4 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:85:1: GET_MODULE_HANDLE_EX_FLAG_PIN = 1 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:83:1: GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 2 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:84:1: GET_PS_FEATURESETTING = 4121 // /usr/x86_64-w64-mingw32/include/wingdi.h:320:1: GET_SYSTEM_WOW64_DIRECTORY_NAME_A_A = "GetSystemWow64DirectoryA" // /usr/x86_64-w64-mingw32/include/winbase.h:1890:1: GET_SYSTEM_WOW64_DIRECTORY_NAME_W_A = "GetSystemWow64DirectoryW" // /usr/x86_64-w64-mingw32/include/winbase.h:1893:1: GET_TAPE_DRIVE_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1293:1: GET_TAPE_MEDIA_INFORMATION = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:1292:1: GGI_MARK_NONEXISTING_GLYPHS = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:3028:1: GGL_INDEX = 0x00000002 // /usr/x86_64-w64-mingw32/include/imm.h:332:1: GGL_LEVEL = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:331:1: GGL_PRIVATE = 0x00000004 // /usr/x86_64-w64-mingw32/include/imm.h:334:1: GGL_STRING = 0x00000003 // /usr/x86_64-w64-mingw32/include/imm.h:333:1: GGO_BEZIER = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2584:1: GGO_BITMAP = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2582:1: GGO_GLYPH_INDEX = 0x0080 // /usr/x86_64-w64-mingw32/include/wingdi.h:2588:1: GGO_GRAY2_BITMAP = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2585:1: GGO_GRAY4_BITMAP = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:2586:1: GGO_GRAY8_BITMAP = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:2587:1: GGO_METRICS = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:2581:1: GGO_NATIVE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2583:1: GGO_UNHINTED = 0x0100 // /usr/x86_64-w64-mingw32/include/wingdi.h:2589:1: GHND = 66 // /usr/x86_64-w64-mingw32/include/winbase.h:354:1: GIDC_ARRIVAL = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6477:1: GIDC_REMOVAL = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6478:1: GL_ID_CANNOTSAVE = 0x00000011 // /usr/x86_64-w64-mingw32/include/imm.h:345:1: GL_ID_CHOOSECANDIDATE = 0x00000028 // /usr/x86_64-w64-mingw32/include/imm.h:354:1: GL_ID_INPUTCODE = 0x00000026 // /usr/x86_64-w64-mingw32/include/imm.h:352:1: GL_ID_INPUTRADICAL = 0x00000025 // /usr/x86_64-w64-mingw32/include/imm.h:351:1: GL_ID_INPUTREADING = 0x00000024 // /usr/x86_64-w64-mingw32/include/imm.h:350:1: GL_ID_INPUTSYMBOL = 0x00000027 // /usr/x86_64-w64-mingw32/include/imm.h:353:1: GL_ID_NOCONVERT = 0x00000020 // /usr/x86_64-w64-mingw32/include/imm.h:346:1: GL_ID_NODICTIONARY = 0x00000010 // /usr/x86_64-w64-mingw32/include/imm.h:344:1: GL_ID_NOMODULE = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:343:1: GL_ID_PRIVATE_FIRST = 0x00008000 // /usr/x86_64-w64-mingw32/include/imm.h:356:1: GL_ID_PRIVATE_LAST = 0x0000FFFF // /usr/x86_64-w64-mingw32/include/imm.h:357:1: GL_ID_READINGCONFLICT = 0x00000023 // /usr/x86_64-w64-mingw32/include/imm.h:349:1: GL_ID_REVERSECONVERSION = 0x00000029 // /usr/x86_64-w64-mingw32/include/imm.h:355:1: GL_ID_TOOMANYSTROKE = 0x00000022 // /usr/x86_64-w64-mingw32/include/imm.h:348:1: GL_ID_TYPINGERROR = 0x00000021 // /usr/x86_64-w64-mingw32/include/imm.h:347:1: GL_ID_UNKNOWN = 0x00000000 // /usr/x86_64-w64-mingw32/include/imm.h:342:1: GL_LEVEL_ERROR = 0x00000002 // /usr/x86_64-w64-mingw32/include/imm.h:338:1: GL_LEVEL_FATAL = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:337:1: GL_LEVEL_INFORMATION = 0x00000004 // /usr/x86_64-w64-mingw32/include/imm.h:340:1: GL_LEVEL_NOGUIDELINE = 0x00000000 // /usr/x86_64-w64-mingw32/include/imm.h:336:1: GL_LEVEL_WARNING = 0x00000003 // /usr/x86_64-w64-mingw32/include/imm.h:339:1: GMDI_GOINTOPOPUPS = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3377:1: GMDI_USEDISABLED = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3376:1: GMEM_DDESHARE = 0x2000 // /usr/x86_64-w64-mingw32/include/winbase.h:348:1: GMEM_DISCARDABLE = 0x100 // /usr/x86_64-w64-mingw32/include/winbase.h:345:1: GMEM_DISCARDED = 0x4000 // /usr/x86_64-w64-mingw32/include/winbase.h:361:1: GMEM_FIXED = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:339:1: GMEM_INVALID_HANDLE = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:352:1: GMEM_LOCKCOUNT = 0x00ff // /usr/x86_64-w64-mingw32/include/winbase.h:362:1: GMEM_LOWER = 4096 // /usr/x86_64-w64-mingw32/include/winbase.h:350:1: GMEM_MODIFY = 0x80 // /usr/x86_64-w64-mingw32/include/winbase.h:344:1: GMEM_MOVEABLE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:340:1: GMEM_NOCOMPACT = 0x10 // /usr/x86_64-w64-mingw32/include/winbase.h:341:1: GMEM_NODISCARD = 0x20 // /usr/x86_64-w64-mingw32/include/winbase.h:342:1: GMEM_NOTIFY = 0x4000 // /usr/x86_64-w64-mingw32/include/winbase.h:349:1: GMEM_NOT_BANKED = 0x1000 // /usr/x86_64-w64-mingw32/include/winbase.h:346:1: GMEM_SHARE = 0x2000 // /usr/x86_64-w64-mingw32/include/winbase.h:347:1: GMEM_VALID_FLAGS = 0x7f72 // /usr/x86_64-w64-mingw32/include/winbase.h:351:1: GMEM_ZEROINIT = 0x40 // /usr/x86_64-w64-mingw32/include/winbase.h:343:1: GMMP_USE_DISPLAY_POINTS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:769:1: GMMP_USE_HIGH_RESOLUTION_POINTS = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:770:1: GM_ADVANCED = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1414:1: GM_COMPATIBLE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1413:1: GM_LAST = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1415:1: GPTR = 64 // /usr/x86_64-w64-mingw32/include/winbase.h:355:1: GPT_ATTRIBUTE_PLATFORM_REQUIRED = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:614:1: GPT_BASIC_DATA_ATTRIBUTE_HIDDEN = 4611686018427387904 // /usr/x86_64-w64-mingw32/include/winioctl.h:617:1: GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER = 9223372036854775808 // /usr/x86_64-w64-mingw32/include/winioctl.h:616:1: GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY = 1152921504606846976 // /usr/x86_64-w64-mingw32/include/winioctl.h:619:1: GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY = 2305843009213693952 // /usr/x86_64-w64-mingw32/include/winioctl.h:618:1: GRADIENT_FILL_OP_FLAG = 0x000000ff // /usr/x86_64-w64-mingw32/include/wingdi.h:3276:1: GRADIENT_FILL_RECT_H = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:3273:1: GRADIENT_FILL_RECT_V = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:3274:1: GRADIENT_FILL_TRIANGLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:3275:1: GRAY_BRUSH = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1440:1: GREEK_CHARSET = 161 // /usr/x86_64-w64-mingw32/include/wingdi.h:1168:1: GROUP_NAME = 0x80 // /usr/x86_64-w64-mingw32/include/nb30.h:77:1: GROUP_SECURITY_INFORMATION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4011:1: GR_GDIOBJECTS = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5044:1: GR_USEROBJECTS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5045:1: GS_8BIT_INDICES = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:3026:1: GUID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:6:1: GUI_16BITTASK = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6081:1: GUI_CARETBLINKING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:6075:1: GUI_INMENUMODE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:6077:1: GUI_INMOVESIZE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:6076:1: GUI_POPUPMENUMODE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:6079:1: GUI_SYSTEMMENUMODE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:6078:1: GWLP_HINSTANCE = -6 // /usr/x86_64-w64-mingw32/include/winuser.h:990:1: GWLP_HWNDPARENT = -8 // /usr/x86_64-w64-mingw32/include/winuser.h:991:1: GWLP_ID = -12 // /usr/x86_64-w64-mingw32/include/winuser.h:993:1: GWLP_USERDATA = -21 // /usr/x86_64-w64-mingw32/include/winuser.h:992:1: GWLP_WNDPROC = -4 // /usr/x86_64-w64-mingw32/include/winuser.h:989:1: GWL_EXSTYLE = -20 // /usr/x86_64-w64-mingw32/include/winuser.h:978:1: GWL_ID = -12 // /usr/x86_64-w64-mingw32/include/winuser.h:980:1: GWL_STYLE = -16 // /usr/x86_64-w64-mingw32/include/winuser.h:977:1: GW_CHILD = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:3970:1: GW_ENABLEDPOPUP = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3974:1: GW_HWNDFIRST = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3965:1: GW_HWNDLAST = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3966:1: GW_HWNDNEXT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3967:1: GW_HWNDPREV = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3968:1: GW_MAX = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3975:1: GW_OWNER = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3969:1: HALFTONE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:92:1: HANDLE_FLAG_INHERIT = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:1287:1: HANDLE_FLAG_PROTECT_FROM_CLOSE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:1288:1: HANGEUL_CHARSET = 129 // /usr/x86_64-w64-mingw32/include/wingdi.h:1160:1: HANGUL_CHARSET = 129 // /usr/x86_64-w64-mingw32/include/wingdi.h:1161:1: HANGUP_COMPLETE = 0x05 // /usr/x86_64-w64-mingw32/include/nb30.h:106:1: HANGUP_PENDING = 0x04 // /usr/x86_64-w64-mingw32/include/nb30.h:105:1: HASHSIZE = 97 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196055:1: HASHTABLE_HASH_1 = 383 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61551:1: HASHTABLE_NPAGE = 4096 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61550:1: HASHTABLE_NSLOT = 8192 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61552:1: HAVE_FCHOWN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:164:1: HAVE_LSTAT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:166:1: HAVE_READLINK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:165:1: HAVE_USLEEP = 1 // <defines>:3:1: HCBT_ACTIVATE = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:487:1: HCBT_CLICKSKIPPED = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:488:1: HCBT_CREATEWND = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:485:1: HCBT_DESTROYWND = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:486:1: HCBT_KEYSKIPPED = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:489:1: HCBT_MINMAX = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:483:1: HCBT_MOVESIZE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:482:1: HCBT_QS = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:484:1: HCBT_SETFOCUS = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:491:1: HCBT_SYSCOMMAND = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:490:1: HCF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5553:1: HCF_CONFIRMHOTKEY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5555:1: HCF_DEFAULTDESKTOP = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:5560:1: HCF_HIGHCONTRASTON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5552:1: HCF_HOTKEYACTIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5554:1: HCF_HOTKEYAVAILABLE = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:5558:1: HCF_HOTKEYSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5556:1: HCF_INDICATOR = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5557:1: HCF_LOGONDESKTOP = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:5559:1: HCF_OPTION_NOTHEMECHANGE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winuser.h:5561:1: HCRYPTPROV_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:282:1: HC_ACTION = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:474:1: HC_GETNEXT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:475:1: HC_NOREM = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:478:1: HC_NOREMOVE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:477:1: HC_SKIP = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:476:1: HC_SYSMODALOFF = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:480:1: HC_SYSMODALON = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:479:1: HDATA_APPOWNED = 0x0001 // /usr/x86_64-w64-mingw32/include/ddeml.h:216:1: HEAP_CREATE_ALIGN_16 = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:7821:1: HEAP_CREATE_ENABLE_EXECUTE = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:7823:1: HEAP_CREATE_ENABLE_TRACING = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:7822:1: HEAP_DISABLE_COALESCE_ON_FREE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:7820:1: HEAP_FREE_CHECKING_ENABLED = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:7819:1: HEAP_GENERATE_EXCEPTIONS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:7815:1: HEAP_GROWABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:7814:1: HEAP_MAXIMUM_TAG = 0x0FFF // /usr/x86_64-w64-mingw32/include/winnt.h:7824:1: HEAP_NO_SERIALIZE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:7813:1: HEAP_PSEUDO_TAG_FLAG = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:7825:1: HEAP_REALLOC_IN_PLACE_ONLY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:7817:1: HEAP_TAG_SHIFT = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:7826:1: HEAP_TAIL_CHECKING_ENABLED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:7818:1: HEAP_ZERO_MEMORY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:7816:1: HEBREW_CHARSET = 177 // /usr/x86_64-w64-mingw32/include/wingdi.h:1166:1: HELPINFO_MENUITEM = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3649:1: HELPINFO_WINDOW = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3648:1: HELPMSGSTRINGA = "commdlg_help" // /usr/x86_64-w64-mingw32/include/commdlg.h:492:1: HELP_COMMAND = 0x0102 // /usr/x86_64-w64-mingw32/include/winuser.h:5022:1: HELP_CONTENTS = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:5015:1: HELP_CONTEXT = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5012:1: HELP_CONTEXTMENU = 0x000a // /usr/x86_64-w64-mingw32/include/winuser.h:5026:1: HELP_CONTEXTPOPUP = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:5019:1: HELP_FINDER = 0x000b // /usr/x86_64-w64-mingw32/include/winuser.h:5027:1: HELP_FORCEFILE = 0x0009 // /usr/x86_64-w64-mingw32/include/winuser.h:5020:1: HELP_HELPONHELP = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:5016:1: HELP_INDEX = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:5014:1: HELP_KEY = 0x0101 // /usr/x86_64-w64-mingw32/include/winuser.h:5021:1: HELP_MULTIKEY = 0x0201 // /usr/x86_64-w64-mingw32/include/winuser.h:5024:1: HELP_PARTIALKEY = 0x0105 // /usr/x86_64-w64-mingw32/include/winuser.h:5023:1: HELP_QUIT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5013:1: HELP_SETCONTENTS = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:5018:1: HELP_SETINDEX = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:5017:1: HELP_SETPOPUP_POS = 0x000d // /usr/x86_64-w64-mingw32/include/winuser.h:5029:1: HELP_SETWINPOS = 0x0203 // /usr/x86_64-w64-mingw32/include/winuser.h:5025:1: HELP_TCARD = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:5031:1: HELP_TCARD_DATA = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:5032:1: HELP_TCARD_OTHER_CALLER = 0x0011 // /usr/x86_64-w64-mingw32/include/winuser.h:5033:1: HELP_WM_HELP = 0x000c // /usr/x86_64-w64-mingw32/include/winuser.h:5028:1: HIDE_WINDOW = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:216:1: HIGH_PRIORITY_CLASS = 0x80 // /usr/x86_64-w64-mingw32/include/winbase.h:384:1: HIGH_SURROGATE_END = 0xdbff // /usr/x86_64-w64-mingw32/include/winnls.h:34:1: HIGH_SURROGATE_START = 0xd800 // /usr/x86_64-w64-mingw32/include/winnls.h:33:1: HINSTANCE_ERROR = 32 // /usr/x86_64-w64-mingw32/include/winbase.h:1290:1: HISTORY_NO_DUP_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:330:1: HIST_NO_OF_BUCKETS = 24 // /usr/x86_64-w64-mingw32/include/winioctl.h:785:1: HKL_NEXT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:728:1: HKL_PREV = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:727:1: HMONITOR_DECLARED = 1 // /usr/x86_64-w64-mingw32/include/windef.h:57:1: HOLLOW_BRUSH = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1444:1: HORZRES = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1515:1: HORZSIZE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1513:1: HOST_NOT_FOUND = 11001 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:177:1: HOVER_DEFAULT = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/winuser.h:1563:1: HP_ALGID = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:439:1: HP_HASHSIZE = 0x4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:441:1: HP_HASHVAL = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:440:1: HP_HMAC_INFO = 0x5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:442:1: HP_TLS1PRF_LABEL = 0x6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:443:1: HP_TLS1PRF_SEED = 0x7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:444:1: HSHELL_ACCESSIBILITYSTATE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:550:1: HSHELL_ACTIVATESHELLWINDOW = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:542:1: HSHELL_APPCOMMAND = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:551:1: HSHELL_ENDTASK = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:549:1: HSHELL_FLASH = 32774 // /usr/x86_64-w64-mingw32/include/winuser.h:559:1: HSHELL_GETMINRECT = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:544:1: HSHELL_HIGHBIT = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:558:1: HSHELL_LANGUAGE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:547:1: HSHELL_REDRAW = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:545:1: HSHELL_RUDEAPPACTIVATED = 32772 // /usr/x86_64-w64-mingw32/include/winuser.h:560:1: HSHELL_SYSMENU = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:548:1: HSHELL_TASKMAN = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:546:1: HSHELL_WINDOWACTIVATED = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:543:1: HSHELL_WINDOWCREATED = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:540:1: HSHELL_WINDOWDESTROYED = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:541:1: HSHELL_WINDOWREPLACED = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:552:1: HSHELL_WINDOWREPLACING = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:553:1: HS_API_MAX = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1481:1: HS_BDIAGONAL = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1478:1: HS_CROSS = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1479:1: HS_DIAGCROSS = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1480:1: HS_FDIAGONAL = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1477:1: HS_HORIZONTAL = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1475:1: HS_VERTICAL = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1476:1: HTBORDER = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:1473:1: HTBOTTOM = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:1470:1: HTBOTTOMLEFT = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:1471:1: HTBOTTOMRIGHT = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:1472:1: HTCAPTION = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1456:1: HTCLIENT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1455:1: HTCLOSE = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:1479:1: HTERROR = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:1452:1: HTGROWBOX = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1458:1: HTHELP = 21 // /usr/x86_64-w64-mingw32/include/winuser.h:1480:1: HTHSCROLL = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:1461:1: HTLEFT = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:1465:1: HTMAXBUTTON = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:1464:1: HTMENU = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1460:1: HTMINBUTTON = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1463:1: HTNOWHERE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1454:1: HTOBJECT = 19 // /usr/x86_64-w64-mingw32/include/winuser.h:1478:1: HTREDUCE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1474:1: HTRIGHT = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:1466:1: HTSIZE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1459:1: HTSIZEFIRST = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:1476:1: HTSIZELAST = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:1477:1: HTSYSMENU = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1457:1: HTTOP = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:1467:1: HTTOPLEFT = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:1468:1: HTTOPRIGHT = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:1469:1: HTTRANSPARENT = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:1453:1: HTVSCROLL = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:1462:1: HTZOOM = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:1475:1: HUGEP = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:126:1: HW_PROFILE_GUIDLEN = 39 // /usr/x86_64-w64-mingw32/include/winbase.h:2469:1: IACE_CHILDREN = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:477:1: IACE_DEFAULT = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:478:1: IACE_IGNORENOCONTEXT = 0x0020 // /usr/x86_64-w64-mingw32/include/imm.h:479:1: ICM_ADDPROFILE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:513:1: ICM_DELETEPROFILE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:514:1: ICM_DONE_OUTSIDEDC = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:3507:1: ICM_OFF = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:3504:1: ICM_ON = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:3505:1: ICM_QUERY = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:3506:1: ICM_QUERYMATCH = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:519:1: ICM_QUERYPROFILE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:515:1: ICM_REGISTERICMATCHER = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:517:1: ICM_SETDEFAULTPROFILE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:516:1: ICM_UNREGISTERICMATCHER = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:518:1: ICON_BIG = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1497:1: ICON_SMALL = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1496:1: ICON_SMALL2 = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1498:1: IDABORT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4363:1: IDANI_CAPTION = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1764:1: IDANI_OPEN = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1763:1: IDCANCEL = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4362:1: IDCLOSE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4368:1: IDCONTINUE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:4371:1: IDENTIFY_BUFFER_SIZE = 512 // /usr/x86_64-w64-mingw32/include/winioctl.h:954:1: IDHELP = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:4369:1: IDHOT_SNAPDESKTOP = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:2001:1: IDHOT_SNAPWINDOW = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:2000:1: IDH_CANCEL = 28444 // /usr/x86_64-w64-mingw32/include/winuser.h:5039:1: IDH_GENERIC_HELP_BUTTON = 28442 // /usr/x86_64-w64-mingw32/include/winuser.h:5037:1: IDH_HELP = 28445 // /usr/x86_64-w64-mingw32/include/winuser.h:5040:1: IDH_MISSING_CONTEXT = 28441 // /usr/x86_64-w64-mingw32/include/winuser.h:5036:1: IDH_NO_HELP = 28440 // /usr/x86_64-w64-mingw32/include/winuser.h:5035:1: IDH_OK = 28443 // /usr/x86_64-w64-mingw32/include/winuser.h:5038:1: IDIGNORE = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4365:1: IDLE_PRIORITY_CLASS = 0x40 // /usr/x86_64-w64-mingw32/include/winbase.h:383:1: IDLFLAG_FIN = 1 // /usr/x86_64-w64-mingw32/include/oaidl.h:704:1: IDLFLAG_FLCID = 4 // /usr/x86_64-w64-mingw32/include/oaidl.h:708:1: IDLFLAG_FOUT = 2 // /usr/x86_64-w64-mingw32/include/oaidl.h:706:1: IDLFLAG_FRETVAL = 8 // /usr/x86_64-w64-mingw32/include/oaidl.h:710:1: IDLFLAG_NONE = 0 // /usr/x86_64-w64-mingw32/include/oaidl.h:702:1: IDNO = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:4367:1: IDOK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4361:1: IDRETRY = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4364:1: IDTIMEOUT = 32000 // /usr/x86_64-w64-mingw32/include/winuser.h:4374:1: IDTRYAGAIN = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:4370:1: IDYES = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:4366:1: ID_CMD = 0xEC // /usr/x86_64-w64-mingw32/include/winioctl.h:900:1: ID_DEFAULTINST = -2 // /usr/x86_64-w64-mingw32/include/oleauto.h:557:1: ID_PSREBOOTSYSTEM = 3 // /usr/x86_64-w64-mingw32/include/prsht.h:461:1: ID_PSRESTARTWINDOWS = 0x2 // /usr/x86_64-w64-mingw32/include/prsht.h:460:1: IE_BADID = -1 // /usr/x86_64-w64-mingw32/include/winbase.h:510:1: IE_BAUDRATE = -12 // /usr/x86_64-w64-mingw32/include/winbase.h:517:1: IE_BYTESIZE = -11 // /usr/x86_64-w64-mingw32/include/winbase.h:516:1: IE_DEFAULT = -5 // /usr/x86_64-w64-mingw32/include/winbase.h:514:1: IE_HARDWARE = -10 // /usr/x86_64-w64-mingw32/include/winbase.h:515:1: IE_MEMORY = -4 // /usr/x86_64-w64-mingw32/include/winbase.h:513:1: IE_NOPEN = -3 // /usr/x86_64-w64-mingw32/include/winbase.h:512:1: IE_OPEN = -2 // /usr/x86_64-w64-mingw32/include/winbase.h:511:1: IFID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:69:1: IGIMIF_RIGHTMENU = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:481:1: IGIMII_CMODE = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:483:1: IGIMII_CONFIGURE = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:485:1: IGIMII_HELP = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:487:1: IGIMII_INPUTTOOLS = 0x0040 // /usr/x86_64-w64-mingw32/include/imm.h:489:1: IGIMII_OTHER = 0x0020 // /usr/x86_64-w64-mingw32/include/imm.h:488:1: IGIMII_SMODE = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:484:1: IGIMII_TOOLS = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:486:1: IGNORE = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:479:1: IGP_CONVERSION = 0x00000008 // /usr/x86_64-w64-mingw32/include/imm.h:361:1: IGP_PROPERTY = 0x00000004 // /usr/x86_64-w64-mingw32/include/imm.h:360:1: IGP_SELECT = 0x00000018 // /usr/x86_64-w64-mingw32/include/imm.h:365:1: IGP_SENTENCE = 0x0000000c // /usr/x86_64-w64-mingw32/include/imm.h:362:1: IGP_SETCOMPSTR = 0x00000014 // /usr/x86_64-w64-mingw32/include/imm.h:364:1: IGP_UI = 0x00000010 // /usr/x86_64-w64-mingw32/include/imm.h:363:1: ILLUMINANT_A = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:3353:1: ILLUMINANT_B = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:3354:1: ILLUMINANT_C = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:3355:1: ILLUMINANT_D50 = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:3356:1: ILLUMINANT_D55 = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:3357:1: ILLUMINANT_D65 = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:3358:1: ILLUMINANT_D75 = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:3359:1: ILLUMINANT_DAYLIGHT = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:3364:1: ILLUMINANT_DEVICE_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:3352:1: ILLUMINANT_F2 = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:3360:1: ILLUMINANT_FLUORESCENT = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:3365:1: ILLUMINANT_MAX_INDEX = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:3361:1: ILLUMINANT_NTSC = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:3366:1: ILLUMINANT_TUNGSTEN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:3363:1: IMAGE_ARCHIVE_END = "`\n" // /usr/x86_64-w64-mingw32/include/winnt.h:7129:1: IMAGE_ARCHIVE_LINKER_MEMBER = "/ " // /usr/x86_64-w64-mingw32/include/winnt.h:7131:1: IMAGE_ARCHIVE_LONGNAMES_MEMBER = "// " // /usr/x86_64-w64-mingw32/include/winnt.h:7132:1: IMAGE_ARCHIVE_PAD = "\n" // /usr/x86_64-w64-mingw32/include/winnt.h:7130:1: IMAGE_ARCHIVE_START = "!<arch>\n" // /usr/x86_64-w64-mingw32/include/winnt.h:7128:1: IMAGE_ARCHIVE_START_SIZE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:7127:1: IMAGE_BITMAP = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4177:1: IMAGE_COMDAT_SELECT_ANY = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6745:1: IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:6748:1: IMAGE_COMDAT_SELECT_EXACT_MATCH = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:6747:1: IMAGE_COMDAT_SELECT_LARGEST = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:6749:1: IMAGE_COMDAT_SELECT_NEWEST = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:6750:1: IMAGE_COMDAT_SELECT_NODUPLICATES = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:6744:1: IMAGE_COMDAT_SELECT_SAME_SIZE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:6746:1: IMAGE_CURSOR = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4179:1: IMAGE_DEBUG_MISC_EXENAME = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7520:1: IMAGE_DEBUG_TYPE_BORLAND = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7486:1: IMAGE_DEBUG_TYPE_CLSID = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:7488:1: IMAGE_DEBUG_TYPE_CODEVIEW = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7479:1: IMAGE_DEBUG_TYPE_COFF = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7478:1: IMAGE_DEBUG_TYPE_EXCEPTION = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7482:1: IMAGE_DEBUG_TYPE_FIXUP = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:7483:1: IMAGE_DEBUG_TYPE_FPO = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7480:1: IMAGE_DEBUG_TYPE_MISC = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7481:1: IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:7485:1: IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7484:1: IMAGE_DEBUG_TYPE_RESERVED10 = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:7487:1: IMAGE_DEBUG_TYPE_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7477:1: IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:6421:1: IMAGE_DIRECTORY_ENTRY_BASERELOC = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:6419:1: IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:6425:1: IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:6428:1: IMAGE_DIRECTORY_ENTRY_DEBUG = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:6420:1: IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:6427:1: IMAGE_DIRECTORY_ENTRY_EXCEPTION = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:6417:1: IMAGE_DIRECTORY_ENTRY_EXPORT = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:6414:1: IMAGE_DIRECTORY_ENTRY_GLOBALPTR = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:6422:1: IMAGE_DIRECTORY_ENTRY_IAT = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:6426:1: IMAGE_DIRECTORY_ENTRY_IMPORT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:6415:1: IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:6424:1: IMAGE_DIRECTORY_ENTRY_RESOURCE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6416:1: IMAGE_DIRECTORY_ENTRY_SECURITY = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:6418:1: IMAGE_DIRECTORY_ENTRY_TLS = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:6423:1: IMAGE_DLLCHARACTERISTICS_APPCONTAINER = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:6409:1: IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0x0040 // /usr/x86_64-w64-mingw32/include/winnt.h:6403:1: IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0x0080 // /usr/x86_64-w64-mingw32/include/winnt.h:6404:1: IMAGE_DLLCHARACTERISTICS_GUARD_CF = 0x4000 // /usr/x86_64-w64-mingw32/include/winnt.h:6411:1: IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA = 0x0020 // /usr/x86_64-w64-mingw32/include/winnt.h:6402:1: IMAGE_DLLCHARACTERISTICS_NO_BIND = 0x0800 // /usr/x86_64-w64-mingw32/include/winnt.h:6408:1: IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:6406:1: IMAGE_DLLCHARACTERISTICS_NO_SEH = 0x0400 // /usr/x86_64-w64-mingw32/include/winnt.h:6407:1: IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0x0100 // /usr/x86_64-w64-mingw32/include/winnt.h:6405:1: IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:6412:1: IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 0x2000 // /usr/x86_64-w64-mingw32/include/winnt.h:6410:1: IMAGE_DOS_SIGNATURE = 0x5A4D // /usr/x86_64-w64-mingw32/include/winnt.h:6068:1: IMAGE_ENHMETAFILE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4180:1: IMAGE_FILE_32BIT_MACHINE = 0x0100 // /usr/x86_64-w64-mingw32/include/winnt.h:6206:1: IMAGE_FILE_AGGRESIVE_WS_TRIM = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6203:1: IMAGE_FILE_BYTES_REVERSED_HI = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:6213:1: IMAGE_FILE_BYTES_REVERSED_LO = 0x0080 // /usr/x86_64-w64-mingw32/include/winnt.h:6205:1: IMAGE_FILE_DEBUG_STRIPPED = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:6207:1: IMAGE_FILE_DLL = 0x2000 // /usr/x86_64-w64-mingw32/include/winnt.h:6211:1: IMAGE_FILE_EXECUTABLE_IMAGE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6200:1: IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x0020 // /usr/x86_64-w64-mingw32/include/winnt.h:6204:1: IMAGE_FILE_LINE_NUMS_STRIPPED = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6201:1: IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6202:1: IMAGE_FILE_MACHINE_ALPHA = 0x0184 // /usr/x86_64-w64-mingw32/include/winnt.h:6221:1: IMAGE_FILE_MACHINE_ALPHA64 = 0x0284 // /usr/x86_64-w64-mingw32/include/winnt.h:6237:1: IMAGE_FILE_MACHINE_AM33 = 0x01d3 // /usr/x86_64-w64-mingw32/include/winnt.h:6232:1: IMAGE_FILE_MACHINE_AMD64 = 0x8664 // /usr/x86_64-w64-mingw32/include/winnt.h:6244:1: IMAGE_FILE_MACHINE_ARM = 0x01c0 // /usr/x86_64-w64-mingw32/include/winnt.h:6227:1: IMAGE_FILE_MACHINE_ARM64 = 0xaa64 // /usr/x86_64-w64-mingw32/include/winnt.h:6230:1: IMAGE_FILE_MACHINE_ARMNT = 0x01c4 // /usr/x86_64-w64-mingw32/include/winnt.h:6229:1: IMAGE_FILE_MACHINE_ARMV7 = 0x01c4 // /usr/x86_64-w64-mingw32/include/winnt.h:6228:1: IMAGE_FILE_MACHINE_AXP64 = 644 // /usr/x86_64-w64-mingw32/include/winnt.h:6240:1: IMAGE_FILE_MACHINE_CEE = 0xc0ee // /usr/x86_64-w64-mingw32/include/winnt.h:6246:1: IMAGE_FILE_MACHINE_CEF = 0x0CEF // /usr/x86_64-w64-mingw32/include/winnt.h:6242:1: IMAGE_FILE_MACHINE_EBC = 0x0EBC // /usr/x86_64-w64-mingw32/include/winnt.h:6243:1: IMAGE_FILE_MACHINE_I386 = 0x014c // /usr/x86_64-w64-mingw32/include/winnt.h:6216:1: IMAGE_FILE_MACHINE_IA64 = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:6235:1: IMAGE_FILE_MACHINE_M32R = 0x9041 // /usr/x86_64-w64-mingw32/include/winnt.h:6245:1: IMAGE_FILE_MACHINE_MIPS16 = 0x0266 // /usr/x86_64-w64-mingw32/include/winnt.h:6236:1: IMAGE_FILE_MACHINE_MIPSFPU = 0x0366 // /usr/x86_64-w64-mingw32/include/winnt.h:6238:1: IMAGE_FILE_MACHINE_MIPSFPU16 = 0x0466 // /usr/x86_64-w64-mingw32/include/winnt.h:6239:1: IMAGE_FILE_MACHINE_POWERPC = 0x01F0 // /usr/x86_64-w64-mingw32/include/winnt.h:6233:1: IMAGE_FILE_MACHINE_POWERPCFP = 0x01f1 // /usr/x86_64-w64-mingw32/include/winnt.h:6234:1: IMAGE_FILE_MACHINE_R10000 = 0x0168 // /usr/x86_64-w64-mingw32/include/winnt.h:6219:1: IMAGE_FILE_MACHINE_R3000 = 0x0162 // /usr/x86_64-w64-mingw32/include/winnt.h:6217:1: IMAGE_FILE_MACHINE_R4000 = 0x0166 // /usr/x86_64-w64-mingw32/include/winnt.h:6218:1: IMAGE_FILE_MACHINE_SH3 = 0x01a2 // /usr/x86_64-w64-mingw32/include/winnt.h:6222:1: IMAGE_FILE_MACHINE_SH3DSP = 0x01a3 // /usr/x86_64-w64-mingw32/include/winnt.h:6223:1: IMAGE_FILE_MACHINE_SH3E = 0x01a4 // /usr/x86_64-w64-mingw32/include/winnt.h:6224:1: IMAGE_FILE_MACHINE_SH4 = 0x01a6 // /usr/x86_64-w64-mingw32/include/winnt.h:6225:1: IMAGE_FILE_MACHINE_SH5 = 0x01a8 // /usr/x86_64-w64-mingw32/include/winnt.h:6226:1: IMAGE_FILE_MACHINE_THUMB = 0x01c2 // /usr/x86_64-w64-mingw32/include/winnt.h:6231:1: IMAGE_FILE_MACHINE_TRICORE = 0x0520 // /usr/x86_64-w64-mingw32/include/winnt.h:6241:1: IMAGE_FILE_MACHINE_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:6215:1: IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x0169 // /usr/x86_64-w64-mingw32/include/winnt.h:6220:1: IMAGE_FILE_NET_RUN_FROM_SWAP = 0x0800 // /usr/x86_64-w64-mingw32/include/winnt.h:6209:1: IMAGE_FILE_RELOCS_STRIPPED = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6199:1: IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0x0400 // /usr/x86_64-w64-mingw32/include/winnt.h:6208:1: IMAGE_FILE_SYSTEM = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:6210:1: IMAGE_FILE_UP_SYSTEM_ONLY = 0x4000 // /usr/x86_64-w64-mingw32/include/winnt.h:6212:1: IMAGE_ICON = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4178:1: IMAGE_NT_OPTIONAL_HDR32_MAGIC = 0x10b // /usr/x86_64-w64-mingw32/include/winnt.h:6344:1: IMAGE_NT_OPTIONAL_HDR64_MAGIC = 0x20b // /usr/x86_64-w64-mingw32/include/winnt.h:6345:1: IMAGE_NT_OPTIONAL_HDR_MAGIC = 523 // /usr/x86_64-w64-mingw32/include/winnt.h:6352:1: IMAGE_NT_SIGNATURE = 0x00004550 // /usr/x86_64-w64-mingw32/include/winnt.h:6072:1: IMAGE_NUMBEROF_DIRECTORY_ENTRIES = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:6253:1: IMAGE_ORDINAL_FLAG = 9223372036854775808 // /usr/x86_64-w64-mingw32/include/winnt.h:7219:1: IMAGE_ORDINAL_FLAG32 = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:7190:1: IMAGE_ORDINAL_FLAG64 = 0x8000000000000000 // /usr/x86_64-w64-mingw32/include/winnt.h:7189:1: IMAGE_OS2_SIGNATURE = 0x454E // /usr/x86_64-w64-mingw32/include/winnt.h:6069:1: IMAGE_OS2_SIGNATURE_LE = 0x454C // /usr/x86_64-w64-mingw32/include/winnt.h:6070:1: IMAGE_REL_ALPHA_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6797:1: IMAGE_REL_ALPHA_BRADDR = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6804:1: IMAGE_REL_ALPHA_GPDISP = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6803:1: IMAGE_REL_ALPHA_GPREL32 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6800:1: IMAGE_REL_ALPHA_GPRELHI = 0x0017 // /usr/x86_64-w64-mingw32/include/winnt.h:6820:1: IMAGE_REL_ALPHA_GPRELLO = 0x0016 // /usr/x86_64-w64-mingw32/include/winnt.h:6819:1: IMAGE_REL_ALPHA_HINT = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6805:1: IMAGE_REL_ALPHA_INLINE_REFLONG = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6806:1: IMAGE_REL_ALPHA_LITERAL = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6801:1: IMAGE_REL_ALPHA_LITUSE = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6802:1: IMAGE_REL_ALPHA_MATCH = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6810:1: IMAGE_REL_ALPHA_PAIR = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6809:1: IMAGE_REL_ALPHA_REFHI = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6807:1: IMAGE_REL_ALPHA_REFLO = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6808:1: IMAGE_REL_ALPHA_REFLONG = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6798:1: IMAGE_REL_ALPHA_REFLONGNB = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6813:1: IMAGE_REL_ALPHA_REFQ1 = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6818:1: IMAGE_REL_ALPHA_REFQ2 = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6817:1: IMAGE_REL_ALPHA_REFQ3 = 0x0013 // /usr/x86_64-w64-mingw32/include/winnt.h:6816:1: IMAGE_REL_ALPHA_REFQUAD = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6799:1: IMAGE_REL_ALPHA_SECREL = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6812:1: IMAGE_REL_ALPHA_SECRELHI = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6815:1: IMAGE_REL_ALPHA_SECRELLO = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6814:1: IMAGE_REL_ALPHA_SECTION = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6811:1: IMAGE_REL_AMD64_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6914:1: IMAGE_REL_AMD64_ADDR32 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6916:1: IMAGE_REL_AMD64_ADDR32NB = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6917:1: IMAGE_REL_AMD64_ADDR64 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6915:1: IMAGE_REL_AMD64_PAIR = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6929:1: IMAGE_REL_AMD64_REL32 = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6918:1: IMAGE_REL_AMD64_REL32_1 = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6919:1: IMAGE_REL_AMD64_REL32_2 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6920:1: IMAGE_REL_AMD64_REL32_3 = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6921:1: IMAGE_REL_AMD64_REL32_4 = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6922:1: IMAGE_REL_AMD64_REL32_5 = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6923:1: IMAGE_REL_AMD64_SECREL = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6925:1: IMAGE_REL_AMD64_SECREL7 = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6926:1: IMAGE_REL_AMD64_SECTION = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6924:1: IMAGE_REL_AMD64_SREL32 = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6928:1: IMAGE_REL_AMD64_SSPAN32 = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6930:1: IMAGE_REL_AMD64_TOKEN = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6927:1: IMAGE_REL_AM_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6903:1: IMAGE_REL_AM_ADDR32 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6904:1: IMAGE_REL_AM_ADDR32NB = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6905:1: IMAGE_REL_AM_CALL32 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6906:1: IMAGE_REL_AM_FUNCINFO = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6907:1: IMAGE_REL_AM_REL32_1 = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6908:1: IMAGE_REL_AM_REL32_2 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6909:1: IMAGE_REL_AM_SECREL = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6910:1: IMAGE_REL_AM_SECTION = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6911:1: IMAGE_REL_AM_TOKEN = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6912:1: IMAGE_REL_ARM_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6880:1: IMAGE_REL_ARM_ADDR32 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6881:1: IMAGE_REL_ARM_ADDR32NB = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6882:1: IMAGE_REL_ARM_BLX11 = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6889:1: IMAGE_REL_ARM_BLX23T = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6900:1: IMAGE_REL_ARM_BLX24 = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6888:1: IMAGE_REL_ARM_BRANCH11 = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6884:1: IMAGE_REL_ARM_BRANCH20T = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6896:1: IMAGE_REL_ARM_BRANCH24 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6883:1: IMAGE_REL_ARM_BRANCH24T = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6898:1: IMAGE_REL_ARM_GPREL12 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6886:1: IMAGE_REL_ARM_GPREL7 = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6887:1: IMAGE_REL_ARM_MOV32 = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6893:1: IMAGE_REL_ARM_MOV32A = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6892:1: IMAGE_REL_ARM_MOV32T = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6894:1: IMAGE_REL_ARM_SECREL = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6891:1: IMAGE_REL_ARM_SECTION = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6890:1: IMAGE_REL_ARM_TOKEN = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6885:1: IMAGE_REL_BASED_ABSOLUTE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7115:1: IMAGE_REL_BASED_ARM_MOV32 = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7121:1: IMAGE_REL_BASED_DIR64 = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:7125:1: IMAGE_REL_BASED_HIGH = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7116:1: IMAGE_REL_BASED_HIGHADJ = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7119:1: IMAGE_REL_BASED_HIGHLOW = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7118:1: IMAGE_REL_BASED_IA64_IMM64 = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7124:1: IMAGE_REL_BASED_LOW = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7117:1: IMAGE_REL_BASED_MIPS_JMPADDR = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7120:1: IMAGE_REL_BASED_MIPS_JMPADDR16 = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7123:1: IMAGE_REL_BASED_THUMB_MOV32 = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7122:1: IMAGE_REL_CEE_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6971:1: IMAGE_REL_CEE_ADDR32 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6972:1: IMAGE_REL_CEE_ADDR32NB = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6974:1: IMAGE_REL_CEE_ADDR64 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6973:1: IMAGE_REL_CEE_SECREL = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6976:1: IMAGE_REL_CEE_SECTION = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6975:1: IMAGE_REL_CEE_TOKEN = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6977:1: IMAGE_REL_CEF_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6963:1: IMAGE_REL_CEF_ADDR32 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6964:1: IMAGE_REL_CEF_ADDR32NB = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6966:1: IMAGE_REL_CEF_ADDR64 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6965:1: IMAGE_REL_CEF_SECREL = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6968:1: IMAGE_REL_CEF_SECTION = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6967:1: IMAGE_REL_CEF_TOKEN = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6969:1: IMAGE_REL_EBC_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6995:1: IMAGE_REL_EBC_ADDR32NB = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6996:1: IMAGE_REL_EBC_REL32 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6997:1: IMAGE_REL_EBC_SECREL = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6999:1: IMAGE_REL_EBC_SECTION = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6998:1: IMAGE_REL_I386_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6768:1: IMAGE_REL_I386_DIR16 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6769:1: IMAGE_REL_I386_DIR32 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6771:1: IMAGE_REL_I386_DIR32NB = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6772:1: IMAGE_REL_I386_REL16 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6770:1: IMAGE_REL_I386_REL32 = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6778:1: IMAGE_REL_I386_SECREL = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6775:1: IMAGE_REL_I386_SECREL7 = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6777:1: IMAGE_REL_I386_SECTION = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6774:1: IMAGE_REL_I386_SEG12 = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6773:1: IMAGE_REL_I386_TOKEN = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6776:1: IMAGE_REL_IA64_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6932:1: IMAGE_REL_IA64_ADDEND = 0x001F // /usr/x86_64-w64-mingw32/include/winnt.h:6961:1: IMAGE_REL_IA64_DIR32 = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6936:1: IMAGE_REL_IA64_DIR32NB = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6948:1: IMAGE_REL_IA64_DIR64 = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6937:1: IMAGE_REL_IA64_GPREL22 = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6941:1: IMAGE_REL_IA64_GPREL32 = 0x001C // /usr/x86_64-w64-mingw32/include/winnt.h:6960:1: IMAGE_REL_IA64_IMM14 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6933:1: IMAGE_REL_IA64_IMM22 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6934:1: IMAGE_REL_IA64_IMM64 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6935:1: IMAGE_REL_IA64_IMMGPREL64 = 0x001A // /usr/x86_64-w64-mingw32/include/winnt.h:6958:1: IMAGE_REL_IA64_LTOFF22 = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6942:1: IMAGE_REL_IA64_PCREL21B = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6938:1: IMAGE_REL_IA64_PCREL21F = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6940:1: IMAGE_REL_IA64_PCREL21M = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6939:1: IMAGE_REL_IA64_PCREL60B = 0x0016 // /usr/x86_64-w64-mingw32/include/winnt.h:6954:1: IMAGE_REL_IA64_PCREL60F = 0x0017 // /usr/x86_64-w64-mingw32/include/winnt.h:6955:1: IMAGE_REL_IA64_PCREL60I = 0x0018 // /usr/x86_64-w64-mingw32/include/winnt.h:6956:1: IMAGE_REL_IA64_PCREL60M = 0x0019 // /usr/x86_64-w64-mingw32/include/winnt.h:6957:1: IMAGE_REL_IA64_PCREL60X = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6953:1: IMAGE_REL_IA64_SECREL22 = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6944:1: IMAGE_REL_IA64_SECREL32 = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6946:1: IMAGE_REL_IA64_SECREL64I = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6945:1: IMAGE_REL_IA64_SECTION = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6943:1: IMAGE_REL_IA64_SREL14 = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6949:1: IMAGE_REL_IA64_SREL22 = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6950:1: IMAGE_REL_IA64_SREL32 = 0x0013 // /usr/x86_64-w64-mingw32/include/winnt.h:6951:1: IMAGE_REL_IA64_TOKEN = 0x001B // /usr/x86_64-w64-mingw32/include/winnt.h:6959:1: IMAGE_REL_IA64_UREL32 = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6952:1: IMAGE_REL_M32R_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6979:1: IMAGE_REL_M32R_ADDR24 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6982:1: IMAGE_REL_M32R_ADDR32 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6980:1: IMAGE_REL_M32R_ADDR32NB = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6981:1: IMAGE_REL_M32R_GPREL16 = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6983:1: IMAGE_REL_M32R_PAIR = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6990:1: IMAGE_REL_M32R_PCREL16 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6985:1: IMAGE_REL_M32R_PCREL24 = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6984:1: IMAGE_REL_M32R_PCREL8 = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6986:1: IMAGE_REL_M32R_REFHALF = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6987:1: IMAGE_REL_M32R_REFHI = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6988:1: IMAGE_REL_M32R_REFLO = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6989:1: IMAGE_REL_M32R_SECREL32 = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6992:1: IMAGE_REL_M32R_SECTION = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6991:1: IMAGE_REL_M32R_TOKEN = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6993:1: IMAGE_REL_MIPS_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6780:1: IMAGE_REL_MIPS_GPREL = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6786:1: IMAGE_REL_MIPS_JMPADDR = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6783:1: IMAGE_REL_MIPS_JMPADDR16 = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6793:1: IMAGE_REL_MIPS_LITERAL = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6787:1: IMAGE_REL_MIPS_PAIR = 0x0025 // /usr/x86_64-w64-mingw32/include/winnt.h:6795:1: IMAGE_REL_MIPS_REFHALF = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6781:1: IMAGE_REL_MIPS_REFHI = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6784:1: IMAGE_REL_MIPS_REFLO = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6785:1: IMAGE_REL_MIPS_REFWORD = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6782:1: IMAGE_REL_MIPS_REFWORDNB = 0x0022 // /usr/x86_64-w64-mingw32/include/winnt.h:6794:1: IMAGE_REL_MIPS_SECREL = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6789:1: IMAGE_REL_MIPS_SECRELHI = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6791:1: IMAGE_REL_MIPS_SECRELLO = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6790:1: IMAGE_REL_MIPS_SECTION = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6788:1: IMAGE_REL_MIPS_TOKEN = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6792:1: IMAGE_REL_PPC_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6822:1: IMAGE_REL_PPC_ADDR14 = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6827:1: IMAGE_REL_PPC_ADDR16 = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6826:1: IMAGE_REL_PPC_ADDR24 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6825:1: IMAGE_REL_PPC_ADDR32 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6824:1: IMAGE_REL_PPC_ADDR32NB = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6832:1: IMAGE_REL_PPC_ADDR64 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6823:1: IMAGE_REL_PPC_BRNTAKEN = 0x0400 // /usr/x86_64-w64-mingw32/include/winnt.h:6848:1: IMAGE_REL_PPC_BRTAKEN = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:6847:1: IMAGE_REL_PPC_GPREL = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6843:1: IMAGE_REL_PPC_IFGLUE = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6835:1: IMAGE_REL_PPC_IMGLUE = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6836:1: IMAGE_REL_PPC_NEG = 0x0100 // /usr/x86_64-w64-mingw32/include/winnt.h:6846:1: IMAGE_REL_PPC_PAIR = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6840:1: IMAGE_REL_PPC_REFHI = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6838:1: IMAGE_REL_PPC_REFLO = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6839:1: IMAGE_REL_PPC_REL14 = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6829:1: IMAGE_REL_PPC_REL24 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6828:1: IMAGE_REL_PPC_SECREL = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6833:1: IMAGE_REL_PPC_SECREL16 = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6837:1: IMAGE_REL_PPC_SECRELHI = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6842:1: IMAGE_REL_PPC_SECRELLO = 0x0013 // /usr/x86_64-w64-mingw32/include/winnt.h:6841:1: IMAGE_REL_PPC_SECTION = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6834:1: IMAGE_REL_PPC_TOCDEFN = 0x0800 // /usr/x86_64-w64-mingw32/include/winnt.h:6849:1: IMAGE_REL_PPC_TOCREL14 = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6831:1: IMAGE_REL_PPC_TOCREL16 = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6830:1: IMAGE_REL_PPC_TOKEN = 0x0016 // /usr/x86_64-w64-mingw32/include/winnt.h:6844:1: IMAGE_REL_PPC_TYPEMASK = 0x00FF // /usr/x86_64-w64-mingw32/include/winnt.h:6845:1: IMAGE_REL_SH3_ABSOLUTE = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6851:1: IMAGE_REL_SH3_DIRECT16 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6852:1: IMAGE_REL_SH3_DIRECT32 = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6853:1: IMAGE_REL_SH3_DIRECT32_NB = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6867:1: IMAGE_REL_SH3_DIRECT4 = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6857:1: IMAGE_REL_SH3_DIRECT4_LONG = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6859:1: IMAGE_REL_SH3_DIRECT4_WORD = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6858:1: IMAGE_REL_SH3_DIRECT8 = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6854:1: IMAGE_REL_SH3_DIRECT8_LONG = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6856:1: IMAGE_REL_SH3_DIRECT8_WORD = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6855:1: IMAGE_REL_SH3_GPREL4_LONG = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6868:1: IMAGE_REL_SH3_PCREL12_WORD = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6862:1: IMAGE_REL_SH3_PCREL8_LONG = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6861:1: IMAGE_REL_SH3_PCREL8_WORD = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6860:1: IMAGE_REL_SH3_SECREL = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6866:1: IMAGE_REL_SH3_SECTION = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6865:1: IMAGE_REL_SH3_SIZEOF_SECTION = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6864:1: IMAGE_REL_SH3_STARTOF_SECTION = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6863:1: IMAGE_REL_SH3_TOKEN = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6869:1: IMAGE_REL_SHM_PAIR = 0x0018 // /usr/x86_64-w64-mingw32/include/winnt.h:6876:1: IMAGE_REL_SHM_PCRELPT = 0x0013 // /usr/x86_64-w64-mingw32/include/winnt.h:6871:1: IMAGE_REL_SHM_REFHALF = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6873:1: IMAGE_REL_SHM_REFLO = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6872:1: IMAGE_REL_SHM_RELHALF = 0x0017 // /usr/x86_64-w64-mingw32/include/winnt.h:6875:1: IMAGE_REL_SHM_RELLO = 0x0016 // /usr/x86_64-w64-mingw32/include/winnt.h:6874:1: IMAGE_REL_SH_NOMODE = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:6878:1: IMAGE_REL_THUMB_BLX23 = 0x0015 // /usr/x86_64-w64-mingw32/include/winnt.h:6901:1: IMAGE_REL_THUMB_BRANCH20 = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6897:1: IMAGE_REL_THUMB_BRANCH24 = 0x0014 // /usr/x86_64-w64-mingw32/include/winnt.h:6899:1: IMAGE_REL_THUMB_MOV32 = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6895:1: IMAGE_RESOURCE_DATA_IS_DIRECTORY = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:7289:1: IMAGE_RESOURCE_NAME_IS_STRING = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:7288:1: IMAGE_ROM_OPTIONAL_HDR_MAGIC = 0x107 // /usr/x86_64-w64-mingw32/include/winnt.h:6346:1: IMAGE_SCN_ALIGN_1024BYTES = 0x00B00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6516:1: IMAGE_SCN_ALIGN_128BYTES = 0x00800000 // /usr/x86_64-w64-mingw32/include/winnt.h:6513:1: IMAGE_SCN_ALIGN_16BYTES = 0x00500000 // /usr/x86_64-w64-mingw32/include/winnt.h:6510:1: IMAGE_SCN_ALIGN_1BYTES = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnt.h:6506:1: IMAGE_SCN_ALIGN_2048BYTES = 0x00C00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6517:1: IMAGE_SCN_ALIGN_256BYTES = 0x00900000 // /usr/x86_64-w64-mingw32/include/winnt.h:6514:1: IMAGE_SCN_ALIGN_2BYTES = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnt.h:6507:1: IMAGE_SCN_ALIGN_32BYTES = 0x00600000 // /usr/x86_64-w64-mingw32/include/winnt.h:6511:1: IMAGE_SCN_ALIGN_4096BYTES = 0x00D00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6518:1: IMAGE_SCN_ALIGN_4BYTES = 0x00300000 // /usr/x86_64-w64-mingw32/include/winnt.h:6508:1: IMAGE_SCN_ALIGN_512BYTES = 0x00A00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6515:1: IMAGE_SCN_ALIGN_64BYTES = 0x00700000 // /usr/x86_64-w64-mingw32/include/winnt.h:6512:1: IMAGE_SCN_ALIGN_8192BYTES = 0x00E00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6519:1: IMAGE_SCN_ALIGN_8BYTES = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnt.h:6509:1: IMAGE_SCN_ALIGN_MASK = 0x00F00000 // /usr/x86_64-w64-mingw32/include/winnt.h:6521:1: IMAGE_SCN_CNT_CODE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:6491:1: IMAGE_SCN_CNT_INITIALIZED_DATA = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:6492:1: IMAGE_SCN_CNT_UNINITIALIZED_DATA = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:6493:1: IMAGE_SCN_GPREL = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:6499:1: IMAGE_SCN_LNK_COMDAT = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:6497:1: IMAGE_SCN_LNK_INFO = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:6495:1: IMAGE_SCN_LNK_NRELOC_OVFL = 0x01000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6523:1: IMAGE_SCN_LNK_OTHER = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:6494:1: IMAGE_SCN_LNK_REMOVE = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:6496:1: IMAGE_SCN_MEM_16BIT = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:6502:1: IMAGE_SCN_MEM_DISCARDABLE = 0x02000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6524:1: IMAGE_SCN_MEM_EXECUTE = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6528:1: IMAGE_SCN_MEM_FARDATA = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:6500:1: IMAGE_SCN_MEM_LOCKED = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:6503:1: IMAGE_SCN_MEM_NOT_CACHED = 0x04000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6525:1: IMAGE_SCN_MEM_NOT_PAGED = 0x08000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6526:1: IMAGE_SCN_MEM_PRELOAD = 0x00080000 // /usr/x86_64-w64-mingw32/include/winnt.h:6504:1: IMAGE_SCN_MEM_PURGEABLE = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:6501:1: IMAGE_SCN_MEM_READ = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6529:1: IMAGE_SCN_MEM_SHARED = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6527:1: IMAGE_SCN_MEM_WRITE = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:6530:1: IMAGE_SCN_NO_DEFER_SPEC_EXC = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:6498:1: IMAGE_SCN_SCALE_INDEX = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:6532:1: IMAGE_SCN_TYPE_NO_PAD = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:6489:1: IMAGE_SEPARATE_DEBUG_FLAGS_MASK = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:7576:1: IMAGE_SEPARATE_DEBUG_MISMATCH = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:7577:1: IMAGE_SEPARATE_DEBUG_SIGNATURE = 0x4944 // /usr/x86_64-w64-mingw32/include/winnt.h:7573:1: IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60 // /usr/x86_64-w64-mingw32/include/winnt.h:7144:1: IMAGE_SIZEOF_AUX_SYMBOL = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:6738:1: IMAGE_SIZEOF_BASE_RELOCATION = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:7113:1: IMAGE_SIZEOF_FILE_HEADER = 20 // /usr/x86_64-w64-mingw32/include/winnt.h:6197:1: IMAGE_SIZEOF_LINENUMBER = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:7103:1: IMAGE_SIZEOF_NT_OPTIONAL32_HEADER = 224 // /usr/x86_64-w64-mingw32/include/winnt.h:6341:1: IMAGE_SIZEOF_NT_OPTIONAL64_HEADER = 240 // /usr/x86_64-w64-mingw32/include/winnt.h:6342:1: IMAGE_SIZEOF_NT_OPTIONAL_HEADER = 240 // /usr/x86_64-w64-mingw32/include/winnt.h:6351:1: IMAGE_SIZEOF_RELOCATION = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:6766:1: IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56 // /usr/x86_64-w64-mingw32/include/winnt.h:6339:1: IMAGE_SIZEOF_SECTION_HEADER = 40 // /usr/x86_64-w64-mingw32/include/winnt.h:6487:1: IMAGE_SIZEOF_SHORT_NAME = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:6469:1: IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28 // /usr/x86_64-w64-mingw32/include/winnt.h:6340:1: IMAGE_SIZEOF_SYMBOL = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:6552:1: IMAGE_SUBSYSTEM_EFI_APPLICATION = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:6395:1: IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:6396:1: IMAGE_SUBSYSTEM_EFI_ROM = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:6398:1: IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:6397:1: IMAGE_SUBSYSTEM_NATIVE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:6388:1: IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:6393:1: IMAGE_SUBSYSTEM_OS2_CUI = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:6391:1: IMAGE_SUBSYSTEM_POSIX_CUI = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:6392:1: IMAGE_SUBSYSTEM_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:6387:1: IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:6400:1: IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:6394:1: IMAGE_SUBSYSTEM_WINDOWS_CUI = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:6390:1: IMAGE_SUBSYSTEM_WINDOWS_GUI = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6389:1: IMAGE_SUBSYSTEM_XBOX = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:6399:1: IMAGE_SYM_CLASS_ARGUMENT = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6609:1: IMAGE_SYM_CLASS_AUTOMATIC = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6601:1: IMAGE_SYM_CLASS_BIT_FIELD = 0x0012 // /usr/x86_64-w64-mingw32/include/winnt.h:6618:1: IMAGE_SYM_CLASS_BLOCK = 0x0064 // /usr/x86_64-w64-mingw32/include/winnt.h:6620:1: IMAGE_SYM_CLASS_CLR_TOKEN = 0x006B // /usr/x86_64-w64-mingw32/include/winnt.h:6626:1: IMAGE_SYM_CLASS_END_OF_STRUCT = 0x0066 // /usr/x86_64-w64-mingw32/include/winnt.h:6622:1: IMAGE_SYM_CLASS_ENUM_TAG = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6615:1: IMAGE_SYM_CLASS_EXTERNAL = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6602:1: IMAGE_SYM_CLASS_EXTERNAL_DEF = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6605:1: IMAGE_SYM_CLASS_FAR_EXTERNAL = 0x0044 // /usr/x86_64-w64-mingw32/include/winnt.h:6619:1: IMAGE_SYM_CLASS_FILE = 0x0067 // /usr/x86_64-w64-mingw32/include/winnt.h:6623:1: IMAGE_SYM_CLASS_FUNCTION = 0x0065 // /usr/x86_64-w64-mingw32/include/winnt.h:6621:1: IMAGE_SYM_CLASS_LABEL = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6606:1: IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:6616:1: IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6608:1: IMAGE_SYM_CLASS_MEMBER_OF_UNION = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6611:1: IMAGE_SYM_CLASS_NULL = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6600:1: IMAGE_SYM_CLASS_REGISTER = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6604:1: IMAGE_SYM_CLASS_REGISTER_PARAM = 0x0011 // /usr/x86_64-w64-mingw32/include/winnt.h:6617:1: IMAGE_SYM_CLASS_SECTION = 0x0068 // /usr/x86_64-w64-mingw32/include/winnt.h:6624:1: IMAGE_SYM_CLASS_STATIC = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6603:1: IMAGE_SYM_CLASS_STRUCT_TAG = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6610:1: IMAGE_SYM_CLASS_TYPE_DEFINITION = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6613:1: IMAGE_SYM_CLASS_UNDEFINED_LABEL = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6607:1: IMAGE_SYM_CLASS_UNDEFINED_STATIC = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6614:1: IMAGE_SYM_CLASS_UNION_TAG = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6612:1: IMAGE_SYM_CLASS_WEAK_EXTERNAL = 0x0069 // /usr/x86_64-w64-mingw32/include/winnt.h:6625:1: IMAGE_SYM_DTYPE_ARRAY = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:6597:1: IMAGE_SYM_DTYPE_FUNCTION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6596:1: IMAGE_SYM_DTYPE_NULL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:6594:1: IMAGE_SYM_DTYPE_POINTER = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:6595:1: IMAGE_SYM_SECTION_MAX = 0xFEFF // /usr/x86_64-w64-mingw32/include/winnt.h:6573:1: IMAGE_SYM_SECTION_MAX_EX = 2147483647 // /usr/x86_64-w64-mingw32/include/winnt.h:6574:1: IMAGE_SYM_TYPE_BYTE = 0x000C // /usr/x86_64-w64-mingw32/include/winnt.h:6588:1: IMAGE_SYM_TYPE_CHAR = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:6578:1: IMAGE_SYM_TYPE_DOUBLE = 0x0007 // /usr/x86_64-w64-mingw32/include/winnt.h:6583:1: IMAGE_SYM_TYPE_DWORD = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6591:1: IMAGE_SYM_TYPE_ENUM = 0x000A // /usr/x86_64-w64-mingw32/include/winnt.h:6586:1: IMAGE_SYM_TYPE_FLOAT = 0x0006 // /usr/x86_64-w64-mingw32/include/winnt.h:6582:1: IMAGE_SYM_TYPE_INT = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:6580:1: IMAGE_SYM_TYPE_LONG = 0x0005 // /usr/x86_64-w64-mingw32/include/winnt.h:6581:1: IMAGE_SYM_TYPE_MOE = 0x000B // /usr/x86_64-w64-mingw32/include/winnt.h:6587:1: IMAGE_SYM_TYPE_NULL = 0x0000 // /usr/x86_64-w64-mingw32/include/winnt.h:6576:1: IMAGE_SYM_TYPE_PCODE = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:6592:1: IMAGE_SYM_TYPE_SHORT = 0x0003 // /usr/x86_64-w64-mingw32/include/winnt.h:6579:1: IMAGE_SYM_TYPE_STRUCT = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:6584:1: IMAGE_SYM_TYPE_UINT = 0x000E // /usr/x86_64-w64-mingw32/include/winnt.h:6590:1: IMAGE_SYM_TYPE_UNION = 0x0009 // /usr/x86_64-w64-mingw32/include/winnt.h:6585:1: IMAGE_SYM_TYPE_VOID = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:6577:1: IMAGE_SYM_TYPE_WORD = 0x000D // /usr/x86_64-w64-mingw32/include/winnt.h:6589:1: IMAGE_VXD_SIGNATURE = 0x454C // /usr/x86_64-w64-mingw32/include/winnt.h:6071:1: IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:6754:1: IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6753:1: IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:6752:1: IMC_CLOSESTATUSWINDOW = 0x0021 // /usr/x86_64-w64-mingw32/include/imm.h:237:1: IMC_GETCANDIDATEPOS = 0x0007 // /usr/x86_64-w64-mingw32/include/imm.h:229:1: IMC_GETCOMPOSITIONFONT = 0x0009 // /usr/x86_64-w64-mingw32/include/imm.h:231:1: IMC_GETCOMPOSITIONWINDOW = 0x000B // /usr/x86_64-w64-mingw32/include/imm.h:233:1: IMC_GETSTATUSWINDOWPOS = 0x000F // /usr/x86_64-w64-mingw32/include/imm.h:235:1: IMC_OPENSTATUSWINDOW = 0x0022 // /usr/x86_64-w64-mingw32/include/imm.h:238:1: IMC_SETCANDIDATEPOS = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:230:1: IMC_SETCOMPOSITIONFONT = 0x000A // /usr/x86_64-w64-mingw32/include/imm.h:232:1: IMC_SETCOMPOSITIONWINDOW = 0x000C // /usr/x86_64-w64-mingw32/include/imm.h:234:1: IMC_SETSTATUSWINDOWPOS = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:236:1: IMEMENUITEM_STRING_SIZE = 80 // /usr/x86_64-w64-mingw32/include/imm.h:93:1: IMEVER_0310 = 0x0003000A // /usr/x86_64-w64-mingw32/include/imm.h:311:1: IMEVER_0400 = 0x00040000 // /usr/x86_64-w64-mingw32/include/imm.h:312:1: IME_CAND_CODE = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:421:1: IME_CAND_MEANING = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:422:1: IME_CAND_RADICAL = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:423:1: IME_CAND_READ = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:420:1: IME_CAND_STROKE = 0x0005 // /usr/x86_64-w64-mingw32/include/imm.h:424:1: IME_CAND_UNKNOWN = 0x0000 // /usr/x86_64-w64-mingw32/include/imm.h:419:1: IME_CHOTKEY_IME_NONIME_TOGGLE = 0x10 // /usr/x86_64-w64-mingw32/include/imm.h:271:1: IME_CHOTKEY_SHAPE_TOGGLE = 0x11 // /usr/x86_64-w64-mingw32/include/imm.h:272:1: IME_CHOTKEY_SYMBOL_TOGGLE = 0x12 // /usr/x86_64-w64-mingw32/include/imm.h:273:1: IME_CMODE_ALPHANUMERIC = 0x0000 // /usr/x86_64-w64-mingw32/include/imm.h:391:1: IME_CMODE_CHARCODE = 0x0020 // /usr/x86_64-w64-mingw32/include/imm.h:402:1: IME_CMODE_CHINESE = 1 // /usr/x86_64-w64-mingw32/include/imm.h:393:1: IME_CMODE_EUDC = 0x0200 // /usr/x86_64-w64-mingw32/include/imm.h:406:1: IME_CMODE_FIXED = 0x0800 // /usr/x86_64-w64-mingw32/include/imm.h:408:1: IME_CMODE_FULLSHAPE = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:400:1: IME_CMODE_HANGEUL = 1 // /usr/x86_64-w64-mingw32/include/imm.h:395:1: IME_CMODE_HANGUL = 1 // /usr/x86_64-w64-mingw32/include/imm.h:396:1: IME_CMODE_HANJACONVERT = 0x0040 // /usr/x86_64-w64-mingw32/include/imm.h:403:1: IME_CMODE_JAPANESE = 1 // /usr/x86_64-w64-mingw32/include/imm.h:397:1: IME_CMODE_KATAKANA = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:398:1: IME_CMODE_LANGUAGE = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:399:1: IME_CMODE_NATIVE = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:392:1: IME_CMODE_NOCONVERSION = 0x0100 // /usr/x86_64-w64-mingw32/include/imm.h:405:1: IME_CMODE_RESERVED = 0xF0000000 // /usr/x86_64-w64-mingw32/include/imm.h:409:1: IME_CMODE_ROMAN = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:401:1: IME_CMODE_SOFTKBD = 0x0080 // /usr/x86_64-w64-mingw32/include/imm.h:404:1: IME_CMODE_SYMBOL = 0x0400 // /usr/x86_64-w64-mingw32/include/imm.h:407:1: IME_CONFIG_GENERAL = 1 // /usr/x86_64-w64-mingw32/include/imm.h:452:1: IME_CONFIG_REGISTERWORD = 2 // /usr/x86_64-w64-mingw32/include/imm.h:453:1: IME_CONFIG_SELECTDICTIONARY = 3 // /usr/x86_64-w64-mingw32/include/imm.h:454:1: IME_ESC_AUTOMATA = 0x1009 // /usr/x86_64-w64-mingw32/include/imm.h:469:1: IME_ESC_GETHELPFILENAME = 0x100b // /usr/x86_64-w64-mingw32/include/imm.h:471:1: IME_ESC_GET_EUDC_DICTIONARY = 0x1003 // /usr/x86_64-w64-mingw32/include/imm.h:463:1: IME_ESC_HANJA_MODE = 0x1008 // /usr/x86_64-w64-mingw32/include/imm.h:468:1: IME_ESC_IME_NAME = 0x1006 // /usr/x86_64-w64-mingw32/include/imm.h:466:1: IME_ESC_MAX_KEY = 0x1005 // /usr/x86_64-w64-mingw32/include/imm.h:465:1: IME_ESC_PRIVATE_FIRST = 0x0800 // /usr/x86_64-w64-mingw32/include/imm.h:459:1: IME_ESC_PRIVATE_HOTKEY = 0x100a // /usr/x86_64-w64-mingw32/include/imm.h:470:1: IME_ESC_PRIVATE_LAST = 0x0FFF // /usr/x86_64-w64-mingw32/include/imm.h:460:1: IME_ESC_QUERY_SUPPORT = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:456:1: IME_ESC_RESERVED_FIRST = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:457:1: IME_ESC_RESERVED_LAST = 0x07FF // /usr/x86_64-w64-mingw32/include/imm.h:458:1: IME_ESC_SEQUENCE_TO_INTERNAL = 0x1001 // /usr/x86_64-w64-mingw32/include/imm.h:462:1: IME_ESC_SET_EUDC_DICTIONARY = 0x1004 // /usr/x86_64-w64-mingw32/include/imm.h:464:1: IME_ESC_SYNC_HOTKEY = 0x1007 // /usr/x86_64-w64-mingw32/include/imm.h:467:1: IME_HOTKEY_DSWITCH_FIRST = 0x100 // /usr/x86_64-w64-mingw32/include/imm.h:285:1: IME_HOTKEY_DSWITCH_LAST = 0x11F // /usr/x86_64-w64-mingw32/include/imm.h:286:1: IME_HOTKEY_PRIVATE_FIRST = 0x200 // /usr/x86_64-w64-mingw32/include/imm.h:288:1: IME_HOTKEY_PRIVATE_LAST = 0x21F // /usr/x86_64-w64-mingw32/include/imm.h:293:1: IME_ITHOTKEY_PREVIOUS_COMPOSITION = 0x201 // /usr/x86_64-w64-mingw32/include/imm.h:290:1: IME_ITHOTKEY_RECONVERTSTRING = 0x203 // /usr/x86_64-w64-mingw32/include/imm.h:292:1: IME_ITHOTKEY_RESEND_RESULTSTR = 0x200 // /usr/x86_64-w64-mingw32/include/imm.h:289:1: IME_ITHOTKEY_UISTYLE_TOGGLE = 0x202 // /usr/x86_64-w64-mingw32/include/imm.h:291:1: IME_JHOTKEY_CLOSE_OPEN = 0x30 // /usr/x86_64-w64-mingw32/include/imm.h:275:1: IME_KHOTKEY_ENGLISH = 0x52 // /usr/x86_64-w64-mingw32/include/imm.h:279:1: IME_KHOTKEY_HANJACONVERT = 0x51 // /usr/x86_64-w64-mingw32/include/imm.h:278:1: IME_KHOTKEY_SHAPE_TOGGLE = 0x50 // /usr/x86_64-w64-mingw32/include/imm.h:277:1: IME_PROP_AT_CARET = 0x00010000 // /usr/x86_64-w64-mingw32/include/imm.h:314:1: IME_PROP_CANDLIST_START_FROM_1 = 0x00040000 // /usr/x86_64-w64-mingw32/include/imm.h:316:1: IME_PROP_COMPLETE_ON_UNSELECT = 0x00100000 // /usr/x86_64-w64-mingw32/include/imm.h:318:1: IME_PROP_SPECIAL_UI = 0x00020000 // /usr/x86_64-w64-mingw32/include/imm.h:315:1: IME_PROP_UNICODE = 0x00080000 // /usr/x86_64-w64-mingw32/include/imm.h:317:1: IME_REGWORD_STYLE_EUDC = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:473:1: IME_REGWORD_STYLE_USER_FIRST = 0x80000000 // /usr/x86_64-w64-mingw32/include/imm.h:474:1: IME_REGWORD_STYLE_USER_LAST = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/imm.h:475:1: IME_SMODE_AUTOMATIC = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:414:1: IME_SMODE_CONVERSATION = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:416:1: IME_SMODE_NONE = 0x0000 // /usr/x86_64-w64-mingw32/include/imm.h:411:1: IME_SMODE_PHRASEPREDICT = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:415:1: IME_SMODE_PLAURALCLAUSE = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:412:1: IME_SMODE_RESERVED = 0x0000F000 // /usr/x86_64-w64-mingw32/include/imm.h:417:1: IME_SMODE_SINGLECONVERT = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:413:1: IME_THOTKEY_IME_NONIME_TOGGLE = 0x70 // /usr/x86_64-w64-mingw32/include/imm.h:281:1: IME_THOTKEY_SHAPE_TOGGLE = 0x71 // /usr/x86_64-w64-mingw32/include/imm.h:282:1: IME_THOTKEY_SYMBOL_TOGGLE = 0x72 // /usr/x86_64-w64-mingw32/include/imm.h:283:1: IMFS_CHECKED = 8 // /usr/x86_64-w64-mingw32/include/imm.h:497:1: IMFS_DEFAULT = 4096 // /usr/x86_64-w64-mingw32/include/imm.h:502:1: IMFS_DISABLED = 3 // /usr/x86_64-w64-mingw32/include/imm.h:496:1: IMFS_ENABLED = 0 // /usr/x86_64-w64-mingw32/include/imm.h:499:1: IMFS_GRAYED = 3 // /usr/x86_64-w64-mingw32/include/imm.h:495:1: IMFS_HILITE = 128 // /usr/x86_64-w64-mingw32/include/imm.h:498:1: IMFS_UNCHECKED = 0 // /usr/x86_64-w64-mingw32/include/imm.h:500:1: IMFS_UNHILITE = 0 // /usr/x86_64-w64-mingw32/include/imm.h:501:1: IMFT_RADIOCHECK = 0x00001 // /usr/x86_64-w64-mingw32/include/imm.h:491:1: IMFT_SEPARATOR = 0x00002 // /usr/x86_64-w64-mingw32/include/imm.h:492:1: IMFT_SUBMENU = 0x00004 // /usr/x86_64-w64-mingw32/include/imm.h:493:1: IMM_ERROR_GENERAL = -2 // /usr/x86_64-w64-mingw32/include/imm.h:450:1: IMM_ERROR_NODATA = -1 // /usr/x86_64-w64-mingw32/include/imm.h:449:1: IMN_CHANGECANDIDATE = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:428:1: IMN_CLOSECANDIDATE = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:429:1: IMN_CLOSESTATUSWINDOW = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:426:1: IMN_GUIDELINE = 0x000D // /usr/x86_64-w64-mingw32/include/imm.h:438:1: IMN_OPENCANDIDATE = 0x0005 // /usr/x86_64-w64-mingw32/include/imm.h:430:1: IMN_OPENSTATUSWINDOW = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:427:1: IMN_PRIVATE = 0x000E // /usr/x86_64-w64-mingw32/include/imm.h:439:1: IMN_SETCANDIDATEPOS = 0x0009 // /usr/x86_64-w64-mingw32/include/imm.h:434:1: IMN_SETCOMPOSITIONFONT = 0x000A // /usr/x86_64-w64-mingw32/include/imm.h:435:1: IMN_SETCOMPOSITIONWINDOW = 0x000B // /usr/x86_64-w64-mingw32/include/imm.h:436:1: IMN_SETCONVERSIONMODE = 0x0006 // /usr/x86_64-w64-mingw32/include/imm.h:431:1: IMN_SETOPENSTATUS = 0x0008 // /usr/x86_64-w64-mingw32/include/imm.h:433:1: IMN_SETSENTENCEMODE = 0x0007 // /usr/x86_64-w64-mingw32/include/imm.h:432:1: IMN_SETSTATUSWINDOWPOS = 0x000C // /usr/x86_64-w64-mingw32/include/imm.h:437:1: IMPLINK_HIGHEXPER = 158 // /usr/x86_64-w64-mingw32/include/winsock.h:111:1: IMPLINK_IP = 155 // /usr/x86_64-w64-mingw32/include/winsock.h:109:1: IMPLINK_LOWEXPER = 156 // /usr/x86_64-w64-mingw32/include/winsock.h:110:1: IMPLTYPEFLAG_FDEFAULT = 1 // /usr/x86_64-w64-mingw32/include/oaidl.h:836:1: IMPLTYPEFLAG_FDEFAULTVTABLE = 8 // /usr/x86_64-w64-mingw32/include/oaidl.h:842:1: IMPLTYPEFLAG_FRESTRICTED = 4 // /usr/x86_64-w64-mingw32/include/oaidl.h:840:1: IMPLTYPEFLAG_FSOURCE = 2 // /usr/x86_64-w64-mingw32/include/oaidl.h:838:1: IMPORT_OBJECT_HDR_SIG2 = 0xffff // /usr/x86_64-w64-mingw32/include/winnt.h:7593:1: IMR_CANDIDATEWINDOW = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:442:1: IMR_COMPOSITIONFONT = 0x0003 // /usr/x86_64-w64-mingw32/include/imm.h:443:1: IMR_COMPOSITIONWINDOW = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:441:1: IMR_CONFIRMRECONVERTSTRING = 0x0005 // /usr/x86_64-w64-mingw32/include/imm.h:445:1: IMR_DOCUMENTFEED = 0x0007 // /usr/x86_64-w64-mingw32/include/imm.h:447:1: IMR_QUERYCHARPOSITION = 0x0006 // /usr/x86_64-w64-mingw32/include/imm.h:446:1: IMR_RECONVERTSTRING = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:444:1: IN = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:57:1: INADDR_LOOPBACK = 0x7f000001 // /usr/x86_64-w64-mingw32/include/winsock.h:132:1: INADDR_NONE = 0xffffffff // /usr/x86_64-w64-mingw32/include/winsock.h:134:1: INCRINIT_NORMAL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:98614:1: INCRINIT_ROOT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:98616:1: INCRINIT_TASK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:98615:1: INDEXID_CONTAINER = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5903:1: INDEXID_OBJECT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5902:1: INFINITE = 0xffffffff // /usr/x86_64-w64-mingw32/include/winbase.h:480:1: INHERITED_ACE = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:3340:1: INHERIT_CALLER_PRIORITY = 0x20000 // /usr/x86_64-w64-mingw32/include/winbase.h:394:1: INHERIT_ONLY_ACE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3339:1: INHERIT_PARENT_AFFINITY = 0x10000 // /usr/x86_64-w64-mingw32/include/winbase.h:393:1: INITFLAG_AlterAdd = 0x0003 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19127:1: INITFLAG_AlterDrop = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19126:1: INITFLAG_AlterMask = 0x0003 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19124:1: INITFLAG_AlterRename = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19125:1: INITIAL_FPCSR = 0x027f // /usr/x86_64-w64-mingw32/include/winnt.h:1677:1: INITIAL_MXCSR = 0x1f80 // /usr/x86_64-w64-mingw32/include/winnt.h:1676:1: INIT_ONCE_ASYNC = 2 // /usr/x86_64-w64-mingw32/include/synchapi.h:22:1: INIT_ONCE_CHECK_ONLY = 1 // /usr/x86_64-w64-mingw32/include/synchapi.h:21:1: INIT_ONCE_CTX_RESERVED_BITS = 2 // /usr/x86_64-w64-mingw32/include/synchapi.h:25:1: INIT_ONCE_INIT_FAILED = 4 // /usr/x86_64-w64-mingw32/include/synchapi.h:23:1: INLINEFUNC_affinity = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17153:1: INLINEFUNC_coalesce = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17149:1: INLINEFUNC_expr_compare = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17152:1: INLINEFUNC_expr_implies_expr = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17151:1: INLINEFUNC_iif = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17154:1: INLINEFUNC_implies_nonnull_row = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17150:1: INLINEFUNC_unlikely = 99 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17155:1: INPLACE_E_FIRST = 2147746208 // /usr/x86_64-w64-mingw32/include/winerror.h:2420:1: INPLACE_E_LAST = 2147746223 // /usr/x86_64-w64-mingw32/include/winerror.h:2421:1: INPLACE_S_FIRST = 262560 // /usr/x86_64-w64-mingw32/include/winerror.h:2422:1: INPLACE_S_LAST = 262575 // /usr/x86_64-w64-mingw32/include/winerror.h:2423:1: INPUTLANGCHANGE_BACKWARD = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:741:1: INPUTLANGCHANGE_FORWARD = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:740:1: INPUTLANGCHANGE_SYSCHARSET = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:739:1: INPUT_HARDWARE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:2621:1: INPUT_KEYBOARD = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:2620:1: INPUT_MOUSE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:2619:1: INTERNATIONAL_USAGE = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:652:1: INT_MAX = 2147483647 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:120:1: INT_MIN = -2147483648 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:118:1: INVALID_OS_COUNT = 65535 // /usr/x86_64-w64-mingw32/include/winnt.h:8264:1: IN_CLASSA_HOST = 0x00ffffff // /usr/x86_64-w64-mingw32/include/winsock.h:117:1: IN_CLASSA_MAX = 128 // /usr/x86_64-w64-mingw32/include/winsock.h:118:1: IN_CLASSA_NET = 0xff000000 // /usr/x86_64-w64-mingw32/include/winsock.h:115:1: IN_CLASSA_NSHIFT = 24 // /usr/x86_64-w64-mingw32/include/winsock.h:116:1: IN_CLASSB_HOST = 0x0000ffff // /usr/x86_64-w64-mingw32/include/winsock.h:123:1: IN_CLASSB_MAX = 65536 // /usr/x86_64-w64-mingw32/include/winsock.h:124:1: IN_CLASSB_NET = 0xffff0000 // /usr/x86_64-w64-mingw32/include/winsock.h:121:1: IN_CLASSB_NSHIFT = 16 // /usr/x86_64-w64-mingw32/include/winsock.h:122:1: IN_CLASSC_HOST = 0x000000ff // /usr/x86_64-w64-mingw32/include/winsock.h:129:1: IN_CLASSC_NET = 0xffffff00 // /usr/x86_64-w64-mingw32/include/winsock.h:127:1: IN_CLASSC_NSHIFT = 8 // /usr/x86_64-w64-mingw32/include/winsock.h:128:1: IN_INDEX_EPH = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20483:1: IN_INDEX_INDEX_ASC = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20484:1: IN_INDEX_INDEX_DESC = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20485:1: IN_INDEX_LOOP = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20492:1: IN_INDEX_MEMBERSHIP = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20491:1: IN_INDEX_NOOP = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20486:1: IN_INDEX_NOOP_OK = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20490:1: IN_INDEX_ROWID = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20482:1: IOCPARM_MASK = 0x7f // /usr/x86_64-w64-mingw32/include/winsock.h:46:1: IOCTL_CHANGER_BASE = 48 // /usr/x86_64-w64-mingw32/include/winioctl.h:973:1: IOCTL_CHANGER_EXCHANGE_MEDIUM = 3162144 // /usr/x86_64-w64-mingw32/include/winioctl.h:981:1: IOCTL_CHANGER_GET_ELEMENT_STATUS = 3194900 // /usr/x86_64-w64-mingw32/include/winioctl.h:978:1: IOCTL_CHANGER_GET_PARAMETERS = 3162112 // /usr/x86_64-w64-mingw32/include/winioctl.h:974:1: IOCTL_CHANGER_GET_PRODUCT_DATA = 3162120 // /usr/x86_64-w64-mingw32/include/winioctl.h:976:1: IOCTL_CHANGER_GET_STATUS = 3162116 // /usr/x86_64-w64-mingw32/include/winioctl.h:975:1: IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS = 3162136 // /usr/x86_64-w64-mingw32/include/winioctl.h:979:1: IOCTL_CHANGER_MOVE_MEDIUM = 3162148 // /usr/x86_64-w64-mingw32/include/winioctl.h:982:1: IOCTL_CHANGER_QUERY_VOLUME_TAGS = 3194924 // /usr/x86_64-w64-mingw32/include/winioctl.h:984:1: IOCTL_CHANGER_REINITIALIZE_TRANSPORT = 3162152 // /usr/x86_64-w64-mingw32/include/winioctl.h:983:1: IOCTL_CHANGER_SET_ACCESS = 3194896 // /usr/x86_64-w64-mingw32/include/winioctl.h:977:1: IOCTL_CHANGER_SET_POSITION = 3162140 // /usr/x86_64-w64-mingw32/include/winioctl.h:980:1: IOCTL_DISK_BASE = 7 // /usr/x86_64-w64-mingw32/include/winioctl.h:446:1: IOCTL_DISK_CHECK_VERIFY = 477184 // /usr/x86_64-w64-mingw32/include/winioctl.h:490:1: IOCTL_DISK_CONTROLLER_NUMBER = 458820 // /usr/x86_64-w64-mingw32/include/winioctl.h:465:1: IOCTL_DISK_CREATE_DISK = 507992 // /usr/x86_64-w64-mingw32/include/winioctl.h:475:1: IOCTL_DISK_DELETE_DRIVE_LAYOUT = 508160 // /usr/x86_64-w64-mingw32/include/winioctl.h:485:1: IOCTL_DISK_EJECT_MEDIA = 477192 // /usr/x86_64-w64-mingw32/include/winioctl.h:492:1: IOCTL_DISK_FIND_NEW_DEVICES = 477208 // /usr/x86_64-w64-mingw32/include/winioctl.h:496:1: IOCTL_DISK_FORMAT_DRIVE = 508876 // /usr/x86_64-w64-mingw32/include/winioctl.h:488:1: IOCTL_DISK_FORMAT_TRACKS = 507928 // /usr/x86_64-w64-mingw32/include/winioctl.h:453:1: IOCTL_DISK_FORMAT_TRACKS_EX = 507948 // /usr/x86_64-w64-mingw32/include/winioctl.h:458:1: IOCTL_DISK_GET_CACHE_INFORMATION = 475348 // /usr/x86_64-w64-mingw32/include/winioctl.h:482:1: IOCTL_DISK_GET_DRIVE_GEOMETRY = 458752 // /usr/x86_64-w64-mingw32/include/winioctl.h:447:1: IOCTL_DISK_GET_DRIVE_GEOMETRY_EX = 458912 // /usr/x86_64-w64-mingw32/include/winioctl.h:477:1: IOCTL_DISK_GET_DRIVE_LAYOUT = 475148 // /usr/x86_64-w64-mingw32/include/winioctl.h:450:1: IOCTL_DISK_GET_DRIVE_LAYOUT_EX = 458832 // /usr/x86_64-w64-mingw32/include/winioctl.h:473:1: IOCTL_DISK_GET_LENGTH_INFO = 475228 // /usr/x86_64-w64-mingw32/include/winioctl.h:476:1: IOCTL_DISK_GET_MEDIA_TYPES = 461824 // /usr/x86_64-w64-mingw32/include/winioctl.h:497:1: IOCTL_DISK_GET_PARTITION_INFO = 475140 // /usr/x86_64-w64-mingw32/include/winioctl.h:448:1: IOCTL_DISK_GET_PARTITION_INFO_EX = 458824 // /usr/x86_64-w64-mingw32/include/winioctl.h:471:1: IOCTL_DISK_GROW_PARTITION = 508112 // /usr/x86_64-w64-mingw32/include/winioctl.h:481:1: IOCTL_DISK_HISTOGRAM_DATA = 458804 // /usr/x86_64-w64-mingw32/include/winioctl.h:460:1: IOCTL_DISK_HISTOGRAM_RESET = 458808 // /usr/x86_64-w64-mingw32/include/winioctl.h:461:1: IOCTL_DISK_HISTOGRAM_STRUCTURE = 458800 // /usr/x86_64-w64-mingw32/include/winioctl.h:459:1: IOCTL_DISK_IS_WRITABLE = 458788 // /usr/x86_64-w64-mingw32/include/winioctl.h:456:1: IOCTL_DISK_LOAD_MEDIA = 477196 // /usr/x86_64-w64-mingw32/include/winioctl.h:493:1: IOCTL_DISK_LOGGING = 458792 // /usr/x86_64-w64-mingw32/include/winioctl.h:457:1: IOCTL_DISK_MEDIA_REMOVAL = 477188 // /usr/x86_64-w64-mingw32/include/winioctl.h:491:1: IOCTL_DISK_PERFORMANCE = 458784 // /usr/x86_64-w64-mingw32/include/winioctl.h:455:1: IOCTL_DISK_PERFORMANCE_OFF = 458848 // /usr/x86_64-w64-mingw32/include/winioctl.h:464:1: IOCTL_DISK_REASSIGN_BLOCKS = 507932 // /usr/x86_64-w64-mingw32/include/winioctl.h:454:1: IOCTL_DISK_REASSIGN_BLOCKS_EX = 508068 // /usr/x86_64-w64-mingw32/include/winioctl.h:479:1: IOCTL_DISK_RELEASE = 477204 // /usr/x86_64-w64-mingw32/include/winioctl.h:495:1: IOCTL_DISK_REQUEST_DATA = 458816 // /usr/x86_64-w64-mingw32/include/winioctl.h:463:1: IOCTL_DISK_REQUEST_STRUCTURE = 458812 // /usr/x86_64-w64-mingw32/include/winioctl.h:462:1: IOCTL_DISK_RESERVE = 477200 // /usr/x86_64-w64-mingw32/include/winioctl.h:494:1: IOCTL_DISK_RESET_SNAPSHOT_INFO = 508432 // /usr/x86_64-w64-mingw32/include/winioctl.h:487:1: IOCTL_DISK_SENSE_DEVICE = 459744 // /usr/x86_64-w64-mingw32/include/winioctl.h:489:1: IOCTL_DISK_SET_CACHE_INFORMATION = 508120 // /usr/x86_64-w64-mingw32/include/winioctl.h:483:1: IOCTL_DISK_SET_DRIVE_LAYOUT = 507920 // /usr/x86_64-w64-mingw32/include/winioctl.h:451:1: IOCTL_DISK_SET_DRIVE_LAYOUT_EX = 507988 // /usr/x86_64-w64-mingw32/include/winioctl.h:474:1: IOCTL_DISK_SET_PARTITION_INFO = 507912 // /usr/x86_64-w64-mingw32/include/winioctl.h:449:1: IOCTL_DISK_SET_PARTITION_INFO_EX = 507980 // /usr/x86_64-w64-mingw32/include/winioctl.h:472:1: IOCTL_DISK_UPDATE_DRIVE_SIZE = 508104 // /usr/x86_64-w64-mingw32/include/winioctl.h:480:1: IOCTL_DISK_UPDATE_PROPERTIES = 459072 // /usr/x86_64-w64-mingw32/include/winioctl.h:486:1: IOCTL_DISK_VERIFY = 458772 // /usr/x86_64-w64-mingw32/include/winioctl.h:452:1: IOCTL_SERENUM_EXPOSE_HARDWARE = 3604992 // /usr/x86_64-w64-mingw32/include/winioctl.h:1239:1: IOCTL_SERENUM_GET_PORT_NAME = 3605004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1242:1: IOCTL_SERENUM_PORT_DESC = 3605000 // /usr/x86_64-w64-mingw32/include/winioctl.h:1241:1: IOCTL_SERENUM_REMOVE_HARDWARE = 3604996 // /usr/x86_64-w64-mingw32/include/winioctl.h:1240:1: IOCTL_SERIAL_LSRMST_INSERT = 1769596 // /usr/x86_64-w64-mingw32/include/winioctl.h:1237:1: IOCTL_SMARTCARD_CONFISCATE = 3211280 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:60:1: IOCTL_SMARTCARD_EJECT = 3211288 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:62:1: IOCTL_SMARTCARD_GET_ATTRIBUTE = 3211272 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:58:1: IOCTL_SMARTCARD_GET_LAST_ERROR = 3211324 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:69:1: IOCTL_SMARTCARD_GET_PERF_CNTR = 3211328 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:70:1: IOCTL_SMARTCARD_GET_STATE = 3211320 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:68:1: IOCTL_SMARTCARD_IS_ABSENT = 3211308 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:66:1: IOCTL_SMARTCARD_IS_PRESENT = 3211304 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:65:1: IOCTL_SMARTCARD_POWER = 3211268 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:57:1: IOCTL_SMARTCARD_SET_ATTRIBUTE = 3211276 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:59:1: IOCTL_SMARTCARD_SET_PROTOCOL = 3211312 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:67:1: IOCTL_SMARTCARD_SWALLOW = 3211292 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:63:1: IOCTL_SMARTCARD_TRANSMIT = 3211284 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:61:1: IOCTL_STORAGE_BASE = 45 // /usr/x86_64-w64-mingw32/include/winioctl.h:162:1: IOCTL_STORAGE_BREAK_RESERVATION = 2969620 // /usr/x86_64-w64-mingw32/include/winioctl.h:185:1: IOCTL_STORAGE_CHECK_VERIFY = 2967552 // /usr/x86_64-w64-mingw32/include/winioctl.h:164:1: IOCTL_STORAGE_CHECK_VERIFY2 = 2951168 // /usr/x86_64-w64-mingw32/include/winioctl.h:165:1: IOCTL_STORAGE_EJECTION_CONTROL = 2951488 // /usr/x86_64-w64-mingw32/include/winioctl.h:174:1: IOCTL_STORAGE_EJECT_MEDIA = 2967560 // /usr/x86_64-w64-mingw32/include/winioctl.h:167:1: IOCTL_STORAGE_FIND_NEW_DEVICES = 2967576 // /usr/x86_64-w64-mingw32/include/winioctl.h:172:1: IOCTL_STORAGE_GET_DEVICE_NUMBER = 2953344 // /usr/x86_64-w64-mingw32/include/winioctl.h:187:1: IOCTL_STORAGE_GET_HOTPLUG_INFO = 2952212 // /usr/x86_64-w64-mingw32/include/winioctl.h:180:1: IOCTL_STORAGE_GET_MEDIA_SERIAL_NUMBER = 2952208 // /usr/x86_64-w64-mingw32/include/winioctl.h:179:1: IOCTL_STORAGE_GET_MEDIA_TYPES = 2952192 // /usr/x86_64-w64-mingw32/include/winioctl.h:177:1: IOCTL_STORAGE_GET_MEDIA_TYPES_EX = 2952196 // /usr/x86_64-w64-mingw32/include/winioctl.h:178:1: IOCTL_STORAGE_LOAD_MEDIA = 2967564 // /usr/x86_64-w64-mingw32/include/winioctl.h:168:1: IOCTL_STORAGE_LOAD_MEDIA2 = 2951180 // /usr/x86_64-w64-mingw32/include/winioctl.h:169:1: IOCTL_STORAGE_MCN_CONTROL = 2951492 // /usr/x86_64-w64-mingw32/include/winioctl.h:175:1: IOCTL_STORAGE_MEDIA_REMOVAL = 2967556 // /usr/x86_64-w64-mingw32/include/winioctl.h:166:1: IOCTL_STORAGE_PREDICT_FAILURE = 2953472 // /usr/x86_64-w64-mingw32/include/winioctl.h:188:1: IOCTL_STORAGE_QUERY_PROPERTY = 2954240 // /usr/x86_64-w64-mingw32/include/winioctl.h:498:1: IOCTL_STORAGE_READ_CAPACITY = 2969920 // /usr/x86_64-w64-mingw32/include/winioctl.h:189:1: IOCTL_STORAGE_RELEASE = 2967572 // /usr/x86_64-w64-mingw32/include/winioctl.h:171:1: IOCTL_STORAGE_RESERVE = 2967568 // /usr/x86_64-w64-mingw32/include/winioctl.h:170:1: IOCTL_STORAGE_RESET_BUS = 2969600 // /usr/x86_64-w64-mingw32/include/winioctl.h:183:1: IOCTL_STORAGE_RESET_DEVICE = 2969604 // /usr/x86_64-w64-mingw32/include/winioctl.h:184:1: IOCTL_STORAGE_SET_HOTPLUG_INFO = 3001368 // /usr/x86_64-w64-mingw32/include/winioctl.h:181:1: IOC_IN = 0x80000000 // /usr/x86_64-w64-mingw32/include/winsock.h:49:1: IOC_INOUT = 3221225472 // /usr/x86_64-w64-mingw32/include/winsock.h:50:1: IOC_OUT = 0x40000000 // /usr/x86_64-w64-mingw32/include/winsock.h:48:1: IOC_VOID = 0x20000000 // /usr/x86_64-w64-mingw32/include/winsock.h:47:1: IO_COMPLETION_ALL_ACCESS = 2031619 // /usr/x86_64-w64-mingw32/include/winnt.h:5185:1: IO_COMPLETION_MODIFY_STATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:5184:1: IO_REPARSE_TAG_AF_UNIX = 2147483683 // /usr/x86_64-w64-mingw32/include/winnt.h:5152:1: IO_REPARSE_TAG_APPEXECLINK = 2147483675 // /usr/x86_64-w64-mingw32/include/winnt.h:5145:1: IO_REPARSE_TAG_CLOUD = 2415919130 // /usr/x86_64-w64-mingw32/include/winnt.h:5128:1: IO_REPARSE_TAG_CLOUD_1 = 2415923226 // /usr/x86_64-w64-mingw32/include/winnt.h:5129:1: IO_REPARSE_TAG_CLOUD_2 = 2415927322 // /usr/x86_64-w64-mingw32/include/winnt.h:5130:1: IO_REPARSE_TAG_CLOUD_3 = 2415931418 // /usr/x86_64-w64-mingw32/include/winnt.h:5131:1: IO_REPARSE_TAG_CLOUD_4 = 2415935514 // /usr/x86_64-w64-mingw32/include/winnt.h:5132:1: IO_REPARSE_TAG_CLOUD_5 = 2415939610 // /usr/x86_64-w64-mingw32/include/winnt.h:5133:1: IO_REPARSE_TAG_CLOUD_6 = 2415943706 // /usr/x86_64-w64-mingw32/include/winnt.h:5134:1: IO_REPARSE_TAG_CLOUD_7 = 2415947802 // /usr/x86_64-w64-mingw32/include/winnt.h:5135:1: IO_REPARSE_TAG_CLOUD_8 = 2415951898 // /usr/x86_64-w64-mingw32/include/winnt.h:5136:1: IO_REPARSE_TAG_CLOUD_9 = 2415955994 // /usr/x86_64-w64-mingw32/include/winnt.h:5137:1: IO_REPARSE_TAG_CLOUD_A = 2415960090 // /usr/x86_64-w64-mingw32/include/winnt.h:5138:1: IO_REPARSE_TAG_CLOUD_B = 2415964186 // /usr/x86_64-w64-mingw32/include/winnt.h:5139:1: IO_REPARSE_TAG_CLOUD_C = 2415968282 // /usr/x86_64-w64-mingw32/include/winnt.h:5140:1: IO_REPARSE_TAG_CLOUD_D = 2415972378 // /usr/x86_64-w64-mingw32/include/winnt.h:5141:1: IO_REPARSE_TAG_CLOUD_E = 2415976474 // /usr/x86_64-w64-mingw32/include/winnt.h:5142:1: IO_REPARSE_TAG_CLOUD_F = 2415980570 // /usr/x86_64-w64-mingw32/include/winnt.h:5143:1: IO_REPARSE_TAG_CLOUD_MASK = 61440 // /usr/x86_64-w64-mingw32/include/winnt.h:5144:1: IO_REPARSE_TAG_CSV = 2147483657 // /usr/x86_64-w64-mingw32/include/winnt.h:5115:1: IO_REPARSE_TAG_DEDUP = 2147483667 // /usr/x86_64-w64-mingw32/include/winnt.h:5121:1: IO_REPARSE_TAG_DFS = 2147483658 // /usr/x86_64-w64-mingw32/include/winnt.h:5116:1: IO_REPARSE_TAG_DFSR = 2147483666 // /usr/x86_64-w64-mingw32/include/winnt.h:5120:1: IO_REPARSE_TAG_DRIVE_EXTENDER = 2147483653 // /usr/x86_64-w64-mingw32/include/winnt.h:5111:1: IO_REPARSE_TAG_FILE_PLACEHOLDER = 2147483669 // /usr/x86_64-w64-mingw32/include/winnt.h:5123:1: IO_REPARSE_TAG_FILTER_MANAGER = 2147483659 // /usr/x86_64-w64-mingw32/include/winnt.h:5117:1: IO_REPARSE_TAG_GLOBAL_REPARSE = 2684354585 // /usr/x86_64-w64-mingw32/include/winnt.h:5127:1: IO_REPARSE_TAG_HSM = 3221225476 // /usr/x86_64-w64-mingw32/include/winnt.h:5110:1: IO_REPARSE_TAG_HSM2 = 2147483654 // /usr/x86_64-w64-mingw32/include/winnt.h:5112:1: IO_REPARSE_TAG_IIS_CACHE = 2684354576 // /usr/x86_64-w64-mingw32/include/winnt.h:5119:1: IO_REPARSE_TAG_MOUNT_POINT = 2684354563 // /usr/x86_64-w64-mingw32/include/winnt.h:5109:1: IO_REPARSE_TAG_NFS = 2147483668 // /usr/x86_64-w64-mingw32/include/winnt.h:5122:1: IO_REPARSE_TAG_ONEDRIVE = 2147483681 // /usr/x86_64-w64-mingw32/include/winnt.h:5150:1: IO_REPARSE_TAG_PROJFS = 2415919132 // /usr/x86_64-w64-mingw32/include/winnt.h:5146:1: IO_REPARSE_TAG_PROJFS_TOMBSTONE = 2684354594 // /usr/x86_64-w64-mingw32/include/winnt.h:5151:1: IO_REPARSE_TAG_RESERVED_ONE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5102:1: IO_REPARSE_TAG_RESERVED_RANGE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5104:1: IO_REPARSE_TAG_RESERVED_ZERO = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5101:1: IO_REPARSE_TAG_SIS = 2147483655 // /usr/x86_64-w64-mingw32/include/winnt.h:5113:1: IO_REPARSE_TAG_STORAGE_SYNC = 2147483678 // /usr/x86_64-w64-mingw32/include/winnt.h:5147:1: IO_REPARSE_TAG_SYMLINK = 2684354572 // /usr/x86_64-w64-mingw32/include/winnt.h:5118:1: IO_REPARSE_TAG_UNHANDLED = 2147483680 // /usr/x86_64-w64-mingw32/include/winnt.h:5149:1: IO_REPARSE_TAG_WCI = 2147483672 // /usr/x86_64-w64-mingw32/include/winnt.h:5125:1: IO_REPARSE_TAG_WCI_1 = 2415923224 // /usr/x86_64-w64-mingw32/include/winnt.h:5126:1: IO_REPARSE_TAG_WCI_TOMBSTONE = 2684354591 // /usr/x86_64-w64-mingw32/include/winnt.h:5148:1: IO_REPARSE_TAG_WIM = 2147483656 // /usr/x86_64-w64-mingw32/include/winnt.h:5114:1: IO_REPARSE_TAG_WOF = 2147483671 // /usr/x86_64-w64-mingw32/include/winnt.h:5124:1: IPPORT_BIFFUDP = 512 // /usr/x86_64-w64-mingw32/include/winsock.h:103:1: IPPORT_CMDSERVER = 514 // /usr/x86_64-w64-mingw32/include/winsock.h:100:1: IPPORT_DAYTIME = 13 // /usr/x86_64-w64-mingw32/include/winsock.h:82:1: IPPORT_DISCARD = 9 // /usr/x86_64-w64-mingw32/include/winsock.h:80:1: IPPORT_ECHO = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:79:1: IPPORT_EFSSERVER = 520 // /usr/x86_64-w64-mingw32/include/winsock.h:101:1: IPPORT_EXECSERVER = 512 // /usr/x86_64-w64-mingw32/include/winsock.h:98:1: IPPORT_FINGER = 79 // /usr/x86_64-w64-mingw32/include/winsock.h:94:1: IPPORT_FTP = 21 // /usr/x86_64-w64-mingw32/include/winsock.h:84:1: IPPORT_LOGINSERVER = 513 // /usr/x86_64-w64-mingw32/include/winsock.h:99:1: IPPORT_MTP = 57 // /usr/x86_64-w64-mingw32/include/winsock.h:90:1: IPPORT_NAMESERVER = 42 // /usr/x86_64-w64-mingw32/include/winsock.h:88:1: IPPORT_NETSTAT = 15 // /usr/x86_64-w64-mingw32/include/winsock.h:83:1: IPPORT_RESERVED = 1024 // /usr/x86_64-w64-mingw32/include/winsock.h:107:1: IPPORT_RJE = 77 // /usr/x86_64-w64-mingw32/include/winsock.h:93:1: IPPORT_ROUTESERVER = 520 // /usr/x86_64-w64-mingw32/include/winsock.h:105:1: IPPORT_SMTP = 25 // /usr/x86_64-w64-mingw32/include/winsock.h:86:1: IPPORT_SUPDUP = 95 // /usr/x86_64-w64-mingw32/include/winsock.h:96:1: IPPORT_SYSTAT = 11 // /usr/x86_64-w64-mingw32/include/winsock.h:81:1: IPPORT_TELNET = 23 // /usr/x86_64-w64-mingw32/include/winsock.h:85:1: IPPORT_TFTP = 69 // /usr/x86_64-w64-mingw32/include/winsock.h:92:1: IPPORT_TIMESERVER = 37 // /usr/x86_64-w64-mingw32/include/winsock.h:87:1: IPPORT_TTYLINK = 87 // /usr/x86_64-w64-mingw32/include/winsock.h:95:1: IPPORT_WHOIS = 43 // /usr/x86_64-w64-mingw32/include/winsock.h:89:1: IPPORT_WHOSERVER = 513 // /usr/x86_64-w64-mingw32/include/winsock.h:104:1: IPPROTO_GGP = 3 // /usr/x86_64-w64-mingw32/include/winsock.h:69:1: IPPROTO_ICMP = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:67:1: IPPROTO_IDP = 22 // /usr/x86_64-w64-mingw32/include/winsock.h:73:1: IPPROTO_IGMP = 2 // /usr/x86_64-w64-mingw32/include/winsock.h:68:1: IPPROTO_IP = 0 // /usr/x86_64-w64-mingw32/include/winsock.h:66:1: IPPROTO_MAX = 256 // /usr/x86_64-w64-mingw32/include/winsock.h:77:1: IPPROTO_ND = 77 // /usr/x86_64-w64-mingw32/include/winsock.h:74:1: IPPROTO_PUP = 12 // /usr/x86_64-w64-mingw32/include/winsock.h:71:1: IPPROTO_RAW = 255 // /usr/x86_64-w64-mingw32/include/winsock.h:76:1: IPPROTO_TCP = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:70:1: IPPROTO_UDP = 17 // /usr/x86_64-w64-mingw32/include/winsock.h:72:1: IP_ADD_MEMBERSHIP = 5 // /usr/x86_64-w64-mingw32/include/winsock.h:141:1: IP_DEFAULT_MULTICAST_LOOP = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:148:1: IP_DEFAULT_MULTICAST_TTL = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:147:1: IP_DONTFRAGMENT = 9 // /usr/x86_64-w64-mingw32/include/winsock.h:145:1: IP_DROP_MEMBERSHIP = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:142:1: IP_MAX_MEMBERSHIPS = 20 // /usr/x86_64-w64-mingw32/include/winsock.h:149:1: IP_MULTICAST_IF = 2 // /usr/x86_64-w64-mingw32/include/winsock.h:138:1: IP_MULTICAST_LOOP = 4 // /usr/x86_64-w64-mingw32/include/winsock.h:140:1: IP_MULTICAST_TTL = 3 // /usr/x86_64-w64-mingw32/include/winsock.h:139:1: IP_OPTIONS = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:137:1: IP_TOS = 8 // /usr/x86_64-w64-mingw32/include/winsock.h:144:1: IP_TTL = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:143:1: ISC_SHOWUIALL = 0xC000000F // /usr/x86_64-w64-mingw32/include/imm.h:254:1: ISC_SHOWUIALLCANDIDATEWINDOW = 0x0000000F // /usr/x86_64-w64-mingw32/include/imm.h:253:1: ISC_SHOWUICANDIDATEWINDOW = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:250:1: ISC_SHOWUICOMPOSITIONWINDOW = 0x80000000 // /usr/x86_64-w64-mingw32/include/imm.h:251:1: ISC_SHOWUIGUIDELINE = 0x40000000 // /usr/x86_64-w64-mingw32/include/imm.h:252:1: ISMEX_CALLBACK = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2178:1: ISMEX_NOSEND = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:2175:1: ISMEX_NOTIFY = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2177:1: ISMEX_REPLIED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:2179:1: ISMEX_SEND = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2176:1: IS_TEXT_UNICODE_ASCII16 = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:7832:1: IS_TEXT_UNICODE_CONTROLS = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:7838:1: IS_TEXT_UNICODE_DBCS_LEADBYTE = 0x0400 // /usr/x86_64-w64-mingw32/include/winnt.h:7846:1: IS_TEXT_UNICODE_ILLEGAL_CHARS = 0x0100 // /usr/x86_64-w64-mingw32/include/winnt.h:7844:1: IS_TEXT_UNICODE_NOT_ASCII_MASK = 0xF000 // /usr/x86_64-w64-mingw32/include/winnt.h:7852:1: IS_TEXT_UNICODE_NOT_UNICODE_MASK = 0x0F00 // /usr/x86_64-w64-mingw32/include/winnt.h:7851:1: IS_TEXT_UNICODE_NULL_BYTES = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:7847:1: IS_TEXT_UNICODE_ODD_LENGTH = 0x0200 // /usr/x86_64-w64-mingw32/include/winnt.h:7845:1: IS_TEXT_UNICODE_REVERSE_ASCII16 = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:7833:1: IS_TEXT_UNICODE_REVERSE_CONTROLS = 0x0040 // /usr/x86_64-w64-mingw32/include/winnt.h:7839:1: IS_TEXT_UNICODE_REVERSE_MASK = 0x00F0 // /usr/x86_64-w64-mingw32/include/winnt.h:7850:1: IS_TEXT_UNICODE_REVERSE_SIGNATURE = 0x0080 // /usr/x86_64-w64-mingw32/include/winnt.h:7842:1: IS_TEXT_UNICODE_REVERSE_STATISTICS = 0x0020 // /usr/x86_64-w64-mingw32/include/winnt.h:7836:1: IS_TEXT_UNICODE_SIGNATURE = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:7841:1: IS_TEXT_UNICODE_STATISTICS = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:7835:1: IS_TEXT_UNICODE_UNICODE_MASK = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:7849:1: ITALIC_FONTTYPE = 0x200 // /usr/x86_64-w64-mingw32/include/commdlg.h:471:1: IsStat4 = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111279:1: JEACH_ATOM = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195374:1: JEACH_FULLKEY = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195377:1: JEACH_ID = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195375:1: JEACH_JSON = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195382:1: JEACH_KEY = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195371:1: JEACH_PARENT = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195376:1: JEACH_PATH = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195378:1: JEACH_ROOT = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195383:1: JEACH_TYPE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195373:1: JEACH_VALUE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:195372:1: JNODE_APPEND = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193328:1: JNODE_ESCAPE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193324:1: JNODE_LABEL = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193329:1: JNODE_PATCH = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193327:1: JNODE_RAW = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193323:1: JNODE_REMOVE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193325:1: JNODE_REPLACE = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193326:1: JOB_ACCESS_ADMINISTER = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:1279:1: JOB_ACCESS_READ = 0x00000020 // /usr/x86_64-w64-mingw32/include/winspool.h:1280:1: JOB_ALL_ACCESS = 983088 // /usr/x86_64-w64-mingw32/include/winspool.h:1290:1: JOB_CONTROL_CANCEL = 3 // /usr/x86_64-w64-mingw32/include/winspool.h:332:1: JOB_CONTROL_DELETE = 5 // /usr/x86_64-w64-mingw32/include/winspool.h:334:1: JOB_CONTROL_LAST_PAGE_EJECTED = 7 // /usr/x86_64-w64-mingw32/include/winspool.h:336:1: JOB_CONTROL_PAUSE = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:330:1: JOB_CONTROL_RESTART = 4 // /usr/x86_64-w64-mingw32/include/winspool.h:333:1: JOB_CONTROL_RESUME = 2 // /usr/x86_64-w64-mingw32/include/winspool.h:331:1: JOB_CONTROL_SENT_TO_PRINTER = 6 // /usr/x86_64-w64-mingw32/include/winspool.h:335:1: JOB_EXECUTE = 131088 // /usr/x86_64-w64-mingw32/include/winspool.h:1293:1: JOB_NOTIFY_FIELD_BYTES_PRINTED = 0x17 // /usr/x86_64-w64-mingw32/include/winspool.h:997:1: JOB_NOTIFY_FIELD_DATATYPE = 0x05 // /usr/x86_64-w64-mingw32/include/winspool.h:979:1: JOB_NOTIFY_FIELD_DEVMODE = 0x09 // /usr/x86_64-w64-mingw32/include/winspool.h:983:1: JOB_NOTIFY_FIELD_DOCUMENT = 0x0D // /usr/x86_64-w64-mingw32/include/winspool.h:987:1: JOB_NOTIFY_FIELD_DRIVER_NAME = 0x08 // /usr/x86_64-w64-mingw32/include/winspool.h:982:1: JOB_NOTIFY_FIELD_MACHINE_NAME = 0x01 // /usr/x86_64-w64-mingw32/include/winspool.h:975:1: JOB_NOTIFY_FIELD_NOTIFY_NAME = 0x04 // /usr/x86_64-w64-mingw32/include/winspool.h:978:1: JOB_NOTIFY_FIELD_PAGES_PRINTED = 0x15 // /usr/x86_64-w64-mingw32/include/winspool.h:995:1: JOB_NOTIFY_FIELD_PARAMETERS = 0x07 // /usr/x86_64-w64-mingw32/include/winspool.h:981:1: JOB_NOTIFY_FIELD_PORT_NAME = 0x02 // /usr/x86_64-w64-mingw32/include/winspool.h:976:1: JOB_NOTIFY_FIELD_POSITION = 0x0F // /usr/x86_64-w64-mingw32/include/winspool.h:989:1: JOB_NOTIFY_FIELD_PRINTER_NAME = 0x00 // /usr/x86_64-w64-mingw32/include/winspool.h:974:1: JOB_NOTIFY_FIELD_PRINT_PROCESSOR = 0x06 // /usr/x86_64-w64-mingw32/include/winspool.h:980:1: JOB_NOTIFY_FIELD_PRIORITY = 0x0E // /usr/x86_64-w64-mingw32/include/winspool.h:988:1: JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C // /usr/x86_64-w64-mingw32/include/winspool.h:986:1: JOB_NOTIFY_FIELD_START_TIME = 0x11 // /usr/x86_64-w64-mingw32/include/winspool.h:991:1: JOB_NOTIFY_FIELD_STATUS = 0x0A // /usr/x86_64-w64-mingw32/include/winspool.h:984:1: JOB_NOTIFY_FIELD_STATUS_STRING = 0x0B // /usr/x86_64-w64-mingw32/include/winspool.h:985:1: JOB_NOTIFY_FIELD_SUBMITTED = 0x10 // /usr/x86_64-w64-mingw32/include/winspool.h:990:1: JOB_NOTIFY_FIELD_TIME = 0x13 // /usr/x86_64-w64-mingw32/include/winspool.h:993:1: JOB_NOTIFY_FIELD_TOTAL_BYTES = 0x16 // /usr/x86_64-w64-mingw32/include/winspool.h:996:1: JOB_NOTIFY_FIELD_TOTAL_PAGES = 0x14 // /usr/x86_64-w64-mingw32/include/winspool.h:994:1: JOB_NOTIFY_FIELD_UNTIL_TIME = 0x12 // /usr/x86_64-w64-mingw32/include/winspool.h:992:1: JOB_NOTIFY_FIELD_USER_NAME = 0x03 // /usr/x86_64-w64-mingw32/include/winspool.h:977:1: JOB_NOTIFY_TYPE = 0x01 // /usr/x86_64-w64-mingw32/include/winspool.h:944:1: JOB_OBJECT_ALL_ACCESS = 2031647 // /usr/x86_64-w64-mingw32/include/winnt.h:4090:1: JOB_OBJECT_ASSIGN_PROCESS = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4085:1: JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS = 0x000000ff // /usr/x86_64-w64-mingw32/include/winnt.h:4523:1: JOB_OBJECT_CPU_RATE_CONTROL_ENABLE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:4550:1: JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:4552:1: JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY = 0x8 // /usr/x86_64-w64-mingw32/include/winnt.h:4553:1: JOB_OBJECT_CPU_RATE_CONTROL_VALID_FLAGS = 0xf // /usr/x86_64-w64-mingw32/include/winnt.h:4554:1: JOB_OBJECT_CPU_RATE_CONTROL_WEIGHT_BASED = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:4551:1: JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS = 0x00007fff // /usr/x86_64-w64-mingw32/include/winnt.h:4524:1: JOB_OBJECT_LIMIT_ACTIVE_PROCESS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:4497:1: JOB_OBJECT_LIMIT_AFFINITY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:4498:1: JOB_OBJECT_LIMIT_BREAKAWAY_OK = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:4506:1: JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:4505:1: JOB_OBJECT_LIMIT_JOB_MEMORY = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:4504:1: JOB_OBJECT_LIMIT_JOB_READ_BYTES = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:4512:1: JOB_OBJECT_LIMIT_JOB_TIME = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4496:1: JOB_OBJECT_LIMIT_JOB_WRITE_BYTES = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:4513:1: JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:4508:1: JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:4500:1: JOB_OBJECT_LIMIT_PRIORITY_CLASS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:4499:1: JOB_OBJECT_LIMIT_PROCESS_MEMORY = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:4503:1: JOB_OBJECT_LIMIT_PROCESS_TIME = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4495:1: JOB_OBJECT_LIMIT_RATE_CONTROL = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:4514:1: JOB_OBJECT_LIMIT_RESERVED3 = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:4516:1: JOB_OBJECT_LIMIT_RESERVED4 = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:4517:1: JOB_OBJECT_LIMIT_RESERVED5 = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:4518:1: JOB_OBJECT_LIMIT_RESERVED6 = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:4519:1: JOB_OBJECT_LIMIT_SCHEDULING_CLASS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:4501:1: JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:4507:1: JOB_OBJECT_LIMIT_SUBSET_AFFINITY = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:4510:1: JOB_OBJECT_LIMIT_VALID_FLAGS = 0x0007ffff // /usr/x86_64-w64-mingw32/include/winnt.h:4521:1: JOB_OBJECT_LIMIT_WORKINGSET = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4494:1: JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4485:1: JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:4481:1: JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4482:1: JOB_OBJECT_MSG_END_OF_JOB_TIME = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4479:1: JOB_OBJECT_MSG_END_OF_PROCESS_TIME = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4480:1: JOB_OBJECT_MSG_EXIT_PROCESS = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:4484:1: JOB_OBJECT_MSG_JOB_CYCLE_TIME_LIMIT = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:4489:1: JOB_OBJECT_MSG_JOB_MEMORY_LIMIT = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:4487:1: JOB_OBJECT_MSG_MAXIMUM = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:4492:1: JOB_OBJECT_MSG_MINIMUM = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4491:1: JOB_OBJECT_MSG_NEW_PROCESS = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:4483:1: JOB_OBJECT_MSG_NOTIFICATION_LIMIT = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:4488:1: JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:4486:1: JOB_OBJECT_NOTIFICATION_LIMIT_VALID_FLAGS = 0x00070204 // /usr/x86_64-w64-mingw32/include/winnt.h:4526:1: JOB_OBJECT_POST_AT_END_OF_JOB = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4477:1: JOB_OBJECT_QUERY = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4087:1: JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS = 0x0007ffff // /usr/x86_64-w64-mingw32/include/winnt.h:4525:1: JOB_OBJECT_SECURITY_FILTER_TOKENS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:4546:1: JOB_OBJECT_SECURITY_NO_ADMIN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4543:1: JOB_OBJECT_SECURITY_ONLY_TOKEN = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4545:1: JOB_OBJECT_SECURITY_RESTRICTED_TOKEN = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4544:1: JOB_OBJECT_SECURITY_VALID_FLAGS = 0x0000000f // /usr/x86_64-w64-mingw32/include/winnt.h:4548:1: JOB_OBJECT_SET_ATTRIBUTES = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4086:1: JOB_OBJECT_SET_SECURITY_ATTRIBUTES = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4089:1: JOB_OBJECT_TERMINATE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4088:1: JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4476:1: JOB_OBJECT_UILIMIT_ALL = 0x000000FF // /usr/x86_64-w64-mingw32/include/winnt.h:4539:1: JOB_OBJECT_UILIMIT_DESKTOP = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:4536:1: JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:4534:1: JOB_OBJECT_UILIMIT_EXITWINDOWS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:4537:1: JOB_OBJECT_UILIMIT_GLOBALATOMS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:4535:1: JOB_OBJECT_UILIMIT_HANDLES = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4530:1: JOB_OBJECT_UILIMIT_NONE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4528:1: JOB_OBJECT_UILIMIT_READCLIPBOARD = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4531:1: JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:4533:1: JOB_OBJECT_UILIMIT_WRITECLIPBOARD = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4532:1: JOB_OBJECT_UI_VALID_FLAGS = 0x000000FF // /usr/x86_64-w64-mingw32/include/winnt.h:4541:1: JOB_POSITION_UNSPECIFIED = 0 // /usr/x86_64-w64-mingw32/include/winspool.h:352:1: JOB_READ = 131104 // /usr/x86_64-w64-mingw32/include/winspool.h:1291:1: JOB_STATUS_BLOCKED_DEVQ = 0x00000200 // /usr/x86_64-w64-mingw32/include/winspool.h:347:1: JOB_STATUS_COMPLETE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winspool.h:350:1: JOB_STATUS_DELETED = 0x00000100 // /usr/x86_64-w64-mingw32/include/winspool.h:346:1: JOB_STATUS_DELETING = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:340:1: JOB_STATUS_ERROR = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:339:1: JOB_STATUS_OFFLINE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winspool.h:343:1: JOB_STATUS_PAPEROUT = 0x00000040 // /usr/x86_64-w64-mingw32/include/winspool.h:344:1: JOB_STATUS_PAUSED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:338:1: JOB_STATUS_PRINTED = 0x00000080 // /usr/x86_64-w64-mingw32/include/winspool.h:345:1: JOB_STATUS_PRINTING = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:342:1: JOB_STATUS_RESTART = 0x00000800 // /usr/x86_64-w64-mingw32/include/winspool.h:349:1: JOB_STATUS_SPOOLING = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:341:1: JOB_STATUS_USER_INTERVENTION = 0x00000400 // /usr/x86_64-w64-mingw32/include/winspool.h:348:1: JOB_WRITE = 131088 // /usr/x86_64-w64-mingw32/include/winspool.h:1292:1: JOHAB_CHARSET = 130 // /usr/x86_64-w64-mingw32/include/wingdi.h:1165:1: JOYCAPS_HASPOV = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1456:1: JOYCAPS_HASR = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1453:1: JOYCAPS_HASU = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1454:1: JOYCAPS_HASV = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1455:1: JOYCAPS_HASZ = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1452:1: JOYCAPS_POV4DIR = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1457:1: JOYCAPS_POVCTS = 0x0040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1458:1: JOYERR_BASE = 160 // /usr/x86_64-w64-mingw32/include/mmsystem.h:130:1: JOYERR_NOCANDO = 166 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1376:1: JOYERR_NOERROR = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1374:1: JOYERR_PARMS = 165 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1375:1: JOYERR_UNPLUGGED = 167 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1377:1: JOYSTICKID1 = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1449:1: JOYSTICKID2 = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1450:1: JOY_BUTTON1 = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1379:1: JOY_BUTTON10 = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1393:1: JOY_BUTTON11 = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1394:1: JOY_BUTTON12 = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1395:1: JOY_BUTTON13 = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1396:1: JOY_BUTTON14 = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1397:1: JOY_BUTTON15 = 16384 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1398:1: JOY_BUTTON16 = 32768 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1399:1: JOY_BUTTON17 = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1400:1: JOY_BUTTON18 = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1401:1: JOY_BUTTON19 = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1402:1: JOY_BUTTON1CHG = 0x0100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1383:1: JOY_BUTTON2 = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1380:1: JOY_BUTTON20 = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1403:1: JOY_BUTTON21 = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1404:1: JOY_BUTTON22 = 2097152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1405:1: JOY_BUTTON23 = 4194304 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1406:1: JOY_BUTTON24 = 8388608 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1407:1: JOY_BUTTON25 = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1408:1: JOY_BUTTON26 = 33554432 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1409:1: JOY_BUTTON27 = 67108864 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1410:1: JOY_BUTTON28 = 134217728 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1411:1: JOY_BUTTON29 = 268435456 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1412:1: JOY_BUTTON2CHG = 0x0200 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1384:1: JOY_BUTTON3 = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1381:1: JOY_BUTTON30 = 536870912 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1413:1: JOY_BUTTON31 = 1073741824 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1414:1: JOY_BUTTON32 = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1415:1: JOY_BUTTON3CHG = 0x0400 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1385:1: JOY_BUTTON4 = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1382:1: JOY_BUTTON4CHG = 0x0800 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1386:1: JOY_BUTTON5 = 16 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1388:1: JOY_BUTTON6 = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1389:1: JOY_BUTTON7 = 64 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1390:1: JOY_BUTTON8 = 128 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1391:1: JOY_BUTTON9 = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1392:1: JOY_CAL_READ3 = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1438:1: JOY_CAL_READ4 = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1439:1: JOY_CAL_READ5 = 4194304 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1442:1: JOY_CAL_READ6 = 8388608 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1443:1: JOY_CAL_READALWAYS = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1436:1: JOY_CAL_READRONLY = 33554432 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1445:1: JOY_CAL_READUONLY = 67108864 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1446:1: JOY_CAL_READVONLY = 134217728 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1447:1: JOY_CAL_READXONLY = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1440:1: JOY_CAL_READXYONLY = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1437:1: JOY_CAL_READYONLY = 2097152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1441:1: JOY_CAL_READZONLY = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1444:1: JOY_POVBACKWARD = 18000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1420:1: JOY_POVFORWARD = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1418:1: JOY_POVLEFT = 27000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1421:1: JOY_POVRIGHT = 9000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1419:1: JOY_RETURNALL = 255 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1435:1: JOY_RETURNBUTTONS = 128 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1430:1: JOY_RETURNCENTERED = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1433:1: JOY_RETURNPOV = 64 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1429:1: JOY_RETURNPOVCTS = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1432:1: JOY_RETURNR = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1426:1: JOY_RETURNRAWDATA = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1431:1: JOY_RETURNU = 16 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1427:1: JOY_RETURNV = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1428:1: JOY_RETURNX = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1423:1: JOY_RETURNY = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1424:1: JOY_RETURNZ = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1425:1: JOY_USEDEADZONE = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1434:1: JSON_ABPATH = 0x03 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194735:1: JSON_ARRAY = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193308:1: JSON_CACHE_ID = -429938 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194224:1: JSON_CACHE_SZ = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194225:1: JSON_FALSE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193304:1: JSON_INT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193305:1: JSON_ISSET = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194736:1: JSON_JSON = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194733:1: JSON_MAX_DEPTH = 2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193370:1: JSON_NULL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193302:1: JSON_OBJECT = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193309:1: JSON_REAL = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193306:1: JSON_SQL = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:194734:1: JSON_STRING = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193307:1: JSON_SUBTYPE = 74 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193312:1: JSON_TRUE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:193303:1: JT_CROSS = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18372:1: JT_ERROR = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18377:1: JT_INNER = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18371:1: JT_LEFT = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18374:1: JT_NATURAL = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18373:1: JT_OUTER = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18376:1: JT_RIGHT = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18375:1: KDF_ALGORITHMID = 0x8 // /usr/x86_64-w64-mingw32/include/bcrypt.h:66:1: KDF_CONTEXT = 0xe // /usr/x86_64-w64-mingw32/include/bcrypt.h:72:1: KDF_GENERIC_PARAMETER = 0x11 // /usr/x86_64-w64-mingw32/include/bcrypt.h:75:1: KDF_HASH_ALGORITHM = 0x0 // /usr/x86_64-w64-mingw32/include/bcrypt.h:58:1: KDF_HMAC_KEY = 0x3 // /usr/x86_64-w64-mingw32/include/bcrypt.h:61:1: KDF_ITERATION_COUNT = 0x10 // /usr/x86_64-w64-mingw32/include/bcrypt.h:74:1: KDF_KEYBITLENGTH = 0x12 // /usr/x86_64-w64-mingw32/include/bcrypt.h:76:1: KDF_LABEL = 0xd // /usr/x86_64-w64-mingw32/include/bcrypt.h:71:1: KDF_PARTYUINFO = 0x9 // /usr/x86_64-w64-mingw32/include/bcrypt.h:67:1: KDF_PARTYVINFO = 0xa // /usr/x86_64-w64-mingw32/include/bcrypt.h:68:1: KDF_SALT = 0xf // /usr/x86_64-w64-mingw32/include/bcrypt.h:73:1: KDF_SECRET_APPEND = 0x2 // /usr/x86_64-w64-mingw32/include/bcrypt.h:60:1: KDF_SECRET_HANDLE = 0x6 // /usr/x86_64-w64-mingw32/include/bcrypt.h:64:1: KDF_SECRET_PREPEND = 0x1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:59:1: KDF_SUPPPRIVINFO = 0xc // /usr/x86_64-w64-mingw32/include/bcrypt.h:70:1: KDF_SUPPPUBINFO = 0xb // /usr/x86_64-w64-mingw32/include/bcrypt.h:69:1: KDF_TLS_PRF_LABEL = 0x4 // /usr/x86_64-w64-mingw32/include/bcrypt.h:62:1: KDF_TLS_PRF_PROTOCOL = 0x7 // /usr/x86_64-w64-mingw32/include/bcrypt.h:65:1: KDF_TLS_PRF_SEED = 0x5 // /usr/x86_64-w64-mingw32/include/bcrypt.h:63:1: KDF_USE_SECRET_AS_HMAC_KEY_FLAG = 1 // /usr/x86_64-w64-mingw32/include/bcrypt.h:78:1: KEYBOARD_OVERRUN_MAKE_CODE = 0xFF // /usr/x86_64-w64-mingw32/include/winuser.h:6367:1: KEYEVENTF_EXTENDEDKEY = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:2595:1: KEYEVENTF_KEYUP = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:2596:1: KEYEVENTF_SCANCODE = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:2598:1: KEYEVENTF_UNICODE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:2597:1: KEYINFO_ORDER_BIGNULL = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17747:1: KEYINFO_ORDER_DESC = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17746:1: KEYSTATEBLOB = 0xc // /usr/x86_64-w64-mingw32/include/wincrypt.h:360:1: KEY_ALL_ACCESS = 983103 // /usr/x86_64-w64-mingw32/include/winnt.h:8504:1: KEY_CREATE_LINK = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:8496:1: KEY_CREATE_SUB_KEY = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8493:1: KEY_ENUMERATE_SUB_KEYS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8494:1: KEY_EVENT = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:105:1: KEY_EXECUTE = 131097 // /usr/x86_64-w64-mingw32/include/winnt.h:8503:1: KEY_LENGTH_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:324:1: KEY_NOTIFY = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:8495:1: KEY_QUERY_VALUE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8491:1: KEY_READ = 131097 // /usr/x86_64-w64-mingw32/include/winnt.h:8501:1: KEY_SET_VALUE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8492:1: KEY_WOW64_32KEY = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:8498:1: KEY_WOW64_64KEY = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:8497:1: KEY_WOW64_RES = 768 // /usr/x86_64-w64-mingw32/include/winnt.h:8499:1: KEY_WRITE = 131078 // /usr/x86_64-w64-mingw32/include/winnt.h:8502:1: KF_ALTDOWN = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:241:1: KF_DLGMODE = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:239:1: KF_EXTENDED = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:238:1: KF_MENUMODE = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:240:1: KF_REPEAT = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:242:1: KF_UP = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:243:1: KLF_ACTIVATE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:730:1: KLF_NOTELLSHELL = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:734:1: KLF_REORDER = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:732:1: KLF_REPLACELANG = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:733:1: KLF_RESET = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:737:1: KLF_SETFORPROCESS = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:735:1: KLF_SHIFTLOCK = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:736:1: KLF_SUBSTITUTE_OK = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:731:1: KL_NAMELENGTH = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:743:1: KP_ADMIN_PIN = 31 // /usr/x86_64-w64-mingw32/include/wincrypt.h:398:1: KP_ALGID = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:374:1: KP_BLOCKLEN = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:375:1: KP_CERTIFICATE = 26 // /usr/x86_64-w64-mingw32/include/wincrypt.h:393:1: KP_CLEAR_KEY = 27 // /usr/x86_64-w64-mingw32/include/wincrypt.h:394:1: KP_CLIENT_RANDOM = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:388:1: KP_CMS_DH_KEY_INFO = 38 // /usr/x86_64-w64-mingw32/include/wincrypt.h:407:1: KP_CMS_KEY_INFO = 37 // /usr/x86_64-w64-mingw32/include/wincrypt.h:406:1: KP_EFFECTIVE_KEYLEN = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:386:1: KP_G = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:379:1: KP_GET_USE_COUNT = 42 // /usr/x86_64-w64-mingw32/include/wincrypt.h:412:1: KP_HIGHEST_VERSION = 41 // /usr/x86_64-w64-mingw32/include/wincrypt.h:410:1: KP_INFO = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:385:1: KP_IV = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:368:1: KP_KEYEXCHANGE_PIN = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:399:1: KP_KEYLEN = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:376:1: KP_KEYVAL = 30 // /usr/x86_64-w64-mingw32/include/wincrypt.h:397:1: KP_MODE = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:371:1: KP_MODE_BITS = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:372:1: KP_OAEP_PARAMS = 36 // /usr/x86_64-w64-mingw32/include/wincrypt.h:405:1: KP_P = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:378:1: KP_PADDING = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:370:1: KP_PERMISSIONS = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:373:1: KP_PIN_ID = 43 // /usr/x86_64-w64-mingw32/include/wincrypt.h:414:1: KP_PIN_INFO = 44 // /usr/x86_64-w64-mingw32/include/wincrypt.h:415:1: KP_PRECOMP_MD5 = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:391:1: KP_PRECOMP_SHA = 25 // /usr/x86_64-w64-mingw32/include/wincrypt.h:392:1: KP_PREHASH = 34 // /usr/x86_64-w64-mingw32/include/wincrypt.h:401:1: KP_PUB_EX_LEN = 28 // /usr/x86_64-w64-mingw32/include/wincrypt.h:395:1: KP_PUB_EX_VAL = 29 // /usr/x86_64-w64-mingw32/include/wincrypt.h:396:1: KP_PUB_PARAMS = 39 // /usr/x86_64-w64-mingw32/include/wincrypt.h:408:1: KP_Q = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:380:1: KP_RA = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:383:1: KP_RB = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:384:1: KP_ROUNDS = 35 // /usr/x86_64-w64-mingw32/include/wincrypt.h:403:1: KP_RP = 23 // /usr/x86_64-w64-mingw32/include/wincrypt.h:390:1: KP_SALT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:369:1: KP_SALT_EX = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:377:1: KP_SCHANNEL_ALG = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:387:1: KP_SERVER_RANDOM = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:389:1: KP_SIGNATURE_PIN = 33 // /usr/x86_64-w64-mingw32/include/wincrypt.h:400:1: KP_VERIFY_PARAMS = 40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:409:1: KP_X = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:381:1: KP_Y = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:382:1: KTM_MARSHAL_BLOB_VERSION_MAJOR = 1 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:117:1: KTM_MARSHAL_BLOB_VERSION_MINOR = 1 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:118:1: LABEL_SECURITY_INFORMATION = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4014:1: LANG_AFRIKAANS = 0x36 // /usr/x86_64-w64-mingw32/include/winnt.h:862:1: LANG_ALBANIAN = 0x1c // /usr/x86_64-w64-mingw32/include/winnt.h:863:1: LANG_ALSATIAN = 0x84 // /usr/x86_64-w64-mingw32/include/winnt.h:864:1: LANG_AMHARIC = 0x5e // /usr/x86_64-w64-mingw32/include/winnt.h:865:1: LANG_ARABIC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:866:1: LANG_ARMENIAN = 0x2b // /usr/x86_64-w64-mingw32/include/winnt.h:867:1: LANG_ASSAMESE = 0x4d // /usr/x86_64-w64-mingw32/include/winnt.h:868:1: LANG_AZERBAIJANI = 0x2c // /usr/x86_64-w64-mingw32/include/winnt.h:870:1: LANG_AZERI = 0x2c // /usr/x86_64-w64-mingw32/include/winnt.h:869:1: LANG_BANGLA = 0x45 // /usr/x86_64-w64-mingw32/include/winnt.h:871:1: LANG_BASHKIR = 0x6d // /usr/x86_64-w64-mingw32/include/winnt.h:872:1: LANG_BASQUE = 0x2d // /usr/x86_64-w64-mingw32/include/winnt.h:873:1: LANG_BELARUSIAN = 0x23 // /usr/x86_64-w64-mingw32/include/winnt.h:874:1: LANG_BENGALI = 0x45 // /usr/x86_64-w64-mingw32/include/winnt.h:875:1: LANG_BOSNIAN = 0x1a // /usr/x86_64-w64-mingw32/include/winnt.h:877:1: LANG_BOSNIAN_NEUTRAL = 0x781a // /usr/x86_64-w64-mingw32/include/winnt.h:878:1: LANG_BRETON = 0x7e // /usr/x86_64-w64-mingw32/include/winnt.h:876:1: LANG_BULGARIAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:879:1: LANG_CATALAN = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:880:1: LANG_CENTRAL_KURDISH = 0x92 // /usr/x86_64-w64-mingw32/include/winnt.h:881:1: LANG_CHEROKEE = 0x5c // /usr/x86_64-w64-mingw32/include/winnt.h:882:1: LANG_CHINESE = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:883:1: LANG_CHINESE_SIMPLIFIED = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:884:1: LANG_CHINESE_TRADITIONAL = 0x7c04 // /usr/x86_64-w64-mingw32/include/winnt.h:885:1: LANG_CORSICAN = 0x83 // /usr/x86_64-w64-mingw32/include/winnt.h:886:1: LANG_CROATIAN = 0x1a // /usr/x86_64-w64-mingw32/include/winnt.h:887:1: LANG_CZECH = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:888:1: LANG_DANISH = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:889:1: LANG_DARI = 0x8c // /usr/x86_64-w64-mingw32/include/winnt.h:890:1: LANG_DIVEHI = 0x65 // /usr/x86_64-w64-mingw32/include/winnt.h:891:1: LANG_DUTCH = 0x13 // /usr/x86_64-w64-mingw32/include/winnt.h:892:1: LANG_ENGLISH = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:893:1: LANG_ESTONIAN = 0x25 // /usr/x86_64-w64-mingw32/include/winnt.h:894:1: LANG_FAEROESE = 0x38 // /usr/x86_64-w64-mingw32/include/winnt.h:895:1: LANG_FARSI = 0x29 // /usr/x86_64-w64-mingw32/include/winnt.h:896:1: LANG_FILIPINO = 0x64 // /usr/x86_64-w64-mingw32/include/winnt.h:897:1: LANG_FINNISH = 0x0b // /usr/x86_64-w64-mingw32/include/winnt.h:898:1: LANG_FRENCH = 0x0c // /usr/x86_64-w64-mingw32/include/winnt.h:899:1: LANG_FRISIAN = 0x62 // /usr/x86_64-w64-mingw32/include/winnt.h:900:1: LANG_FULAH = 0x67 // /usr/x86_64-w64-mingw32/include/winnt.h:901:1: LANG_GALICIAN = 0x56 // /usr/x86_64-w64-mingw32/include/winnt.h:902:1: LANG_GEORGIAN = 0x37 // /usr/x86_64-w64-mingw32/include/winnt.h:903:1: LANG_GERMAN = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:904:1: LANG_GREEK = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:905:1: LANG_GREENLANDIC = 0x6f // /usr/x86_64-w64-mingw32/include/winnt.h:906:1: LANG_GUJARATI = 0x47 // /usr/x86_64-w64-mingw32/include/winnt.h:907:1: LANG_HAUSA = 0x68 // /usr/x86_64-w64-mingw32/include/winnt.h:908:1: LANG_HEBREW = 0x0d // /usr/x86_64-w64-mingw32/include/winnt.h:909:1: LANG_HINDI = 0x39 // /usr/x86_64-w64-mingw32/include/winnt.h:910:1: LANG_HUNGARIAN = 0x0e // /usr/x86_64-w64-mingw32/include/winnt.h:911:1: LANG_ICELANDIC = 0x0f // /usr/x86_64-w64-mingw32/include/winnt.h:912:1: LANG_IGBO = 0x70 // /usr/x86_64-w64-mingw32/include/winnt.h:913:1: LANG_INDONESIAN = 0x21 // /usr/x86_64-w64-mingw32/include/winnt.h:914:1: LANG_INUKTITUT = 0x5d // /usr/x86_64-w64-mingw32/include/winnt.h:915:1: LANG_INVARIANT = 0x7f // /usr/x86_64-w64-mingw32/include/winnt.h:860:1: LANG_IRISH = 0x3c // /usr/x86_64-w64-mingw32/include/winnt.h:916:1: LANG_ITALIAN = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:917:1: LANG_JAPANESE = 0x11 // /usr/x86_64-w64-mingw32/include/winnt.h:918:1: LANG_KANNADA = 0x4b // /usr/x86_64-w64-mingw32/include/winnt.h:919:1: LANG_KASHMIRI = 0x60 // /usr/x86_64-w64-mingw32/include/winnt.h:920:1: LANG_KAZAK = 0x3f // /usr/x86_64-w64-mingw32/include/winnt.h:921:1: LANG_KHMER = 0x53 // /usr/x86_64-w64-mingw32/include/winnt.h:922:1: LANG_KICHE = 0x86 // /usr/x86_64-w64-mingw32/include/winnt.h:923:1: LANG_KINYARWANDA = 0x87 // /usr/x86_64-w64-mingw32/include/winnt.h:924:1: LANG_KONKANI = 0x57 // /usr/x86_64-w64-mingw32/include/winnt.h:925:1: LANG_KOREAN = 0x12 // /usr/x86_64-w64-mingw32/include/winnt.h:926:1: LANG_KYRGYZ = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:927:1: LANG_LAO = 0x54 // /usr/x86_64-w64-mingw32/include/winnt.h:928:1: LANG_LATVIAN = 0x26 // /usr/x86_64-w64-mingw32/include/winnt.h:929:1: LANG_LITHUANIAN = 0x27 // /usr/x86_64-w64-mingw32/include/winnt.h:930:1: LANG_LOWER_SORBIAN = 0x2e // /usr/x86_64-w64-mingw32/include/winnt.h:931:1: LANG_LUXEMBOURGISH = 0x6e // /usr/x86_64-w64-mingw32/include/winnt.h:932:1: LANG_MACEDONIAN = 0x2f // /usr/x86_64-w64-mingw32/include/winnt.h:933:1: LANG_MALAY = 0x3e // /usr/x86_64-w64-mingw32/include/winnt.h:934:1: LANG_MALAYALAM = 0x4c // /usr/x86_64-w64-mingw32/include/winnt.h:935:1: LANG_MALTESE = 0x3a // /usr/x86_64-w64-mingw32/include/winnt.h:936:1: LANG_MANIPURI = 0x58 // /usr/x86_64-w64-mingw32/include/winnt.h:937:1: LANG_MAORI = 0x81 // /usr/x86_64-w64-mingw32/include/winnt.h:938:1: LANG_MAPUDUNGUN = 0x7a // /usr/x86_64-w64-mingw32/include/winnt.h:939:1: LANG_MARATHI = 0x4e // /usr/x86_64-w64-mingw32/include/winnt.h:940:1: LANG_MOHAWK = 0x7c // /usr/x86_64-w64-mingw32/include/winnt.h:941:1: LANG_MONGOLIAN = 0x50 // /usr/x86_64-w64-mingw32/include/winnt.h:942:1: LANG_NEPALI = 0x61 // /usr/x86_64-w64-mingw32/include/winnt.h:943:1: LANG_NEUTRAL = 0x00 // /usr/x86_64-w64-mingw32/include/winnt.h:859:1: LANG_NORWEGIAN = 0x14 // /usr/x86_64-w64-mingw32/include/winnt.h:944:1: LANG_OCCITAN = 0x82 // /usr/x86_64-w64-mingw32/include/winnt.h:945:1: LANG_ODIA = 0x48 // /usr/x86_64-w64-mingw32/include/winnt.h:946:1: LANG_ORIYA = 0x48 // /usr/x86_64-w64-mingw32/include/winnt.h:947:1: LANG_PASHTO = 0x63 // /usr/x86_64-w64-mingw32/include/winnt.h:948:1: LANG_PERSIAN = 0x29 // /usr/x86_64-w64-mingw32/include/winnt.h:949:1: LANG_POLISH = 0x15 // /usr/x86_64-w64-mingw32/include/winnt.h:950:1: LANG_PORTUGUESE = 0x16 // /usr/x86_64-w64-mingw32/include/winnt.h:951:1: LANG_PULAR = 0x67 // /usr/x86_64-w64-mingw32/include/winnt.h:952:1: LANG_PUNJABI = 0x46 // /usr/x86_64-w64-mingw32/include/winnt.h:953:1: LANG_QUECHUA = 0x6b // /usr/x86_64-w64-mingw32/include/winnt.h:954:1: LANG_ROMANIAN = 0x18 // /usr/x86_64-w64-mingw32/include/winnt.h:955:1: LANG_ROMANSH = 0x17 // /usr/x86_64-w64-mingw32/include/winnt.h:956:1: LANG_RUSSIAN = 0x19 // /usr/x86_64-w64-mingw32/include/winnt.h:957:1: LANG_SAKHA = 0x85 // /usr/x86_64-w64-mingw32/include/winnt.h:958:1: LANG_SAMI = 0x3b // /usr/x86_64-w64-mingw32/include/winnt.h:959:1: LANG_SANSKRIT = 0x4f // /usr/x86_64-w64-mingw32/include/winnt.h:960:1: LANG_SCOTTISH_GAELIC = 0x91 // /usr/x86_64-w64-mingw32/include/winnt.h:961:1: LANG_SERBIAN = 0x1a // /usr/x86_64-w64-mingw32/include/winnt.h:962:1: LANG_SERBIAN_NEUTRAL = 0x7c1a // /usr/x86_64-w64-mingw32/include/winnt.h:963:1: LANG_SINDHI = 0x59 // /usr/x86_64-w64-mingw32/include/winnt.h:964:1: LANG_SINHALESE = 0x5b // /usr/x86_64-w64-mingw32/include/winnt.h:965:1: LANG_SLOVAK = 0x1b // /usr/x86_64-w64-mingw32/include/winnt.h:966:1: LANG_SLOVENIAN = 0x24 // /usr/x86_64-w64-mingw32/include/winnt.h:967:1: LANG_SOTHO = 0x6c // /usr/x86_64-w64-mingw32/include/winnt.h:968:1: LANG_SPANISH = 0x0a // /usr/x86_64-w64-mingw32/include/winnt.h:969:1: LANG_SWAHILI = 0x41 // /usr/x86_64-w64-mingw32/include/winnt.h:970:1: LANG_SWEDISH = 0x1d // /usr/x86_64-w64-mingw32/include/winnt.h:971:1: LANG_SYRIAC = 0x5a // /usr/x86_64-w64-mingw32/include/winnt.h:972:1: LANG_TAJIK = 0x28 // /usr/x86_64-w64-mingw32/include/winnt.h:973:1: LANG_TAMAZIGHT = 0x5f // /usr/x86_64-w64-mingw32/include/winnt.h:974:1: LANG_TAMIL = 0x49 // /usr/x86_64-w64-mingw32/include/winnt.h:975:1: LANG_TATAR = 0x44 // /usr/x86_64-w64-mingw32/include/winnt.h:976:1: LANG_TELUGU = 0x4a // /usr/x86_64-w64-mingw32/include/winnt.h:977:1: LANG_THAI = 0x1e // /usr/x86_64-w64-mingw32/include/winnt.h:978:1: LANG_TIBETAN = 0x51 // /usr/x86_64-w64-mingw32/include/winnt.h:979:1: LANG_TIGRIGNA = 0x73 // /usr/x86_64-w64-mingw32/include/winnt.h:980:1: LANG_TIGRINYA = 0x73 // /usr/x86_64-w64-mingw32/include/winnt.h:981:1: LANG_TSWANA = 0x32 // /usr/x86_64-w64-mingw32/include/winnt.h:982:1: LANG_TURKISH = 0x1f // /usr/x86_64-w64-mingw32/include/winnt.h:983:1: LANG_TURKMEN = 0x42 // /usr/x86_64-w64-mingw32/include/winnt.h:984:1: LANG_UIGHUR = 0x80 // /usr/x86_64-w64-mingw32/include/winnt.h:985:1: LANG_UKRAINIAN = 0x22 // /usr/x86_64-w64-mingw32/include/winnt.h:986:1: LANG_UPPER_SORBIAN = 0x2e // /usr/x86_64-w64-mingw32/include/winnt.h:987:1: LANG_URDU = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:988:1: LANG_UZBEK = 0x43 // /usr/x86_64-w64-mingw32/include/winnt.h:989:1: LANG_VALENCIAN = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:990:1: LANG_VIETNAMESE = 0x2a // /usr/x86_64-w64-mingw32/include/winnt.h:991:1: LANG_WELSH = 0x52 // /usr/x86_64-w64-mingw32/include/winnt.h:992:1: LANG_WOLOF = 0x88 // /usr/x86_64-w64-mingw32/include/winnt.h:993:1: LANG_XHOSA = 0x34 // /usr/x86_64-w64-mingw32/include/winnt.h:994:1: LANG_YAKUT = 0x85 // /usr/x86_64-w64-mingw32/include/winnt.h:995:1: LANG_YI = 0x78 // /usr/x86_64-w64-mingw32/include/winnt.h:996:1: LANG_YORUBA = 0x6a // /usr/x86_64-w64-mingw32/include/winnt.h:997:1: LANG_ZULU = 0x35 // /usr/x86_64-w64-mingw32/include/winnt.h:998:1: LAYOUT_BITMAPORIENTATIONPRESERVED = 0x00000008 // /usr/x86_64-w64-mingw32/include/wingdi.h:108:1: LAYOUT_BTT = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:105:1: LAYOUT_ORIENTATIONMASK = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:107:1: LAYOUT_RTL = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:104:1: LAYOUT_VBH = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:106:1: LBN_DBLCLK = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4680:1: LBN_ERRSPACE = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:4678:1: LBN_KILLFOCUS = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4683:1: LBN_SELCANCEL = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4681:1: LBN_SELCHANGE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4679:1: LBN_SETFOCUS = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4682:1: LBSELCHSTRINGA = "commdlg_LBSelChangedNotify" // /usr/x86_64-w64-mingw32/include/commdlg.h:487:1: LBS_COMBOBOX = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:4760:1: LBS_DISABLENOSCROLL = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4757:1: LBS_EXTENDEDSEL = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4756:1: LBS_HASSTRINGS = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4751:1: LBS_MULTICOLUMN = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4754:1: LBS_MULTIPLESEL = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4748:1: LBS_NODATA = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4758:1: LBS_NOINTEGRALHEIGHT = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4753:1: LBS_NOREDRAW = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4747:1: LBS_NOSEL = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4759:1: LBS_NOTIFY = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4745:1: LBS_OWNERDRAWFIXED = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4749:1: LBS_OWNERDRAWVARIABLE = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4750:1: LBS_SORT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4746:1: LBS_STANDARD = 10485763 // /usr/x86_64-w64-mingw32/include/winuser.h:4762:1: LBS_USETABSTOPS = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4752:1: LBS_WANTKEYBOARDINPUT = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4755:1: LB_ADDFILE = 0x0196 // /usr/x86_64-w64-mingw32/include/winuser.h:4709:1: LB_ADDSTRING = 0x0180 // /usr/x86_64-w64-mingw32/include/winuser.h:4687:1: LB_CTLCODE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4672:1: LB_DELETESTRING = 0x0182 // /usr/x86_64-w64-mingw32/include/winuser.h:4689:1: LB_DIR = 0x018D // /usr/x86_64-w64-mingw32/include/winuser.h:4700:1: LB_ERR = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:4675:1: LB_ERRSPACE = -2 // /usr/x86_64-w64-mingw32/include/winuser.h:4676:1: LB_FINDSTRING = 0x018F // /usr/x86_64-w64-mingw32/include/winuser.h:4702:1: LB_FINDSTRINGEXACT = 0x01A2 // /usr/x86_64-w64-mingw32/include/winuser.h:4721:1: LB_GETANCHORINDEX = 0x019D // /usr/x86_64-w64-mingw32/include/winuser.h:4716:1: LB_GETCARETINDEX = 0x019F // /usr/x86_64-w64-mingw32/include/winuser.h:4718:1: LB_GETCOUNT = 0x018B // /usr/x86_64-w64-mingw32/include/winuser.h:4698:1: LB_GETCURSEL = 0x0188 // /usr/x86_64-w64-mingw32/include/winuser.h:4695:1: LB_GETHORIZONTALEXTENT = 0x0193 // /usr/x86_64-w64-mingw32/include/winuser.h:4706:1: LB_GETITEMDATA = 0x0199 // /usr/x86_64-w64-mingw32/include/winuser.h:4712:1: LB_GETITEMHEIGHT = 0x01A1 // /usr/x86_64-w64-mingw32/include/winuser.h:4720:1: LB_GETITEMRECT = 0x0198 // /usr/x86_64-w64-mingw32/include/winuser.h:4711:1: LB_GETLISTBOXINFO = 0x01B2 // /usr/x86_64-w64-mingw32/include/winuser.h:4730:1: LB_GETLOCALE = 0x01A6 // /usr/x86_64-w64-mingw32/include/winuser.h:4723:1: LB_GETSEL = 0x0187 // /usr/x86_64-w64-mingw32/include/winuser.h:4694:1: LB_GETSELCOUNT = 0x0190 // /usr/x86_64-w64-mingw32/include/winuser.h:4703:1: LB_GETSELITEMS = 0x0191 // /usr/x86_64-w64-mingw32/include/winuser.h:4704:1: LB_GETTEXT = 0x0189 // /usr/x86_64-w64-mingw32/include/winuser.h:4696:1: LB_GETTEXTLEN = 0x018A // /usr/x86_64-w64-mingw32/include/winuser.h:4697:1: LB_GETTOPINDEX = 0x018E // /usr/x86_64-w64-mingw32/include/winuser.h:4701:1: LB_INITSTORAGE = 0x01A8 // /usr/x86_64-w64-mingw32/include/winuser.h:4725:1: LB_INSERTSTRING = 0x0181 // /usr/x86_64-w64-mingw32/include/winuser.h:4688:1: LB_ITEMFROMPOINT = 0x01A9 // /usr/x86_64-w64-mingw32/include/winuser.h:4726:1: LB_MSGMAX = 0x01B3 // /usr/x86_64-w64-mingw32/include/winuser.h:4732:1: LB_OKAY = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4674:1: LB_RESETCONTENT = 0x0184 // /usr/x86_64-w64-mingw32/include/winuser.h:4691:1: LB_SELECTSTRING = 0x018C // /usr/x86_64-w64-mingw32/include/winuser.h:4699:1: LB_SELITEMRANGE = 0x019B // /usr/x86_64-w64-mingw32/include/winuser.h:4714:1: LB_SELITEMRANGEEX = 0x0183 // /usr/x86_64-w64-mingw32/include/winuser.h:4690:1: LB_SETANCHORINDEX = 0x019C // /usr/x86_64-w64-mingw32/include/winuser.h:4715:1: LB_SETCARETINDEX = 0x019E // /usr/x86_64-w64-mingw32/include/winuser.h:4717:1: LB_SETCOLUMNWIDTH = 0x0195 // /usr/x86_64-w64-mingw32/include/winuser.h:4708:1: LB_SETCOUNT = 0x01A7 // /usr/x86_64-w64-mingw32/include/winuser.h:4724:1: LB_SETCURSEL = 0x0186 // /usr/x86_64-w64-mingw32/include/winuser.h:4693:1: LB_SETHORIZONTALEXTENT = 0x0194 // /usr/x86_64-w64-mingw32/include/winuser.h:4707:1: LB_SETITEMDATA = 0x019A // /usr/x86_64-w64-mingw32/include/winuser.h:4713:1: LB_SETITEMHEIGHT = 0x01A0 // /usr/x86_64-w64-mingw32/include/winuser.h:4719:1: LB_SETLOCALE = 0x01A5 // /usr/x86_64-w64-mingw32/include/winuser.h:4722:1: LB_SETSEL = 0x0185 // /usr/x86_64-w64-mingw32/include/winuser.h:4692:1: LB_SETTABSTOPS = 0x0192 // /usr/x86_64-w64-mingw32/include/winuser.h:4705:1: LB_SETTOPINDEX = 0x0197 // /usr/x86_64-w64-mingw32/include/winuser.h:4710:1: LCID_ALTERNATE_SORTS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:149:1: LCID_INSTALLED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:147:1: LCID_SUPPORTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:148:1: LCMAP_BYTEREV = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnls.h:122:1: LCMAP_FULLWIDTH = 0x00800000 // /usr/x86_64-w64-mingw32/include/winnls.h:127:1: LCMAP_HALFWIDTH = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnls.h:126:1: LCMAP_HIRAGANA = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnls.h:124:1: LCMAP_KATAKANA = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnls.h:125:1: LCMAP_LINGUISTIC_CASING = 0x01000000 // /usr/x86_64-w64-mingw32/include/winnls.h:129:1: LCMAP_LOWERCASE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnls.h:115:1: LCMAP_SIMPLIFIED_CHINESE = 0x02000000 // /usr/x86_64-w64-mingw32/include/winnls.h:131:1: LCMAP_SORTKEY = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnls.h:121:1: LCMAP_TRADITIONAL_CHINESE = 0x04000000 // /usr/x86_64-w64-mingw32/include/winnls.h:132:1: LCMAP_UPPERCASE = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnls.h:116:1: LCS_CALIBRATED_RGB = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:502:1: LCS_GM_ABS_COLORIMETRIC = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:508:1: LCS_GM_BUSINESS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:505:1: LCS_GM_GRAPHICS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:506:1: LCS_GM_IMAGES = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:507:1: LCS_SIGNATURE = 80 // /usr/x86_64-w64-mingw32/include/wingdi.h:495:1: LCS_WINDOWS_COLOR_SPACE = 87 // /usr/x86_64-w64-mingw32/include/wingdi.h:498:1: LCS_sRGB = 115 // /usr/x86_64-w64-mingw32/include/wingdi.h:497:1: LC_INTERIORS = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1584:1: LC_MARKER = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1579:1: LC_NONE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1577:1: LC_POLYLINE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1578:1: LC_POLYMARKER = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1580:1: LC_STYLED = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1582:1: LC_WIDE = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1581:1: LC_WIDESTYLED = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1583:1: LEFT_ALT_PRESSED = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:45:1: LEFT_CTRL_PRESSED = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:47:1: LEGACY_SCHEMA_TABLE = "sqlite_master" // testdata/sqlite-amalgamation-3380500/sqlite3.c:14488:1: LEGACY_TEMP_SCHEMA_TABLE = "sqlite_temp_master" // testdata/sqlite-amalgamation-3380500/sqlite3.c:14489:1: LF_FACESIZE = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1040:1: LF_FULLFACESIZE = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1083:1: LGRPID_ARABIC = 0x000d // /usr/x86_64-w64-mingw32/include/winnls.h:603:1: LGRPID_ARMENIAN = 0x0011 // /usr/x86_64-w64-mingw32/include/winnls.h:607:1: LGRPID_BALTIC = 0x0003 // /usr/x86_64-w64-mingw32/include/winnls.h:592:1: LGRPID_CENTRAL_EUROPE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnls.h:591:1: LGRPID_CYRILLIC = 0x0005 // /usr/x86_64-w64-mingw32/include/winnls.h:594:1: LGRPID_GEORGIAN = 0x0010 // /usr/x86_64-w64-mingw32/include/winnls.h:606:1: LGRPID_GREEK = 0x0004 // /usr/x86_64-w64-mingw32/include/winnls.h:593:1: LGRPID_HEBREW = 0x000c // /usr/x86_64-w64-mingw32/include/winnls.h:602:1: LGRPID_INDIC = 0x000f // /usr/x86_64-w64-mingw32/include/winnls.h:605:1: LGRPID_INSTALLED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:144:1: LGRPID_JAPANESE = 0x0007 // /usr/x86_64-w64-mingw32/include/winnls.h:597:1: LGRPID_KOREAN = 0x0008 // /usr/x86_64-w64-mingw32/include/winnls.h:598:1: LGRPID_SIMPLIFIED_CHINESE = 0x000a // /usr/x86_64-w64-mingw32/include/winnls.h:600:1: LGRPID_SUPPORTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:145:1: LGRPID_THAI = 0x000b // /usr/x86_64-w64-mingw32/include/winnls.h:601:1: LGRPID_TRADITIONAL_CHINESE = 0x0009 // /usr/x86_64-w64-mingw32/include/winnls.h:599:1: LGRPID_TURKIC = 0x0006 // /usr/x86_64-w64-mingw32/include/winnls.h:595:1: LGRPID_TURKISH = 0x0006 // /usr/x86_64-w64-mingw32/include/winnls.h:596:1: LGRPID_VIETNAMESE = 0x000e // /usr/x86_64-w64-mingw32/include/winnls.h:604:1: LGRPID_WESTERN_EUROPE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnls.h:590:1: LHND = 66 // /usr/x86_64-w64-mingw32/include/minwinbase.h:353:1: LINECAPS = 30 // /usr/x86_64-w64-mingw32/include/wingdi.h:1526:1: LINGUISTIC_IGNORECASE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:101:1: LINGUISTIC_IGNOREDIACRITIC = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:102:1: LISTEN_OUTSTANDING = 0x01 // /usr/x86_64-w64-mingw32/include/nb30.h:102:1: LLKHF_ALTDOWN = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:668:1: LLKHF_EXTENDED = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:666:1: LLKHF_INJECTED = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:667:1: LLKHF_LOWER_IL_INJECTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:670:1: LLKHF_UP = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:669:1: LLMHF_INJECTED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:672:1: LLMHF_LOWER_IL_INJECTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:673:1: LLONG_MAX = 9223372036854775807 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:142:1: LLONG_MIN = -9223372036854775808 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:140:1: LMEM_DISCARDABLE = 0xf00 // /usr/x86_64-w64-mingw32/include/minwinbase.h:349:1: LMEM_DISCARDED = 0x4000 // /usr/x86_64-w64-mingw32/include/minwinbase.h:361:1: LMEM_FIXED = 0x0 // /usr/x86_64-w64-mingw32/include/minwinbase.h:343:1: LMEM_INVALID_HANDLE = 0x8000 // /usr/x86_64-w64-mingw32/include/minwinbase.h:351:1: LMEM_LOCKCOUNT = 0xff // /usr/x86_64-w64-mingw32/include/minwinbase.h:362:1: LMEM_MODIFY = 0x80 // /usr/x86_64-w64-mingw32/include/minwinbase.h:348:1: LMEM_MOVEABLE = 0x2 // /usr/x86_64-w64-mingw32/include/minwinbase.h:344:1: LMEM_NOCOMPACT = 0x10 // /usr/x86_64-w64-mingw32/include/minwinbase.h:345:1: LMEM_NODISCARD = 0x20 // /usr/x86_64-w64-mingw32/include/minwinbase.h:346:1: LMEM_VALID_FLAGS = 0xf72 // /usr/x86_64-w64-mingw32/include/minwinbase.h:350:1: LMEM_ZEROINIT = 0x40 // /usr/x86_64-w64-mingw32/include/minwinbase.h:347:1: LOAD_DLL_DEBUG_EVENT = 6 // /usr/x86_64-w64-mingw32/include/minwinbase.h:229:1: LOAD_IGNORE_CODE_AUTHZ_LEVEL = 0x10 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:62:1: LOAD_LIBRARY_AS_DATAFILE = 0x2 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:60:1: LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 0x40 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:64:1: LOAD_LIBRARY_AS_IMAGE_RESOURCE = 0x20 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:63:1: LOAD_LIBRARY_REQUIRE_SIGNED_TARGET = 0x80 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:65:1: LOAD_LIBRARY_SEARCH_APPLICATION_DIR = 0x200 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:67:1: LOAD_LIBRARY_SEARCH_DEFAULT_DIRS = 0x1000 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:70:1: LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR = 0x100 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:66:1: LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x800 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:69:1: LOAD_LIBRARY_SEARCH_SYSTEM32_NO_FORWARDER = 2048 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:76:1: LOAD_LIBRARY_SEARCH_USER_DIRS = 0x400 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:68:1: LOAD_TLB_AS_32BIT = 0x20 // /usr/x86_64-w64-mingw32/include/oleauto.h:594:1: LOAD_TLB_AS_64BIT = 0x40 // /usr/x86_64-w64-mingw32/include/oleauto.h:595:1: LOAD_WITH_ALTERED_SEARCH_PATH = 0x8 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:61:1: LOCALE_FONTSIGNATURE = 0x00000058 // /usr/x86_64-w64-mingw32/include/winnls.h:441:1: LOCALE_ICALENDARTYPE = 0x00001009 // /usr/x86_64-w64-mingw32/include/winnls.h:386:1: LOCALE_ICENTURY = 0x00000024 // /usr/x86_64-w64-mingw32/include/winnls.h:379:1: LOCALE_ICOUNTRY = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnls.h:339:1: LOCALE_ICURRDIGITS = 0x00000019 // /usr/x86_64-w64-mingw32/include/winnls.h:365:1: LOCALE_ICURRENCY = 0x0000001b // /usr/x86_64-w64-mingw32/include/winnls.h:367:1: LOCALE_IDATE = 0x00000021 // /usr/x86_64-w64-mingw32/include/winnls.h:375:1: LOCALE_IDAYLZERO = 0x00000026 // /usr/x86_64-w64-mingw32/include/winnls.h:381:1: LOCALE_IDEFAULTANSICODEPAGE = 0x00001004 // /usr/x86_64-w64-mingw32/include/winnls.h:346:1: LOCALE_IDEFAULTCODEPAGE = 0x0000000b // /usr/x86_64-w64-mingw32/include/winnls.h:345:1: LOCALE_IDEFAULTCOUNTRY = 0x0000000a // /usr/x86_64-w64-mingw32/include/winnls.h:344:1: LOCALE_IDEFAULTEBCDICCODEPAGE = 0x00001012 // /usr/x86_64-w64-mingw32/include/winnls.h:445:1: LOCALE_IDEFAULTLANGUAGE = 0x00000009 // /usr/x86_64-w64-mingw32/include/winnls.h:343:1: LOCALE_IDEFAULTMACCODEPAGE = 0x00001011 // /usr/x86_64-w64-mingw32/include/winnls.h:347:1: LOCALE_IDIGITS = 0x00000011 // /usr/x86_64-w64-mingw32/include/winnls.h:355:1: LOCALE_IDIGITSUBSTITUTION = 0x00001014 // /usr/x86_64-w64-mingw32/include/winnls.h:451:1: LOCALE_IFIRSTDAYOFWEEK = 0x0000100c // /usr/x86_64-w64-mingw32/include/winnls.h:388:1: LOCALE_IFIRSTWEEKOFYEAR = 0x0000100d // /usr/x86_64-w64-mingw32/include/winnls.h:389:1: LOCALE_IGEOID = 0x0000005b // /usr/x86_64-w64-mingw32/include/winnls.h:341:1: LOCALE_IINTLCURRDIGITS = 0x0000001a // /usr/x86_64-w64-mingw32/include/winnls.h:366:1: LOCALE_ILANGUAGE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:335:1: LOCALE_ILDATE = 0x00000022 // /usr/x86_64-w64-mingw32/include/winnls.h:376:1: LOCALE_ILZERO = 0x00000012 // /usr/x86_64-w64-mingw32/include/winnls.h:356:1: LOCALE_IMEASURE = 0x0000000d // /usr/x86_64-w64-mingw32/include/winnls.h:350:1: LOCALE_IMONLZERO = 0x00000027 // /usr/x86_64-w64-mingw32/include/winnls.h:382:1: LOCALE_INEGCURR = 0x0000001c // /usr/x86_64-w64-mingw32/include/winnls.h:368:1: LOCALE_INEGNUMBER = 0x00001010 // /usr/x86_64-w64-mingw32/include/winnls.h:357:1: LOCALE_INEGSEPBYSPACE = 0x00000057 // /usr/x86_64-w64-mingw32/include/winnls.h:439:1: LOCALE_INEGSIGNPOSN = 0x00000053 // /usr/x86_64-w64-mingw32/include/winnls.h:435:1: LOCALE_INEGSYMPRECEDES = 0x00000056 // /usr/x86_64-w64-mingw32/include/winnls.h:438:1: LOCALE_IOPTIONALCALENDAR = 0x0000100b // /usr/x86_64-w64-mingw32/include/winnls.h:387:1: LOCALE_IPAPERSIZE = 0x0000100a // /usr/x86_64-w64-mingw32/include/winnls.h:446:1: LOCALE_IPOSSEPBYSPACE = 0x00000055 // /usr/x86_64-w64-mingw32/include/winnls.h:437:1: LOCALE_IPOSSIGNPOSN = 0x00000052 // /usr/x86_64-w64-mingw32/include/winnls.h:434:1: LOCALE_IPOSSYMPRECEDES = 0x00000054 // /usr/x86_64-w64-mingw32/include/winnls.h:436:1: LOCALE_ITIME = 0x00000023 // /usr/x86_64-w64-mingw32/include/winnls.h:377:1: LOCALE_ITIMEMARKPOSN = 0x00001005 // /usr/x86_64-w64-mingw32/include/winnls.h:378:1: LOCALE_ITLZERO = 0x00000025 // /usr/x86_64-w64-mingw32/include/winnls.h:380:1: LOCALE_NAME_MAX_LENGTH = 85 // /usr/x86_64-w64-mingw32/include/winnt.h:1296:1: LOCALE_NOUSEROVERRIDE = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnls.h:307:1: LOCALE_RETURN_NUMBER = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnls.h:305:1: LOCALE_S1159 = 0x00000028 // /usr/x86_64-w64-mingw32/include/winnls.h:383:1: LOCALE_S2359 = 0x00000029 // /usr/x86_64-w64-mingw32/include/winnls.h:384:1: LOCALE_SABBREVCTRYNAME = 0x00000007 // /usr/x86_64-w64-mingw32/include/winnls.h:340:1: LOCALE_SABBREVDAYNAME1 = 0x00000031 // /usr/x86_64-w64-mingw32/include/winnls.h:398:1: LOCALE_SABBREVDAYNAME2 = 0x00000032 // /usr/x86_64-w64-mingw32/include/winnls.h:399:1: LOCALE_SABBREVDAYNAME3 = 0x00000033 // /usr/x86_64-w64-mingw32/include/winnls.h:400:1: LOCALE_SABBREVDAYNAME4 = 0x00000034 // /usr/x86_64-w64-mingw32/include/winnls.h:401:1: LOCALE_SABBREVDAYNAME5 = 0x00000035 // /usr/x86_64-w64-mingw32/include/winnls.h:402:1: LOCALE_SABBREVDAYNAME6 = 0x00000036 // /usr/x86_64-w64-mingw32/include/winnls.h:403:1: LOCALE_SABBREVDAYNAME7 = 0x00000037 // /usr/x86_64-w64-mingw32/include/winnls.h:404:1: LOCALE_SABBREVLANGNAME = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnls.h:337:1: LOCALE_SABBREVMONTHNAME1 = 0x00000044 // /usr/x86_64-w64-mingw32/include/winnls.h:418:1: LOCALE_SABBREVMONTHNAME10 = 0x0000004d // /usr/x86_64-w64-mingw32/include/winnls.h:427:1: LOCALE_SABBREVMONTHNAME11 = 0x0000004e // /usr/x86_64-w64-mingw32/include/winnls.h:428:1: LOCALE_SABBREVMONTHNAME12 = 0x0000004f // /usr/x86_64-w64-mingw32/include/winnls.h:429:1: LOCALE_SABBREVMONTHNAME13 = 0x0000100f // /usr/x86_64-w64-mingw32/include/winnls.h:430:1: LOCALE_SABBREVMONTHNAME2 = 0x00000045 // /usr/x86_64-w64-mingw32/include/winnls.h:419:1: LOCALE_SABBREVMONTHNAME3 = 0x00000046 // /usr/x86_64-w64-mingw32/include/winnls.h:420:1: LOCALE_SABBREVMONTHNAME4 = 0x00000047 // /usr/x86_64-w64-mingw32/include/winnls.h:421:1: LOCALE_SABBREVMONTHNAME5 = 0x00000048 // /usr/x86_64-w64-mingw32/include/winnls.h:422:1: LOCALE_SABBREVMONTHNAME6 = 0x00000049 // /usr/x86_64-w64-mingw32/include/winnls.h:423:1: LOCALE_SABBREVMONTHNAME7 = 0x0000004a // /usr/x86_64-w64-mingw32/include/winnls.h:424:1: LOCALE_SABBREVMONTHNAME8 = 0x0000004b // /usr/x86_64-w64-mingw32/include/winnls.h:425:1: LOCALE_SABBREVMONTHNAME9 = 0x0000004c // /usr/x86_64-w64-mingw32/include/winnls.h:426:1: LOCALE_SCOUNTRY = 0x00000006 // /usr/x86_64-w64-mingw32/include/winnls.h:331:1: LOCALE_SCURRENCY = 0x00000014 // /usr/x86_64-w64-mingw32/include/winnls.h:360:1: LOCALE_SDATE = 0x0000001d // /usr/x86_64-w64-mingw32/include/winnls.h:370:1: LOCALE_SDAYNAME1 = 0x0000002a // /usr/x86_64-w64-mingw32/include/winnls.h:391:1: LOCALE_SDAYNAME2 = 0x0000002b // /usr/x86_64-w64-mingw32/include/winnls.h:392:1: LOCALE_SDAYNAME3 = 0x0000002c // /usr/x86_64-w64-mingw32/include/winnls.h:393:1: LOCALE_SDAYNAME4 = 0x0000002d // /usr/x86_64-w64-mingw32/include/winnls.h:394:1: LOCALE_SDAYNAME5 = 0x0000002e // /usr/x86_64-w64-mingw32/include/winnls.h:395:1: LOCALE_SDAYNAME6 = 0x0000002f // /usr/x86_64-w64-mingw32/include/winnls.h:396:1: LOCALE_SDAYNAME7 = 0x00000030 // /usr/x86_64-w64-mingw32/include/winnls.h:397:1: LOCALE_SDECIMAL = 0x0000000e // /usr/x86_64-w64-mingw32/include/winnls.h:352:1: LOCALE_SENGCOUNTRY = 0x00001002 // /usr/x86_64-w64-mingw32/include/winnls.h:332:1: LOCALE_SENGCURRNAME = 0x00001007 // /usr/x86_64-w64-mingw32/include/winnls.h:447:1: LOCALE_SENGLANGUAGE = 0x00001001 // /usr/x86_64-w64-mingw32/include/winnls.h:329:1: LOCALE_SENGLISHCOUNTRYNAME = 0x00001002 // /usr/x86_64-w64-mingw32/include/winnls.h:322:1: LOCALE_SENGLISHLANGUAGENAME = 0x00001001 // /usr/x86_64-w64-mingw32/include/winnls.h:318:1: LOCALE_SGROUPING = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:354:1: LOCALE_SINTLSYMBOL = 0x00000015 // /usr/x86_64-w64-mingw32/include/winnls.h:361:1: LOCALE_SISO3166CTRYNAME = 0x0000005a // /usr/x86_64-w64-mingw32/include/winnls.h:443:1: LOCALE_SISO639LANGNAME = 0x00000059 // /usr/x86_64-w64-mingw32/include/winnls.h:442:1: LOCALE_SLANGUAGE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:325:1: LOCALE_SLIST = 0x0000000c // /usr/x86_64-w64-mingw32/include/winnls.h:349:1: LOCALE_SLOCALIZEDCOUNTRYNAME = 0x00000006 // /usr/x86_64-w64-mingw32/include/winnls.h:321:1: LOCALE_SLOCALIZEDDISPLAYNAME = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:300:1: LOCALE_SLONGDATE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:373:1: LOCALE_SMONDECIMALSEP = 0x00000016 // /usr/x86_64-w64-mingw32/include/winnls.h:362:1: LOCALE_SMONGROUPING = 0x00000018 // /usr/x86_64-w64-mingw32/include/winnls.h:364:1: LOCALE_SMONTHNAME1 = 0x00000038 // /usr/x86_64-w64-mingw32/include/winnls.h:405:1: LOCALE_SMONTHNAME10 = 0x00000041 // /usr/x86_64-w64-mingw32/include/winnls.h:414:1: LOCALE_SMONTHNAME11 = 0x00000042 // /usr/x86_64-w64-mingw32/include/winnls.h:415:1: LOCALE_SMONTHNAME12 = 0x00000043 // /usr/x86_64-w64-mingw32/include/winnls.h:416:1: LOCALE_SMONTHNAME13 = 0x0000100e // /usr/x86_64-w64-mingw32/include/winnls.h:417:1: LOCALE_SMONTHNAME2 = 0x00000039 // /usr/x86_64-w64-mingw32/include/winnls.h:406:1: LOCALE_SMONTHNAME3 = 0x0000003a // /usr/x86_64-w64-mingw32/include/winnls.h:407:1: LOCALE_SMONTHNAME4 = 0x0000003b // /usr/x86_64-w64-mingw32/include/winnls.h:408:1: LOCALE_SMONTHNAME5 = 0x0000003c // /usr/x86_64-w64-mingw32/include/winnls.h:409:1: LOCALE_SMONTHNAME6 = 0x0000003d // /usr/x86_64-w64-mingw32/include/winnls.h:410:1: LOCALE_SMONTHNAME7 = 0x0000003e // /usr/x86_64-w64-mingw32/include/winnls.h:411:1: LOCALE_SMONTHNAME8 = 0x0000003f // /usr/x86_64-w64-mingw32/include/winnls.h:412:1: LOCALE_SMONTHNAME9 = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnls.h:413:1: LOCALE_SMONTHOUSANDSEP = 0x00000017 // /usr/x86_64-w64-mingw32/include/winnls.h:363:1: LOCALE_SNATIVECOUNTRYNAME = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:323:1: LOCALE_SNATIVECTRYNAME = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:333:1: LOCALE_SNATIVECURRNAME = 0x00001008 // /usr/x86_64-w64-mingw32/include/winnls.h:448:1: LOCALE_SNATIVEDIGITS = 0x00000013 // /usr/x86_64-w64-mingw32/include/winnls.h:358:1: LOCALE_SNATIVELANGNAME = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:330:1: LOCALE_SNATIVELANGUAGENAME = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:319:1: LOCALE_SNEGATIVESIGN = 0x00000051 // /usr/x86_64-w64-mingw32/include/winnls.h:433:1: LOCALE_SPOSITIVESIGN = 0x00000050 // /usr/x86_64-w64-mingw32/include/winnls.h:432:1: LOCALE_SSHORTDATE = 0x0000001f // /usr/x86_64-w64-mingw32/include/winnls.h:372:1: LOCALE_SSORTNAME = 0x00001013 // /usr/x86_64-w64-mingw32/include/winnls.h:450:1: LOCALE_STHOUSAND = 0x0000000f // /usr/x86_64-w64-mingw32/include/winnls.h:353:1: LOCALE_STIME = 0x0000001e // /usr/x86_64-w64-mingw32/include/winnls.h:371:1: LOCALE_STIMEFORMAT = 0x00001003 // /usr/x86_64-w64-mingw32/include/winnls.h:374:1: LOCALE_SYEARMONTH = 0x00001006 // /usr/x86_64-w64-mingw32/include/winnls.h:449:1: LOCALE_USE_CP_ACP = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnls.h:306:1: LOCALE_USE_NLS = 0x10000000 // /usr/x86_64-w64-mingw32/include/oleauto.h:112:1: LOCATE_NOERR = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19891:1: LOCATE_VIEW = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19890:1: LOCKFILE_EXCLUSIVE_LOCK = 0x2 // /usr/x86_64-w64-mingw32/include/minwinbase.h:181:1: LOCKFILE_FAIL_IMMEDIATELY = 0x1 // /usr/x86_64-w64-mingw32/include/minwinbase.h:180:1: LOCK_ELEMENT = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:1109:1: LOCK_UNLOCK_DOOR = 0x02 // /usr/x86_64-w64-mingw32/include/winioctl.h:1067:1: LOCK_UNLOCK_IEPORT = 0x01 // /usr/x86_64-w64-mingw32/include/winioctl.h:1066:1: LOCK_UNLOCK_KEYPAD = 0x04 // /usr/x86_64-w64-mingw32/include/winioctl.h:1068:1: LOGON32_LOGON_BATCH = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2421:1: LOGON32_LOGON_INTERACTIVE = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2419:1: LOGON32_LOGON_NETWORK = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:2420:1: LOGON32_LOGON_NETWORK_CLEARTEXT = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:2424:1: LOGON32_LOGON_NEW_CREDENTIALS = 9 // /usr/x86_64-w64-mingw32/include/winbase.h:2425:1: LOGON32_LOGON_SERVICE = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:2422:1: LOGON32_LOGON_UNLOCK = 7 // /usr/x86_64-w64-mingw32/include/winbase.h:2423:1: LOGON32_PROVIDER_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:2427:1: LOGON32_PROVIDER_WINNT35 = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2428:1: LOGON32_PROVIDER_WINNT40 = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2429:1: LOGON32_PROVIDER_WINNT50 = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:2430:1: LOGON_NETCREDENTIALS_ONLY = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:2449:1: LOGON_WITH_PROFILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:2448:1: LOGON_ZERO_PASSWORD_BUFFER = 0x80000000 // /usr/x86_64-w64-mingw32/include/winbase.h:2450:1: LOGPIXELSX = 88 // /usr/x86_64-w64-mingw32/include/wingdi.h:1535:1: LOGPIXELSY = 90 // /usr/x86_64-w64-mingw32/include/wingdi.h:1536:1: LONG_LONG_MAX = 9223372036854775807 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:154:1: LONG_LONG_MIN = -9223372036854775808 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:152:1: LONG_MAX = 2147483647 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:131:1: LONG_MIN = -2147483648 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:129:1: LOOKASIDE_SMALL = 128 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16708:1: LOW_SURROGATE_END = 0xdfff // /usr/x86_64-w64-mingw32/include/winnls.h:36:1: LOW_SURROGATE_START = 0xdc00 // /usr/x86_64-w64-mingw32/include/winnls.h:35:1: LPD_DOUBLEBUFFER = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4350:1: LPD_SHARE_ACCUM = 0x00000100 // /usr/x86_64-w64-mingw32/include/wingdi.h:4356:1: LPD_SHARE_DEPTH = 0x00000040 // /usr/x86_64-w64-mingw32/include/wingdi.h:4354:1: LPD_SHARE_STENCIL = 0x00000080 // /usr/x86_64-w64-mingw32/include/wingdi.h:4355:1: LPD_STEREO = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:4351:1: LPD_SUPPORT_GDI = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:4352:1: LPD_SUPPORT_OPENGL = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:4353:1: LPD_SWAP_COPY = 0x00000400 // /usr/x86_64-w64-mingw32/include/wingdi.h:4358:1: LPD_SWAP_EXCHANGE = 0x00000200 // /usr/x86_64-w64-mingw32/include/wingdi.h:4357:1: LPD_TRANSPARENT = 0x00001000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4359:1: LPD_TYPE_COLORINDEX = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:4362:1: LPD_TYPE_RGBA = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:4361:1: LPTR = 64 // /usr/x86_64-w64-mingw32/include/minwinbase.h:354:1: LPTx = 0x80 // /usr/x86_64-w64-mingw32/include/winbase.h:548:1: LR_COLOR = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4184:1: LR_COPYDELETEORG = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:4186:1: LR_COPYFROMRESOURCE = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:4193:1: LR_COPYRETURNORG = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4185:1: LR_CREATEDIBSECTION = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:4192:1: LR_DEFAULTCOLOR = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:4182:1: LR_DEFAULTSIZE = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:4189:1: LR_LOADFROMFILE = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:4187:1: LR_LOADMAP3DCOLORS = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:4191:1: LR_LOADTRANSPARENT = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:4188:1: LR_MONOCHROME = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4183:1: LR_SHARED = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:4194:1: LR_VGACOLOR = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:4190:1: LSFW_LOCK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3526:1: LSFW_UNLOCK = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3527:1: LTGRAY_BRUSH = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1439:1: LTP_PC_SMT = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:4610:1: LUA_TOKEN = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:4005:1: LWA_ALPHA = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2251:1: LWA_COLORKEY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2250:1: LZERROR_BADINHANDLE = -1 // /usr/x86_64-w64-mingw32/include/lzexpand.h:15:1: LZERROR_BADOUTHANDLE = -2 // /usr/x86_64-w64-mingw32/include/lzexpand.h:16:1: LZERROR_BADVALUE = -7 // /usr/x86_64-w64-mingw32/include/lzexpand.h:21:1: LZERROR_GLOBALLOC = -5 // /usr/x86_64-w64-mingw32/include/lzexpand.h:19:1: LZERROR_GLOBLOCK = -6 // /usr/x86_64-w64-mingw32/include/lzexpand.h:20:1: LZERROR_READ = -3 // /usr/x86_64-w64-mingw32/include/lzexpand.h:17:1: LZERROR_UNKNOWNALG = -8 // /usr/x86_64-w64-mingw32/include/lzexpand.h:22:1: LZERROR_WRITE = -4 // /usr/x86_64-w64-mingw32/include/lzexpand.h:18:1: M10d_Any = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19327:1: M10d_No = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19328:1: M10d_Yes = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19326:1: MAC_CHARSET = 77 // /usr/x86_64-w64-mingw32/include/wingdi.h:1175:1: MAPVK_VK_TO_CHAR = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:2991:1: MAPVK_VK_TO_VSC = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:2989:1: MAPVK_VSC_TO_VK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:2990:1: MAPVK_VSC_TO_VK_EX = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:2992:1: MAP_COMPOSITE = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnls.h:110:1: MAP_EXPAND_LIGATURES = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnls.h:113:1: MAP_FOLDCZONE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:108:1: MAP_FOLDDIGITS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnls.h:111:1: MAP_PRECOMPOSED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:109:1: MARKPARITY = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:472:1: MARK_HANDLE_NOT_REALTIME = 64 // /usr/x86_64-w64-mingw32/include/winioctl.h:1534:1: MARK_HANDLE_NOT_TXF_SYSTEM_LOG = 8 // /usr/x86_64-w64-mingw32/include/winioctl.h:1532:1: MARK_HANDLE_PROTECT_CLUSTERS = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1530:1: MARK_HANDLE_REALTIME = 32 // /usr/x86_64-w64-mingw32/include/winioctl.h:1533:1: MARK_HANDLE_TXF_SYSTEM_LOG = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:1531:1: MARSHALINTERFACE_MIN = 500 // /usr/x86_64-w64-mingw32/include/objbase.h:23:1: MARSHAL_E_FIRST = 2147746080 // /usr/x86_64-w64-mingw32/include/winerror.h:2361:1: MARSHAL_E_LAST = 2147746095 // /usr/x86_64-w64-mingw32/include/winerror.h:2362:1: MARSHAL_S_FIRST = 262432 // /usr/x86_64-w64-mingw32/include/winerror.h:2363:1: MARSHAL_S_LAST = 262447 // /usr/x86_64-w64-mingw32/include/winerror.h:2364:1: MASK_TO_RESET_TLB_BITS = -97 // /usr/x86_64-w64-mingw32/include/oleauto.h:596:1: MAXBYTE = 0xff // /usr/x86_64-w64-mingw32/include/winnt.h:651:1: MAXCHAR = 0x7f // /usr/x86_64-w64-mingw32/include/winnt.h:646:1: MAXDWORD = 0xffffffff // /usr/x86_64-w64-mingw32/include/winnt.h:653:1: MAXERRORLENGTH = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:25:1: MAXGETHOSTSTRUCT = 1024 // /usr/x86_64-w64-mingw32/include/winsock.h:265:1: MAXIMUM_ALLOWED = 33554432 // /usr/x86_64-w64-mingw32/include/winnt.h:2896:1: MAXIMUM_ATTR_STRING_LENGTH = 32 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:72:1: MAXIMUM_ENCRYPTION_VALUE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1711:1: MAXIMUM_PROCESSORS = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4065:1: MAXIMUM_PROC_PER_GROUP = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4060:1: MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16384 // /usr/x86_64-w64-mingw32/include/winnt.h:5097:1: MAXIMUM_SMARTCARD_READERS = 10 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:73:1: MAXIMUM_SUSPEND_COUNT = 127 // /usr/x86_64-w64-mingw32/include/winnt.h:1382:1: MAXIMUM_WAIT_OBJECTS = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:1381:1: MAXIMUM_XSTATE_FEATURES = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4783:1: MAXINTATOM = 0xc000 // /usr/x86_64-w64-mingw32/include/winbase.h:1088:1: MAXLOGICALLOGNAMESIZE = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:8476:1: MAXLONG = 0x7fffffff // /usr/x86_64-w64-mingw32/include/winnt.h:650:1: MAXLONGLONG = 9223372036854775807 // /usr/x86_64-w64-mingw32/include/winnt.h:493:1: MAXPNAMELEN = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:24:1: MAXPROPPAGES = 100 // /usr/x86_64-w64-mingw32/include/prsht.h:47:1: MAXSHORT = 0x7fff // /usr/x86_64-w64-mingw32/include/winnt.h:648:1: MAXSTRETCHBLTMODE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:93:1: MAXUIDLEN = 64 // /usr/x86_64-w64-mingw32/include/wincrypt.h:605:1: MAXWORD = 0xffff // /usr/x86_64-w64-mingw32/include/winnt.h:652:1: MAX_ACL_REVISION = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3284:1: MAX_COMPUTERNAME_LENGTH = 15 // /usr/x86_64-w64-mingw32/include/winbase.h:2404:1: MAX_DEFAULTCHAR = 2 // /usr/x86_64-w64-mingw32/include/winnls.h:31:1: MAX_HW_COUNTERS = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4225:1: MAX_JOYSTICKOEMVXDNAME = 260 // /usr/x86_64-w64-mingw32/include/mmsystem.h:26:1: MAX_LANA = 254 // /usr/x86_64-w64-mingw32/include/nb30.h:14:1: MAX_LEADBYTES = 12 // /usr/x86_64-w64-mingw32/include/winnls.h:30:1: MAX_MONITORS = 4 // /usr/x86_64-w64-mingw32/include/ddeml.h:351:1: MAX_NUM_REASONS = 256 // /usr/x86_64-w64-mingw32/include/reason.h:79:1: MAX_PATH = 260 // /usr/x86_64-w64-mingw32/include/minwindef.h:33:1: MAX_PERF_OBJECTS_IN_QUERY_FUNCTION = 64 // /usr/x86_64-w64-mingw32/include/winperf.h:185:1: MAX_PRIORITY = 99 // /usr/x86_64-w64-mingw32/include/winspool.h:228:1: MAX_PROFILE_LEN = 80 // /usr/x86_64-w64-mingw32/include/winbase.h:2470:1: MAX_REASON_BUGID_LEN = 32 // /usr/x86_64-w64-mingw32/include/reason.h:66:1: MAX_REASON_COMMENT_LEN = 512 // /usr/x86_64-w64-mingw32/include/reason.h:67:1: MAX_REASON_DESC_LEN = 256 // /usr/x86_64-w64-mingw32/include/reason.h:65:1: MAX_REASON_NAME_LEN = 64 // /usr/x86_64-w64-mingw32/include/reason.h:64:1: MAX_RESOURCEMANAGER_DESCRIPTION_LENGTH = 64 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:121:1: MAX_SECTOR_SIZE = 0x10000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53632:1: MAX_SHUTDOWN_TIMEOUT = 315360000 // /usr/x86_64-w64-mingw32/include/winreg.h:236:1: MAX_SID_SIZE = 256 // /usr/x86_64-w64-mingw32/include/winefs.h:47:1: MAX_SIZE_SECURITY_ID = 512 // /usr/x86_64-w64-mingw32/include/urlmon.h:6650:1: MAX_STR_BLOCKREASON = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:6681:1: MAX_SUPPORTED_OS_NUM = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8222:1: MAX_TRANSACTION_DESCRIPTION_LENGTH = 64 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:120:1: MAX_VOLUME_ID_SIZE = 36 // /usr/x86_64-w64-mingw32/include/winioctl.h:986:1: MAX_VOLUME_TEMPLATE_SIZE = 40 // /usr/x86_64-w64-mingw32/include/winioctl.h:987:1: MA_ACTIVATE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1491:1: MA_ACTIVATEANDEAT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1492:1: MA_NOACTIVATE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1493:1: MA_NOACTIVATEANDEAT = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1494:1: MB_ABORTRETRYIGNORE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3671:1: MB_APPLMODAL = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3689:1: MB_CANCELTRYCONTINUE = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3675:1: MB_COMPOSITE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:39:1: MB_DEFAULT_DESKTOP_ONLY = 131072 // /usr/x86_64-w64-mingw32/include/winuser.h:3695:1: MB_DEFBUTTON1 = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3685:1: MB_DEFBUTTON2 = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:3686:1: MB_DEFBUTTON3 = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:3687:1: MB_DEFBUTTON4 = 768 // /usr/x86_64-w64-mingw32/include/winuser.h:3688:1: MB_DEFMASK = 3840 // /usr/x86_64-w64-mingw32/include/winuser.h:3703:1: MB_ERR_INVALID_CHARS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:41:1: MB_HELP = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:3692:1: MB_ICONASTERISK = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:3679:1: MB_ICONERROR = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3682:1: MB_ICONEXCLAMATION = 48 // /usr/x86_64-w64-mingw32/include/winuser.h:3678:1: MB_ICONHAND = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3676:1: MB_ICONINFORMATION = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:3683:1: MB_ICONMASK = 240 // /usr/x86_64-w64-mingw32/include/winuser.h:3702:1: MB_ICONQUESTION = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:3677:1: MB_ICONSTOP = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3684:1: MB_ICONWARNING = 48 // /usr/x86_64-w64-mingw32/include/winuser.h:3681:1: MB_LEN_MAX = 5 // /usr/x86_64-w64-mingw32/include/limits.h:35:1: MB_MISCMASK = 49152 // /usr/x86_64-w64-mingw32/include/winuser.h:3705:1: MB_MODEMASK = 12288 // /usr/x86_64-w64-mingw32/include/winuser.h:3704:1: MB_NOFOCUS = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:3693:1: MB_OK = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3669:1: MB_OKCANCEL = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3670:1: MB_PRECOMPOSED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:38:1: MB_RETRYCANCEL = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:3674:1: MB_RIGHT = 524288 // /usr/x86_64-w64-mingw32/include/winuser.h:3697:1: MB_RTLREADING = 1048576 // /usr/x86_64-w64-mingw32/include/winuser.h:3698:1: MB_SERVICE_NOTIFICATION = 2097152 // /usr/x86_64-w64-mingw32/include/winuser.h:3699:1: MB_SERVICE_NOTIFICATION_NT3X = 262144 // /usr/x86_64-w64-mingw32/include/winuser.h:3700:1: MB_SETFOREGROUND = 65536 // /usr/x86_64-w64-mingw32/include/winuser.h:3694:1: MB_SYSTEMMODAL = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:3690:1: MB_TASKMODAL = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:3691:1: MB_TOPMOST = 262144 // /usr/x86_64-w64-mingw32/include/winuser.h:3696:1: MB_TYPEMASK = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:3701:1: MB_USEGLYPHCHARS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:40:1: MB_USERICON = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:3680:1: MB_YESNO = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3673:1: MB_YESNOCANCEL = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3672:1: MCIERR_BAD_CONSTANT = 290 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1849:1: MCIERR_BAD_INTEGER = 270 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1831:1: MCIERR_BAD_TIME_FORMAT = 293 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1852:1: MCIERR_BASE = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:131:1: MCIERR_CANNOT_LOAD_DRIVER = 266 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1827:1: MCIERR_CANNOT_USE_ALL = 279 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1840:1: MCIERR_CREATEWINDOW = 347 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1891:1: MCIERR_CUSTOM_DRIVER_BASE = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1895:1: MCIERR_DEVICE_LENGTH = 310 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1869:1: MCIERR_DEVICE_LOCKED = 288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1847:1: MCIERR_DEVICE_NOT_INSTALLED = 306 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1865:1: MCIERR_DEVICE_NOT_READY = 276 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1837:1: MCIERR_DEVICE_OPEN = 265 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1826:1: MCIERR_DEVICE_ORD_LENGTH = 311 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1870:1: MCIERR_DEVICE_TYPE_REQUIRED = 287 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1846:1: MCIERR_DRIVER = 278 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1839:1: MCIERR_DRIVER_INTERNAL = 272 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1833:1: MCIERR_DUPLICATE_ALIAS = 289 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1848:1: MCIERR_DUPLICATE_FLAGS = 295 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1854:1: MCIERR_EXTENSION_NOT_FOUND = 281 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1842:1: MCIERR_EXTRA_CHARACTERS = 305 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1864:1: MCIERR_FILENAME_REQUIRED = 304 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1863:1: MCIERR_FILE_NOT_FOUND = 275 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1836:1: MCIERR_FILE_NOT_SAVED = 286 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1845:1: MCIERR_FILE_READ = 348 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1892:1: MCIERR_FILE_WRITE = 349 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1893:1: MCIERR_FLAGS_NOT_COMPATIBLE = 284 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1844:1: MCIERR_GET_CD = 307 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1866:1: MCIERR_HARDWARE = 262 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1823:1: MCIERR_ILLEGAL_FOR_AUTO_OPEN = 303 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1862:1: MCIERR_INTERNAL = 277 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1838:1: MCIERR_INVALID_DEVICE_ID = 257 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1820:1: MCIERR_INVALID_DEVICE_NAME = 263 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1824:1: MCIERR_INVALID_FILE = 296 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1855:1: MCIERR_MISSING_COMMAND_STRING = 267 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1828:1: MCIERR_MISSING_DEVICE_NAME = 292 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1851:1: MCIERR_MISSING_PARAMETER = 273 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1834:1: MCIERR_MISSING_STRING_ARGUMENT = 269 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1830:1: MCIERR_MULTIPLE = 280 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1841:1: MCIERR_MUST_USE_SHAREABLE = 291 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1850:1: MCIERR_NEW_REQUIRES_ALIAS = 299 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1858:1: MCIERR_NONAPPLICABLE_FUNCTION = 302 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1861:1: MCIERR_NOTIFY_ON_AUTO_OPEN = 300 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1859:1: MCIERR_NO_CLOSING_QUOTE = 294 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1853:1: MCIERR_NO_ELEMENT_ALLOWED = 301 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1860:1: MCIERR_NO_IDENTITY = 350 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1894:1: MCIERR_NO_INTEGER = 312 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1871:1: MCIERR_NO_WINDOW = 346 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1890:1: MCIERR_NULL_PARAMETER_BLOCK = 297 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1856:1: MCIERR_OUTOFRANGE = 282 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1843:1: MCIERR_OUT_OF_MEMORY = 264 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1825:1: MCIERR_PARAM_OVERFLOW = 268 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1829:1: MCIERR_PARSER_INTERNAL = 271 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1832:1: MCIERR_SEQ_DIV_INCOMPATIBLE = 336 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1882:1: MCIERR_SEQ_NOMIDIPRESENT = 343 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1889:1: MCIERR_SEQ_PORTUNSPECIFIED = 342 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1888:1: MCIERR_SEQ_PORT_INUSE = 337 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1883:1: MCIERR_SEQ_PORT_MAPNODEVICE = 339 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1885:1: MCIERR_SEQ_PORT_MISCERROR = 340 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1886:1: MCIERR_SEQ_PORT_NONEXISTENT = 338 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1884:1: MCIERR_SEQ_TIMER = 341 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1887:1: MCIERR_SET_CD = 308 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1867:1: MCIERR_SET_DRIVE = 309 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1868:1: MCIERR_UNNAMED_RESOURCE = 298 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1857:1: MCIERR_UNRECOGNIZED_COMMAND = 261 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1822:1: MCIERR_UNRECOGNIZED_KEYWORD = 259 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1821:1: MCIERR_UNSUPPORTED_FUNCTION = 274 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1835:1: MCIERR_WAVE_INPUTSINUSE = 322 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1874:1: MCIERR_WAVE_INPUTSUNSUITABLE = 328 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1880:1: MCIERR_WAVE_INPUTUNSPECIFIED = 325 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1877:1: MCIERR_WAVE_OUTPUTSINUSE = 320 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1872:1: MCIERR_WAVE_OUTPUTSUNSUITABLE = 326 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1878:1: MCIERR_WAVE_OUTPUTUNSPECIFIED = 324 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1876:1: MCIERR_WAVE_SETINPUTINUSE = 323 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1875:1: MCIERR_WAVE_SETINPUTUNSUITABLE = 329 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1881:1: MCIERR_WAVE_SETOUTPUTINUSE = 321 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1873:1: MCIERR_WAVE_SETOUTPUTUNSUITABLE = 327 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1879:1: MCI_ANIM_GETDEVCAPS_CAN_REVERSE = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2403:1: MCI_ANIM_GETDEVCAPS_CAN_STRETCH = 16391 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2408:1: MCI_ANIM_GETDEVCAPS_FAST_RATE = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2404:1: MCI_ANIM_GETDEVCAPS_MAX_WINDOWS = 16392 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2409:1: MCI_ANIM_GETDEVCAPS_NORMAL_RATE = 16388 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2406:1: MCI_ANIM_GETDEVCAPS_PALETTES = 16390 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2407:1: MCI_ANIM_GETDEVCAPS_SLOW_RATE = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2405:1: MCI_ANIM_INFO_TEXT = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2401:1: MCI_ANIM_OPEN_NOSTATIC = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2384:1: MCI_ANIM_OPEN_PARENT = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2383:1: MCI_ANIM_OPEN_WS = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2382:1: MCI_ANIM_PLAY_FAST = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2388:1: MCI_ANIM_PLAY_REVERSE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2387:1: MCI_ANIM_PLAY_SCAN = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2390:1: MCI_ANIM_PLAY_SLOW = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2389:1: MCI_ANIM_PLAY_SPEED = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2386:1: MCI_ANIM_PUT_DESTINATION = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2424:1: MCI_ANIM_PUT_SOURCE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2423:1: MCI_ANIM_REALIZE_BKGD = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2412:1: MCI_ANIM_REALIZE_NORM = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2411:1: MCI_ANIM_RECT = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2422:1: MCI_ANIM_STATUS_FORWARD = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2396:1: MCI_ANIM_STATUS_HPAL = 16388 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2398:1: MCI_ANIM_STATUS_HWND = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2397:1: MCI_ANIM_STATUS_SPEED = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2395:1: MCI_ANIM_STATUS_STRETCH = 16389 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2399:1: MCI_ANIM_STEP_FRAMES = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2393:1: MCI_ANIM_STEP_REVERSE = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2392:1: MCI_ANIM_UPDATE_HDC = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2429:1: MCI_ANIM_WHERE_DESTINATION = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2427:1: MCI_ANIM_WHERE_SOURCE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2426:1: MCI_ANIM_WINDOW_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2420:1: MCI_ANIM_WINDOW_DISABLE_STRETCH = 2097152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2418:1: MCI_ANIM_WINDOW_ENABLE_STRETCH = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2417:1: MCI_ANIM_WINDOW_HWND = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2414:1: MCI_ANIM_WINDOW_STATE = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2415:1: MCI_ANIM_WINDOW_TEXT = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2416:1: MCI_BREAK = 0x0811 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1913:1: MCI_BREAK_HWND = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2062:1: MCI_BREAK_KEY = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2061:1: MCI_BREAK_OFF = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2063:1: MCI_CDA_STATUS_TYPE_TRACK = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2264:1: MCI_CDA_TRACK_AUDIO = 1088 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2265:1: MCI_CDA_TRACK_OTHER = 1089 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2266:1: MCI_CD_OFFSET = 1088 // /usr/x86_64-w64-mingw32/include/mmsystem.h:136:1: MCI_CLOSE = 0x0804 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1900:1: MCI_COPY = 0x0852 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1925:1: MCI_CUE = 0x0830 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1916:1: MCI_CUT = 0x0851 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1924:1: MCI_DELETE = 0x0856 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1929:1: MCI_DEVTYPE_ANIMATION = 519 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1942:1: MCI_DEVTYPE_CD_AUDIO = 516 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1939:1: MCI_DEVTYPE_DAT = 517 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1940:1: MCI_DEVTYPE_DIGITAL_VIDEO = 520 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1943:1: MCI_DEVTYPE_FIRST = 513 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1948:1: MCI_DEVTYPE_FIRST_USER = 0x1000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1951:1: MCI_DEVTYPE_LAST = 523 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1949:1: MCI_DEVTYPE_OTHER = 521 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1944:1: MCI_DEVTYPE_OVERLAY = 515 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1938:1: MCI_DEVTYPE_SCANNER = 518 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1941:1: MCI_DEVTYPE_SEQUENCER = 523 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1946:1: MCI_DEVTYPE_VCR = 513 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1936:1: MCI_DEVTYPE_VIDEODISC = 514 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1937:1: MCI_DEVTYPE_WAVEFORM_AUDIO = 522 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1945:1: MCI_ESCAPE = 0x0805 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1901:1: MCI_FIRST = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1897:1: MCI_FORMAT_BYTES = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1969:1: MCI_FORMAT_FRAMES = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1964:1: MCI_FORMAT_HMS = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1962:1: MCI_FORMAT_MILLISECONDS = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1961:1: MCI_FORMAT_MSF = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1963:1: MCI_FORMAT_SAMPLES = 9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1970:1: MCI_FORMAT_SMPTE_24 = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1965:1: MCI_FORMAT_SMPTE_25 = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1966:1: MCI_FORMAT_SMPTE_30 = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1967:1: MCI_FORMAT_SMPTE_30DROP = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1968:1: MCI_FORMAT_TMSF = 10 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1971:1: MCI_FREEZE = 0x0844 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1921:1: MCI_FROM = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1999:1: MCI_GETDEVCAPS = 0x080B // /usr/x86_64-w64-mingw32/include/mmsystem.h:1907:1: MCI_GETDEVCAPS_CAN_EJECT = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2040:1: MCI_GETDEVCAPS_CAN_PLAY = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2041:1: MCI_GETDEVCAPS_CAN_RECORD = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2034:1: MCI_GETDEVCAPS_CAN_SAVE = 9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2042:1: MCI_GETDEVCAPS_COMPOUND_DEVICE = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2039:1: MCI_GETDEVCAPS_DEVICE_TYPE = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2037:1: MCI_GETDEVCAPS_HAS_AUDIO = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2035:1: MCI_GETDEVCAPS_HAS_VIDEO = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2036:1: MCI_GETDEVCAPS_ITEM = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2032:1: MCI_GETDEVCAPS_USES_FILES = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2038:1: MCI_INFO = 0x080A // /usr/x86_64-w64-mingw32/include/mmsystem.h:1906:1: MCI_INFO_COPYRIGHT = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2030:1: MCI_INFO_FILE = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2026:1: MCI_INFO_MEDIA_IDENTITY = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2028:1: MCI_INFO_MEDIA_UPC = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2027:1: MCI_INFO_NAME = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2029:1: MCI_INFO_PRODUCT = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2025:1: MCI_LAST = 0x0FFF // /usr/x86_64-w64-mingw32/include/mmsystem.h:1932:1: MCI_LOAD = 0x0850 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1923:1: MCI_LOAD_FILE = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2070:1: MCI_MODE_NOT_READY = 524 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1953:1: MCI_MODE_OPEN = 530 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1959:1: MCI_MODE_PAUSE = 529 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1958:1: MCI_MODE_PLAY = 526 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1955:1: MCI_MODE_RECORD = 527 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1956:1: MCI_MODE_SEEK = 528 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1957:1: MCI_MODE_STOP = 525 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1954:1: MCI_NOTIFY = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1997:1: MCI_NOTIFY_ABORTED = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1994:1: MCI_NOTIFY_FAILURE = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1995:1: MCI_NOTIFY_SUCCESSFUL = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1992:1: MCI_NOTIFY_SUPERSEDED = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1993:1: MCI_OPEN = 0x0803 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1899:1: MCI_OPEN_ALIAS = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2005:1: MCI_OPEN_ELEMENT = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2004:1: MCI_OPEN_ELEMENT_ID = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2006:1: MCI_OPEN_SHAREABLE = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2003:1: MCI_OPEN_TYPE = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2008:1: MCI_OPEN_TYPE_ID = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2007:1: MCI_OVLY_GETDEVCAPS_CAN_FREEZE = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2513:1: MCI_OVLY_GETDEVCAPS_CAN_STRETCH = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2512:1: MCI_OVLY_GETDEVCAPS_MAX_WINDOWS = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2514:1: MCI_OVLY_INFO_TEXT = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2510:1: MCI_OVLY_OPEN_PARENT = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2505:1: MCI_OVLY_OPEN_WS = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2504:1: MCI_OVLY_PUT_DESTINATION = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2526:1: MCI_OVLY_PUT_FRAME = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2527:1: MCI_OVLY_PUT_SOURCE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2525:1: MCI_OVLY_PUT_VIDEO = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2528:1: MCI_OVLY_RECT = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2524:1: MCI_OVLY_STATUS_HWND = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2507:1: MCI_OVLY_STATUS_STRETCH = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2508:1: MCI_OVLY_WHERE_DESTINATION = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2531:1: MCI_OVLY_WHERE_FRAME = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2532:1: MCI_OVLY_WHERE_SOURCE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2530:1: MCI_OVLY_WHERE_VIDEO = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2533:1: MCI_OVLY_WINDOW_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2522:1: MCI_OVLY_WINDOW_DISABLE_STRETCH = 2097152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2520:1: MCI_OVLY_WINDOW_ENABLE_STRETCH = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2519:1: MCI_OVLY_WINDOW_HWND = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2516:1: MCI_OVLY_WINDOW_STATE = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2517:1: MCI_OVLY_WINDOW_TEXT = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2518:1: MCI_PASTE = 0x0853 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1926:1: MCI_PAUSE = 0x0809 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1905:1: MCI_PLAY = 0x0806 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1902:1: MCI_PUT = 0x0842 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1919:1: MCI_REALIZE = 0x0840 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1917:1: MCI_RECORD = 0x080F // /usr/x86_64-w64-mingw32/include/mmsystem.h:1911:1: MCI_RECORD_INSERT = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2065:1: MCI_RECORD_OVERWRITE = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2066:1: MCI_RESUME = 0x0855 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1928:1: MCI_SAVE = 0x0813 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1914:1: MCI_SAVE_FILE = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2068:1: MCI_SEEK = 0x0807 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1903:1: MCI_SEEK_TO_END = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2011:1: MCI_SEEK_TO_START = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2010:1: MCI_SEQ_DIV_PPQN = 1216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2343:1: MCI_SEQ_DIV_SMPTE_24 = 1217 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2344:1: MCI_SEQ_DIV_SMPTE_25 = 1218 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2345:1: MCI_SEQ_DIV_SMPTE_30 = 1220 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2347:1: MCI_SEQ_DIV_SMPTE_30DROP = 1219 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2346:1: MCI_SEQ_FILE = 0x4002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2350:1: MCI_SEQ_FORMAT_SONGPTR = 0x4001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2349:1: MCI_SEQ_MAPPER = 65535 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2354:1: MCI_SEQ_MIDI = 0x4003 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2351:1: MCI_SEQ_NONE = 65533 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2353:1: MCI_SEQ_OFFSET = 1216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:138:1: MCI_SEQ_SET_MASTER = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2368:1: MCI_SEQ_SET_OFFSET = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2369:1: MCI_SEQ_SET_PORT = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2366:1: MCI_SEQ_SET_SLAVE = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2367:1: MCI_SEQ_SET_TEMPO = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2365:1: MCI_SEQ_SMPTE = 0x4004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2352:1: MCI_SEQ_STATUS_COPYRIGHT = 16396 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2363:1: MCI_SEQ_STATUS_DIVTYPE = 16394 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2361:1: MCI_SEQ_STATUS_MASTER = 16392 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2359:1: MCI_SEQ_STATUS_NAME = 16395 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2362:1: MCI_SEQ_STATUS_OFFSET = 16393 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2360:1: MCI_SEQ_STATUS_PORT = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2357:1: MCI_SEQ_STATUS_SLAVE = 16391 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2358:1: MCI_SEQ_STATUS_TEMPO = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2356:1: MCI_SET = 0x080D // /usr/x86_64-w64-mingw32/include/mmsystem.h:1909:1: MCI_SET_AUDIO = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2052:1: MCI_SET_AUDIO_ALL = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2057:1: MCI_SET_AUDIO_LEFT = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2058:1: MCI_SET_AUDIO_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2059:1: MCI_SET_DOOR_CLOSED = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2050:1: MCI_SET_DOOR_OPEN = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2049:1: MCI_SET_OFF = 16384 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2055:1: MCI_SET_ON = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2054:1: MCI_SET_TIME_FORMAT = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2051:1: MCI_SET_VIDEO = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2053:1: MCI_SPIN = 0x080C // /usr/x86_64-w64-mingw32/include/mmsystem.h:1908:1: MCI_STATUS = 0x0814 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1915:1: MCI_STATUS_CURRENT_TRACK = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2023:1: MCI_STATUS_ITEM = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2013:1: MCI_STATUS_LENGTH = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2016:1: MCI_STATUS_MEDIA_PRESENT = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2020:1: MCI_STATUS_MODE = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2019:1: MCI_STATUS_NUMBER_OF_TRACKS = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2018:1: MCI_STATUS_POSITION = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2017:1: MCI_STATUS_READY = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2022:1: MCI_STATUS_START = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2014:1: MCI_STATUS_TIME_FORMAT = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2021:1: MCI_STEP = 0x080E // /usr/x86_64-w64-mingw32/include/mmsystem.h:1910:1: MCI_STOP = 0x0808 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1904:1: MCI_STRING_OFFSET = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:134:1: MCI_SYSINFO = 0x0810 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1912:1: MCI_SYSINFO_INSTALLNAME = 2048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2047:1: MCI_SYSINFO_NAME = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2046:1: MCI_SYSINFO_OPEN = 512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2045:1: MCI_SYSINFO_QUANTITY = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2044:1: MCI_TO = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2000:1: MCI_TRACK = 16 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2001:1: MCI_UNFREEZE = 0x0845 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1922:1: MCI_UPDATE = 0x0854 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1927:1: MCI_USER_MESSAGES = 3072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1931:1: MCI_VD_ESCAPE_STRING = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2236:1: MCI_VD_FORMAT_TRACK = 0x4001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2206:1: MCI_VD_GETDEVCAPS_CAN_REVERSE = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2228:1: MCI_VD_GETDEVCAPS_CAV = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2223:1: MCI_VD_GETDEVCAPS_CLV = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2222:1: MCI_VD_GETDEVCAPS_FAST_RATE = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2229:1: MCI_VD_GETDEVCAPS_NORMAL_RATE = 16389 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2231:1: MCI_VD_GETDEVCAPS_SLOW_RATE = 16388 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2230:1: MCI_VD_MEDIA_CAV = 1027 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2203:1: MCI_VD_MEDIA_CLV = 1026 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2202:1: MCI_VD_MEDIA_OTHER = 1028 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2204:1: MCI_VD_MODE_PARK = 1025 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2200:1: MCI_VD_OFFSET = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:135:1: MCI_VD_PLAY_FAST = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2209:1: MCI_VD_PLAY_REVERSE = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2208:1: MCI_VD_PLAY_SCAN = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2211:1: MCI_VD_PLAY_SLOW = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2212:1: MCI_VD_PLAY_SPEED = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2210:1: MCI_VD_SEEK_REVERSE = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2214:1: MCI_VD_SPIN_DOWN = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2226:1: MCI_VD_SPIN_UP = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2225:1: MCI_VD_STATUS_DISC_SIZE = 16390 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2220:1: MCI_VD_STATUS_FORWARD = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2217:1: MCI_VD_STATUS_MEDIA_TYPE = 16388 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2218:1: MCI_VD_STATUS_SIDE = 16389 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2219:1: MCI_VD_STATUS_SPEED = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2216:1: MCI_VD_STEP_FRAMES = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2233:1: MCI_VD_STEP_REVERSE = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2234:1: MCI_WAIT = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1998:1: MCI_WAVE_GETDEVCAPS_INPUTS = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2294:1: MCI_WAVE_GETDEVCAPS_OUTPUTS = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2295:1: MCI_WAVE_INPUT = 4194304 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2280:1: MCI_WAVE_MAPPER = 1153 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2269:1: MCI_WAVE_OFFSET = 1152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:137:1: MCI_WAVE_OPEN_BUFFER = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2271:1: MCI_WAVE_OUTPUT = 8388608 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2281:1: MCI_WAVE_PCM = 1152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2268:1: MCI_WAVE_SET_ANYINPUT = 67108864 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2291:1: MCI_WAVE_SET_ANYOUTPUT = 134217728 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2292:1: MCI_WAVE_SET_AVGBYTESPERSEC = 524288 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2276:1: MCI_WAVE_SET_BITSPERSAMPLE = 2097152 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2278:1: MCI_WAVE_SET_BLOCKALIGN = 1048576 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2277:1: MCI_WAVE_SET_CHANNELS = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2274:1: MCI_WAVE_SET_FORMATTAG = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2273:1: MCI_WAVE_SET_SAMPLESPERSEC = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2275:1: MCI_WAVE_STATUS_AVGBYTESPERSEC = 16388 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2286:1: MCI_WAVE_STATUS_BITSPERSAMPLE = 16390 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2288:1: MCI_WAVE_STATUS_BLOCKALIGN = 16389 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2287:1: MCI_WAVE_STATUS_CHANNELS = 16386 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2284:1: MCI_WAVE_STATUS_FORMATTAG = 16385 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2283:1: MCI_WAVE_STATUS_LEVEL = 16391 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2289:1: MCI_WAVE_STATUS_SAMPLESPERSEC = 16387 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2285:1: MCI_WHERE = 0x0843 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1920:1: MCI_WINDOW = 0x0841 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1918:1: MDIS_ALLCHILDSTYLES = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4901:1: MDITILE_HORIZONTAL = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4904:1: MDITILE_SKIPDISABLED = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4905:1: MDITILE_VERTICAL = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:4903:1: MDITILE_ZORDER = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4906:1: MDMSPKRFLAG_CALLSETUP = 0x00000008 // /usr/x86_64-w64-mingw32/include/mcx.h:62:1: MDMSPKRFLAG_DIAL = 0x00000002 // /usr/x86_64-w64-mingw32/include/mcx.h:60:1: MDMSPKRFLAG_OFF = 0x00000001 // /usr/x86_64-w64-mingw32/include/mcx.h:59:1: MDMSPKRFLAG_ON = 0x00000004 // /usr/x86_64-w64-mingw32/include/mcx.h:61:1: MDMSPKR_CALLSETUP = 0x00000003 // /usr/x86_64-w64-mingw32/include/mcx.h:67:1: MDMSPKR_DIAL = 0x00000001 // /usr/x86_64-w64-mingw32/include/mcx.h:65:1: MDMSPKR_OFF = 0x00000000 // /usr/x86_64-w64-mingw32/include/mcx.h:64:1: MDMSPKR_ON = 0x00000002 // /usr/x86_64-w64-mingw32/include/mcx.h:66:1: MDMVOLFLAG_HIGH = 0x00000004 // /usr/x86_64-w64-mingw32/include/mcx.h:53:1: MDMVOLFLAG_LOW = 0x00000001 // /usr/x86_64-w64-mingw32/include/mcx.h:51:1: MDMVOLFLAG_MEDIUM = 0x00000002 // /usr/x86_64-w64-mingw32/include/mcx.h:52:1: MDMVOL_HIGH = 0x00000002 // /usr/x86_64-w64-mingw32/include/mcx.h:57:1: MDMVOL_LOW = 0x00000000 // /usr/x86_64-w64-mingw32/include/mcx.h:55:1: MDMVOL_MEDIUM = 0x00000001 // /usr/x86_64-w64-mingw32/include/mcx.h:56:1: MDM_ANALOG_RLP_OFF = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:242:1: MDM_ANALOG_RLP_ON = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:241:1: MDM_ANALOG_V34 = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:243:1: MDM_AUTO_ML_2 = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:234:1: MDM_AUTO_ML_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:232:1: MDM_AUTO_ML_NONE = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:233:1: MDM_AUTO_SPEED_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:228:1: MDM_BEARERMODE_ANALOG = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:110:1: MDM_BEARERMODE_GSM = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:112:1: MDM_BEARERMODE_ISDN = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:111:1: MDM_BLIND_DIAL = 0x00000200 // /usr/x86_64-w64-mingw32/include/mcx.h:78:1: MDM_CCITT_OVERRIDE = 0x00000040 // /usr/x86_64-w64-mingw32/include/mcx.h:75:1: MDM_CELLULAR = 0x00000008 // /usr/x86_64-w64-mingw32/include/mcx.h:72:1: MDM_COMPRESSION = 0x00000001 // /usr/x86_64-w64-mingw32/include/mcx.h:69:1: MDM_DIAGNOSTICS = 0x00000800 // /usr/x86_64-w64-mingw32/include/mcx.h:80:1: MDM_ERROR_CONTROL = 0x00000002 // /usr/x86_64-w64-mingw32/include/mcx.h:70:1: MDM_FLOWCONTROL_HARD = 0x00000010 // /usr/x86_64-w64-mingw32/include/mcx.h:73:1: MDM_FLOWCONTROL_SOFT = 0x00000020 // /usr/x86_64-w64-mingw32/include/mcx.h:74:1: MDM_FORCED_EC = 0x00000004 // /usr/x86_64-w64-mingw32/include/mcx.h:71:1: MDM_HDLCPPP_AUTH_CHAP = 0x3 // /usr/x86_64-w64-mingw32/include/mcx.h:138:1: MDM_HDLCPPP_AUTH_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:135:1: MDM_HDLCPPP_AUTH_MSCHAP = 0x4 // /usr/x86_64-w64-mingw32/include/mcx.h:139:1: MDM_HDLCPPP_AUTH_NONE = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:136:1: MDM_HDLCPPP_AUTH_PAP = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:137:1: MDM_HDLCPPP_ML_2 = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:146:1: MDM_HDLCPPP_ML_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:144:1: MDM_HDLCPPP_ML_NONE = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:145:1: MDM_HDLCPPP_SPEED_56K = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:130:1: MDM_HDLCPPP_SPEED_64K = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:129:1: MDM_HDLCPPP_SPEED_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:128:1: MDM_MASK_AUTO_ML = 192 // /usr/x86_64-w64-mingw32/include/mcx.h:231:1: MDM_MASK_AUTO_SPEED = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:227:1: MDM_MASK_BEARERMODE = 0x0000f000 // /usr/x86_64-w64-mingw32/include/mcx.h:82:1: MDM_MASK_EXTENDEDINFO = 268431360 // /usr/x86_64-w64-mingw32/include/mcx.h:94:1: MDM_MASK_HDLCPPP_AUTH = 56 // /usr/x86_64-w64-mingw32/include/mcx.h:133:1: MDM_MASK_HDLCPPP_ML = 192 // /usr/x86_64-w64-mingw32/include/mcx.h:142:1: MDM_MASK_HDLCPPP_SPEED = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:126:1: MDM_MASK_PROTOCOLDATA = 0x0ff00000 // /usr/x86_64-w64-mingw32/include/mcx.h:88:1: MDM_MASK_PROTOCOLID = 0x000f0000 // /usr/x86_64-w64-mingw32/include/mcx.h:85:1: MDM_MASK_PROTOCOLINFO = 268369920 // /usr/x86_64-w64-mingw32/include/mcx.h:91:1: MDM_MASK_V110_SPEED = 0xf // /usr/x86_64-w64-mingw32/include/mcx.h:199:1: MDM_MASK_V120_ML = 192 // /usr/x86_64-w64-mingw32/include/mcx.h:169:1: MDM_MASK_V120_SPEED = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:162:1: MDM_MASK_X75_DATA = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:183:1: MDM_PIAFS_INCOMING = 0 // /usr/x86_64-w64-mingw32/include/mcx.h:252:1: MDM_PIAFS_OUTGOING = 1 // /usr/x86_64-w64-mingw32/include/mcx.h:253:1: MDM_PROTOCOLID_ANALOG = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:121:1: MDM_PROTOCOLID_AUTO = 0x6 // /usr/x86_64-w64-mingw32/include/mcx.h:120:1: MDM_PROTOCOLID_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:114:1: MDM_PROTOCOLID_GPRS = 0x8 // /usr/x86_64-w64-mingw32/include/mcx.h:122:1: MDM_PROTOCOLID_HDLCPPP = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:115:1: MDM_PROTOCOLID_PIAFS = 0x9 // /usr/x86_64-w64-mingw32/include/mcx.h:123:1: MDM_PROTOCOLID_V110 = 0x4 // /usr/x86_64-w64-mingw32/include/mcx.h:118:1: MDM_PROTOCOLID_V120 = 0x5 // /usr/x86_64-w64-mingw32/include/mcx.h:119:1: MDM_PROTOCOLID_V128 = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:116:1: MDM_PROTOCOLID_X75 = 0x3 // /usr/x86_64-w64-mingw32/include/mcx.h:117:1: MDM_PROTOCOL_ANALOG_NRLP = 1507328 // /usr/x86_64-w64-mingw32/include/mcx.h:248:1: MDM_PROTOCOL_ANALOG_RLP = 458752 // /usr/x86_64-w64-mingw32/include/mcx.h:247:1: MDM_PROTOCOL_ANALOG_V34 = 2555904 // /usr/x86_64-w64-mingw32/include/mcx.h:249:1: MDM_PROTOCOL_AUTO_1CH = 67502080 // /usr/x86_64-w64-mingw32/include/mcx.h:238:1: MDM_PROTOCOL_AUTO_2CH = 134610944 // /usr/x86_64-w64-mingw32/include/mcx.h:239:1: MDM_PROTOCOL_GPRS = 524288 // /usr/x86_64-w64-mingw32/include/mcx.h:250:1: MDM_PROTOCOL_HDLCPPP_112K = 136380416 // /usr/x86_64-w64-mingw32/include/mcx.h:152:1: MDM_PROTOCOL_HDLCPPP_112K_CHAP = 161546240 // /usr/x86_64-w64-mingw32/include/mcx.h:154:1: MDM_PROTOCOL_HDLCPPP_112K_MSCHAP = 169934848 // /usr/x86_64-w64-mingw32/include/mcx.h:155:1: MDM_PROTOCOL_HDLCPPP_112K_PAP = 153157632 // /usr/x86_64-w64-mingw32/include/mcx.h:153:1: MDM_PROTOCOL_HDLCPPP_128K = 135331840 // /usr/x86_64-w64-mingw32/include/mcx.h:156:1: MDM_PROTOCOL_HDLCPPP_128K_CHAP = 160497664 // /usr/x86_64-w64-mingw32/include/mcx.h:158:1: MDM_PROTOCOL_HDLCPPP_128K_MSCHAP = 168886272 // /usr/x86_64-w64-mingw32/include/mcx.h:159:1: MDM_PROTOCOL_HDLCPPP_128K_PAP = 152109056 // /usr/x86_64-w64-mingw32/include/mcx.h:157:1: MDM_PROTOCOL_HDLCPPP_56K = 2162688 // /usr/x86_64-w64-mingw32/include/mcx.h:151:1: MDM_PROTOCOL_HDLCPPP_64K = 1114112 // /usr/x86_64-w64-mingw32/include/mcx.h:150:1: MDM_PROTOCOL_PIAFS_INCOMING = 589824 // /usr/x86_64-w64-mingw32/include/mcx.h:255:1: MDM_PROTOCOL_PIAFS_OUTGOING = 1638400 // /usr/x86_64-w64-mingw32/include/mcx.h:256:1: MDM_PROTOCOL_V110_12DOT0K = 5505024 // /usr/x86_64-w64-mingw32/include/mcx.h:219:1: MDM_PROTOCOL_V110_14DOT4K = 6553600 // /usr/x86_64-w64-mingw32/include/mcx.h:220:1: MDM_PROTOCOL_V110_19DOT2K = 7602176 // /usr/x86_64-w64-mingw32/include/mcx.h:221:1: MDM_PROTOCOL_V110_1DOT2K = 1310720 // /usr/x86_64-w64-mingw32/include/mcx.h:215:1: MDM_PROTOCOL_V110_28DOT8K = 8650752 // /usr/x86_64-w64-mingw32/include/mcx.h:222:1: MDM_PROTOCOL_V110_2DOT4K = 2359296 // /usr/x86_64-w64-mingw32/include/mcx.h:216:1: MDM_PROTOCOL_V110_38DOT4K = 9699328 // /usr/x86_64-w64-mingw32/include/mcx.h:223:1: MDM_PROTOCOL_V110_4DOT8K = 3407872 // /usr/x86_64-w64-mingw32/include/mcx.h:217:1: MDM_PROTOCOL_V110_57DOT6K = 10747904 // /usr/x86_64-w64-mingw32/include/mcx.h:224:1: MDM_PROTOCOL_V110_9DOT6K = 4456448 // /usr/x86_64-w64-mingw32/include/mcx.h:218:1: MDM_PROTOCOL_V120_112K = 136642560 // /usr/x86_64-w64-mingw32/include/mcx.h:179:1: MDM_PROTOCOL_V120_128K = 135593984 // /usr/x86_64-w64-mingw32/include/mcx.h:180:1: MDM_PROTOCOL_V120_56K = 69533696 // /usr/x86_64-w64-mingw32/include/mcx.h:178:1: MDM_PROTOCOL_V120_64K = 68485120 // /usr/x86_64-w64-mingw32/include/mcx.h:177:1: MDM_PROTOCOL_X75_128K = 2293760 // /usr/x86_64-w64-mingw32/include/mcx.h:194:1: MDM_PROTOCOL_X75_64K = 1245184 // /usr/x86_64-w64-mingw32/include/mcx.h:193:1: MDM_PROTOCOL_X75_BTX = 4390912 // /usr/x86_64-w64-mingw32/include/mcx.h:196:1: MDM_PROTOCOL_X75_T_70 = 3342336 // /usr/x86_64-w64-mingw32/include/mcx.h:195:1: MDM_SHIFT_AUTO_ML = 0x6 // /usr/x86_64-w64-mingw32/include/mcx.h:230:1: MDM_SHIFT_AUTO_SPEED = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:226:1: MDM_SHIFT_BEARERMODE = 12 // /usr/x86_64-w64-mingw32/include/mcx.h:83:1: MDM_SHIFT_EXTENDEDINFO = 12 // /usr/x86_64-w64-mingw32/include/mcx.h:95:1: MDM_SHIFT_HDLCPPP_AUTH = 0x3 // /usr/x86_64-w64-mingw32/include/mcx.h:132:1: MDM_SHIFT_HDLCPPP_ML = 0x6 // /usr/x86_64-w64-mingw32/include/mcx.h:141:1: MDM_SHIFT_HDLCPPP_SPEED = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:125:1: MDM_SHIFT_PROTOCOLDATA = 20 // /usr/x86_64-w64-mingw32/include/mcx.h:89:1: MDM_SHIFT_PROTOCOLID = 16 // /usr/x86_64-w64-mingw32/include/mcx.h:86:1: MDM_SHIFT_PROTOCOLINFO = 16 // /usr/x86_64-w64-mingw32/include/mcx.h:92:1: MDM_SHIFT_V110_SPEED = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:198:1: MDM_SHIFT_V120_ML = 0x6 // /usr/x86_64-w64-mingw32/include/mcx.h:168:1: MDM_SHIFT_V120_SPEED = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:161:1: MDM_SHIFT_X75_DATA = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:182:1: MDM_SPEED_ADJUST = 0x00000080 // /usr/x86_64-w64-mingw32/include/mcx.h:76:1: MDM_TONE_DIAL = 0x00000100 // /usr/x86_64-w64-mingw32/include/mcx.h:77:1: MDM_V110_SPEED_12DOT0K = 0x5 // /usr/x86_64-w64-mingw32/include/mcx.h:206:1: MDM_V110_SPEED_14DOT4K = 0x6 // /usr/x86_64-w64-mingw32/include/mcx.h:207:1: MDM_V110_SPEED_19DOT2K = 0x7 // /usr/x86_64-w64-mingw32/include/mcx.h:208:1: MDM_V110_SPEED_1DOT2K = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:202:1: MDM_V110_SPEED_28DOT8K = 0x8 // /usr/x86_64-w64-mingw32/include/mcx.h:209:1: MDM_V110_SPEED_2DOT4K = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:203:1: MDM_V110_SPEED_38DOT4K = 0x9 // /usr/x86_64-w64-mingw32/include/mcx.h:210:1: MDM_V110_SPEED_4DOT8K = 0x3 // /usr/x86_64-w64-mingw32/include/mcx.h:204:1: MDM_V110_SPEED_57DOT6K = 0xA // /usr/x86_64-w64-mingw32/include/mcx.h:211:1: MDM_V110_SPEED_9DOT6K = 0x4 // /usr/x86_64-w64-mingw32/include/mcx.h:205:1: MDM_V110_SPEED_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:201:1: MDM_V120_ML_2 = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:173:1: MDM_V120_ML_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:171:1: MDM_V120_ML_NONE = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:172:1: MDM_V120_SPEED_56K = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:166:1: MDM_V120_SPEED_64K = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:165:1: MDM_V120_SPEED_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:164:1: MDM_V23_OVERRIDE = 0x00000400 // /usr/x86_64-w64-mingw32/include/mcx.h:79:1: MDM_X75_DATA_128K = 0x2 // /usr/x86_64-w64-mingw32/include/mcx.h:187:1: MDM_X75_DATA_64K = 0x1 // /usr/x86_64-w64-mingw32/include/mcx.h:186:1: MDM_X75_DATA_BTX = 0x4 // /usr/x86_64-w64-mingw32/include/mcx.h:189:1: MDM_X75_DATA_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/mcx.h:185:1: MDM_X75_DATA_T_70 = 0x3 // /usr/x86_64-w64-mingw32/include/mcx.h:188:1: MEDIA_CURRENTLY_MOUNTED = 0x80000000 // /usr/x86_64-w64-mingw32/include/winioctl.h:364:1: MEDIA_ERASEABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:358:1: MEDIA_READ_ONLY = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:360:1: MEDIA_READ_WRITE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:361:1: MEDIA_WRITE_ONCE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:359:1: MEDIA_WRITE_PROTECTED = 0x00000100 // /usr/x86_64-w64-mingw32/include/winioctl.h:363:1: MEMBERID_NIL = -1 // /usr/x86_64-w64-mingw32/include/oleauto.h:556:1: MEMJOURNAL_DFLT_FILECHUNKSIZE = 1024 // testdata/sqlite-amalgamation-3380500/sqlite3.c:99772:1: MEMORY_ALLOCATION_ALIGNMENT = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:120:1: MEMORY_PRIORITY_BELOW_NORMAL = 4 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:166:1: MEMORY_PRIORITY_LOW = 2 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:164:1: MEMORY_PRIORITY_MEDIUM = 3 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:165:1: MEMORY_PRIORITY_NORMAL = 5 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:167:1: MEMORY_PRIORITY_VERY_LOW = 1 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:163:1: MEMTYPE_HEAP = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20585:1: MEMTYPE_LOOKASIDE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20586:1: MEMTYPE_PCACHE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20587:1: MEM_4MB_PAGES = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4893:1: MEM_64K_PAGES = 541065216 // /usr/x86_64-w64-mingw32/include/winnt.h:4894:1: MEM_AffMask = 0x003f // testdata/sqlite-amalgamation-3380500/sqlite3.c:22282:1: MEM_Agg = 0x2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22298:1: MEM_Blob = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22280:1: MEM_COMMIT = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:4878:1: MEM_Cleared = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22285:1: MEM_DECOMMIT = 0x4000 // /usr/x86_64-w64-mingw32/include/winnt.h:4880:1: MEM_DIFFERENT_IMAGE_BASE_OK = 0x800000 // /usr/x86_64-w64-mingw32/include/winnt.h:4890:1: MEM_Dyn = 0x0400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22295:1: MEM_EXTENDED_PARAMETER_GRAPHICS = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:4902:1: MEM_EXTENDED_PARAMETER_NONPAGED = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:4903:1: MEM_EXTENDED_PARAMETER_NONPAGED_HUGE = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:4906:1: MEM_EXTENDED_PARAMETER_NONPAGED_LARGE = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:4905:1: MEM_EXTENDED_PARAMETER_TYPE_BITS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4918:1: MEM_EXTENDED_PARAMETER_ZERO_PAGES_OPTIONAL = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:4904:1: MEM_Ephem = 0x1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22297:1: MEM_FREE = 0x10000 // /usr/x86_64-w64-mingw32/include/winnt.h:4882:1: MEM_FromBind = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22283:1: MEM_IMAGE = 16777216 // /usr/x86_64-w64-mingw32/include/winnt.h:4953:1: MEM_Int = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22278:1: MEM_IntReal = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22281:1: MEM_LARGE_PAGES = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4892:1: MEM_MAPPED = 0x40000 // /usr/x86_64-w64-mingw32/include/winnt.h:4884:1: MEM_Null = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22276:1: MEM_PHYSICAL = 0x400000 // /usr/x86_64-w64-mingw32/include/winnt.h:4888:1: MEM_PRIVATE = 0x20000 // /usr/x86_64-w64-mingw32/include/winnt.h:4883:1: MEM_RELEASE = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:4881:1: MEM_RESERVE = 0x2000 // /usr/x86_64-w64-mingw32/include/winnt.h:4879:1: MEM_RESET = 0x80000 // /usr/x86_64-w64-mingw32/include/winnt.h:4885:1: MEM_RESET_UNDO = 0x1000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4891:1: MEM_ROTATE = 0x800000 // /usr/x86_64-w64-mingw32/include/winnt.h:4889:1: MEM_Real = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22279:1: MEM_Static = 0x0800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22296:1: MEM_Str = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22277:1: MEM_Subtype = 0x8000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22300:1: MEM_TOP_DOWN = 0x100000 // /usr/x86_64-w64-mingw32/include/winnt.h:4886:1: MEM_Term = 0x0200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22294:1: MEM_TypeMask = 0xc1bf // testdata/sqlite-amalgamation-3380500/sqlite3.c:22286:1: MEM_UNMAP_WITH_TRANSIENT_BOOST = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:4955:1: MEM_Undefined = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22284:1: MEM_WRITE_WATCH = 0x200000 // /usr/x86_64-w64-mingw32/include/winnt.h:4887:1: MEM_Zero = 0x4000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22299:1: MENU_EVENT = 0x8 // /usr/x86_64-w64-mingw32/include/wincon.h:108:1: MESSAGE_RESOURCE_UNICODE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:7919:1: METAFILE_DRIVER = 2049 // /usr/x86_64-w64-mingw32/include/wingdi.h:290:1: META_ANIMATEPALETTE = 0x0436 // /usr/x86_64-w64-mingw32/include/wingdi.h:205:1: META_ARC = 0x0817 // /usr/x86_64-w64-mingw32/include/wingdi.h:175:1: META_BITBLT = 0x0922 // /usr/x86_64-w64-mingw32/include/wingdi.h:186:1: META_CHORD = 0x0830 // /usr/x86_64-w64-mingw32/include/wingdi.h:199:1: META_CREATEBRUSHINDIRECT = 0x02FC // /usr/x86_64-w64-mingw32/include/wingdi.h:220:1: META_CREATEFONTINDIRECT = 0x02FB // /usr/x86_64-w64-mingw32/include/wingdi.h:219:1: META_CREATEPALETTE = 0x00f7 // /usr/x86_64-w64-mingw32/include/wingdi.h:216:1: META_CREATEPATTERNBRUSH = 0x01F9 // /usr/x86_64-w64-mingw32/include/wingdi.h:217:1: META_CREATEPENINDIRECT = 0x02FA // /usr/x86_64-w64-mingw32/include/wingdi.h:218:1: META_CREATEREGION = 0x06FF // /usr/x86_64-w64-mingw32/include/wingdi.h:221:1: META_DELETEOBJECT = 0x01f0 // /usr/x86_64-w64-mingw32/include/wingdi.h:215:1: META_DIBBITBLT = 0x0940 // /usr/x86_64-w64-mingw32/include/wingdi.h:209:1: META_DIBCREATEPATTERNBRUSH = 0x0142 // /usr/x86_64-w64-mingw32/include/wingdi.h:211:1: META_DIBSTRETCHBLT = 0x0b41 // /usr/x86_64-w64-mingw32/include/wingdi.h:210:1: META_ELLIPSE = 0x0418 // /usr/x86_64-w64-mingw32/include/wingdi.h:176:1: META_ESCAPE = 0x0626 // /usr/x86_64-w64-mingw32/include/wingdi.h:190:1: META_EXCLUDECLIPRECT = 0x0415 // /usr/x86_64-w64-mingw32/include/wingdi.h:173:1: META_EXTFLOODFILL = 0x0548 // /usr/x86_64-w64-mingw32/include/wingdi.h:213:1: META_EXTTEXTOUT = 0x0a32 // /usr/x86_64-w64-mingw32/include/wingdi.h:201:1: META_FILLREGION = 0x0228 // /usr/x86_64-w64-mingw32/include/wingdi.h:192:1: META_FLOODFILL = 0x0419 // /usr/x86_64-w64-mingw32/include/wingdi.h:177:1: META_FRAMEREGION = 0x0429 // /usr/x86_64-w64-mingw32/include/wingdi.h:193:1: META_INTERSECTCLIPRECT = 0x0416 // /usr/x86_64-w64-mingw32/include/wingdi.h:174:1: META_INVERTREGION = 0x012A // /usr/x86_64-w64-mingw32/include/wingdi.h:194:1: META_LINETO = 0x0213 // /usr/x86_64-w64-mingw32/include/wingdi.h:171:1: META_MOVETO = 0x0214 // /usr/x86_64-w64-mingw32/include/wingdi.h:172:1: META_OFFSETCLIPRGN = 0x0220 // /usr/x86_64-w64-mingw32/include/wingdi.h:184:1: META_OFFSETVIEWPORTORG = 0x0211 // /usr/x86_64-w64-mingw32/include/wingdi.h:169:1: META_OFFSETWINDOWORG = 0x020F // /usr/x86_64-w64-mingw32/include/wingdi.h:167:1: META_PAINTREGION = 0x012B // /usr/x86_64-w64-mingw32/include/wingdi.h:195:1: META_PATBLT = 0x061D // /usr/x86_64-w64-mingw32/include/wingdi.h:181:1: META_PIE = 0x081A // /usr/x86_64-w64-mingw32/include/wingdi.h:178:1: META_POLYGON = 0x0324 // /usr/x86_64-w64-mingw32/include/wingdi.h:188:1: META_POLYLINE = 0x0325 // /usr/x86_64-w64-mingw32/include/wingdi.h:189:1: META_POLYPOLYGON = 0x0538 // /usr/x86_64-w64-mingw32/include/wingdi.h:207:1: META_REALIZEPALETTE = 0x0035 // /usr/x86_64-w64-mingw32/include/wingdi.h:204:1: META_RECTANGLE = 0x041B // /usr/x86_64-w64-mingw32/include/wingdi.h:179:1: META_RESIZEPALETTE = 0x0139 // /usr/x86_64-w64-mingw32/include/wingdi.h:208:1: META_RESTOREDC = 0x0127 // /usr/x86_64-w64-mingw32/include/wingdi.h:191:1: META_ROUNDRECT = 0x061C // /usr/x86_64-w64-mingw32/include/wingdi.h:180:1: META_SAVEDC = 0x001E // /usr/x86_64-w64-mingw32/include/wingdi.h:182:1: META_SCALEVIEWPORTEXT = 0x0412 // /usr/x86_64-w64-mingw32/include/wingdi.h:170:1: META_SCALEWINDOWEXT = 0x0410 // /usr/x86_64-w64-mingw32/include/wingdi.h:168:1: META_SELECTCLIPREGION = 0x012C // /usr/x86_64-w64-mingw32/include/wingdi.h:196:1: META_SELECTOBJECT = 0x012D // /usr/x86_64-w64-mingw32/include/wingdi.h:197:1: META_SELECTPALETTE = 0x0234 // /usr/x86_64-w64-mingw32/include/wingdi.h:203:1: META_SETBKCOLOR = 0x0201 // /usr/x86_64-w64-mingw32/include/wingdi.h:153:1: META_SETBKMODE = 0x0102 // /usr/x86_64-w64-mingw32/include/wingdi.h:154:1: META_SETDIBTODEV = 0x0d33 // /usr/x86_64-w64-mingw32/include/wingdi.h:202:1: META_SETLAYOUT = 0x0149 // /usr/x86_64-w64-mingw32/include/wingdi.h:214:1: META_SETMAPMODE = 0x0103 // /usr/x86_64-w64-mingw32/include/wingdi.h:155:1: META_SETMAPPERFLAGS = 0x0231 // /usr/x86_64-w64-mingw32/include/wingdi.h:200:1: META_SETPALENTRIES = 0x0037 // /usr/x86_64-w64-mingw32/include/wingdi.h:206:1: META_SETPIXEL = 0x041F // /usr/x86_64-w64-mingw32/include/wingdi.h:183:1: META_SETPOLYFILLMODE = 0x0106 // /usr/x86_64-w64-mingw32/include/wingdi.h:158:1: META_SETRELABS = 0x0105 // /usr/x86_64-w64-mingw32/include/wingdi.h:157:1: META_SETROP2 = 0x0104 // /usr/x86_64-w64-mingw32/include/wingdi.h:156:1: META_SETSTRETCHBLTMODE = 0x0107 // /usr/x86_64-w64-mingw32/include/wingdi.h:159:1: META_SETTEXTALIGN = 0x012E // /usr/x86_64-w64-mingw32/include/wingdi.h:198:1: META_SETTEXTCHAREXTRA = 0x0108 // /usr/x86_64-w64-mingw32/include/wingdi.h:160:1: META_SETTEXTCOLOR = 0x0209 // /usr/x86_64-w64-mingw32/include/wingdi.h:161:1: META_SETTEXTJUSTIFICATION = 0x020A // /usr/x86_64-w64-mingw32/include/wingdi.h:162:1: META_SETVIEWPORTEXT = 0x020E // /usr/x86_64-w64-mingw32/include/wingdi.h:166:1: META_SETVIEWPORTORG = 0x020D // /usr/x86_64-w64-mingw32/include/wingdi.h:165:1: META_SETWINDOWEXT = 0x020C // /usr/x86_64-w64-mingw32/include/wingdi.h:164:1: META_SETWINDOWORG = 0x020B // /usr/x86_64-w64-mingw32/include/wingdi.h:163:1: META_STRETCHBLT = 0x0B23 // /usr/x86_64-w64-mingw32/include/wingdi.h:187:1: META_STRETCHDIB = 0x0f43 // /usr/x86_64-w64-mingw32/include/wingdi.h:212:1: META_TEXTOUT = 0x0521 // /usr/x86_64-w64-mingw32/include/wingdi.h:185:1: METHOD_BUFFERED = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:139:1: METHOD_DIRECT_FROM_HARDWARE = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:145:1: METHOD_DIRECT_TO_HARDWARE = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:144:1: METHOD_IN_DIRECT = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:140:1: METHOD_NEITHER = 3 // /usr/x86_64-w64-mingw32/include/winioctl.h:142:1: METHOD_OUT_DIRECT = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:141:1: METRICS_USEDEFAULT = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:5404:1: MEVT_F_CALLBACK = 1073741824 // /usr/x86_64-w64-mingw32/include/mmsystem.h:766:1: MEVT_F_LONG = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:765:1: MEVT_F_SHORT = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:764:1: MFCOMMENT = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:248:1: MFS_CHECKED = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4046:1: MFS_DEFAULT = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4051:1: MFS_DISABLED = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4045:1: MFS_ENABLED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4048:1: MFS_GRAYED = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4044:1: MFS_HILITE = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4047:1: MFS_UNCHECKED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4049:1: MFS_UNHILITE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4050:1: MFT_BITMAP = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4035:1: MFT_MENUBARBREAK = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4036:1: MFT_MENUBREAK = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4037:1: MFT_OWNERDRAW = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4038:1: MFT_RADIOCHECK = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4039:1: MFT_RIGHTJUSTIFY = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4042:1: MFT_RIGHTORDER = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4041:1: MFT_SEPARATOR = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4040:1: MFT_STRING = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4034:1: MF_APPEND = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4007:1: MF_BITMAP = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4020:1: MF_BYCOMMAND = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4010:1: MF_BYPOSITION = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4011:1: MF_CALLBACKS = 0x08000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:358:1: MF_CHANGE = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4006:1: MF_CHECKED = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4017:1: MF_CONV = 0x40000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:361:1: MF_DEFAULT = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4027:1: MF_DELETE = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4008:1: MF_DISABLED = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4015:1: MF_ENABLED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4013:1: MF_END = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4066:1: MF_ERRORS = 0x10000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:359:1: MF_GRAYED = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4014:1: MF_HELP = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4029:1: MF_HILITE = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4026:1: MF_HSZ_INFO = 0x01000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:355:1: MF_INSERT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4005:1: MF_LINKS = 0x20000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:360:1: MF_MASK = 0xFF000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:363:1: MF_MENUBARBREAK = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:4023:1: MF_MENUBREAK = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4024:1: MF_MOUSESELECT = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:4031:1: MF_OWNERDRAW = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4021:1: MF_POPUP = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4022:1: MF_POSTMSGS = 0x04000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:357:1: MF_REMOVE = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4009:1: MF_RIGHTJUSTIFY = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4030:1: MF_SENDMSGS = 0x02000000 // /usr/x86_64-w64-mingw32/include/ddeml.h:356:1: MF_SEPARATOR = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4012:1: MF_STRING = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4019:1: MF_SYSMENU = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4028:1: MF_UNCHECKED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4016:1: MF_UNHILITE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4025:1: MF_USECHECKBITMAPS = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4018:1: MHDR_DONE = 0x00000001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:759:1: MHDR_INQUEUE = 0x00000004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:761:1: MHDR_ISSTRM = 0x00000008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:762:1: MHDR_PREPARED = 0x00000002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:760:1: MH_CLEANUP = 4 // /usr/x86_64-w64-mingw32/include/ddeml.h:316:1: MH_CREATE = 1 // /usr/x86_64-w64-mingw32/include/ddeml.h:313:1: MH_DELETE = 3 // /usr/x86_64-w64-mingw32/include/ddeml.h:315:1: MH_KEEP = 2 // /usr/x86_64-w64-mingw32/include/ddeml.h:314:1: MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG = 0x00020000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5573:1: MICROSOFT_ROOT_CERT_CHAIN_POLICY_DISABLE_FLIGHT_ROOT_FLAG = 0x00040000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5574:1: MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG = 0x00010000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5572:1: MICROSOFT_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:3235:1: MICROSOFT_WINDOWS_WINBASE_H_DEFINE_INTERLOCKED_CPLUSPLUS_OVERLOADS = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:3104:1: MICROSOFT_WINDOWS_WINBASE_INTERLOCKED_CPLUSPLUS_H_INCLUDED = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:3100:1: MIDICAPS_CACHE = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:683:1: MIDICAPS_LRVOLUME = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:682:1: MIDICAPS_STREAM = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:684:1: MIDICAPS_VOLUME = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:681:1: MIDIERR_BADOPENMODE = 70 // /usr/x86_64-w64-mingw32/include/mmsystem.h:566:1: MIDIERR_BASE = 64 // /usr/x86_64-w64-mingw32/include/mmsystem.h:128:1: MIDIERR_DONT_CONTINUE = 71 // /usr/x86_64-w64-mingw32/include/mmsystem.h:567:1: MIDIERR_INVALIDSETUP = 69 // /usr/x86_64-w64-mingw32/include/mmsystem.h:565:1: MIDIERR_LASTERROR = 71 // /usr/x86_64-w64-mingw32/include/mmsystem.h:568:1: MIDIERR_NODEVICE = 68 // /usr/x86_64-w64-mingw32/include/mmsystem.h:564:1: MIDIERR_NOMAP = 66 // /usr/x86_64-w64-mingw32/include/mmsystem.h:562:1: MIDIERR_NOTREADY = 67 // /usr/x86_64-w64-mingw32/include/mmsystem.h:563:1: MIDIERR_STILLPLAYING = 65 // /usr/x86_64-w64-mingw32/include/mmsystem.h:561:1: MIDIERR_UNPREPARED = 64 // /usr/x86_64-w64-mingw32/include/mmsystem.h:560:1: MIDIPATCHSIZE = 128 // /usr/x86_64-w64-mingw32/include/mmsystem.h:580:1: MIDIPROP_GET = 1073741824 // /usr/x86_64-w64-mingw32/include/mmsystem.h:782:1: MIDIPROP_SET = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:781:1: MIDIPROP_TEMPO = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:785:1: MIDIPROP_TIMEDIV = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:784:1: MIDISTRM_ERROR = -2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:779:1: MIDI_CACHE_ALL = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:604:1: MIDI_CACHE_BESTFIT = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:605:1: MIDI_CACHE_QUERY = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:606:1: MIDI_IO_STATUS = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:602:1: MIDI_UNCACHE = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:607:1: MIIM_BITMAP = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:3234:1: MIIM_CHECKMARKS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:3230:1: MIIM_DATA = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:3232:1: MIIM_FTYPE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:3235:1: MIIM_ID = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:3228:1: MIIM_STATE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3227:1: MIIM_STRING = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:3233:1: MIIM_SUBMENU = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:3229:1: MIIM_TYPE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:3231:1: MIM_APPLYTOSUBMENUS = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3216:1: MIM_BACKGROUND = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:3212:1: MIM_CLOSE = 962 // /usr/x86_64-w64-mingw32/include/mmsystem.h:587:1: MIM_DATA = 963 // /usr/x86_64-w64-mingw32/include/mmsystem.h:588:1: MIM_ERROR = 965 // /usr/x86_64-w64-mingw32/include/mmsystem.h:590:1: MIM_HELPID = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:3213:1: MIM_LONGDATA = 964 // /usr/x86_64-w64-mingw32/include/mmsystem.h:589:1: MIM_LONGERROR = 966 // /usr/x86_64-w64-mingw32/include/mmsystem.h:591:1: MIM_MAXHEIGHT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3211:1: MIM_MENUDATA = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:3214:1: MIM_MOREDATA = 972 // /usr/x86_64-w64-mingw32/include/mmsystem.h:596:1: MIM_OPEN = 961 // /usr/x86_64-w64-mingw32/include/mmsystem.h:586:1: MIM_STYLE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:3215:1: MINCHAR = 0x80 // /usr/x86_64-w64-mingw32/include/winnt.h:645:1: MINGW_DDK_H = 0 // /usr/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h:2:1: MINGW_HAS_DDK_H = 1 // /usr/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h:4:1: MINGW_HAS_SECURE_API = 1 // /usr/x86_64-w64-mingw32/include/_mingw.h:602:1: MINGW_SDK_INIT = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:598:1: MINLONG = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:649:1: MINSHORT = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:647:1: MIN_ACL_REVISION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3280:1: MIN_PRIORITY = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:229:1: MIXERCONTROL_CONTROLF_DISABLED = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1180:1: MIXERCONTROL_CONTROLF_MULTIPLE = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1179:1: MIXERCONTROL_CONTROLF_UNIFORM = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1178:1: MIXERCONTROL_CONTROLTYPE_BASS = 1342373890 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1235:1: MIXERCONTROL_CONTROLTYPE_BASS_BOOST = 536945271 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1224:1: MIXERCONTROL_CONTROLTYPE_BOOLEAN = 536936448 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1218:1: MIXERCONTROL_CONTROLTYPE_BOOLEANMETER = 268500992 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1214:1: MIXERCONTROL_CONTROLTYPE_BUTTON = 553713664 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1225:1: MIXERCONTROL_CONTROLTYPE_CUSTOM = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1213:1: MIXERCONTROL_CONTROLTYPE_DECIBELS = 805568512 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1226:1: MIXERCONTROL_CONTROLTYPE_EQUALIZER = 1342373892 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1237:1: MIXERCONTROL_CONTROLTYPE_FADER = 1342373888 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1233:1: MIXERCONTROL_CONTROLTYPE_LOUDNESS = 536936452 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1222:1: MIXERCONTROL_CONTROLTYPE_MICROTIME = 1610809344 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1242:1: MIXERCONTROL_CONTROLTYPE_MILLITIME = 1627586560 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1243:1: MIXERCONTROL_CONTROLTYPE_MIXER = 1895890945 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1241:1: MIXERCONTROL_CONTROLTYPE_MONO = 536936451 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1221:1: MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT = 1895890944 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1240:1: MIXERCONTROL_CONTROLTYPE_MUTE = 536936450 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1220:1: MIXERCONTROL_CONTROLTYPE_MUX = 1879113729 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1239:1: MIXERCONTROL_CONTROLTYPE_ONOFF = 536936449 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1219:1: MIXERCONTROL_CONTROLTYPE_PAN = 1073872897 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1231:1: MIXERCONTROL_CONTROLTYPE_PEAKMETER = 268566529 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1216:1: MIXERCONTROL_CONTROLTYPE_PERCENT = 805634048 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1229:1: MIXERCONTROL_CONTROLTYPE_QSOUNDPAN = 1073872898 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1232:1: MIXERCONTROL_CONTROLTYPE_SIGNED = 805437440 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1227:1: MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = 268566528 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1215:1: MIXERCONTROL_CONTROLTYPE_SINGLESELECT = 1879113728 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1238:1: MIXERCONTROL_CONTROLTYPE_SLIDER = 1073872896 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1230:1: MIXERCONTROL_CONTROLTYPE_STEREOENH = 536936453 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1223:1: MIXERCONTROL_CONTROLTYPE_TREBLE = 1342373891 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1236:1: MIXERCONTROL_CONTROLTYPE_UNSIGNED = 805502976 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1228:1: MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER = 268632064 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1217:1: MIXERCONTROL_CONTROLTYPE_VOLUME = 1342373889 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1234:1: MIXERCONTROL_CT_CLASS_CUSTOM = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1183:1: MIXERCONTROL_CT_CLASS_FADER = 1342177280 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1188:1: MIXERCONTROL_CT_CLASS_LIST = 1879048192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1190:1: MIXERCONTROL_CT_CLASS_MASK = 4026531840 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1182:1: MIXERCONTROL_CT_CLASS_METER = 268435456 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1184:1: MIXERCONTROL_CT_CLASS_NUMBER = 805306368 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1186:1: MIXERCONTROL_CT_CLASS_SLIDER = 1073741824 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1187:1: MIXERCONTROL_CT_CLASS_SWITCH = 536870912 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1185:1: MIXERCONTROL_CT_CLASS_TIME = 1610612736 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1189:1: MIXERCONTROL_CT_SC_LIST_MULTIPLE = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1203:1: MIXERCONTROL_CT_SC_LIST_SINGLE = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1202:1: MIXERCONTROL_CT_SC_METER_POLLED = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1197:1: MIXERCONTROL_CT_SC_SWITCH_BOOLEAN = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1194:1: MIXERCONTROL_CT_SC_SWITCH_BUTTON = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1195:1: MIXERCONTROL_CT_SC_TIME_MICROSECS = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1199:1: MIXERCONTROL_CT_SC_TIME_MILLISECS = 16777216 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1200:1: MIXERCONTROL_CT_SUBCLASS_MASK = 251658240 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1192:1: MIXERCONTROL_CT_UNITS_BOOLEAN = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1207:1: MIXERCONTROL_CT_UNITS_CUSTOM = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1206:1: MIXERCONTROL_CT_UNITS_DECIBELS = 262144 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1210:1: MIXERCONTROL_CT_UNITS_MASK = 16711680 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1205:1: MIXERCONTROL_CT_UNITS_PERCENT = 327680 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1211:1: MIXERCONTROL_CT_UNITS_SIGNED = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1208:1: MIXERCONTROL_CT_UNITS_UNSIGNED = 196608 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1209:1: MIXERLINE_COMPONENTTYPE_DST_DIGITAL = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1077:1: MIXERLINE_COMPONENTTYPE_DST_FIRST = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1075:1: MIXERLINE_COMPONENTTYPE_DST_HEADPHONES = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1081:1: MIXERLINE_COMPONENTTYPE_DST_LAST = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1085:1: MIXERLINE_COMPONENTTYPE_DST_LINE = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1078:1: MIXERLINE_COMPONENTTYPE_DST_MONITOR = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1079:1: MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1080:1: MIXERLINE_COMPONENTTYPE_DST_TELEPHONE = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1082:1: MIXERLINE_COMPONENTTYPE_DST_UNDEFINED = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1076:1: MIXERLINE_COMPONENTTYPE_DST_VOICEIN = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1084:1: MIXERLINE_COMPONENTTYPE_DST_WAVEIN = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1083:1: MIXERLINE_COMPONENTTYPE_SRC_ANALOG = 4106 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1097:1: MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY = 4105 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1096:1: MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC = 4101 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1092:1: MIXERLINE_COMPONENTTYPE_SRC_DIGITAL = 4097 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1088:1: MIXERLINE_COMPONENTTYPE_SRC_FIRST = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1086:1: MIXERLINE_COMPONENTTYPE_SRC_LAST = 4106 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1098:1: MIXERLINE_COMPONENTTYPE_SRC_LINE = 4098 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1089:1: MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE = 4099 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1090:1: MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER = 4103 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1094:1: MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER = 4100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1091:1: MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE = 4102 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1093:1: MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED = 4096 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1087:1: MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT = 4104 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1095:1: MIXERLINE_LINEF_ACTIVE = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1071:1: MIXERLINE_LINEF_DISCONNECTED = 32768 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1072:1: MIXERLINE_LINEF_SOURCE = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1073:1: MIXERLINE_TARGETTYPE_AUX = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1105:1: MIXERLINE_TARGETTYPE_MIDIIN = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1104:1: MIXERLINE_TARGETTYPE_MIDIOUT = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1103:1: MIXERLINE_TARGETTYPE_UNDEFINED = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1100:1: MIXERLINE_TARGETTYPE_WAVEIN = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1102:1: MIXERLINE_TARGETTYPE_WAVEOUT = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1101:1: MIXERR_BASE = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:132:1: MIXERR_INVALCONTROL = 1025 // /usr/x86_64-w64-mingw32/include/mmsystem.h:943:1: MIXERR_INVALLINE = 1024 // /usr/x86_64-w64-mingw32/include/mmsystem.h:942:1: MIXERR_INVALVALUE = 1026 // /usr/x86_64-w64-mingw32/include/mmsystem.h:944:1: MIXERR_LASTERROR = 1026 // /usr/x86_64-w64-mingw32/include/mmsystem.h:945:1: MIXER_GETCONTROLDETAILSF_LISTTEXT = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1329:1: MIXER_GETCONTROLDETAILSF_QUERYMASK = 15 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1331:1: MIXER_GETCONTROLDETAILSF_VALUE = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1328:1: MIXER_GETLINECONTROLSF_ALL = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1278:1: MIXER_GETLINECONTROLSF_ONEBYID = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1279:1: MIXER_GETLINECONTROLSF_ONEBYTYPE = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1280:1: MIXER_GETLINECONTROLSF_QUERYMASK = 15 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1282:1: MIXER_GETLINEINFOF_COMPONENTTYPE = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1115:1: MIXER_GETLINEINFOF_DESTINATION = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1112:1: MIXER_GETLINEINFOF_LINEID = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1114:1: MIXER_GETLINEINFOF_QUERYMASK = 15 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1118:1: MIXER_GETLINEINFOF_SOURCE = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1113:1: MIXER_GETLINEINFOF_TARGETTYPE = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1116:1: MIXER_LONG_NAME_CHARS = 64 // /usr/x86_64-w64-mingw32/include/mmsystem.h:940:1: MIXER_OBJECTF_AUX = 1342177280 // /usr/x86_64-w64-mingw32/include/mmsystem.h:958:1: MIXER_OBJECTF_HANDLE = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:947:1: MIXER_OBJECTF_HMIDIIN = 3221225472 // /usr/x86_64-w64-mingw32/include/mmsystem.h:957:1: MIXER_OBJECTF_HMIDIOUT = 2952790016 // /usr/x86_64-w64-mingw32/include/mmsystem.h:955:1: MIXER_OBJECTF_HMIXER = 2147483648 // /usr/x86_64-w64-mingw32/include/mmsystem.h:949:1: MIXER_OBJECTF_HWAVEIN = 2684354560 // /usr/x86_64-w64-mingw32/include/mmsystem.h:953:1: MIXER_OBJECTF_HWAVEOUT = 2415919104 // /usr/x86_64-w64-mingw32/include/mmsystem.h:951:1: MIXER_OBJECTF_MIDIIN = 1073741824 // /usr/x86_64-w64-mingw32/include/mmsystem.h:956:1: MIXER_OBJECTF_MIDIOUT = 805306368 // /usr/x86_64-w64-mingw32/include/mmsystem.h:954:1: MIXER_OBJECTF_MIXER = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:948:1: MIXER_OBJECTF_WAVEIN = 536870912 // /usr/x86_64-w64-mingw32/include/mmsystem.h:952:1: MIXER_OBJECTF_WAVEOUT = 268435456 // /usr/x86_64-w64-mingw32/include/mmsystem.h:950:1: MIXER_SETCONTROLDETAILSF_CUSTOM = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1336:1: MIXER_SETCONTROLDETAILSF_QUERYMASK = 15 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1338:1: MIXER_SETCONTROLDETAILSF_VALUE = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1335:1: MIXER_SHORT_NAME_CHARS = 16 // /usr/x86_64-w64-mingw32/include/mmsystem.h:939:1: MKF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5705:1: MKF_CONFIRMHOTKEY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5707:1: MKF_HOTKEYACTIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5706:1: MKF_HOTKEYSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5708:1: MKF_INDICATOR = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5709:1: MKF_LEFTBUTTONDOWN = 0x01000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5714:1: MKF_LEFTBUTTONSEL = 0x10000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5712:1: MKF_MODIFIERS = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:5710:1: MKF_MOUSEKEYSON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5704:1: MKF_MOUSEMODE = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5716:1: MKF_REPLACENUMBERS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:5711:1: MKF_RIGHTBUTTONDOWN = 0x02000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5715:1: MKF_RIGHTBUTTONSEL = 0x20000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5713:1: MKSYS_URLMONIKER = 6 // /usr/x86_64-w64-mingw32/include/urlmon.h:625:1: MK_ALT = 32 // /usr/x86_64-w64-mingw32/include/oleidl.h:3478:1: MK_CONTROL = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1550:1: MK_E_FIRST = 2147746272 // /usr/x86_64-w64-mingw32/include/winerror.h:2448:1: MK_E_LAST = 2147746287 // /usr/x86_64-w64-mingw32/include/winerror.h:2449:1: MK_LBUTTON = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1547:1: MK_MBUTTON = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1551:1: MK_RBUTTON = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1548:1: MK_SHIFT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1549:1: MK_S_FIRST = 262624 // /usr/x86_64-w64-mingw32/include/winerror.h:2450:1: MK_S_LAST = 262639 // /usr/x86_64-w64-mingw32/include/winerror.h:2451:1: MK_XBUTTON1 = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1552:1: MK_XBUTTON2 = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:1553:1: MMIOERR_ACCESSDENIED = 268 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1635:1: MMIOERR_BASE = 256 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1623:1: MMIOERR_CANNOTCLOSE = 260 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1627:1: MMIOERR_CANNOTEXPAND = 264 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1631:1: MMIOERR_CANNOTOPEN = 259 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1626:1: MMIOERR_CANNOTREAD = 261 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1628:1: MMIOERR_CANNOTSEEK = 263 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1630:1: MMIOERR_CANNOTWRITE = 262 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1629:1: MMIOERR_CHUNKNOTFOUND = 265 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1632:1: MMIOERR_FILENOTFOUND = 257 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1624:1: MMIOERR_INVALIDFILE = 272 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1639:1: MMIOERR_NETWORKERROR = 270 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1637:1: MMIOERR_OUTOFMEMORY = 258 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1625:1: MMIOERR_PATHNOTFOUND = 267 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1634:1: MMIOERR_SHARINGVIOLATION = 269 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1636:1: MMIOERR_TOOMANYOPENFILES = 271 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1638:1: MMIOERR_UNBUFFERED = 266 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1633:1: MMIOM_CLOSE = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1720:1: MMIOM_OPEN = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1719:1: MMIOM_READ = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1716:1: MMIOM_RENAME = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1722:1: MMIOM_SEEK = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1718:1: MMIOM_USER = 0x8000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1724:1: MMIOM_WRITE = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1717:1: MMIOM_WRITEFLUSH = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1721:1: MMIO_ALLOCBUF = 0x00010000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1687:1: MMIO_COMPAT = 0x00000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1696:1: MMIO_CREATE = 0x00001000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1683:1: MMIO_CREATELIST = 0x0040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1714:1: MMIO_CREATERIFF = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1713:1: MMIO_DEFAULTBUFFER = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1738:1: MMIO_DELETE = 0x00000200 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1685:1: MMIO_DENYNONE = 0x00000040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1700:1: MMIO_DENYREAD = 0x00000030 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1699:1: MMIO_DENYWRITE = 0x00000020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1698:1: MMIO_DIRTY = 0x10000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1690:1: MMIO_EMPTYBUF = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1703:1: MMIO_EXCLUSIVE = 0x00000010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1697:1: MMIO_EXIST = 0x00004000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1686:1: MMIO_FHOPEN = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1702:1: MMIO_FINDCHUNK = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1710:1: MMIO_FINDLIST = 0x0040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1712:1: MMIO_FINDPROC = 0x00040000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1709:1: MMIO_FINDRIFF = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1711:1: MMIO_GETTEMP = 0x00020000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1688:1: MMIO_GLOBALPROC = 0x10000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1706:1: MMIO_INSTALLPROC = 0x00010000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1705:1: MMIO_PARSE = 0x00000100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1684:1: MMIO_READ = 0x00000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1692:1: MMIO_READWRITE = 0x00000002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1694:1: MMIO_REMOVEPROC = 0x00020000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1707:1: MMIO_RWMODE = 0x00000003 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1680:1: MMIO_SHAREMODE = 0x00000070 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1681:1: MMIO_TOUPPER = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1704:1: MMIO_UNICODEPROC = 0x01000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1708:1: MMIO_WRITE = 0x00000001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1693:1: MMSYSERR_ALLOCATED = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:144:1: MMSYSERR_BADDB = 14 // /usr/x86_64-w64-mingw32/include/mmsystem.h:155:1: MMSYSERR_BADDEVICEID = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:142:1: MMSYSERR_BADERRNUM = 9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:149:1: MMSYSERR_BASE = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:126:1: MMSYSERR_DELETEERROR = 18 // /usr/x86_64-w64-mingw32/include/mmsystem.h:159:1: MMSYSERR_ERROR = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:141:1: MMSYSERR_HANDLEBUSY = 12 // /usr/x86_64-w64-mingw32/include/mmsystem.h:152:1: MMSYSERR_INVALFLAG = 10 // /usr/x86_64-w64-mingw32/include/mmsystem.h:150:1: MMSYSERR_INVALHANDLE = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:145:1: MMSYSERR_INVALIDALIAS = 13 // /usr/x86_64-w64-mingw32/include/mmsystem.h:154:1: MMSYSERR_INVALPARAM = 11 // /usr/x86_64-w64-mingw32/include/mmsystem.h:151:1: MMSYSERR_KEYNOTFOUND = 15 // /usr/x86_64-w64-mingw32/include/mmsystem.h:156:1: MMSYSERR_LASTERROR = 21 // /usr/x86_64-w64-mingw32/include/mmsystem.h:163:1: MMSYSERR_MOREDATA = 21 // /usr/x86_64-w64-mingw32/include/mmsystem.h:162:1: MMSYSERR_NODRIVER = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:146:1: MMSYSERR_NODRIVERCB = 20 // /usr/x86_64-w64-mingw32/include/mmsystem.h:161:1: MMSYSERR_NOERROR = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:140:1: MMSYSERR_NOMEM = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:147:1: MMSYSERR_NOTENABLED = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:143:1: MMSYSERR_NOTSUPPORTED = 8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:148:1: MMSYSERR_READERROR = 16 // /usr/x86_64-w64-mingw32/include/mmsystem.h:157:1: MMSYSERR_VALNOTFOUND = 19 // /usr/x86_64-w64-mingw32/include/mmsystem.h:160:1: MMSYSERR_WRITEERROR = 17 // /usr/x86_64-w64-mingw32/include/mmsystem.h:158:1: MM_ANISOTROPIC = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1429:1: MM_DRVM_CLOSE = 0x3D1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:105:1: MM_DRVM_DATA = 0x3D2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:106:1: MM_DRVM_ERROR = 0x3D3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:107:1: MM_DRVM_OPEN = 0x3D0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:104:1: MM_HIENGLISH = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1426:1: MM_HIMETRIC = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1424:1: MM_ISOTROPIC = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1428:1: MM_JOY1BUTTONDOWN = 0x3B5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:77:1: MM_JOY1BUTTONUP = 0x3B7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:79:1: MM_JOY1MOVE = 0x3A0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:73:1: MM_JOY1ZMOVE = 0x3A2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:75:1: MM_JOY2BUTTONDOWN = 0x3B6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:78:1: MM_JOY2BUTTONUP = 0x3B8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:80:1: MM_JOY2MOVE = 0x3A1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:74:1: MM_JOY2ZMOVE = 0x3A3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:76:1: MM_LOENGLISH = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1425:1: MM_LOMETRIC = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1423:1: MM_MAX = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1432:1: MM_MAX_AXES_NAMELEN = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:3065:1: MM_MAX_FIXEDSCALE = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1433:1: MM_MAX_NUMAXES = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:3044:1: MM_MCINOTIFY = 0x3B9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:82:1: MM_MCISIGNAL = 0x3CB // /usr/x86_64-w64-mingw32/include/mmsystem.h:118:1: MM_MIM_CLOSE = 0x3C2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:93:1: MM_MIM_DATA = 0x3C3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:94:1: MM_MIM_ERROR = 0x3C5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:96:1: MM_MIM_LONGDATA = 0x3C4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:95:1: MM_MIM_LONGERROR = 0x3C6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:97:1: MM_MIM_MOREDATA = 0x3CC // /usr/x86_64-w64-mingw32/include/mmsystem.h:121:1: MM_MIM_OPEN = 0x3C1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:92:1: MM_MIN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1431:1: MM_MIXM_CONTROL_CHANGE = 0x3D1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:124:1: MM_MIXM_LINE_CHANGE = 0x3D0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:123:1: MM_MOM_CLOSE = 0x3C8 // /usr/x86_64-w64-mingw32/include/mmsystem.h:100:1: MM_MOM_DONE = 0x3C9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:101:1: MM_MOM_OPEN = 0x3C7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:99:1: MM_MOM_POSITIONCB = 0x3CA // /usr/x86_64-w64-mingw32/include/mmsystem.h:115:1: MM_STREAM_CLOSE = 0x3D5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:111:1: MM_STREAM_DONE = 0x3D6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:112:1: MM_STREAM_ERROR = 0x3D7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:113:1: MM_STREAM_OPEN = 0x3D4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:110:1: MM_TEXT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1422:1: MM_TWIPS = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1427:1: MM_WIM_CLOSE = 0x3BF // /usr/x86_64-w64-mingw32/include/mmsystem.h:89:1: MM_WIM_DATA = 0x3C0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:90:1: MM_WIM_OPEN = 0x3BE // /usr/x86_64-w64-mingw32/include/mmsystem.h:88:1: MM_WOM_CLOSE = 0x3BC // /usr/x86_64-w64-mingw32/include/mmsystem.h:85:1: MM_WOM_DONE = 0x3BD // /usr/x86_64-w64-mingw32/include/mmsystem.h:86:1: MM_WOM_OPEN = 0x3BB // /usr/x86_64-w64-mingw32/include/mmsystem.h:84:1: MNC_CLOSE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3200:1: MNC_EXECUTE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3201:1: MNC_IGNORE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3199:1: MNC_SELECT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3202:1: MND_CONTINUE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3218:1: MND_ENDMENU = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3219:1: MNGOF_BOTTOMGAP = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:3222:1: MNGOF_TOPGAP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3221:1: MNGO_NOERROR = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3225:1: MNGO_NOINTERFACE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3224:1: MNS_AUTODISMISS = 0x10000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3207:1: MNS_CHECKORBMP = 0x04000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3209:1: MNS_DRAGDROP = 0x20000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3206:1: MNS_MODELESS = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3205:1: MNS_NOCHECK = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3204:1: MNS_NOTIFYBYPOS = 0x08000000 // /usr/x86_64-w64-mingw32/include/winuser.h:3208:1: MN_GETHMENU = 0x01E1 // /usr/x86_64-w64-mingw32/include/winuser.h:1235:1: MOD_ALT = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:261:1: MOD_CONTROL = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:262:1: MOD_FMSYNTH = 4 // /usr/x86_64-w64-mingw32/include/mmsystem.h:676:1: MOD_IGNORE_ALL_MODIFIER = 0x0400 // /usr/x86_64-w64-mingw32/include/imm.h:269:1: MOD_LEFT = 0x8000 // /usr/x86_64-w64-mingw32/include/imm.h:265:1: MOD_MAPPER = 5 // /usr/x86_64-w64-mingw32/include/mmsystem.h:677:1: MOD_MIDIPORT = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:673:1: MOD_ON_KEYUP = 0x0800 // /usr/x86_64-w64-mingw32/include/imm.h:268:1: MOD_RIGHT = 0x4000 // /usr/x86_64-w64-mingw32/include/imm.h:266:1: MOD_SHIFT = 0x0004 // /usr/x86_64-w64-mingw32/include/imm.h:263:1: MOD_SQSYNTH = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:675:1: MOD_SWSYNTH = 7 // /usr/x86_64-w64-mingw32/include/mmsystem.h:679:1: MOD_SYNTH = 2 // /usr/x86_64-w64-mingw32/include/mmsystem.h:674:1: MOD_WAVETABLE = 6 // /usr/x86_64-w64-mingw32/include/mmsystem.h:678:1: MOD_WIN = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1995:1: MOM_CLOSE = 968 // /usr/x86_64-w64-mingw32/include/mmsystem.h:593:1: MOM_DONE = 969 // /usr/x86_64-w64-mingw32/include/mmsystem.h:594:1: MOM_OPEN = 967 // /usr/x86_64-w64-mingw32/include/mmsystem.h:592:1: MOM_POSITIONCB = 970 // /usr/x86_64-w64-mingw32/include/mmsystem.h:597:1: MONITORINFOF_PRIMARY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5881:1: MONITOR_DEFAULTTONEAREST = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5879:1: MONITOR_DEFAULTTONULL = 0x00000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5877:1: MONITOR_DEFAULTTOPRIMARY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5878:1: MONO_FONT = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1154:1: MOUSEEVENTF_ABSOLUTE = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:2617:1: MOUSEEVENTF_LEFTDOWN = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:2601:1: MOUSEEVENTF_LEFTUP = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:2602:1: MOUSEEVENTF_MIDDLEDOWN = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:2605:1: MOUSEEVENTF_MIDDLEUP = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:2606:1: MOUSEEVENTF_MOVE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:2600:1: MOUSEEVENTF_RIGHTDOWN = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:2603:1: MOUSEEVENTF_RIGHTUP = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:2604:1: MOUSEEVENTF_VIRTUALDESK = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:2616:1: MOUSEEVENTF_WHEEL = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:2609:1: MOUSEEVENTF_XDOWN = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:2607:1: MOUSEEVENTF_XUP = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:2608:1: MOUSETRAILS = 39 // /usr/x86_64-w64-mingw32/include/wingdi.h:273:1: MOUSE_ATTRIBUTES_CHANGED = 0x04 // /usr/x86_64-w64-mingw32/include/winuser.h:6351:1: MOUSE_EVENT = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:106:1: MOUSE_MOVED = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:75:1: MOUSE_MOVE_ABSOLUTE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6349:1: MOUSE_MOVE_RELATIVE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:6348:1: MOUSE_VIRTUAL_DESKTOP = 0x02 // /usr/x86_64-w64-mingw32/include/winuser.h:6350:1: MOUSE_WHEELED = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:77:1: MOVEFILE_COPY_ALLOWED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:2173:1: MOVEFILE_CREATE_HARDLINK = 0x00000010 // /usr/x86_64-w64-mingw32/include/winbase.h:2176:1: MOVEFILE_DELAY_UNTIL_REBOOT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winbase.h:2174:1: MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winbase.h:2177:1: MOVEFILE_REPLACE_EXISTING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:2172:1: MOVEFILE_WRITE_THROUGH = 0x00000008 // /usr/x86_64-w64-mingw32/include/winbase.h:2175:1: MSGF_DDEMGR = 0x8001 // /usr/x86_64-w64-mingw32/include/ddeml.h:99:1: MSGF_DIALOGBOX = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:532:1: MSGF_MAX = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:537:1: MSGF_MENU = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:534:1: MSGF_MESSAGEBOX = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:533:1: MSGF_NEXTWINDOW = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:536:1: MSGF_SCROLLBAR = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:535:1: MSGF_USER = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:538:1: MSG_DONTROUTE = 0x4 // /usr/x86_64-w64-mingw32/include/winsock.h:259:1: MSG_MAXIOVLEN = 16 // /usr/x86_64-w64-mingw32/include/winsock.h:261:1: MSG_OOB = 0x1 // /usr/x86_64-w64-mingw32/include/winsock.h:257:1: MSG_PARTIAL = 0x8000 // /usr/x86_64-w64-mingw32/include/winsock.h:263:1: MSG_PEEK = 0x2 // /usr/x86_64-w64-mingw32/include/winsock.h:258:1: MSVC_VERSION = 1900 // testdata/sqlite-amalgamation-3380500/sqlite3.c:223:1: MS_DEF_DH_SCHANNEL_PROV_A = "Microsoft DH SChannel Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:594:1: MS_DEF_DSS_DH_PROV_A = "Microsoft Base DSS and Diffie-Hellman Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:590:1: MS_DEF_DSS_PROV_A = "Microsoft Base DSS Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:588:1: MS_DEF_PROV_A = "Microsoft Base Cryptographic Provider v1.0" // /usr/x86_64-w64-mingw32/include/wincrypt.h:578:1: MS_DEF_RSA_SCHANNEL_PROV_A = "Microsoft RSA SChannel Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:586:1: MS_DEF_RSA_SIG_PROV_A = "Microsoft RSA Signature Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:584:1: MS_ENHANCED_PROV_A = "Microsoft Enhanced Cryptographic Provider v1.0" // /usr/x86_64-w64-mingw32/include/wincrypt.h:580:1: MS_ENH_DSS_DH_PROV_A = "Microsoft Enhanced DSS and Diffie-Hellman Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:592:1: MS_ENH_RSA_AES_PROV_A = "Microsoft Enhanced RSA and AES Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:599:1: MS_ENH_RSA_AES_PROV_XP_A = "Microsoft Enhanced RSA and AES Cryptographic Provider (Prototype)" // /usr/x86_64-w64-mingw32/include/wincrypt.h:601:1: MS_NBF = "MNBF" // /usr/x86_64-w64-mingw32/include/nb30.h:136:1: MS_PPM_SOFTWARE_ALL = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:5792:1: MS_SCARD_PROV_A = "Microsoft Base Smart Card Crypto Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:596:1: MS_STRONG_PROV_A = "Microsoft Strong Cryptographic Provider" // /usr/x86_64-w64-mingw32/include/wincrypt.h:582:1: MULTIFILEOPENORD = 1537 // /usr/x86_64-w64-mingw32/include/dlgs.h:177:1: MUTANT_ALL_ACCESS = 2031617 // /usr/x86_64-w64-mingw32/include/winnt.h:4592:1: MUTANT_QUERY_STATE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:4590:1: MUTEX_ALL_ACCESS = 2031617 // /usr/x86_64-w64-mingw32/include/synchapi.h:32:1: MUTEX_MODIFY_STATE = 1 // /usr/x86_64-w64-mingw32/include/synchapi.h:31:1: MUTZ_ACCEPT_WILDCARD_SCHEME = 0x80 // /usr/x86_64-w64-mingw32/include/urlmon.h:6640:1: MUTZ_DONT_UNESCAPE = 0x800 // /usr/x86_64-w64-mingw32/include/urlmon.h:6644:1: MUTZ_DONT_USE_CACHE = 0x1000 // /usr/x86_64-w64-mingw32/include/urlmon.h:6645:1: MUTZ_ENFORCERESTRICTED = 0x100 // /usr/x86_64-w64-mingw32/include/urlmon.h:6641:1: MUTZ_FORCE_INTRANET_FLAGS = 0x2000 // /usr/x86_64-w64-mingw32/include/urlmon.h:6646:1: MUTZ_IGNORE_ZONE_MAPPINGS = 0x4000 // /usr/x86_64-w64-mingw32/include/urlmon.h:6647:1: MUTZ_ISFILE = 0x2 // /usr/x86_64-w64-mingw32/include/urlmon.h:6639:1: MUTZ_NOSAVEDFILECHECK = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:6638:1: MUTZ_REQUIRESAVEDFILECHECK = 0x400 // /usr/x86_64-w64-mingw32/include/urlmon.h:6643:1: MUTZ_RESERVED = 0x200 // /usr/x86_64-w64-mingw32/include/urlmon.h:6642:1: MWMO_ALERTABLE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:2998:1: MWMO_INPUTAVAILABLE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:2999:1: MWMO_WAITALL = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:2997:1: MWT_IDENTITY = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:443:1: MWT_LEFTMULTIPLY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:444:1: MWT_MAX = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:448:1: MWT_MIN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:447:1: MWT_RIGHTMULTIPLY = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:445:1: MX_CLOSE_ATTEMPT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:45577:1: M_1_PI = 0.31830988618379067154 // /usr/x86_64-w64-mingw32/include/math.h:48:1: M_2_PI = 0.63661977236758134308 // /usr/x86_64-w64-mingw32/include/math.h:49:1: M_2_SQRTPI = 1.12837916709551257390 // /usr/x86_64-w64-mingw32/include/math.h:50:1: M_E = 2.7182818284590452354 // /usr/x86_64-w64-mingw32/include/math.h:40:1: M_LN10 = 2.30258509299404568402 // /usr/x86_64-w64-mingw32/include/math.h:44:1: M_LN2 = 0.69314718055994530942 // /usr/x86_64-w64-mingw32/include/math.h:43:1: M_LOG10E = 0.43429448190325182765 // /usr/x86_64-w64-mingw32/include/math.h:42:1: M_LOG2E = 1.4426950408889634074 // /usr/x86_64-w64-mingw32/include/math.h:41:1: M_PI = 3.14159265358979323846 // /usr/x86_64-w64-mingw32/include/math.h:45:1: M_PI_2 = 1.57079632679489661923 // /usr/x86_64-w64-mingw32/include/math.h:46:1: M_PI_4 = 0.78539816339744830962 // /usr/x86_64-w64-mingw32/include/math.h:47:1: M_SQRT1_2 = 0.70710678118654752440 // /usr/x86_64-w64-mingw32/include/math.h:52:1: M_SQRT2 = 1.41421356237309504880 // /usr/x86_64-w64-mingw32/include/math.h:51:1: MaxNumberOfEEInfoParams = 4 // /usr/x86_64-w64-mingw32/include/rpcasync.h:82:1: NAME_FLAGS_MASK = 0x87 // /usr/x86_64-w64-mingw32/include/nb30.h:75:1: NB = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:73163:1: NCBACTION = 0x77 // /usr/x86_64-w64-mingw32/include/nb30.h:161:1: NCBADDGRNAME = 0x36 // /usr/x86_64-w64-mingw32/include/nb30.h:155:1: NCBADDNAME = 0x30 // /usr/x86_64-w64-mingw32/include/nb30.h:149:1: NCBASTAT = 0x33 // /usr/x86_64-w64-mingw32/include/nb30.h:152:1: NCBCALL = 0x10 // /usr/x86_64-w64-mingw32/include/nb30.h:138:1: NCBCANCEL = 0x35 // /usr/x86_64-w64-mingw32/include/nb30.h:154:1: NCBCHAINSEND = 0x17 // /usr/x86_64-w64-mingw32/include/nb30.h:144:1: NCBCHAINSENDNA = 0x72 // /usr/x86_64-w64-mingw32/include/nb30.h:159:1: NCBDELNAME = 0x31 // /usr/x86_64-w64-mingw32/include/nb30.h:150:1: NCBDGRECV = 0x21 // /usr/x86_64-w64-mingw32/include/nb30.h:146:1: NCBDGRECVBC = 0x23 // /usr/x86_64-w64-mingw32/include/nb30.h:148:1: NCBDGSEND = 0x20 // /usr/x86_64-w64-mingw32/include/nb30.h:145:1: NCBDGSENDBC = 0x22 // /usr/x86_64-w64-mingw32/include/nb30.h:147:1: NCBENUM = 0x37 // /usr/x86_64-w64-mingw32/include/nb30.h:156:1: NCBFINDNAME = 0x78 // /usr/x86_64-w64-mingw32/include/nb30.h:162:1: NCBHANGUP = 0x12 // /usr/x86_64-w64-mingw32/include/nb30.h:140:1: NCBLANSTALERT = 0x73 // /usr/x86_64-w64-mingw32/include/nb30.h:160:1: NCBLISTEN = 0x11 // /usr/x86_64-w64-mingw32/include/nb30.h:139:1: NCBNAMSZ = 16 // /usr/x86_64-w64-mingw32/include/nb30.h:13:1: NCBRECV = 0x15 // /usr/x86_64-w64-mingw32/include/nb30.h:142:1: NCBRECVANY = 0x16 // /usr/x86_64-w64-mingw32/include/nb30.h:143:1: NCBRESET = 0x32 // /usr/x86_64-w64-mingw32/include/nb30.h:151:1: NCBSEND = 0x14 // /usr/x86_64-w64-mingw32/include/nb30.h:141:1: NCBSENDNA = 0x71 // /usr/x86_64-w64-mingw32/include/nb30.h:158:1: NCBSSTAT = 0x34 // /usr/x86_64-w64-mingw32/include/nb30.h:153:1: NCBTRACE = 0x79 // /usr/x86_64-w64-mingw32/include/nb30.h:163:1: NCBUNLINK = 0x70 // /usr/x86_64-w64-mingw32/include/nb30.h:157:1: NCB_INCLUDED = 0 // /usr/x86_64-w64-mingw32/include/nb30.h:7:1: NCRYPTBUFFER_CERT_BLOB = 47 // /usr/x86_64-w64-mingw32/include/ncrypt.h:117:1: NCRYPTBUFFER_DATA = 1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:100:1: NCRYPTBUFFER_EMPTY = 0 // /usr/x86_64-w64-mingw32/include/ncrypt.h:99:1: NCRYPTBUFFER_PKCS_ALG_ID = 43 // /usr/x86_64-w64-mingw32/include/ncrypt.h:113:1: NCRYPTBUFFER_PKCS_ALG_OID = 41 // /usr/x86_64-w64-mingw32/include/ncrypt.h:111:1: NCRYPTBUFFER_PKCS_ALG_PARAM = 42 // /usr/x86_64-w64-mingw32/include/ncrypt.h:112:1: NCRYPTBUFFER_PKCS_ATTRS = 44 // /usr/x86_64-w64-mingw32/include/ncrypt.h:114:1: NCRYPTBUFFER_PKCS_KEY_NAME = 45 // /usr/x86_64-w64-mingw32/include/ncrypt.h:115:1: NCRYPTBUFFER_PKCS_OID = 40 // /usr/x86_64-w64-mingw32/include/ncrypt.h:110:1: NCRYPTBUFFER_PKCS_SECRET = 46 // /usr/x86_64-w64-mingw32/include/ncrypt.h:116:1: NCRYPTBUFFER_PROTECTION_DESCRIPTOR_STRING = 3 // /usr/x86_64-w64-mingw32/include/ncrypt.h:101:1: NCRYPTBUFFER_PROTECTION_FLAGS = 4 // /usr/x86_64-w64-mingw32/include/ncrypt.h:102:1: NCRYPTBUFFER_SSL_CLEAR_KEY = 23 // /usr/x86_64-w64-mingw32/include/ncrypt.h:107:1: NCRYPTBUFFER_SSL_CLIENT_RANDOM = 20 // /usr/x86_64-w64-mingw32/include/ncrypt.h:104:1: NCRYPTBUFFER_SSL_HIGHEST_VERSION = 22 // /usr/x86_64-w64-mingw32/include/ncrypt.h:106:1: NCRYPTBUFFER_SSL_KEY_ARG_DATA = 24 // /usr/x86_64-w64-mingw32/include/ncrypt.h:108:1: NCRYPTBUFFER_SSL_SERVER_RANDOM = 21 // /usr/x86_64-w64-mingw32/include/ncrypt.h:105:1: NCRYPTBUFFER_VERSION = 0 // /usr/x86_64-w64-mingw32/include/ncrypt.h:97:1: NCRYPT_ALLOW_ALL_USAGES = 0x00ffffff // /usr/x86_64-w64-mingw32/include/ncrypt.h:326:1: NCRYPT_ALLOW_ARCHIVING_FLAG = 0x00000004 // /usr/x86_64-w64-mingw32/include/ncrypt.h:315:1: NCRYPT_ALLOW_DECRYPT_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:323:1: NCRYPT_ALLOW_EXPORT_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:313:1: NCRYPT_ALLOW_KEY_AGREEMENT_FLAG = 0x00000004 // /usr/x86_64-w64-mingw32/include/ncrypt.h:325:1: NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG = 0x00000008 // /usr/x86_64-w64-mingw32/include/ncrypt.h:316:1: NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:314:1: NCRYPT_ALLOW_SIGNING_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:324:1: NCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE = 3 // /usr/x86_64-w64-mingw32/include/ncrypt.h:70:1: NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 4 // /usr/x86_64-w64-mingw32/include/ncrypt.h:187:1: NCRYPT_CIPHER_INTERFACE = 1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:68:1: NCRYPT_CIPHER_OPERATION = 1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:185:1: NCRYPT_DO_NOT_FINALIZE_FLAG = 0x400 // /usr/x86_64-w64-mingw32/include/ncrypt.h:177:1: NCRYPT_EXPORT_LEGACY_FLAG = 0x00000800 // /usr/x86_64-w64-mingw32/include/ncrypt.h:376:1: NCRYPT_HASH_INTERFACE = 2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:69:1: NCRYPT_HASH_OPERATION = 2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:186:1: NCRYPT_IMPL_HARDWARE_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:318:1: NCRYPT_IMPL_HARDWARE_RNG_FLAG = 0x00000010 // /usr/x86_64-w64-mingw32/include/ncrypt.h:321:1: NCRYPT_IMPL_REMOVABLE_FLAG = 0x00000008 // /usr/x86_64-w64-mingw32/include/ncrypt.h:320:1: NCRYPT_IMPL_SOFTWARE_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:319:1: NCRYPT_KEY_STORAGE_INTERFACE = 0x00010001 // /usr/x86_64-w64-mingw32/include/ncrypt.h:77:1: NCRYPT_MACHINE_KEY_FLAG = 0x20 // /usr/x86_64-w64-mingw32/include/ncrypt.h:380:1: NCRYPT_MAX_ALG_ID_LENGTH = 512 // /usr/x86_64-w64-mingw32/include/ncrypt.h:30:1: NCRYPT_MAX_KEY_NAME_LENGTH = 512 // /usr/x86_64-w64-mingw32/include/ncrypt.h:29:1: NCRYPT_MAX_PROPERTY_DATA = 0x100000 // /usr/x86_64-w64-mingw32/include/ncrypt.h:311:1: NCRYPT_MAX_PROPERTY_NAME = 64 // /usr/x86_64-w64-mingw32/include/ncrypt.h:309:1: NCRYPT_NO_KEY_VALIDATION = 8 // /usr/x86_64-w64-mingw32/include/ncrypt.h:169:1: NCRYPT_NO_PADDING_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:119:1: NCRYPT_OVERWRITE_KEY_FLAG = 0x80 // /usr/x86_64-w64-mingw32/include/ncrypt.h:200:1: NCRYPT_PAD_OAEP_FLAG = 0x4 // /usr/x86_64-w64-mingw32/include/ncrypt.h:121:1: NCRYPT_PAD_PKCS1_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:120:1: NCRYPT_PAD_PSS_FLAG = 0x8 // /usr/x86_64-w64-mingw32/include/ncrypt.h:122:1: NCRYPT_PERSIST_FLAG = 0x80000000 // /usr/x86_64-w64-mingw32/include/ncrypt.h:332:1: NCRYPT_PERSIST_ONLY_FLAG = 0x40000000 // /usr/x86_64-w64-mingw32/include/ncrypt.h:333:1: NCRYPT_REGISTER_NOTIFY_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:378:1: NCRYPT_RNG_OPERATION = 32 // /usr/x86_64-w64-mingw32/include/ncrypt.h:190:1: NCRYPT_SCHANNEL_INTERFACE = 0x00010002 // /usr/x86_64-w64-mingw32/include/ncrypt.h:78:1: NCRYPT_SCHANNEL_SIGNATURE_INTERFACE = 0x00010003 // /usr/x86_64-w64-mingw32/include/ncrypt.h:79:1: NCRYPT_SECRET_AGREEMENT_INTERFACE = 4 // /usr/x86_64-w64-mingw32/include/ncrypt.h:71:1: NCRYPT_SECRET_AGREEMENT_OPERATION = 8 // /usr/x86_64-w64-mingw32/include/ncrypt.h:188:1: NCRYPT_SIGNATURE_INTERFACE = 5 // /usr/x86_64-w64-mingw32/include/ncrypt.h:72:1: NCRYPT_SIGNATURE_OPERATION = 16 // /usr/x86_64-w64-mingw32/include/ncrypt.h:189:1: NCRYPT_SILENT_FLAG = 0x40 // /usr/x86_64-w64-mingw32/include/ncrypt.h:198:1: NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:329:1: NCRYPT_UI_PROTECT_KEY_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/ncrypt.h:328:1: NCRYPT_UNREGISTER_NOTIFY_FLAG = 0x2 // /usr/x86_64-w64-mingw32/include/ncrypt.h:379:1: NCRYPT_WRITE_KEY_TO_LEGACY_STORE_FLAG = 0x200 // /usr/x86_64-w64-mingw32/include/ncrypt.h:174:1: NC_AllowAgg = 0x000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18460:1: NC_AllowWin = 0x004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18474:1: NC_Complex = 0x002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18473:1: NC_FromDDL = 0x040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18478:1: NC_GenCol = 0x000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18463:1: NC_HasAgg = 0x000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18464:1: NC_HasWin = 0x008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18475:1: NC_IdxExpr = 0x000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18465:1: NC_InAggFunc = 0x020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18477:1: NC_IsCheck = 0x000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18462:1: NC_IsDDL = 0x010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18476:1: NC_MinMaxAgg = 0x001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18472:1: NC_NoSelect = 0x080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18479:1: NC_OrderAgg = 0x8000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18480:1: NC_PartIdx = 0x000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18461:1: NC_SelfRef = 0x00002e // testdata/sqlite-amalgamation-3380500/sqlite3.c:18466:1: NC_UAggInfo = 0x000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18469:1: NC_UBaseReg = 0x000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18471:1: NC_UEList = 0x000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18468:1: NC_UUpsert = 0x000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18470:1: NC_VarSelect = 0x000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18467:1: NDEBUG = 1 // <defines>:2:1: NDR_ASCII_CHAR = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:39:1: NDR_BIG_ENDIAN = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:33:1: NDR_CHAR_REP_MASK = 15 // /usr/x86_64-w64-mingw32/include/rpcndr.h:28:1: NDR_EBCDIC_CHAR = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:40:1: NDR_FLOAT_REP_MASK = 65280 // /usr/x86_64-w64-mingw32/include/rpcndr.h:30:1: NDR_IBM_FLOAT = 768 // /usr/x86_64-w64-mingw32/include/rpcndr.h:37:1: NDR_IEEE_FLOAT = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:35:1: NDR_INT_REP_MASK = 240 // /usr/x86_64-w64-mingw32/include/rpcndr.h:29:1: NDR_LITTLE_ENDIAN = 16 // /usr/x86_64-w64-mingw32/include/rpcndr.h:32:1: NDR_LOCAL_DATA_REPRESENTATION = 16 // /usr/x86_64-w64-mingw32/include/rpcndr.h:42:1: NDR_LOCAL_ENDIAN = 16 // /usr/x86_64-w64-mingw32/include/rpcndr.h:43:1: NDR_VAX_FLOAT = 256 // /usr/x86_64-w64-mingw32/include/rpcndr.h:36:1: NEAR = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:119:1: NETINFO_DISKRED = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:259:1: NETINFO_DLL16 = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:258:1: NETINFO_PRINTERRED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:260:1: NETPROPERTY_PERSISTENT = 1 // /usr/x86_64-w64-mingw32/include/winnetwk.h:77:1: NETSCAPE_SIGN_CA_CERT_TYPE = 0x01 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2337:1: NETSCAPE_SIGN_CERT_TYPE = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2340:1: NETSCAPE_SMIME_CA_CERT_TYPE = 0x02 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2338:1: NETSCAPE_SMIME_CERT_TYPE = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2341:1: NETSCAPE_SSL_CA_CERT_TYPE = 0x04 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2339:1: NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE = 0x80 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2343:1: NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2342:1: NEWFILEOPENORD = 1547 // /usr/x86_64-w64-mingw32/include/dlgs.h:188:1: NEWFILEOPENV2ORD = 1552 // /usr/x86_64-w64-mingw32/include/dlgs.h:192:1: NEWFRAME = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:234:1: NEWTRANSPARENT = 3 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2621:1: NEXTBAND = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:236:1: NFR_ANSI = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1136:1: NFR_UNICODE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1137:1: NF_QUERY = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1138:1: NF_REQUERY = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1139:1: NIF_GUID = 0x00000020 // /usr/x86_64-w64-mingw32/include/shellapi.h:532:1: NIF_ICON = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:527:1: NIF_INFO = 0x00000010 // /usr/x86_64-w64-mingw32/include/shellapi.h:530:1: NIF_MESSAGE = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:526:1: NIF_STATE = 0x00000008 // /usr/x86_64-w64-mingw32/include/shellapi.h:529:1: NIF_TIP = 0x00000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:528:1: NIIF_ERROR = 0x00000003 // /usr/x86_64-w64-mingw32/include/shellapi.h:545:1: NIIF_ICON_MASK = 0x0000000f // /usr/x86_64-w64-mingw32/include/shellapi.h:547:1: NIIF_INFO = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:543:1: NIIF_NONE = 0x00000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:542:1: NIIF_NOSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/shellapi.h:548:1: NIIF_USER = 0x00000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:546:1: NIIF_WARNING = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:544:1: NIM_ADD = 0x00000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:515:1: NIM_DELETE = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:517:1: NIM_MODIFY = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:516:1: NIM_SETFOCUS = 0x00000003 // /usr/x86_64-w64-mingw32/include/shellapi.h:518:1: NIM_SETVERSION = 0x00000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:519:1: NINF_KEY = 0x1 // /usr/x86_64-w64-mingw32/include/shellapi.h:503:1: NIN_BALLOONHIDE = 1027 // /usr/x86_64-w64-mingw32/include/shellapi.h:507:1: NIN_BALLOONSHOW = 1026 // /usr/x86_64-w64-mingw32/include/shellapi.h:506:1: NIN_BALLOONTIMEOUT = 1028 // /usr/x86_64-w64-mingw32/include/shellapi.h:508:1: NIN_BALLOONUSERCLICK = 1029 // /usr/x86_64-w64-mingw32/include/shellapi.h:509:1: NIN_KEYSELECT = 1025 // /usr/x86_64-w64-mingw32/include/shellapi.h:504:1: NIN_SELECT = 1024 // /usr/x86_64-w64-mingw32/include/shellapi.h:502:1: NIS_HIDDEN = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:539:1: NIS_SHAREDICON = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:540:1: NI_CHANGECANDIDATELIST = 0x0013 // /usr/x86_64-w64-mingw32/include/imm.h:243:1: NI_CLOSECANDIDATE = 0x0011 // /usr/x86_64-w64-mingw32/include/imm.h:241:1: NI_COMPOSITIONSTR = 0x0015 // /usr/x86_64-w64-mingw32/include/imm.h:245:1: NI_FINALIZECONVERSIONRESULT = 0x0014 // /usr/x86_64-w64-mingw32/include/imm.h:244:1: NI_IMEMENUSELECTED = 0x0018 // /usr/x86_64-w64-mingw32/include/imm.h:248:1: NI_OPENCANDIDATE = 0x0010 // /usr/x86_64-w64-mingw32/include/imm.h:240:1: NI_SELECTCANDIDATESTR = 0x0012 // /usr/x86_64-w64-mingw32/include/imm.h:242:1: NI_SETCANDIDATE_PAGESIZE = 0x0017 // /usr/x86_64-w64-mingw32/include/imm.h:247:1: NI_SETCANDIDATE_PAGESTART = 0x0016 // /usr/x86_64-w64-mingw32/include/imm.h:246:1: NLS_ALPHANUMERIC = 0x0 // /usr/x86_64-w64-mingw32/include/wincon.h:54:1: NLS_DBCSCHAR = 0x10000 // /usr/x86_64-w64-mingw32/include/wincon.h:53:1: NLS_HIRAGANA = 0x40000 // /usr/x86_64-w64-mingw32/include/wincon.h:56:1: NLS_IME_CONVERSION = 0x800000 // /usr/x86_64-w64-mingw32/include/wincon.h:58:1: NLS_IME_DISABLE = 0x20000000 // /usr/x86_64-w64-mingw32/include/wincon.h:60:1: NLS_KATAKANA = 0x20000 // /usr/x86_64-w64-mingw32/include/wincon.h:55:1: NLS_ROMAN = 0x400000 // /usr/x86_64-w64-mingw32/include/wincon.h:57:1: NLS_VALID_LOCALE_MASK = 0x000fffff // /usr/x86_64-w64-mingw32/include/winnt.h:1288:1: NMPWAIT_NOWAIT = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:590:1: NMPWAIT_USE_DEFAULT_WAIT = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:591:1: NMPWAIT_WAIT_FOREVER = 0xffffffff // /usr/x86_64-w64-mingw32/include/winbase.h:589:1: NN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:73162:1: NOERROR = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:2257:1: NONAMELESSSTRUCT = 1 // /usr/x86_64-w64-mingw32/include/_mingw.h:468:1: NONAMELESSUNION = 1 // /usr/x86_64-w64-mingw32/include/_mingw.h:460:1: NONANTIALIASED_QUALITY = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1145:1: NONZEROLHND = 2 // /usr/x86_64-w64-mingw32/include/minwinbase.h:356:1: NONZEROLPTR = 0 // /usr/x86_64-w64-mingw32/include/minwinbase.h:357:1: NON_PAGED_DEBUG_SIGNATURE = 0x494E // /usr/x86_64-w64-mingw32/include/winnt.h:7574:1: NOPARITY = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:469:1: NORMAL_PRINT = 0x00000000 // /usr/x86_64-w64-mingw32/include/winspool.h:649:1: NORMAL_PRIORITY_CLASS = 0x20 // /usr/x86_64-w64-mingw32/include/winbase.h:382:1: NORM_IGNORECASE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:97:1: NORM_IGNOREKANATYPE = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnls.h:104:1: NORM_IGNORENONSPACE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:98:1: NORM_IGNORESYMBOLS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:99:1: NORM_IGNOREWIDTH = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnls.h:105:1: NORM_LINGUISTIC_CASING = 0x08000000 // /usr/x86_64-w64-mingw32/include/winnls.h:106:1: NOTIFYICON_VERSION = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:521:1: NOT_WITHIN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10801:1: NO_ADDRESS = 11004 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:183:1: NO_DATA = 11004 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:180:1: NO_ERROR = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:44:1: NO_LOCK = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16319:1: NO_PRIORITY = 0 // /usr/x86_64-w64-mingw32/include/winspool.h:227:1: NO_PROPAGATE_INHERIT_ACE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3338:1: NO_RECOVERY = 11003 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:179:1: NRC_ACTSES = 0x0f // /usr/x86_64-w64-mingw32/include/nb30.h:180:1: NRC_BADDR = 0x07 // /usr/x86_64-w64-mingw32/include/nb30.h:173:1: NRC_BRIDGE = 0x23 // /usr/x86_64-w64-mingw32/include/nb30.h:192:1: NRC_BUFLEN = 0x01 // /usr/x86_64-w64-mingw32/include/nb30.h:169:1: NRC_CANCEL = 0x26 // /usr/x86_64-w64-mingw32/include/nb30.h:194:1: NRC_CANOCCR = 0x24 // /usr/x86_64-w64-mingw32/include/nb30.h:193:1: NRC_CMDCAN = 0x0b // /usr/x86_64-w64-mingw32/include/nb30.h:177:1: NRC_CMDTMO = 0x05 // /usr/x86_64-w64-mingw32/include/nb30.h:171:1: NRC_DUPENV = 0x30 // /usr/x86_64-w64-mingw32/include/nb30.h:195:1: NRC_DUPNAME = 0x0d // /usr/x86_64-w64-mingw32/include/nb30.h:178:1: NRC_ENVNOTDEF = 0x34 // /usr/x86_64-w64-mingw32/include/nb30.h:196:1: NRC_GOODRET = 0x00 // /usr/x86_64-w64-mingw32/include/nb30.h:167:1: NRC_IFBUSY = 0x21 // /usr/x86_64-w64-mingw32/include/nb30.h:190:1: NRC_ILLCMD = 0x03 // /usr/x86_64-w64-mingw32/include/nb30.h:170:1: NRC_ILLNN = 0x13 // /usr/x86_64-w64-mingw32/include/nb30.h:183:1: NRC_INCOMP = 0x06 // /usr/x86_64-w64-mingw32/include/nb30.h:172:1: NRC_INUSE = 0x16 // /usr/x86_64-w64-mingw32/include/nb30.h:186:1: NRC_INVADDRESS = 0x39 // /usr/x86_64-w64-mingw32/include/nb30.h:201:1: NRC_INVDDID = 0x3B // /usr/x86_64-w64-mingw32/include/nb30.h:202:1: NRC_LOCKFAIL = 0x3C // /usr/x86_64-w64-mingw32/include/nb30.h:203:1: NRC_LOCTFUL = 0x11 // /usr/x86_64-w64-mingw32/include/nb30.h:181:1: NRC_MAXAPPS = 0x36 // /usr/x86_64-w64-mingw32/include/nb30.h:198:1: NRC_NAMCONF = 0x19 // /usr/x86_64-w64-mingw32/include/nb30.h:189:1: NRC_NAMERR = 0x17 // /usr/x86_64-w64-mingw32/include/nb30.h:187:1: NRC_NAMTFUL = 0x0e // /usr/x86_64-w64-mingw32/include/nb30.h:179:1: NRC_NOCALL = 0x14 // /usr/x86_64-w64-mingw32/include/nb30.h:184:1: NRC_NORES = 0x09 // /usr/x86_64-w64-mingw32/include/nb30.h:175:1: NRC_NORESOURCES = 0x38 // /usr/x86_64-w64-mingw32/include/nb30.h:200:1: NRC_NOSAPS = 0x37 // /usr/x86_64-w64-mingw32/include/nb30.h:199:1: NRC_NOWILD = 0x15 // /usr/x86_64-w64-mingw32/include/nb30.h:185:1: NRC_OPENERR = 0x3f // /usr/x86_64-w64-mingw32/include/nb30.h:204:1: NRC_OSRESNOTAV = 0x35 // /usr/x86_64-w64-mingw32/include/nb30.h:197:1: NRC_PENDING = 0xff // /usr/x86_64-w64-mingw32/include/nb30.h:207:1: NRC_REMTFUL = 0x12 // /usr/x86_64-w64-mingw32/include/nb30.h:182:1: NRC_SABORT = 0x18 // /usr/x86_64-w64-mingw32/include/nb30.h:188:1: NRC_SCLOSED = 0x0a // /usr/x86_64-w64-mingw32/include/nb30.h:176:1: NRC_SNUMOUT = 0x08 // /usr/x86_64-w64-mingw32/include/nb30.h:174:1: NRC_SYSTEM = 0x40 // /usr/x86_64-w64-mingw32/include/nb30.h:205:1: NRC_TOOMANY = 0x22 // /usr/x86_64-w64-mingw32/include/nb30.h:191:1: NT351_INTERFACE_SIZE = 0x40 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:90:1: NTAPI = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:271:1: NTAPI_INLINE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:273:1: NTDDI_LONGHORN = 100663296 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:125:1: NTDDI_VERSION = 84017152 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:172:1: NTDDI_VISTA = 100663296 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:120:1: NTDDI_VISTASP1 = 100663552 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:121:1: NTDDI_VISTASP2 = 100663808 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:122:1: NTDDI_VISTASP3 = 100664064 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:123:1: NTDDI_VISTASP4 = 100664320 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:124:1: NTDDI_WIN10 = 0x0A000000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:136:1: NTDDI_WIN10_19H1 = 0x0A000007 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:143:1: NTDDI_WIN10_FE = 0x0A00000A // /usr/x86_64-w64-mingw32/include/sdkddkver.h:146:1: NTDDI_WIN10_MN = 0x0A000009 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:145:1: NTDDI_WIN10_RS1 = 0x0A000002 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:138:1: NTDDI_WIN10_RS2 = 0x0A000003 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:139:1: NTDDI_WIN10_RS3 = 0x0A000004 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:140:1: NTDDI_WIN10_RS4 = 0x0A000005 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:141:1: NTDDI_WIN10_RS5 = 0x0A000006 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:142:1: NTDDI_WIN10_TH2 = 0x0A000001 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:137:1: NTDDI_WIN10_VB = 0x0A000008 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:144:1: NTDDI_WIN2K = 0x05000000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:77:1: NTDDI_WIN2KSP1 = 0x05000100 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:80:1: NTDDI_WIN2KSP2 = 0x05000200 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:83:1: NTDDI_WIN2KSP3 = 0x05000300 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:86:1: NTDDI_WIN2KSP4 = 0x05000400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:89:1: NTDDI_WIN6 = 0x06000000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:114:1: NTDDI_WIN6SP1 = 0x06000100 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:115:1: NTDDI_WIN6SP2 = 0x06000200 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:116:1: NTDDI_WIN6SP3 = 0x06000300 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:117:1: NTDDI_WIN6SP4 = 0x06000400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:118:1: NTDDI_WIN7 = 0x06010000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:132:1: NTDDI_WIN8 = 0x06020000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:133:1: NTDDI_WINBLUE = 0x06030000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:134:1: NTDDI_WINTHRESHOLD = 0x0A000000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:135:1: NTDDI_WINXP = 0x05010000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:93:1: NTDDI_WINXPSP1 = 0x05010100 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:96:1: NTDDI_WINXPSP2 = 0x05010200 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:99:1: NTDDI_WINXPSP3 = 0x05010300 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:102:1: NTDDI_WINXPSP4 = 0x05010400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:105:1: NTDDI_WS03 = 0x05020000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:108:1: NTDDI_WS03SP1 = 0x05020100 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:109:1: NTDDI_WS03SP2 = 0x05020200 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:110:1: NTDDI_WS03SP3 = 0x05020300 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:111:1: NTDDI_WS03SP4 = 0x05020400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:112:1: NTDDI_WS08 = 100663552 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:127:1: NTDDI_WS08SP2 = 100663808 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:128:1: NTDDI_WS08SP3 = 100664064 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:129:1: NTDDI_WS08SP4 = 100664320 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:130:1: NTE_OP_OK = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:3163:1: NTM_BOLD = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:873:1: NTM_DSIG = 0x00200000 // /usr/x86_64-w64-mingw32/include/wingdi.h:881:1: NTM_ITALIC = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:874:1: NTM_MULTIPLEMASTER = 0x00080000 // /usr/x86_64-w64-mingw32/include/wingdi.h:879:1: NTM_NONNEGATIVE_AC = 0x00010000 // /usr/x86_64-w64-mingw32/include/wingdi.h:876:1: NTM_PS_OPENTYPE = 0x00020000 // /usr/x86_64-w64-mingw32/include/wingdi.h:877:1: NTM_REGULAR = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:872:1: NTM_TT_OPENTYPE = 0x00040000 // /usr/x86_64-w64-mingw32/include/wingdi.h:878:1: NTM_TYPE1 = 0x00100000 // /usr/x86_64-w64-mingw32/include/wingdi.h:880:1: NULLREGION = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:76:1: NULL_BRUSH = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1443:1: NULL_PEN = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1447:1: NUMBRUSHES = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1519:1: NUMCOLORS = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:1523:1: NUMFONTS = 22 // /usr/x86_64-w64-mingw32/include/wingdi.h:1522:1: NUMLOCK_ON = 0x20 // /usr/x86_64-w64-mingw32/include/wincon.h:49:1: NUMMARKERS = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:1521:1: NUMPENS = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:1520:1: NUMPRS_CURRENCY = 0x0400 // /usr/x86_64-w64-mingw32/include/oleauto.h:441:1: NUMPRS_DECIMAL = 0x0100 // /usr/x86_64-w64-mingw32/include/oleauto.h:439:1: NUMPRS_EXPONENT = 0x0800 // /usr/x86_64-w64-mingw32/include/oleauto.h:442:1: NUMPRS_HEX_OCT = 0x0040 // /usr/x86_64-w64-mingw32/include/oleauto.h:437:1: NUMPRS_INEXACT = 0x20000 // /usr/x86_64-w64-mingw32/include/oleauto.h:447:1: NUMPRS_LEADING_MINUS = 0x0010 // /usr/x86_64-w64-mingw32/include/oleauto.h:435:1: NUMPRS_LEADING_PLUS = 0x0004 // /usr/x86_64-w64-mingw32/include/oleauto.h:433:1: NUMPRS_LEADING_WHITE = 0x0001 // /usr/x86_64-w64-mingw32/include/oleauto.h:431:1: NUMPRS_NEG = 0x10000 // /usr/x86_64-w64-mingw32/include/oleauto.h:446:1: NUMPRS_PARENS = 0x0080 // /usr/x86_64-w64-mingw32/include/oleauto.h:438:1: NUMPRS_STD = 0x1FFF // /usr/x86_64-w64-mingw32/include/oleauto.h:444:1: NUMPRS_THOUSANDS = 0x0200 // /usr/x86_64-w64-mingw32/include/oleauto.h:440:1: NUMPRS_TRAILING_MINUS = 0x0020 // /usr/x86_64-w64-mingw32/include/oleauto.h:436:1: NUMPRS_TRAILING_PLUS = 0x0008 // /usr/x86_64-w64-mingw32/include/oleauto.h:434:1: NUMPRS_TRAILING_WHITE = 0x0002 // /usr/x86_64-w64-mingw32/include/oleauto.h:432:1: NUMPRS_USE_ALL = 0x1000 // /usr/x86_64-w64-mingw32/include/oleauto.h:443:1: NUMRESERVED = 106 // /usr/x86_64-w64-mingw32/include/wingdi.h:1539:1: NUM_DISCHARGE_POLICIES = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:5895:1: N_BTMASK = 0x000F // /usr/x86_64-w64-mingw32/include/winnt.h:6628:1: N_BTSHFT = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:6632:1: N_OR_COST = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147050:1: N_SORT_BUCKET = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:51109:1: N_STATEMENT = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:199441:3: N_TMASK = 0x0030 // /usr/x86_64-w64-mingw32/include/winnt.h:6629:1: N_TMASK1 = 0x00C0 // /usr/x86_64-w64-mingw32/include/winnt.h:6630:1: N_TMASK2 = 0x00F0 // /usr/x86_64-w64-mingw32/include/winnt.h:6631:1: N_TSHIFT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:6633:1: OBJECT_INHERIT_ACE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3336:1: OBJ_BITMAP = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:432:1: OBJ_BRUSH = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:427:1: OBJ_COLORSPACE = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:439:1: OBJ_DC = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:428:1: OBJ_ENHMETADC = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:437:1: OBJ_ENHMETAFILE = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:438:1: OBJ_EXTPEN = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:436:1: OBJ_FONT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:431:1: OBJ_MEMDC = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:435:1: OBJ_METADC = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:429:1: OBJ_METAFILE = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:434:1: OBJ_PAL = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:430:1: OBJ_PEN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:426:1: OBJ_REGION = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:433:1: OBSOLETE_DISK_GET_WRITE_CACHE_STATE = 475356 // /usr/x86_64-w64-mingw32/include/winioctl.h:484:1: OBSOLETE_IOCTL_STORAGE_RESET_BUS = 3002368 // /usr/x86_64-w64-mingw32/include/winioctl.h:191:1: OBSOLETE_IOCTL_STORAGE_RESET_DEVICE = 3002372 // /usr/x86_64-w64-mingw32/include/winioctl.h:192:1: OCSP_BASIC_BY_KEY_RESPONDER_ID = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2691:1: OCSP_BASIC_BY_NAME_RESPONDER_ID = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2690:1: OCSP_BASIC_GOOD_CERT_STATUS = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2671:1: OCSP_BASIC_RESPONSE_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2689:1: OCSP_BASIC_REVOKED_CERT_STATUS = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2672:1: OCSP_BASIC_UNKNOWN_CERT_STATUS = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2673:1: OCSP_INTERNAL_ERROR_RESPONSE = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2642:1: OCSP_MALFORMED_REQUEST_RESPONSE = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2641:1: OCSP_REQUEST_V1 = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2632:1: OCSP_SIG_REQUIRED_RESPONSE = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2644:1: OCSP_SUCCESSFUL_RESPONSE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2640:1: OCSP_TRY_LATER_RESPONSE = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2643:1: OCSP_UNAUTHORIZED_RESPONSE = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2645:1: ODA_DRAWENTIRE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1903:1: ODA_FOCUS = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1905:1: ODA_SELECT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1904:1: ODDPARITY = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:470:1: ODS_CHECKED = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1910:1: ODS_COMBOBOXEDIT = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:1913:1: ODS_DEFAULT = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1912:1: ODS_DISABLED = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1909:1: ODS_FOCUS = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1911:1: ODS_GRAYED = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1908:1: ODS_HOTLIGHT = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:1914:1: ODS_INACTIVE = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:1915:1: ODS_NOACCEL = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:1916:1: ODS_NOFOCUSRECT = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1917:1: ODS_SELECTED = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1907:1: ODT_BUTTON = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1900:1: ODT_COMBOBOX = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1899:1: ODT_LISTBOX = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1898:1: ODT_MENU = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1897:1: ODT_STATIC = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1901:1: OEM_CHARSET = 255 // /usr/x86_64-w64-mingw32/include/wingdi.h:1164:1: OEM_FIXED_FONT = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1448:1: OE_Abort = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17712:1: OE_Cascade = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17720:1: OE_Default = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17721:1: OE_Fail = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17713:1: OE_Ignore = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17714:1: OE_None = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17710:1: OE_Replace = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17715:1: OE_Restrict = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17717:1: OE_Rollback = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17711:1: OE_SetDflt = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17719:1: OE_SetNull = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17718:1: OE_Update = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17716:1: OFFLINE_STATUS_INCOMPLETE = 0x0004 // /usr/x86_64-w64-mingw32/include/shellapi.h:804:1: OFFLINE_STATUS_LOCAL = 0x0001 // /usr/x86_64-w64-mingw32/include/shellapi.h:802:1: OFFLINE_STATUS_REMOTE = 0x0002 // /usr/x86_64-w64-mingw32/include/shellapi.h:803:1: OFN_ALLOWMULTISELECT = 0x200 // /usr/x86_64-w64-mingw32/include/commdlg.h:183:1: OFN_CREATEPROMPT = 0x2000 // /usr/x86_64-w64-mingw32/include/commdlg.h:187:1: OFN_DONTADDTORECENT = 0x2000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:198:1: OFN_ENABLEHOOK = 0x20 // /usr/x86_64-w64-mingw32/include/commdlg.h:179:1: OFN_ENABLEINCLUDENOTIFY = 0x400000 // /usr/x86_64-w64-mingw32/include/commdlg.h:196:1: OFN_ENABLESIZING = 0x800000 // /usr/x86_64-w64-mingw32/include/commdlg.h:197:1: OFN_ENABLETEMPLATE = 0x40 // /usr/x86_64-w64-mingw32/include/commdlg.h:180:1: OFN_ENABLETEMPLATEHANDLE = 0x80 // /usr/x86_64-w64-mingw32/include/commdlg.h:181:1: OFN_EXPLORER = 0x80000 // /usr/x86_64-w64-mingw32/include/commdlg.h:193:1: OFN_EXTENSIONDIFFERENT = 0x400 // /usr/x86_64-w64-mingw32/include/commdlg.h:184:1: OFN_EX_NOPLACESBAR = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:200:1: OFN_FILEMUSTEXIST = 0x1000 // /usr/x86_64-w64-mingw32/include/commdlg.h:186:1: OFN_FORCESHOWHIDDEN = 0x10000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:199:1: OFN_HIDEREADONLY = 0x4 // /usr/x86_64-w64-mingw32/include/commdlg.h:176:1: OFN_LONGNAMES = 0x200000 // /usr/x86_64-w64-mingw32/include/commdlg.h:195:1: OFN_NOCHANGEDIR = 0x8 // /usr/x86_64-w64-mingw32/include/commdlg.h:177:1: OFN_NODEREFERENCELINKS = 0x100000 // /usr/x86_64-w64-mingw32/include/commdlg.h:194:1: OFN_NOLONGNAMES = 0x40000 // /usr/x86_64-w64-mingw32/include/commdlg.h:192:1: OFN_NONETWORKBUTTON = 0x20000 // /usr/x86_64-w64-mingw32/include/commdlg.h:191:1: OFN_NOREADONLYRETURN = 0x8000 // /usr/x86_64-w64-mingw32/include/commdlg.h:189:1: OFN_NOTESTFILECREATE = 0x10000 // /usr/x86_64-w64-mingw32/include/commdlg.h:190:1: OFN_NOVALIDATE = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:182:1: OFN_OVERWRITEPROMPT = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:175:1: OFN_PATHMUSTEXIST = 0x800 // /usr/x86_64-w64-mingw32/include/commdlg.h:185:1: OFN_READONLY = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:174:1: OFN_SHAREAWARE = 0x4000 // /usr/x86_64-w64-mingw32/include/commdlg.h:188:1: OFN_SHAREFALLTHROUGH = 2 // /usr/x86_64-w64-mingw32/include/commdlg.h:201:1: OFN_SHARENOWARN = 1 // /usr/x86_64-w64-mingw32/include/commdlg.h:202:1: OFN_SHAREWARN = 0 // /usr/x86_64-w64-mingw32/include/commdlg.h:203:1: OFN_SHOWHELP = 0x10 // /usr/x86_64-w64-mingw32/include/commdlg.h:178:1: OFS_MAXPATHNAME = 128 // /usr/x86_64-w64-mingw32/include/winbase.h:618:1: OF_CANCEL = 0x800 // /usr/x86_64-w64-mingw32/include/winbase.h:612:1: OF_CREATE = 0x1000 // /usr/x86_64-w64-mingw32/include/winbase.h:613:1: OF_DELETE = 0x200 // /usr/x86_64-w64-mingw32/include/winbase.h:610:1: OF_EXIST = 0x4000 // /usr/x86_64-w64-mingw32/include/winbase.h:615:1: OF_PARSE = 0x100 // /usr/x86_64-w64-mingw32/include/winbase.h:609:1: OF_PROMPT = 0x2000 // /usr/x86_64-w64-mingw32/include/winbase.h:614:1: OF_READ = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:601:1: OF_READWRITE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:603:1: OF_REOPEN = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:616:1: OF_SHARE_COMPAT = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:604:1: OF_SHARE_DENY_NONE = 0x40 // /usr/x86_64-w64-mingw32/include/winbase.h:608:1: OF_SHARE_DENY_READ = 0x30 // /usr/x86_64-w64-mingw32/include/winbase.h:607:1: OF_SHARE_DENY_WRITE = 0x20 // /usr/x86_64-w64-mingw32/include/winbase.h:606:1: OF_SHARE_EXCLUSIVE = 0x10 // /usr/x86_64-w64-mingw32/include/winbase.h:605:1: OF_VERIFY = 0x400 // /usr/x86_64-w64-mingw32/include/winbase.h:611:1: OF_WRITE = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:602:1: OLD_P_OVERLAY = 2 // /usr/x86_64-w64-mingw32/include/process.h:149:1: OLECREATE_LEAVERUNNING = 0x1 // /usr/x86_64-w64-mingw32/include/ole2.h:36:1: OLEIVERB_DISCARDUNDOSTATE = -6 // /usr/x86_64-w64-mingw32/include/ole2.h:29:1: OLEIVERB_HIDE = -3 // /usr/x86_64-w64-mingw32/include/ole2.h:26:1: OLEIVERB_INPLACEACTIVATE = -5 // /usr/x86_64-w64-mingw32/include/ole2.h:28:1: OLEIVERB_OPEN = -2 // /usr/x86_64-w64-mingw32/include/ole2.h:25:1: OLEIVERB_PRIMARY = 0 // /usr/x86_64-w64-mingw32/include/ole2.h:23:1: OLEIVERB_SHOW = -1 // /usr/x86_64-w64-mingw32/include/ole2.h:24:1: OLEIVERB_UIACTIVATE = -4 // /usr/x86_64-w64-mingw32/include/ole2.h:27:1: OLEOBJ_E_FIRST = 2147746176 // /usr/x86_64-w64-mingw32/include/winerror.h:2408:1: OLEOBJ_E_LAST = 2147746191 // /usr/x86_64-w64-mingw32/include/winerror.h:2409:1: OLEOBJ_S_FIRST = 262528 // /usr/x86_64-w64-mingw32/include/winerror.h:2410:1: OLEOBJ_S_LAST = 262543 // /usr/x86_64-w64-mingw32/include/winerror.h:2411:1: OMIT_TEMPDB = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14060:1: ONE5STOPBITS = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:476:1: ONEPASS_MULTI = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19866:1: ONEPASS_OFF = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19864:1: ONEPASS_SINGLE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19865:1: ONESTOPBIT = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:475:1: OPAQUE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1410:1: OPAQUEKEYBLOB = 0x9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:356:1: OPENCHANNEL = 4110 // /usr/x86_64-w64-mingw32/include/wingdi.h:308:1: OPEN_ALWAYS = 4 // /usr/x86_64-w64-mingw32/include/fileapi.h:21:1: OPEN_EXISTING = 3 // /usr/x86_64-w64-mingw32/include/fileapi.h:20:1: OPFLAG_APPEND = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18964:1: OPFLAG_AUXDELETE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18975:1: OPFLAG_BULKCSR = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18969:1: OPFLAG_EPHEM = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18961:1: OPFLAG_FORDELETE = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18971:1: OPFLAG_ISNOOP = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18966:1: OPFLAG_ISUPDATE = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18963:1: OPFLAG_LASTROWID = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18962:1: OPFLAG_LENGTHARG = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18967:1: OPFLAG_NCHANGE = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18958:1: OPFLAG_NOCHNG = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18960:1: OPFLAG_NOCHNG_MAGIC = 0x6d // testdata/sqlite-amalgamation-3380500/sqlite3.c:18976:1: OPFLAG_P2ISREG = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18972:1: OPFLAG_PERMUTE = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18973:1: OPFLAG_PREFORMAT = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18977:1: OPFLAG_SAVEPOSITION = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18974:1: OPFLAG_SEEKEQ = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18970:1: OPFLAG_TYPEOFARG = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18968:1: OPFLAG_USESEEKRESULT = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18965:1: OPFLG_IN1 = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15700:1: OPFLG_IN2 = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15701:1: OPFLG_IN3 = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15702:1: OPFLG_JUMP = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15699:1: OPFLG_OUT2 = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15703:1: OPFLG_OUT3 = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15704:1: OPTIONAL = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:65:1: OP_Abortable = 184 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15693:1: OP_Add = 106 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15615:1: OP_AddImm = 85 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15594:1: OP_Affinity = 95 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15604:1: OP_AggFinal = 164 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15673:1: OP_AggInverse = 160 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15669:1: OP_AggStep = 161 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15670:1: OP_AggStep1 = 162 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15671:1: OP_AggValue = 163 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15672:1: OP_And = 44 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15553:1: OP_AutoCommit = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15510:1: OP_BitAnd = 102 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15611:1: OP_BitNot = 114 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15623:1: OP_BitOr = 103 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15612:1: OP_Blob = 76 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15585:1: OP_Cast = 87 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15596:1: OP_Checkpoint = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15515:1: OP_Clear = 144 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15653:1: OP_Close = 121 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15630:1: OP_CollSeq = 84 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15593:1: OP_Column = 93 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15602:1: OP_ColumnsUsed = 122 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15631:1: OP_Compare = 89 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15598:1: OP_Concat = 111 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15620:1: OP_Copy = 79 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15588:1: OP_Count = 97 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15606:1: OP_CreateBtree = 146 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15655:1: OP_CursorHint = 180 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15689:1: OP_CursorLock = 166 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15675:1: OP_CursorUnlock = 167 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15676:1: OP_DecrJumpZero = 60 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15569:1: OP_DeferredSeek = 140 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15649:1: OP_Delete = 129 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15638:1: OP_Destroy = 143 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15652:1: OP_Divide = 109 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15618:1: OP_DropIndex = 151 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15660:1: OP_DropTable = 150 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15659:1: OP_DropTrigger = 152 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15661:1: OP_ElseEq = 58 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15567:1: OP_EndCoroutine = 68 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15577:1: OP_Eq = 53 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15562:1: OP_Expire = 165 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15674:1: OP_Explain = 183 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15692:1: OP_Filter = 63 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15572:1: OP_FilterAdd = 178 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15687:1: OP_FinishSeek = 142 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15651:1: OP_FkCheck = 82 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15591:1: OP_FkCounter = 157 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15666:1: OP_FkIfZero = 48 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15557:1: OP_Found = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15540:1: OP_Function = 66 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15575:1: OP_Ge = 57 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15566:1: OP_Gosub = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15521:1: OP_Goto = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15520:1: OP_Gt = 54 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15563:1: OP_Halt = 70 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15579:1: OP_HaltIfNull = 69 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15578:1: OP_IdxDelete = 139 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15648:1: OP_IdxGE = 42 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15551:1: OP_IdxGT = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15549:1: OP_IdxInsert = 137 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15646:1: OP_IdxLE = 39 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15548:1: OP_IdxLT = 41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15550:1: OP_IdxRowid = 141 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15650:1: OP_If = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15527:1: OP_IfNoHope = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15537:1: OP_IfNot = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15529:1: OP_IfNotOpen = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15536:1: OP_IfNotZero = 59 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15568:1: OP_IfNullRow = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15531:1: OP_IfPos = 49 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15558:1: OP_IfSmaller = 35 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15544:1: OP_IncrVacuum = 61 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15570:1: OP_Init = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15573:1: OP_InitCoroutine = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15522:1: OP_Insert = 127 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15636:1: OP_Int64 = 72 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15581:1: OP_IntCopy = 81 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15590:1: OP_Integer = 71 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15580:1: OP_IntegrityCk = 154 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15663:1: OP_IsNull = 50 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15559:1: OP_IsNullOrType = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15530:1: OP_IsTrue = 90 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15599:1: OP_JournalMode = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15516:1: OP_Jump = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15525:1: OP_Last = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15543:1: OP_Le = 55 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15564:1: OP_LoadAnalysis = 149 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15658:1: OP_Lt = 56 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15565:1: OP_MakeRecord = 96 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15605:1: OP_MaxPgcnt = 177 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15686:1: OP_MemMax = 158 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15667:1: OP_Move = 78 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15587:1: OP_Multiply = 108 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15617:1: OP_MustBeInt = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15524:1: OP_Ne = 52 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15561:1: OP_NewRowid = 126 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15635:1: OP_Next = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15514:1: OP_NoConflict = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15538:1: OP_Noop = 182 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15691:1: OP_Not = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15528:1: OP_NotExists = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15542:1: OP_NotFound = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15539:1: OP_NotNull = 51 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15560:1: OP_Null = 74 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15583:1: OP_NullRow = 135 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15644:1: OP_Offset = 92 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15601:1: OP_OffsetLimit = 159 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15668:1: OP_Once = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15526:1: OP_OpenAutoindex = 115 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15624:1: OP_OpenDup = 113 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15622:1: OP_OpenEphemeral = 116 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15625:1: OP_OpenPseudo = 120 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15629:1: OP_OpenRead = 101 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15610:1: OP_OpenWrite = 112 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15621:1: OP_Or = 43 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15552:1: OP_Pagecount = 176 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15685:1: OP_Param = 156 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15665:1: OP_ParseSchema = 148 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15657:1: OP_Permutation = 88 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15597:1: OP_Prev = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15513:1: OP_Program = 47 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15556:1: OP_PureFunc = 65 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15574:1: OP_ReadCookie = 98 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15607:1: OP_Real = 153 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15662:1: OP_RealAffinity = 86 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15595:1: OP_ReleaseReg = 181 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15690:1: OP_Remainder = 110 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15619:1: OP_ReopenIdx = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15609:1: OP_ResetCount = 130 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15639:1: OP_ResetSorter = 145 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15654:1: OP_ResultRow = 83 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15592:1: OP_Return = 67 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15576:1: OP_Rewind = 38 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15547:1: OP_RowCell = 128 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15637:1: OP_RowData = 133 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15642:1: OP_RowSetAdd = 155 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15664:1: OP_RowSetRead = 45 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15554:1: OP_RowSetTest = 46 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15555:1: OP_Rowid = 134 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15643:1: OP_SCopy = 80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15589:1: OP_Savepoint = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15509:1: OP_SeekEnd = 136 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15645:1: OP_SeekGE = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15534:1: OP_SeekGT = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15535:1: OP_SeekHit = 124 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15633:1: OP_SeekLE = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15533:1: OP_SeekLT = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15532:1: OP_SeekRowid = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15541:1: OP_SeekScan = 123 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15632:1: OP_Sequence = 125 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15634:1: OP_SequenceTest = 119 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15628:1: OP_SetCookie = 99 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15608:1: OP_ShiftLeft = 104 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15613:1: OP_ShiftRight = 105 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15614:1: OP_SoftNull = 75 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15584:1: OP_Sort = 37 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15546:1: OP_SorterCompare = 131 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15640:1: OP_SorterData = 132 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15641:1: OP_SorterInsert = 138 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15647:1: OP_SorterNext = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15512:1: OP_SorterOpen = 118 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15627:1: OP_SorterSort = 36 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15545:1: OP_SqlExec = 147 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15656:1: OP_String = 73 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15582:1: OP_String8 = 117 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15626:1: OP_Subtract = 107 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15616:1: OP_TableLock = 168 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15677:1: OP_Trace = 179 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15688:1: OP_Transaction = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15511:1: OP_TypeCheck = 94 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15603:1: OP_VBegin = 169 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15678:1: OP_VColumn = 174 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15683:1: OP_VCreate = 170 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15679:1: OP_VDestroy = 171 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15680:1: OP_VFilter = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15518:1: OP_VInitIn = 173 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15682:1: OP_VNext = 62 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15571:1: OP_VOpen = 172 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15681:1: OP_VRename = 175 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15684:1: OP_VUpdate = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15519:1: OP_Vacuum = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15517:1: OP_Variable = 77 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15586:1: OP_Yield = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15523:1: OP_ZeroOrNull = 91 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15600:1: ORD_LANGDRIVER = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4321:1: OR_INVALID_OID = 1911 // /usr/x86_64-w64-mingw32/include/winerror.h:834:1: OR_INVALID_OXID = 1910 // /usr/x86_64-w64-mingw32/include/winerror.h:833:1: OR_INVALID_SET = 1912 // /usr/x86_64-w64-mingw32/include/winerror.h:835:1: OSVERSION_MASK = 0xFFFF0000 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:151:1: OS_VXWORKS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:163:1: OUT = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:61:1: OUTPUT_DEBUG_STRING_EVENT = 8 // /usr/x86_64-w64-mingw32/include/minwinbase.h:231:1: OUT_CHARACTER_PRECIS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1121:1: OUT_DEFAULT_PRECIS = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1119:1: OUT_DEVICE_PRECIS = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1124:1: OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME = "OutOfProcessFunctionTableCallback" // /usr/x86_64-w64-mingw32/include/winnt.h:1783:1: OUT_OUTLINE_PRECIS = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1127:1: OUT_PS_ONLY_PRECIS = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1129:1: OUT_RASTER_PRECIS = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1125:1: OUT_SCREEN_OUTLINE_PRECIS = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1128:1: OUT_STRING_PRECIS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1120:1: OUT_STROKE_PRECIS = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1122:1: OUT_TT_ONLY_PRECIS = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1126:1: OUT_TT_PRECIS = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1123:1: OVERFLOW = 3 // /usr/x86_64-w64-mingw32/include/math.h:31:1: OVERWRITE_HIDDEN = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:1398:1: OWNER_SECURITY_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4010:1: P4_ADVANCE = -5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15453:1: P4_COLLSEQ = -2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15450:1: P4_DYNAMIC = -7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15457:1: P4_DYNBLOB = -17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15467:1: P4_EXPR = -10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15460:1: P4_FREE_IF_LE = -7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15456:1: P4_FUNCCTX = -16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15466:1: P4_FUNCDEF = -8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15458:1: P4_INT32 = -3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15451:1: P4_INT64 = -14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15464:1: P4_INTARRAY = -15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15465:1: P4_KEYINFO = -9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15459:1: P4_MEM = -11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15461:1: P4_NOTUSED = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15447:1: P4_REAL = -13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15463:1: P4_STATIC = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15449:1: P4_SUBPROGRAM = -4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15452:1: P4_TABLE = -6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15454:1: P4_TRANSIENT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15448:1: P4_VTAB = -12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15462:1: P5_ConstraintCheck = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15472:1: P5_ConstraintFK = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15473:1: P5_ConstraintNotNull = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15470:1: P5_ConstraintUnique = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15471:1: PAGER_CACHESPILL = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14778:1: PAGER_CKPT_FULLFSYNC = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14777:1: PAGER_ERROR = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53574:1: PAGER_FLAGS_MASK = 0x38 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14779:1: PAGER_FULLFSYNC = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14776:1: PAGER_GET_NOCONTENT = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14760:1: PAGER_GET_READONLY = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14761:1: PAGER_JOURNALMODE_DELETE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14750:1: PAGER_JOURNALMODE_MEMORY = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14754:1: PAGER_JOURNALMODE_OFF = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14752:1: PAGER_JOURNALMODE_PERSIST = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14751:1: PAGER_JOURNALMODE_QUERY = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14749:1: PAGER_JOURNALMODE_TRUNCATE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14753:1: PAGER_JOURNALMODE_WAL = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14755:1: PAGER_LOCKINGMODE_EXCLUSIVE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14740:1: PAGER_LOCKINGMODE_NORMAL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14739:1: PAGER_LOCKINGMODE_QUERY = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14738:1: PAGER_MEMORY = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14733:1: PAGER_OMIT_JOURNAL = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14732:1: PAGER_OPEN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53568:1: PAGER_READER = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53569:1: PAGER_STAT_HIT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53926:1: PAGER_STAT_MISS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53927:1: PAGER_STAT_SPILL = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53929:1: PAGER_STAT_WRITE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53928:1: PAGER_SYNCHRONOUS_EXTRA = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14774:1: PAGER_SYNCHRONOUS_FULL = 0x03 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14773:1: PAGER_SYNCHRONOUS_MASK = 0x07 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14775:1: PAGER_SYNCHRONOUS_NORMAL = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14772:1: PAGER_SYNCHRONOUS_OFF = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14771:1: PAGER_WRITER_CACHEMOD = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53571:1: PAGER_WRITER_DBMOD = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53572:1: PAGER_WRITER_FINISHED = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53573:1: PAGER_WRITER_LOCKED = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53570:1: PAGESETUPDLGORD = 1546 // /usr/x86_64-w64-mingw32/include/dlgs.h:187:1: PAGESETUPDLGORDMOTIF = 1550 // /usr/x86_64-w64-mingw32/include/dlgs.h:190:1: PAGE_ENCLAVE_DECOMMIT = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4876:1: PAGE_ENCLAVE_THREAD_CONTROL = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4871:1: PAGE_ENCLAVE_UNVALIDATED = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4875:1: PAGE_EXECUTE = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:4857:1: PAGE_EXECUTE_READ = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:4858:1: PAGE_EXECUTE_READWRITE = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:4859:1: PAGE_EXECUTE_WRITECOPY = 0x80 // /usr/x86_64-w64-mingw32/include/winnt.h:4860:1: PAGE_GRAPHICS_COHERENT = 0x20000 // /usr/x86_64-w64-mingw32/include/winnt.h:4870:1: PAGE_GRAPHICS_EXECUTE = 0x4000 // /usr/x86_64-w64-mingw32/include/winnt.h:4867:1: PAGE_GRAPHICS_EXECUTE_READ = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:4868:1: PAGE_GRAPHICS_EXECUTE_READWRITE = 0x10000 // /usr/x86_64-w64-mingw32/include/winnt.h:4869:1: PAGE_GRAPHICS_NOACCESS = 0x0800 // /usr/x86_64-w64-mingw32/include/winnt.h:4864:1: PAGE_GRAPHICS_READONLY = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:4865:1: PAGE_GRAPHICS_READWRITE = 0x2000 // /usr/x86_64-w64-mingw32/include/winnt.h:4866:1: PAGE_GUARD = 0x100 // /usr/x86_64-w64-mingw32/include/winnt.h:4861:1: PAGE_NOACCESS = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:4853:1: PAGE_NOCACHE = 0x200 // /usr/x86_64-w64-mingw32/include/winnt.h:4862:1: PAGE_READONLY = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:4854:1: PAGE_READWRITE = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:4855:1: PAGE_REVERT_TO_FILE_MAP = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4872:1: PAGE_TARGETS_INVALID = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4874:1: PAGE_TARGETS_NO_UPDATE = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4873:1: PAGE_WRITECOMBINE = 0x400 // /usr/x86_64-w64-mingw32/include/winnt.h:4863:1: PAGE_WRITECOPY = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:4856:1: PANOSE_COUNT = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1222:1: PAN_ANY = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1250:1: PAN_ARMSTYLE_INDEX = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1229:1: PAN_BENT_ARMS_DOUBLE_SERIF = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1319:1: PAN_BENT_ARMS_HORZ = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1315:1: PAN_BENT_ARMS_SINGLE_SERIF = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1318:1: PAN_BENT_ARMS_VERT = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1317:1: PAN_BENT_ARMS_WEDGE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1316:1: PAN_CONTRAST_HIGH = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1299:1: PAN_CONTRAST_INDEX = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1227:1: PAN_CONTRAST_LOW = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1295:1: PAN_CONTRAST_MEDIUM = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1297:1: PAN_CONTRAST_MEDIUM_HIGH = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1298:1: PAN_CONTRAST_MEDIUM_LOW = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1296:1: PAN_CONTRAST_NONE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1293:1: PAN_CONTRAST_VERY_HIGH = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1300:1: PAN_CONTRAST_VERY_LOW = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1294:1: PAN_CULTURE_LATIN = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1234:1: PAN_FAMILYTYPE_INDEX = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1223:1: PAN_FAMILY_DECORATIVE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1255:1: PAN_FAMILY_PICTORIAL = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1256:1: PAN_FAMILY_SCRIPT = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1254:1: PAN_FAMILY_TEXT_DISPLAY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1253:1: PAN_LETTERFORM_INDEX = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1230:1: PAN_LETT_NORMAL_BOXED = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1323:1: PAN_LETT_NORMAL_CONTACT = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1321:1: PAN_LETT_NORMAL_FLATTENED = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1324:1: PAN_LETT_NORMAL_OFF_CENTER = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1326:1: PAN_LETT_NORMAL_ROUNDED = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1325:1: PAN_LETT_NORMAL_SQUARE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1327:1: PAN_LETT_NORMAL_WEIGHTED = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1322:1: PAN_LETT_OBLIQUE_BOXED = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1330:1: PAN_LETT_OBLIQUE_CONTACT = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1328:1: PAN_LETT_OBLIQUE_FLATTENED = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1331:1: PAN_LETT_OBLIQUE_OFF_CENTER = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1333:1: PAN_LETT_OBLIQUE_ROUNDED = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:1332:1: PAN_LETT_OBLIQUE_SQUARE = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1334:1: PAN_LETT_OBLIQUE_WEIGHTED = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1329:1: PAN_MIDLINE_CONSTANT_POINTED = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1343:1: PAN_MIDLINE_CONSTANT_SERIFED = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1344:1: PAN_MIDLINE_CONSTANT_TRIMMED = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1342:1: PAN_MIDLINE_HIGH_POINTED = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1340:1: PAN_MIDLINE_HIGH_SERIFED = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1341:1: PAN_MIDLINE_HIGH_TRIMMED = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1339:1: PAN_MIDLINE_INDEX = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1231:1: PAN_MIDLINE_LOW_POINTED = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1346:1: PAN_MIDLINE_LOW_SERIFED = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:1347:1: PAN_MIDLINE_LOW_TRIMMED = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1345:1: PAN_MIDLINE_STANDARD_POINTED = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1337:1: PAN_MIDLINE_STANDARD_SERIFED = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1338:1: PAN_MIDLINE_STANDARD_TRIMMED = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1336:1: PAN_NO_FIT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1251:1: PAN_PROPORTION_INDEX = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1226:1: PAN_PROP_CONDENSED = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1288:1: PAN_PROP_EVEN_WIDTH = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1286:1: PAN_PROP_EXPANDED = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1287:1: PAN_PROP_MODERN = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1285:1: PAN_PROP_MONOSPACED = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1291:1: PAN_PROP_OLD_STYLE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1284:1: PAN_PROP_VERY_CONDENSED = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1290:1: PAN_PROP_VERY_EXPANDED = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1289:1: PAN_SERIFSTYLE_INDEX = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1224:1: PAN_SERIF_BONE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1264:1: PAN_SERIF_COVE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1258:1: PAN_SERIF_EXAGGERATED = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1265:1: PAN_SERIF_FLARED = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1270:1: PAN_SERIF_NORMAL_SANS = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1267:1: PAN_SERIF_OBTUSE_COVE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1259:1: PAN_SERIF_OBTUSE_SANS = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:1268:1: PAN_SERIF_OBTUSE_SQUARE_COVE = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1261:1: PAN_SERIF_PERP_SANS = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:1269:1: PAN_SERIF_ROUNDED = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:1271:1: PAN_SERIF_SQUARE = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1262:1: PAN_SERIF_SQUARE_COVE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1260:1: PAN_SERIF_THIN = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1263:1: PAN_SERIF_TRIANGLE = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1266:1: PAN_STRAIGHT_ARMS_DOUBLE_SERIF = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1314:1: PAN_STRAIGHT_ARMS_HORZ = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1310:1: PAN_STRAIGHT_ARMS_SINGLE_SERIF = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1313:1: PAN_STRAIGHT_ARMS_VERT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1312:1: PAN_STRAIGHT_ARMS_WEDGE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1311:1: PAN_STROKEVARIATION_INDEX = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1228:1: PAN_STROKE_GRADUAL_DIAG = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1302:1: PAN_STROKE_GRADUAL_HORZ = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1305:1: PAN_STROKE_GRADUAL_TRAN = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1303:1: PAN_STROKE_GRADUAL_VERT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1304:1: PAN_STROKE_INSTANT_VERT = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1308:1: PAN_STROKE_RAPID_HORZ = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1307:1: PAN_STROKE_RAPID_VERT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1306:1: PAN_WEIGHT_BLACK = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1281:1: PAN_WEIGHT_BOLD = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1279:1: PAN_WEIGHT_BOOK = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1276:1: PAN_WEIGHT_DEMI = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1278:1: PAN_WEIGHT_HEAVY = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1280:1: PAN_WEIGHT_INDEX = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1225:1: PAN_WEIGHT_LIGHT = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1274:1: PAN_WEIGHT_MEDIUM = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1277:1: PAN_WEIGHT_NORD = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:1282:1: PAN_WEIGHT_THIN = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1275:1: PAN_WEIGHT_VERY_LIGHT = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1273:1: PAN_XHEIGHT_CONSTANT_LARGE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1351:1: PAN_XHEIGHT_CONSTANT_SMALL = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1349:1: PAN_XHEIGHT_CONSTANT_STD = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1350:1: PAN_XHEIGHT_DUCKING_LARGE = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1354:1: PAN_XHEIGHT_DUCKING_SMALL = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1352:1: PAN_XHEIGHT_DUCKING_STD = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1353:1: PAN_XHEIGHT_INDEX = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:1232:1: PARAMFLAG_FHASCUSTDATA = 64 // /usr/x86_64-w64-mingw32/include/oaidl.h:693:1: PARAMFLAG_FHASDEFAULT = 32 // /usr/x86_64-w64-mingw32/include/oaidl.h:691:1: PARAMFLAG_FIN = 1 // /usr/x86_64-w64-mingw32/include/oaidl.h:681:1: PARAMFLAG_FLCID = 4 // /usr/x86_64-w64-mingw32/include/oaidl.h:685:1: PARAMFLAG_FOPT = 16 // /usr/x86_64-w64-mingw32/include/oaidl.h:689:1: PARAMFLAG_FOUT = 2 // /usr/x86_64-w64-mingw32/include/oaidl.h:683:1: PARAMFLAG_FRETVAL = 8 // /usr/x86_64-w64-mingw32/include/oaidl.h:687:1: PARAMFLAG_NONE = 0 // /usr/x86_64-w64-mingw32/include/oaidl.h:679:1: PARSE_MODE_DECLARE_VTAB = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18903:1: PARSE_MODE_NORMAL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18902:1: PARSE_MODE_RENAME = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18904:1: PARSE_MODE_UNMAP = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18905:1: PARTITION_ENTRY_UNUSED = 0x00 // /usr/x86_64-w64-mingw32/include/winioctl.h:500:1: PARTITION_EXTENDED = 0x05 // /usr/x86_64-w64-mingw32/include/winioctl.h:505:1: PARTITION_FAT32 = 0x0B // /usr/x86_64-w64-mingw32/include/winioctl.h:509:1: PARTITION_FAT32_XINT13 = 0x0C // /usr/x86_64-w64-mingw32/include/winioctl.h:510:1: PARTITION_FAT_12 = 0x01 // /usr/x86_64-w64-mingw32/include/winioctl.h:501:1: PARTITION_FAT_16 = 0x04 // /usr/x86_64-w64-mingw32/include/winioctl.h:504:1: PARTITION_HUGE = 0x06 // /usr/x86_64-w64-mingw32/include/winioctl.h:506:1: PARTITION_IFS = 0x07 // /usr/x86_64-w64-mingw32/include/winioctl.h:507:1: PARTITION_LDM = 0x42 // /usr/x86_64-w64-mingw32/include/winioctl.h:514:1: PARTITION_NTFT = 0x80 // /usr/x86_64-w64-mingw32/include/winioctl.h:519:1: PARTITION_OS2BOOTMGR = 0x0A // /usr/x86_64-w64-mingw32/include/winioctl.h:508:1: PARTITION_PREP = 0x41 // /usr/x86_64-w64-mingw32/include/winioctl.h:513:1: PARTITION_UNIX = 0x63 // /usr/x86_64-w64-mingw32/include/winioctl.h:515:1: PARTITION_XENIX_1 = 0x02 // /usr/x86_64-w64-mingw32/include/winioctl.h:502:1: PARTITION_XENIX_2 = 0x03 // /usr/x86_64-w64-mingw32/include/winioctl.h:503:1: PARTITION_XINT13 = 0x0E // /usr/x86_64-w64-mingw32/include/winioctl.h:511:1: PARTITION_XINT13_EXTENDED = 0x0F // /usr/x86_64-w64-mingw32/include/winioctl.h:512:1: PARTLY_WITHIN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10802:1: PASCAL = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:109:1: PASSTHROUGH = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:253:1: PATH_MAX = 260 // /usr/x86_64-w64-mingw32/include/limits.h:20:1: PBTF_APMRESUMEFROMFAILURE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:1301:1: PBT_APMBATTERYLOW = 0x0009 // /usr/x86_64-w64-mingw32/include/winuser.h:1303:1: PBT_APMOEMEVENT = 0x000B // /usr/x86_64-w64-mingw32/include/winuser.h:1306:1: PBT_APMPOWERSTATUSCHANGE = 0x000A // /usr/x86_64-w64-mingw32/include/winuser.h:1304:1: PBT_APMQUERYSTANDBY = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1289:1: PBT_APMQUERYSTANDBYFAILED = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:1292:1: PBT_APMQUERYSUSPEND = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1288:1: PBT_APMQUERYSUSPENDFAILED = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1291:1: PBT_APMRESUMEAUTOMATIC = 0x0012 // /usr/x86_64-w64-mingw32/include/winuser.h:1307:1: PBT_APMRESUMECRITICAL = 0x0006 // /usr/x86_64-w64-mingw32/include/winuser.h:1297:1: PBT_APMRESUMESTANDBY = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1299:1: PBT_APMRESUMESUSPEND = 0x0007 // /usr/x86_64-w64-mingw32/include/winuser.h:1298:1: PBT_APMSTANDBY = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:1295:1: PBT_APMSUSPEND = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1294:1: PBT_POWERSETTINGCHANGE = 32787 // /usr/x86_64-w64-mingw32/include/winuser.h:1310:1: PCACHE1_MIGHT_USE_GROUP_MUTEX = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:51514:1: PCACHE_DIRTYLIST_ADD = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:50526:1: PCACHE_DIRTYLIST_FRONT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:50527:1: PCACHE_DIRTYLIST_REMOVE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:50525:1: PCLEANUI = 2214592512 // /usr/x86_64-w64-mingw32/include/reason.h:59:1: PC_EXPLICIT = 0x02 // /usr/x86_64-w64-mingw32/include/wingdi.h:1402:1: PC_INTERIORS = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1595:1: PC_NOCOLLAPSE = 0x04 // /usr/x86_64-w64-mingw32/include/wingdi.h:1403:1: PC_NONE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1586:1: PC_PATHS = 512 // /usr/x86_64-w64-mingw32/include/wingdi.h:1597:1: PC_POLYGON = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1587:1: PC_POLYPOLYGON = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:1596:1: PC_RECTANGLE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1588:1: PC_RESERVED = 0x01 // /usr/x86_64-w64-mingw32/include/wingdi.h:1401:1: PC_SCANLINE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1591:1: PC_STYLED = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1593:1: PC_TRAPEZOID = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1590:1: PC_WIDE = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1592:1: PC_WIDESTYLED = 64 // /usr/x86_64-w64-mingw32/include/wingdi.h:1594:1: PC_WINDPOLYGON = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1589:1: PDCAP_D0_SUPPORTED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5405:1: PDCAP_D1_SUPPORTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5406:1: PDCAP_D2_SUPPORTED = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5407:1: PDCAP_D3_SUPPORTED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:5408:1: PDCAP_WAKE_FROM_D0_SUPPORTED = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:5409:1: PDCAP_WAKE_FROM_D1_SUPPORTED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:5410:1: PDCAP_WAKE_FROM_D2_SUPPORTED = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:5411:1: PDCAP_WAKE_FROM_D3_SUPPORTED = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:5412:1: PDCAP_WARM_EJECT_SUPPORTED = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:5413:1: PDERR_CREATEICFAILURE = 0x100A // /usr/x86_64-w64-mingw32/include/cderr.h:35:1: PDERR_DEFAULTDIFFERENT = 0x100C // /usr/x86_64-w64-mingw32/include/cderr.h:37:1: PDERR_DNDMMISMATCH = 0x1009 // /usr/x86_64-w64-mingw32/include/cderr.h:34:1: PDERR_GETDEVMODEFAIL = 0x1005 // /usr/x86_64-w64-mingw32/include/cderr.h:30:1: PDERR_INITFAILURE = 0x1006 // /usr/x86_64-w64-mingw32/include/cderr.h:31:1: PDERR_LOADDRVFAILURE = 0x1004 // /usr/x86_64-w64-mingw32/include/cderr.h:29:1: PDERR_NODEFAULTPRN = 0x1008 // /usr/x86_64-w64-mingw32/include/cderr.h:33:1: PDERR_NODEVICES = 0x1007 // /usr/x86_64-w64-mingw32/include/cderr.h:32:1: PDERR_PARSEFAILURE = 0x1002 // /usr/x86_64-w64-mingw32/include/cderr.h:27:1: PDERR_PRINTERCODES = 0x1000 // /usr/x86_64-w64-mingw32/include/cderr.h:25:1: PDERR_PRINTERNOTFOUND = 0x100B // /usr/x86_64-w64-mingw32/include/cderr.h:36:1: PDERR_RETDEFFAILURE = 0x1003 // /usr/x86_64-w64-mingw32/include/cderr.h:28:1: PDERR_SETUPFAILURE = 0x1001 // /usr/x86_64-w64-mingw32/include/cderr.h:26:1: PDEVICESIZE = 26 // /usr/x86_64-w64-mingw32/include/wingdi.h:1524:1: PDIRTYUI = 2281701376 // /usr/x86_64-w64-mingw32/include/reason.h:61:1: PD_ALLPAGES = 0x0 // /usr/x86_64-w64-mingw32/include/commdlg.h:661:1: PD_COLLATE = 0x10 // /usr/x86_64-w64-mingw32/include/commdlg.h:666:1: PD_CURRENTPAGE = 0x400000 // /usr/x86_64-w64-mingw32/include/commdlg.h:685:1: PD_DISABLEPRINTTOFILE = 0x80000 // /usr/x86_64-w64-mingw32/include/commdlg.h:682:1: PD_ENABLEPRINTHOOK = 0x1000 // /usr/x86_64-w64-mingw32/include/commdlg.h:674:1: PD_ENABLEPRINTTEMPLATE = 0x4000 // /usr/x86_64-w64-mingw32/include/commdlg.h:676:1: PD_ENABLEPRINTTEMPLATEHANDLE = 0x10000 // /usr/x86_64-w64-mingw32/include/commdlg.h:678:1: PD_ENABLESETUPHOOK = 0x2000 // /usr/x86_64-w64-mingw32/include/commdlg.h:675:1: PD_ENABLESETUPTEMPLATE = 0x8000 // /usr/x86_64-w64-mingw32/include/commdlg.h:677:1: PD_ENABLESETUPTEMPLATEHANDLE = 0x20000 // /usr/x86_64-w64-mingw32/include/commdlg.h:679:1: PD_EXCLUSIONFLAGS = 0x1000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:687:1: PD_EXCL_COPIESANDCOLLATE = 33024 // /usr/x86_64-w64-mingw32/include/commdlg.h:690:1: PD_HIDEPRINTTOFILE = 0x100000 // /usr/x86_64-w64-mingw32/include/commdlg.h:683:1: PD_NOCURRENTPAGE = 0x800000 // /usr/x86_64-w64-mingw32/include/commdlg.h:686:1: PD_NONETWORKBUTTON = 0x200000 // /usr/x86_64-w64-mingw32/include/commdlg.h:684:1: PD_NOPAGENUMS = 0x8 // /usr/x86_64-w64-mingw32/include/commdlg.h:665:1: PD_NOSELECTION = 0x4 // /usr/x86_64-w64-mingw32/include/commdlg.h:664:1: PD_NOWARNING = 0x80 // /usr/x86_64-w64-mingw32/include/commdlg.h:669:1: PD_PAGENUMS = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:663:1: PD_PRINTSETUP = 0x40 // /usr/x86_64-w64-mingw32/include/commdlg.h:668:1: PD_PRINTTOFILE = 0x20 // /usr/x86_64-w64-mingw32/include/commdlg.h:667:1: PD_RESULT_APPLY = 2 // /usr/x86_64-w64-mingw32/include/commdlg.h:695:1: PD_RESULT_CANCEL = 0 // /usr/x86_64-w64-mingw32/include/commdlg.h:693:1: PD_RESULT_PRINT = 1 // /usr/x86_64-w64-mingw32/include/commdlg.h:694:1: PD_RETURNDC = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:670:1: PD_RETURNDEFAULT = 0x400 // /usr/x86_64-w64-mingw32/include/commdlg.h:672:1: PD_RETURNIC = 0x200 // /usr/x86_64-w64-mingw32/include/commdlg.h:671:1: PD_SELECTION = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:662:1: PD_SHOWHELP = 0x800 // /usr/x86_64-w64-mingw32/include/commdlg.h:673:1: PD_USEDEVMODECOPIES = 0x40000 // /usr/x86_64-w64-mingw32/include/commdlg.h:680:1: PD_USEDEVMODECOPIESANDCOLLATE = 0x40000 // /usr/x86_64-w64-mingw32/include/commdlg.h:681:1: PD_USELARGETEMPLATE = 0x10000000 // /usr/x86_64-w64-mingw32/include/commdlg.h:688:1: PENDING_LOCK = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16322:1: PERFORMANCE_DATA_VERSION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8428:1: PERFSTATE_POLICY_CHANGE_IDEAL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5199:1: PERFSTATE_POLICY_CHANGE_MAX = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5202:1: PERFSTATE_POLICY_CHANGE_ROCKET = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5201:1: PERFSTATE_POLICY_CHANGE_SINGLE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5200:1: PERF_100NSEC_MULTI_TIMER = 575735040 // /usr/x86_64-w64-mingw32/include/winperf.h:118:1: PERF_100NSEC_MULTI_TIMER_INV = 592512256 // /usr/x86_64-w64-mingw32/include/winperf.h:119:1: PERF_100NSEC_TIMER = 542180608 // /usr/x86_64-w64-mingw32/include/winperf.h:113:1: PERF_100NSEC_TIMER_INV = 558957824 // /usr/x86_64-w64-mingw32/include/winperf.h:114:1: PERF_AVERAGE_BASE = 1073939458 // /usr/x86_64-w64-mingw32/include/winperf.h:110:1: PERF_AVERAGE_BULK = 1073874176 // /usr/x86_64-w64-mingw32/include/winperf.h:111:1: PERF_AVERAGE_TIMER = 805438464 // /usr/x86_64-w64-mingw32/include/winperf.h:109:1: PERF_COUNTER_100NS_QUEUELEN_TYPE = 5571840 // /usr/x86_64-w64-mingw32/include/winperf.h:96:1: PERF_COUNTER_BASE = 0x00030000 // /usr/x86_64-w64-mingw32/include/winperf.h:71:1: PERF_COUNTER_BULK_COUNT = 272696576 // /usr/x86_64-w64-mingw32/include/winperf.h:98:1: PERF_COUNTER_COUNTER = 272696320 // /usr/x86_64-w64-mingw32/include/winperf.h:92:1: PERF_COUNTER_DELTA = 4195328 // /usr/x86_64-w64-mingw32/include/winperf.h:126:1: PERF_COUNTER_ELAPSED = 0x00040000 // /usr/x86_64-w64-mingw32/include/winperf.h:72:1: PERF_COUNTER_FRACTION = 0x00020000 // /usr/x86_64-w64-mingw32/include/winperf.h:70:1: PERF_COUNTER_HISTOGRAM = 0x00060000 // /usr/x86_64-w64-mingw32/include/winperf.h:74:1: PERF_COUNTER_HISTOGRAM_TYPE = 0x80000000 // /usr/x86_64-w64-mingw32/include/winperf.h:125:1: PERF_COUNTER_LARGE_DELTA = 4195584 // /usr/x86_64-w64-mingw32/include/winperf.h:127:1: PERF_COUNTER_LARGE_QUEUELEN_TYPE = 4523264 // /usr/x86_64-w64-mingw32/include/winperf.h:95:1: PERF_COUNTER_LARGE_RAWCOUNT = 65792 // /usr/x86_64-w64-mingw32/include/winperf.h:101:1: PERF_COUNTER_LARGE_RAWCOUNT_HEX = 256 // /usr/x86_64-w64-mingw32/include/winperf.h:103:1: PERF_COUNTER_MULTI_BASE = 1107494144 // /usr/x86_64-w64-mingw32/include/winperf.h:117:1: PERF_COUNTER_MULTI_TIMER = 574686464 // /usr/x86_64-w64-mingw32/include/winperf.h:115:1: PERF_COUNTER_MULTI_TIMER_INV = 591463680 // /usr/x86_64-w64-mingw32/include/winperf.h:116:1: PERF_COUNTER_NODATA = 1073742336 // /usr/x86_64-w64-mingw32/include/winperf.h:106:1: PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE = 6620416 // /usr/x86_64-w64-mingw32/include/winperf.h:97:1: PERF_COUNTER_PRECISION = 0x00070000 // /usr/x86_64-w64-mingw32/include/winperf.h:75:1: PERF_COUNTER_QUEUELEN = 0x00050000 // /usr/x86_64-w64-mingw32/include/winperf.h:73:1: PERF_COUNTER_QUEUELEN_TYPE = 4523008 // /usr/x86_64-w64-mingw32/include/winperf.h:94:1: PERF_COUNTER_RATE = 0x00010000 // /usr/x86_64-w64-mingw32/include/winperf.h:69:1: PERF_COUNTER_RAWCOUNT = 65536 // /usr/x86_64-w64-mingw32/include/winperf.h:100:1: PERF_COUNTER_RAWCOUNT_HEX = 0 // /usr/x86_64-w64-mingw32/include/winperf.h:102:1: PERF_COUNTER_TEXT = 2816 // /usr/x86_64-w64-mingw32/include/winperf.h:99:1: PERF_COUNTER_TIMER = 541132032 // /usr/x86_64-w64-mingw32/include/winperf.h:93:1: PERF_COUNTER_TIMER_INV = 557909248 // /usr/x86_64-w64-mingw32/include/winperf.h:107:1: PERF_COUNTER_VALUE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:68:1: PERF_DATA_REVISION = 1 // /usr/x86_64-w64-mingw32/include/winperf.h:12:1: PERF_DATA_VERSION = 1 // /usr/x86_64-w64-mingw32/include/winperf.h:11:1: PERF_DELTA_BASE = 0x00800000 // /usr/x86_64-w64-mingw32/include/winperf.h:82:1: PERF_DELTA_COUNTER = 0x00400000 // /usr/x86_64-w64-mingw32/include/winperf.h:81:1: PERF_DETAIL_ADVANCED = 200 // /usr/x86_64-w64-mingw32/include/winperf.h:135:1: PERF_DETAIL_EXPERT = 300 // /usr/x86_64-w64-mingw32/include/winperf.h:136:1: PERF_DETAIL_NOVICE = 100 // /usr/x86_64-w64-mingw32/include/winperf.h:134:1: PERF_DETAIL_WIZARD = 400 // /usr/x86_64-w64-mingw32/include/winperf.h:137:1: PERF_DISPLAY_NOSHOW = 0x40000000 // /usr/x86_64-w64-mingw32/include/winperf.h:90:1: PERF_DISPLAY_NO_SUFFIX = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:86:1: PERF_DISPLAY_PERCENT = 0x20000000 // /usr/x86_64-w64-mingw32/include/winperf.h:88:1: PERF_DISPLAY_PER_SEC = 0x10000000 // /usr/x86_64-w64-mingw32/include/winperf.h:87:1: PERF_DISPLAY_SECONDS = 0x30000000 // /usr/x86_64-w64-mingw32/include/winperf.h:89:1: PERF_ELAPSED_TIME = 807666944 // /usr/x86_64-w64-mingw32/include/winperf.h:124:1: PERF_INVERSE_COUNTER = 0x01000000 // /usr/x86_64-w64-mingw32/include/winperf.h:83:1: PERF_LARGE_RAW_BASE = 1073939712 // /usr/x86_64-w64-mingw32/include/winperf.h:123:1: PERF_LARGE_RAW_FRACTION = 537003264 // /usr/x86_64-w64-mingw32/include/winperf.h:121:1: PERF_MULTI_COUNTER = 0x02000000 // /usr/x86_64-w64-mingw32/include/winperf.h:84:1: PERF_NO_INSTANCES = -1 // /usr/x86_64-w64-mingw32/include/winperf.h:56:1: PERF_NO_UNIQUE_ID = -1 // /usr/x86_64-w64-mingw32/include/winperf.h:160:1: PERF_NUMBER_DECIMAL = 0x00010000 // /usr/x86_64-w64-mingw32/include/winperf.h:66:1: PERF_NUMBER_DEC_1000 = 0x00020000 // /usr/x86_64-w64-mingw32/include/winperf.h:67:1: PERF_NUMBER_HEX = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:65:1: PERF_OBJECT_TIMER = 0x00200000 // /usr/x86_64-w64-mingw32/include/winperf.h:80:1: PERF_OBJ_TIME_TIMER = 543229184 // /usr/x86_64-w64-mingw32/include/winperf.h:112:1: PERF_PRECISION_100NS_TIMER = 542573824 // /usr/x86_64-w64-mingw32/include/winperf.h:129:1: PERF_PRECISION_OBJECT_TIMER = 543622400 // /usr/x86_64-w64-mingw32/include/winperf.h:130:1: PERF_PRECISION_SYSTEM_TIMER = 541525248 // /usr/x86_64-w64-mingw32/include/winperf.h:128:1: PERF_PRECISION_TIMESTAMP = 1073939712 // /usr/x86_64-w64-mingw32/include/winperf.h:132:1: PERF_RAW_BASE = 1073939459 // /usr/x86_64-w64-mingw32/include/winperf.h:122:1: PERF_RAW_FRACTION = 537003008 // /usr/x86_64-w64-mingw32/include/winperf.h:120:1: PERF_SAMPLE_BASE = 1073939457 // /usr/x86_64-w64-mingw32/include/winperf.h:108:1: PERF_SAMPLE_COUNTER = 4260864 // /usr/x86_64-w64-mingw32/include/winperf.h:105:1: PERF_SAMPLE_FRACTION = 549585920 // /usr/x86_64-w64-mingw32/include/winperf.h:104:1: PERF_SIZE_DWORD = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:57:1: PERF_SIZE_LARGE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winperf.h:58:1: PERF_SIZE_VARIABLE_LEN = 0x00000300 // /usr/x86_64-w64-mingw32/include/winperf.h:60:1: PERF_SIZE_ZERO = 0x00000200 // /usr/x86_64-w64-mingw32/include/winperf.h:59:1: PERF_TEXT_ASCII = 0x00010000 // /usr/x86_64-w64-mingw32/include/winperf.h:77:1: PERF_TEXT_UNICODE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:76:1: PERF_TIMER_100NS = 0x00100000 // /usr/x86_64-w64-mingw32/include/winperf.h:79:1: PERF_TIMER_TICK = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:78:1: PERF_TYPE_COUNTER = 0x00000400 // /usr/x86_64-w64-mingw32/include/winperf.h:62:1: PERF_TYPE_NUMBER = 0x00000000 // /usr/x86_64-w64-mingw32/include/winperf.h:61:1: PERF_TYPE_TEXT = 0x00000800 // /usr/x86_64-w64-mingw32/include/winperf.h:63:1: PERF_TYPE_ZERO = 0x00000C00 // /usr/x86_64-w64-mingw32/include/winperf.h:64:1: PFD_DEPTH_DONTCARE = 0x20000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2747:1: PFD_DIRECT3D_ACCELERATED = 0x00004000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2744:1: PFD_DOUBLEBUFFER = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2730:1: PFD_DOUBLEBUFFER_DONTCARE = 0x40000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2748:1: PFD_DRAW_TO_BITMAP = 0x00000008 // /usr/x86_64-w64-mingw32/include/wingdi.h:2733:1: PFD_DRAW_TO_WINDOW = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:2732:1: PFD_GENERIC_ACCELERATED = 0x00001000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2742:1: PFD_GENERIC_FORMAT = 0x00000040 // /usr/x86_64-w64-mingw32/include/wingdi.h:2736:1: PFD_MAIN_PLANE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:2726:1: PFD_NEED_PALETTE = 0x00000080 // /usr/x86_64-w64-mingw32/include/wingdi.h:2737:1: PFD_NEED_SYSTEM_PALETTE = 0x00000100 // /usr/x86_64-w64-mingw32/include/wingdi.h:2738:1: PFD_OVERLAY_PLANE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2727:1: PFD_STEREO = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2731:1: PFD_STEREO_DONTCARE = 0x80000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2749:1: PFD_SUPPORT_COMPOSITION = 0x00008000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2745:1: PFD_SUPPORT_DIRECTDRAW = 0x00002000 // /usr/x86_64-w64-mingw32/include/wingdi.h:2743:1: PFD_SUPPORT_GDI = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:2734:1: PFD_SUPPORT_OPENGL = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:2735:1: PFD_SWAP_COPY = 0x00000400 // /usr/x86_64-w64-mingw32/include/wingdi.h:2740:1: PFD_SWAP_EXCHANGE = 0x00000200 // /usr/x86_64-w64-mingw32/include/wingdi.h:2739:1: PFD_SWAP_LAYER_BUFFERS = 0x00000800 // /usr/x86_64-w64-mingw32/include/wingdi.h:2741:1: PFD_TYPE_COLORINDEX = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2724:1: PFD_TYPE_RGBA = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:2723:1: PFD_UNDERLAY_PLANE = -1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2728:1: PF_3DNOW_INSTRUCTIONS_AVAILABLE = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:4744:1: PF_ALPHA_BYTE_INSTRUCTIONS = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:4742:1: PF_APPLETALK = 16 // /usr/x86_64-w64-mingw32/include/winsock.h:245:1: PF_ARM_64BIT_LOADSTORE_ATOMIC = 25 // /usr/x86_64-w64-mingw32/include/winnt.h:4762:1: PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE = 24 // /usr/x86_64-w64-mingw32/include/winnt.h:4761:1: PF_ARM_EXTERNAL_CACHE_AVAILABLE = 26 // /usr/x86_64-w64-mingw32/include/winnt.h:4763:1: PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE = 27 // /usr/x86_64-w64-mingw32/include/winnt.h:4764:1: PF_ARM_NEON_INSTRUCTIONS_AVAILABLE = 19 // /usr/x86_64-w64-mingw32/include/winnt.h:4756:1: PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE = 31 // /usr/x86_64-w64-mingw32/include/winnt.h:4768:1: PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE = 30 // /usr/x86_64-w64-mingw32/include/winnt.h:4767:1: PF_ARM_V8_INSTRUCTIONS_AVAILABLE = 29 // /usr/x86_64-w64-mingw32/include/winnt.h:4766:1: PF_ARM_VFP_32_REGISTERS_AVAILABLE = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:4755:1: PF_BAN = 21 // /usr/x86_64-w64-mingw32/include/winsock.h:249:1: PF_CCITT = 10 // /usr/x86_64-w64-mingw32/include/winsock.h:239:1: PF_CHANNELS_ENABLED = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4753:1: PF_CHAOS = 5 // /usr/x86_64-w64-mingw32/include/winsock.h:232:1: PF_COMPARE64_EXCHANGE128 = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:4752:1: PF_COMPARE_EXCHANGE128 = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:4751:1: PF_COMPARE_EXCHANGE_DOUBLE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4739:1: PF_DATAKIT = 9 // /usr/x86_64-w64-mingw32/include/winsock.h:238:1: PF_DECnet = 12 // /usr/x86_64-w64-mingw32/include/winsock.h:241:1: PF_DLI = 13 // /usr/x86_64-w64-mingw32/include/winsock.h:242:1: PF_ECMA = 8 // /usr/x86_64-w64-mingw32/include/winsock.h:237:1: PF_FASTFAIL_AVAILABLE = 23 // /usr/x86_64-w64-mingw32/include/winnt.h:4760:1: PF_FIREFOX = 19 // /usr/x86_64-w64-mingw32/include/winsock.h:247:1: PF_FLOATING_POINT_EMULATED = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4738:1: PF_FLOATING_POINT_PRECISION_ERRATA = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4737:1: PF_HYLINK = 15 // /usr/x86_64-w64-mingw32/include/winsock.h:244:1: PF_IMPLINK = 3 // /usr/x86_64-w64-mingw32/include/winsock.h:230:1: PF_INET = 2 // /usr/x86_64-w64-mingw32/include/winsock.h:229:1: PF_IPX = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:234:1: PF_ISO = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:235:1: PF_LAT = 14 // /usr/x86_64-w64-mingw32/include/winsock.h:243:1: PF_MAX = 22 // /usr/x86_64-w64-mingw32/include/winsock.h:251:1: PF_MMX_INSTRUCTIONS_AVAILABLE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:4740:1: PF_NS = 6 // /usr/x86_64-w64-mingw32/include/winsock.h:233:1: PF_NX_ENABLED = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:4749:1: PF_OSI = 7 // /usr/x86_64-w64-mingw32/include/winsock.h:236:1: PF_PAE_ENABLED = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:4746:1: PF_PPC_MOVEMEM_64BIT_OK = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4741:1: PF_PUP = 4 // /usr/x86_64-w64-mingw32/include/winsock.h:231:1: PF_RDPID_INSTRUCTION_AVAILABLE = 33 // /usr/x86_64-w64-mingw32/include/winnt.h:4770:1: PF_RDRAND_INSTRUCTION_AVAILABLE = 28 // /usr/x86_64-w64-mingw32/include/winnt.h:4765:1: PF_RDTSCP_INSTRUCTION_AVAILABLE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4769:1: PF_RDTSC_INSTRUCTION_AVAILABLE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4745:1: PF_RDWRFSGSBASE_AVAILABLE = 22 // /usr/x86_64-w64-mingw32/include/winnt.h:4759:1: PF_SECOND_LEVEL_ADDRESS_TRANSLATION = 20 // /usr/x86_64-w64-mingw32/include/winnt.h:4757:1: PF_SNA = 11 // /usr/x86_64-w64-mingw32/include/winsock.h:240:1: PF_SSE3_INSTRUCTIONS_AVAILABLE = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:4750:1: PF_SSE_DAZ_MODE_AVAILABLE = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:4748:1: PF_UNIX = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:228:1: PF_UNKNOWN1 = 20 // /usr/x86_64-w64-mingw32/include/winsock.h:248:1: PF_UNSPEC = 0 // /usr/x86_64-w64-mingw32/include/winsock.h:227:1: PF_VIRT_FIRMWARE_ENABLED = 21 // /usr/x86_64-w64-mingw32/include/winnt.h:4758:1: PF_VOICEVIEW = 18 // /usr/x86_64-w64-mingw32/include/winsock.h:246:1: PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:4747:1: PF_XMMI_INSTRUCTIONS_AVAILABLE = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:4743:1: PF_XSAVE_ENABLED = 17 // /usr/x86_64-w64-mingw32/include/winnt.h:4754:1: PGHDR_CLEAN = 0x001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16023:1: PGHDR_DIRTY = 0x002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16024:1: PGHDR_DONT_WRITE = 0x010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16028:1: PGHDR_MMAP = 0x020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16029:1: PGHDR_NEED_SYNC = 0x008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16026:1: PGHDR_WAL_APPEND = 0x040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16031:1: PGHDR_WRITEABLE = 0x004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16025:1: PHYSICALHEIGHT = 111 // /usr/x86_64-w64-mingw32/include/wingdi.h:1543:1: PHYSICALOFFSETX = 112 // /usr/x86_64-w64-mingw32/include/wingdi.h:1544:1: PHYSICALOFFSETY = 113 // /usr/x86_64-w64-mingw32/include/wingdi.h:1545:1: PHYSICALWIDTH = 110 // /usr/x86_64-w64-mingw32/include/wingdi.h:1542:1: PIDDI_THUMBNAIL = 2 // /usr/x86_64-w64-mingw32/include/propidl.h:354:1: PIDDSI_BYTECOUNT = 0x00000004 // /usr/x86_64-w64-mingw32/include/propidl.h:377:1: PIDDSI_CATEGORY = 0x00000002 // /usr/x86_64-w64-mingw32/include/propidl.h:375:1: PIDDSI_COMPANY = 0x0000000F // /usr/x86_64-w64-mingw32/include/propidl.h:388:1: PIDDSI_DOCPARTS = 0x0000000D // /usr/x86_64-w64-mingw32/include/propidl.h:386:1: PIDDSI_HEADINGPAIR = 0x0000000C // /usr/x86_64-w64-mingw32/include/propidl.h:385:1: PIDDSI_HIDDENCOUNT = 0x00000009 // /usr/x86_64-w64-mingw32/include/propidl.h:382:1: PIDDSI_LINECOUNT = 0x00000005 // /usr/x86_64-w64-mingw32/include/propidl.h:378:1: PIDDSI_LINKSDIRTY = 0x00000010 // /usr/x86_64-w64-mingw32/include/propidl.h:389:1: PIDDSI_MANAGER = 0x0000000E // /usr/x86_64-w64-mingw32/include/propidl.h:387:1: PIDDSI_MMCLIPCOUNT = 0x0000000A // /usr/x86_64-w64-mingw32/include/propidl.h:383:1: PIDDSI_NOTECOUNT = 0x00000008 // /usr/x86_64-w64-mingw32/include/propidl.h:381:1: PIDDSI_PARCOUNT = 0x00000006 // /usr/x86_64-w64-mingw32/include/propidl.h:379:1: PIDDSI_PRESFORMAT = 0x00000003 // /usr/x86_64-w64-mingw32/include/propidl.h:376:1: PIDDSI_SCALE = 0x0000000B // /usr/x86_64-w64-mingw32/include/propidl.h:384:1: PIDDSI_SLIDECOUNT = 0x00000007 // /usr/x86_64-w64-mingw32/include/propidl.h:380:1: PIDMSI_COPYRIGHT = 11 // /usr/x86_64-w64-mingw32/include/propidl.h:400:1: PIDMSI_EDITOR = 2 // /usr/x86_64-w64-mingw32/include/propidl.h:391:1: PIDMSI_OWNER = 8 // /usr/x86_64-w64-mingw32/include/propidl.h:397:1: PIDMSI_PRODUCTION = 10 // /usr/x86_64-w64-mingw32/include/propidl.h:399:1: PIDMSI_PROJECT = 6 // /usr/x86_64-w64-mingw32/include/propidl.h:395:1: PIDMSI_RATING = 9 // /usr/x86_64-w64-mingw32/include/propidl.h:398:1: PIDMSI_SEQUENCE_NO = 5 // /usr/x86_64-w64-mingw32/include/propidl.h:394:1: PIDMSI_SOURCE = 4 // /usr/x86_64-w64-mingw32/include/propidl.h:393:1: PIDMSI_STATUS = 7 // /usr/x86_64-w64-mingw32/include/propidl.h:396:1: PIDMSI_SUPPLIER = 3 // /usr/x86_64-w64-mingw32/include/propidl.h:392:1: PIDSI_APPNAME = 18 // /usr/x86_64-w64-mingw32/include/propidl.h:372:1: PIDSI_AUTHOR = 4 // /usr/x86_64-w64-mingw32/include/propidl.h:358:1: PIDSI_CHARCOUNT = 16 // /usr/x86_64-w64-mingw32/include/propidl.h:370:1: PIDSI_COMMENTS = 6 // /usr/x86_64-w64-mingw32/include/propidl.h:360:1: PIDSI_CREATE_DTM = 12 // /usr/x86_64-w64-mingw32/include/propidl.h:366:1: PIDSI_DOC_SECURITY = 19 // /usr/x86_64-w64-mingw32/include/propidl.h:373:1: PIDSI_EDITTIME = 10 // /usr/x86_64-w64-mingw32/include/propidl.h:364:1: PIDSI_KEYWORDS = 5 // /usr/x86_64-w64-mingw32/include/propidl.h:359:1: PIDSI_LASTAUTHOR = 8 // /usr/x86_64-w64-mingw32/include/propidl.h:362:1: PIDSI_LASTPRINTED = 11 // /usr/x86_64-w64-mingw32/include/propidl.h:365:1: PIDSI_LASTSAVE_DTM = 13 // /usr/x86_64-w64-mingw32/include/propidl.h:367:1: PIDSI_PAGECOUNT = 14 // /usr/x86_64-w64-mingw32/include/propidl.h:368:1: PIDSI_REVNUMBER = 9 // /usr/x86_64-w64-mingw32/include/propidl.h:363:1: PIDSI_SUBJECT = 3 // /usr/x86_64-w64-mingw32/include/propidl.h:357:1: PIDSI_TEMPLATE = 7 // /usr/x86_64-w64-mingw32/include/propidl.h:361:1: PIDSI_THUMBNAIL = 17 // /usr/x86_64-w64-mingw32/include/propidl.h:371:1: PIDSI_TITLE = 2 // /usr/x86_64-w64-mingw32/include/propidl.h:356:1: PIDSI_WORDCOUNT = 15 // /usr/x86_64-w64-mingw32/include/propidl.h:369:1: PID_BEHAVIOR = 2147483651 // /usr/x86_64-w64-mingw32/include/propidl.h:341:1: PID_CODEPAGE = 1 // /usr/x86_64-w64-mingw32/include/propidl.h:329:1: PID_DICTIONARY = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:327:1: PID_FIRST_NAME_DEFAULT = 4095 // /usr/x86_64-w64-mingw32/include/propidl.h:333:1: PID_FIRST_USABLE = 2 // /usr/x86_64-w64-mingw32/include/propidl.h:331:1: PID_ILLEGAL = 4294967295 // /usr/x86_64-w64-mingw32/include/propidl.h:343:1: PID_LOCALE = 2147483648 // /usr/x86_64-w64-mingw32/include/propidl.h:335:1: PID_MAX_READONLY = 3221225471 // /usr/x86_64-w64-mingw32/include/propidl.h:348:1: PID_MIN_READONLY = 2147483648 // /usr/x86_64-w64-mingw32/include/propidl.h:346:1: PID_MODIFY_TIME = 2147483649 // /usr/x86_64-w64-mingw32/include/propidl.h:337:1: PID_SECURITY = 2147483650 // /usr/x86_64-w64-mingw32/include/propidl.h:339:1: PIPE_ACCEPT_REMOTE_CLIENTS = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:141:1: PIPE_ACCESS_DUPLEX = 0x3 // /usr/x86_64-w64-mingw32/include/winbase.h:130:1: PIPE_ACCESS_INBOUND = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:128:1: PIPE_ACCESS_OUTBOUND = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:129:1: PIPE_CLIENT_END = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:132:1: PIPE_NOWAIT = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:136:1: PIPE_READMODE_BYTE = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:137:1: PIPE_READMODE_MESSAGE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:138:1: PIPE_REJECT_REMOTE_CLIENTS = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:142:1: PIPE_SERVER_END = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:133:1: PIPE_TYPE_BYTE = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:139:1: PIPE_TYPE_MESSAGE = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:140:1: PIPE_UNLIMITED_INSTANCES = 255 // /usr/x86_64-w64-mingw32/include/winbase.h:144:1: PIPE_WAIT = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:135:1: PKCS12_ALLOW_OVERWRITE_KEY = 0x4000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5696:1: PKCS12_ALWAYS_CNG_KSP = 0x200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5693:1: PKCS12_DISABLE_ENCRYPT_CERTIFICATES = 0x0100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5718:1: PKCS12_ENCRYPT_CERTIFICATES = 0x0200 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5719:1: PKCS12_EXPORT_ECC_CURVE_OID = 0x2000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5721:1: PKCS12_EXPORT_ECC_CURVE_PARAMETERS = 0x1000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5720:1: PKCS12_EXPORT_PBES2_PARAMS = 0x0080 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5717:1: PKCS12_EXPORT_RESERVED_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5722:1: PKCS12_EXPORT_SILENT = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5716:1: PKCS12_IMPORT_RESERVED_MASK = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5699:1: PKCS12_IMPORT_SILENT = 0x40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5690:1: PKCS12_INCLUDE_EXTENDED_PROPERTIES = 0x10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5714:1: PKCS12_NO_PERSIST_KEY = 0x8000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5697:1: PKCS12_OBJECT_LOCATOR_ALL_IMPORT_FLAGS = 33360 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5701:1: PKCS12_ONLY_CERTIFICATES = 0x00000400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5694:1: PKCS12_ONLY_CERTIFICATES_PROVIDER_TYPE = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5703:1: PKCS12_ONLY_NOT_ENCRYPTED_CERTIFICATES = 0x00000800 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5695:1: PKCS12_PBKDF2_ID_HMAC_SHA1 = "1.2.840.113549.2.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5724:1: PKCS12_PBKDF2_ID_HMAC_SHA256 = "1.2.840.113549.2.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5725:1: PKCS12_PBKDF2_ID_HMAC_SHA384 = "1.2.840.113549.2.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5726:1: PKCS12_PBKDF2_ID_HMAC_SHA512 = "1.2.840.113549.2.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5727:1: PKCS12_PREFER_CNG_KSP = 0x100 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5692:1: PKCS12_PROTECT_TO_DOMAIN_SIDS = 0x20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5715:1: PKCS12_VIRTUAL_ISOLATION_KEY = 0x00010000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5698:1: PKCS5_PADDING = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:417:1: PKCS_7_ASN_ENCODING = 0x10000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1437:1: PKCS_7_NDR_ENCODING = 0x20000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1438:1: PKCS_RSA_SSA_PSS_TRAILER_FIELD_BC = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2295:1: PLAINTEXTKEYBLOB = 0x8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:355:1: PLANES = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:1518:1: PLOSS = 6 // /usr/x86_64-w64-mingw32/include/math.h:34:1: PMB_ACTIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:3197:1: PM_NOREMOVE = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1977:1: PM_NOYIELD = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1979:1: PM_QS_INPUT = 67567616 // /usr/x86_64-w64-mingw32/include/winuser.h:1981:1: PM_QS_PAINT = 2097152 // /usr/x86_64-w64-mingw32/include/winuser.h:1983:1: PM_QS_POSTMESSAGE = 9961472 // /usr/x86_64-w64-mingw32/include/winuser.h:1982:1: PM_QS_SENDMESSAGE = 4194304 // /usr/x86_64-w64-mingw32/include/winuser.h:1984:1: PM_REMOVE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1978:1: POINTER_32 = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:16:1: POINTER_64 = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:17:1: POINTER_SIGNED = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:20:1: POINTER_UNSIGNED = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:21:1: POLICY_AUDIT_SUBCATEGORY_COUNT = 56 // /usr/x86_64-w64-mingw32/include/winnt.h:3861:1: POLICY_SHOWREASONUI_ALWAYS = 1 // /usr/x86_64-w64-mingw32/include/reason.h:71:1: POLICY_SHOWREASONUI_NEVER = 0 // /usr/x86_64-w64-mingw32/include/reason.h:70:1: POLICY_SHOWREASONUI_SERVERONLY = 3 // /usr/x86_64-w64-mingw32/include/reason.h:73:1: POLICY_SHOWREASONUI_WORKSTATIONONLY = 2 // /usr/x86_64-w64-mingw32/include/reason.h:72:1: POLYFILL_LAST = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:102:1: POLYGONALCAPS = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:1527:1: PORT_STATUS_DOOR_OPEN = 7 // /usr/x86_64-w64-mingw32/include/winspool.h:714:1: PORT_STATUS_NO_TONER = 6 // /usr/x86_64-w64-mingw32/include/winspool.h:713:1: PORT_STATUS_OFFLINE = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:708:1: PORT_STATUS_OUTPUT_BIN_FULL = 4 // /usr/x86_64-w64-mingw32/include/winspool.h:711:1: PORT_STATUS_OUT_OF_MEMORY = 9 // /usr/x86_64-w64-mingw32/include/winspool.h:716:1: PORT_STATUS_PAPER_JAM = 2 // /usr/x86_64-w64-mingw32/include/winspool.h:709:1: PORT_STATUS_PAPER_OUT = 3 // /usr/x86_64-w64-mingw32/include/winspool.h:710:1: PORT_STATUS_PAPER_PROBLEM = 5 // /usr/x86_64-w64-mingw32/include/winspool.h:712:1: PORT_STATUS_POWER_SAVE = 12 // /usr/x86_64-w64-mingw32/include/winspool.h:719:1: PORT_STATUS_TONER_LOW = 10 // /usr/x86_64-w64-mingw32/include/winspool.h:717:1: PORT_STATUS_TYPE_ERROR = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:704:1: PORT_STATUS_TYPE_INFO = 3 // /usr/x86_64-w64-mingw32/include/winspool.h:706:1: PORT_STATUS_TYPE_WARNING = 2 // /usr/x86_64-w64-mingw32/include/winspool.h:705:1: PORT_STATUS_USER_INTERVENTION = 8 // /usr/x86_64-w64-mingw32/include/winspool.h:715:1: PORT_STATUS_WARMING_UP = 11 // /usr/x86_64-w64-mingw32/include/winspool.h:718:1: PORT_TYPE_NET_ATTACHED = 0x0008 // /usr/x86_64-w64-mingw32/include/winspool.h:686:1: PORT_TYPE_READ = 0x0002 // /usr/x86_64-w64-mingw32/include/winspool.h:684:1: PORT_TYPE_REDIRECTED = 0x0004 // /usr/x86_64-w64-mingw32/include/winspool.h:685:1: PORT_TYPE_WRITE = 0x0001 // /usr/x86_64-w64-mingw32/include/winspool.h:683:1: POSTSCRIPT_DATA = 37 // /usr/x86_64-w64-mingw32/include/wingdi.h:271:1: POSTSCRIPT_IDENTIFY = 4117 // /usr/x86_64-w64-mingw32/include/wingdi.h:314:1: POSTSCRIPT_IGNORE = 38 // /usr/x86_64-w64-mingw32/include/wingdi.h:272:1: POSTSCRIPT_INJECTION = 4118 // /usr/x86_64-w64-mingw32/include/wingdi.h:315:1: POSTSCRIPT_PASSTHROUGH = 4115 // /usr/x86_64-w64-mingw32/include/wingdi.h:311:1: POWERBUTTON_ACTION_INDEX_HIBERNATE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5191:1: POWERBUTTON_ACTION_INDEX_NOTHING = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5189:1: POWERBUTTON_ACTION_INDEX_SHUTDOWN = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5192:1: POWERBUTTON_ACTION_INDEX_SLEEP = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5190:1: POWERBUTTON_ACTION_VALUE_HIBERNATE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5196:1: POWERBUTTON_ACTION_VALUE_NOTHING = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5194:1: POWERBUTTON_ACTION_VALUE_SHUTDOWN = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:5197:1: POWERBUTTON_ACTION_VALUE_SLEEP = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5195:1: POWER_ACTION_CRITICAL = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5879:1: POWER_ACTION_DISABLE_WAKES = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5878:1: POWER_ACTION_HIBERBOOT = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:5874:1: POWER_ACTION_LIGHTEST_FIRST = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5876:1: POWER_ACTION_LOCK_CONSOLE = 0x20000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5877:1: POWER_ACTION_OVERRIDE_APPS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5873:1: POWER_ACTION_PSEUDO_TRANSITION = 0x08000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5875:1: POWER_ACTION_QUERY_ALLOWED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5871:1: POWER_ACTION_UI_ALLOWED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5872:1: POWER_DEVICE_IDLE_POLICY_CONSERVATIVE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5221:1: POWER_DEVICE_IDLE_POLICY_PERFORMANCE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5220:1: POWER_FORCE_TRIGGER_RESET = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:5887:1: POWER_LEVEL_USER_NOTIFY_EXEC = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:5883:1: POWER_LEVEL_USER_NOTIFY_SOUND = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5882:1: POWER_LEVEL_USER_NOTIFY_TEXT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5881:1: POWER_PLATFORM_ROLE_V1 = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5620:1: POWER_PLATFORM_ROLE_V2 = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5623:1: POWER_PLATFORM_ROLE_VERSION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5630:1: POWER_REQUEST_CONTEXT_DETAILED_STRING = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:5396:1: POWER_REQUEST_CONTEXT_SIMPLE_STRING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:5395:1: POWER_REQUEST_CONTEXT_VERSION = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5388:1: POWER_SETTING_VALUE_VERSION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5591:1: POWER_SYSTEM_MAXIMUM = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:5350:1: POWER_USER_NOTIFY_BUTTON = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:5884:1: POWER_USER_NOTIFY_FORCED_SHUTDOWN = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:5886:1: POWER_USER_NOTIFY_SHUTDOWN = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:5885:1: PO_DELETE = 0x0013 // /usr/x86_64-w64-mingw32/include/shellapi.h:184:1: PO_PORTCHANGE = 0x0020 // /usr/x86_64-w64-mingw32/include/shellapi.h:186:1: PO_RENAME = 0x0014 // /usr/x86_64-w64-mingw32/include/shellapi.h:185:1: PO_REN_PORT = 0x0034 // /usr/x86_64-w64-mingw32/include/shellapi.h:188:1: PO_THROTTLE_ADAPTIVE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5948:1: PO_THROTTLE_CONSTANT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5946:1: PO_THROTTLE_DEGRADE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5947:1: PO_THROTTLE_MAXIMUM = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:5949:1: PO_THROTTLE_NONE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5945:1: PPM_FIRMWARE_ACPI1C2 = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:5794:1: PPM_FIRMWARE_ACPI1C3 = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:5795:1: PPM_FIRMWARE_ACPI1TSTATES = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:5796:1: PPM_FIRMWARE_CPC = 0x40000 // /usr/x86_64-w64-mingw32/include/winnt.h:5812:1: PPM_FIRMWARE_CSD = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:5798:1: PPM_FIRMWARE_CST = 0x8 // /usr/x86_64-w64-mingw32/include/winnt.h:5797:1: PPM_FIRMWARE_OSC = 0x10000 // /usr/x86_64-w64-mingw32/include/winnt.h:5810:1: PPM_FIRMWARE_PCCH = 0x4000 // /usr/x86_64-w64-mingw32/include/winnt.h:5808:1: PPM_FIRMWARE_PCCP = 0x8000 // /usr/x86_64-w64-mingw32/include/winnt.h:5809:1: PPM_FIRMWARE_PCT = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:5799:1: PPM_FIRMWARE_PDC = 0x20000 // /usr/x86_64-w64-mingw32/include/winnt.h:5811:1: PPM_FIRMWARE_PPC = 0x100 // /usr/x86_64-w64-mingw32/include/winnt.h:5802:1: PPM_FIRMWARE_PSD = 0x200 // /usr/x86_64-w64-mingw32/include/winnt.h:5803:1: PPM_FIRMWARE_PSS = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:5800:1: PPM_FIRMWARE_PTC = 0x400 // /usr/x86_64-w64-mingw32/include/winnt.h:5804:1: PPM_FIRMWARE_TPC = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:5806:1: PPM_FIRMWARE_TSD = 0x2000 // /usr/x86_64-w64-mingw32/include/winnt.h:5807:1: PPM_FIRMWARE_TSS = 0x800 // /usr/x86_64-w64-mingw32/include/winnt.h:5805:1: PPM_FIRMWARE_XPSS = 0x80 // /usr/x86_64-w64-mingw32/include/winnt.h:5801:1: PPM_IDLE_IMPLEMENTATION_CSTATES = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:5821:1: PPM_IDLE_IMPLEMENTATION_NONE = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:5820:1: PPM_IDLE_IMPLEMENTATION_PEP = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:5822:1: PPM_PERFORMANCE_IMPLEMENTATION_CPPC = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5817:1: PPM_PERFORMANCE_IMPLEMENTATION_NONE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5814:1: PPM_PERFORMANCE_IMPLEMENTATION_PCCV1 = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5816:1: PPM_PERFORMANCE_IMPLEMENTATION_PEP = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:5818:1: PPM_PERFORMANCE_IMPLEMENTATION_PSTATES = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5815:1: PP_ADMIN_PIN = 31 // /usr/x86_64-w64-mingw32/include/wincrypt.h:472:1: PP_APPLI_CERT = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:464:1: PP_CERTCHAIN = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:460:1: PP_CHANGE_PASSWORD = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:458:1: PP_CLIENT_HWND = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:519:1: PP_CONTAINER = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:457:1: PP_CONTEXT_INFO = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:520:1: PP_CRYPT_COUNT_KEY_USE = 41 // /usr/x86_64-w64-mingw32/include/wincrypt.h:483:1: PP_DELETEKEY = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:525:1: PP_DISPLAYERRORS = 0x01 // /usr/x86_64-w64-mingw32/include/winnetwk.h:285:1: PP_ENUMALGS = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:452:1: PP_ENUMALGS_EX = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:468:1: PP_ENUMCONTAINERS = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:453:1: PP_ENUMELECTROOTS = 26 // /usr/x86_64-w64-mingw32/include/wincrypt.h:470:1: PP_ENUMEX_SIGNING_PROT = 40 // /usr/x86_64-w64-mingw32/include/wincrypt.h:481:1: PP_ENUMMANDROOTS = 25 // /usr/x86_64-w64-mingw32/include/wincrypt.h:469:1: PP_IMPTYPE = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:454:1: PP_KEYEXCHANGE_ALG = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:523:1: PP_KEYEXCHANGE_KEYSIZE = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:521:1: PP_KEYEXCHANGE_PIN = 32 // /usr/x86_64-w64-mingw32/include/wincrypt.h:473:1: PP_KEYSET_SEC_DESCR = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:459:1: PP_KEYSET_TYPE = 27 // /usr/x86_64-w64-mingw32/include/wincrypt.h:471:1: PP_KEYSPEC = 39 // /usr/x86_64-w64-mingw32/include/wincrypt.h:480:1: PP_KEYSTORAGE = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:463:1: PP_KEYX_KEYSIZE_INC = 35 // /usr/x86_64-w64-mingw32/include/wincrypt.h:476:1: PP_KEY_TYPE_SUBTYPE = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:461:1: PP_NAME = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:455:1: PP_PROVTYPE = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:462:1: PP_SESSION_KEYSIZE = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:466:1: PP_SGC_INFO = 37 // /usr/x86_64-w64-mingw32/include/wincrypt.h:478:1: PP_SIGNATURE_ALG = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:524:1: PP_SIGNATURE_KEYSIZE = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:522:1: PP_SIGNATURE_PIN = 33 // /usr/x86_64-w64-mingw32/include/wincrypt.h:474:1: PP_SIG_KEYSIZE_INC = 34 // /usr/x86_64-w64-mingw32/include/wincrypt.h:475:1: PP_SYM_KEYSIZE = 19 // /usr/x86_64-w64-mingw32/include/wincrypt.h:465:1: PP_UI_PROMPT = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:467:1: PP_UNIQUE_CONTAINER = 36 // /usr/x86_64-w64-mingw32/include/wincrypt.h:477:1: PP_USE_HARDWARE_RNG = 38 // /usr/x86_64-w64-mingw32/include/wincrypt.h:479:1: PP_VERSION = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:456:1: PRAGMA_DEPRECATED_DDK = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:255:1: PREFERRED_SCHEMA_TABLE = "sqlite_schema" // testdata/sqlite-amalgamation-3380500/sqlite3.c:14490:1: PREFERRED_TEMP_SCHEMA_TABLE = "sqlite_temp_schema" // testdata/sqlite-amalgamation-3380500/sqlite3.c:14491:1: PRF_CHECKVISIBLE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1655:1: PRF_CHILDREN = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:1659:1: PRF_CLIENT = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1657:1: PRF_ERASEBKGND = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1658:1: PRF_NONCLIENT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1656:1: PRF_OWNED = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:1660:1: PRINTACTION_DOCUMENTDEFAULTS = 6 // /usr/x86_64-w64-mingw32/include/shellapi.h:769:1: PRINTACTION_NETINSTALL = 2 // /usr/x86_64-w64-mingw32/include/shellapi.h:765:1: PRINTACTION_NETINSTALLLINK = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:766:1: PRINTACTION_OPEN = 0 // /usr/x86_64-w64-mingw32/include/shellapi.h:763:1: PRINTACTION_OPENNETPRN = 5 // /usr/x86_64-w64-mingw32/include/shellapi.h:768:1: PRINTACTION_PROPERTIES = 1 // /usr/x86_64-w64-mingw32/include/shellapi.h:764:1: PRINTACTION_SERVERPROPERTIES = 7 // /usr/x86_64-w64-mingw32/include/shellapi.h:770:1: PRINTACTION_TESTPAGE = 4 // /usr/x86_64-w64-mingw32/include/shellapi.h:767:1: PRINTDLGEXORD = 1549 // /usr/x86_64-w64-mingw32/include/dlgs.h:189:1: PRINTDLGORD = 1538 // /usr/x86_64-w64-mingw32/include/dlgs.h:178:1: PRINTER_ACCESS_ADMINISTER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:1276:1: PRINTER_ACCESS_USE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:1277:1: PRINTER_ALL_ACCESS = 983052 // /usr/x86_64-w64-mingw32/include/winspool.h:1286:1: PRINTER_ATTRIBUTE_DEFAULT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:210:1: PRINTER_ATTRIBUTE_DIRECT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:209:1: PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200 // /usr/x86_64-w64-mingw32/include/winspool.h:218:1: PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800 // /usr/x86_64-w64-mingw32/include/winspool.h:221:1: PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080 // /usr/x86_64-w64-mingw32/include/winspool.h:216:1: PRINTER_ATTRIBUTE_FAX = 0x00004000 // /usr/x86_64-w64-mingw32/include/winspool.h:224:1: PRINTER_ATTRIBUTE_HIDDEN = 0x00000020 // /usr/x86_64-w64-mingw32/include/winspool.h:213:1: PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100 // /usr/x86_64-w64-mingw32/include/winspool.h:217:1: PRINTER_ATTRIBUTE_LOCAL = 0x00000040 // /usr/x86_64-w64-mingw32/include/winspool.h:214:1: PRINTER_ATTRIBUTE_NETWORK = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:212:1: PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000 // /usr/x86_64-w64-mingw32/include/winspool.h:223:1: PRINTER_ATTRIBUTE_QUEUED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:208:1: PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000 // /usr/x86_64-w64-mingw32/include/winspool.h:222:1: PRINTER_ATTRIBUTE_SHARED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:211:1: PRINTER_ATTRIBUTE_TS = 0x00008000 // /usr/x86_64-w64-mingw32/include/winspool.h:225:1: PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400 // /usr/x86_64-w64-mingw32/include/winspool.h:220:1: PRINTER_CHANGE_ADD_FORM = 0x00010000 // /usr/x86_64-w64-mingw32/include/winspool.h:1121:1: PRINTER_CHANGE_ADD_JOB = 0x00000100 // /usr/x86_64-w64-mingw32/include/winspool.h:1116:1: PRINTER_CHANGE_ADD_PORT = 0x00100000 // /usr/x86_64-w64-mingw32/include/winspool.h:1125:1: PRINTER_CHANGE_ADD_PRINTER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:1111:1: PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1132:1: PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1129:1: PRINTER_CHANGE_ALL = 0x7777FFFF // /usr/x86_64-w64-mingw32/include/winspool.h:1137:1: PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000 // /usr/x86_64-w64-mingw32/include/winspool.h:1126:1: PRINTER_CHANGE_DELETE_FORM = 0x00040000 // /usr/x86_64-w64-mingw32/include/winspool.h:1123:1: PRINTER_CHANGE_DELETE_JOB = 0x00000400 // /usr/x86_64-w64-mingw32/include/winspool.h:1118:1: PRINTER_CHANGE_DELETE_PORT = 0x00400000 // /usr/x86_64-w64-mingw32/include/winspool.h:1127:1: PRINTER_CHANGE_DELETE_PRINTER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:1113:1: PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1134:1: PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1130:1: PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:1114:1: PRINTER_CHANGE_FORM = 0x00070000 // /usr/x86_64-w64-mingw32/include/winspool.h:1124:1: PRINTER_CHANGE_JOB = 0x0000FF00 // /usr/x86_64-w64-mingw32/include/winspool.h:1120:1: PRINTER_CHANGE_PORT = 0x00700000 // /usr/x86_64-w64-mingw32/include/winspool.h:1128:1: PRINTER_CHANGE_PRINTER = 0x000000FF // /usr/x86_64-w64-mingw32/include/winspool.h:1115:1: PRINTER_CHANGE_PRINTER_DRIVER = 0x70000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1135:1: PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1131:1: PRINTER_CHANGE_SET_FORM = 0x00020000 // /usr/x86_64-w64-mingw32/include/winspool.h:1122:1: PRINTER_CHANGE_SET_JOB = 0x00000200 // /usr/x86_64-w64-mingw32/include/winspool.h:1117:1: PRINTER_CHANGE_SET_PRINTER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:1112:1: PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1133:1: PRINTER_CHANGE_TIMEOUT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1136:1: PRINTER_CHANGE_WRITE_JOB = 0x00000800 // /usr/x86_64-w64-mingw32/include/winspool.h:1119:1: PRINTER_CONTROL_PAUSE = 1 // /usr/x86_64-w64-mingw32/include/winspool.h:177:1: PRINTER_CONTROL_PURGE = 3 // /usr/x86_64-w64-mingw32/include/winspool.h:179:1: PRINTER_CONTROL_RESUME = 2 // /usr/x86_64-w64-mingw32/include/winspool.h:178:1: PRINTER_CONTROL_SET_STATUS = 4 // /usr/x86_64-w64-mingw32/include/winspool.h:180:1: PRINTER_ENUM_CONNECTIONS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:804:1: PRINTER_ENUM_CONTAINER = 0x00008000 // /usr/x86_64-w64-mingw32/include/winspool.h:812:1: PRINTER_ENUM_DEFAULT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:802:1: PRINTER_ENUM_EXPAND = 0x00004000 // /usr/x86_64-w64-mingw32/include/winspool.h:811:1: PRINTER_ENUM_FAVORITE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:805:1: PRINTER_ENUM_HIDE = 0x01000000 // /usr/x86_64-w64-mingw32/include/winspool.h:823:1: PRINTER_ENUM_ICON1 = 0x00010000 // /usr/x86_64-w64-mingw32/include/winspool.h:815:1: PRINTER_ENUM_ICON2 = 0x00020000 // /usr/x86_64-w64-mingw32/include/winspool.h:816:1: PRINTER_ENUM_ICON3 = 0x00040000 // /usr/x86_64-w64-mingw32/include/winspool.h:817:1: PRINTER_ENUM_ICON4 = 0x00080000 // /usr/x86_64-w64-mingw32/include/winspool.h:818:1: PRINTER_ENUM_ICON5 = 0x00100000 // /usr/x86_64-w64-mingw32/include/winspool.h:819:1: PRINTER_ENUM_ICON6 = 0x00200000 // /usr/x86_64-w64-mingw32/include/winspool.h:820:1: PRINTER_ENUM_ICON7 = 0x00400000 // /usr/x86_64-w64-mingw32/include/winspool.h:821:1: PRINTER_ENUM_ICON8 = 0x00800000 // /usr/x86_64-w64-mingw32/include/winspool.h:822:1: PRINTER_ENUM_ICONMASK = 0x00ff0000 // /usr/x86_64-w64-mingw32/include/winspool.h:814:1: PRINTER_ENUM_LOCAL = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:803:1: PRINTER_ENUM_NAME = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:806:1: PRINTER_ENUM_NETWORK = 0x00000040 // /usr/x86_64-w64-mingw32/include/winspool.h:809:1: PRINTER_ENUM_REMOTE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:807:1: PRINTER_ENUM_SHARED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winspool.h:808:1: PRINTER_ERROR_INFORMATION = 0x80000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1161:1: PRINTER_ERROR_JAM = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:1166:1: PRINTER_ERROR_OUTOFPAPER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:1165:1: PRINTER_ERROR_OUTOFTONER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:1167:1: PRINTER_ERROR_SEVERE = 0x20000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1163:1: PRINTER_ERROR_WARNING = 0x40000000 // /usr/x86_64-w64-mingw32/include/winspool.h:1162:1: PRINTER_EXECUTE = 131080 // /usr/x86_64-w64-mingw32/include/winspool.h:1289:1: PRINTER_FONTTYPE = 0x4000 // /usr/x86_64-w64-mingw32/include/commdlg.h:468:1: PRINTER_NOTIFY_FIELD_ATTRIBUTES = 0x0D // /usr/x86_64-w64-mingw32/include/winspool.h:959:1: PRINTER_NOTIFY_FIELD_AVERAGE_PPM = 0x15 // /usr/x86_64-w64-mingw32/include/winspool.h:967:1: PRINTER_NOTIFY_FIELD_BYTES_PRINTED = 0x19 // /usr/x86_64-w64-mingw32/include/winspool.h:971:1: PRINTER_NOTIFY_FIELD_CJOBS = 0x14 // /usr/x86_64-w64-mingw32/include/winspool.h:966:1: PRINTER_NOTIFY_FIELD_COMMENT = 0x05 // /usr/x86_64-w64-mingw32/include/winspool.h:951:1: PRINTER_NOTIFY_FIELD_DATATYPE = 0x0B // /usr/x86_64-w64-mingw32/include/winspool.h:957:1: PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = 0x0F // /usr/x86_64-w64-mingw32/include/winspool.h:961:1: PRINTER_NOTIFY_FIELD_DEVMODE = 0x07 // /usr/x86_64-w64-mingw32/include/winspool.h:953:1: PRINTER_NOTIFY_FIELD_DRIVER_NAME = 0x04 // /usr/x86_64-w64-mingw32/include/winspool.h:950:1: PRINTER_NOTIFY_FIELD_LOCATION = 0x06 // /usr/x86_64-w64-mingw32/include/winspool.h:952:1: PRINTER_NOTIFY_FIELD_OBJECT_GUID = 0x1A // /usr/x86_64-w64-mingw32/include/winspool.h:972:1: PRINTER_NOTIFY_FIELD_PAGES_PRINTED = 0x17 // /usr/x86_64-w64-mingw32/include/winspool.h:969:1: PRINTER_NOTIFY_FIELD_PARAMETERS = 0x0A // /usr/x86_64-w64-mingw32/include/winspool.h:956:1: PRINTER_NOTIFY_FIELD_PORT_NAME = 0x03 // /usr/x86_64-w64-mingw32/include/winspool.h:949:1: PRINTER_NOTIFY_FIELD_PRINTER_NAME = 0x01 // /usr/x86_64-w64-mingw32/include/winspool.h:947:1: PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = 0x09 // /usr/x86_64-w64-mingw32/include/winspool.h:955:1: PRINTER_NOTIFY_FIELD_PRIORITY = 0x0E // /usr/x86_64-w64-mingw32/include/winspool.h:960:1: PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C // /usr/x86_64-w64-mingw32/include/winspool.h:958:1: PRINTER_NOTIFY_FIELD_SEPFILE = 0x08 // /usr/x86_64-w64-mingw32/include/winspool.h:954:1: PRINTER_NOTIFY_FIELD_SERVER_NAME = 0x00 // /usr/x86_64-w64-mingw32/include/winspool.h:946:1: PRINTER_NOTIFY_FIELD_SHARE_NAME = 0x02 // /usr/x86_64-w64-mingw32/include/winspool.h:948:1: PRINTER_NOTIFY_FIELD_START_TIME = 0x10 // /usr/x86_64-w64-mingw32/include/winspool.h:962:1: PRINTER_NOTIFY_FIELD_STATUS = 0x12 // /usr/x86_64-w64-mingw32/include/winspool.h:964:1: PRINTER_NOTIFY_FIELD_STATUS_STRING = 0x13 // /usr/x86_64-w64-mingw32/include/winspool.h:965:1: PRINTER_NOTIFY_FIELD_TOTAL_BYTES = 0x18 // /usr/x86_64-w64-mingw32/include/winspool.h:970:1: PRINTER_NOTIFY_FIELD_TOTAL_PAGES = 0x16 // /usr/x86_64-w64-mingw32/include/winspool.h:968:1: PRINTER_NOTIFY_FIELD_UNTIL_TIME = 0x11 // /usr/x86_64-w64-mingw32/include/winspool.h:963:1: PRINTER_NOTIFY_INFO_DISCARDED = 0x01 // /usr/x86_64-w64-mingw32/include/winspool.h:1017:1: PRINTER_NOTIFY_OPTIONS_REFRESH = 0x01 // /usr/x86_64-w64-mingw32/include/winspool.h:1008:1: PRINTER_NOTIFY_TYPE = 0x00 // /usr/x86_64-w64-mingw32/include/winspool.h:943:1: PRINTER_READ = 131080 // /usr/x86_64-w64-mingw32/include/winspool.h:1287:1: PRINTER_STATUS_BUSY = 0x00000200 // /usr/x86_64-w64-mingw32/include/winspool.h:191:1: PRINTER_STATUS_DOOR_OPEN = 0x00400000 // /usr/x86_64-w64-mingw32/include/winspool.h:204:1: PRINTER_STATUS_ERROR = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:183:1: PRINTER_STATUS_INITIALIZING = 0x00008000 // /usr/x86_64-w64-mingw32/include/winspool.h:197:1: PRINTER_STATUS_IO_ACTIVE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winspool.h:190:1: PRINTER_STATUS_MANUAL_FEED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winspool.h:187:1: PRINTER_STATUS_NOT_AVAILABLE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winspool.h:194:1: PRINTER_STATUS_NO_TONER = 0x00040000 // /usr/x86_64-w64-mingw32/include/winspool.h:200:1: PRINTER_STATUS_OFFLINE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winspool.h:189:1: PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800 // /usr/x86_64-w64-mingw32/include/winspool.h:193:1: PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000 // /usr/x86_64-w64-mingw32/include/winspool.h:203:1: PRINTER_STATUS_PAGE_PUNT = 0x00080000 // /usr/x86_64-w64-mingw32/include/winspool.h:201:1: PRINTER_STATUS_PAPER_JAM = 0x00000008 // /usr/x86_64-w64-mingw32/include/winspool.h:185:1: PRINTER_STATUS_PAPER_OUT = 0x00000010 // /usr/x86_64-w64-mingw32/include/winspool.h:186:1: PRINTER_STATUS_PAPER_PROBLEM = 0x00000040 // /usr/x86_64-w64-mingw32/include/winspool.h:188:1: PRINTER_STATUS_PAUSED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:182:1: PRINTER_STATUS_PENDING_DELETION = 0x00000004 // /usr/x86_64-w64-mingw32/include/winspool.h:184:1: PRINTER_STATUS_POWER_SAVE = 0x01000000 // /usr/x86_64-w64-mingw32/include/winspool.h:206:1: PRINTER_STATUS_PRINTING = 0x00000400 // /usr/x86_64-w64-mingw32/include/winspool.h:192:1: PRINTER_STATUS_PROCESSING = 0x00004000 // /usr/x86_64-w64-mingw32/include/winspool.h:196:1: PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000 // /usr/x86_64-w64-mingw32/include/winspool.h:205:1: PRINTER_STATUS_TONER_LOW = 0x00020000 // /usr/x86_64-w64-mingw32/include/winspool.h:199:1: PRINTER_STATUS_USER_INTERVENTION = 0x00100000 // /usr/x86_64-w64-mingw32/include/winspool.h:202:1: PRINTER_STATUS_WAITING = 0x00002000 // /usr/x86_64-w64-mingw32/include/winspool.h:195:1: PRINTER_STATUS_WARMING_UP = 0x00010000 // /usr/x86_64-w64-mingw32/include/winspool.h:198:1: PRINTER_WRITE = 131080 // /usr/x86_64-w64-mingw32/include/winspool.h:1288:1: PRINTRATEUNIT_CPS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2874:1: PRINTRATEUNIT_IPM = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2876:1: PRINTRATEUNIT_LPM = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2875:1: PRINTRATEUNIT_PPM = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2873:1: PRIVATEKEYBLOB = 0x7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:354:1: PRIVATE_NAMESPACE_FLAG_DESTROY = 0x1 // /usr/x86_64-w64-mingw32/include/namespaceapi.h:18:1: PRIVILEGE_SET_ALL_NECESSARY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3588:1: PRNSETUPDLGORD = 1539 // /usr/x86_64-w64-mingw32/include/dlgs.h:179:1: PROCESSOR_ALPHA_21064 = 21064 // /usr/x86_64-w64-mingw32/include/winnt.h:4701:1: PROCESSOR_AMD_X8664 = 8664 // /usr/x86_64-w64-mingw32/include/winnt.h:4699:1: PROCESSOR_ARCHITECTURE_ALPHA = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4721:1: PROCESSOR_ARCHITECTURE_ALPHA64 = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:4726:1: PROCESSOR_ARCHITECTURE_AMD64 = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:4728:1: PROCESSOR_ARCHITECTURE_ARM = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:4724:1: PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:4732:1: PROCESSOR_ARCHITECTURE_ARM64 = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:4731:1: PROCESSOR_ARCHITECTURE_IA32_ON_ARM64 = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:4733:1: PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:4729:1: PROCESSOR_ARCHITECTURE_IA64 = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:4725:1: PROCESSOR_ARCHITECTURE_INTEL = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4719:1: PROCESSOR_ARCHITECTURE_MIPS = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4720:1: PROCESSOR_ARCHITECTURE_MSIL = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4727:1: PROCESSOR_ARCHITECTURE_NEUTRAL = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:4730:1: PROCESSOR_ARCHITECTURE_PPC = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:4722:1: PROCESSOR_ARCHITECTURE_SHX = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4723:1: PROCESSOR_ARCHITECTURE_UNKNOWN = 0xffff // /usr/x86_64-w64-mingw32/include/winnt.h:4735:1: PROCESSOR_ARM720 = 1824 // /usr/x86_64-w64-mingw32/include/winnt.h:4713:1: PROCESSOR_ARM820 = 2080 // /usr/x86_64-w64-mingw32/include/winnt.h:4714:1: PROCESSOR_ARM920 = 2336 // /usr/x86_64-w64-mingw32/include/winnt.h:4715:1: PROCESSOR_ARM_7TDMI = 70001 // /usr/x86_64-w64-mingw32/include/winnt.h:4716:1: PROCESSOR_HITACHI_SH3 = 10003 // /usr/x86_64-w64-mingw32/include/winnt.h:4706:1: PROCESSOR_HITACHI_SH3E = 10004 // /usr/x86_64-w64-mingw32/include/winnt.h:4707:1: PROCESSOR_HITACHI_SH4 = 10005 // /usr/x86_64-w64-mingw32/include/winnt.h:4708:1: PROCESSOR_IDLESTATE_POLICY_COUNT = 0x3 // /usr/x86_64-w64-mingw32/include/winnt.h:5897:1: PROCESSOR_INTEL_386 = 386 // /usr/x86_64-w64-mingw32/include/winnt.h:4695:1: PROCESSOR_INTEL_486 = 486 // /usr/x86_64-w64-mingw32/include/winnt.h:4696:1: PROCESSOR_INTEL_IA64 = 2200 // /usr/x86_64-w64-mingw32/include/winnt.h:4698:1: PROCESSOR_INTEL_PENTIUM = 586 // /usr/x86_64-w64-mingw32/include/winnt.h:4697:1: PROCESSOR_MIPS_R4000 = 4000 // /usr/x86_64-w64-mingw32/include/winnt.h:4700:1: PROCESSOR_MOTOROLA_821 = 821 // /usr/x86_64-w64-mingw32/include/winnt.h:4709:1: PROCESSOR_OPTIL = 0x494f // /usr/x86_64-w64-mingw32/include/winnt.h:4717:1: PROCESSOR_PERF_BOOST_MODE_AGGRESSIVE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:5209:1: PROCESSOR_PERF_BOOST_MODE_DISABLED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5207:1: PROCESSOR_PERF_BOOST_MODE_EFFICIENT_AGGRESSIVE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:5211:1: PROCESSOR_PERF_BOOST_MODE_EFFICIENT_ENABLED = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:5210:1: PROCESSOR_PERF_BOOST_MODE_ENABLED = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5208:1: PROCESSOR_PERF_BOOST_MODE_MAX = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:5212:1: PROCESSOR_PERF_BOOST_POLICY_DISABLED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:5204:1: PROCESSOR_PERF_BOOST_POLICY_MAX = 100 // /usr/x86_64-w64-mingw32/include/winnt.h:5205:1: PROCESSOR_PPC_601 = 601 // /usr/x86_64-w64-mingw32/include/winnt.h:4702:1: PROCESSOR_PPC_603 = 603 // /usr/x86_64-w64-mingw32/include/winnt.h:4703:1: PROCESSOR_PPC_604 = 604 // /usr/x86_64-w64-mingw32/include/winnt.h:4704:1: PROCESSOR_PPC_620 = 620 // /usr/x86_64-w64-mingw32/include/winnt.h:4705:1: PROCESSOR_SHx_SH3 = 103 // /usr/x86_64-w64-mingw32/include/winnt.h:4710:1: PROCESSOR_SHx_SH4 = 104 // /usr/x86_64-w64-mingw32/include/winnt.h:4711:1: PROCESSOR_STRONGARM = 2577 // /usr/x86_64-w64-mingw32/include/winnt.h:4712:1: PROCESS_ALL_ACCESS = 2035711 // /usr/x86_64-w64-mingw32/include/winnt.h:4056:1: PROCESS_CREATE_PROCESS = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:4046:1: PROCESS_CREATE_THREAD = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4040:1: PROCESS_DUP_HANDLE = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4045:1: PROCESS_HEAP_ENTRY_BUSY = 0x4 // /usr/x86_64-w64-mingw32/include/minwinbase.h:205:1: PROCESS_HEAP_ENTRY_DDESHARE = 0x20 // /usr/x86_64-w64-mingw32/include/minwinbase.h:208:1: PROCESS_HEAP_ENTRY_MOVEABLE = 0x10 // /usr/x86_64-w64-mingw32/include/minwinbase.h:207:1: PROCESS_HEAP_REGION = 0x1 // /usr/x86_64-w64-mingw32/include/minwinbase.h:203:1: PROCESS_HEAP_SEG_ALLOC = 0x8 // /usr/x86_64-w64-mingw32/include/minwinbase.h:206:1: PROCESS_HEAP_UNCOMMITTED_RANGE = 0x2 // /usr/x86_64-w64-mingw32/include/minwinbase.h:204:1: PROCESS_MODE_BACKGROUND_BEGIN = 0x100000 // /usr/x86_64-w64-mingw32/include/winbase.h:397:1: PROCESS_MODE_BACKGROUND_END = 0x200000 // /usr/x86_64-w64-mingw32/include/winbase.h:398:1: PROCESS_QUERY_INFORMATION = 1024 // /usr/x86_64-w64-mingw32/include/winnt.h:4049:1: PROCESS_QUERY_LIMITED_INFORMATION = 4096 // /usr/x86_64-w64-mingw32/include/winnt.h:4051:1: PROCESS_SET_INFORMATION = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:4048:1: PROCESS_SET_QUOTA = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:4047:1: PROCESS_SET_SESSIONID = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4041:1: PROCESS_SUSPEND_RESUME = 2048 // /usr/x86_64-w64-mingw32/include/winnt.h:4050:1: PROCESS_TERMINATE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4039:1: PROCESS_VM_OPERATION = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4042:1: PROCESS_VM_READ = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4043:1: PROCESS_VM_WRITE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4044:1: PROC_IDLE_BUCKET_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:5742:1: PROC_IDLE_BUCKET_COUNT_EX = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:5743:1: PRODUCT_ARM64_SERVER = 0x78 // /usr/x86_64-w64-mingw32/include/winnt.h:844:1: PRODUCT_BUSINESS = 0x6 // /usr/x86_64-w64-mingw32/include/winnt.h:738:1: PRODUCT_BUSINESS_N = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:748:1: PRODUCT_CLOUD_HOST_INFRASTRUCTURE_SERVER = 0x7C // /usr/x86_64-w64-mingw32/include/winnt.h:848:1: PRODUCT_CLOUD_STORAGE_SERVER = 0x6E // /usr/x86_64-w64-mingw32/include/winnt.h:834:1: PRODUCT_CLUSTER_SERVER = 0x12 // /usr/x86_64-w64-mingw32/include/winnt.h:750:1: PRODUCT_CLUSTER_SERVER_V = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:797:1: PRODUCT_CONNECTED_CAR = 0x75 // /usr/x86_64-w64-mingw32/include/winnt.h:841:1: PRODUCT_CORE = 0x65 // /usr/x86_64-w64-mingw32/include/winnt.h:826:1: PRODUCT_CORE_ARM = 0x61 // /usr/x86_64-w64-mingw32/include/winnt.h:821:1: PRODUCT_CORE_CONNECTED = 0x6F // /usr/x86_64-w64-mingw32/include/winnt.h:835:1: PRODUCT_CORE_CONNECTED_COUNTRYSPECIFIC = 0x74 // /usr/x86_64-w64-mingw32/include/winnt.h:840:1: PRODUCT_CORE_CONNECTED_N = 0x71 // /usr/x86_64-w64-mingw32/include/winnt.h:837:1: PRODUCT_CORE_CONNECTED_SINGLELANGUAGE = 0x73 // /usr/x86_64-w64-mingw32/include/winnt.h:839:1: PRODUCT_CORE_COUNTRYSPECIFIC = 0x63 // /usr/x86_64-w64-mingw32/include/winnt.h:823:1: PRODUCT_CORE_LANGUAGESPECIFIC = 0x64 // /usr/x86_64-w64-mingw32/include/winnt.h:825:1: PRODUCT_CORE_N = 0x62 // /usr/x86_64-w64-mingw32/include/winnt.h:822:1: PRODUCT_CORE_SINGLELANGUAGE = 0x64 // /usr/x86_64-w64-mingw32/include/winnt.h:824:1: PRODUCT_DATACENTER_EVALUATION_SERVER = 0x50 // /usr/x86_64-w64-mingw32/include/winnt.h:809:1: PRODUCT_DATACENTER_SERVER = 0x8 // /usr/x86_64-w64-mingw32/include/winnt.h:740:1: PRODUCT_DATACENTER_SERVER_CORE = 0xc // /usr/x86_64-w64-mingw32/include/winnt.h:744:1: PRODUCT_DATACENTER_SERVER_CORE_V = 0x27 // /usr/x86_64-w64-mingw32/include/winnt.h:772:1: PRODUCT_DATACENTER_SERVER_V = 0x25 // /usr/x86_64-w64-mingw32/include/winnt.h:769:1: PRODUCT_EDUCATION = 0x79 // /usr/x86_64-w64-mingw32/include/winnt.h:845:1: PRODUCT_EDUCATION_N = 0x7a // /usr/x86_64-w64-mingw32/include/winnt.h:846:1: PRODUCT_EMBEDDED = 0x41 // /usr/x86_64-w64-mingw32/include/winnt.h:798:1: PRODUCT_EMBEDDED_A = 0x58 // /usr/x86_64-w64-mingw32/include/winnt.h:814:1: PRODUCT_EMBEDDED_AUTOMOTIVE = 0x55 // /usr/x86_64-w64-mingw32/include/winnt.h:811:1: PRODUCT_EMBEDDED_E = 0x5A // /usr/x86_64-w64-mingw32/include/winnt.h:816:1: PRODUCT_EMBEDDED_EVAL = 0x6B // /usr/x86_64-w64-mingw32/include/winnt.h:831:1: PRODUCT_EMBEDDED_E_EVAL = 0x6C // /usr/x86_64-w64-mingw32/include/winnt.h:832:1: PRODUCT_EMBEDDED_INDUSTRY = 0x59 // /usr/x86_64-w64-mingw32/include/winnt.h:815:1: PRODUCT_EMBEDDED_INDUSTRY_A = 0x56 // /usr/x86_64-w64-mingw32/include/winnt.h:812:1: PRODUCT_EMBEDDED_INDUSTRY_A_E = 0x5C // /usr/x86_64-w64-mingw32/include/winnt.h:818:1: PRODUCT_EMBEDDED_INDUSTRY_E = 0x5B // /usr/x86_64-w64-mingw32/include/winnt.h:817:1: PRODUCT_EMBEDDED_INDUSTRY_EVAL = 0x69 // /usr/x86_64-w64-mingw32/include/winnt.h:829:1: PRODUCT_EMBEDDED_INDUSTRY_E_EVAL = 0x6A // /usr/x86_64-w64-mingw32/include/winnt.h:830:1: PRODUCT_ENTERPRISE = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:736:1: PRODUCT_ENTERPRISE_E = 0x46 // /usr/x86_64-w64-mingw32/include/winnt.h:803:1: PRODUCT_ENTERPRISE_EVALUATION = 0x48 // /usr/x86_64-w64-mingw32/include/winnt.h:805:1: PRODUCT_ENTERPRISE_N = 0x1b // /usr/x86_64-w64-mingw32/include/winnt.h:759:1: PRODUCT_ENTERPRISE_N_EVALUATION = 0x54 // /usr/x86_64-w64-mingw32/include/winnt.h:810:1: PRODUCT_ENTERPRISE_S = 0x7D // /usr/x86_64-w64-mingw32/include/winnt.h:849:1: PRODUCT_ENTERPRISE_SERVER = 0xa // /usr/x86_64-w64-mingw32/include/winnt.h:742:1: PRODUCT_ENTERPRISE_SERVER_CORE = 0xe // /usr/x86_64-w64-mingw32/include/winnt.h:746:1: PRODUCT_ENTERPRISE_SERVER_CORE_V = 0x29 // /usr/x86_64-w64-mingw32/include/winnt.h:774:1: PRODUCT_ENTERPRISE_SERVER_IA64 = 0xf // /usr/x86_64-w64-mingw32/include/winnt.h:747:1: PRODUCT_ENTERPRISE_SERVER_V = 0x26 // /usr/x86_64-w64-mingw32/include/winnt.h:771:1: PRODUCT_ENTERPRISE_S_EVALUATION = 0x81 // /usr/x86_64-w64-mingw32/include/winnt.h:853:1: PRODUCT_ENTERPRISE_S_N = 0x7E // /usr/x86_64-w64-mingw32/include/winnt.h:850:1: PRODUCT_ENTERPRISE_S_N_EVALUATION = 0x82 // /usr/x86_64-w64-mingw32/include/winnt.h:854:1: PRODUCT_ESSENTIALBUSINESS_SERVER_ADDL = 0x3C // /usr/x86_64-w64-mingw32/include/winnt.h:793:1: PRODUCT_ESSENTIALBUSINESS_SERVER_ADDLSVC = 0x3E // /usr/x86_64-w64-mingw32/include/winnt.h:795:1: PRODUCT_ESSENTIALBUSINESS_SERVER_MGMT = 0x3B // /usr/x86_64-w64-mingw32/include/winnt.h:792:1: PRODUCT_ESSENTIALBUSINESS_SERVER_MGMTSVC = 0x3D // /usr/x86_64-w64-mingw32/include/winnt.h:794:1: PRODUCT_HOME_BASIC = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:734:1: PRODUCT_HOME_BASIC_E = 0x43 // /usr/x86_64-w64-mingw32/include/winnt.h:800:1: PRODUCT_HOME_BASIC_N = 0x5 // /usr/x86_64-w64-mingw32/include/winnt.h:737:1: PRODUCT_HOME_PREMIUM = 0x3 // /usr/x86_64-w64-mingw32/include/winnt.h:735:1: PRODUCT_HOME_PREMIUM_E = 0x44 // /usr/x86_64-w64-mingw32/include/winnt.h:801:1: PRODUCT_HOME_PREMIUM_N = 0x1a // /usr/x86_64-w64-mingw32/include/winnt.h:758:1: PRODUCT_HOME_PREMIUM_SERVER = 0x22 // /usr/x86_64-w64-mingw32/include/winnt.h:766:1: PRODUCT_HOME_SERVER = 0x13 // /usr/x86_64-w64-mingw32/include/winnt.h:751:1: PRODUCT_HYPERV = 0x2a // /usr/x86_64-w64-mingw32/include/winnt.h:775:1: PRODUCT_ID_LENGTH = 16 // /usr/x86_64-w64-mingw32/include/winioctl.h:990:1: PRODUCT_INDUSTRY_HANDHELD = 0x76 // /usr/x86_64-w64-mingw32/include/winnt.h:842:1: PRODUCT_IOTUAP = 0x7B // /usr/x86_64-w64-mingw32/include/winnt.h:847:1: PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT = 0x1e // /usr/x86_64-w64-mingw32/include/winnt.h:762:1: PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:764:1: PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY = 0x1f // /usr/x86_64-w64-mingw32/include/winnt.h:763:1: PRODUCT_MOBILE_CORE = 0x68 // /usr/x86_64-w64-mingw32/include/winnt.h:828:1: PRODUCT_MOBILE_ENTERPRISE = 0x85 // /usr/x86_64-w64-mingw32/include/winnt.h:855:1: PRODUCT_MULTIPOINT_PREMIUM_SERVER = 0x4D // /usr/x86_64-w64-mingw32/include/winnt.h:807:1: PRODUCT_MULTIPOINT_STANDARD_SERVER = 0x4C // /usr/x86_64-w64-mingw32/include/winnt.h:806:1: PRODUCT_NANO_SERVER = 0x6D // /usr/x86_64-w64-mingw32/include/winnt.h:833:1: PRODUCT_PPI_PRO = 0x77 // /usr/x86_64-w64-mingw32/include/winnt.h:843:1: PRODUCT_PROFESSIONAL = 0x30 // /usr/x86_64-w64-mingw32/include/winnt.h:781:1: PRODUCT_PROFESSIONAL_E = 0x45 // /usr/x86_64-w64-mingw32/include/winnt.h:802:1: PRODUCT_PROFESSIONAL_EMBEDDED = 0x3A // /usr/x86_64-w64-mingw32/include/winnt.h:791:1: PRODUCT_PROFESSIONAL_N = 0x31 // /usr/x86_64-w64-mingw32/include/winnt.h:782:1: PRODUCT_PROFESSIONAL_S = 0x7F // /usr/x86_64-w64-mingw32/include/winnt.h:851:1: PRODUCT_PROFESSIONAL_STUDENT = 0x70 // /usr/x86_64-w64-mingw32/include/winnt.h:836:1: PRODUCT_PROFESSIONAL_STUDENT_N = 0x72 // /usr/x86_64-w64-mingw32/include/winnt.h:838:1: PRODUCT_PROFESSIONAL_S_N = 0x80 // /usr/x86_64-w64-mingw32/include/winnt.h:852:1: PRODUCT_PROFESSIONAL_WMC = 0x67 // /usr/x86_64-w64-mingw32/include/winnt.h:827:1: PRODUCT_SB_SOLUTION_SERVER = 0x32 // /usr/x86_64-w64-mingw32/include/winnt.h:783:1: PRODUCT_SB_SOLUTION_SERVER_EM = 0x36 // /usr/x86_64-w64-mingw32/include/winnt.h:787:1: PRODUCT_SERVER_FOR_SB_SOLUTIONS = 0x33 // /usr/x86_64-w64-mingw32/include/winnt.h:784:1: PRODUCT_SERVER_FOR_SB_SOLUTIONS_EM = 0x37 // /usr/x86_64-w64-mingw32/include/winnt.h:788:1: PRODUCT_SERVER_FOR_SMALLBUSINESS = 0x18 // /usr/x86_64-w64-mingw32/include/winnt.h:756:1: PRODUCT_SERVER_FOR_SMALLBUSINESS_V = 0x23 // /usr/x86_64-w64-mingw32/include/winnt.h:767:1: PRODUCT_SERVER_FOUNDATION = 0x21 // /usr/x86_64-w64-mingw32/include/winnt.h:765:1: PRODUCT_SERVER_V = 0x25 // /usr/x86_64-w64-mingw32/include/winnt.h:770:1: PRODUCT_SMALLBUSINESS_SERVER = 0x9 // /usr/x86_64-w64-mingw32/include/winnt.h:741:1: PRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 0x19 // /usr/x86_64-w64-mingw32/include/winnt.h:757:1: PRODUCT_SMALLBUSINESS_SERVER_PREMIUM_CORE = 0x3f // /usr/x86_64-w64-mingw32/include/winnt.h:796:1: PRODUCT_SOLUTION_EMBEDDEDSERVER = 0x38 // /usr/x86_64-w64-mingw32/include/winnt.h:789:1: PRODUCT_SOLUTION_EMBEDDEDSERVER_CORE = 0x39 // /usr/x86_64-w64-mingw32/include/winnt.h:790:1: PRODUCT_STANDARD_EVALUATION_SERVER = 0x4F // /usr/x86_64-w64-mingw32/include/winnt.h:808:1: PRODUCT_STANDARD_SERVER = 0x7 // /usr/x86_64-w64-mingw32/include/winnt.h:739:1: PRODUCT_STANDARD_SERVER_CORE = 0xd // /usr/x86_64-w64-mingw32/include/winnt.h:745:1: PRODUCT_STANDARD_SERVER_CORE_V = 0x28 // /usr/x86_64-w64-mingw32/include/winnt.h:773:1: PRODUCT_STANDARD_SERVER_SOLUTIONS = 0x34 // /usr/x86_64-w64-mingw32/include/winnt.h:785:1: PRODUCT_STANDARD_SERVER_SOLUTIONS_CORE = 0x35 // /usr/x86_64-w64-mingw32/include/winnt.h:786:1: PRODUCT_STANDARD_SERVER_V = 0x24 // /usr/x86_64-w64-mingw32/include/winnt.h:768:1: PRODUCT_STARTER = 0xb // /usr/x86_64-w64-mingw32/include/winnt.h:743:1: PRODUCT_STARTER_E = 0x42 // /usr/x86_64-w64-mingw32/include/winnt.h:799:1: PRODUCT_STARTER_N = 0x2f // /usr/x86_64-w64-mingw32/include/winnt.h:780:1: PRODUCT_STORAGE_ENTERPRISE_SERVER = 0x17 // /usr/x86_64-w64-mingw32/include/winnt.h:755:1: PRODUCT_STORAGE_ENTERPRISE_SERVER_CORE = 0x2e // /usr/x86_64-w64-mingw32/include/winnt.h:779:1: PRODUCT_STORAGE_EXPRESS_SERVER = 0x14 // /usr/x86_64-w64-mingw32/include/winnt.h:752:1: PRODUCT_STORAGE_EXPRESS_SERVER_CORE = 0x2b // /usr/x86_64-w64-mingw32/include/winnt.h:776:1: PRODUCT_STORAGE_STANDARD_EVALUATION_SERVER = 0x60 // /usr/x86_64-w64-mingw32/include/winnt.h:820:1: PRODUCT_STORAGE_STANDARD_SERVER = 0x15 // /usr/x86_64-w64-mingw32/include/winnt.h:753:1: PRODUCT_STORAGE_STANDARD_SERVER_CORE = 0x2c // /usr/x86_64-w64-mingw32/include/winnt.h:777:1: PRODUCT_STORAGE_WORKGROUP_EVALUATION_SERVER = 0x5F // /usr/x86_64-w64-mingw32/include/winnt.h:819:1: PRODUCT_STORAGE_WORKGROUP_SERVER = 0x16 // /usr/x86_64-w64-mingw32/include/winnt.h:754:1: PRODUCT_STORAGE_WORKGROUP_SERVER_CORE = 0x2d // /usr/x86_64-w64-mingw32/include/winnt.h:778:1: PRODUCT_THINPC = 0x57 // /usr/x86_64-w64-mingw32/include/winnt.h:813:1: PRODUCT_ULTIMATE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:733:1: PRODUCT_ULTIMATE_E = 0x47 // /usr/x86_64-w64-mingw32/include/winnt.h:804:1: PRODUCT_ULTIMATE_N = 0x1c // /usr/x86_64-w64-mingw32/include/winnt.h:760:1: PRODUCT_UNDEFINED = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:731:1: PRODUCT_UNLICENSED = 0xabcdabcd // /usr/x86_64-w64-mingw32/include/winnt.h:857:1: PRODUCT_WEB_SERVER = 0x11 // /usr/x86_64-w64-mingw32/include/winnt.h:749:1: PRODUCT_WEB_SERVER_CORE = 0x1d // /usr/x86_64-w64-mingw32/include/winnt.h:761:1: PROFILE_EMBEDDED = 77 // /usr/x86_64-w64-mingw32/include/wingdi.h:661:1: PROFILE_KERNEL = 0x20000000 // /usr/x86_64-w64-mingw32/include/winbase.h:404:1: PROFILE_LINKED = 76 // /usr/x86_64-w64-mingw32/include/wingdi.h:660:1: PROFILE_SERVER = 0x40000000 // /usr/x86_64-w64-mingw32/include/winbase.h:405:1: PROFILE_USER = 0x10000000 // /usr/x86_64-w64-mingw32/include/winbase.h:403:1: PROGRESS_CANCEL = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:101:1: PROGRESS_CONTINUE = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:100:1: PROGRESS_QUIET = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:103:1: PROGRESS_STOP = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:102:1: PROOF_QUALITY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1144:1: PROPERTYKEY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:571:1: PROPSETFLAG_ANSI = 2 // /usr/x86_64-w64-mingw32/include/propidl.h:107:1: PROPSETFLAG_CASE_SENSITIVE = 8 // /usr/x86_64-w64-mingw32/include/propidl.h:111:1: PROPSETFLAG_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:103:1: PROPSETFLAG_NONSIMPLE = 1 // /usr/x86_64-w64-mingw32/include/propidl.h:105:1: PROPSETFLAG_UNBUFFERED = 4 // /usr/x86_64-w64-mingw32/include/propidl.h:109:1: PROPSETHDR_OSVERSION_UNKNOWN = 0xffffffff // /usr/x86_64-w64-mingw32/include/propidl.h:441:1: PROPSET_BEHAVIOR_CASE_SENSITIVE = 1 // /usr/x86_64-w64-mingw32/include/propidl.h:114:1: PROP_LG_CXDLG = 252 // /usr/x86_64-w64-mingw32/include/prsht.h:477:1: PROP_LG_CYDLG = 218 // /usr/x86_64-w64-mingw32/include/prsht.h:478:1: PROP_MED_CXDLG = 227 // /usr/x86_64-w64-mingw32/include/prsht.h:474:1: PROP_MED_CYDLG = 215 // /usr/x86_64-w64-mingw32/include/prsht.h:475:1: PROP_SM_CXDLG = 212 // /usr/x86_64-w64-mingw32/include/prsht.h:471:1: PROP_SM_CYDLG = 188 // /usr/x86_64-w64-mingw32/include/prsht.h:472:1: PROTECTED_DACL_SECURITY_INFORMATION = 2147483648 // /usr/x86_64-w64-mingw32/include/winnt.h:4019:1: PROTECTED_SACL_SECURITY_INFORMATION = 1073741824 // /usr/x86_64-w64-mingw32/include/winnt.h:4020:1: PROTOCOLFLAG_NO_PICS_CHECK = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:6514:1: PROVIDER_KEEPS_VALUE_LENGTH = 0x1 // /usr/x86_64-w64-mingw32/include/winreg.h:61:1: PROV_DH_SCHANNEL = 18 // /usr/x86_64-w64-mingw32/include/wincrypt.h:552:1: PROV_DSS = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:537:1: PROV_DSS_DH = 13 // /usr/x86_64-w64-mingw32/include/wincrypt.h:547:1: PROV_EC_ECDSA_FULL = 16 // /usr/x86_64-w64-mingw32/include/wincrypt.h:550:1: PROV_EC_ECDSA_SIG = 14 // /usr/x86_64-w64-mingw32/include/wincrypt.h:548:1: PROV_EC_ECNRA_FULL = 17 // /usr/x86_64-w64-mingw32/include/wincrypt.h:551:1: PROV_EC_ECNRA_SIG = 15 // /usr/x86_64-w64-mingw32/include/wincrypt.h:549:1: PROV_FORTEZZA = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:538:1: PROV_INTEL_SEC = 22 // /usr/x86_64-w64-mingw32/include/wincrypt.h:555:1: PROV_MS_EXCHANGE = 5 // /usr/x86_64-w64-mingw32/include/wincrypt.h:539:1: PROV_REPLACE_OWF = 23 // /usr/x86_64-w64-mingw32/include/wincrypt.h:557:1: PROV_RNG = 21 // /usr/x86_64-w64-mingw32/include/wincrypt.h:554:1: PROV_RSA_AES = 24 // /usr/x86_64-w64-mingw32/include/wincrypt.h:558:1: PROV_RSA_FULL = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:535:1: PROV_RSA_SCHANNEL = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:546:1: PROV_RSA_SIG = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:536:1: PROV_SPYRUS_LYNKS = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:553:1: PROV_SSL = 6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:540:1: PROV_STT_ACQ = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:542:1: PROV_STT_BRND = 9 // /usr/x86_64-w64-mingw32/include/wincrypt.h:543:1: PROV_STT_ISS = 11 // /usr/x86_64-w64-mingw32/include/wincrypt.h:545:1: PROV_STT_MER = 7 // /usr/x86_64-w64-mingw32/include/wincrypt.h:541:1: PROV_STT_ROOT = 10 // /usr/x86_64-w64-mingw32/include/wincrypt.h:544:1: PRSPEC_INVALID = 4294967295 // /usr/x86_64-w64-mingw32/include/propidl.h:417:1: PRSPEC_LPWSTR = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:419:1: PRSPEC_PROPID = 1 // /usr/x86_64-w64-mingw32/include/propidl.h:421:1: PR_JOBSTATUS = 0x0000 // /usr/x86_64-w64-mingw32/include/wingdi.h:424:1: PSBTN_APPLYNOW = 4 // /usr/x86_64-w64-mingw32/include/prsht.h:402:1: PSBTN_BACK = 0 // /usr/x86_64-w64-mingw32/include/prsht.h:398:1: PSBTN_CANCEL = 5 // /usr/x86_64-w64-mingw32/include/prsht.h:403:1: PSBTN_FINISH = 2 // /usr/x86_64-w64-mingw32/include/prsht.h:400:1: PSBTN_HELP = 6 // /usr/x86_64-w64-mingw32/include/prsht.h:404:1: PSBTN_MAX = 6 // /usr/x86_64-w64-mingw32/include/prsht.h:405:1: PSBTN_NEXT = 1 // /usr/x86_64-w64-mingw32/include/prsht.h:399:1: PSBTN_OK = 3 // /usr/x86_64-w64-mingw32/include/prsht.h:401:1: PSCB_BUTTONPRESSED = 3 // /usr/x86_64-w64-mingw32/include/prsht.h:310:1: PSCB_INITIALIZED = 1 // /usr/x86_64-w64-mingw32/include/prsht.h:308:1: PSCB_PRECREATE = 2 // /usr/x86_64-w64-mingw32/include/prsht.h:309:1: PSD_DEFAULTMINMARGINS = 0x0 // /usr/x86_64-w64-mingw32/include/commdlg.h:761:1: PSD_DISABLEMARGINS = 0x10 // /usr/x86_64-w64-mingw32/include/commdlg.h:767:1: PSD_DISABLEORIENTATION = 0x100 // /usr/x86_64-w64-mingw32/include/commdlg.h:770:1: PSD_DISABLEPAGEPAINTING = 0x80000 // /usr/x86_64-w64-mingw32/include/commdlg.h:778:1: PSD_DISABLEPAPER = 0x200 // /usr/x86_64-w64-mingw32/include/commdlg.h:772:1: PSD_DISABLEPRINTER = 0x20 // /usr/x86_64-w64-mingw32/include/commdlg.h:768:1: PSD_ENABLEPAGEPAINTHOOK = 0x40000 // /usr/x86_64-w64-mingw32/include/commdlg.h:777:1: PSD_ENABLEPAGESETUPHOOK = 0x2000 // /usr/x86_64-w64-mingw32/include/commdlg.h:774:1: PSD_ENABLEPAGESETUPTEMPLATE = 0x8000 // /usr/x86_64-w64-mingw32/include/commdlg.h:775:1: PSD_ENABLEPAGESETUPTEMPLATEHANDLE = 0x20000 // /usr/x86_64-w64-mingw32/include/commdlg.h:776:1: PSD_INHUNDREDTHSOFMILLIMETERS = 0x8 // /usr/x86_64-w64-mingw32/include/commdlg.h:766:1: PSD_INTHOUSANDTHSOFINCHES = 0x4 // /usr/x86_64-w64-mingw32/include/commdlg.h:765:1: PSD_INWININIINTLMEASURE = 0x0 // /usr/x86_64-w64-mingw32/include/commdlg.h:762:1: PSD_MARGINS = 0x2 // /usr/x86_64-w64-mingw32/include/commdlg.h:764:1: PSD_MINMARGINS = 0x1 // /usr/x86_64-w64-mingw32/include/commdlg.h:763:1: PSD_NONETWORKBUTTON = 0x200000 // /usr/x86_64-w64-mingw32/include/commdlg.h:779:1: PSD_NOWARNING = 0x80 // /usr/x86_64-w64-mingw32/include/commdlg.h:769:1: PSD_RETURNDEFAULT = 0x400 // /usr/x86_64-w64-mingw32/include/commdlg.h:771:1: PSD_SHOWHELP = 0x800 // /usr/x86_64-w64-mingw32/include/commdlg.h:773:1: PSH_DEFAULT = 0x00000000 // /usr/x86_64-w64-mingw32/include/prsht.h:200:1: PSH_HASHELP = 0x00000200 // /usr/x86_64-w64-mingw32/include/prsht.h:210:1: PSH_HEADER = 0x00080000 // /usr/x86_64-w64-mingw32/include/prsht.h:220:1: PSH_MODELESS = 0x00000400 // /usr/x86_64-w64-mingw32/include/prsht.h:211:1: PSH_NOAPPLYNOW = 0x00000080 // /usr/x86_64-w64-mingw32/include/prsht.h:208:1: PSH_NOCONTEXTHELP = 0x02000000 // /usr/x86_64-w64-mingw32/include/prsht.h:225:1: PSH_PROPSHEETPAGE = 0x00000008 // /usr/x86_64-w64-mingw32/include/prsht.h:204:1: PSH_PROPTITLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/prsht.h:201:1: PSH_RTLREADING = 0x00000800 // /usr/x86_64-w64-mingw32/include/prsht.h:212:1: PSH_STRETCHWATERMARK = 0x00040000 // /usr/x86_64-w64-mingw32/include/prsht.h:219:1: PSH_USECALLBACK = 0x00000100 // /usr/x86_64-w64-mingw32/include/prsht.h:209:1: PSH_USEHBMHEADER = 0x00100000 // /usr/x86_64-w64-mingw32/include/prsht.h:221:1: PSH_USEHBMWATERMARK = 0x00010000 // /usr/x86_64-w64-mingw32/include/prsht.h:217:1: PSH_USEHICON = 0x00000002 // /usr/x86_64-w64-mingw32/include/prsht.h:202:1: PSH_USEHPLWATERMARK = 0x00020000 // /usr/x86_64-w64-mingw32/include/prsht.h:218:1: PSH_USEICONID = 0x00000004 // /usr/x86_64-w64-mingw32/include/prsht.h:203:1: PSH_USEPAGELANG = 0x00200000 // /usr/x86_64-w64-mingw32/include/prsht.h:222:1: PSH_USEPSTARTPAGE = 0x00000040 // /usr/x86_64-w64-mingw32/include/prsht.h:207:1: PSH_WATERMARK = 0x00008000 // /usr/x86_64-w64-mingw32/include/prsht.h:216:1: PSH_WIZARD = 0x00000020 // /usr/x86_64-w64-mingw32/include/prsht.h:206:1: PSH_WIZARD97 = 0x01000000 // /usr/x86_64-w64-mingw32/include/prsht.h:215:1: PSH_WIZARDCONTEXTHELP = 0x00001000 // /usr/x86_64-w64-mingw32/include/prsht.h:213:1: PSH_WIZARDHASFINISH = 0x00000010 // /usr/x86_64-w64-mingw32/include/prsht.h:205:1: PSH_WIZARD_LITE = 0x00400000 // /usr/x86_64-w64-mingw32/include/prsht.h:224:1: PSIDENT_GDICENTRIC = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:331:1: PSIDENT_PSCENTRIC = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:332:1: PSINJECT_BEGINDEFAULTS = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:355:1: PSINJECT_BEGINPAGESETUP = 101 // /usr/x86_64-w64-mingw32/include/wingdi.h:367:1: PSINJECT_BEGINPROLOG = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:357:1: PSINJECT_BEGINSETUP = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:359:1: PSINJECT_BEGINSTREAM = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:342:1: PSINJECT_BOUNDINGBOX = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:351:1: PSINJECT_COMMENTS = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:354:1: PSINJECT_DLFONT = 0xdddddddd // /usr/x86_64-w64-mingw32/include/wingdi.h:379:1: PSINJECT_DOCNEEDEDRES = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:347:1: PSINJECT_DOCSUPPLIEDRES = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:348:1: PSINJECT_DOCUMENTPROCESSCOLORS = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:352:1: PSINJECT_DOCUMENTPROCESSCOLORSATEND = 21 // /usr/x86_64-w64-mingw32/include/wingdi.h:364:1: PSINJECT_ENDDEFAULTS = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:356:1: PSINJECT_ENDPAGECOMMENTS = 107 // /usr/x86_64-w64-mingw32/include/wingdi.h:374:1: PSINJECT_ENDPAGESETUP = 102 // /usr/x86_64-w64-mingw32/include/wingdi.h:368:1: PSINJECT_ENDPROLOG = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:358:1: PSINJECT_ENDSETUP = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:360:1: PSINJECT_ENDSTREAM = 20 // /usr/x86_64-w64-mingw32/include/wingdi.h:363:1: PSINJECT_EOF = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:362:1: PSINJECT_ORIENTATION = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:350:1: PSINJECT_PAGEBBOX = 106 // /usr/x86_64-w64-mingw32/include/wingdi.h:373:1: PSINJECT_PAGENUMBER = 100 // /usr/x86_64-w64-mingw32/include/wingdi.h:366:1: PSINJECT_PAGEORDER = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:349:1: PSINJECT_PAGES = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:345:1: PSINJECT_PAGESATEND = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:344:1: PSINJECT_PAGETRAILER = 103 // /usr/x86_64-w64-mingw32/include/wingdi.h:369:1: PSINJECT_PLATECOLOR = 104 // /usr/x86_64-w64-mingw32/include/wingdi.h:370:1: PSINJECT_PSADOBE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:343:1: PSINJECT_SHOWPAGE = 105 // /usr/x86_64-w64-mingw32/include/wingdi.h:372:1: PSINJECT_TRAILER = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:361:1: PSINJECT_VMRESTORE = 201 // /usr/x86_64-w64-mingw32/include/wingdi.h:377:1: PSINJECT_VMSAVE = 200 // /usr/x86_64-w64-mingw32/include/wingdi.h:376:1: PSM_ADDPAGE = 1127 // /usr/x86_64-w64-mingw32/include/prsht.h:356:1: PSM_APPLY = 1134 // /usr/x86_64-w64-mingw32/include/prsht.h:377:1: PSM_CANCELTOCLOSE = 1131 // /usr/x86_64-w64-mingw32/include/prsht.h:368:1: PSM_CHANGED = 1128 // /usr/x86_64-w64-mingw32/include/prsht.h:359:1: PSM_GETCURRENTPAGEHWND = 1142 // /usr/x86_64-w64-mingw32/include/prsht.h:423:1: PSM_GETRESULT = 1159 // /usr/x86_64-w64-mingw32/include/prsht.h:455:1: PSM_GETTABCONTROL = 1140 // /usr/x86_64-w64-mingw32/include/prsht.h:417:1: PSM_HWNDTOINDEX = 1153 // /usr/x86_64-w64-mingw32/include/prsht.h:443:1: PSM_IDTOINDEX = 1157 // /usr/x86_64-w64-mingw32/include/prsht.h:451:1: PSM_INDEXTOHWND = 1154 // /usr/x86_64-w64-mingw32/include/prsht.h:445:1: PSM_INDEXTOID = 1158 // /usr/x86_64-w64-mingw32/include/prsht.h:453:1: PSM_INDEXTOPAGE = 1156 // /usr/x86_64-w64-mingw32/include/prsht.h:449:1: PSM_INSERTPAGE = 1143 // /usr/x86_64-w64-mingw32/include/prsht.h:426:1: PSM_ISDIALOGMESSAGE = 1141 // /usr/x86_64-w64-mingw32/include/prsht.h:420:1: PSM_PAGETOINDEX = 1155 // /usr/x86_64-w64-mingw32/include/prsht.h:447:1: PSM_PRESSBUTTON = 1137 // /usr/x86_64-w64-mingw32/include/prsht.h:395:1: PSM_QUERYSIBLINGS = 1132 // /usr/x86_64-w64-mingw32/include/prsht.h:371:1: PSM_REBOOTSYSTEM = 1130 // /usr/x86_64-w64-mingw32/include/prsht.h:365:1: PSM_RECALCPAGESIZES = 1160 // /usr/x86_64-w64-mingw32/include/prsht.h:457:1: PSM_REMOVEPAGE = 1126 // /usr/x86_64-w64-mingw32/include/prsht.h:353:1: PSM_RESTARTWINDOWS = 1129 // /usr/x86_64-w64-mingw32/include/prsht.h:362:1: PSM_SETCURSEL = 1125 // /usr/x86_64-w64-mingw32/include/prsht.h:350:1: PSM_SETCURSELID = 1138 // /usr/x86_64-w64-mingw32/include/prsht.h:407:1: PSM_SETFINISHTEXT = 1139 // /usr/x86_64-w64-mingw32/include/prsht.h:413:1: PSM_SETFINISHTEXTA = 1139 // /usr/x86_64-w64-mingw32/include/prsht.h:410:1: PSM_SETFINISHTEXTW = 1145 // /usr/x86_64-w64-mingw32/include/prsht.h:411:1: PSM_SETHEADERSUBTITLE = 1151 // /usr/x86_64-w64-mingw32/include/prsht.h:439:1: PSM_SETHEADERSUBTITLEA = 1151 // /usr/x86_64-w64-mingw32/include/prsht.h:436:1: PSM_SETHEADERSUBTITLEW = 1152 // /usr/x86_64-w64-mingw32/include/prsht.h:437:1: PSM_SETHEADERTITLE = 1149 // /usr/x86_64-w64-mingw32/include/prsht.h:432:1: PSM_SETHEADERTITLEA = 1149 // /usr/x86_64-w64-mingw32/include/prsht.h:429:1: PSM_SETHEADERTITLEW = 1150 // /usr/x86_64-w64-mingw32/include/prsht.h:430:1: PSM_SETTITLE = 1135 // /usr/x86_64-w64-mingw32/include/prsht.h:383:1: PSM_SETTITLEA = 1135 // /usr/x86_64-w64-mingw32/include/prsht.h:380:1: PSM_SETTITLEW = 1144 // /usr/x86_64-w64-mingw32/include/prsht.h:381:1: PSM_SETWIZBUTTONS = 1136 // /usr/x86_64-w64-mingw32/include/prsht.h:387:1: PSM_UNCHANGED = 1133 // /usr/x86_64-w64-mingw32/include/prsht.h:374:1: PSNRET_INVALID = 1 // /usr/x86_64-w64-mingw32/include/prsht.h:346:1: PSNRET_INVALID_NOCHANGEPAGE = 2 // /usr/x86_64-w64-mingw32/include/prsht.h:347:1: PSNRET_MESSAGEHANDLED = 3 // /usr/x86_64-w64-mingw32/include/prsht.h:348:1: PSNRET_NOERROR = 0 // /usr/x86_64-w64-mingw32/include/prsht.h:345:1: PSN_APPLY = 18446744073709551414 // /usr/x86_64-w64-mingw32/include/prsht.h:334:1: PSN_FIRST = 18446744073709551416 // /usr/x86_64-w64-mingw32/include/prsht.h:329:1: PSN_GETOBJECT = 18446744073709551406 // /usr/x86_64-w64-mingw32/include/prsht.h:341:1: PSN_HELP = 18446744073709551411 // /usr/x86_64-w64-mingw32/include/prsht.h:336:1: PSN_KILLACTIVE = 18446744073709551415 // /usr/x86_64-w64-mingw32/include/prsht.h:333:1: PSN_LAST = 18446744073709551317 // /usr/x86_64-w64-mingw32/include/prsht.h:330:1: PSN_QUERYCANCEL = 18446744073709551407 // /usr/x86_64-w64-mingw32/include/prsht.h:340:1: PSN_QUERYINITIALFOCUS = 18446744073709551403 // /usr/x86_64-w64-mingw32/include/prsht.h:343:1: PSN_RESET = 18446744073709551413 // /usr/x86_64-w64-mingw32/include/prsht.h:335:1: PSN_SETACTIVE = 18446744073709551416 // /usr/x86_64-w64-mingw32/include/prsht.h:332:1: PSN_TRANSLATEACCELERATOR = 18446744073709551404 // /usr/x86_64-w64-mingw32/include/prsht.h:342:1: PSN_WIZBACK = 18446744073709551410 // /usr/x86_64-w64-mingw32/include/prsht.h:337:1: PSN_WIZFINISH = 18446744073709551408 // /usr/x86_64-w64-mingw32/include/prsht.h:339:1: PSN_WIZNEXT = 18446744073709551409 // /usr/x86_64-w64-mingw32/include/prsht.h:338:1: PSPCB_ADDREF = 0 // /usr/x86_64-w64-mingw32/include/prsht.h:76:1: PSPCB_CREATE = 2 // /usr/x86_64-w64-mingw32/include/prsht.h:78:1: PSPCB_RELEASE = 1 // /usr/x86_64-w64-mingw32/include/prsht.h:77:1: PSPROTOCOL_ASCII = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:407:1: PSPROTOCOL_BCP = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:408:1: PSPROTOCOL_BINARY = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:410:1: PSPROTOCOL_TBCP = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:409:1: PSP_DEFAULT = 0x00000000 // /usr/x86_64-w64-mingw32/include/prsht.h:59:1: PSP_DLGINDIRECT = 0x00000001 // /usr/x86_64-w64-mingw32/include/prsht.h:60:1: PSP_HASHELP = 0x00000020 // /usr/x86_64-w64-mingw32/include/prsht.h:66:1: PSP_HIDEHEADER = 0x00000800 // /usr/x86_64-w64-mingw32/include/prsht.h:71:1: PSP_PREMATURE = 0x00000400 // /usr/x86_64-w64-mingw32/include/prsht.h:69:1: PSP_RTLREADING = 0x00000010 // /usr/x86_64-w64-mingw32/include/prsht.h:64:1: PSP_USECALLBACK = 0x00000080 // /usr/x86_64-w64-mingw32/include/prsht.h:68:1: PSP_USEFUSIONCONTEXT = 0x00004000 // /usr/x86_64-w64-mingw32/include/prsht.h:74:1: PSP_USEHEADERSUBTITLE = 0x00002000 // /usr/x86_64-w64-mingw32/include/prsht.h:73:1: PSP_USEHEADERTITLE = 0x00001000 // /usr/x86_64-w64-mingw32/include/prsht.h:72:1: PSP_USEHICON = 0x00000002 // /usr/x86_64-w64-mingw32/include/prsht.h:61:1: PSP_USEICONID = 0x00000004 // /usr/x86_64-w64-mingw32/include/prsht.h:62:1: PSP_USEREFPARENT = 0x00000040 // /usr/x86_64-w64-mingw32/include/prsht.h:67:1: PSP_USETITLE = 0x00000008 // /usr/x86_64-w64-mingw32/include/prsht.h:63:1: PSWIZB_BACK = 0x00000001 // /usr/x86_64-w64-mingw32/include/prsht.h:390:1: PSWIZB_DISABLEDFINISH = 0x00000008 // /usr/x86_64-w64-mingw32/include/prsht.h:393:1: PSWIZB_FINISH = 0x00000004 // /usr/x86_64-w64-mingw32/include/prsht.h:392:1: PSWIZB_NEXT = 0x00000002 // /usr/x86_64-w64-mingw32/include/prsht.h:391:1: PS_ALTERNATE = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1491:1: PS_COSMETIC = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1504:1: PS_DASH = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1484:1: PS_DASHDOT = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1486:1: PS_DASHDOTDOT = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1487:1: PS_DOT = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1485:1: PS_ENDCAP_FLAT = 0x00000200 // /usr/x86_64-w64-mingw32/include/wingdi.h:1496:1: PS_ENDCAP_MASK = 0x00000F00 // /usr/x86_64-w64-mingw32/include/wingdi.h:1497:1: PS_ENDCAP_ROUND = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1494:1: PS_ENDCAP_SQUARE = 0x00000100 // /usr/x86_64-w64-mingw32/include/wingdi.h:1495:1: PS_GEOMETRIC = 0x00010000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1505:1: PS_INSIDEFRAME = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1489:1: PS_JOIN_BEVEL = 0x00001000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1500:1: PS_JOIN_MASK = 0x0000F000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1502:1: PS_JOIN_MITER = 0x00002000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1501:1: PS_JOIN_ROUND = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1499:1: PS_NULL = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:1488:1: PS_OPENTYPE_FONTTYPE = 0x10000 // /usr/x86_64-w64-mingw32/include/commdlg.h:475:1: PS_SOLID = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1483:1: PS_STYLE_MASK = 0x0000000F // /usr/x86_64-w64-mingw32/include/wingdi.h:1492:1: PS_TYPE_MASK = 0x000F0000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1506:1: PS_USERSTYLE = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:1490:1: PTF_INTKEY = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65386:1: PTF_LEAF = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65389:1: PTF_LEAFDATA = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65388:1: PTF_ZERODATA = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65387:1: PTRMAP_BTREE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65789:1: PTRMAP_FREEPAGE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65786:1: PTRMAP_OVERFLOW1 = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65787:1: PTRMAP_OVERFLOW2 = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65788:1: PTRMAP_ROOTPAGE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65785:1: PT_BEZIERTO = 0x04 // /usr/x86_64-w64-mingw32/include/wingdi.h:1419:1: PT_CLOSEFIGURE = 0x01 // /usr/x86_64-w64-mingw32/include/wingdi.h:1417:1: PT_LINETO = 0x02 // /usr/x86_64-w64-mingw32/include/wingdi.h:1418:1: PT_MOVETO = 0x06 // /usr/x86_64-w64-mingw32/include/wingdi.h:1420:1: PUBLICKEYBLOB = 0x6 // /usr/x86_64-w64-mingw32/include/wincrypt.h:353:1: PUBLICKEYBLOBEX = 0xa // /usr/x86_64-w64-mingw32/include/wincrypt.h:357:1: PURE = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:104:1: PURGE_RXABORT = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:544:1: PURGE_RXCLEAR = 0x8 // /usr/x86_64-w64-mingw32/include/winbase.h:546:1: PURGE_TXABORT = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:543:1: PURGE_TXCLEAR = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:545:1: PWR_CRITICALRESUME = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1109:1: PWR_FAIL = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:1106:1: PWR_OK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1105:1: PWR_SUSPENDREQUEST = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1107:1: PWR_SUSPENDRESUME = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1108:1: PW_CLIENTONLY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2244:1: P_DETACH = 4 // /usr/x86_64-w64-mingw32/include/process.h:151:1: P_NOWAIT = 1 // /usr/x86_64-w64-mingw32/include/process.h:147:1: P_NOWAITO = 3 // /usr/x86_64-w64-mingw32/include/process.h:150:1: P_OVERLAY = 2 // /usr/x86_64-w64-mingw32/include/process.h:148:1: P_WAIT = 0 // /usr/x86_64-w64-mingw32/include/process.h:146:1: PragFlg_NeedSchema = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129907:1: PragFlg_NoColumns = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129908:1: PragFlg_NoColumns1 = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129909:1: PragFlg_ReadOnly = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129910:1: PragFlg_Result0 = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129911:1: PragFlg_Result1 = 0x20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129912:1: PragFlg_SchemaOpt = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129913:1: PragFlg_SchemaReq = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129914:1: PragTyp_ACTIVATE_EXTENSIONS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129859:1: PragTyp_ANALYSIS_LIMIT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129860:1: PragTyp_AUTO_VACUUM = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129862:1: PragTyp_BUSY_TIMEOUT = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129864:1: PragTyp_CACHE_SIZE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129865:1: PragTyp_CACHE_SPILL = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129866:1: PragTyp_CASE_SENSITIVE_LIKE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129867:1: PragTyp_COLLATION_LIST = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129868:1: PragTyp_COMPILE_OPTIONS = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129869:1: PragTyp_DATABASE_LIST = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129871:1: PragTyp_DATA_STORE_DIRECTORY = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129870:1: PragTyp_DEFAULT_CACHE_SIZE = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129872:1: PragTyp_ENCODING = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129873:1: PragTyp_FLAG = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129863:1: PragTyp_FOREIGN_KEY_CHECK = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129874:1: PragTyp_FOREIGN_KEY_LIST = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129875:1: PragTyp_FUNCTION_LIST = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129876:1: PragTyp_HARD_HEAP_LIMIT = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129877:1: PragTyp_HEADER_VALUE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129861:1: PragTyp_INCREMENTAL_VACUUM = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129878:1: PragTyp_INDEX_INFO = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129879:1: PragTyp_INDEX_LIST = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129880:1: PragTyp_INTEGRITY_CHECK = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129881:1: PragTyp_JOURNAL_MODE = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129882:1: PragTyp_JOURNAL_SIZE_LIMIT = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129883:1: PragTyp_LOCKING_MODE = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129885:1: PragTyp_LOCK_PROXY_FILE = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129884:1: PragTyp_LOCK_STATUS = 44 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129903:1: PragTyp_MMAP_SIZE = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129887:1: PragTyp_MODULE_LIST = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129888:1: PragTyp_OPTIMIZE = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129889:1: PragTyp_PAGE_COUNT = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129886:1: PragTyp_PAGE_SIZE = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129890:1: PragTyp_PRAGMA_LIST = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129891:1: PragTyp_SECURE_DELETE = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129892:1: PragTyp_SHRINK_MEMORY = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129893:1: PragTyp_SOFT_HEAP_LIMIT = 35 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129894:1: PragTyp_STATS = 45 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129904:1: PragTyp_SYNCHRONOUS = 36 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129895:1: PragTyp_TABLE_INFO = 37 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129896:1: PragTyp_TABLE_LIST = 38 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129897:1: PragTyp_TEMP_STORE = 39 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129898:1: PragTyp_TEMP_STORE_DIRECTORY = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129899:1: PragTyp_THREADS = 41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129900:1: PragTyp_WAL_AUTOCHECKPOINT = 42 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129901:1: PragTyp_WAL_CHECKPOINT = 43 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129902:1: QDI_DIBTOSCREEN = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:414:1: QDI_GETDIBITS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:413:1: QDI_SETDIBITS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:412:1: QDI_STRETCHDIB = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:415:1: QID_SYNC = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/ddeml.h:135:1: QS_ALLEVENTS = 1215 // /usr/x86_64-w64-mingw32/include/winuser.h:3022:1: QS_ALLINPUT = 1279 // /usr/x86_64-w64-mingw32/include/winuser.h:3023:1: QS_ALLPOSTMESSAGE = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:3009:1: QS_HOTKEY = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:3008:1: QS_INPUT = 1031 // /usr/x86_64-w64-mingw32/include/winuser.h:3020:1: QS_KEY = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3001:1: QS_MOUSE = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3016:1: QS_MOUSEBUTTON = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:3003:1: QS_MOUSEMOVE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3002:1: QS_PAINT = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:3006:1: QS_POSTMESSAGE = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:3004:1: QS_RAWINPUT = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:3010:1: QS_SENDMESSAGE = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:3007:1: QS_TIMER = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:3005:1: QUERYDIBSUPPORT = 3073 // /usr/x86_64-w64-mingw32/include/wingdi.h:292:1: QUERYESCSUPPORT = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:241:1: QUERYROPSUPPORT = 40 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2622:1: QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS = 16 // /usr/x86_64-w64-mingw32/include/winbase.h:2758:1: QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:2757:1: QUERY_ACTCTX_FLAG_NO_ADDREF = 2147483648 // /usr/x86_64-w64-mingw32/include/winbase.h:2759:1: QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2756:1: QUOTA_LIMITS_HARDWS_MAX_DISABLE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:4189:1: QUOTA_LIMITS_HARDWS_MAX_ENABLE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:4188:1: QUOTA_LIMITS_HARDWS_MIN_DISABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:4187:1: QUOTA_LIMITS_HARDWS_MIN_ENABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4186:1: QUOTA_LIMITS_USE_DEFAULT_LIMITS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:4190:1: R2_BLACK = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:34:1: R2_COPYPEN = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:46:1: R2_LAST = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:50:1: R2_MASKNOTPEN = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:36:1: R2_MASKPEN = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:42:1: R2_MASKPENNOT = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:38:1: R2_MERGENOTPEN = 12 // /usr/x86_64-w64-mingw32/include/wingdi.h:45:1: R2_MERGEPEN = 15 // /usr/x86_64-w64-mingw32/include/wingdi.h:48:1: R2_MERGEPENNOT = 14 // /usr/x86_64-w64-mingw32/include/wingdi.h:47:1: R2_NOP = 11 // /usr/x86_64-w64-mingw32/include/wingdi.h:44:1: R2_NOT = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:39:1: R2_NOTCOPYPEN = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:37:1: R2_NOTMASKPEN = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:41:1: R2_NOTMERGEPEN = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:35:1: R2_NOTXORPEN = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:43:1: R2_WHITE = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:49:1: R2_XORPEN = 7 // /usr/x86_64-w64-mingw32/include/wingdi.h:40:1: RANDOM_PADDING = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:418:1: RAND_MAX = 0x7fff // /usr/x86_64-w64-mingw32/include/stdlib.h:106:1: RASTERCAPS = 38 // /usr/x86_64-w64-mingw32/include/wingdi.h:1530:1: RASTER_FONTTYPE = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:1393:1: RBU_CREATE_STATE = "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)" // testdata/sqlite-amalgamation-3380500/sqlite3.c:203945:1: RBU_DELETE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204081:1: RBU_ENABLE_DELTA_CKSUM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203862:1: RBU_EXCLUSIVE_CHECKPOINT = "rbu_exclusive_checkpoint" // testdata/sqlite-amalgamation-3380500/sqlite3.c:203876:1: RBU_IDX_DELETE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204083:1: RBU_IDX_INSERT = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204084:1: RBU_INSERT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204080:1: RBU_PK_EXTERNAL = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204071:1: RBU_PK_IPK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204070:1: RBU_PK_NONE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204069:1: RBU_PK_NOTABLE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204068:1: RBU_PK_VTAB = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204073:1: RBU_PK_WITHOUT_ROWID = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204072:1: RBU_REPLACE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204082:1: RBU_STAGE_CAPTURE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203940:1: RBU_STAGE_CKPT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203941:1: RBU_STAGE_DONE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203942:1: RBU_STAGE_MOVE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203939:1: RBU_STAGE_OAL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203938:1: RBU_STATE_CKPT = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203932:1: RBU_STATE_COOKIE = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203933:1: RBU_STATE_DATATBL = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203936:1: RBU_STATE_IDX = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203929:1: RBU_STATE_OALSZ = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203934:1: RBU_STATE_PHASEONESTEP = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203935:1: RBU_STATE_PROGRESS = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203931:1: RBU_STATE_ROW = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203930:1: RBU_STATE_STAGE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203927:1: RBU_STATE_TBL = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203928:1: RBU_UPDATE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:204086:1: RC_BANDING = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1624:1: RC_BIGFONT = 0x0400 // /usr/x86_64-w64-mingw32/include/wingdi.h:1633:1: RC_BITBLT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1623:1: RC_BITMAP64 = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:1626:1: RC_DEVBITS = 0x8000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1638:1: RC_DIBTODEV = 0x0200 // /usr/x86_64-w64-mingw32/include/wingdi.h:1632:1: RC_DI_BITMAP = 0x0080 // /usr/x86_64-w64-mingw32/include/wingdi.h:1630:1: RC_FLOODFILL = 0x1000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1635:1: RC_GDI20_OUTPUT = 0x0010 // /usr/x86_64-w64-mingw32/include/wingdi.h:1627:1: RC_GDI20_STATE = 0x0020 // /usr/x86_64-w64-mingw32/include/wingdi.h:1628:1: RC_NONE = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1622:1: RC_OP_DX_OUTPUT = 0x4000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1637:1: RC_PALETTE = 0x0100 // /usr/x86_64-w64-mingw32/include/wingdi.h:1631:1: RC_SAVEBITMAP = 0x0040 // /usr/x86_64-w64-mingw32/include/wingdi.h:1629:1: RC_SCALING = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:1625:1: RC_STRETCHBLT = 0x0800 // /usr/x86_64-w64-mingw32/include/wingdi.h:1634:1: RC_STRETCHDIB = 0x2000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1636:1: RDH_RECTANGLES = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2419:1: RDW_ALLCHILDREN = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:3570:1: RDW_ERASE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:3563:1: RDW_ERASENOW = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:3573:1: RDW_FRAME = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:3575:1: RDW_INTERNALPAINT = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3562:1: RDW_INVALIDATE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3561:1: RDW_NOCHILDREN = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:3569:1: RDW_NOERASE = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:3567:1: RDW_NOFRAME = 0x0800 // /usr/x86_64-w64-mingw32/include/winuser.h:3576:1: RDW_NOINTERNALPAINT = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:3566:1: RDW_UPDATENOW = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:3572:1: RDW_VALIDATE = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:3565:1: READMARK_NOT_USED = 0xffffffff // testdata/sqlite-amalgamation-3380500/sqlite3.c:61354:1: READ_ATTRIBUTES = 0xD0 // /usr/x86_64-w64-mingw32/include/winioctl.h:958:1: READ_ATTRIBUTE_BUFFER_SIZE = 512 // /usr/x86_64-w64-mingw32/include/winioctl.h:953:1: READ_COMPRESSION_INFO_VALID = 0x00000020 // /usr/x86_64-w64-mingw32/include/winioctl.h:282:1: READ_CONTROL = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:2880:1: READ_LOCK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65451:1: READ_THREAD_PROFILING_FLAG_DISPATCHING = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8430:1: READ_THREAD_PROFILING_FLAG_HARDWARE_COUNTERS = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8431:1: READ_THRESHOLDS = 0xD1 // /usr/x86_64-w64-mingw32/include/winioctl.h:959:1: READ_THRESHOLD_BUFFER_SIZE = 512 // /usr/x86_64-w64-mingw32/include/winioctl.h:955:1: REALTIME_PRIORITY_CLASS = 0x100 // /usr/x86_64-w64-mingw32/include/winbase.h:385:1: REASON_HWINSTALL = 65538 // /usr/x86_64-w64-mingw32/include/winreg.h:227:1: REASON_LEGACY_API = 2147942400 // /usr/x86_64-w64-mingw32/include/winreg.h:233:1: REASON_OTHER = 0 // /usr/x86_64-w64-mingw32/include/winreg.h:231:1: REASON_PLANNED_FLAG = 2147483648 // /usr/x86_64-w64-mingw32/include/winreg.h:234:1: REASON_SERVICEHANG = 196613 // /usr/x86_64-w64-mingw32/include/winreg.h:228:1: REASON_SWHWRECONF = 196612 // /usr/x86_64-w64-mingw32/include/winreg.h:230:1: REASON_SWINSTALL = 196610 // /usr/x86_64-w64-mingw32/include/winreg.h:226:1: REASON_UNKNOWN = 255 // /usr/x86_64-w64-mingw32/include/winreg.h:232:1: REASON_UNSTABLE = 327686 // /usr/x86_64-w64-mingw32/include/winreg.h:229:1: RECOVERED_READS_VALID = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:279:1: RECOVERED_WRITES_VALID = 0x00000001 // /usr/x86_64-w64-mingw32/include/winioctl.h:277:1: RECOVERY_DEFAULT_PING_INTERVAL = 5000 // /usr/x86_64-w64-mingw32/include/winbase.h:2792:1: RECOVERY_MAX_PING_INTERVAL = 300000 // /usr/x86_64-w64-mingw32/include/winbase.h:2793:1: REGDB_E_FIRST = 2147746128 // /usr/x86_64-w64-mingw32/include/winerror.h:2374:1: REGDB_E_LAST = 2147746143 // /usr/x86_64-w64-mingw32/include/winerror.h:2375:1: REGDB_S_FIRST = 262480 // /usr/x86_64-w64-mingw32/include/winerror.h:2376:1: REGDB_S_LAST = 262495 // /usr/x86_64-w64-mingw32/include/winerror.h:2377:1: REGISTERED = 0x04 // /usr/x86_64-w64-mingw32/include/nb30.h:81:1: REGISTERING = 0x00 // /usr/x86_64-w64-mingw32/include/nb30.h:80:1: REGULAR_FONTTYPE = 0x400 // /usr/x86_64-w64-mingw32/include/commdlg.h:472:1: REG_APP_HIVE = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:8525:1: REG_BINARY = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8546:1: REG_BOOT_HIVE = 1024 // /usr/x86_64-w64-mingw32/include/winnt.h:8531:1: REG_CREATED_NEW_KEY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8514:1: REG_DWORD = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8547:1: REG_DWORD_BIG_ENDIAN = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:8549:1: REG_DWORD_LITTLE_ENDIAN = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8548:1: REG_EXPAND_SZ = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8545:1: REG_FORCE_RESTORE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8524:1: REG_FORCE_UNLOAD = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8533:1: REG_FULL_RESOURCE_DESCRIPTOR = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:8553:1: REG_HIVE_EXACT_FILE_GROWTH = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:8528:1: REG_HIVE_NO_RM = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:8529:1: REG_HIVE_SINGLE_LOG = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:8530:1: REG_LATEST_FORMAT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8518:1: REG_LEGAL_CHANGE_FILTER = 268435471 // /usr/x86_64-w64-mingw32/include/winnt.h:8541:1: REG_LEGAL_OPTION = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:8512:1: REG_LINK = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:8550:1: REG_MUI_STRING_TRUNCATE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winreg.h:125:1: REG_MULTI_SZ = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:8551:1: REG_NONE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8543:1: REG_NOTIFY_CHANGE_ATTRIBUTES = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8536:1: REG_NOTIFY_CHANGE_LAST_SET = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8537:1: REG_NOTIFY_CHANGE_NAME = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8535:1: REG_NOTIFY_CHANGE_SECURITY = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8538:1: REG_NOTIFY_THREAD_AGNOSTIC = 268435456 // /usr/x86_64-w64-mingw32/include/winnt.h:8539:1: REG_NO_COMPRESSION = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8519:1: REG_NO_LAZY_FLUSH = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8523:1: REG_OPENED_EXISTING_KEY = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8515:1: REG_OPTION_BACKUP_RESTORE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8510:1: REG_OPTION_CREATE_LINK = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8509:1: REG_OPTION_NON_VOLATILE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8507:1: REG_OPTION_OPEN_LINK = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8511:1: REG_OPTION_RESERVED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8505:1: REG_OPTION_VOLATILE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8508:1: REG_PROCESS_APPKEY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winreg.h:41:1: REG_PROCESS_PRIVATE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:8526:1: REG_QWORD = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:8555:1: REG_QWORD_LITTLE_ENDIAN = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:8556:1: REG_REFRESH_HIVE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8522:1: REG_RESOURCE_LIST = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8552:1: REG_RESOURCE_REQUIREMENTS_LIST = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:8554:1: REG_SECURE_CONNECTION = 1 // /usr/x86_64-w64-mingw32/include/winreg.h:128:1: REG_STANDARD_FORMAT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8517:1: REG_START_JOURNAL = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:8527:1: REG_SZ = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8544:1: REG_WHOLE_HIVE_VOLATILE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8521:1: RELATIVE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1436:1: REMOTE_NAME_INFO_LEVEL = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:202:1: REPLACEDLGORD = 1541 // /usr/x86_64-w64-mingw32/include/dlgs.h:181:1: REPLACEFILE_IGNORE_MERGE_ERRORS = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:123:1: REPLACEFILE_WRITE_THROUGH = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:122:1: REPLACE_ALTERNATE = 0xB // /usr/x86_64-w64-mingw32/include/winioctl.h:1226:1: REPLACE_PRIMARY = 0xA // /usr/x86_64-w64-mingw32/include/winioctl.h:1225:1: REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5712:1: REPORT_NO_PRIVATE_KEY = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5711:1: RESERVED_LOCK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16321:1: RESETDEV = 7 // /usr/x86_64-w64-mingw32/include/winbase.h:539:1: RESOURCEDISPLAYTYPE_DIRECTORY = 0x00000009 // /usr/x86_64-w64-mingw32/include/winnetwk.h:49:1: RESOURCEDISPLAYTYPE_DOMAIN = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:41:1: RESOURCEDISPLAYTYPE_FILE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:44:1: RESOURCEDISPLAYTYPE_GENERIC = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnetwk.h:40:1: RESOURCEDISPLAYTYPE_GROUP = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnetwk.h:45:1: RESOURCEDISPLAYTYPE_NDSCONTAINER = 0x0000000b // /usr/x86_64-w64-mingw32/include/winnetwk.h:51:1: RESOURCEDISPLAYTYPE_NETWORK = 0x00000006 // /usr/x86_64-w64-mingw32/include/winnetwk.h:46:1: RESOURCEDISPLAYTYPE_ROOT = 0x00000007 // /usr/x86_64-w64-mingw32/include/winnetwk.h:47:1: RESOURCEDISPLAYTYPE_SERVER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:42:1: RESOURCEDISPLAYTYPE_SHARE = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnetwk.h:43:1: RESOURCEDISPLAYTYPE_SHAREADMIN = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:48:1: RESOURCEDISPLAYTYPE_TREE = 0x0000000a // /usr/x86_64-w64-mingw32/include/winnetwk.h:50:1: RESOURCEMANAGER_ALL_ACCESS = 2031743 // /usr/x86_64-w64-mingw32/include/winnt.h:8984:1: RESOURCEMANAGER_COMPLETE_PROPAGATION = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:8979:1: RESOURCEMANAGER_ENLIST = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8976:1: RESOURCEMANAGER_GENERIC_EXECUTE = 1179740 // /usr/x86_64-w64-mingw32/include/winnt.h:8983:1: RESOURCEMANAGER_GENERIC_READ = 1179649 // /usr/x86_64-w64-mingw32/include/winnt.h:8981:1: RESOURCEMANAGER_GENERIC_WRITE = 1179774 // /usr/x86_64-w64-mingw32/include/winnt.h:8982:1: RESOURCEMANAGER_GET_NOTIFICATION = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:8977:1: RESOURCEMANAGER_QUERY_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8973:1: RESOURCEMANAGER_RECOVER = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8975:1: RESOURCEMANAGER_REGISTER_PROTOCOL = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:8978:1: RESOURCEMANAGER_SET_INFORMATION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8974:1: RESOURCETYPE_ANY = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnetwk.h:25:1: RESOURCETYPE_DISK = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:26:1: RESOURCETYPE_PRINT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:27:1: RESOURCETYPE_RESERVED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:28:1: RESOURCETYPE_UNKNOWN = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/winnetwk.h:30:1: RESOURCEUSAGE_ALL = 19 // /usr/x86_64-w64-mingw32/include/winnetwk.h:37:1: RESOURCEUSAGE_ATTACHED = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnetwk.h:36:1: RESOURCEUSAGE_CONNECTABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:32:1: RESOURCEUSAGE_CONTAINER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:33:1: RESOURCEUSAGE_NOLOCALDEVICE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:34:1: RESOURCEUSAGE_RESERVED = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnetwk.h:38:1: RESOURCEUSAGE_SIBLING = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:35:1: RESOURCE_CONNECTED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:19:1: RESOURCE_CONTEXT = 0x00000005 // /usr/x86_64-w64-mingw32/include/winnetwk.h:23:1: RESOURCE_ENUM_LN = 1 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:51:1: RESOURCE_ENUM_MODULE_EXACT = 16 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:55:1: RESOURCE_ENUM_MUI = 2 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:52:1: RESOURCE_ENUM_MUI_SYSTEM = 4 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:53:1: RESOURCE_ENUM_VALIDATE = 8 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:54:1: RESOURCE_GLOBALNET = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:20:1: RESOURCE_MANAGER_COMMUNICATION = 0x00000002 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:28:1: RESOURCE_MANAGER_MAXIMUM_OPTION = 0x00000003 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:29:1: RESOURCE_MANAGER_VOLATILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:27:1: RESOURCE_RECENT = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:22:1: RESOURCE_REMEMBERED = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnetwk.h:21:1: RESTART_MAX_CMD_LINE = 1024 // /usr/x86_64-w64-mingw32/include/winbase.h:2785:1: RESTART_NO_CRASH = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2787:1: RESTART_NO_HANG = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2788:1: RESTART_NO_PATCH = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:2789:1: RESTART_NO_REBOOT = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:2790:1: RESTORE_CTM = 4100 // /usr/x86_64-w64-mingw32/include/wingdi.h:297:1: RESTRICTED_POINTER = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:100:1: RES_CURSOR = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4250:1: RES_ICON = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4249:1: RETRACT_IEPORT = 3 // /usr/x86_64-w64-mingw32/include/winioctl.h:1112:1: RETURNING_TRIGGER_NAME = "sqlite_returning" // testdata/sqlite-amalgamation-3380500/sqlite3.c:115363:1: RETURN_SMART_STATUS = 0xDA // /usr/x86_64-w64-mingw32/include/winioctl.h:967:1: REVERSE_PRINT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:650:1: REVISION_LENGTH = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:991:1: RGN_AND = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:81:1: RGN_COPY = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:85:1: RGN_DIFF = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:84:1: RGN_ERROR = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:79:1: RGN_MAX = 5 // /usr/x86_64-w64-mingw32/include/wingdi.h:87:1: RGN_MIN = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:86:1: RGN_OR = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:82:1: RGN_XOR = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:83:1: RIDEV_APPKEYS = 0x00000400 // /usr/x86_64-w64-mingw32/include/winuser.h:6470:1: RIDEV_CAPTUREMOUSE = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:6468:1: RIDEV_DEVNOTIFY = 0x00002000 // /usr/x86_64-w64-mingw32/include/winuser.h:6472:1: RIDEV_EXCLUDE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:6464:1: RIDEV_EXINPUTSINK = 0x00001000 // /usr/x86_64-w64-mingw32/include/winuser.h:6471:1: RIDEV_EXMODEMASK = 0x000000F0 // /usr/x86_64-w64-mingw32/include/winuser.h:6474:1: RIDEV_INPUTSINK = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:6467:1: RIDEV_NOHOTKEYS = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:6469:1: RIDEV_NOLEGACY = 0x00000030 // /usr/x86_64-w64-mingw32/include/winuser.h:6466:1: RIDEV_PAGEONLY = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:6465:1: RIDEV_REMOVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:6463:1: RIDI_DEVICEINFO = 0x2000000b // /usr/x86_64-w64-mingw32/include/winuser.h:6410:1: RIDI_DEVICENAME = 0x20000007 // /usr/x86_64-w64-mingw32/include/winuser.h:6409:1: RIDI_PREPARSEDDATA = 0x20000005 // /usr/x86_64-w64-mingw32/include/winuser.h:6408:1: RID_HEADER = 0x10000005 // /usr/x86_64-w64-mingw32/include/winuser.h:6402:1: RID_INPUT = 0x10000003 // /usr/x86_64-w64-mingw32/include/winuser.h:6401:1: RIGHTMOST_BUTTON_PRESSED = 0x2 // /usr/x86_64-w64-mingw32/include/wincon.h:70:1: RIGHT_ALT_PRESSED = 0x1 // /usr/x86_64-w64-mingw32/include/wincon.h:44:1: RIGHT_CTRL_PRESSED = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:46:1: RIM_INPUT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:6292:1: RIM_INPUTSINK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6293:1: RIM_TYPEHID = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6306:1: RIM_TYPEKEYBOARD = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6305:1: RIM_TYPEMAX = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6307:1: RIM_TYPEMOUSE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:6304:1: RIP_EVENT = 9 // /usr/x86_64-w64-mingw32/include/minwinbase.h:232:1: RI_KEY_BREAK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6370:1: RI_KEY_E0 = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6371:1: RI_KEY_E1 = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:6372:1: RI_KEY_MAKE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:6369:1: RI_KEY_TERMSRV_SET_LED = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:6373:1: RI_KEY_TERMSRV_SHADOW = 0x10 // /usr/x86_64-w64-mingw32/include/winuser.h:6374:1: RI_MOUSE_BUTTON_1_DOWN = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6341:1: RI_MOUSE_BUTTON_1_UP = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6342:1: RI_MOUSE_BUTTON_2_DOWN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:6343:1: RI_MOUSE_BUTTON_2_UP = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:6344:1: RI_MOUSE_BUTTON_3_DOWN = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:6345:1: RI_MOUSE_BUTTON_3_UP = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:6346:1: RI_MOUSE_BUTTON_4_DOWN = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:6332:1: RI_MOUSE_BUTTON_4_UP = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:6333:1: RI_MOUSE_BUTTON_5_DOWN = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:6334:1: RI_MOUSE_BUTTON_5_UP = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:6335:1: RI_MOUSE_LEFT_BUTTON_DOWN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:6326:1: RI_MOUSE_LEFT_BUTTON_UP = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:6327:1: RI_MOUSE_MIDDLE_BUTTON_DOWN = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:6330:1: RI_MOUSE_MIDDLE_BUTTON_UP = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:6331:1: RI_MOUSE_RIGHT_BUTTON_DOWN = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:6328:1: RI_MOUSE_RIGHT_BUTTON_UP = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:6329:1: RI_MOUSE_WHEEL = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:6336:1: RNDAWAY = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:199067:1: RNDTOWARDS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:199066:1: ROTFLAGS_ALLOWANYCLIENT = 0x2 // /usr/x86_64-w64-mingw32/include/wtypes.h:174:1: ROTFLAGS_REGISTRATIONKEEPSALIVE = 0x1 // /usr/x86_64-w64-mingw32/include/wtypes.h:173:1: ROTREGFLAGS_ALLOWANYCLIENT = 0x1 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:243:1: ROT_COMPARE_MAX = 2048 // /usr/x86_64-w64-mingw32/include/wtypes.h:179:1: ROWSET_ALLOCATION_SIZE = 1024 // testdata/sqlite-amalgamation-3380500/sqlite3.c:52623:1: ROWSET_NEXT = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:52677:1: ROWSET_SORTED = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:52676:1: RPCFLG_ASYNCHRONOUS = 1073741824 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:69:1: RPCFLG_AUTO_COMPLETE = 134217728 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:66:1: RPCFLG_HAS_CALLBACK = 67108864 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:73:1: RPCFLG_HAS_MULTI_SYNTAXES = 33554432 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:72:1: RPCFLG_INPUT_SYNCHRONOUS = 536870912 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:68:1: RPCFLG_LOCAL_CALL = 268435456 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:67:1: RPCFLG_MESSAGE = 16777216 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:65:1: RPCFLG_NON_NDR = 2147483648 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:70:1: RPC_BUFFER_ASYNC = 0x00008000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:62:1: RPC_BUFFER_COMPLETE = 0x00001000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:59:1: RPC_BUFFER_EXTRA = 0x00004000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:61:1: RPC_BUFFER_NONOTIFY = 0x00010000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:63:1: RPC_BUFFER_PARTIAL = 0x00002000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:60:1: RPC_CALL_ATTRIBUTES_VERSION = 1 // /usr/x86_64-w64-mingw32/include/rpcasync.h:145:1: RPC_CONTEXT_HANDLE_DEFAULT_FLAGS = 0 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:49:1: RPC_CONTEXT_HANDLE_DONT_SERIALIZE = 536870912 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:52:1: RPC_CONTEXT_HANDLE_FLAGS = 805306368 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:50:1: RPC_CONTEXT_HANDLE_SERIALIZE = 268435456 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:51:1: RPC_C_AUTHN_DCE_PRIVATE = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:293:1: RPC_C_AUTHN_DCE_PUBLIC = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:294:1: RPC_C_AUTHN_DEC_PUBLIC = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:295:1: RPC_C_AUTHN_DEFAULT = 4294967295 // /usr/x86_64-w64-mingw32/include/rpcdce.h:304:1: RPC_C_AUTHN_DIGEST = 21 // /usr/x86_64-w64-mingw32/include/rpcdce.h:302:1: RPC_C_AUTHN_DPA = 17 // /usr/x86_64-w64-mingw32/include/rpcdce.h:300:1: RPC_C_AUTHN_GSS_KERBEROS = 16 // /usr/x86_64-w64-mingw32/include/rpcdce.h:299:1: RPC_C_AUTHN_GSS_NEGOTIATE = 9 // /usr/x86_64-w64-mingw32/include/rpcdce.h:296:1: RPC_C_AUTHN_GSS_SCHANNEL = 14 // /usr/x86_64-w64-mingw32/include/rpcdce.h:298:1: RPC_C_AUTHN_INFO_TYPE_HTTP = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:350:1: RPC_C_AUTHN_LEVEL_CALL = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:263:1: RPC_C_AUTHN_LEVEL_CONNECT = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:262:1: RPC_C_AUTHN_LEVEL_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:260:1: RPC_C_AUTHN_LEVEL_NONE = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:261:1: RPC_C_AUTHN_LEVEL_PKT = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:264:1: RPC_C_AUTHN_LEVEL_PKT_INTEGRITY = 5 // /usr/x86_64-w64-mingw32/include/rpcdce.h:265:1: RPC_C_AUTHN_LEVEL_PKT_PRIVACY = 6 // /usr/x86_64-w64-mingw32/include/rpcdce.h:266:1: RPC_C_AUTHN_MQ = 100 // /usr/x86_64-w64-mingw32/include/rpcdce.h:303:1: RPC_C_AUTHN_MSN = 18 // /usr/x86_64-w64-mingw32/include/rpcdce.h:301:1: RPC_C_AUTHN_NONE = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:292:1: RPC_C_AUTHN_WINNT = 10 // /usr/x86_64-w64-mingw32/include/rpcdce.h:297:1: RPC_C_AUTHZ_DCE = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:452:1: RPC_C_AUTHZ_DEFAULT = 0xffffffff // /usr/x86_64-w64-mingw32/include/rpcdce.h:453:1: RPC_C_AUTHZ_NAME = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:451:1: RPC_C_AUTHZ_NONE = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:450:1: RPC_C_BINDING_DEFAULT_TIMEOUT = 5 // /usr/x86_64-w64-mingw32/include/rpcdce.h:79:1: RPC_C_BINDING_INFINITE_TIMEOUT = 10 // /usr/x86_64-w64-mingw32/include/rpcdce.h:77:1: RPC_C_BINDING_MAX_TIMEOUT = 9 // /usr/x86_64-w64-mingw32/include/rpcdce.h:80:1: RPC_C_BINDING_MIN_TIMEOUT = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:78:1: RPC_C_BIND_TO_ALL_NICS = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:87:1: RPC_C_CANCEL_INFINITE_TIMEOUT = -1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:82:1: RPC_C_DONT_FAIL = 0x4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:90:1: RPC_C_EP_ALL_ELTS = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:528:1: RPC_C_EP_MATCH_BY_BOTH = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:531:1: RPC_C_EP_MATCH_BY_IF = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:529:1: RPC_C_EP_MATCH_BY_OBJ = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:530:1: RPC_C_FULL_CERT_CHAIN = 0x0001 // /usr/x86_64-w64-mingw32/include/rpcdce.h:122:1: RPC_C_HTTP_AUTHN_SCHEME_BASIC = 0x00000001 // /usr/x86_64-w64-mingw32/include/rpcdce.h:355:1: RPC_C_HTTP_AUTHN_SCHEME_CERT = 0x00010000 // /usr/x86_64-w64-mingw32/include/rpcdce.h:360:1: RPC_C_HTTP_AUTHN_SCHEME_DIGEST = 0x00000008 // /usr/x86_64-w64-mingw32/include/rpcdce.h:358:1: RPC_C_HTTP_AUTHN_SCHEME_NEGOTIATE = 0x00000010 // /usr/x86_64-w64-mingw32/include/rpcdce.h:359:1: RPC_C_HTTP_AUTHN_SCHEME_NTLM = 0x00000002 // /usr/x86_64-w64-mingw32/include/rpcdce.h:356:1: RPC_C_HTTP_AUTHN_SCHEME_PASSPORT = 0x00000004 // /usr/x86_64-w64-mingw32/include/rpcdce.h:357:1: RPC_C_HTTP_AUTHN_TARGET_PROXY = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:353:1: RPC_C_HTTP_AUTHN_TARGET_SERVER = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:352:1: RPC_C_HTTP_FLAG_IGNORE_CERT_CN_INVALID = 8 // /usr/x86_64-w64-mingw32/include/rpcdce.h:364:1: RPC_C_HTTP_FLAG_USE_FIRST_AUTH_SCHEME = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:363:1: RPC_C_HTTP_FLAG_USE_SSL = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:362:1: RPC_C_IMP_LEVEL_ANONYMOUS = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:269:1: RPC_C_IMP_LEVEL_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:268:1: RPC_C_IMP_LEVEL_DELEGATE = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:272:1: RPC_C_IMP_LEVEL_IDENTIFY = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:270:1: RPC_C_IMP_LEVEL_IMPERSONATE = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:271:1: RPC_C_INFINITE_TIMEOUT = 4294967295 // /usr/x86_64-w64-mingw32/include/rpcasync.h:66:1: RPC_C_LISTEN_MAX_CALLS_DEFAULT = 1234 // /usr/x86_64-w64-mingw32/include/rpcdce.h:84:1: RPC_C_MGMT_INQ_IF_IDS = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:549:1: RPC_C_MGMT_INQ_PRINC_NAME = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:550:1: RPC_C_MGMT_INQ_STATS = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:551:1: RPC_C_MGMT_IS_SERVER_LISTEN = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:552:1: RPC_C_MGMT_STOP_SERVER_LISTEN = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:553:1: RPC_C_MQ_AUTHN_LEVEL_NONE = 0x0000 // /usr/x86_64-w64-mingw32/include/rpcdce.h:96:1: RPC_C_MQ_AUTHN_LEVEL_PKT_INTEGRITY = 0x0008 // /usr/x86_64-w64-mingw32/include/rpcdce.h:97:1: RPC_C_MQ_AUTHN_LEVEL_PKT_PRIVACY = 0x0010 // /usr/x86_64-w64-mingw32/include/rpcdce.h:98:1: RPC_C_MQ_CLEAR_ON_OPEN = 0x0002 // /usr/x86_64-w64-mingw32/include/rpcdce.h:94:1: RPC_C_MQ_EXPRESS = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:115:1: RPC_C_MQ_JOURNAL_ALWAYS = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:120:1: RPC_C_MQ_JOURNAL_DEADLETTER = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:119:1: RPC_C_MQ_JOURNAL_NONE = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:118:1: RPC_C_MQ_PERMANENT = 0x0001 // /usr/x86_64-w64-mingw32/include/rpcdce.h:93:1: RPC_C_MQ_RECOVERABLE = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:116:1: RPC_C_MQ_TEMPORARY = 0x0000 // /usr/x86_64-w64-mingw32/include/rpcdce.h:92:1: RPC_C_MQ_USE_EXISTING_SECURITY = 0x0004 // /usr/x86_64-w64-mingw32/include/rpcdce.h:95:1: RPC_C_NOTIFY_ON_SEND_COMPLETE = 0x1 // /usr/x86_64-w64-mingw32/include/rpcasync.h:65:1: RPC_C_NS_DEFAULT_EXP_AGE = -1 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:23:1: RPC_C_NS_SYNTAX_DCE = 3 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:14:1: RPC_C_NS_SYNTAX_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:13:1: RPC_C_OPT_BINDING_NONCAUSAL = 9 // /usr/x86_64-w64-mingw32/include/rpcdce.h:108:1: RPC_C_OPT_CALL_TIMEOUT = 12 // /usr/x86_64-w64-mingw32/include/rpcdce.h:111:1: RPC_C_OPT_DONT_LINGER = 13 // /usr/x86_64-w64-mingw32/include/rpcdce.h:112:1: RPC_C_OPT_MAX_OPTIONS = 14 // /usr/x86_64-w64-mingw32/include/rpcdce.h:113:1: RPC_C_OPT_MQ_ACKNOWLEDGE = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:103:1: RPC_C_OPT_MQ_AUTHN_LEVEL = 6 // /usr/x86_64-w64-mingw32/include/rpcdce.h:105:1: RPC_C_OPT_MQ_AUTHN_SERVICE = 5 // /usr/x86_64-w64-mingw32/include/rpcdce.h:104:1: RPC_C_OPT_MQ_DELIVERY = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:100:1: RPC_C_OPT_MQ_JOURNAL = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:102:1: RPC_C_OPT_MQ_PRIORITY = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:101:1: RPC_C_OPT_MQ_TIME_TO_BE_RECEIVED = 8 // /usr/x86_64-w64-mingw32/include/rpcdce.h:107:1: RPC_C_OPT_MQ_TIME_TO_REACH_QUEUE = 7 // /usr/x86_64-w64-mingw32/include/rpcdce.h:106:1: RPC_C_OPT_SECURITY_CALLBACK = 10 // /usr/x86_64-w64-mingw32/include/rpcdce.h:109:1: RPC_C_OPT_UNIQUE_BINDING = 11 // /usr/x86_64-w64-mingw32/include/rpcdce.h:110:1: RPC_C_PARM_BUFFER_LENGTH = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:558:1: RPC_C_PARM_MAX_PACKET_LENGTH = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:557:1: RPC_C_PROFILE_ALL_ELT = 1 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:17:1: RPC_C_PROFILE_ALL_ELTS = 1 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:18:1: RPC_C_PROFILE_DEFAULT_ELT = 0 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:16:1: RPC_C_PROFILE_MATCH_BY_BOTH = 4 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:21:1: RPC_C_PROFILE_MATCH_BY_IF = 2 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:19:1: RPC_C_PROFILE_MATCH_BY_MBR = 3 // /usr/x86_64-w64-mingw32/include/rpcnsi.h:20:1: RPC_C_PROTECT_LEVEL_CALL = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:287:1: RPC_C_PROTECT_LEVEL_CONNECT = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:286:1: RPC_C_PROTECT_LEVEL_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:284:1: RPC_C_PROTECT_LEVEL_NONE = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:285:1: RPC_C_PROTECT_LEVEL_PKT = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:288:1: RPC_C_PROTECT_LEVEL_PKT_INTEGRITY = 5 // /usr/x86_64-w64-mingw32/include/rpcdce.h:289:1: RPC_C_PROTECT_LEVEL_PKT_PRIVACY = 6 // /usr/x86_64-w64-mingw32/include/rpcdce.h:290:1: RPC_C_PROTSEQ_MAX_REQS_DEFAULT = 10 // /usr/x86_64-w64-mingw32/include/rpcdce.h:85:1: RPC_C_QOS_CAPABILITIES_ANY_AUTHORITY = 0x4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:280:1: RPC_C_QOS_CAPABILITIES_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:277:1: RPC_C_QOS_CAPABILITIES_IGNORE_DELEGATE_FAILURE = 0x8 // /usr/x86_64-w64-mingw32/include/rpcdce.h:281:1: RPC_C_QOS_CAPABILITIES_LOCAL_MA_HINT = 0x10 // /usr/x86_64-w64-mingw32/include/rpcdce.h:282:1: RPC_C_QOS_CAPABILITIES_MAKE_FULLSIC = 0x2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:279:1: RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH = 0x1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:278:1: RPC_C_QOS_IDENTITY_DYNAMIC = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:275:1: RPC_C_QOS_IDENTITY_STATIC = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:274:1: RPC_C_SECURITY_QOS_VERSION = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:308:1: RPC_C_SECURITY_QOS_VERSION_1 = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:309:1: RPC_C_SECURITY_QOS_VERSION_2 = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:348:1: RPC_C_SECURITY_QOS_VERSION_3 = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:406:1: RPC_C_STATS_CALLS_IN = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:153:1: RPC_C_STATS_CALLS_OUT = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:154:1: RPC_C_STATS_PKTS_IN = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:155:1: RPC_C_STATS_PKTS_OUT = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:156:1: RPC_C_USE_INTERNET_PORT = 0x1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:88:1: RPC_C_USE_INTRANET_PORT = 0x2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:89:1: RPC_C_VERS_ALL = 1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:533:1: RPC_C_VERS_COMPATIBLE = 2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:534:1: RPC_C_VERS_EXACT = 3 // /usr/x86_64-w64-mingw32/include/rpcdce.h:535:1: RPC_C_VERS_MAJOR_ONLY = 4 // /usr/x86_64-w64-mingw32/include/rpcdce.h:536:1: RPC_C_VERS_UPTO = 5 // /usr/x86_64-w64-mingw32/include/rpcdce.h:537:1: RPC_EEINFO_VERSION = 1 // /usr/x86_64-w64-mingw32/include/rpcasync.h:83:1: RPC_ENTRY = 0 // /usr/x86_64-w64-mingw32/include/rpc.h:60:1: RPC_FLAGS_VALID_BIT = 0x00008000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:75:1: RPC_IF_ALLOW_CALLBACKS_WITH_NO_AUTH = 0x0010 // /usr/x86_64-w64-mingw32/include/rpcdce.h:564:1: RPC_IF_ALLOW_LOCAL_ONLY = 0x0020 // /usr/x86_64-w64-mingw32/include/rpcdce.h:565:1: RPC_IF_ALLOW_SECURE_ONLY = 0x0008 // /usr/x86_64-w64-mingw32/include/rpcdce.h:563:1: RPC_IF_ALLOW_UNKNOWN_AUTHORITY = 0x0004 // /usr/x86_64-w64-mingw32/include/rpcdce.h:562:1: RPC_IF_AUTOLISTEN = 0x0001 // /usr/x86_64-w64-mingw32/include/rpcdce.h:560:1: RPC_IF_OLE = 0x0002 // /usr/x86_64-w64-mingw32/include/rpcdce.h:561:1: RPC_IF_SEC_NO_CACHE = 0x0040 // /usr/x86_64-w64-mingw32/include/rpcdce.h:566:1: RPC_INTERFACE_HAS_PIPES = 0x0001 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:91:1: RPC_NCA_FLAGS_BROADCAST = 0x00000002 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:56:1: RPC_NCA_FLAGS_DEFAULT = 0x00000000 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:54:1: RPC_NCA_FLAGS_IDEMPOTENT = 0x00000001 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:55:1: RPC_NCA_FLAGS_MAYBE = 0x00000004 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:57:1: RPC_PROXY_CONNECTION_TYPE_IN_PROXY = 0 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:260:1: RPC_PROXY_CONNECTION_TYPE_OUT_PROXY = 1 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:261:1: RPC_P_ADDR_FORMAT_TCP_IPV4 = 1 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:192:1: RPC_P_ADDR_FORMAT_TCP_IPV6 = 2 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:193:1: RPC_QUERY_CLIENT_PRINCIPAL_NAME = 4 // /usr/x86_64-w64-mingw32/include/rpcasync.h:147:1: RPC_QUERY_SERVER_PRINCIPAL_NAME = 2 // /usr/x86_64-w64-mingw32/include/rpcasync.h:146:1: RPC_S_ACCESS_DENIED = 5 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:16:1: RPC_S_ADDRESS_ERROR = 1768 // /usr/x86_64-w64-mingw32/include/winerror.h:757:1: RPC_S_ALREADY_LISTENING = 1713 // /usr/x86_64-w64-mingw32/include/winerror.h:705:1: RPC_S_ALREADY_REGISTERED = 1711 // /usr/x86_64-w64-mingw32/include/winerror.h:703:1: RPC_S_ASYNC_CALL_PENDING = 997 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:18:1: RPC_S_BINDING_HAS_NO_AUTH = 1746 // /usr/x86_64-w64-mingw32/include/winerror.h:735:1: RPC_S_BINDING_INCOMPLETE = 1819 // /usr/x86_64-w64-mingw32/include/winerror.h:807:1: RPC_S_BUFFER_TOO_SMALL = 122 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:14:1: RPC_S_CALL_CANCELLED = 1818 // /usr/x86_64-w64-mingw32/include/winerror.h:806:1: RPC_S_CALL_FAILED = 1726 // /usr/x86_64-w64-mingw32/include/winerror.h:718:1: RPC_S_CALL_FAILED_DNE = 1727 // /usr/x86_64-w64-mingw32/include/winerror.h:719:1: RPC_S_CALL_IN_PROGRESS = 1791 // /usr/x86_64-w64-mingw32/include/winerror.h:779:1: RPC_S_CANNOT_SUPPORT = 1764 // /usr/x86_64-w64-mingw32/include/winerror.h:753:1: RPC_S_CANT_CREATE_ENDPOINT = 1720 // /usr/x86_64-w64-mingw32/include/winerror.h:712:1: RPC_S_COMM_FAILURE = 1820 // /usr/x86_64-w64-mingw32/include/winerror.h:808:1: RPC_S_DUPLICATE_ENDPOINT = 1740 // /usr/x86_64-w64-mingw32/include/winerror.h:729:1: RPC_S_ENTRY_ALREADY_EXISTS = 1760 // /usr/x86_64-w64-mingw32/include/winerror.h:749:1: RPC_S_ENTRY_NOT_FOUND = 1761 // /usr/x86_64-w64-mingw32/include/winerror.h:750:1: RPC_S_ENTRY_TYPE_MISMATCH = 1922 // /usr/x86_64-w64-mingw32/include/winerror.h:845:1: RPC_S_FP_DIV_ZERO = 1769 // /usr/x86_64-w64-mingw32/include/winerror.h:758:1: RPC_S_FP_OVERFLOW = 1771 // /usr/x86_64-w64-mingw32/include/winerror.h:760:1: RPC_S_FP_UNDERFLOW = 1770 // /usr/x86_64-w64-mingw32/include/winerror.h:759:1: RPC_S_GROUP_MEMBER_NOT_FOUND = 1898 // /usr/x86_64-w64-mingw32/include/winerror.h:821:1: RPC_S_GRP_ELT_NOT_ADDED = 1928 // /usr/x86_64-w64-mingw32/include/winerror.h:851:1: RPC_S_GRP_ELT_NOT_REMOVED = 1929 // /usr/x86_64-w64-mingw32/include/winerror.h:852:1: RPC_S_INCOMPLETE_NAME = 1755 // /usr/x86_64-w64-mingw32/include/winerror.h:744:1: RPC_S_INTERFACE_NOT_EXPORTED = 1924 // /usr/x86_64-w64-mingw32/include/winerror.h:847:1: RPC_S_INTERFACE_NOT_FOUND = 1759 // /usr/x86_64-w64-mingw32/include/winerror.h:748:1: RPC_S_INTERNAL_ERROR = 1766 // /usr/x86_64-w64-mingw32/include/winerror.h:755:1: RPC_S_INVALID_ARG = 87 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:10:1: RPC_S_INVALID_ASYNC_CALL = 1915 // /usr/x86_64-w64-mingw32/include/winerror.h:838:1: RPC_S_INVALID_ASYNC_HANDLE = 1914 // /usr/x86_64-w64-mingw32/include/winerror.h:837:1: RPC_S_INVALID_AUTH_IDENTITY = 1749 // /usr/x86_64-w64-mingw32/include/winerror.h:738:1: RPC_S_INVALID_BINDING = 1702 // /usr/x86_64-w64-mingw32/include/winerror.h:694:1: RPC_S_INVALID_BOUND = 1734 // /usr/x86_64-w64-mingw32/include/winerror.h:724:1: RPC_S_INVALID_ENDPOINT_FORMAT = 1706 // /usr/x86_64-w64-mingw32/include/winerror.h:698:1: RPC_S_INVALID_LEVEL = 87 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:13:1: RPC_S_INVALID_NAF_ID = 1763 // /usr/x86_64-w64-mingw32/include/winerror.h:752:1: RPC_S_INVALID_NAME_SYNTAX = 1736 // /usr/x86_64-w64-mingw32/include/winerror.h:726:1: RPC_S_INVALID_NETWORK_OPTIONS = 1724 // /usr/x86_64-w64-mingw32/include/winerror.h:716:1: RPC_S_INVALID_NET_ADDR = 1707 // /usr/x86_64-w64-mingw32/include/winerror.h:699:1: RPC_S_INVALID_OBJECT = 1900 // /usr/x86_64-w64-mingw32/include/winerror.h:823:1: RPC_S_INVALID_RPC_PROTSEQ = 1704 // /usr/x86_64-w64-mingw32/include/winerror.h:696:1: RPC_S_INVALID_SECURITY_DESC = 1338 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:15:1: RPC_S_INVALID_STRING_BINDING = 1700 // /usr/x86_64-w64-mingw32/include/winerror.h:692:1: RPC_S_INVALID_STRING_UUID = 1705 // /usr/x86_64-w64-mingw32/include/winerror.h:697:1: RPC_S_INVALID_TAG = 1733 // /usr/x86_64-w64-mingw32/include/winerror.h:723:1: RPC_S_INVALID_TIMEOUT = 1709 // /usr/x86_64-w64-mingw32/include/winerror.h:701:1: RPC_S_INVALID_VERS_OPTION = 1756 // /usr/x86_64-w64-mingw32/include/winerror.h:745:1: RPC_S_MAX_CALLS_TOO_SMALL = 1742 // /usr/x86_64-w64-mingw32/include/winerror.h:731:1: RPC_S_NAME_SERVICE_UNAVAILABLE = 1762 // /usr/x86_64-w64-mingw32/include/winerror.h:751:1: RPC_S_NOTHING_TO_EXPORT = 1754 // /usr/x86_64-w64-mingw32/include/winerror.h:743:1: RPC_S_NOT_ALL_OBJS_EXPORTED = 1923 // /usr/x86_64-w64-mingw32/include/winerror.h:846:1: RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758 // /usr/x86_64-w64-mingw32/include/winerror.h:747:1: RPC_S_NOT_CANCELLED = 1826 // /usr/x86_64-w64-mingw32/include/winerror.h:814:1: RPC_S_NOT_LISTENING = 1715 // /usr/x86_64-w64-mingw32/include/winerror.h:707:1: RPC_S_NOT_RPC_ERROR = 1823 // /usr/x86_64-w64-mingw32/include/winerror.h:811:1: RPC_S_NO_BINDINGS = 1718 // /usr/x86_64-w64-mingw32/include/winerror.h:710:1: RPC_S_NO_CALL_ACTIVE = 1725 // /usr/x86_64-w64-mingw32/include/winerror.h:717:1: RPC_S_NO_CONTEXT_AVAILABLE = 1765 // /usr/x86_64-w64-mingw32/include/winerror.h:754:1: RPC_S_NO_ENDPOINT_FOUND = 1708 // /usr/x86_64-w64-mingw32/include/winerror.h:700:1: RPC_S_NO_ENTRY_NAME = 1735 // /usr/x86_64-w64-mingw32/include/winerror.h:725:1: RPC_S_NO_INTERFACES = 1817 // /usr/x86_64-w64-mingw32/include/winerror.h:805:1: RPC_S_NO_MORE_BINDINGS = 1806 // /usr/x86_64-w64-mingw32/include/winerror.h:794:1: RPC_S_NO_MORE_MEMBERS = 1757 // /usr/x86_64-w64-mingw32/include/winerror.h:746:1: RPC_S_NO_PRINC_NAME = 1822 // /usr/x86_64-w64-mingw32/include/winerror.h:810:1: RPC_S_NO_PROTSEQS = 1719 // /usr/x86_64-w64-mingw32/include/winerror.h:711:1: RPC_S_NO_PROTSEQS_REGISTERED = 1714 // /usr/x86_64-w64-mingw32/include/winerror.h:706:1: RPC_S_OBJECT_NOT_FOUND = 1710 // /usr/x86_64-w64-mingw32/include/winerror.h:702:1: RPC_S_OK = 0 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:9:1: RPC_S_OUT_OF_MEMORY = 14 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:11:1: RPC_S_OUT_OF_RESOURCES = 1721 // /usr/x86_64-w64-mingw32/include/winerror.h:713:1: RPC_S_OUT_OF_THREADS = 164 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:12:1: RPC_S_PRF_ELT_NOT_ADDED = 1926 // /usr/x86_64-w64-mingw32/include/winerror.h:849:1: RPC_S_PRF_ELT_NOT_REMOVED = 1927 // /usr/x86_64-w64-mingw32/include/winerror.h:850:1: RPC_S_PROCNUM_OUT_OF_RANGE = 1745 // /usr/x86_64-w64-mingw32/include/winerror.h:734:1: RPC_S_PROFILE_NOT_ADDED = 1925 // /usr/x86_64-w64-mingw32/include/winerror.h:848:1: RPC_S_PROTOCOL_ERROR = 1728 // /usr/x86_64-w64-mingw32/include/winerror.h:720:1: RPC_S_PROTSEQ_NOT_FOUND = 1744 // /usr/x86_64-w64-mingw32/include/winerror.h:733:1: RPC_S_PROTSEQ_NOT_SUPPORTED = 1703 // /usr/x86_64-w64-mingw32/include/winerror.h:695:1: RPC_S_SEC_PKG_ERROR = 1825 // /usr/x86_64-w64-mingw32/include/winerror.h:813:1: RPC_S_SEND_INCOMPLETE = 1913 // /usr/x86_64-w64-mingw32/include/winerror.h:836:1: RPC_S_SERVER_OUT_OF_MEMORY = 1130 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:17:1: RPC_S_SERVER_TOO_BUSY = 1723 // /usr/x86_64-w64-mingw32/include/winerror.h:715:1: RPC_S_SERVER_UNAVAILABLE = 1722 // /usr/x86_64-w64-mingw32/include/winerror.h:714:1: RPC_S_STRING_TOO_LONG = 1743 // /usr/x86_64-w64-mingw32/include/winerror.h:732:1: RPC_S_TIMEOUT = 1460 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:20:1: RPC_S_TYPE_ALREADY_REGISTERED = 1712 // /usr/x86_64-w64-mingw32/include/winerror.h:704:1: RPC_S_UNKNOWN_AUTHN_LEVEL = 1748 // /usr/x86_64-w64-mingw32/include/winerror.h:737:1: RPC_S_UNKNOWN_AUTHN_SERVICE = 1747 // /usr/x86_64-w64-mingw32/include/winerror.h:736:1: RPC_S_UNKNOWN_AUTHN_TYPE = 1741 // /usr/x86_64-w64-mingw32/include/winerror.h:730:1: RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750 // /usr/x86_64-w64-mingw32/include/winerror.h:739:1: RPC_S_UNKNOWN_IF = 1717 // /usr/x86_64-w64-mingw32/include/winerror.h:709:1: RPC_S_UNKNOWN_MGR_TYPE = 1716 // /usr/x86_64-w64-mingw32/include/winerror.h:708:1: RPC_S_UNKNOWN_PRINCIPAL = 1332 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:19:1: RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821 // /usr/x86_64-w64-mingw32/include/winerror.h:809:1: RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737 // /usr/x86_64-w64-mingw32/include/winerror.h:727:1: RPC_S_UNSUPPORTED_TRANS_SYN = 1730 // /usr/x86_64-w64-mingw32/include/winerror.h:721:1: RPC_S_UNSUPPORTED_TYPE = 1732 // /usr/x86_64-w64-mingw32/include/winerror.h:722:1: RPC_S_UUID_LOCAL_ONLY = 1824 // /usr/x86_64-w64-mingw32/include/winerror.h:812:1: RPC_S_UUID_NO_ADDRESS = 1739 // /usr/x86_64-w64-mingw32/include/winerror.h:728:1: RPC_S_WRONG_KIND_OF_BINDING = 1701 // /usr/x86_64-w64-mingw32/include/winerror.h:693:1: RPC_S_ZERO_DIVIDE = 1767 // /usr/x86_64-w64-mingw32/include/winerror.h:756:1: RPC_UNICODE_SUPPORTED = 0 // /usr/x86_64-w64-mingw32/include/rpc.h:51:1: RPC_X_BAD_STUB_DATA = 1783 // /usr/x86_64-w64-mingw32/include/winerror.h:771:1: RPC_X_BYTE_COUNT_TOO_SMALL = 1782 // /usr/x86_64-w64-mingw32/include/winerror.h:770:1: RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781 // /usr/x86_64-w64-mingw32/include/winerror.h:769:1: RPC_X_ENUM_VALUE_TOO_LARGE = 1781 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:25:1: RPC_X_INVALID_BOUND = 1734 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:23:1: RPC_X_INVALID_BUFFER = 1784 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:27:1: RPC_X_INVALID_ES_ACTION = 1827 // /usr/x86_64-w64-mingw32/include/winerror.h:815:1: RPC_X_INVALID_PIPE_OBJECT = 1830 // /usr/x86_64-w64-mingw32/include/winerror.h:818:1: RPC_X_INVALID_PIPE_OPERATION = 1831 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:29:1: RPC_X_INVALID_TAG = 1733 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:24:1: RPC_X_NO_MEMORY = 14 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:22:1: RPC_X_NO_MORE_ENTRIES = 1772 // /usr/x86_64-w64-mingw32/include/winerror.h:761:1: RPC_X_NULL_REF_POINTER = 1780 // /usr/x86_64-w64-mingw32/include/winerror.h:768:1: RPC_X_PIPE_APP_MEMORY = 14 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:28:1: RPC_X_PIPE_CLOSED = 1916 // /usr/x86_64-w64-mingw32/include/winerror.h:839:1: RPC_X_PIPE_DISCIPLINE_ERROR = 1917 // /usr/x86_64-w64-mingw32/include/winerror.h:840:1: RPC_X_PIPE_EMPTY = 1918 // /usr/x86_64-w64-mingw32/include/winerror.h:841:1: RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779 // /usr/x86_64-w64-mingw32/include/winerror.h:767:1: RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773 // /usr/x86_64-w64-mingw32/include/winerror.h:762:1: RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774 // /usr/x86_64-w64-mingw32/include/winerror.h:763:1: RPC_X_SS_CONTEXT_DAMAGED = 1777 // /usr/x86_64-w64-mingw32/include/winerror.h:765:1: RPC_X_SS_CONTEXT_MISMATCH = 6 // /usr/x86_64-w64-mingw32/include/rpcnterr.h:26:1: RPC_X_SS_HANDLES_MISMATCH = 1778 // /usr/x86_64-w64-mingw32/include/winerror.h:766:1: RPC_X_SS_IN_NULL_CONTEXT = 1775 // /usr/x86_64-w64-mingw32/include/winerror.h:764:1: RPC_X_WRONG_ES_VERSION = 1828 // /usr/x86_64-w64-mingw32/include/winerror.h:816:1: RPC_X_WRONG_PIPE_ORDER = 1831 // /usr/x86_64-w64-mingw32/include/winerror.h:819:1: RPC_X_WRONG_PIPE_VERSION = 1832 // /usr/x86_64-w64-mingw32/include/winerror.h:820:1: RPC_X_WRONG_STUB_VERSION = 1829 // /usr/x86_64-w64-mingw32/include/winerror.h:817:1: RP_INIFILE = 0x02 // /usr/x86_64-w64-mingw32/include/winnetwk.h:278:1: RP_LOGON = 0x01 // /usr/x86_64-w64-mingw32/include/winnetwk.h:277:1: RRF_NOEXPAND = 0x10000000 // /usr/x86_64-w64-mingw32/include/winreg.h:38:1: RRF_RT_ANY = 0x0000ffff // /usr/x86_64-w64-mingw32/include/winreg.h:30:1: RRF_RT_DWORD = 24 // /usr/x86_64-w64-mingw32/include/winreg.h:28:1: RRF_RT_QWORD = 72 // /usr/x86_64-w64-mingw32/include/winreg.h:29:1: RRF_RT_REG_BINARY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winreg.h:23:1: RRF_RT_REG_DWORD = 0x00000010 // /usr/x86_64-w64-mingw32/include/winreg.h:24:1: RRF_RT_REG_EXPAND_SZ = 0x00000004 // /usr/x86_64-w64-mingw32/include/winreg.h:22:1: RRF_RT_REG_MULTI_SZ = 0x00000020 // /usr/x86_64-w64-mingw32/include/winreg.h:25:1: RRF_RT_REG_NONE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winreg.h:20:1: RRF_RT_REG_QWORD = 0x00000040 // /usr/x86_64-w64-mingw32/include/winreg.h:26:1: RRF_RT_REG_SZ = 0x00000002 // /usr/x86_64-w64-mingw32/include/winreg.h:21:1: RRF_ZEROONFAILURE = 0x20000000 // /usr/x86_64-w64-mingw32/include/winreg.h:39:1: RSA1024BIT_KEY = 0x4000000 // /usr/x86_64-w64-mingw32/include/wincrypt.h:320:1: RTL_CONDITION_VARIABLE_LOCKMODE_SHARED = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:8109:1: RTL_CRITICAL_SECTION_ALL_FLAG_BITS = 0xff000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8086:1: RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8090:1: RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN = 0x02000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8082:1: RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8085:1: RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO = 0x01000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8081:1: RTL_CRITICAL_SECTION_FLAG_RESERVED = 3758096384 // /usr/x86_64-w64-mingw32/include/winnt.h:8088:1: RTL_CRITICAL_SECTION_FLAG_RESOURCE_TYPE = 0x08000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8084:1: RTL_CRITICAL_SECTION_FLAG_STATIC_INIT = 0x04000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8083:1: RTL_CRITSECT_TYPE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8078:1: RTL_RESOURCE_TYPE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8079:1: RTL_RUN_ONCE_ASYNC = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7785:1: RTL_RUN_ONCE_CHECK_ONLY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7784:1: RTL_RUN_ONCE_CTX_RESERVED_BITS = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7787:1: RTL_RUN_ONCE_INIT_FAILED = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7786:1: RTL_UMS_VERSION = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:8026:1: RTL_VRF_FLG_APPCOMPAT_CHECKS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8303:1: RTL_VRF_FLG_COM_CHECKS = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:8307:1: RTL_VRF_FLG_DANGEROUS_APIS = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:8308:1: RTL_VRF_FLG_DEADLOCK_CHECKS = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:8310:1: RTL_VRF_FLG_DIRTY_STACKS = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8305:1: RTL_VRF_FLG_ENABLED_SYSTEM_WIDE = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:8316:1: RTL_VRF_FLG_ENABLE_LOGGING = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:8313:1: RTL_VRF_FLG_FAST_FILL_HEAP = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:8314:1: RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:8311:1: RTL_VRF_FLG_FULL_PAGE_HEAP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8299:1: RTL_VRF_FLG_HANDLE_CHECKS = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8301:1: RTL_VRF_FLG_LOCK_CHECKS = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:8318:1: RTL_VRF_FLG_MISCELLANEOUS_CHECKS = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:8317:1: RTL_VRF_FLG_RACE_CHECKS = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:8309:1: RTL_VRF_FLG_RESERVED_DONOTUSE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8300:1: RTL_VRF_FLG_RPC_CHECKS = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8306:1: RTL_VRF_FLG_STACK_CHECKS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8302:1: RTL_VRF_FLG_TLS_CHECKS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8304:1: RTL_VRF_FLG_VIRTUAL_MEM_CHECKS = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:8312:1: RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:8315:1: RTREE_CACHE_SZ = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196199:1: RTREE_CHECK_MAX_ERROR = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:199878:1: RTREE_COORD_INT32 = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196128:1: RTREE_COORD_REAL32 = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196127:1: RTREE_DEFAULT_ROWEST = 1048576 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196064:1: RTREE_EQ = 0x41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196266:1: RTREE_FALSE = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196279:1: RTREE_GE = 0x44 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196269:1: RTREE_GT = 0x45 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196270:1: RTREE_LE = 0x42 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196267:1: RTREE_LT = 0x43 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196268:1: RTREE_MATCH = 0x46 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196271:1: RTREE_MAXCELLS = 51 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196182:1: RTREE_MAX_AUX_COLUMN = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196049:1: RTREE_MAX_DEPTH = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196191:1: RTREE_MAX_DIMENSIONS = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196046:1: RTREE_MIN_ROWEST = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196065:1: RTREE_QUERY = 0x47 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196272:1: RTREE_TRUE = 0x3f // testdata/sqlite-amalgamation-3380500/sqlite3.c:196278:1: RTREE_ZERO = 0.0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:196142:1: RTS_CONTROL_DISABLE = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:280:1: RTS_CONTROL_ENABLE = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:281:1: RTS_CONTROL_HANDSHAKE = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:282:1: RTS_CONTROL_TOGGLE = 0x3 // /usr/x86_64-w64-mingw32/include/winbase.h:283:1: RUNDLGORD = 1545 // /usr/x86_64-w64-mingw32/include/dlgs.h:185:1: RUNTIME_FUNCTION_INDIRECT = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1772:1: RUSSIAN_CHARSET = 204 // /usr/x86_64-w64-mingw32/include/wingdi.h:1173:1: SACL_SECURITY_INFORMATION = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4013:1: SAL_HXX = 0 // /usr/x86_64-w64-mingw32/include/sal.h:8:1: SAL__callback = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:280:1: SAL__checkReturn = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:277:1: SAL__deref = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:61:1: SAL__deref_in = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:25:1: SAL__deref_in_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:29:1: SAL__deref_inout = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:180:1: SAL__deref_inout_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:190:1: SAL__deref_inout_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:218:1: SAL__deref_inout_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:208:1: SAL__deref_inout_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:187:1: SAL__deref_inout_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:215:1: SAL__deref_opt_in = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:33:1: SAL__deref_opt_in_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:37:1: SAL__deref_opt_inout = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:231:1: SAL__deref_opt_inout_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:241:1: SAL__deref_opt_inout_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:269:1: SAL__deref_opt_inout_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:259:1: SAL__deref_opt_inout_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:238:1: SAL__deref_opt_inout_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:266:1: SAL__deref_opt_out = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:223:1: SAL__deref_opt_out_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:256:1: SAL__deref_opt_out_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:246:1: SAL__deref_opt_out_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:224:1: SAL__deref_opt_out_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:253:1: SAL__deref_out = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:167:1: SAL__deref_out_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:177:1: SAL__deref_out_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:205:1: SAL__deref_out_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:195:1: SAL__deref_out_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:174:1: SAL__deref_out_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:202:1: SAL__exceptthat = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:66:1: SAL__execeptthat = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:67:1: SAL__format_string = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:281:1: SAL__in = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:83:1: SAL__in_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:85:1: SAL__in_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:86:1: SAL__in_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:84:1: SAL__in_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:87:1: SAL__in_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:88:1: SAL__inner_callback = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:72:1: SAL__inner_checkReturn = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:69:1: SAL__inner_fallthrough = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:75:1: SAL__inner_fallthrough_dec = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:74:1: SAL__inner_override = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:71:1: SAL__inout = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:122:1: SAL__inout_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:132:1: SAL__inout_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:162:1: SAL__inout_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:152:1: SAL__inout_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:129:1: SAL__inout_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:159:1: SAL__maybenull = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:48:1: SAL__maybereadonly = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:51:1: SAL__maybevalid = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:54:1: SAL__notnull = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:47:1: SAL__notreadonly = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:50:1: SAL__notvalid = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:53:1: SAL__null = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:46:1: SAL__nullnullterminated = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:275:1: SAL__nullterminated = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:274:1: SAL__out = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:102:1: SAL__out_nz = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:105:1: SAL__out_nz_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:106:1: SAL__out_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:137:1: SAL__out_z = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:104:1: SAL__out_z_opt = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:107:1: SAL__override = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:279:1: SAL__post = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:63:1: SAL__pre = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:62:1: SAL__readonly = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:49:1: SAL__reserved = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:276:1: SAL__valid = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:52:1: SANDBOX_INERT = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:4004:1: SAVEPOINT_BEGIN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17293:1: SAVEPOINT_RELEASE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17294:1: SAVEPOINT_ROLLBACK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17295:1: SAVE_ATTRIBUTE_VALUES = 0xD3 // /usr/x86_64-w64-mingw32/include/winioctl.h:961:1: SAVE_CTM = 4101 // /usr/x86_64-w64-mingw32/include/wingdi.h:298:1: SBM_ENABLE_ARROWS = 0x00E4 // /usr/x86_64-w64-mingw32/include/winuser.h:4869:1: SBM_GETPOS = 0x00E1 // /usr/x86_64-w64-mingw32/include/winuser.h:4865:1: SBM_GETRANGE = 0x00E3 // /usr/x86_64-w64-mingw32/include/winuser.h:4868:1: SBM_GETSCROLLBARINFO = 0x00EB // /usr/x86_64-w64-mingw32/include/winuser.h:4872:1: SBM_GETSCROLLINFO = 0x00EA // /usr/x86_64-w64-mingw32/include/winuser.h:4871:1: SBM_SETPOS = 0x00E0 // /usr/x86_64-w64-mingw32/include/winuser.h:4864:1: SBM_SETRANGE = 0x00E2 // /usr/x86_64-w64-mingw32/include/winuser.h:4866:1: SBM_SETRANGEREDRAW = 0x00E6 // /usr/x86_64-w64-mingw32/include/winuser.h:4867:1: SBM_SETSCROLLINFO = 0x00E9 // /usr/x86_64-w64-mingw32/include/winuser.h:4870:1: SBS_BOTTOMALIGN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4855:1: SBS_HORZ = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4851:1: SBS_LEFTALIGN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4854:1: SBS_RIGHTALIGN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4856:1: SBS_SIZEBOX = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4859:1: SBS_SIZEBOXBOTTOMRIGHTALIGN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4858:1: SBS_SIZEBOXTOPLEFTALIGN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4857:1: SBS_SIZEGRIP = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4860:1: SBS_TOPALIGN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4853:1: SBS_VERT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4852:1: SB_BOTH = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:180:1: SB_BOTTOM = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:194:1: SB_CONST_ALPHA = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:1641:1: SB_CTL = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:179:1: SB_ENDSCROLL = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:196:1: SB_GRAD_RECT = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:1645:1: SB_GRAD_TRI = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:1646:1: SB_HORZ = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:177:1: SB_LEFT = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:193:1: SB_LINEDOWN = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:184:1: SB_LINELEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:183:1: SB_LINERIGHT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:185:1: SB_LINEUP = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:182:1: SB_NONE = 0x00000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1640:1: SB_PAGEDOWN = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:188:1: SB_PAGELEFT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:187:1: SB_PAGERIGHT = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:189:1: SB_PAGEUP = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:186:1: SB_PIXEL_ALPHA = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:1642:1: SB_PREMULT_ALPHA = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:1643:1: SB_RIGHT = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:195:1: SB_THUMBPOSITION = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:190:1: SB_THUMBTRACK = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:191:1: SB_TOP = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:192:1: SB_VERT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:178:1: SCALINGFACTORX = 114 // /usr/x86_64-w64-mingw32/include/wingdi.h:1546:1: SCALINGFACTORY = 115 // /usr/x86_64-w64-mingw32/include/wingdi.h:1547:1: SCARD_ABSENT = 1 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:154:1: SCARD_ATR_LENGTH = 33 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:41:1: SCARD_CLASS_COMMUNICATIONS = 2 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:78:1: SCARD_CLASS_ICC_STATE = 9 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:85:1: SCARD_CLASS_IFD_PROTOCOL = 8 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:84:1: SCARD_CLASS_MECHANICAL = 6 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:82:1: SCARD_CLASS_PERF = 0x7ffe // /usr/x86_64-w64-mingw32/include/winsmcrd.h:86:1: SCARD_CLASS_POWER_MGMT = 4 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:80:1: SCARD_CLASS_PROTOCOL = 3 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:79:1: SCARD_CLASS_SECURITY = 5 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:81:1: SCARD_CLASS_SYSTEM = 0x7fff // /usr/x86_64-w64-mingw32/include/winsmcrd.h:87:1: SCARD_CLASS_VENDOR_DEFINED = 7 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:83:1: SCARD_CLASS_VENDOR_INFO = 1 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:77:1: SCARD_COLD_RESET = 1 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:52:1: SCARD_EJECT_CARD = 3 // /usr/x86_64-w64-mingw32/include/winscard.h:189:1: SCARD_LEAVE_CARD = 0 // /usr/x86_64-w64-mingw32/include/winscard.h:186:1: SCARD_NEGOTIABLE = 5 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:158:1: SCARD_POWERED = 4 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:157:1: SCARD_POWER_DOWN = 0 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:51:1: SCARD_PRESENT = 2 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:155:1: SCARD_PROTOCOL_DEFAULT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:48:1: SCARD_PROTOCOL_OPTIMAL = 0x00000000 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:49:1: SCARD_PROTOCOL_RAW = 0x00010000 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:46:1: SCARD_PROTOCOL_T0 = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:44:1: SCARD_PROTOCOL_T1 = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:45:1: SCARD_PROTOCOL_Tx = 3 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:47:1: SCARD_PROTOCOL_UNDEFINED = 0x00000000 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:43:1: SCARD_PROVIDER_CSP = 2 // /usr/x86_64-w64-mingw32/include/winscard.h:63:1: SCARD_PROVIDER_PRIMARY = 1 // /usr/x86_64-w64-mingw32/include/winscard.h:62:1: SCARD_READER_CONFISCATES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:190:1: SCARD_READER_EJECTS = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:189:1: SCARD_READER_SWALLOWS = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:188:1: SCARD_READER_TYPE_IDE = 0x10 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:196:1: SCARD_READER_TYPE_KEYBOARD = 0x04 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:194:1: SCARD_READER_TYPE_PARALELL = 0x02 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:193:1: SCARD_READER_TYPE_PCMCIA = 0x40 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:198:1: SCARD_READER_TYPE_SCSI = 0x08 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:195:1: SCARD_READER_TYPE_SERIAL = 0x01 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:192:1: SCARD_READER_TYPE_USB = 0x20 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:197:1: SCARD_READER_TYPE_VENDOR = 0xF0 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:199:1: SCARD_RESET_CARD = 1 // /usr/x86_64-w64-mingw32/include/winscard.h:187:1: SCARD_SCOPE_SYSTEM = 2 // /usr/x86_64-w64-mingw32/include/winscard.h:51:1: SCARD_SCOPE_TERMINAL = 1 // /usr/x86_64-w64-mingw32/include/winscard.h:50:1: SCARD_SCOPE_USER = 0 // /usr/x86_64-w64-mingw32/include/winscard.h:49:1: SCARD_SHARE_DIRECT = 3 // /usr/x86_64-w64-mingw32/include/winscard.h:184:1: SCARD_SHARE_EXCLUSIVE = 1 // /usr/x86_64-w64-mingw32/include/winscard.h:182:1: SCARD_SHARE_SHARED = 2 // /usr/x86_64-w64-mingw32/include/winscard.h:183:1: SCARD_SPECIFIC = 6 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:159:1: SCARD_STATE_ATRMATCH = 0x00000040 // /usr/x86_64-w64-mingw32/include/winscard.h:161:1: SCARD_STATE_CHANGED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winscard.h:156:1: SCARD_STATE_EMPTY = 0x00000010 // /usr/x86_64-w64-mingw32/include/winscard.h:159:1: SCARD_STATE_EXCLUSIVE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winscard.h:162:1: SCARD_STATE_IGNORE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winscard.h:155:1: SCARD_STATE_INUSE = 0x00000100 // /usr/x86_64-w64-mingw32/include/winscard.h:163:1: SCARD_STATE_MUTE = 0x00000200 // /usr/x86_64-w64-mingw32/include/winscard.h:164:1: SCARD_STATE_PRESENT = 0x00000020 // /usr/x86_64-w64-mingw32/include/winscard.h:160:1: SCARD_STATE_UNAVAILABLE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winscard.h:158:1: SCARD_STATE_UNAWARE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winscard.h:154:1: SCARD_STATE_UNKNOWN = 0x00000004 // /usr/x86_64-w64-mingw32/include/winscard.h:157:1: SCARD_STATE_UNPOWERED = 0x00000400 // /usr/x86_64-w64-mingw32/include/winscard.h:165:1: SCARD_SWALLOWED = 3 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:156:1: SCARD_S_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:3277:1: SCARD_T0_CMD_LENGTH = 5 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:147:1: SCARD_T0_HEADER_LENGTH = 7 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:146:1: SCARD_T1_EPILOGUE_LENGTH = 2 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:150:1: SCARD_T1_MAX_IFS = 254 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:151:1: SCARD_T1_PROLOGUE_LENGTH = 3 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:149:1: SCARD_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:153:1: SCARD_UNPOWER_CARD = 2 // /usr/x86_64-w64-mingw32/include/winscard.h:188:1: SCARD_WARM_RESET = 2 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:53:1: SCERR_NOCARDNAME = 0x4000 // /usr/x86_64-w64-mingw32/include/winscard.h:215:1: SCERR_NOGUIDS = 0x8000 // /usr/x86_64-w64-mingw32/include/winscard.h:216:1: SCHANNEL_ENC_KEY = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:650:1: SCHANNEL_MAC_KEY = 0x0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:649:1: SCHAR_MAX = 127 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:75:1: SCHAR_MIN = -128 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:73:1: SCHED_E_SERVICE_NOT_LOCALSYSTEM = 6200 // /usr/x86_64-w64-mingw32/include/winerror.h:1097:1: SCHEMA_ROOT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14497:1: SCHEME_OID_RETRIEVE_ENCODED_OBJECTW_FUNC = "SchemeDllRetrieveEncodedObjectW" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4836:1: SCHEME_OID_RETRIEVE_ENCODED_OBJECT_FUNC = "SchemeDllRetrieveEncodedObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4835:1: SCOPE_SECURITY_INFORMATION = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4016:1: SCREEN_FONTTYPE = 0x2000 // /usr/x86_64-w64-mingw32/include/commdlg.h:469:1: SCROLLLOCK_ON = 0x40 // /usr/x86_64-w64-mingw32/include/wincon.h:50:1: SCS_32BIT_BINARY = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:1123:1: SCS_64BIT_BINARY = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:1129:1: SCS_CAP_COMPSTR = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:324:1: SCS_CAP_MAKEREAD = 0x00000002 // /usr/x86_64-w64-mingw32/include/imm.h:325:1: SCS_CAP_SETRECONVERTSTRING = 0x00000004 // /usr/x86_64-w64-mingw32/include/imm.h:326:1: SCS_CHANGEATTR = 18 // /usr/x86_64-w64-mingw32/include/imm.h:368:1: SCS_CHANGECLAUSE = 36 // /usr/x86_64-w64-mingw32/include/imm.h:369:1: SCS_DOS_BINARY = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1124:1: SCS_OS216_BINARY = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:1128:1: SCS_PIF_BINARY = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:1126:1: SCS_POSIX_BINARY = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:1127:1: SCS_QUERYRECONVERTSTRING = 0x00020000 // /usr/x86_64-w64-mingw32/include/imm.h:371:1: SCS_SETRECONVERTSTRING = 0x00010000 // /usr/x86_64-w64-mingw32/include/imm.h:370:1: SCS_SETSTR = 9 // /usr/x86_64-w64-mingw32/include/imm.h:367:1: SCS_THIS_PLATFORM_BINARY = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:1132:1: SCS_WOW_BINARY = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:1125:1: SC_ARRANGE = 0xF110 // /usr/x86_64-w64-mingw32/include/winuser.h:4083:1: SC_CLOSE = 0xF060 // /usr/x86_64-w64-mingw32/include/winuser.h:4078:1: SC_CONTEXTHELP = 0xF180 // /usr/x86_64-w64-mingw32/include/winuser.h:4090:1: SC_DEFAULT = 0xF160 // /usr/x86_64-w64-mingw32/include/winuser.h:4088:1: SC_DLG_FORCE_UI = 0x04 // /usr/x86_64-w64-mingw32/include/winscard.h:213:1: SC_DLG_MINIMAL_UI = 0x01 // /usr/x86_64-w64-mingw32/include/winscard.h:211:1: SC_DLG_NO_UI = 0x02 // /usr/x86_64-w64-mingw32/include/winscard.h:212:1: SC_GROUP_IDENTIFIER = 43 // /usr/x86_64-w64-mingw32/include/winsvc.h:29:1: SC_GROUP_IDENTIFIERA = 43 // /usr/x86_64-w64-mingw32/include/winsvc.h:24:1: SC_GROUP_IDENTIFIERW = 43 // /usr/x86_64-w64-mingw32/include/winsvc.h:23:1: SC_HOTKEY = 0xF150 // /usr/x86_64-w64-mingw32/include/winuser.h:4087:1: SC_HSCROLL = 0xF080 // /usr/x86_64-w64-mingw32/include/winuser.h:4080:1: SC_ICON = 61472 // /usr/x86_64-w64-mingw32/include/winuser.h:4099:1: SC_KEYMENU = 0xF100 // /usr/x86_64-w64-mingw32/include/winuser.h:4082:1: SC_MANAGER_ALL_ACCESS = 983103 // /usr/x86_64-w64-mingw32/include/winsvc.h:76:1: SC_MANAGER_CONNECT = 0x0001 // /usr/x86_64-w64-mingw32/include/winsvc.h:69:1: SC_MANAGER_CREATE_SERVICE = 0x0002 // /usr/x86_64-w64-mingw32/include/winsvc.h:70:1: SC_MANAGER_ENUMERATE_SERVICE = 0x0004 // /usr/x86_64-w64-mingw32/include/winsvc.h:71:1: SC_MANAGER_LOCK = 0x0008 // /usr/x86_64-w64-mingw32/include/winsvc.h:72:1: SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020 // /usr/x86_64-w64-mingw32/include/winsvc.h:74:1: SC_MANAGER_QUERY_LOCK_STATUS = 0x0010 // /usr/x86_64-w64-mingw32/include/winsvc.h:73:1: SC_MAXIMIZE = 0xF030 // /usr/x86_64-w64-mingw32/include/winuser.h:4075:1: SC_MINIMIZE = 0xF020 // /usr/x86_64-w64-mingw32/include/winuser.h:4074:1: SC_MONITORPOWER = 0xF170 // /usr/x86_64-w64-mingw32/include/winuser.h:4089:1: SC_MOUSEMENU = 0xF090 // /usr/x86_64-w64-mingw32/include/winuser.h:4081:1: SC_MOVE = 0xF010 // /usr/x86_64-w64-mingw32/include/winuser.h:4073:1: SC_NEXTWINDOW = 0xF040 // /usr/x86_64-w64-mingw32/include/winuser.h:4076:1: SC_PREVWINDOW = 0xF050 // /usr/x86_64-w64-mingw32/include/winuser.h:4077:1: SC_RESTORE = 0xF120 // /usr/x86_64-w64-mingw32/include/winuser.h:4084:1: SC_SCREENSAVE = 0xF140 // /usr/x86_64-w64-mingw32/include/winuser.h:4086:1: SC_SEPARATOR = 0xF00F // /usr/x86_64-w64-mingw32/include/winuser.h:4091:1: SC_SIZE = 0xF000 // /usr/x86_64-w64-mingw32/include/winuser.h:4072:1: SC_TASKLIST = 0xF130 // /usr/x86_64-w64-mingw32/include/winuser.h:4085:1: SC_VSCROLL = 0xF070 // /usr/x86_64-w64-mingw32/include/winuser.h:4079:1: SC_ZOOM = 61488 // /usr/x86_64-w64-mingw32/include/winuser.h:4100:1: SEARCH_ALL = 0x0 // /usr/x86_64-w64-mingw32/include/winioctl.h:1215:1: SEARCH_ALL_NO_SEQ = 0x4 // /usr/x86_64-w64-mingw32/include/winioctl.h:1218:1: SEARCH_ALTERNATE = 0x2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1217:1: SEARCH_ALT_NO_SEQ = 0x6 // /usr/x86_64-w64-mingw32/include/winioctl.h:1220:1: SEARCH_PRIMARY = 0x1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1216:1: SEARCH_PRI_NO_SEQ = 0x5 // /usr/x86_64-w64-mingw32/include/winioctl.h:1219:1: SECTION_ALL_ACCESS = 983071 // /usr/x86_64-w64-mingw32/include/winnt.h:4846:1: SECTION_EXTEND_SIZE = 0x0010 // /usr/x86_64-w64-mingw32/include/winnt.h:4843:1: SECTION_MAP_EXECUTE = 0x0008 // /usr/x86_64-w64-mingw32/include/winnt.h:4842:1: SECTION_MAP_EXECUTE_EXPLICIT = 0x0020 // /usr/x86_64-w64-mingw32/include/winnt.h:4844:1: SECTION_MAP_READ = 0x0004 // /usr/x86_64-w64-mingw32/include/winnt.h:4841:1: SECTION_MAP_WRITE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:4840:1: SECTION_QUERY = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:4839:1: SECURITY_ANONYMOUS_LOGON_RID = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:2997:1: SECURITY_APPPOOL_ID_BASE_RID = 82 // /usr/x86_64-w64-mingw32/include/winnt.h:3037:1: SECURITY_APPPOOL_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3038:1: SECURITY_APP_PACKAGE_BASE_RID = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3138:1: SECURITY_APP_PACKAGE_RID_COUNT = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3140:1: SECURITY_AUTHENTICATED_USER_RID = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:3002:1: SECURITY_AUTHENTICATION_AUTHORITY_ASSERTED_RID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3180:1: SECURITY_AUTHENTICATION_AUTHORITY_RID_COUNT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3179:1: SECURITY_AUTHENTICATION_SERVICE_ASSERTED_RID = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3181:1: SECURITY_BATCH_RID = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:2992:1: SECURITY_BUILTIN_APP_PACKAGE_RID_COUNT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3139:1: SECURITY_BUILTIN_CAPABILITY_RID_COUNT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3142:1: SECURITY_BUILTIN_DOMAIN_RID = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:3017:1: SECURITY_BUILTIN_PACKAGE_ANY_PACKAGE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3145:1: SECURITY_BUILTIN_PACKAGE_ANY_RESTRICTED_PACKAGE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3146:1: SECURITY_CAPABILITY_APPOINTMENTS = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:3158:1: SECURITY_CAPABILITY_BASE_RID = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3141:1: SECURITY_CAPABILITY_CONTACTS = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:3159:1: SECURITY_CAPABILITY_DOCUMENTS_LIBRARY = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:3154:1: SECURITY_CAPABILITY_ENTERPRISE_AUTHENTICATION = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3155:1: SECURITY_CAPABILITY_INTERNET_CLIENT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3148:1: SECURITY_CAPABILITY_INTERNET_CLIENT_SERVER = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3149:1: SECURITY_CAPABILITY_INTERNET_EXPLORER = 4096 // /usr/x86_64-w64-mingw32/include/winnt.h:3160:1: SECURITY_CAPABILITY_MUSIC_LIBRARY = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3153:1: SECURITY_CAPABILITY_PICTURES_LIBRARY = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3151:1: SECURITY_CAPABILITY_PRIVATE_NETWORK_CLIENT_SERVER = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3150:1: SECURITY_CAPABILITY_REMOVABLE_STORAGE = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:3157:1: SECURITY_CAPABILITY_RID_COUNT = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:3143:1: SECURITY_CAPABILITY_SHARED_USER_CERTIFICATES = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:3156:1: SECURITY_CAPABILITY_VIDEOS_LIBRARY = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:3152:1: SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_BASE_RID = 85 // /usr/x86_64-w64-mingw32/include/winnt.h:3046:1: SECURITY_CLOUD_INFRASTRUCTURE_SERVICES_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3047:1: SECURITY_COM_ID_BASE_RID = 89 // /usr/x86_64-w64-mingw32/include/winnt.h:3056:1: SECURITY_CONTEXT_TRACKING = 0x40000 // /usr/x86_64-w64-mingw32/include/winbase.h:151:1: SECURITY_CREATOR_GROUP_RID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2983:1: SECURITY_CREATOR_GROUP_SERVER_RID = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:2985:1: SECURITY_CREATOR_OWNER_RID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2982:1: SECURITY_CREATOR_OWNER_RIGHTS_RID = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:2986:1: SECURITY_CREATOR_OWNER_SERVER_RID = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:2984:1: SECURITY_CRED_TYPE_BASE_RID = 65 // /usr/x86_64-w64-mingw32/include/winnt.h:3026:1: SECURITY_CRED_TYPE_RID_COUNT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3027:1: SECURITY_CRED_TYPE_THIS_ORG_CERT_RID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3028:1: SECURITY_DASHOST_ID_BASE_RID = 92 // /usr/x86_64-w64-mingw32/include/winnt.h:3062:1: SECURITY_DASHOST_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3063:1: SECURITY_DESCRIPTOR_REVISION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3516:1: SECURITY_DESCRIPTOR_REVISION1 = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3517:1: SECURITY_DIALUP_RID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2990:1: SECURITY_DYNAMIC_TRACKING = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3984:1: SECURITY_EFFECTIVE_ONLY = 0x80000 // /usr/x86_64-w64-mingw32/include/winbase.h:152:1: SECURITY_ENTERPRISE_CONTROLLERS_RID = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:2999:1: SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID = 22 // /usr/x86_64-w64-mingw32/include/winnt.h:3015:1: SECURITY_INTERACTIVE_RID = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:2993:1: SECURITY_IUSER_RID = 17 // /usr/x86_64-w64-mingw32/include/winnt.h:3007:1: SECURITY_LOCAL_LOGON_RID = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2980:1: SECURITY_LOCAL_RID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2979:1: SECURITY_LOCAL_SERVICE_RID = 19 // /usr/x86_64-w64-mingw32/include/winnt.h:3009:1: SECURITY_LOCAL_SYSTEM_RID = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:3008:1: SECURITY_LOGON_IDS_RID = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:2994:1: SECURITY_LOGON_IDS_RID_COUNT = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:2995:1: SECURITY_MANDATORY_HIGH_RID = 12288 // /usr/x86_64-w64-mingw32/include/winnt.h:3168:1: SECURITY_MANDATORY_LOW_RID = 4096 // /usr/x86_64-w64-mingw32/include/winnt.h:3166:1: SECURITY_MANDATORY_MAXIMUM_USER_RID = 16384 // /usr/x86_64-w64-mingw32/include/winnt.h:3172:1: SECURITY_MANDATORY_MEDIUM_RID = 8192 // /usr/x86_64-w64-mingw32/include/winnt.h:3167:1: SECURITY_MANDATORY_PROTECTED_PROCESS_RID = 20480 // /usr/x86_64-w64-mingw32/include/winnt.h:3170:1: SECURITY_MANDATORY_SYSTEM_RID = 16384 // /usr/x86_64-w64-mingw32/include/winnt.h:3169:1: SECURITY_MANDATORY_UNTRUSTED_RID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:3165:1: SECURITY_MAX_ALWAYS_FILTERED = 999 // /usr/x86_64-w64-mingw32/include/winnt.h:3069:1: SECURITY_MAX_BASE_RID = 111 // /usr/x86_64-w64-mingw32/include/winnt.h:3067:1: SECURITY_MIN_BASE_RID = 80 // /usr/x86_64-w64-mingw32/include/winnt.h:3030:1: SECURITY_MIN_NEVER_FILTERED = 1000 // /usr/x86_64-w64-mingw32/include/winnt.h:3070:1: SECURITY_NETWORK_RID = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:2991:1: SECURITY_NETWORK_SERVICE_RID = 20 // /usr/x86_64-w64-mingw32/include/winnt.h:3010:1: SECURITY_NFS_ID_BASE_RID = 88 // /usr/x86_64-w64-mingw32/include/winnt.h:3054:1: SECURITY_NT_NON_UNIQUE = 21 // /usr/x86_64-w64-mingw32/include/winnt.h:3012:1: SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3013:1: SECURITY_NULL_RID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2977:1: SECURITY_OTHER_ORGANIZATION_RID = 1000 // /usr/x86_64-w64-mingw32/include/winnt.h:3072:1: SECURITY_PACKAGE_BASE_RID = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:3020:1: SECURITY_PACKAGE_DIGEST_RID = 21 // /usr/x86_64-w64-mingw32/include/winnt.h:3024:1: SECURITY_PACKAGE_NTLM_RID = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:3022:1: SECURITY_PACKAGE_RID_COUNT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3021:1: SECURITY_PACKAGE_SCHANNEL_RID = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:3023:1: SECURITY_PRINCIPAL_SELF_RID = 10 // /usr/x86_64-w64-mingw32/include/winnt.h:3001:1: SECURITY_PROXY_RID = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:2998:1: SECURITY_RDV_GFX_BASE_RID = 91 // /usr/x86_64-w64-mingw32/include/winnt.h:3060:1: SECURITY_REMOTE_LOGON_RID = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:3005:1: SECURITY_RESERVED_ID_BASE_RID = 81 // /usr/x86_64-w64-mingw32/include/winnt.h:3035:1: SECURITY_RESTRICTED_CODE_RID = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:3003:1: SECURITY_SERVER_LOGON_RID = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:3000:1: SECURITY_SERVICE_ID_BASE_RID = 80 // /usr/x86_64-w64-mingw32/include/winnt.h:3032:1: SECURITY_SERVICE_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3033:1: SECURITY_SERVICE_RID = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:2996:1: SECURITY_SQOS_PRESENT = 0x100000 // /usr/x86_64-w64-mingw32/include/winbase.h:154:1: SECURITY_STATIC_TRACKING = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:3985:1: SECURITY_TASK_ID_BASE_RID = 87 // /usr/x86_64-w64-mingw32/include/winnt.h:3052:1: SECURITY_TERMINAL_SERVER_RID = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:3004:1: SECURITY_THIS_ORGANIZATION_RID = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:3006:1: SECURITY_TRUSTED_INSTALLER_RID1 = 956008885 // /usr/x86_64-w64-mingw32/include/winnt.h:3183:1: SECURITY_TRUSTED_INSTALLER_RID2 = 3418522649 // /usr/x86_64-w64-mingw32/include/winnt.h:3184:1: SECURITY_TRUSTED_INSTALLER_RID3 = 1831038044 // /usr/x86_64-w64-mingw32/include/winnt.h:3185:1: SECURITY_TRUSTED_INSTALLER_RID4 = 1853292631 // /usr/x86_64-w64-mingw32/include/winnt.h:3186:1: SECURITY_TRUSTED_INSTALLER_RID5 = 2271478464 // /usr/x86_64-w64-mingw32/include/winnt.h:3187:1: SECURITY_USERMODEDRIVERHOST_ID_BASE_RID = 84 // /usr/x86_64-w64-mingw32/include/winnt.h:3043:1: SECURITY_USERMODEDRIVERHOST_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3044:1: SECURITY_VALID_SQOS_FLAGS = 0x1f0000 // /usr/x86_64-w64-mingw32/include/winbase.h:155:1: SECURITY_VIRTUALACCOUNT_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3065:1: SECURITY_VIRTUALSERVER_ID_BASE_RID = 83 // /usr/x86_64-w64-mingw32/include/winnt.h:3040:1: SECURITY_VIRTUALSERVER_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3041:1: SECURITY_WINDOWSMOBILE_ID_BASE_RID = 112 // /usr/x86_64-w64-mingw32/include/winnt.h:3074:1: SECURITY_WINDOW_MANAGER_BASE_RID = 90 // /usr/x86_64-w64-mingw32/include/winnt.h:3058:1: SECURITY_WMIHOST_ID_BASE_RID = 86 // /usr/x86_64-w64-mingw32/include/winnt.h:3049:1: SECURITY_WMIHOST_ID_RID_COUNT = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:3050:1: SECURITY_WORLD_RID = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2978:1: SECURITY_WRITE_RESTRICTED_CODE_RID = 33 // /usr/x86_64-w64-mingw32/include/winnt.h:3018:1: SEC_64K_PAGES = 0x80000 // /usr/x86_64-w64-mingw32/include/winnt.h:4935:1: SEC_COMMIT = 0x8000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4940:1: SEC_FILE = 0x800000 // /usr/x86_64-w64-mingw32/include/winnt.h:4936:1: SEC_IMAGE = 0x1000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4937:1: SEC_IMAGE_NO_EXECUTE = 285212672 // /usr/x86_64-w64-mingw32/include/winnt.h:4944:1: SEC_LARGE_PAGES = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4943:1: SEC_NOCACHE = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4941:1: SEC_PARTITION_OWNER_HANDLE = 0x40000 // /usr/x86_64-w64-mingw32/include/winnt.h:4934:1: SEC_PROTECTED_IMAGE = 0x2000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4938:1: SEC_RESERVE = 0x4000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4939:1: SEC_WINNT_AUTH_IDENTITY_ANSI = 0x1 // /usr/x86_64-w64-mingw32/include/rpcdce.h:321:1: SEC_WINNT_AUTH_IDENTITY_UNICODE = 0x2 // /usr/x86_64-w64-mingw32/include/rpcdce.h:322:1: SEC_WRITECOMBINE = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:4942:1: SEEK_CUR = 1 // /usr/x86_64-w64-mingw32/include/stdio.h:53:1: SEEK_END = 2 // /usr/x86_64-w64-mingw32/include/stdio.h:54:1: SEEK_SET = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:55:1: SEE_MASK_ASYNCOK = 0x100000 // /usr/x86_64-w64-mingw32/include/shellapi.h:273:1: SEE_MASK_CLASSKEY = 0x3 // /usr/x86_64-w64-mingw32/include/shellapi.h:257:1: SEE_MASK_CLASSNAME = 0x1 // /usr/x86_64-w64-mingw32/include/shellapi.h:256:1: SEE_MASK_CONNECTNETDRV = 0x80 // /usr/x86_64-w64-mingw32/include/shellapi.h:266:1: SEE_MASK_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/shellapi.h:255:1: SEE_MASK_DOENVSUBST = 0x200 // /usr/x86_64-w64-mingw32/include/shellapi.h:269:1: SEE_MASK_FLAG_DDEWAIT = 256 // /usr/x86_64-w64-mingw32/include/shellapi.h:268:1: SEE_MASK_FLAG_LOG_USAGE = 0x4000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:278:1: SEE_MASK_FLAG_NO_UI = 0x400 // /usr/x86_64-w64-mingw32/include/shellapi.h:270:1: SEE_MASK_HMONITOR = 0x200000 // /usr/x86_64-w64-mingw32/include/shellapi.h:274:1: SEE_MASK_HOTKEY = 0x20 // /usr/x86_64-w64-mingw32/include/shellapi.h:264:1: SEE_MASK_ICON = 0x10 // /usr/x86_64-w64-mingw32/include/shellapi.h:262:1: SEE_MASK_IDLIST = 0x4 // /usr/x86_64-w64-mingw32/include/shellapi.h:259:1: SEE_MASK_INVOKEIDLIST = 0xc // /usr/x86_64-w64-mingw32/include/shellapi.h:260:1: SEE_MASK_NOASYNC = 0x100 // /usr/x86_64-w64-mingw32/include/shellapi.h:267:1: SEE_MASK_NOCLOSEPROCESS = 0x40 // /usr/x86_64-w64-mingw32/include/shellapi.h:265:1: SEE_MASK_NOQUERYCLASSSTORE = 0x1000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:276:1: SEE_MASK_NOZONECHECKS = 0x800000 // /usr/x86_64-w64-mingw32/include/shellapi.h:275:1: SEE_MASK_NO_CONSOLE = 0x8000 // /usr/x86_64-w64-mingw32/include/shellapi.h:272:1: SEE_MASK_UNICODE = 0x4000 // /usr/x86_64-w64-mingw32/include/shellapi.h:271:1: SEE_MASK_WAITFORINPUTIDLE = 0x2000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:277:1: SEF_AVOID_OWNER_CHECK = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:7909:1: SEF_AVOID_OWNER_RESTRICTION = 0x1000 // /usr/x86_64-w64-mingw32/include/winnt.h:7915:1: SEF_AVOID_PRIVILEGE_CHECK = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:7908:1: SEF_DACL_AUTO_INHERIT = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:7905:1: SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:7907:1: SEF_DEFAULT_GROUP_FROM_PARENT = 0x40 // /usr/x86_64-w64-mingw32/include/winnt.h:7911:1: SEF_DEFAULT_OWNER_FROM_PARENT = 0x20 // /usr/x86_64-w64-mingw32/include/winnt.h:7910:1: SEF_MACL_NO_EXECUTE_UP = 0x400 // /usr/x86_64-w64-mingw32/include/winnt.h:7914:1: SEF_MACL_NO_READ_UP = 0x200 // /usr/x86_64-w64-mingw32/include/winnt.h:7913:1: SEF_MACL_NO_WRITE_UP = 0x100 // /usr/x86_64-w64-mingw32/include/winnt.h:7912:1: SEF_MACL_VALID_FLAGS = 1792 // /usr/x86_64-w64-mingw32/include/winnt.h:7917:1: SEF_SACL_AUTO_INHERIT = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:7906:1: SELECTDIB = 41 // /usr/x86_64-w64-mingw32/include/mmsystem.h:2625:1: SELECTPAPERSOURCE = 18 // /usr/x86_64-w64-mingw32/include/wingdi.h:251:1: SELECTTRACE_ENABLED = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14439:1: SELECT_CAP_CONVERSION = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:328:1: SELECT_CAP_SENTENCE = 0x00000002 // /usr/x86_64-w64-mingw32/include/imm.h:329:1: SEMAPHORE_ALL_ACCESS = 2031619 // /usr/x86_64-w64-mingw32/include/winnt.h:4594:1: SEMAPHORE_MODIFY_STATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:4593:1: SEM_FAILCRITICALERRORS = 0x0001 // /usr/x86_64-w64-mingw32/include/winbase.h:1331:1: SEM_NOALIGNMENTFAULTEXCEPT = 0x0004 // /usr/x86_64-w64-mingw32/include/winbase.h:1333:1: SEM_NOGPFAULTERRORBOX = 0x0002 // /usr/x86_64-w64-mingw32/include/winbase.h:1332:1: SEM_NOOPENFILEERRORBOX = 0x8000 // /usr/x86_64-w64-mingw32/include/winbase.h:1334:1: SENTINEL_Reason = 0 // /usr/x86_64-w64-mingw32/include/reason.h:7:1: SERIAL_NUMBER_LENGTH = 32 // /usr/x86_64-w64-mingw32/include/winioctl.h:992:1: SERKF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5549:1: SERKF_INDICATOR = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5550:1: SERKF_SERIALKEYSON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5548:1: SERVER_ACCESS_ADMINISTER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:1273:1: SERVER_ACCESS_ENUMERATE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:1274:1: SERVER_ALL_ACCESS = 983043 // /usr/x86_64-w64-mingw32/include/winspool.h:1282:1: SERVER_EXECUTE = 131074 // /usr/x86_64-w64-mingw32/include/winspool.h:1285:1: SERVER_READ = 131074 // /usr/x86_64-w64-mingw32/include/winspool.h:1283:1: SERVER_WRITE = 131075 // /usr/x86_64-w64-mingw32/include/winspool.h:1284:1: SERVICES_ACTIVE_DATABASEA = "ServicesActive" // /usr/x86_64-w64-mingw32/include/winsvc.h:20:1: SERVICES_FAILED_DATABASEA = "ServicesFailed" // /usr/x86_64-w64-mingw32/include/winsvc.h:21:1: SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020 // /usr/x86_64-w64-mingw32/include/winsvc.h:65:1: SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winsvc.h:64:1: SERVICE_ACCEPT_PARAMCHANGE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winsvc.h:63:1: SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsvc.h:61:1: SERVICE_ACCEPT_POWEREVENT = 0x00000040 // /usr/x86_64-w64-mingw32/include/winsvc.h:66:1: SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winsvc.h:67:1: SERVICE_ACCEPT_SHUTDOWN = 0x00000004 // /usr/x86_64-w64-mingw32/include/winsvc.h:62:1: SERVICE_ACCEPT_STOP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsvc.h:60:1: SERVICE_ACTIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsvc.h:33:1: SERVICE_ADAPTER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8560:1: SERVICE_ALL_ACCESS = 983551 // /usr/x86_64-w64-mingw32/include/winsvc.h:88:1: SERVICE_AUTO_START = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8575:1: SERVICE_BOOT_START = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8573:1: SERVICE_CHANGE_CONFIG = 0x0002 // /usr/x86_64-w64-mingw32/include/winsvc.h:79:1: SERVICE_CONFIG_DESCRIPTION = 1 // /usr/x86_64-w64-mingw32/include/winsvc.h:92:1: SERVICE_CONFIG_FAILURE_ACTIONS = 2 // /usr/x86_64-w64-mingw32/include/winsvc.h:93:1: SERVICE_CONTINUE_PENDING = 0x00000005 // /usr/x86_64-w64-mingw32/include/winsvc.h:56:1: SERVICE_CONTROL_CONTINUE = 0x00000003 // /usr/x86_64-w64-mingw32/include/winsvc.h:39:1: SERVICE_CONTROL_DEVICEEVENT = 0x0000000B // /usr/x86_64-w64-mingw32/include/winsvc.h:47:1: SERVICE_CONTROL_HARDWAREPROFILECHANGE = 0x0000000C // /usr/x86_64-w64-mingw32/include/winsvc.h:48:1: SERVICE_CONTROL_INTERROGATE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winsvc.h:40:1: SERVICE_CONTROL_NETBINDADD = 0x00000007 // /usr/x86_64-w64-mingw32/include/winsvc.h:43:1: SERVICE_CONTROL_NETBINDDISABLE = 0x0000000A // /usr/x86_64-w64-mingw32/include/winsvc.h:46:1: SERVICE_CONTROL_NETBINDENABLE = 0x00000009 // /usr/x86_64-w64-mingw32/include/winsvc.h:45:1: SERVICE_CONTROL_NETBINDREMOVE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winsvc.h:44:1: SERVICE_CONTROL_PARAMCHANGE = 0x00000006 // /usr/x86_64-w64-mingw32/include/winsvc.h:42:1: SERVICE_CONTROL_PAUSE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsvc.h:38:1: SERVICE_CONTROL_POWEREVENT = 0x0000000D // /usr/x86_64-w64-mingw32/include/winsvc.h:49:1: SERVICE_CONTROL_SESSIONCHANGE = 0x0000000E // /usr/x86_64-w64-mingw32/include/winsvc.h:50:1: SERVICE_CONTROL_SHUTDOWN = 0x00000005 // /usr/x86_64-w64-mingw32/include/winsvc.h:41:1: SERVICE_CONTROL_STOP = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsvc.h:37:1: SERVICE_DEMAND_START = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnt.h:8576:1: SERVICE_DISABLED = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8577:1: SERVICE_DRIVER = 11 // /usr/x86_64-w64-mingw32/include/winnt.h:8563:1: SERVICE_ENUMERATE_DEPENDENTS = 0x0008 // /usr/x86_64-w64-mingw32/include/winsvc.h:81:1: SERVICE_ERROR_CRITICAL = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnt.h:8582:1: SERVICE_ERROR_IGNORE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8579:1: SERVICE_ERROR_NORMAL = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8580:1: SERVICE_ERROR_SEVERE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8581:1: SERVICE_FILE_SYSTEM_DRIVER = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8559:1: SERVICE_INACTIVE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsvc.h:34:1: SERVICE_INTERACTIVE_PROCESS = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:8569:1: SERVICE_INTERROGATE = 0x0080 // /usr/x86_64-w64-mingw32/include/winsvc.h:85:1: SERVICE_KERNEL_DRIVER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8558:1: SERVICE_NO_CHANGE = 0xffffffff // /usr/x86_64-w64-mingw32/include/winsvc.h:31:1: SERVICE_PAUSED = 0x00000007 // /usr/x86_64-w64-mingw32/include/winsvc.h:58:1: SERVICE_PAUSE_CONTINUE = 0x0040 // /usr/x86_64-w64-mingw32/include/winsvc.h:84:1: SERVICE_PAUSE_PENDING = 0x00000006 // /usr/x86_64-w64-mingw32/include/winsvc.h:57:1: SERVICE_QUERY_CONFIG = 0x0001 // /usr/x86_64-w64-mingw32/include/winsvc.h:78:1: SERVICE_QUERY_STATUS = 0x0004 // /usr/x86_64-w64-mingw32/include/winsvc.h:80:1: SERVICE_RECOGNIZER_DRIVER = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8561:1: SERVICE_RUNNING = 0x00000004 // /usr/x86_64-w64-mingw32/include/winsvc.h:55:1: SERVICE_RUNS_IN_SYSTEM_PROCESS = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsvc.h:90:1: SERVICE_START = 0x0010 // /usr/x86_64-w64-mingw32/include/winsvc.h:82:1: SERVICE_START_PENDING = 0x00000002 // /usr/x86_64-w64-mingw32/include/winsvc.h:53:1: SERVICE_STATE_ALL = 3 // /usr/x86_64-w64-mingw32/include/winsvc.h:35:1: SERVICE_STOP = 0x0020 // /usr/x86_64-w64-mingw32/include/winsvc.h:83:1: SERVICE_STOPPED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winsvc.h:52:1: SERVICE_STOP_PENDING = 0x00000003 // /usr/x86_64-w64-mingw32/include/winsvc.h:54:1: SERVICE_SYSTEM_START = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8574:1: SERVICE_TYPE_ALL = 319 // /usr/x86_64-w64-mingw32/include/winnt.h:8571:1: SERVICE_USER_DEFINED_CONTROL = 0x0100 // /usr/x86_64-w64-mingw32/include/winsvc.h:86:1: SERVICE_WIN32 = 48 // /usr/x86_64-w64-mingw32/include/winnt.h:8567:1: SERVICE_WIN32_OWN_PROCESS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8565:1: SERVICE_WIN32_SHARE_PROCESS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8566:1: SESSIONS_STRM_CHUNK_SIZE = 1024 // testdata/sqlite-amalgamation-3380500/sqlite3.c:210455:1: SESSION_ABORTED = 0x06 // /usr/x86_64-w64-mingw32/include/nb30.h:107:1: SESSION_ALL_ACCESS = 983043 // /usr/x86_64-w64-mingw32/include/winnt.h:4851:1: SESSION_ESTABLISHED = 0x03 // /usr/x86_64-w64-mingw32/include/nb30.h:104:1: SESSION_MAX_BUFFER_SZ = 2147483391 // testdata/sqlite-amalgamation-3380500/sqlite3.c:212429:1: SESSION_MODIFY_ACCESS = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:4849:1: SESSION_QUERY_ACCESS = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:4848:1: SESSION_UPDATE_CACHE_SZ = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:214201:1: SETABORTPROC = 9 // /usr/x86_64-w64-mingw32/include/wingdi.h:242:1: SETALLJUSTVALUES = 771 // /usr/x86_64-w64-mingw32/include/wingdi.h:286:1: SETBREAK = 8 // /usr/x86_64-w64-mingw32/include/winbase.h:540:1: SETCHARSET = 772 // /usr/x86_64-w64-mingw32/include/wingdi.h:287:1: SETCOLORTABLE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:237:1: SETCOPYCOUNT = 17 // /usr/x86_64-w64-mingw32/include/wingdi.h:250:1: SETDIBSCALING = 32 // /usr/x86_64-w64-mingw32/include/wingdi.h:267:1: SETDTR = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:537:1: SETICMPROFILE_EMBEDED = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4186:1: SETKERNTRACK = 770 // /usr/x86_64-w64-mingw32/include/wingdi.h:285:1: SETLINECAP = 21 // /usr/x86_64-w64-mingw32/include/wingdi.h:256:1: SETLINEJOIN = 22 // /usr/x86_64-w64-mingw32/include/wingdi.h:257:1: SETMITERLIMIT = 23 // /usr/x86_64-w64-mingw32/include/wingdi.h:258:1: SETRGBSTRINGA = "commdlg_SetRGBColor" // /usr/x86_64-w64-mingw32/include/commdlg.h:491:1: SETRTS = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:535:1: SETXOFF = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:533:1: SETXON = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:534:1: SET_ARC_DIRECTION = 4102 // /usr/x86_64-w64-mingw32/include/wingdi.h:299:1: SET_BACKGROUND_COLOR = 4103 // /usr/x86_64-w64-mingw32/include/wingdi.h:300:1: SET_BOUNDS = 4109 // /usr/x86_64-w64-mingw32/include/wingdi.h:306:1: SET_CLIP_BOX = 4108 // /usr/x86_64-w64-mingw32/include/wingdi.h:305:1: SET_MIRROR_MODE = 4110 // /usr/x86_64-w64-mingw32/include/wingdi.h:307:1: SET_POLY_MODE = 4104 // /usr/x86_64-w64-mingw32/include/wingdi.h:301:1: SET_SCREEN_ANGLE = 4105 // /usr/x86_64-w64-mingw32/include/wingdi.h:302:1: SET_SPREAD = 4106 // /usr/x86_64-w64-mingw32/include/wingdi.h:303:1: SET_TAPE_DRIVE_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:1296:1: SET_TAPE_MEDIA_INFORMATION = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:1295:1: SEVERITY_ERROR = 1 // /usr/x86_64-w64-mingw32/include/winerror.h:2223:1: SEVERITY_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:2222:1: SE_DACL_AUTO_INHERITED = 1024 // /usr/x86_64-w64-mingw32/include/winnt.h:3531:1: SE_DACL_AUTO_INHERIT_REQ = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:3529:1: SE_DACL_DEFAULTED = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3526:1: SE_DACL_PRESENT = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3525:1: SE_DACL_PROTECTED = 4096 // /usr/x86_64-w64-mingw32/include/winnt.h:3533:1: SE_ERR_ACCESSDENIED = 5 // /usr/x86_64-w64-mingw32/include/shellapi.h:244:1: SE_ERR_ASSOCINCOMPLETE = 27 // /usr/x86_64-w64-mingw32/include/shellapi.h:249:1: SE_ERR_DDEBUSY = 30 // /usr/x86_64-w64-mingw32/include/shellapi.h:252:1: SE_ERR_DDEFAIL = 29 // /usr/x86_64-w64-mingw32/include/shellapi.h:251:1: SE_ERR_DDETIMEOUT = 28 // /usr/x86_64-w64-mingw32/include/shellapi.h:250:1: SE_ERR_DLLNOTFOUND = 32 // /usr/x86_64-w64-mingw32/include/shellapi.h:246:1: SE_ERR_FNF = 2 // /usr/x86_64-w64-mingw32/include/shellapi.h:242:1: SE_ERR_NOASSOC = 31 // /usr/x86_64-w64-mingw32/include/shellapi.h:253:1: SE_ERR_OOM = 8 // /usr/x86_64-w64-mingw32/include/shellapi.h:245:1: SE_ERR_PNF = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:243:1: SE_ERR_SHARE = 26 // /usr/x86_64-w64-mingw32/include/shellapi.h:248:1: SE_GROUP_DEFAULTED = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3524:1: SE_GROUP_ENABLED = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3266:1: SE_GROUP_ENABLED_BY_DEFAULT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3265:1: SE_GROUP_INTEGRITY = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:3269:1: SE_GROUP_INTEGRITY_ENABLED = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:3270:1: SE_GROUP_LOGON_ID = 3221225472 // /usr/x86_64-w64-mingw32/include/winnt.h:3271:1: SE_GROUP_MANDATORY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3264:1: SE_GROUP_OWNER = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3267:1: SE_GROUP_RESOURCE = 536870912 // /usr/x86_64-w64-mingw32/include/winnt.h:3272:1: SE_GROUP_USE_FOR_DENY_ONLY = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:3268:1: SE_GROUP_VALID_ATTRIBUTES = 3758096511 // /usr/x86_64-w64-mingw32/include/winnt.h:3274:1: SE_LEARNING_MODE_FLAG_PERMISSIVE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:4030:1: SE_OWNER_DEFAULTED = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3523:1: SE_PRIVILEGE_ENABLED = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3582:1: SE_PRIVILEGE_ENABLED_BY_DEFAULT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3581:1: SE_PRIVILEGE_REMOVED = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3583:1: SE_PRIVILEGE_USED_FOR_ACCESS = 2147483648 // /usr/x86_64-w64-mingw32/include/winnt.h:3584:1: SE_PRIVILEGE_VALID_ATTRIBUTES = 2147483655 // /usr/x86_64-w64-mingw32/include/winnt.h:3586:1: SE_RM_CONTROL_VALID = 16384 // /usr/x86_64-w64-mingw32/include/winnt.h:3535:1: SE_SACL_AUTO_INHERITED = 2048 // /usr/x86_64-w64-mingw32/include/winnt.h:3532:1: SE_SACL_AUTO_INHERIT_REQ = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:3530:1: SE_SACL_DEFAULTED = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:3528:1: SE_SACL_PRESENT = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:3527:1: SE_SACL_PROTECTED = 8192 // /usr/x86_64-w64-mingw32/include/winnt.h:3534:1: SE_SECURITY_DESCRIPTOR_FLAG_NO_LABEL_ACE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:3627:1: SE_SECURITY_DESCRIPTOR_FLAG_NO_OWNER_ACE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:3626:1: SE_SECURITY_DESCRIPTOR_VALID_FLAGS = 0x00000003 // /usr/x86_64-w64-mingw32/include/winnt.h:3628:1: SE_SELF_RELATIVE = 32768 // /usr/x86_64-w64-mingw32/include/winnt.h:3536:1: SF_Aggregate = 0x0000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18571:1: SF_All = 0x0000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18569:1: SF_ComplexResult = 0x0040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18586:1: SF_Compound = 0x0000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18576:1: SF_Converted = 0x0010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18584:1: SF_CopyCte = 0x4000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18594:1: SF_Distinct = 0x0000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18568:1: SF_Expanded = 0x0000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18574:1: SF_FixedLimit = 0x0004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18582:1: SF_HasAgg = 0x0000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18572:1: SF_HasTypeInfo = 0x0000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18575:1: SF_IncludeHidden = 0x0020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18585:1: SF_MaybeConvert = 0x0008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18583:1: SF_MinMaxAgg = 0x0001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18580:1: SF_MultiPart = 0x2000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18593:1: SF_MultiValue = 0x0000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18578:1: SF_NestedFrom = 0x0000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18579:1: SF_NoopOrderBy = 0x0400000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18590:1: SF_OrderByReqd = 0x8000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18595:1: SF_PushDown = 0x1000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18592:1: SF_Recursive = 0x0002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18581:1: SF_Resolved = 0x0000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18570:1: SF_UFSrcCheck = 0x0800000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18591:1: SF_UsesEphemeral = 0x0000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18573:1: SF_Values = 0x0000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18577:1: SF_View = 0x0200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18589:1: SF_WhereBegin = 0x0080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18587:1: SF_WinRewrite = 0x0100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18588:1: SHADEBLENDCAPS = 120 // /usr/x86_64-w64-mingw32/include/wingdi.h:1554:1: SHARED_LOCK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16320:1: SHARED_SIZE = 510 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16387:1: SHAREVISTRINGA = "commdlg_ShareViolation" // /usr/x86_64-w64-mingw32/include/commdlg.h:488:1: SHERB_NOCONFIRMATION = 0x00000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:404:1: SHERB_NOPROGRESSUI = 0x00000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:405:1: SHERB_NOSOUND = 0x00000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:406:1: SHFILEINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/shellapi.h:573:1: SHGFI_ADDOVERLAYS = 0x000000020 // /usr/x86_64-w64-mingw32/include/shellapi.h:612:1: SHGFI_ATTRIBUTES = 0x000000800 // /usr/x86_64-w64-mingw32/include/shellapi.h:597:1: SHGFI_ATTR_SPECIFIED = 0x000020000 // /usr/x86_64-w64-mingw32/include/shellapi.h:603:1: SHGFI_DISPLAYNAME = 0x000000200 // /usr/x86_64-w64-mingw32/include/shellapi.h:595:1: SHGFI_EXETYPE = 0x000002000 // /usr/x86_64-w64-mingw32/include/shellapi.h:599:1: SHGFI_ICON = 0x000000100 // /usr/x86_64-w64-mingw32/include/shellapi.h:594:1: SHGFI_ICONLOCATION = 0x000001000 // /usr/x86_64-w64-mingw32/include/shellapi.h:598:1: SHGFI_LARGEICON = 0x000000000 // /usr/x86_64-w64-mingw32/include/shellapi.h:605:1: SHGFI_LINKOVERLAY = 0x000008000 // /usr/x86_64-w64-mingw32/include/shellapi.h:601:1: SHGFI_OPENICON = 0x000000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:607:1: SHGFI_OVERLAYINDEX = 0x000000040 // /usr/x86_64-w64-mingw32/include/shellapi.h:613:1: SHGFI_PIDL = 0x000000008 // /usr/x86_64-w64-mingw32/include/shellapi.h:609:1: SHGFI_SELECTED = 0x000010000 // /usr/x86_64-w64-mingw32/include/shellapi.h:602:1: SHGFI_SHELLICONSIZE = 0x000000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:608:1: SHGFI_SMALLICON = 0x000000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:606:1: SHGFI_SYSICONINDEX = 0x000004000 // /usr/x86_64-w64-mingw32/include/shellapi.h:600:1: SHGFI_TYPENAME = 0x000000400 // /usr/x86_64-w64-mingw32/include/shellapi.h:596:1: SHGFI_USEFILEATTRIBUTES = 0x000000010 // /usr/x86_64-w64-mingw32/include/shellapi.h:610:1: SHGNLI_NOLNK = 0x000000008 // /usr/x86_64-w64-mingw32/include/shellapi.h:755:1: SHGNLI_NOLOCNAME = 0x000000010 // /usr/x86_64-w64-mingw32/include/shellapi.h:757:1: SHGNLI_NOUNIQUE = 0x000000004 // /usr/x86_64-w64-mingw32/include/shellapi.h:754:1: SHGNLI_PIDL = 0x000000001 // /usr/x86_64-w64-mingw32/include/shellapi.h:752:1: SHGNLI_PREFIXNAME = 0x000000002 // /usr/x86_64-w64-mingw32/include/shellapi.h:753:1: SHIFTJIS_CHARSET = 128 // /usr/x86_64-w64-mingw32/include/wingdi.h:1159:1: SHIFT_PRESSED = 0x10 // /usr/x86_64-w64-mingw32/include/wincon.h:48:1: SHIL_EXTRALARGE = 2 // /usr/x86_64-w64-mingw32/include/shellapi.h:851:1: SHIL_LARGE = 0 // /usr/x86_64-w64-mingw32/include/shellapi.h:849:1: SHIL_LAST = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:857:1: SHIL_SMALL = 1 // /usr/x86_64-w64-mingw32/include/shellapi.h:850:1: SHIL_SYSSMALL = 3 // /usr/x86_64-w64-mingw32/include/shellapi.h:852:1: SHOW_FULLSCREEN = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:219:1: SHOW_ICONWINDOW = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:218:1: SHOW_OPENNOACTIVATE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:220:1: SHOW_OPENWINDOW = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:217:1: SHRT_MAX = 32767 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:106:1: SHRT_MIN = -32768 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:104:1: SHTDN_REASON_FLAG_CLEAN_UI = 0x04000000 // /usr/x86_64-w64-mingw32/include/reason.h:11:1: SHTDN_REASON_FLAG_COMMENT_REQUIRED = 0x01000000 // /usr/x86_64-w64-mingw32/include/reason.h:9:1: SHTDN_REASON_FLAG_DIRTY_PROBLEM_ID_REQUIRED = 0x02000000 // /usr/x86_64-w64-mingw32/include/reason.h:10:1: SHTDN_REASON_FLAG_DIRTY_UI = 0x08000000 // /usr/x86_64-w64-mingw32/include/reason.h:12:1: SHTDN_REASON_FLAG_PLANNED = 0x80000000 // /usr/x86_64-w64-mingw32/include/reason.h:14:1: SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000 // /usr/x86_64-w64-mingw32/include/reason.h:13:1: SHTDN_REASON_LEGACY_API = 2147942400 // /usr/x86_64-w64-mingw32/include/reason.h:56:1: SHTDN_REASON_MAJOR_APPLICATION = 0x00040000 // /usr/x86_64-w64-mingw32/include/reason.h:20:1: SHTDN_REASON_MAJOR_HARDWARE = 0x00010000 // /usr/x86_64-w64-mingw32/include/reason.h:17:1: SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 // /usr/x86_64-w64-mingw32/include/reason.h:23:1: SHTDN_REASON_MAJOR_NONE = 0x00000000 // /usr/x86_64-w64-mingw32/include/reason.h:16:1: SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000 // /usr/x86_64-w64-mingw32/include/reason.h:18:1: SHTDN_REASON_MAJOR_OTHER = 0x00000000 // /usr/x86_64-w64-mingw32/include/reason.h:15:1: SHTDN_REASON_MAJOR_POWER = 0x00060000 // /usr/x86_64-w64-mingw32/include/reason.h:22:1: SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000 // /usr/x86_64-w64-mingw32/include/reason.h:19:1: SHTDN_REASON_MAJOR_SYSTEM = 0x00050000 // /usr/x86_64-w64-mingw32/include/reason.h:21:1: SHTDN_REASON_MINOR_BLUESCREEN = 0x0000000F // /usr/x86_64-w64-mingw32/include/reason.h:40:1: SHTDN_REASON_MINOR_CORDUNPLUGGED = 0x0000000b // /usr/x86_64-w64-mingw32/include/reason.h:36:1: SHTDN_REASON_MINOR_DC_DEMOTION = 0x00000022 // /usr/x86_64-w64-mingw32/include/reason.h:54:1: SHTDN_REASON_MINOR_DC_PROMOTION = 0x00000021 // /usr/x86_64-w64-mingw32/include/reason.h:53:1: SHTDN_REASON_MINOR_DISK = 0x00000007 // /usr/x86_64-w64-mingw32/include/reason.h:32:1: SHTDN_REASON_MINOR_ENVIRONMENT = 0x0000000c // /usr/x86_64-w64-mingw32/include/reason.h:37:1: SHTDN_REASON_MINOR_HARDWARE_DRIVER = 0x0000000d // /usr/x86_64-w64-mingw32/include/reason.h:38:1: SHTDN_REASON_MINOR_HOTFIX = 0x00000011 // /usr/x86_64-w64-mingw32/include/reason.h:42:1: SHTDN_REASON_MINOR_HOTFIX_UNINSTALL = 0x00000017 // /usr/x86_64-w64-mingw32/include/reason.h:48:1: SHTDN_REASON_MINOR_HUNG = 0x00000005 // /usr/x86_64-w64-mingw32/include/reason.h:30:1: SHTDN_REASON_MINOR_INSTALLATION = 0x00000002 // /usr/x86_64-w64-mingw32/include/reason.h:27:1: SHTDN_REASON_MINOR_MAINTENANCE = 0x00000001 // /usr/x86_64-w64-mingw32/include/reason.h:26:1: SHTDN_REASON_MINOR_MMC = 0x00000019 // /usr/x86_64-w64-mingw32/include/reason.h:50:1: SHTDN_REASON_MINOR_NETWORKCARD = 0x00000009 // /usr/x86_64-w64-mingw32/include/reason.h:34:1: SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY = 0x00000014 // /usr/x86_64-w64-mingw32/include/reason.h:45:1: SHTDN_REASON_MINOR_NONE = 0x000000ff // /usr/x86_64-w64-mingw32/include/reason.h:25:1: SHTDN_REASON_MINOR_OTHER = 0x00000000 // /usr/x86_64-w64-mingw32/include/reason.h:24:1: SHTDN_REASON_MINOR_OTHERDRIVER = 0x0000000e // /usr/x86_64-w64-mingw32/include/reason.h:39:1: SHTDN_REASON_MINOR_POWER_SUPPLY = 0x0000000a // /usr/x86_64-w64-mingw32/include/reason.h:35:1: SHTDN_REASON_MINOR_PROCESSOR = 0x00000008 // /usr/x86_64-w64-mingw32/include/reason.h:33:1: SHTDN_REASON_MINOR_RECONFIG = 0x00000004 // /usr/x86_64-w64-mingw32/include/reason.h:29:1: SHTDN_REASON_MINOR_SECURITY = 0x00000013 // /usr/x86_64-w64-mingw32/include/reason.h:44:1: SHTDN_REASON_MINOR_SECURITYFIX = 0x00000012 // /usr/x86_64-w64-mingw32/include/reason.h:43:1: SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL = 0x00000018 // /usr/x86_64-w64-mingw32/include/reason.h:49:1: SHTDN_REASON_MINOR_SERVICEPACK = 0x00000010 // /usr/x86_64-w64-mingw32/include/reason.h:41:1: SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL = 0x00000016 // /usr/x86_64-w64-mingw32/include/reason.h:47:1: SHTDN_REASON_MINOR_SYSTEMRESTORE = 0x0000001a // /usr/x86_64-w64-mingw32/include/reason.h:51:1: SHTDN_REASON_MINOR_TERMSRV = 0x00000020 // /usr/x86_64-w64-mingw32/include/reason.h:52:1: SHTDN_REASON_MINOR_UNSTABLE = 0x00000006 // /usr/x86_64-w64-mingw32/include/reason.h:31:1: SHTDN_REASON_MINOR_UPGRADE = 0x00000003 // /usr/x86_64-w64-mingw32/include/reason.h:28:1: SHTDN_REASON_MINOR_WMI = 0x00000015 // /usr/x86_64-w64-mingw32/include/reason.h:46:1: SHTDN_REASON_UNKNOWN = 255 // /usr/x86_64-w64-mingw32/include/reason.h:55:1: SHTDN_REASON_VALID_BIT_MASK = 0xc0ffffff // /usr/x86_64-w64-mingw32/include/reason.h:57:1: SHUTDOWN_NORETRY = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:1512:1: SHUTDOWN_TYPE_LEN = 32 // /usr/x86_64-w64-mingw32/include/reason.h:68:1: SID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2928:1: SID_HASH_SIZE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:2944:1: SID_IDENTIFIER_AUTHORITY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2921:1: SID_MAX_SUB_AUTHORITIES = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:2938:1: SID_RECOMMENDED_SUB_AUTHORITIES = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2939:1: SID_REVISION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2937:1: SIF_ALL = 23 // /usr/x86_64-w64-mingw32/include/winuser.h:4879:1: SIF_DISABLENOSCROLL = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:4877:1: SIF_PAGE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:4875:1: SIF_POS = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:4876:1: SIF_RANGE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:4874:1: SIF_TRACKPOS = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:4878:1: SIMPLEBLOB = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:352:1: SIMPLEREGION = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:77:1: SIMULATED_FONTTYPE = 0x8000 // /usr/x86_64-w64-mingw32/include/commdlg.h:467:1: SING = 2 // /usr/x86_64-w64-mingw32/include/math.h:30:1: SITE_PIN_RULES_ALL_SUBDOMAINS_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1814:1: SIZEFULLSCREEN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1515:1: SIZEICONIC = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1514:1: SIZENORMAL = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1513:1: SIZEOF_RFPO_DATA = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:7518:1: SIZEPALETTE = 104 // /usr/x86_64-w64-mingw32/include/wingdi.h:1538:1: SIZEZOOMHIDE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1517:1: SIZEZOOMSHOW = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1516:1: SIZE_MAX = 18446744073709551615 // /usr/x86_64-w64-mingw32/include/limits.h:76:1: SIZE_MAXHIDE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1511:1: SIZE_MAXIMIZED = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1509:1: SIZE_MAXSHOW = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1510:1: SIZE_MINIMIZED = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1508:1: SIZE_RESTORED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1507:1: SKF_AUDIBLEFEEDBACK = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:5672:1: SKF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5667:1: SKF_CONFIRMHOTKEY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5669:1: SKF_HOTKEYACTIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5668:1: SKF_HOTKEYSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5670:1: SKF_INDICATOR = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5671:1: SKF_LALTLATCHED = 0x10000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5675:1: SKF_LALTLOCKED = 0x00100000 // /usr/x86_64-w64-mingw32/include/winuser.h:5683:1: SKF_LCTLLATCHED = 0x04000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5676:1: SKF_LCTLLOCKED = 0x00040000 // /usr/x86_64-w64-mingw32/include/winuser.h:5684:1: SKF_LSHIFTLATCHED = 0x01000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5677:1: SKF_LSHIFTLOCKED = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:5685:1: SKF_LWINLATCHED = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5681:1: SKF_LWINLOCKED = 0x00400000 // /usr/x86_64-w64-mingw32/include/winuser.h:5689:1: SKF_RALTLATCHED = 0x20000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5678:1: SKF_RALTLOCKED = 0x00200000 // /usr/x86_64-w64-mingw32/include/winuser.h:5686:1: SKF_RCTLLATCHED = 0x08000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5679:1: SKF_RCTLLOCKED = 0x00080000 // /usr/x86_64-w64-mingw32/include/winuser.h:5687:1: SKF_RSHIFTLATCHED = 0x02000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5680:1: SKF_RSHIFTLOCKED = 0x00020000 // /usr/x86_64-w64-mingw32/include/winuser.h:5688:1: SKF_RWINLATCHED = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:5682:1: SKF_RWINLOCKED = 0x00800000 // /usr/x86_64-w64-mingw32/include/winuser.h:5690:1: SKF_STICKYKEYSON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5666:1: SKF_TRISTATE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:5673:1: SKF_TWOKEYSOFF = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:5674:1: SLE_ERROR = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5873:1: SLE_MINORERROR = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5874:1: SLE_WARNING = 0x00000003 // /usr/x86_64-w64-mingw32/include/winuser.h:5875:1: SLOT_2_0 = 0x001fc07f // testdata/sqlite-amalgamation-3380500/sqlite3.c:238104:1: SLOT_4_2_0 = 0xf01fc07f // testdata/sqlite-amalgamation-3380500/sqlite3.c:238105:1: SMART_ABORT_OFFLINE_SELFTEST = 127 // /usr/x86_64-w64-mingw32/include/winioctl.h:941:1: SMART_CMD = 0xB0 // /usr/x86_64-w64-mingw32/include/winioctl.h:901:1: SMART_CYL_HI = 0xC2 // /usr/x86_64-w64-mingw32/include/winioctl.h:904:1: SMART_CYL_LOW = 0x4F // /usr/x86_64-w64-mingw32/include/winioctl.h:903:1: SMART_ERROR_NO_MEM = 7 // /usr/x86_64-w64-mingw32/include/winioctl.h:933:1: SMART_EXTENDED_SELFTEST_CAPTIVE = 130 // /usr/x86_64-w64-mingw32/include/winioctl.h:943:1: SMART_EXTENDED_SELFTEST_OFFLINE = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:940:1: SMART_GET_VERSION = 475264 // /usr/x86_64-w64-mingw32/include/winioctl.h:467:1: SMART_IDE_ERROR = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:927:1: SMART_INVALID_BUFFER = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:930:1: SMART_INVALID_COMMAND = 3 // /usr/x86_64-w64-mingw32/include/winioctl.h:929:1: SMART_INVALID_DRIVE = 5 // /usr/x86_64-w64-mingw32/include/winioctl.h:931:1: SMART_INVALID_FLAG = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:928:1: SMART_INVALID_IOCTL = 6 // /usr/x86_64-w64-mingw32/include/winioctl.h:932:1: SMART_INVALID_REGISTER = 8 // /usr/x86_64-w64-mingw32/include/winioctl.h:934:1: SMART_LOG_SECTOR_SIZE = 512 // /usr/x86_64-w64-mingw32/include/winioctl.h:956:1: SMART_NOT_SUPPORTED = 9 // /usr/x86_64-w64-mingw32/include/winioctl.h:935:1: SMART_NO_ERROR = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:926:1: SMART_NO_IDE_DEVICE = 10 // /usr/x86_64-w64-mingw32/include/winioctl.h:936:1: SMART_OFFLINE_ROUTINE_OFFLINE = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:938:1: SMART_RCV_DRIVE_DATA = 508040 // /usr/x86_64-w64-mingw32/include/winioctl.h:469:1: SMART_READ_LOG = 0xD5 // /usr/x86_64-w64-mingw32/include/winioctl.h:963:1: SMART_SEND_DRIVE_COMMAND = 508036 // /usr/x86_64-w64-mingw32/include/winioctl.h:468:1: SMART_SHORT_SELFTEST_CAPTIVE = 129 // /usr/x86_64-w64-mingw32/include/winioctl.h:942:1: SMART_SHORT_SELFTEST_OFFLINE = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:939:1: SMART_WRITE_LOG = 0xd6 // /usr/x86_64-w64-mingw32/include/winioctl.h:964:1: SMTO_ABORTIFHUNG = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1484:1: SMTO_BLOCK = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1483:1: SMTO_NORMAL = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1482:1: SMTO_NOTIMEOUTIFNOTHUNG = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1485:1: SM_ARRANGE = 56 // /usr/x86_64-w64-mingw32/include/winuser.h:3130:1: SM_CARETBLINKINGENABLED = 0x2002 // /usr/x86_64-w64-mingw32/include/winuser.h:3180:1: SM_CLEANBOOT = 67 // /usr/x86_64-w64-mingw32/include/winuser.h:3138:1: SM_CMETRICS = 97 // /usr/x86_64-w64-mingw32/include/winuser.h:3174:1: SM_CMONITORS = 80 // /usr/x86_64-w64-mingw32/include/winuser.h:3151:1: SM_CMOUSEBUTTONS = 43 // /usr/x86_64-w64-mingw32/include/winuser.h:3111:1: SM_CXBORDER = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:3073:1: SM_CXCURSOR = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:3081:1: SM_CXDLGFRAME = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:3075:1: SM_CXDOUBLECLK = 36 // /usr/x86_64-w64-mingw32/include/winuser.h:3104:1: SM_CXDRAG = 68 // /usr/x86_64-w64-mingw32/include/winuser.h:3139:1: SM_CXEDGE = 45 // /usr/x86_64-w64-mingw32/include/winuser.h:3119:1: SM_CXFIXEDFRAME = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:3113:1: SM_CXFOCUSBORDER = 83 // /usr/x86_64-w64-mingw32/include/winuser.h:3154:1: SM_CXFRAME = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:3100:1: SM_CXFULLSCREEN = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3084:1: SM_CXHSCROLL = 21 // /usr/x86_64-w64-mingw32/include/winuser.h:3089:1: SM_CXHTHUMB = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:3078:1: SM_CXICON = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:3079:1: SM_CXICONSPACING = 38 // /usr/x86_64-w64-mingw32/include/winuser.h:3106:1: SM_CXMAXIMIZED = 61 // /usr/x86_64-w64-mingw32/include/winuser.h:3135:1: SM_CXMAXTRACK = 59 // /usr/x86_64-w64-mingw32/include/winuser.h:3133:1: SM_CXMENUCHECK = 71 // /usr/x86_64-w64-mingw32/include/winuser.h:3142:1: SM_CXMENUSIZE = 54 // /usr/x86_64-w64-mingw32/include/winuser.h:3128:1: SM_CXMIN = 28 // /usr/x86_64-w64-mingw32/include/winuser.h:3096:1: SM_CXMINIMIZED = 57 // /usr/x86_64-w64-mingw32/include/winuser.h:3131:1: SM_CXMINSPACING = 47 // /usr/x86_64-w64-mingw32/include/winuser.h:3121:1: SM_CXMINTRACK = 34 // /usr/x86_64-w64-mingw32/include/winuser.h:3102:1: SM_CXSCREEN = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3068:1: SM_CXSIZE = 30 // /usr/x86_64-w64-mingw32/include/winuser.h:3098:1: SM_CXSIZEFRAME = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:3115:1: SM_CXSMICON = 49 // /usr/x86_64-w64-mingw32/include/winuser.h:3123:1: SM_CXSMSIZE = 52 // /usr/x86_64-w64-mingw32/include/winuser.h:3126:1: SM_CXVIRTUALSCREEN = 78 // /usr/x86_64-w64-mingw32/include/winuser.h:3149:1: SM_CXVSCROLL = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3070:1: SM_CYBORDER = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:3074:1: SM_CYCAPTION = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3072:1: SM_CYCURSOR = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:3082:1: SM_CYDLGFRAME = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:3076:1: SM_CYDOUBLECLK = 37 // /usr/x86_64-w64-mingw32/include/winuser.h:3105:1: SM_CYDRAG = 69 // /usr/x86_64-w64-mingw32/include/winuser.h:3140:1: SM_CYEDGE = 46 // /usr/x86_64-w64-mingw32/include/winuser.h:3120:1: SM_CYFIXEDFRAME = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:3114:1: SM_CYFOCUSBORDER = 84 // /usr/x86_64-w64-mingw32/include/winuser.h:3155:1: SM_CYFRAME = 33 // /usr/x86_64-w64-mingw32/include/winuser.h:3101:1: SM_CYFULLSCREEN = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:3085:1: SM_CYHSCROLL = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:3071:1: SM_CYICON = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:3080:1: SM_CYICONSPACING = 39 // /usr/x86_64-w64-mingw32/include/winuser.h:3107:1: SM_CYKANJIWINDOW = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:3086:1: SM_CYMAXIMIZED = 62 // /usr/x86_64-w64-mingw32/include/winuser.h:3136:1: SM_CYMAXTRACK = 60 // /usr/x86_64-w64-mingw32/include/winuser.h:3134:1: SM_CYMENU = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:3083:1: SM_CYMENUCHECK = 72 // /usr/x86_64-w64-mingw32/include/winuser.h:3143:1: SM_CYMENUSIZE = 55 // /usr/x86_64-w64-mingw32/include/winuser.h:3129:1: SM_CYMIN = 29 // /usr/x86_64-w64-mingw32/include/winuser.h:3097:1: SM_CYMINIMIZED = 58 // /usr/x86_64-w64-mingw32/include/winuser.h:3132:1: SM_CYMINSPACING = 48 // /usr/x86_64-w64-mingw32/include/winuser.h:3122:1: SM_CYMINTRACK = 35 // /usr/x86_64-w64-mingw32/include/winuser.h:3103:1: SM_CYSCREEN = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3069:1: SM_CYSIZE = 31 // /usr/x86_64-w64-mingw32/include/winuser.h:3099:1: SM_CYSIZEFRAME = 33 // /usr/x86_64-w64-mingw32/include/winuser.h:3116:1: SM_CYSMCAPTION = 51 // /usr/x86_64-w64-mingw32/include/winuser.h:3125:1: SM_CYSMICON = 50 // /usr/x86_64-w64-mingw32/include/winuser.h:3124:1: SM_CYSMSIZE = 53 // /usr/x86_64-w64-mingw32/include/winuser.h:3127:1: SM_CYVIRTUALSCREEN = 79 // /usr/x86_64-w64-mingw32/include/winuser.h:3150:1: SM_CYVSCROLL = 20 // /usr/x86_64-w64-mingw32/include/winuser.h:3088:1: SM_CYVTHUMB = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:3077:1: SM_DBCSENABLED = 42 // /usr/x86_64-w64-mingw32/include/winuser.h:3110:1: SM_DEBUG = 22 // /usr/x86_64-w64-mingw32/include/winuser.h:3090:1: SM_IMMENABLED = 82 // /usr/x86_64-w64-mingw32/include/winuser.h:3153:1: SM_MEDIACENTER = 87 // /usr/x86_64-w64-mingw32/include/winuser.h:3157:1: SM_MENUDROPALIGNMENT = 40 // /usr/x86_64-w64-mingw32/include/winuser.h:3108:1: SM_MIDEASTENABLED = 74 // /usr/x86_64-w64-mingw32/include/winuser.h:3145:1: SM_MOUSEPRESENT = 19 // /usr/x86_64-w64-mingw32/include/winuser.h:3087:1: SM_MOUSEWHEELPRESENT = 75 // /usr/x86_64-w64-mingw32/include/winuser.h:3146:1: SM_NETWORK = 63 // /usr/x86_64-w64-mingw32/include/winuser.h:3137:1: SM_PENWINDOWS = 41 // /usr/x86_64-w64-mingw32/include/winuser.h:3109:1: SM_REMOTECONTROL = 0x2001 // /usr/x86_64-w64-mingw32/include/winuser.h:3179:1: SM_REMOTESESSION = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:3177:1: SM_RESERVED1 = 24 // /usr/x86_64-w64-mingw32/include/winuser.h:3092:1: SM_RESERVED2 = 25 // /usr/x86_64-w64-mingw32/include/winuser.h:3093:1: SM_RESERVED3 = 26 // /usr/x86_64-w64-mingw32/include/winuser.h:3094:1: SM_RESERVED4 = 27 // /usr/x86_64-w64-mingw32/include/winuser.h:3095:1: SM_SAMEDISPLAYFORMAT = 81 // /usr/x86_64-w64-mingw32/include/winuser.h:3152:1: SM_SECURE = 44 // /usr/x86_64-w64-mingw32/include/winuser.h:3118:1: SM_SERVERR2 = 89 // /usr/x86_64-w64-mingw32/include/winuser.h:3159:1: SM_SHOWSOUNDS = 70 // /usr/x86_64-w64-mingw32/include/winuser.h:3141:1: SM_SHUTTINGDOWN = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:3178:1: SM_SLOWMACHINE = 73 // /usr/x86_64-w64-mingw32/include/winuser.h:3144:1: SM_STARTER = 88 // /usr/x86_64-w64-mingw32/include/winuser.h:3158:1: SM_SWAPBUTTON = 23 // /usr/x86_64-w64-mingw32/include/winuser.h:3091:1: SM_TABLETPC = 86 // /usr/x86_64-w64-mingw32/include/winuser.h:3156:1: SM_XVIRTUALSCREEN = 76 // /usr/x86_64-w64-mingw32/include/winuser.h:3147:1: SM_YVIRTUALSCREEN = 77 // /usr/x86_64-w64-mingw32/include/winuser.h:3148:1: SNAPSHOT_POLICY_ALWAYS = 1 // /usr/x86_64-w64-mingw32/include/reason.h:76:1: SNAPSHOT_POLICY_NEVER = 0 // /usr/x86_64-w64-mingw32/include/reason.h:75:1: SNAPSHOT_POLICY_UNPLANNED = 2 // /usr/x86_64-w64-mingw32/include/reason.h:77:1: SND_ALIAS = 65536 // /usr/x86_64-w64-mingw32/include/mmsystem.h:249:1: SND_ALIAS_ID = 1114112 // /usr/x86_64-w64-mingw32/include/mmsystem.h:250:1: SND_ALIAS_START = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:256:1: SND_APPLICATION = 0x0080 // /usr/x86_64-w64-mingw32/include/mmsystem.h:254:1: SND_ASYNC = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:243:1: SND_FILENAME = 131072 // /usr/x86_64-w64-mingw32/include/mmsystem.h:251:1: SND_LOOP = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:246:1: SND_MEMORY = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:245:1: SND_NODEFAULT = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:244:1: SND_NOSTOP = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:247:1: SND_NOWAIT = 8192 // /usr/x86_64-w64-mingw32/include/mmsystem.h:248:1: SND_PURGE = 0x0040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:253:1: SND_RESOURCE = 262148 // /usr/x86_64-w64-mingw32/include/mmsystem.h:252:1: SND_SYNC = 0x0000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:242:1: SOCKET_ERROR = -1 // /usr/x86_64-w64-mingw32/include/psdk_inc/_socket_types.h:17:1: SOCK_DGRAM = 2 // /usr/x86_64-w64-mingw32/include/winsock.h:152:1: SOCK_RAW = 3 // /usr/x86_64-w64-mingw32/include/winsock.h:153:1: SOCK_RDM = 4 // /usr/x86_64-w64-mingw32/include/winsock.h:154:1: SOCK_SEQPACKET = 5 // /usr/x86_64-w64-mingw32/include/winsock.h:155:1: SOCK_STREAM = 1 // /usr/x86_64-w64-mingw32/include/winsock.h:151:1: SOFTDIST_ADSTATE_AVAILABLE = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:8653:1: SOFTDIST_ADSTATE_DOWNLOADED = 0x2 // /usr/x86_64-w64-mingw32/include/urlmon.h:8654:1: SOFTDIST_ADSTATE_INSTALLED = 0x3 // /usr/x86_64-w64-mingw32/include/urlmon.h:8655:1: SOFTDIST_ADSTATE_NONE = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:8652:1: SOFTDIST_FLAG_DELETE_SUBSCRIPTION = 0x8 // /usr/x86_64-w64-mingw32/include/urlmon.h:8650:1: SOFTDIST_FLAG_USAGE_AUTOINSTALL = 0x4 // /usr/x86_64-w64-mingw32/include/urlmon.h:8649:1: SOFTDIST_FLAG_USAGE_EMAIL = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:8647:1: SOFTDIST_FLAG_USAGE_PRECACHE = 0x2 // /usr/x86_64-w64-mingw32/include/urlmon.h:8648:1: SOFTKEYBOARD_TYPE_C1 = 0x0002 // /usr/x86_64-w64-mingw32/include/imm.h:505:1: SOFTKEYBOARD_TYPE_T1 = 0x0001 // /usr/x86_64-w64-mingw32/include/imm.h:504:1: SOL_SOCKET = 0xffff // /usr/x86_64-w64-mingw32/include/winsock.h:253:1: SOMAXCONN = 5 // /usr/x86_64-w64-mingw32/include/winsock.h:255:1: SORTED_CTL_EXT_COUNT_OFFSET = 4 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2189:1: SORTED_CTL_EXT_FLAGS_OFFSET = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2188:1: SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2193:1: SORTED_CTL_EXT_HASH_BUCKET_OFFSET = 12 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2191:1: SORTED_CTL_EXT_MAX_COLLISION_OFFSET = 8 // /usr/x86_64-w64-mingw32/include/wincrypt.h:2190:1: SORTER_MAX_MERGE_COUNT = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:96989:1: SORTER_TYPE_INTEGER = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:96867:1: SORTER_TYPE_TEXT = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:96868:1: SORTFLAG_UseSorter = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:134339:1: SORT_CHINESE_BIG5 = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1266:1: SORT_CHINESE_BOPOMOFO = 0x3 // /usr/x86_64-w64-mingw32/include/winnt.h:1270:1: SORT_CHINESE_PRC = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:1269:1: SORT_CHINESE_PRCP = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1267:1: SORT_CHINESE_RADICALSTROKE = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:1271:1: SORT_CHINESE_UNICODE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1268:1: SORT_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1259:1: SORT_GEORGIAN_MODERN = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1282:1: SORT_GEORGIAN_TRADITIONAL = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1281:1: SORT_GERMAN_PHONE_BOOK = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1276:1: SORT_HUNGARIAN_DEFAULT = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1278:1: SORT_HUNGARIAN_TECHNICAL = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1279:1: SORT_INVARIANT_MATH = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1260:1: SORT_JAPANESE_RADICALSTROKE = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:1264:1: SORT_JAPANESE_UNICODE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1263:1: SORT_JAPANESE_XJIS = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1262:1: SORT_KOREAN_KSC = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1273:1: SORT_KOREAN_UNICODE = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1274:1: SORT_STRINGSORT = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnls.h:167:1: SOUND_SYSTEM_APPEND = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:6049:1: SOUND_SYSTEM_APPSTART = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:6047:1: SOUND_SYSTEM_BEEP = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:6038:1: SOUND_SYSTEM_ERROR = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:6039:1: SOUND_SYSTEM_FAULT = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:6048:1: SOUND_SYSTEM_INFORMATION = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:6042:1: SOUND_SYSTEM_MAXIMIZE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:6043:1: SOUND_SYSTEM_MENUCOMMAND = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:6050:1: SOUND_SYSTEM_MENUPOPUP = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:6051:1: SOUND_SYSTEM_MINIMIZE = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:6044:1: SOUND_SYSTEM_QUESTION = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:6040:1: SOUND_SYSTEM_RESTOREDOWN = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:6046:1: SOUND_SYSTEM_RESTOREUP = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:6045:1: SOUND_SYSTEM_SHUTDOWN = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:6037:1: SOUND_SYSTEM_STARTUP = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:6036:1: SOUND_SYSTEM_WARNING = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:6041:1: SO_ACCEPTCONN = 0x0002 // /usr/x86_64-w64-mingw32/include/winsock.h:158:1: SO_BROADCAST = 0x0020 // /usr/x86_64-w64-mingw32/include/winsock.h:162:1: SO_CONNDATA = 0x7000 // /usr/x86_64-w64-mingw32/include/winsock.h:178:1: SO_CONNDATALEN = 0x7004 // /usr/x86_64-w64-mingw32/include/winsock.h:182:1: SO_CONNECT_TIME = 0x700C // /usr/x86_64-w64-mingw32/include/winsock.h:195:1: SO_CONNOPT = 0x7001 // /usr/x86_64-w64-mingw32/include/winsock.h:179:1: SO_CONNOPTLEN = 0x7005 // /usr/x86_64-w64-mingw32/include/winsock.h:183:1: SO_DEBUG = 0x0001 // /usr/x86_64-w64-mingw32/include/winsock.h:157:1: SO_DISCDATA = 0x7002 // /usr/x86_64-w64-mingw32/include/winsock.h:180:1: SO_DISCDATALEN = 0x7006 // /usr/x86_64-w64-mingw32/include/winsock.h:184:1: SO_DISCOPT = 0x7003 // /usr/x86_64-w64-mingw32/include/winsock.h:181:1: SO_DISCOPTLEN = 0x7007 // /usr/x86_64-w64-mingw32/include/winsock.h:185:1: SO_DONTROUTE = 0x0010 // /usr/x86_64-w64-mingw32/include/winsock.h:161:1: SO_ERROR = 0x1007 // /usr/x86_64-w64-mingw32/include/winsock.h:175:1: SO_KEEPALIVE = 0x0008 // /usr/x86_64-w64-mingw32/include/winsock.h:160:1: SO_LINGER = 0x0080 // /usr/x86_64-w64-mingw32/include/winsock.h:164:1: SO_MAXDG = 0x7009 // /usr/x86_64-w64-mingw32/include/winsock.h:192:1: SO_MAXPATHDG = 0x700A // /usr/x86_64-w64-mingw32/include/winsock.h:193:1: SO_OOBINLINE = 0x0100 // /usr/x86_64-w64-mingw32/include/winsock.h:165:1: SO_OPENTYPE = 0x7008 // /usr/x86_64-w64-mingw32/include/winsock.h:187:1: SO_RCVBUF = 0x1002 // /usr/x86_64-w64-mingw32/include/winsock.h:170:1: SO_RCVLOWAT = 0x1004 // /usr/x86_64-w64-mingw32/include/winsock.h:172:1: SO_RCVTIMEO = 0x1006 // /usr/x86_64-w64-mingw32/include/winsock.h:174:1: SO_REUSEADDR = 0x0004 // /usr/x86_64-w64-mingw32/include/winsock.h:159:1: SO_SNDBUF = 0x1001 // /usr/x86_64-w64-mingw32/include/winsock.h:169:1: SO_SNDLOWAT = 0x1003 // /usr/x86_64-w64-mingw32/include/winsock.h:171:1: SO_SNDTIMEO = 0x1005 // /usr/x86_64-w64-mingw32/include/winsock.h:173:1: SO_SYNCHRONOUS_ALERT = 0x10 // /usr/x86_64-w64-mingw32/include/winsock.h:189:1: SO_SYNCHRONOUS_NONALERT = 0x20 // /usr/x86_64-w64-mingw32/include/winsock.h:190:1: SO_TYPE = 0x1008 // /usr/x86_64-w64-mingw32/include/winsock.h:176:1: SO_UPDATE_ACCEPT_CONTEXT = 0x700B // /usr/x86_64-w64-mingw32/include/winsock.h:194:1: SO_USELOOPBACK = 0x0040 // /usr/x86_64-w64-mingw32/include/winsock.h:163:1: SPACEPARITY = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:473:1: SPCLPASSTHROUGH2 = 4568 // /usr/x86_64-w64-mingw32/include/wingdi.h:329:1: SPECIFIC_RIGHTS_ALL = 65535 // /usr/x86_64-w64-mingw32/include/winnt.h:2893:1: SPECSTRINGS_H = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:8:1: SPIF_SENDCHANGE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:5402:1: SPIF_SENDWININICHANGE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5401:1: SPIF_UPDATEINIFILE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5400:1: SPILLFLAG_NOSYNC = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53666:1: SPILLFLAG_OFF = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53664:1: SPILLFLAG_ROLLBACK = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53665:1: SPI_GETACCESSTIMEOUT = 0x003C // /usr/x86_64-w64-mingw32/include/winuser.h:5145:1: SPI_GETACTIVEWINDOWTRACKING = 0x1000 // /usr/x86_64-w64-mingw32/include/winuser.h:5218:1: SPI_GETACTIVEWNDTRKTIMEOUT = 0x2002 // /usr/x86_64-w64-mingw32/include/winuser.h:5280:1: SPI_GETACTIVEWNDTRKZORDER = 0x100C // /usr/x86_64-w64-mingw32/include/winuser.h:5232:1: SPI_GETANIMATION = 0x0048 // /usr/x86_64-w64-mingw32/include/winuser.h:5110:1: SPI_GETBEEP = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5059:1: SPI_GETBLOCKSENDINPUTRESETS = 0x1026 // /usr/x86_64-w64-mingw32/include/winuser.h:5256:1: SPI_GETBORDER = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:5063:1: SPI_GETCARETWIDTH = 0x2006 // /usr/x86_64-w64-mingw32/include/winuser.h:5284:1: SPI_GETCOMBOBOXANIMATION = 0x1004 // /usr/x86_64-w64-mingw32/include/winuser.h:5222:1: SPI_GETCURSORSHADOW = 0x101A // /usr/x86_64-w64-mingw32/include/winuser.h:5244:1: SPI_GETDEFAULTINPUTLANG = 0x0059 // /usr/x86_64-w64-mingw32/include/winuser.h:5127:1: SPI_GETDESKWALLPAPER = 0x0073 // /usr/x86_64-w64-mingw32/include/winuser.h:5172:1: SPI_GETDRAGFULLWINDOWS = 0x0026 // /usr/x86_64-w64-mingw32/include/winuser.h:5093:1: SPI_GETDROPSHADOW = 0x1024 // /usr/x86_64-w64-mingw32/include/winuser.h:5254:1: SPI_GETFASTTASKSWITCH = 0x0023 // /usr/x86_64-w64-mingw32/include/winuser.h:5090:1: SPI_GETFILTERKEYS = 0x0032 // /usr/x86_64-w64-mingw32/include/winuser.h:5135:1: SPI_GETFLATMENU = 0x1022 // /usr/x86_64-w64-mingw32/include/winuser.h:5252:1: SPI_GETFOCUSBORDERHEIGHT = 0x2010 // /usr/x86_64-w64-mingw32/include/winuser.h:5299:1: SPI_GETFOCUSBORDERWIDTH = 0x200E // /usr/x86_64-w64-mingw32/include/winuser.h:5297:1: SPI_GETFONTSMOOTHING = 0x004A // /usr/x86_64-w64-mingw32/include/winuser.h:5112:1: SPI_GETFONTSMOOTHINGCONTRAST = 0x200C // /usr/x86_64-w64-mingw32/include/winuser.h:5295:1: SPI_GETFONTSMOOTHINGORIENTATION = 0x2012 // /usr/x86_64-w64-mingw32/include/winuser.h:5301:1: SPI_GETFONTSMOOTHINGTYPE = 0x200A // /usr/x86_64-w64-mingw32/include/winuser.h:5288:1: SPI_GETFOREGROUNDFLASHCOUNT = 0x2004 // /usr/x86_64-w64-mingw32/include/winuser.h:5282:1: SPI_GETFOREGROUNDLOCKTIMEOUT = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:5278:1: SPI_GETGRADIENTCAPTIONS = 0x1008 // /usr/x86_64-w64-mingw32/include/winuser.h:5226:1: SPI_GETGRIDGRANULARITY = 0x0012 // /usr/x86_64-w64-mingw32/include/winuser.h:5073:1: SPI_GETHIGHCONTRAST = 0x0042 // /usr/x86_64-w64-mingw32/include/winuser.h:5104:1: SPI_GETHOTTRACKING = 0x100E // /usr/x86_64-w64-mingw32/include/winuser.h:5234:1: SPI_GETICONMETRICS = 0x002D // /usr/x86_64-w64-mingw32/include/winuser.h:5098:1: SPI_GETICONTITLELOGFONT = 0x001F // /usr/x86_64-w64-mingw32/include/winuser.h:5086:1: SPI_GETICONTITLEWRAP = 0x0019 // /usr/x86_64-w64-mingw32/include/winuser.h:5080:1: SPI_GETKEYBOARDCUES = 0x100A // /usr/x86_64-w64-mingw32/include/winuser.h:5228:1: SPI_GETKEYBOARDDELAY = 0x0016 // /usr/x86_64-w64-mingw32/include/winuser.h:5077:1: SPI_GETKEYBOARDPREF = 0x0044 // /usr/x86_64-w64-mingw32/include/winuser.h:5106:1: SPI_GETKEYBOARDSPEED = 0x000A // /usr/x86_64-w64-mingw32/include/winuser.h:5065:1: SPI_GETLISTBOXSMOOTHSCROLLING = 0x1006 // /usr/x86_64-w64-mingw32/include/winuser.h:5224:1: SPI_GETLOWPOWERACTIVE = 0x0053 // /usr/x86_64-w64-mingw32/include/winuser.h:5121:1: SPI_GETLOWPOWERTIMEOUT = 0x004F // /usr/x86_64-w64-mingw32/include/winuser.h:5117:1: SPI_GETMENUANIMATION = 0x1002 // /usr/x86_64-w64-mingw32/include/winuser.h:5220:1: SPI_GETMENUDROPALIGNMENT = 0x001B // /usr/x86_64-w64-mingw32/include/winuser.h:5082:1: SPI_GETMENUFADE = 0x1012 // /usr/x86_64-w64-mingw32/include/winuser.h:5236:1: SPI_GETMENUSHOWDELAY = 0x006A // /usr/x86_64-w64-mingw32/include/winuser.h:5161:1: SPI_GETMENUUNDERLINES = 4106 // /usr/x86_64-w64-mingw32/include/winuser.h:5230:1: SPI_GETMINIMIZEDMETRICS = 0x002B // /usr/x86_64-w64-mingw32/include/winuser.h:5096:1: SPI_GETMOUSE = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:5061:1: SPI_GETMOUSECLICKLOCK = 0x101E // /usr/x86_64-w64-mingw32/include/winuser.h:5248:1: SPI_GETMOUSECLICKLOCKTIME = 0x2008 // /usr/x86_64-w64-mingw32/include/winuser.h:5286:1: SPI_GETMOUSEHOVERHEIGHT = 0x0064 // /usr/x86_64-w64-mingw32/include/winuser.h:5155:1: SPI_GETMOUSEHOVERTIME = 0x0066 // /usr/x86_64-w64-mingw32/include/winuser.h:5157:1: SPI_GETMOUSEHOVERWIDTH = 0x0062 // /usr/x86_64-w64-mingw32/include/winuser.h:5153:1: SPI_GETMOUSEKEYS = 0x0036 // /usr/x86_64-w64-mingw32/include/winuser.h:5139:1: SPI_GETMOUSESONAR = 0x101C // /usr/x86_64-w64-mingw32/include/winuser.h:5246:1: SPI_GETMOUSESPEED = 0x0070 // /usr/x86_64-w64-mingw32/include/winuser.h:5169:1: SPI_GETMOUSETRAILS = 0x005E // /usr/x86_64-w64-mingw32/include/winuser.h:5132:1: SPI_GETMOUSEVANISH = 0x1020 // /usr/x86_64-w64-mingw32/include/winuser.h:5250:1: SPI_GETNONCLIENTMETRICS = 0x0029 // /usr/x86_64-w64-mingw32/include/winuser.h:5094:1: SPI_GETPOWEROFFACTIVE = 0x0054 // /usr/x86_64-w64-mingw32/include/winuser.h:5122:1: SPI_GETPOWEROFFTIMEOUT = 0x0050 // /usr/x86_64-w64-mingw32/include/winuser.h:5118:1: SPI_GETSCREENREADER = 0x0046 // /usr/x86_64-w64-mingw32/include/winuser.h:5108:1: SPI_GETSCREENSAVEACTIVE = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:5071:1: SPI_GETSCREENSAVERRUNNING = 0x0072 // /usr/x86_64-w64-mingw32/include/winuser.h:5171:1: SPI_GETSCREENSAVETIMEOUT = 0x000E // /usr/x86_64-w64-mingw32/include/winuser.h:5069:1: SPI_GETSELECTIONFADE = 0x1014 // /usr/x86_64-w64-mingw32/include/winuser.h:5238:1: SPI_GETSERIALKEYS = 0x003E // /usr/x86_64-w64-mingw32/include/winuser.h:5147:1: SPI_GETSHOWIMEUI = 0x006E // /usr/x86_64-w64-mingw32/include/winuser.h:5167:1: SPI_GETSHOWSOUNDS = 0x0038 // /usr/x86_64-w64-mingw32/include/winuser.h:5141:1: SPI_GETSNAPTODEFBUTTON = 0x005F // /usr/x86_64-w64-mingw32/include/winuser.h:5151:1: SPI_GETSOUNDSENTRY = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:5149:1: SPI_GETSTICKYKEYS = 0x003A // /usr/x86_64-w64-mingw32/include/winuser.h:5143:1: SPI_GETTOGGLEKEYS = 0x0034 // /usr/x86_64-w64-mingw32/include/winuser.h:5137:1: SPI_GETTOOLTIPANIMATION = 0x1016 // /usr/x86_64-w64-mingw32/include/winuser.h:5240:1: SPI_GETTOOLTIPFADE = 0x1018 // /usr/x86_64-w64-mingw32/include/winuser.h:5242:1: SPI_GETUIEFFECTS = 0x103E // /usr/x86_64-w64-mingw32/include/winuser.h:5258:1: SPI_GETWHEELSCROLLLINES = 0x0068 // /usr/x86_64-w64-mingw32/include/winuser.h:5159:1: SPI_GETWINDOWSEXTENSION = 0x005C // /usr/x86_64-w64-mingw32/include/winuser.h:5130:1: SPI_GETWORKAREA = 0x0030 // /usr/x86_64-w64-mingw32/include/winuser.h:5101:1: SPI_ICONHORIZONTALSPACING = 0x000D // /usr/x86_64-w64-mingw32/include/winuser.h:5068:1: SPI_ICONVERTICALSPACING = 0x0018 // /usr/x86_64-w64-mingw32/include/winuser.h:5079:1: SPI_LANGDRIVER = 0x000C // /usr/x86_64-w64-mingw32/include/winuser.h:5067:1: SPI_SCREENSAVERRUNNING = 97 // /usr/x86_64-w64-mingw32/include/winuser.h:5134:1: SPI_SETACCESSTIMEOUT = 0x003D // /usr/x86_64-w64-mingw32/include/winuser.h:5146:1: SPI_SETACTIVEWINDOWTRACKING = 0x1001 // /usr/x86_64-w64-mingw32/include/winuser.h:5219:1: SPI_SETACTIVEWNDTRKTIMEOUT = 0x2003 // /usr/x86_64-w64-mingw32/include/winuser.h:5281:1: SPI_SETACTIVEWNDTRKZORDER = 0x100D // /usr/x86_64-w64-mingw32/include/winuser.h:5233:1: SPI_SETANIMATION = 0x0049 // /usr/x86_64-w64-mingw32/include/winuser.h:5111:1: SPI_SETBEEP = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5060:1: SPI_SETBLOCKSENDINPUTRESETS = 0x1027 // /usr/x86_64-w64-mingw32/include/winuser.h:5257:1: SPI_SETBORDER = 0x0006 // /usr/x86_64-w64-mingw32/include/winuser.h:5064:1: SPI_SETCARETWIDTH = 0x2007 // /usr/x86_64-w64-mingw32/include/winuser.h:5285:1: SPI_SETCOMBOBOXANIMATION = 0x1005 // /usr/x86_64-w64-mingw32/include/winuser.h:5223:1: SPI_SETCURSORS = 0x0057 // /usr/x86_64-w64-mingw32/include/winuser.h:5125:1: SPI_SETCURSORSHADOW = 0x101B // /usr/x86_64-w64-mingw32/include/winuser.h:5245:1: SPI_SETDEFAULTINPUTLANG = 0x005A // /usr/x86_64-w64-mingw32/include/winuser.h:5128:1: SPI_SETDESKPATTERN = 0x0015 // /usr/x86_64-w64-mingw32/include/winuser.h:5076:1: SPI_SETDESKWALLPAPER = 0x0014 // /usr/x86_64-w64-mingw32/include/winuser.h:5075:1: SPI_SETDOUBLECLICKTIME = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:5087:1: SPI_SETDOUBLECLKHEIGHT = 0x001E // /usr/x86_64-w64-mingw32/include/winuser.h:5085:1: SPI_SETDOUBLECLKWIDTH = 0x001D // /usr/x86_64-w64-mingw32/include/winuser.h:5084:1: SPI_SETDRAGFULLWINDOWS = 0x0025 // /usr/x86_64-w64-mingw32/include/winuser.h:5092:1: SPI_SETDRAGHEIGHT = 0x004D // /usr/x86_64-w64-mingw32/include/winuser.h:5115:1: SPI_SETDRAGWIDTH = 0x004C // /usr/x86_64-w64-mingw32/include/winuser.h:5114:1: SPI_SETDROPSHADOW = 0x1025 // /usr/x86_64-w64-mingw32/include/winuser.h:5255:1: SPI_SETFASTTASKSWITCH = 0x0024 // /usr/x86_64-w64-mingw32/include/winuser.h:5091:1: SPI_SETFILTERKEYS = 0x0033 // /usr/x86_64-w64-mingw32/include/winuser.h:5136:1: SPI_SETFLATMENU = 0x1023 // /usr/x86_64-w64-mingw32/include/winuser.h:5253:1: SPI_SETFOCUSBORDERHEIGHT = 0x2011 // /usr/x86_64-w64-mingw32/include/winuser.h:5300:1: SPI_SETFOCUSBORDERWIDTH = 0x200F // /usr/x86_64-w64-mingw32/include/winuser.h:5298:1: SPI_SETFONTSMOOTHING = 0x004B // /usr/x86_64-w64-mingw32/include/winuser.h:5113:1: SPI_SETFONTSMOOTHINGCONTRAST = 0x200D // /usr/x86_64-w64-mingw32/include/winuser.h:5296:1: SPI_SETFONTSMOOTHINGORIENTATION = 0x2013 // /usr/x86_64-w64-mingw32/include/winuser.h:5302:1: SPI_SETFONTSMOOTHINGTYPE = 0x200B // /usr/x86_64-w64-mingw32/include/winuser.h:5289:1: SPI_SETFOREGROUNDFLASHCOUNT = 0x2005 // /usr/x86_64-w64-mingw32/include/winuser.h:5283:1: SPI_SETFOREGROUNDLOCKTIMEOUT = 0x2001 // /usr/x86_64-w64-mingw32/include/winuser.h:5279:1: SPI_SETGRADIENTCAPTIONS = 0x1009 // /usr/x86_64-w64-mingw32/include/winuser.h:5227:1: SPI_SETGRIDGRANULARITY = 0x0013 // /usr/x86_64-w64-mingw32/include/winuser.h:5074:1: SPI_SETHANDHELD = 0x004E // /usr/x86_64-w64-mingw32/include/winuser.h:5116:1: SPI_SETHIGHCONTRAST = 0x0043 // /usr/x86_64-w64-mingw32/include/winuser.h:5105:1: SPI_SETHOTTRACKING = 0x100F // /usr/x86_64-w64-mingw32/include/winuser.h:5235:1: SPI_SETICONMETRICS = 0x002E // /usr/x86_64-w64-mingw32/include/winuser.h:5099:1: SPI_SETICONS = 0x0058 // /usr/x86_64-w64-mingw32/include/winuser.h:5126:1: SPI_SETICONTITLELOGFONT = 0x0022 // /usr/x86_64-w64-mingw32/include/winuser.h:5089:1: SPI_SETICONTITLEWRAP = 0x001A // /usr/x86_64-w64-mingw32/include/winuser.h:5081:1: SPI_SETKEYBOARDCUES = 0x100B // /usr/x86_64-w64-mingw32/include/winuser.h:5229:1: SPI_SETKEYBOARDDELAY = 0x0017 // /usr/x86_64-w64-mingw32/include/winuser.h:5078:1: SPI_SETKEYBOARDPREF = 0x0045 // /usr/x86_64-w64-mingw32/include/winuser.h:5107:1: SPI_SETKEYBOARDSPEED = 0x000B // /usr/x86_64-w64-mingw32/include/winuser.h:5066:1: SPI_SETLANGTOGGLE = 0x005B // /usr/x86_64-w64-mingw32/include/winuser.h:5129:1: SPI_SETLISTBOXSMOOTHSCROLLING = 0x1007 // /usr/x86_64-w64-mingw32/include/winuser.h:5225:1: SPI_SETLOWPOWERACTIVE = 0x0055 // /usr/x86_64-w64-mingw32/include/winuser.h:5123:1: SPI_SETLOWPOWERTIMEOUT = 0x0051 // /usr/x86_64-w64-mingw32/include/winuser.h:5119:1: SPI_SETMENUANIMATION = 0x1003 // /usr/x86_64-w64-mingw32/include/winuser.h:5221:1: SPI_SETMENUDROPALIGNMENT = 0x001C // /usr/x86_64-w64-mingw32/include/winuser.h:5083:1: SPI_SETMENUFADE = 0x1013 // /usr/x86_64-w64-mingw32/include/winuser.h:5237:1: SPI_SETMENUSHOWDELAY = 0x006B // /usr/x86_64-w64-mingw32/include/winuser.h:5162:1: SPI_SETMENUUNDERLINES = 4107 // /usr/x86_64-w64-mingw32/include/winuser.h:5231:1: SPI_SETMINIMIZEDMETRICS = 0x002C // /usr/x86_64-w64-mingw32/include/winuser.h:5097:1: SPI_SETMOUSE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:5062:1: SPI_SETMOUSEBUTTONSWAP = 0x0021 // /usr/x86_64-w64-mingw32/include/winuser.h:5088:1: SPI_SETMOUSECLICKLOCK = 0x101F // /usr/x86_64-w64-mingw32/include/winuser.h:5249:1: SPI_SETMOUSECLICKLOCKTIME = 0x2009 // /usr/x86_64-w64-mingw32/include/winuser.h:5287:1: SPI_SETMOUSEHOVERHEIGHT = 0x0065 // /usr/x86_64-w64-mingw32/include/winuser.h:5156:1: SPI_SETMOUSEHOVERTIME = 0x0067 // /usr/x86_64-w64-mingw32/include/winuser.h:5158:1: SPI_SETMOUSEHOVERWIDTH = 0x0063 // /usr/x86_64-w64-mingw32/include/winuser.h:5154:1: SPI_SETMOUSEKEYS = 0x0037 // /usr/x86_64-w64-mingw32/include/winuser.h:5140:1: SPI_SETMOUSESONAR = 0x101D // /usr/x86_64-w64-mingw32/include/winuser.h:5247:1: SPI_SETMOUSESPEED = 0x0071 // /usr/x86_64-w64-mingw32/include/winuser.h:5170:1: SPI_SETMOUSETRAILS = 0x005D // /usr/x86_64-w64-mingw32/include/winuser.h:5131:1: SPI_SETMOUSEVANISH = 0x1021 // /usr/x86_64-w64-mingw32/include/winuser.h:5251:1: SPI_SETNONCLIENTMETRICS = 0x002A // /usr/x86_64-w64-mingw32/include/winuser.h:5095:1: SPI_SETPENWINDOWS = 0x0031 // /usr/x86_64-w64-mingw32/include/winuser.h:5102:1: SPI_SETPOWEROFFACTIVE = 0x0056 // /usr/x86_64-w64-mingw32/include/winuser.h:5124:1: SPI_SETPOWEROFFTIMEOUT = 0x0052 // /usr/x86_64-w64-mingw32/include/winuser.h:5120:1: SPI_SETSCREENREADER = 0x0047 // /usr/x86_64-w64-mingw32/include/winuser.h:5109:1: SPI_SETSCREENSAVEACTIVE = 0x0011 // /usr/x86_64-w64-mingw32/include/winuser.h:5072:1: SPI_SETSCREENSAVERRUNNING = 0x0061 // /usr/x86_64-w64-mingw32/include/winuser.h:5133:1: SPI_SETSCREENSAVETIMEOUT = 0x000F // /usr/x86_64-w64-mingw32/include/winuser.h:5070:1: SPI_SETSELECTIONFADE = 0x1015 // /usr/x86_64-w64-mingw32/include/winuser.h:5239:1: SPI_SETSERIALKEYS = 0x003F // /usr/x86_64-w64-mingw32/include/winuser.h:5148:1: SPI_SETSHOWIMEUI = 0x006F // /usr/x86_64-w64-mingw32/include/winuser.h:5168:1: SPI_SETSHOWSOUNDS = 0x0039 // /usr/x86_64-w64-mingw32/include/winuser.h:5142:1: SPI_SETSNAPTODEFBUTTON = 0x0060 // /usr/x86_64-w64-mingw32/include/winuser.h:5152:1: SPI_SETSOUNDSENTRY = 0x0041 // /usr/x86_64-w64-mingw32/include/winuser.h:5150:1: SPI_SETSTICKYKEYS = 0x003B // /usr/x86_64-w64-mingw32/include/winuser.h:5144:1: SPI_SETTOGGLEKEYS = 0x0035 // /usr/x86_64-w64-mingw32/include/winuser.h:5138:1: SPI_SETTOOLTIPANIMATION = 0x1017 // /usr/x86_64-w64-mingw32/include/winuser.h:5241:1: SPI_SETTOOLTIPFADE = 0x1019 // /usr/x86_64-w64-mingw32/include/winuser.h:5243:1: SPI_SETUIEFFECTS = 0x103F // /usr/x86_64-w64-mingw32/include/winuser.h:5259:1: SPI_SETWHEELSCROLLLINES = 0x0069 // /usr/x86_64-w64-mingw32/include/winuser.h:5160:1: SPI_SETWORKAREA = 0x002F // /usr/x86_64-w64-mingw32/include/winuser.h:5100:1: SPOINTER_32 = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:22:1: SPOOL_FILE_PERSISTENT = 0x00000001 // /usr/x86_64-w64-mingw32/include/winspool.h:825:1: SPOOL_FILE_TEMPORARY = 0x00000002 // /usr/x86_64-w64-mingw32/include/winspool.h:826:1: SPVERSION_MASK = 0x0000FF00 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:152:1: SP_APPABORT = -2 // /usr/x86_64-w64-mingw32/include/wingdi.h:419:1: SP_ERROR = -1 // /usr/x86_64-w64-mingw32/include/wingdi.h:418:1: SP_NOTREPORTED = 0x4000 // /usr/x86_64-w64-mingw32/include/wingdi.h:417:1: SP_OUTOFDISK = -4 // /usr/x86_64-w64-mingw32/include/wingdi.h:421:1: SP_OUTOFMEMORY = -5 // /usr/x86_64-w64-mingw32/include/wingdi.h:422:1: SP_USERABORT = -3 // /usr/x86_64-w64-mingw32/include/wingdi.h:420:1: SQLITE3EXT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:128286:1: SQLITE3_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:340:1: SQLITE3_TEXT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5187:1: SQLITEINT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:41:1: SQLITE_ABORT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:755:1: SQLITE_ABORT_ROLLBACK = 516 // testdata/sqlite-amalgamation-3380500/sqlite3.c:857:1: SQLITE_ACCESS_EXISTS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1792:1: SQLITE_ACCESS_READ = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1794:1: SQLITE_ACCESS_READWRITE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1793:1: SQLITE_AFF_BLOB = 0x41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17423:1: SQLITE_AFF_INTEGER = 0x44 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17426:1: SQLITE_AFF_MASK = 0x47 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17435:1: SQLITE_AFF_NONE = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17422:1: SQLITE_AFF_NUMERIC = 0x43 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17425:1: SQLITE_AFF_REAL = 0x45 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17427:1: SQLITE_AFF_TEXT = 0x42 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17424:1: SQLITE_ALLOW_COVERING_INDEX_SCAN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21780:1: SQLITE_ALTER_TABLE = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3482:1: SQLITE_AMALGAMATION = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21:1: SQLITE_ANALYZE = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3484:1: SQLITE_ANY = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5645:1: SQLITE_API = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:381:1: SQLITE_APICALL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:387:1: SQLITE_ASCII = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14169:1: SQLITE_ATOMIC_INTRINSICS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13359:1: SQLITE_ATTACH = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3480:1: SQLITE_AUTH = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:774:1: SQLITE_AUTH_USER = 279 // testdata/sqlite-amalgamation-3380500/sqlite3.c:873:1: SQLITE_AllOpts = 0xffffffff // testdata/sqlite-amalgamation-3380500/sqlite3.c:17036:1: SQLITE_AutoIndex = 0x00008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16964:1: SQLITE_BIGENDIAN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14334:1: SQLITE_BIG_DBL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14049:1: SQLITE_BLDF1_INDEXED = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147295:1: SQLITE_BLDF1_UNIQUE = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147296:1: SQLITE_BLDF2_2NDPASS = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147298:1: SQLITE_BLOB = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5180:1: SQLITE_BTREE_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14936:1: SQLITE_BUSY = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:756:1: SQLITE_BUSY_RECOVERY = 261 // testdata/sqlite-amalgamation-3380500/sqlite3.c:839:1: SQLITE_BUSY_SNAPSHOT = 517 // testdata/sqlite-amalgamation-3380500/sqlite3.c:840:1: SQLITE_BUSY_TIMEOUT = 773 // testdata/sqlite-amalgamation-3380500/sqlite3.c:841:1: SQLITE_BYTEORDER = 1234 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14321:1: SQLITE_BalancedMerge = 0x00200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17035:1: SQLITE_BloomFilter = 0x00080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17033:1: SQLITE_BloomPulldown = 0x00100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17034:1: SQLITE_CALLBACK = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:393:1: SQLITE_CANTOPEN = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:765:1: SQLITE_CANTOPEN_CONVPATH = 1038 // testdata/sqlite-amalgamation-3380500/sqlite3.c:845:1: SQLITE_CANTOPEN_DIRTYWAL = 1294 // testdata/sqlite-amalgamation-3380500/sqlite3.c:846:1: SQLITE_CANTOPEN_FULLPATH = 782 // testdata/sqlite-amalgamation-3380500/sqlite3.c:844:1: SQLITE_CANTOPEN_ISDIR = 526 // testdata/sqlite-amalgamation-3380500/sqlite3.c:843:1: SQLITE_CANTOPEN_NOTEMPDIR = 270 // testdata/sqlite-amalgamation-3380500/sqlite3.c:842:1: SQLITE_CANTOPEN_SYMLINK = 1550 // testdata/sqlite-amalgamation-3380500/sqlite3.c:847:1: SQLITE_CDECL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:384:1: SQLITE_CHANGESETAPPLY_INVERT = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12060:1: SQLITE_CHANGESETAPPLY_NOSAVEPOINT = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12059:1: SQLITE_CHANGESETSTART_INVERT = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:11375:1: SQLITE_CHANGESET_ABORT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12156:1: SQLITE_CHANGESET_CONFLICT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12119:1: SQLITE_CHANGESET_CONSTRAINT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12120:1: SQLITE_CHANGESET_DATA = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12117:1: SQLITE_CHANGESET_FOREIGN_KEY = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12121:1: SQLITE_CHANGESET_NOTFOUND = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12118:1: SQLITE_CHANGESET_OMIT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12154:1: SQLITE_CHANGESET_REPLACE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12155:1: SQLITE_CHECKPOINT_FULL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9692:1: SQLITE_CHECKPOINT_PASSIVE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9691:1: SQLITE_CHECKPOINT_RESTART = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9693:1: SQLITE_CHECKPOINT_TRUNCATE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9694:1: SQLITE_CONFIG_COVERING_INDEX_SCAN = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2413:1: SQLITE_CONFIG_GETMALLOC = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2398:1: SQLITE_CONFIG_GETMUTEX = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2404:1: SQLITE_CONFIG_GETPCACHE = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2408:1: SQLITE_CONFIG_GETPCACHE2 = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2412:1: SQLITE_CONFIG_HEAP = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2401:1: SQLITE_CONFIG_LOG = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2409:1: SQLITE_CONFIG_LOOKASIDE = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2406:1: SQLITE_CONFIG_MALLOC = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2397:1: SQLITE_CONFIG_MEMDB_MAXSIZE = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2422:1: SQLITE_CONFIG_MEMSTATUS = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2402:1: SQLITE_CONFIG_MMAP_SIZE = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2415:1: SQLITE_CONFIG_MULTITHREAD = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2395:1: SQLITE_CONFIG_MUTEX = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2403:1: SQLITE_CONFIG_PAGECACHE = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2400:1: SQLITE_CONFIG_PCACHE = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2407:1: SQLITE_CONFIG_PCACHE2 = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2411:1: SQLITE_CONFIG_PCACHE_HDRSZ = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2417:1: SQLITE_CONFIG_PMASZ = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2418:1: SQLITE_CONFIG_SCRATCH = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2399:1: SQLITE_CONFIG_SERIALIZED = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2396:1: SQLITE_CONFIG_SINGLETHREAD = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2394:1: SQLITE_CONFIG_SMALL_MALLOC = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2420:1: SQLITE_CONFIG_SORTERREF_SIZE = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2421:1: SQLITE_CONFIG_SQLLOG = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2414:1: SQLITE_CONFIG_STMTJRNL_SPILL = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2419:1: SQLITE_CONFIG_URI = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2410:1: SQLITE_CONFIG_WIN32_HEAPSIZE = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2416:1: SQLITE_CONSTRAINT = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:770:1: SQLITE_CONSTRAINT_CHECK = 275 // testdata/sqlite-amalgamation-3380500/sqlite3.c:858:1: SQLITE_CONSTRAINT_COMMITHOOK = 531 // testdata/sqlite-amalgamation-3380500/sqlite3.c:859:1: SQLITE_CONSTRAINT_DATATYPE = 3091 // testdata/sqlite-amalgamation-3380500/sqlite3.c:869:1: SQLITE_CONSTRAINT_FOREIGNKEY = 787 // testdata/sqlite-amalgamation-3380500/sqlite3.c:860:1: SQLITE_CONSTRAINT_FUNCTION = 1043 // testdata/sqlite-amalgamation-3380500/sqlite3.c:861:1: SQLITE_CONSTRAINT_NOTNULL = 1299 // testdata/sqlite-amalgamation-3380500/sqlite3.c:862:1: SQLITE_CONSTRAINT_PINNED = 2835 // testdata/sqlite-amalgamation-3380500/sqlite3.c:868:1: SQLITE_CONSTRAINT_PRIMARYKEY = 1555 // testdata/sqlite-amalgamation-3380500/sqlite3.c:863:1: SQLITE_CONSTRAINT_ROWID = 2579 // testdata/sqlite-amalgamation-3380500/sqlite3.c:867:1: SQLITE_CONSTRAINT_TRIGGER = 1811 // testdata/sqlite-amalgamation-3380500/sqlite3.c:864:1: SQLITE_CONSTRAINT_UNIQUE = 2067 // testdata/sqlite-amalgamation-3380500/sqlite3.c:865:1: SQLITE_CONSTRAINT_VTAB = 2323 // testdata/sqlite-amalgamation-3380500/sqlite3.c:866:1: SQLITE_COPY = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3489:1: SQLITE_CORE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20:1: SQLITE_CORRUPT = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:762:1: SQLITE_CORRUPT_INDEX = 779 // testdata/sqlite-amalgamation-3380500/sqlite3.c:850:1: SQLITE_CORRUPT_SEQUENCE = 523 // testdata/sqlite-amalgamation-3380500/sqlite3.c:849:1: SQLITE_CORRUPT_VTAB = 267 // testdata/sqlite-amalgamation-3380500/sqlite3.c:848:1: SQLITE_CREATE_INDEX = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3457:1: SQLITE_CREATE_TABLE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3458:1: SQLITE_CREATE_TEMP_INDEX = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3459:1: SQLITE_CREATE_TEMP_TABLE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3460:1: SQLITE_CREATE_TEMP_TRIGGER = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3461:1: SQLITE_CREATE_TEMP_VIEW = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3462:1: SQLITE_CREATE_TRIGGER = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3463:1: SQLITE_CREATE_VIEW = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3464:1: SQLITE_CREATE_VTABLE = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3485:1: SQLITE_CacheSpill = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16952:1: SQLITE_CellSizeCk = 0x00200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16970:1: SQLITE_CkptFullFSync = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16951:1: SQLITE_CountOfView = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17021:1: SQLITE_CoverIdxScan = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17017:1: SQLITE_CursorHints = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17022:1: SQLITE_DBCONFIG_DEFENSIVE = 1010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2715:1: SQLITE_DBCONFIG_DQS_DDL = 1014 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2719:1: SQLITE_DBCONFIG_DQS_DML = 1013 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2718:1: SQLITE_DBCONFIG_ENABLE_FKEY = 1002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2707:1: SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2709:1: SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2710:1: SQLITE_DBCONFIG_ENABLE_QPSG = 1007 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2712:1: SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2708:1: SQLITE_DBCONFIG_ENABLE_VIEW = 1015 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2720:1: SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2717:1: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT = 1016 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2721:1: SQLITE_DBCONFIG_LOOKASIDE = 1001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2706:1: SQLITE_DBCONFIG_MAINDBNAME = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2705:1: SQLITE_DBCONFIG_MAX = 1017 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2723:1: SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2711:1: SQLITE_DBCONFIG_RESET_DATABASE = 1009 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2714:1: SQLITE_DBCONFIG_TRIGGER_EQP = 1008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2713:1: SQLITE_DBCONFIG_TRUSTED_SCHEMA = 1017 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2722:1: SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011 // testdata/sqlite-amalgamation-3380500/sqlite3.c:2716:1: SQLITE_DBSTATUS_CACHE_HIT = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8746:1: SQLITE_DBSTATUS_CACHE_MISS = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8747:1: SQLITE_DBSTATUS_CACHE_SPILL = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8751:1: SQLITE_DBSTATUS_CACHE_USED = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8740:1: SQLITE_DBSTATUS_CACHE_USED_SHARED = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8750:1: SQLITE_DBSTATUS_CACHE_WRITE = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8748:1: SQLITE_DBSTATUS_DEFERRED_FKS = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8749:1: SQLITE_DBSTATUS_LOOKASIDE_HIT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8743:1: SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8745:1: SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8744:1: SQLITE_DBSTATUS_LOOKASIDE_USED = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8739:1: SQLITE_DBSTATUS_MAX = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8752:1: SQLITE_DBSTATUS_SCHEMA_USED = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8741:1: SQLITE_DBSTATUS_STMT_USED = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8742:1: SQLITE_DEFAULT_AUTOVACUUM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14948:3: SQLITE_DEFAULT_CACHE_SIZE = -2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13233:1: SQLITE_DEFAULT_FILE_FORMAT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14071:1: SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14698:3: SQLITE_DEFAULT_LOOKASIDE = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21826:1: SQLITE_DEFAULT_MEMSTATUS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13477:1: SQLITE_DEFAULT_MMAP_SIZE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14416:1: SQLITE_DEFAULT_PAGE_SIZE = 4096 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13286:1: SQLITE_DEFAULT_PCACHE_INITSZ = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14120:1: SQLITE_DEFAULT_RECURSIVE_TRIGGERS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14079:1: SQLITE_DEFAULT_SECTOR_SIZE = 4096 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16274:1: SQLITE_DEFAULT_SORTERREF_SIZE = 0x7fffffff // testdata/sqlite-amalgamation-3380500/sqlite3.c:14127:1: SQLITE_DEFAULT_SYNCHRONOUS = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16552:1: SQLITE_DEFAULT_WAL_AUTOCHECKPOINT = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13241:1: SQLITE_DEFAULT_WAL_SYNCHRONOUS = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16555:1: SQLITE_DEFAULT_WORKER_THREADS = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14103:1: SQLITE_DELETE = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3465:1: SQLITE_DENY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3434:1: SQLITE_DEPRECATED = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:412:1: SQLITE_DESERIALIZE_FREEONCLOSE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10677:1: SQLITE_DESERIALIZE_READONLY = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10679:1: SQLITE_DESERIALIZE_RESIZEABLE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10678:1: SQLITE_DETACH = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3481:1: SQLITE_DETERMINISTIC = 0x000000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5713:1: SQLITE_DIRECTONLY = 0x000080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5714:1: SQLITE_DONE = 101 // testdata/sqlite-amalgamation-3380500/sqlite3.c:781:1: SQLITE_DQS = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:171812:1: SQLITE_DROP_INDEX = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3466:1: SQLITE_DROP_TABLE = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3467:1: SQLITE_DROP_TEMP_INDEX = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3468:1: SQLITE_DROP_TEMP_TABLE = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3469:1: SQLITE_DROP_TEMP_TRIGGER = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3470:1: SQLITE_DROP_TEMP_VIEW = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3471:1: SQLITE_DROP_TRIGGER = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3472:1: SQLITE_DROP_VIEW = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3473:1: SQLITE_DROP_VTABLE = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3486:1: SQLITE_Defensive = 0x10000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16977:1: SQLITE_DeferFKs = 0x00080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16968:1: SQLITE_DistinctOpt = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17016:1: SQLITE_DqsDDL = 0x20000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16978:1: SQLITE_DqsDML = 0x40000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16979:1: SQLITE_ECEL_DUP = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19882:1: SQLITE_ECEL_FACTOR = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19883:1: SQLITE_ECEL_OMITREF = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19885:1: SQLITE_ECEL_REF = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19884:1: SQLITE_EMPTY = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:767:1: SQLITE_ENABLE_COLUMN_METADATA = 1 // <defines>:6:1: SQLITE_ENABLE_FTS5 = 1 // <defines>:7:1: SQLITE_ENABLE_GEOPOLY = 1 // <defines>:8:1: SQLITE_ENABLE_LOCKING_STYLE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129839:1: SQLITE_ENABLE_MATH_FUNCTIONS = 1 // <defines>:9:1: SQLITE_ENABLE_MEMORY_MANAGEMENT = 1 // <defines>:10:1: SQLITE_ENABLE_OFFSET_SQL_FUNC = 1 // <defines>:11:1: SQLITE_ENABLE_PREUPDATE_HOOK = 1 // <defines>:12:1: SQLITE_ENABLE_RBU = 1 // <defines>:13:1: SQLITE_ENABLE_RTREE = 1 // <defines>:14:1: SQLITE_ENABLE_SESSION = 1 // <defines>:15:1: SQLITE_ENABLE_SNAPSHOT = 1 // <defines>:16:1: SQLITE_ENABLE_STAT4 = 1 // <defines>:17:1: SQLITE_ENABLE_UNLOCK_NOTIFY = 1 // <defines>:18:1: SQLITE_ERROR = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:752:1: SQLITE_ERROR_MISSING_COLLSEQ = 257 // testdata/sqlite-amalgamation-3380500/sqlite3.c:801:1: SQLITE_ERROR_RETRY = 513 // testdata/sqlite-amalgamation-3380500/sqlite3.c:802:1: SQLITE_ERROR_SNAPSHOT = 769 // testdata/sqlite-amalgamation-3380500/sqlite3.c:803:1: SQLITE_EXPERIMENTAL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:413:1: SQLITE_EXTENSION_INIT1 = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:128951:1: SQLITE_EXTENSION_INIT3 = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:128953:1: SQLITE_EnableQPSG = 0x00800000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16972:1: SQLITE_EnableTrigger = 0x00040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16967:1: SQLITE_EnableView = 0x80000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16980:1: SQLITE_FAIL = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10099:1: SQLITE_FAULTINJECTOR_COUNT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20464:1: SQLITE_FAULTINJECTOR_MALLOC = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20463:1: SQLITE_FCNTL_BEGIN_ATOMIC_WRITE = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1522:1: SQLITE_FCNTL_BUSYHANDLER = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1507:1: SQLITE_FCNTL_CHUNK_SIZE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1498:1: SQLITE_FCNTL_CKPT_DONE = 37 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1528:1: SQLITE_FCNTL_CKPT_START = 39 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1530:1: SQLITE_FCNTL_CKSM_FILE = 41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1532:1: SQLITE_FCNTL_COMMIT_ATOMIC_WRITE = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1523:1: SQLITE_FCNTL_COMMIT_PHASETWO = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1513:1: SQLITE_FCNTL_DATA_VERSION = 35 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1526:1: SQLITE_FCNTL_DB_UNCHANGED = 0xca093fa0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16408:1: SQLITE_FCNTL_EXTERNAL_READER = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1531:1: SQLITE_FCNTL_FILE_POINTER = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1499:1: SQLITE_FCNTL_GET_LOCKPROXYFILE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1494:1: SQLITE_FCNTL_HAS_MOVED = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1511:1: SQLITE_FCNTL_JOURNAL_POINTER = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1519:1: SQLITE_FCNTL_LAST_ERRNO = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1496:1: SQLITE_FCNTL_LOCKSTATE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1493:1: SQLITE_FCNTL_LOCK_TIMEOUT = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1525:1: SQLITE_FCNTL_MMAP_SIZE = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1509:1: SQLITE_FCNTL_OVERWRITE = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1503:1: SQLITE_FCNTL_PDB = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1521:1: SQLITE_FCNTL_PERSIST_WAL = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1502:1: SQLITE_FCNTL_POWERSAFE_OVERWRITE = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1505:1: SQLITE_FCNTL_PRAGMA = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1506:1: SQLITE_FCNTL_RBU = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1517:1: SQLITE_FCNTL_RBUCNT = 5149216 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203972:1: SQLITE_FCNTL_RESERVE_BYTES = 38 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1529:1: SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1524:1: SQLITE_FCNTL_SET_LOCKPROXYFILE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1495:1: SQLITE_FCNTL_SIZE_HINT = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1497:1: SQLITE_FCNTL_SIZE_LIMIT = 36 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1527:1: SQLITE_FCNTL_SYNC = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1512:1: SQLITE_FCNTL_SYNC_OMITTED = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1500:1: SQLITE_FCNTL_TEMPFILENAME = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1508:1: SQLITE_FCNTL_TRACE = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1510:1: SQLITE_FCNTL_VFSNAME = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1504:1: SQLITE_FCNTL_VFS_POINTER = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1518:1: SQLITE_FCNTL_WAL_BLOCK = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1515:1: SQLITE_FCNTL_WIN32_AV_RETRY = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1501:1: SQLITE_FCNTL_WIN32_GET_HANDLE = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1520:1: SQLITE_FCNTL_WIN32_SET_HANDLE = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1514:1: SQLITE_FCNTL_ZIPVFS = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1516:1: SQLITE_FILE_HEADER = "SQLite format 3" // testdata/sqlite-amalgamation-3380500/sqlite3.c:65379:1: SQLITE_FLOAT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5179:1: SQLITE_FORMAT = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:775:1: SQLITE_FP_PRECISION_LIMIT = 100000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29635:1: SQLITE_FRAME_MAGIC = 0x879fb71e // testdata/sqlite-amalgamation-3380500/sqlite3.c:22219:1: SQLITE_FULL = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:764:1: SQLITE_FUNCTION = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3487:1: SQLITE_FUNC_ANYORDER = 0x08000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17146:1: SQLITE_FUNC_BUILTIN = 0x00800000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17145:1: SQLITE_FUNC_CASE = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17125:1: SQLITE_FUNC_CONSTANT = 0x0800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17133:1: SQLITE_FUNC_COUNT = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17130:1: SQLITE_FUNC_DIRECT = 0x00080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17141:1: SQLITE_FUNC_ENCMASK = 0x0003 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17123:1: SQLITE_FUNC_EPHEM = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17126:1: SQLITE_FUNC_HASH_SZ = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16719:1: SQLITE_FUNC_INLINE = 0x00400000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17144:1: SQLITE_FUNC_INTERNAL = 0x00040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17140:1: SQLITE_FUNC_LENGTH = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17128:1: SQLITE_FUNC_LIKE = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17124:1: SQLITE_FUNC_MINMAX = 0x1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17134:1: SQLITE_FUNC_NEEDCOLL = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17127:1: SQLITE_FUNC_OFFSET = 0x8000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17138:1: SQLITE_FUNC_SLOCHNG = 0x2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17135:1: SQLITE_FUNC_SUBTYPE = 0x00100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17142:1: SQLITE_FUNC_TEST = 0x4000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17137:1: SQLITE_FUNC_TYPEOF = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17129:1: SQLITE_FUNC_UNLIKELY = 0x0400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17132:1: SQLITE_FUNC_UNSAFE = 0x00200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17143:1: SQLITE_FUNC_WINDOW = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17139:1: SQLITE_FactorOutConst = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17015:1: SQLITE_ForeignKeys = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16963:1: SQLITE_Fts3Tokenizer = 0x00400000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16971:1: SQLITE_FullColNames = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16949:1: SQLITE_FullFSync = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16950:1: SQLITE_GET_LOCKPROXYFILE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1535:1: SQLITE_GroupByOrder = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17014:1: SQLITE_HASH_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13741:1: SQLITE_HAVE_C99_MATH_FUNCS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:234:1: SQLITE_IDXTYPE_APPDEF = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17871:1: SQLITE_IDXTYPE_IPK = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17874:1: SQLITE_IDXTYPE_PRIMARYKEY = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17873:1: SQLITE_IDXTYPE_UNIQUE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17872:1: SQLITE_IGNORE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3435:1: SQLITE_INDEX_CONSTRAINT_EQ = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7483:1: SQLITE_INDEX_CONSTRAINT_FUNCTION = 150 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7499:1: SQLITE_INDEX_CONSTRAINT_GE = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7487:1: SQLITE_INDEX_CONSTRAINT_GLOB = 66 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7490:1: SQLITE_INDEX_CONSTRAINT_GT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7484:1: SQLITE_INDEX_CONSTRAINT_IS = 72 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7496:1: SQLITE_INDEX_CONSTRAINT_ISNOT = 69 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7493:1: SQLITE_INDEX_CONSTRAINT_ISNOTNULL = 70 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7494:1: SQLITE_INDEX_CONSTRAINT_ISNULL = 71 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7495:1: SQLITE_INDEX_CONSTRAINT_LE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7485:1: SQLITE_INDEX_CONSTRAINT_LIKE = 65 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7489:1: SQLITE_INDEX_CONSTRAINT_LIMIT = 73 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7497:1: SQLITE_INDEX_CONSTRAINT_LT = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7486:1: SQLITE_INDEX_CONSTRAINT_MATCH = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7488:1: SQLITE_INDEX_CONSTRAINT_NE = 68 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7492:1: SQLITE_INDEX_CONSTRAINT_OFFSET = 74 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7498:1: SQLITE_INDEX_CONSTRAINT_REGEXP = 67 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7491:1: SQLITE_INDEX_SCAN_UNIQUE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:7443:1: SQLITE_INNOCUOUS = 0x000200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5716:1: SQLITE_INSERT = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3474:1: SQLITE_INTEGER = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5178:1: SQLITE_INTEGRITY_CHECK_ERROR_MAX = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:132099:1: SQLITE_INTERNAL = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:753:1: SQLITE_INTERRUPT = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:760:1: SQLITE_IOCAP_ATOMIC = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:958:1: SQLITE_IOCAP_ATOMIC16K = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:964:1: SQLITE_IOCAP_ATOMIC1K = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:960:1: SQLITE_IOCAP_ATOMIC2K = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:961:1: SQLITE_IOCAP_ATOMIC32K = 0x00000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:965:1: SQLITE_IOCAP_ATOMIC4K = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:962:1: SQLITE_IOCAP_ATOMIC512 = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:959:1: SQLITE_IOCAP_ATOMIC64K = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:966:1: SQLITE_IOCAP_ATOMIC8K = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:963:1: SQLITE_IOCAP_BATCH_ATOMIC = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:972:1: SQLITE_IOCAP_IMMUTABLE = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:971:1: SQLITE_IOCAP_POWERSAFE_OVERWRITE = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:970:1: SQLITE_IOCAP_SAFE_APPEND = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:967:1: SQLITE_IOCAP_SEQUENTIAL = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:968:1: SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:969:1: SQLITE_IOERR = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:761:1: SQLITE_IOERR_ACCESS = 3338 // testdata/sqlite-amalgamation-3380500/sqlite3.c:816:1: SQLITE_IOERR_AUTH = 7178 // testdata/sqlite-amalgamation-3380500/sqlite3.c:831:1: SQLITE_IOERR_BEGIN_ATOMIC = 7434 // testdata/sqlite-amalgamation-3380500/sqlite3.c:832:1: SQLITE_IOERR_BLOCKED = 2826 // testdata/sqlite-amalgamation-3380500/sqlite3.c:814:1: SQLITE_IOERR_CHECKRESERVEDLOCK = 3594 // testdata/sqlite-amalgamation-3380500/sqlite3.c:817:1: SQLITE_IOERR_CLOSE = 4106 // testdata/sqlite-amalgamation-3380500/sqlite3.c:819:1: SQLITE_IOERR_COMMIT_ATOMIC = 7690 // testdata/sqlite-amalgamation-3380500/sqlite3.c:833:1: SQLITE_IOERR_CONVPATH = 6666 // testdata/sqlite-amalgamation-3380500/sqlite3.c:829:1: SQLITE_IOERR_CORRUPTFS = 8458 // testdata/sqlite-amalgamation-3380500/sqlite3.c:836:1: SQLITE_IOERR_DATA = 8202 // testdata/sqlite-amalgamation-3380500/sqlite3.c:835:1: SQLITE_IOERR_DELETE = 2570 // testdata/sqlite-amalgamation-3380500/sqlite3.c:813:1: SQLITE_IOERR_DELETE_NOENT = 5898 // testdata/sqlite-amalgamation-3380500/sqlite3.c:826:1: SQLITE_IOERR_DIR_CLOSE = 4362 // testdata/sqlite-amalgamation-3380500/sqlite3.c:820:1: SQLITE_IOERR_DIR_FSYNC = 1290 // testdata/sqlite-amalgamation-3380500/sqlite3.c:808:1: SQLITE_IOERR_FSTAT = 1802 // testdata/sqlite-amalgamation-3380500/sqlite3.c:810:1: SQLITE_IOERR_FSYNC = 1034 // testdata/sqlite-amalgamation-3380500/sqlite3.c:807:1: SQLITE_IOERR_GETTEMPPATH = 6410 // testdata/sqlite-amalgamation-3380500/sqlite3.c:828:1: SQLITE_IOERR_LOCK = 3850 // testdata/sqlite-amalgamation-3380500/sqlite3.c:818:1: SQLITE_IOERR_MMAP = 6154 // testdata/sqlite-amalgamation-3380500/sqlite3.c:827:1: SQLITE_IOERR_NOMEM = 3082 // testdata/sqlite-amalgamation-3380500/sqlite3.c:815:1: SQLITE_IOERR_NOMEM_BKPT = 3082 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19482:1: SQLITE_IOERR_RDLOCK = 2314 // testdata/sqlite-amalgamation-3380500/sqlite3.c:812:1: SQLITE_IOERR_READ = 266 // testdata/sqlite-amalgamation-3380500/sqlite3.c:804:1: SQLITE_IOERR_ROLLBACK_ATOMIC = 7946 // testdata/sqlite-amalgamation-3380500/sqlite3.c:834:1: SQLITE_IOERR_SEEK = 5642 // testdata/sqlite-amalgamation-3380500/sqlite3.c:825:1: SQLITE_IOERR_SHMLOCK = 5130 // testdata/sqlite-amalgamation-3380500/sqlite3.c:823:1: SQLITE_IOERR_SHMMAP = 5386 // testdata/sqlite-amalgamation-3380500/sqlite3.c:824:1: SQLITE_IOERR_SHMOPEN = 4618 // testdata/sqlite-amalgamation-3380500/sqlite3.c:821:1: SQLITE_IOERR_SHMSIZE = 4874 // testdata/sqlite-amalgamation-3380500/sqlite3.c:822:1: SQLITE_IOERR_SHORT_READ = 522 // testdata/sqlite-amalgamation-3380500/sqlite3.c:805:1: SQLITE_IOERR_TRUNCATE = 1546 // testdata/sqlite-amalgamation-3380500/sqlite3.c:809:1: SQLITE_IOERR_UNLOCK = 2058 // testdata/sqlite-amalgamation-3380500/sqlite3.c:811:1: SQLITE_IOERR_VNODE = 6922 // testdata/sqlite-amalgamation-3380500/sqlite3.c:830:1: SQLITE_IOERR_WRITE = 778 // testdata/sqlite-amalgamation-3380500/sqlite3.c:806:1: SQLITE_IgnoreChecks = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16958:1: SQLITE_JUMPIFNULL = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17446:1: SQLITE_LAST_ERRNO = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1537:1: SQLITE_LIKE_DOESNT_MATCH_BLOBS = 1 // <defines>:19:1: SQLITE_LIMIT_ATTACHED = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4314:1: SQLITE_LIMIT_COLUMN = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4309:1: SQLITE_LIMIT_COMPOUND_SELECT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4311:1: SQLITE_LIMIT_EXPR_DEPTH = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4310:1: SQLITE_LIMIT_FUNCTION_ARG = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4313:1: SQLITE_LIMIT_LENGTH = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4307:1: SQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4315:1: SQLITE_LIMIT_SQL_LENGTH = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4308:1: SQLITE_LIMIT_TRIGGER_DEPTH = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4317:1: SQLITE_LIMIT_VARIABLE_NUMBER = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4316:1: SQLITE_LIMIT_VDBE_OP = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4312:1: SQLITE_LIMIT_WORKER_THREADS = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4318:1: SQLITE_LITTLEENDIAN = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14335:1: SQLITE_LOCKED = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:757:1: SQLITE_LOCKED_SHAREDCACHE = 262 // testdata/sqlite-amalgamation-3380500/sqlite3.c:837:1: SQLITE_LOCKED_VTAB = 518 // testdata/sqlite-amalgamation-3380500/sqlite3.c:838:1: SQLITE_LOCKFILEEX_FLAGS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46067:1: SQLITE_LOCKFILE_FLAGS = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46058:1: SQLITE_LOCK_EXCLUSIVE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:985:1: SQLITE_LOCK_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:981:1: SQLITE_LOCK_PENDING = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:984:1: SQLITE_LOCK_RESERVED = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:983:1: SQLITE_LOCK_SHARED = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:982:1: SQLITE_LegacyAlter = 0x04000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16975:1: SQLITE_LegacyFileFmt = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16948:1: SQLITE_LoadExtFunc = 0x00020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16966:1: SQLITE_LoadExtension = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16965:1: SQLITE_MALLOC_SOFT_LIMIT = 1024 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13518:1: SQLITE_MATCH = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:121757:1: SQLITE_MAX_ATTACHED = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13251:1: SQLITE_MAX_COLUMN = 2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13172:1: SQLITE_MAX_COMPOUND_SELECT = 500 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13205:1: SQLITE_MAX_DB = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16779:1: SQLITE_MAX_DEFAULT_PAGE_SIZE = 8192 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13301:1: SQLITE_MAX_EXPR_DEPTH = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13193:1: SQLITE_MAX_FILE_FORMAT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14069:1: SQLITE_MAX_FUNCTION_ARG = 127 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13220:1: SQLITE_MAX_LENGTH = 1000000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13151:1: SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13325:1: SQLITE_MAX_MEMORY = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28627:1: SQLITE_MAX_MMAP_SIZE = 0x7fff0000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14404:1: SQLITE_MAX_PAGE_COUNT = 1073741823 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13317:1: SQLITE_MAX_PAGE_SIZE = 65536 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13279:1: SQLITE_MAX_PATHLEN = 260 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16267:1: SQLITE_MAX_PMASZ = 536870912 // testdata/sqlite-amalgamation-3380500/sqlite3.c:96684:1: SQLITE_MAX_PREPARE_RETRY = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:133876:1: SQLITE_MAX_SCHEMA_RETRY = 50 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22055:1: SQLITE_MAX_SQL_LENGTH = 1000000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13183:1: SQLITE_MAX_SRCLIST = 200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:118665:1: SQLITE_MAX_TRIGGER_DEPTH = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13336:1: SQLITE_MAX_VARIABLE_NUMBER = 32766 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13262:1: SQLITE_MAX_VDBE_OP = 250000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13213:1: SQLITE_MAX_WORKER_THREADS = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14100:1: SQLITE_MEMDB_DEFAULT_MAXSIZE = 1073741824 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21835:1: SQLITE_MISMATCH = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:771:1: SQLITE_MISUSE = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:772:1: SQLITE_MSVC_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:101:1: SQLITE_MUTEX_APPDEF = 1 // <defines>:20:1: SQLITE_MUTEX_FAST = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8167:1: SQLITE_MUTEX_NOOP = 1 // <defines>:21:1: SQLITE_MUTEX_RECURSIVE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8168:1: SQLITE_MUTEX_STATIC_APP1 = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8177:1: SQLITE_MUTEX_STATIC_APP2 = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8178:1: SQLITE_MUTEX_STATIC_APP3 = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8179:1: SQLITE_MUTEX_STATIC_LRU = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8174:1: SQLITE_MUTEX_STATIC_LRU2 = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8175:1: SQLITE_MUTEX_STATIC_MAIN = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8169:1: SQLITE_MUTEX_STATIC_MASTER = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8185:1: SQLITE_MUTEX_STATIC_MEM = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8170:1: SQLITE_MUTEX_STATIC_MEM2 = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8171:1: SQLITE_MUTEX_STATIC_OPEN = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8172:1: SQLITE_MUTEX_STATIC_PMEM = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8176:1: SQLITE_MUTEX_STATIC_PRNG = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8173:1: SQLITE_MUTEX_STATIC_VFS1 = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8180:1: SQLITE_MUTEX_STATIC_VFS2 = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8181:1: SQLITE_MUTEX_STATIC_VFS3 = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8182:1: SQLITE_MX_JUMP_OPCODE = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15737:1: SQLITE_MinMaxOpt = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17029:1: SQLITE_NOLFS = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:773:1: SQLITE_NOMATCH = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:121758:1: SQLITE_NOMEM = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:758:1: SQLITE_NOMEM_BKPT = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19481:1: SQLITE_NOTADB = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:777:1: SQLITE_NOTFOUND = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:763:1: SQLITE_NOTICE = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:778:1: SQLITE_NOTICE_RECOVER_ROLLBACK = 539 // testdata/sqlite-amalgamation-3380500/sqlite3.c:871:1: SQLITE_NOTICE_RECOVER_WAL = 283 // testdata/sqlite-amalgamation-3380500/sqlite3.c:870:1: SQLITE_NOTNULL = 0x90 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17448:1: SQLITE_NOWILDCARDMATCH = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:121759:1: SQLITE_NO_TSAN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61740:1: SQLITE_NTUNE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19138:1: SQLITE_NULL = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5181:1: SQLITE_NULLEQ = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17447:1: SQLITE_N_BTREE_META = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14941:1: SQLITE_N_KEYWORD = 147 // testdata/sqlite-amalgamation-3380500/sqlite3.c:167420:1: SQLITE_N_LIMIT = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16631:1: SQLITE_N_STDTYPE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17362:1: SQLITE_NoCkptOnClose = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16960:1: SQLITE_NoSchemaError = 0x08000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16976:1: SQLITE_NullCallback = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16956:1: SQLITE_OK = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:750:1: SQLITE_OK_LOAD_PERMANENTLY = 256 // testdata/sqlite-amalgamation-3380500/sqlite3.c:874:1: SQLITE_OK_SYMLINK = 512 // testdata/sqlite-amalgamation-3380500/sqlite3.c:875:1: SQLITE_OPEN_AUTOPROXY = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:902:1: SQLITE_OPEN_CREATE = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:899:1: SQLITE_OPEN_DELETEONCLOSE = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:900:1: SQLITE_OPEN_EXCLUSIVE = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:901:1: SQLITE_OPEN_EXRESCODE = 0x02000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:918:1: SQLITE_OPEN_FULLMUTEX = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:913:1: SQLITE_OPEN_MAIN_DB = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:905:1: SQLITE_OPEN_MAIN_JOURNAL = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:908:1: SQLITE_OPEN_MASTER_JOURNAL = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:922:1: SQLITE_OPEN_MEMORY = 0x00000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:904:1: SQLITE_OPEN_NOFOLLOW = 0x01000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:917:1: SQLITE_OPEN_NOMUTEX = 0x00008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:912:1: SQLITE_OPEN_PRIVATECACHE = 0x00040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:915:1: SQLITE_OPEN_READONLY = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:897:1: SQLITE_OPEN_READWRITE = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:898:1: SQLITE_OPEN_SHAREDCACHE = 0x00020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:914:1: SQLITE_OPEN_SUBJOURNAL = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:910:1: SQLITE_OPEN_SUPER_JOURNAL = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:911:1: SQLITE_OPEN_TEMP_DB = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:906:1: SQLITE_OPEN_TEMP_JOURNAL = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:909:1: SQLITE_OPEN_TRANSIENT_DB = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:907:1: SQLITE_OPEN_URI = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:903:1: SQLITE_OPEN_WAL = 0x00080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:916:1: SQLITE_OS_OTHER = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16233:1: SQLITE_OS_SETUP_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16212:1: SQLITE_OS_UNIX = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16244:1: SQLITE_OS_WIN = 1 // <defines>:24:1: SQLITE_OS_WINCE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28176:1: SQLITE_OS_WINNT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28166:1: SQLITE_OS_WINRT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28184:1: SQLITE_OS_WIN_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28136:1: SQLITE_OS_WIN_THREADS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:28203:1: SQLITE_OmitNoopJoin = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17020:1: SQLITE_OmitOrderBy = 0x00040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17031:1: SQLITE_OrderByIdxJoin = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17018:1: SQLITE_PAGER_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14690:1: SQLITE_PERM = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:754:1: SQLITE_POWERSAFE_OVERWRITE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13468:1: SQLITE_PRAGMA = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3475:1: SQLITE_PREPARE_MASK = 0x0f // testdata/sqlite-amalgamation-3380500/sqlite3.c:15746:1: SQLITE_PREPARE_NORMALIZE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4356:1: SQLITE_PREPARE_NO_VTAB = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4357:1: SQLITE_PREPARE_PERSISTENT = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:4355:1: SQLITE_PREPARE_SAVESQL = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15745:1: SQLITE_PRINTF_INTERNAL = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19100:1: SQLITE_PRINTF_MALLOCED = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19102:1: SQLITE_PRINTF_SQLFUNC = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19101:1: SQLITE_PRINT_BUF_SIZE = 70 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29627:1: SQLITE_PRIVATE = 0 // <defines>:1:1: SQLITE_PROTOCOL = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:766:1: SQLITE_PTRSIZE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14275:1: SQLITE_PropagateConst = 0x00008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17028:1: SQLITE_PushDown = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17025:1: SQLITE_QUERY_PLANNER_LIMIT = 20000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147314:1: SQLITE_QUERY_PLANNER_LIMIT_INCR = 1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147317:1: SQLITE_QueryFlattener = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17012:1: SQLITE_QueryOnly = 0x00100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16969:1: SQLITE_RANGE = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:776:1: SQLITE_RBU_STATE_CHECKPOINT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203782:1: SQLITE_RBU_STATE_DONE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203783:1: SQLITE_RBU_STATE_ERROR = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203784:1: SQLITE_RBU_STATE_MOVE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203781:1: SQLITE_RBU_STATE_OAL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203780:1: SQLITE_RBU_UPDATE_CACHESIZE = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203856:1: SQLITE_READ = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3476:1: SQLITE_READONLY = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:759:1: SQLITE_READONLY_CANTINIT = 1288 // testdata/sqlite-amalgamation-3380500/sqlite3.c:855:1: SQLITE_READONLY_CANTLOCK = 520 // testdata/sqlite-amalgamation-3380500/sqlite3.c:852:1: SQLITE_READONLY_DBMOVED = 1032 // testdata/sqlite-amalgamation-3380500/sqlite3.c:854:1: SQLITE_READONLY_DIRECTORY = 1544 // testdata/sqlite-amalgamation-3380500/sqlite3.c:856:1: SQLITE_READONLY_RECOVERY = 264 // testdata/sqlite-amalgamation-3380500/sqlite3.c:851:1: SQLITE_READONLY_ROLLBACK = 776 // testdata/sqlite-amalgamation-3380500/sqlite3.c:853:1: SQLITE_RECURSIVE = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3490:1: SQLITE_REINDEX = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3483:1: SQLITE_REPLACE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10101:1: SQLITE_ROLLBACK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10097:1: SQLITE_ROW = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:780:1: SQLITE_ReadUncommit = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16959:1: SQLITE_RecTriggers = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16962:1: SQLITE_ResetDatabase = 0x02000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16974:1: SQLITE_ReverseOrder = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16961:1: SQLITE_SAVEPOINT = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3488:1: SQLITE_SCANSTAT_EST = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10152:1: SQLITE_SCANSTAT_EXPLAIN = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10154:1: SQLITE_SCANSTAT_NAME = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10153:1: SQLITE_SCANSTAT_NLOOP = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10150:1: SQLITE_SCANSTAT_NVISIT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10151:1: SQLITE_SCANSTAT_SELECTID = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10155:1: SQLITE_SCHEMA = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:768:1: SQLITE_SELECT = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3477:1: SQLITE_SERIALIZE_NOCOPY = 0x001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10612:1: SQLITE_SESSION_CONFIG_STRMSIZE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12524:1: SQLITE_SESSION_OBJCONFIG_SIZE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10925:1: SQLITE_SET_LOCKPROXYFILE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1536:1: SQLITE_SHM_EXCLUSIVE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1821:1: SQLITE_SHM_LOCK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1819:1: SQLITE_SHM_NLOCK = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1831:1: SQLITE_SHM_SHARED = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1820:1: SQLITE_SHM_UNLOCK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1818:1: SQLITE_SORTER_PMASZ = 250 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21794:1: SQLITE_SOUNDEX = 1 // <defines>:22:1: SQLITE_SOURCE_ID = "2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe" // testdata/sqlite-amalgamation-3380500/sqlite3.c:457:1: SQLITE_SO_ASC = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17404:1: SQLITE_SO_DESC = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17405:1: SQLITE_SO_UNDEFINED = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17406:1: SQLITE_STAT4_SAMPLES = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111389:1: SQLITE_STATE_BUSY = 0x6d // testdata/sqlite-amalgamation-3380500/sqlite3.c:17057:1: SQLITE_STATE_CLOSED = 0xce // testdata/sqlite-amalgamation-3380500/sqlite3.c:17055:1: SQLITE_STATE_ERROR = 0xd5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17058:1: SQLITE_STATE_OPEN = 0x76 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17054:1: SQLITE_STATE_SICK = 0xba // testdata/sqlite-amalgamation-3380500/sqlite3.c:17056:1: SQLITE_STATE_ZOMBIE = 0xa7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17059:1: SQLITE_STATUS_MALLOC_COUNT = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8601:1: SQLITE_STATUS_MALLOC_SIZE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8597:1: SQLITE_STATUS_MEMORY_USED = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8592:1: SQLITE_STATUS_PAGECACHE_OVERFLOW = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8594:1: SQLITE_STATUS_PAGECACHE_SIZE = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8599:1: SQLITE_STATUS_PAGECACHE_USED = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8593:1: SQLITE_STATUS_PARSER_STACK = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8598:1: SQLITE_STATUS_SCRATCH_OVERFLOW = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8596:1: SQLITE_STATUS_SCRATCH_SIZE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8600:1: SQLITE_STATUS_SCRATCH_USED = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8595:1: SQLITE_STDCALL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:390:1: SQLITE_STMTJRNL_SPILL = 65536 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21806:1: SQLITE_STMTSTATUS_AUTOINDEX = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8848:1: SQLITE_STMTSTATUS_FILTER_HIT = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8853:1: SQLITE_STMTSTATUS_FILTER_MISS = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8852:1: SQLITE_STMTSTATUS_FULLSCAN_STEP = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8846:1: SQLITE_STMTSTATUS_MEMUSED = 99 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8854:1: SQLITE_STMTSTATUS_REPREPARE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8850:1: SQLITE_STMTSTATUS_RUN = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8851:1: SQLITE_STMTSTATUS_SORT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8847:1: SQLITE_STMTSTATUS_VM_STEP = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8849:1: SQLITE_SUBTYPE = 0x000100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5715:1: SQLITE_SYNC_DATAONLY = 0x00010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1015:1: SQLITE_SYNC_FULL = 0x00003 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1014:1: SQLITE_SYNC_NORMAL = 0x00002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:1013:1: SQLITE_SYSAPI = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:396:1: SQLITE_SYSTEM_MALLOC = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13510:1: SQLITE_SeekScan = 0x00020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17030:1: SQLITE_ShortColNames = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16953:1: SQLITE_SimplifyJoin = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17026:1: SQLITE_SkipScan = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17027:1: SQLITE_Stat4 = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17023:1: SQLITE_TCLAPI = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:75:1: SQLITE_TEMP_FILE_PREFIX = "etilqs_" // testdata/sqlite-amalgamation-3380500/sqlite3.c:16299:1: SQLITE_TEMP_STORE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14087:1: SQLITE_TESTCTRL_ALWAYS = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8282:1: SQLITE_TESTCTRL_ASSERT = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8281:1: SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8279:1: SQLITE_TESTCTRL_BITVEC_TEST = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8277:1: SQLITE_TESTCTRL_BYTEORDER = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8293:1: SQLITE_TESTCTRL_EXPLAIN_STMT = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8289:1: SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8300:1: SQLITE_TESTCTRL_FAULT_INSTALL = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8278:1: SQLITE_TESTCTRL_FIRST = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8273:1: SQLITE_TESTCTRL_IMPOSTER = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8296:1: SQLITE_TESTCTRL_INTERNAL_FUNCTIONS = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8287:1: SQLITE_TESTCTRL_ISINIT = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8294:1: SQLITE_TESTCTRL_ISKEYWORD = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8285:1: SQLITE_TESTCTRL_LAST = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8305:1: SQLITE_TESTCTRL_LOCALTIME_FAULT = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8288:1: SQLITE_TESTCTRL_LOGEST = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8304:1: SQLITE_TESTCTRL_NEVER_CORRUPT = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8291:1: SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8290:1: SQLITE_TESTCTRL_OPTIMIZATIONS = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8284:1: SQLITE_TESTCTRL_PARSER_COVERAGE = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8297:1: SQLITE_TESTCTRL_PENDING_BYTE = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8280:1: SQLITE_TESTCTRL_PRNG_RESET = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8276:1: SQLITE_TESTCTRL_PRNG_RESTORE = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8275:1: SQLITE_TESTCTRL_PRNG_SAVE = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8274:1: SQLITE_TESTCTRL_PRNG_SEED = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8299:1: SQLITE_TESTCTRL_RESERVE = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8283:1: SQLITE_TESTCTRL_RESULT_INTREAL = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8298:1: SQLITE_TESTCTRL_SCRATCHMALLOC = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8286:1: SQLITE_TESTCTRL_SEEK_COUNT = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8301:1: SQLITE_TESTCTRL_SORTER_MMAP = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8295:1: SQLITE_TESTCTRL_TRACEFLAGS = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8302:1: SQLITE_TESTCTRL_TUNE = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8303:1: SQLITE_TESTCTRL_VDBE_COVERAGE = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:8292:1: SQLITE_TEXT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5185:1: SQLITE_THREADSAFE = 1 // <defines>:23:1: SQLITE_THREADS_IMPLEMENTED = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:31884:1: SQLITE_TOKEN_KEYWORD = 0x2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17905:1: SQLITE_TOKEN_QUOTED = 0x1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17904:1: SQLITE_TOOBIG = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:769:1: SQLITE_TRACE_CLOSE = 0x08 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3584:1: SQLITE_TRACE_LEGACY = 0x40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16767:1: SQLITE_TRACE_NONLEGACY_MASK = 0x0f // testdata/sqlite-amalgamation-3380500/sqlite3.c:16773:1: SQLITE_TRACE_PROFILE = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3582:1: SQLITE_TRACE_ROW = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3583:1: SQLITE_TRACE_STMT = 0x01 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3581:1: SQLITE_TRACE_XPROFILE = 0x80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16768:1: SQLITE_TRANSACTION = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3478:1: SQLITE_TXN_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:6673:1: SQLITE_TXN_READ = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:6674:1: SQLITE_TXN_WRITE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:6675:1: SQLITE_Transitive = 0x00000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17019:1: SQLITE_TriggerEQP = 0x01000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16973:1: SQLITE_TrustedSchema = 0x00000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16954:1: SQLITE_UPDATE = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:3479:1: SQLITE_USE_MALLOC_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:25115:1: SQLITE_USE_MSIZE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:25116:1: SQLITE_USE_URI = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:21772:1: SQLITE_UTF16 = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5644:1: SQLITE_UTF16BE = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5643:1: SQLITE_UTF16LE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5642:1: SQLITE_UTF16NATIVE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14336:1: SQLITE_UTF16_ALIGNED = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5646:1: SQLITE_UTF8 = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:5641:1: SQLITE_VDBEINT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22048:1: SQLITE_VDBE_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:15355:1: SQLITE_VERSION = "3.38.5" // testdata/sqlite-amalgamation-3380500/sqlite3.c:455:1: SQLITE_VERSION_NUMBER = 3038005 // testdata/sqlite-amalgamation-3380500/sqlite3.c:456:1: SQLITE_VTABRISK_High = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17507:1: SQLITE_VTABRISK_Low = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17505:1: SQLITE_VTABRISK_Normal = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17506:1: SQLITE_VTAB_CONSTRAINT_SUPPORT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9778:1: SQLITE_VTAB_DIRECTONLY = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9780:1: SQLITE_VTAB_INNOCUOUS = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:9779:1: SQLITE_WAL_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53100:1: SQLITE_WARNING = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:779:1: SQLITE_WARNING_AUTOINDEX = 284 // testdata/sqlite-amalgamation-3380500/sqlite3.c:872:1: SQLITE_WHEREINT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:146909:1: SQLITE_WIN32_CREATEFILEMAPPINGA = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43025:1: SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:6544:1: SQLITE_WIN32_GETVERSIONEX = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43012:1: SQLITE_WIN32_HAS_ANSI = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:42968:1: SQLITE_WIN32_HAS_WIDE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:42977:1: SQLITE_WIN32_IOERR_RETRY = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:45030:1: SQLITE_WIN32_IOERR_RETRY_DELAY = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:45033:1: SQLITE_WIN32_MAX_ERRMSG_CHARS = 1024 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43081:1: SQLITE_WIN32_MAX_PATH_BYTES = 1040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43065:1: SQLITE_WIN32_MAX_PATH_CHARS = 260 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43041:1: SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:6545:1: SQLITE_WINNT_MAX_PATH_CHARS = 32767 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43056:1: SQLITE_WSD = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14547:3: SQLITE_WindowFunc = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17013:1: SQLITE_WriteSchema = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16947:1: SRT_Coroutine = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18687:1: SRT_Discard = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18669:1: SRT_DistFifo = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18670:1: SRT_DistQueue = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18671:1: SRT_EphemTab = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18686:1: SRT_Except = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18667:1: SRT_Exists = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18668:1: SRT_Fifo = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18678:1: SRT_Mem = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18684:1: SRT_Output = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18683:1: SRT_Queue = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18677:1: SRT_Set = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18685:1: SRT_Table = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18688:1: SRT_Union = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18666:1: SRT_Upfrom = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18689:1: SSF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5779:1: SSF_INDICATOR = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5780:1: SSF_SOUNDSENTRYON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5778:1: SSGF_DISPLAY = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:5730:1: SSGF_NONE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5729:1: SSIZE_MAX = 9223372036854775807 // /usr/x86_64-w64-mingw32/include/limits.h:84:1: SSL_F12_ERROR_TEXT_LENGTH = 256 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5587:1: SSL_HPKP_HEADER_COUNT = 2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5606:1: SSL_HPKP_PKP_HEADER_INDEX = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5604:1: SSL_HPKP_PKP_RO_HEADER_INDEX = 1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5605:1: SSL_KEY_PIN_ERROR_TEXT_LENGTH = 512 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5621:1: SSTF_BORDER = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:5734:1: SSTF_CHARS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5733:1: SSTF_DISPLAY = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:5735:1: SSTF_NONE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5732:1: SSWF_CUSTOM = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:5741:1: SSWF_DISPLAY = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:5740:1: SSWF_NONE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:5737:1: SSWF_TITLE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:5738:1: SSWF_WINDOW = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:5739:1: SS_BITMAP = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:4547:1: SS_BLACKFRAME = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:4540:1: SS_BLACKRECT = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:4537:1: SS_CENTER = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4534:1: SS_CENTERIMAGE = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:4556:1: SS_EDITCONTROL = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:4560:1: SS_ELLIPSISMASK = 49152 // /usr/x86_64-w64-mingw32/include/winuser.h:4564:1: SS_ENDELLIPSIS = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:4561:1: SS_ENHMETAFILE = 15 // /usr/x86_64-w64-mingw32/include/winuser.h:4548:1: SS_ETCHEDFRAME = 18 // /usr/x86_64-w64-mingw32/include/winuser.h:4551:1: SS_ETCHEDHORZ = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:4549:1: SS_ETCHEDVERT = 17 // /usr/x86_64-w64-mingw32/include/winuser.h:4550:1: SS_GRAYFRAME = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:4541:1: SS_GRAYRECT = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:4538:1: SS_ICON = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4536:1: SS_LEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4533:1: SS_LEFTNOWORDWRAP = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:4545:1: SS_NOPREFIX = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:4554:1: SS_NOTIFY = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:4555:1: SS_OWNERDRAW = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:4546:1: SS_PATHELLIPSIS = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:4562:1: SS_REALSIZECONTROL = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:4553:1: SS_REALSIZEIMAGE = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:4558:1: SS_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4535:1: SS_RIGHTJUST = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:4557:1: SS_SIMPLE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:4544:1: SS_SUNKEN = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:4559:1: SS_TYPEMASK = 31 // /usr/x86_64-w64-mingw32/include/winuser.h:4552:1: SS_USERITEM = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:4543:1: SS_WHITEFRAME = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:4542:1: SS_WHITERECT = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:4539:1: SS_WORDELLIPSIS = 49152 // /usr/x86_64-w64-mingw32/include/winuser.h:4563:1: STACK_SIZE_PARAM_IS_A_RESERVATION = 0x10000 // /usr/x86_64-w64-mingw32/include/winbase.h:408:1: STAMP_AXESLIST = 134245473 // /usr/x86_64-w64-mingw32/include/wingdi.h:3041:1: STAMP_CFF2 = 134248035 // /usr/x86_64-w64-mingw32/include/wingdi.h:3043:1: STAMP_DESIGNVECTOR = 134248036 // /usr/x86_64-w64-mingw32/include/wingdi.h:3040:1: STAMP_TRUETYPE_VARIATION = 134248052 // /usr/x86_64-w64-mingw32/include/wingdi.h:3042:1: STANDARD_RIGHTS_ALL = 2031616 // /usr/x86_64-w64-mingw32/include/winnt.h:2891:1: STANDARD_RIGHTS_EXECUTE = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:2889:1: STANDARD_RIGHTS_READ = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:2887:1: STANDARD_RIGHTS_REQUIRED = 983040 // /usr/x86_64-w64-mingw32/include/winnt.h:2885:1: STANDARD_RIGHTS_WRITE = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:2888:1: STARTDOC = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:243:1: STARTF_FORCEOFFFEEDBACK = 0x00000080 // /usr/x86_64-w64-mingw32/include/winbase.h:1489:1: STARTF_FORCEONFEEDBACK = 0x00000040 // /usr/x86_64-w64-mingw32/include/winbase.h:1488:1: STARTF_PREVENTPINNING = 0x00002000 // /usr/x86_64-w64-mingw32/include/winbase.h:1495:1: STARTF_RUNFULLSCREEN = 0x00000020 // /usr/x86_64-w64-mingw32/include/winbase.h:1487:1: STARTF_TITLEISAPPID = 0x00001000 // /usr/x86_64-w64-mingw32/include/winbase.h:1494:1: STARTF_TITLEISLINKNAME = 0x00000800 // /usr/x86_64-w64-mingw32/include/winbase.h:1493:1: STARTF_USECOUNTCHARS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winbase.h:1485:1: STARTF_USEFILLATTRIBUTE = 0x00000010 // /usr/x86_64-w64-mingw32/include/winbase.h:1486:1: STARTF_USEHOTKEY = 0x00000200 // /usr/x86_64-w64-mingw32/include/winbase.h:1492:1: STARTF_USEPOSITION = 0x00000004 // /usr/x86_64-w64-mingw32/include/winbase.h:1484:1: STARTF_USESHOWWINDOW = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:1482:1: STARTF_USESIZE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:1483:1: STARTF_USESTDHANDLES = 0x00000100 // /usr/x86_64-w64-mingw32/include/winbase.h:1490:1: START_PAGE_GENERAL = 0xffffffff // /usr/x86_64-w64-mingw32/include/commdlg.h:691:1: STATE_SYSTEM_ALERT_HIGH = 0x10000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6158:1: STATE_SYSTEM_ALERT_LOW = 0x04000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6156:1: STATE_SYSTEM_ALERT_MEDIUM = 0x08000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6157:1: STATE_SYSTEM_ANIMATED = 0x00004000 // /usr/x86_64-w64-mingw32/include/winuser.h:6144:1: STATE_SYSTEM_BUSY = 0x00000800 // /usr/x86_64-w64-mingw32/include/winuser.h:6141:1: STATE_SYSTEM_CHECKED = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:6133:1: STATE_SYSTEM_COLLAPSED = 0x00000400 // /usr/x86_64-w64-mingw32/include/winuser.h:6140:1: STATE_SYSTEM_DEFAULT = 0x00000100 // /usr/x86_64-w64-mingw32/include/winuser.h:6138:1: STATE_SYSTEM_EXPANDED = 0x00000200 // /usr/x86_64-w64-mingw32/include/winuser.h:6139:1: STATE_SYSTEM_EXTSELECTABLE = 0x02000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6155:1: STATE_SYSTEM_FLOATING = 0x00001000 // /usr/x86_64-w64-mingw32/include/winuser.h:6142:1: STATE_SYSTEM_FOCUSABLE = 0x00100000 // /usr/x86_64-w64-mingw32/include/winuser.h:6150:1: STATE_SYSTEM_FOCUSED = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:6131:1: STATE_SYSTEM_HOTTRACKED = 0x00000080 // /usr/x86_64-w64-mingw32/include/winuser.h:6137:1: STATE_SYSTEM_INDETERMINATE = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:6135:1: STATE_SYSTEM_INVISIBLE = 0x00008000 // /usr/x86_64-w64-mingw32/include/winuser.h:6145:1: STATE_SYSTEM_LINKED = 0x00400000 // /usr/x86_64-w64-mingw32/include/winuser.h:6152:1: STATE_SYSTEM_MARQUEED = 0x00002000 // /usr/x86_64-w64-mingw32/include/winuser.h:6143:1: STATE_SYSTEM_MIXED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:6134:1: STATE_SYSTEM_MOVEABLE = 0x00040000 // /usr/x86_64-w64-mingw32/include/winuser.h:6148:1: STATE_SYSTEM_MULTISELECTABLE = 0x01000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6154:1: STATE_SYSTEM_OFFSCREEN = 0x00010000 // /usr/x86_64-w64-mingw32/include/winuser.h:6146:1: STATE_SYSTEM_PRESSED = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:6132:1: STATE_SYSTEM_PROTECTED = 0x20000000 // /usr/x86_64-w64-mingw32/include/winuser.h:6159:1: STATE_SYSTEM_READONLY = 0x00000040 // /usr/x86_64-w64-mingw32/include/winuser.h:6136:1: STATE_SYSTEM_SELECTABLE = 0x00200000 // /usr/x86_64-w64-mingw32/include/winuser.h:6151:1: STATE_SYSTEM_SELECTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:6130:1: STATE_SYSTEM_SELFVOICING = 0x00080000 // /usr/x86_64-w64-mingw32/include/winuser.h:6149:1: STATE_SYSTEM_SIZEABLE = 0x00020000 // /usr/x86_64-w64-mingw32/include/winuser.h:6147:1: STATE_SYSTEM_TRAVERSED = 0x00800000 // /usr/x86_64-w64-mingw32/include/winuser.h:6153:1: STATE_SYSTEM_UNAVAILABLE = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:6129:1: STATE_SYSTEM_VALID = 0x3FFFFFFF // /usr/x86_64-w64-mingw32/include/winuser.h:6160:1: STAT_GET_NDLT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111925:1: STAT_GET_NEQ = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111923:1: STAT_GET_NLT = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111924:1: STAT_GET_ROWID = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111922:1: STAT_GET_STAT1 = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:111921:1: STDAPICALLTYPE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:432:1: STDERR_FILENO = 2 // /usr/x86_64-w64-mingw32/include/stdio.h:59:1: STDIN_FILENO = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:57:1: STDMETHODCALLTYPE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:430:1: STDOLE2_LCID = 0x0000 // /usr/x86_64-w64-mingw32/include/oleauto.h:29:1: STDOLE2_MAJORVERNUM = 0x2 // /usr/x86_64-w64-mingw32/include/oleauto.h:27:1: STDOLE2_MINORVERNUM = 0x0 // /usr/x86_64-w64-mingw32/include/oleauto.h:28:1: STDOLE_LCID = 0x0000 // /usr/x86_64-w64-mingw32/include/oleauto.h:25:1: STDOLE_MAJORVERNUM = 0x1 // /usr/x86_64-w64-mingw32/include/oleauto.h:23:1: STDOLE_MINORVERNUM = 0x0 // /usr/x86_64-w64-mingw32/include/oleauto.h:24:1: STDOUT_FILENO = 1 // /usr/x86_64-w64-mingw32/include/stdio.h:58:1: STGFMT_ANY = 4 // /usr/x86_64-w64-mingw32/include/objbase.h:62:1: STGFMT_DOCFILE = 5 // /usr/x86_64-w64-mingw32/include/objbase.h:63:1: STGFMT_DOCUMENT = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:64:1: STGFMT_FILE = 3 // /usr/x86_64-w64-mingw32/include/objbase.h:61:1: STGFMT_NATIVE = 1 // /usr/x86_64-w64-mingw32/include/objbase.h:60:1: STGFMT_STORAGE = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:59:1: STGM_CONVERT = 131072 // /usr/x86_64-w64-mingw32/include/objbase.h:43:1: STGM_CREATE = 4096 // /usr/x86_64-w64-mingw32/include/objbase.h:42:1: STGM_DELETEONRELEASE = 67108864 // /usr/x86_64-w64-mingw32/include/objbase.h:40:1: STGM_DIRECT = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:26:1: STGM_DIRECT_SWMR = 4194304 // /usr/x86_64-w64-mingw32/include/objbase.h:46:1: STGM_FAILIFTHERE = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:44:1: STGM_NOSCRATCH = 1048576 // /usr/x86_64-w64-mingw32/include/objbase.h:41:1: STGM_NOSNAPSHOT = 2097152 // /usr/x86_64-w64-mingw32/include/objbase.h:45:1: STGM_PRIORITY = 262144 // /usr/x86_64-w64-mingw32/include/objbase.h:39:1: STGM_READ = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:30:1: STGM_READWRITE = 2 // /usr/x86_64-w64-mingw32/include/objbase.h:32:1: STGM_SHARE_DENY_NONE = 64 // /usr/x86_64-w64-mingw32/include/objbase.h:34:1: STGM_SHARE_DENY_READ = 48 // /usr/x86_64-w64-mingw32/include/objbase.h:35:1: STGM_SHARE_DENY_WRITE = 32 // /usr/x86_64-w64-mingw32/include/objbase.h:36:1: STGM_SHARE_EXCLUSIVE = 16 // /usr/x86_64-w64-mingw32/include/objbase.h:37:1: STGM_SIMPLE = 134217728 // /usr/x86_64-w64-mingw32/include/objbase.h:28:1: STGM_TRANSACTED = 65536 // /usr/x86_64-w64-mingw32/include/objbase.h:27:1: STGM_WRITE = 1 // /usr/x86_64-w64-mingw32/include/objbase.h:31:1: STGOPTIONS_VERSION = 2 // /usr/x86_64-w64-mingw32/include/objbase.h:128:1: STGTY_REPEAT = 256 // /usr/x86_64-w64-mingw32/include/objbase.h:51:1: STG_LAYOUT_INTERLEAVED = 1 // /usr/x86_64-w64-mingw32/include/objbase.h:55:1: STG_LAYOUT_SEQUENTIAL = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:54:1: STG_TOEND = 4294967295 // /usr/x86_64-w64-mingw32/include/objbase.h:52:1: STM_GETICON = 0x0171 // /usr/x86_64-w64-mingw32/include/winuser.h:4569:1: STM_GETIMAGE = 0x0173 // /usr/x86_64-w64-mingw32/include/winuser.h:4571:1: STM_MSGMAX = 0x0174 // /usr/x86_64-w64-mingw32/include/winuser.h:4577:1: STM_SETICON = 0x0170 // /usr/x86_64-w64-mingw32/include/winuser.h:4568:1: STM_SETIMAGE = 0x0172 // /usr/x86_64-w64-mingw32/include/winuser.h:4570:1: STN_CLICKED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4572:1: STN_DBLCLK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4573:1: STN_DISABLE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:4575:1: STN_ENABLE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4574:1: STOCK_LAST = 19 // /usr/x86_64-w64-mingw32/include/wingdi.h:1459:1: STREAM_CLEAR_ENCRYPTION = 0x00000004 // /usr/x86_64-w64-mingw32/include/winioctl.h:1709:1: STREAM_CONTAINS_PROPERTIES = 0x00000004 // /usr/x86_64-w64-mingw32/include/winbase.h:1479:1: STREAM_CONTAINS_SECURITY = 0x00000002 // /usr/x86_64-w64-mingw32/include/winbase.h:1478:1: STREAM_MODIFIED_WHEN_READ = 0x00000001 // /usr/x86_64-w64-mingw32/include/winbase.h:1477:1: STREAM_NORMAL_ATTRIBUTE = 0x00000000 // /usr/x86_64-w64-mingw32/include/winbase.h:1476:1: STREAM_SET_ENCRYPTION = 0x00000003 // /usr/x86_64-w64-mingw32/include/winioctl.h:1708:1: STREAM_SPARSE_ATTRIBUTE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winbase.h:1480:1: STRETCHBLT = 2048 // /usr/x86_64-w64-mingw32/include/wingdi.h:289:1: STRETCH_ANDSCANS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:95:1: STRETCH_DELETESCANS = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:97:1: STRETCH_HALFTONE = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:98:1: STRETCH_ORSCANS = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:96:1: STRICT = 1 // /usr/x86_64-w64-mingw32/include/minwindef.h:11:1: STRUNCATE = 80 // /usr/x86_64-w64-mingw32/include/errno.h:67:1: STYLE_DESCRIPTION_SIZE = 32 // /usr/x86_64-w64-mingw32/include/imm.h:76:1: ST_ADVISE = 0x0002 // /usr/x86_64-w64-mingw32/include/ddeml.h:76:1: ST_BLOCKED = 0x0008 // /usr/x86_64-w64-mingw32/include/ddeml.h:78:1: ST_BLOCKNEXT = 0x0080 // /usr/x86_64-w64-mingw32/include/ddeml.h:82:1: ST_CLIENT = 0x0010 // /usr/x86_64-w64-mingw32/include/ddeml.h:79:1: ST_CONNECTED = 0x0001 // /usr/x86_64-w64-mingw32/include/ddeml.h:75:1: ST_INLIST = 0x0040 // /usr/x86_64-w64-mingw32/include/ddeml.h:81:1: ST_ISLOCAL = 0x0004 // /usr/x86_64-w64-mingw32/include/ddeml.h:77:1: ST_ISSELF = 0x0100 // /usr/x86_64-w64-mingw32/include/ddeml.h:83:1: ST_TERMINATED = 0x0020 // /usr/x86_64-w64-mingw32/include/ddeml.h:80:1: SUBLANG_AFRIKAANS_SOUTH_AFRICA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1007:1: SUBLANG_ALBANIAN_ALBANIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1008:1: SUBLANG_ALSATIAN_FRANCE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1009:1: SUBLANG_AMHARIC_ETHIOPIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1010:1: SUBLANG_ARABIC_ALGERIA = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1015:1: SUBLANG_ARABIC_BAHRAIN = 0x0f // /usr/x86_64-w64-mingw32/include/winnt.h:1025:1: SUBLANG_ARABIC_EGYPT = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1013:1: SUBLANG_ARABIC_IRAQ = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1012:1: SUBLANG_ARABIC_JORDAN = 0x0b // /usr/x86_64-w64-mingw32/include/winnt.h:1021:1: SUBLANG_ARABIC_KUWAIT = 0x0d // /usr/x86_64-w64-mingw32/include/winnt.h:1023:1: SUBLANG_ARABIC_LEBANON = 0x0c // /usr/x86_64-w64-mingw32/include/winnt.h:1022:1: SUBLANG_ARABIC_LIBYA = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1014:1: SUBLANG_ARABIC_MOROCCO = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1016:1: SUBLANG_ARABIC_OMAN = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:1018:1: SUBLANG_ARABIC_QATAR = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:1026:1: SUBLANG_ARABIC_SAUDI_ARABIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1011:1: SUBLANG_ARABIC_SYRIA = 0x0a // /usr/x86_64-w64-mingw32/include/winnt.h:1020:1: SUBLANG_ARABIC_TUNISIA = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:1017:1: SUBLANG_ARABIC_UAE = 0x0e // /usr/x86_64-w64-mingw32/include/winnt.h:1024:1: SUBLANG_ARABIC_YEMEN = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:1019:1: SUBLANG_ARMENIAN_ARMENIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1027:1: SUBLANG_ASSAMESE_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1028:1: SUBLANG_AZERBAIJANI_AZERBAIJAN_CYRILLIC = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1032:1: SUBLANG_AZERBAIJANI_AZERBAIJAN_LATIN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1031:1: SUBLANG_AZERI_CYRILLIC = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1030:1: SUBLANG_AZERI_LATIN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1029:1: SUBLANG_BANGLA_BANGLADESH = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1034:1: SUBLANG_BANGLA_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1033:1: SUBLANG_BASHKIR_RUSSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1035:1: SUBLANG_BASQUE_BASQUE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1036:1: SUBLANG_BELARUSIAN_BELARUS = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1037:1: SUBLANG_BENGALI_BANGLADESH = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1039:1: SUBLANG_BENGALI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1038:1: SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:1041:1: SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1040:1: SUBLANG_BRETON_FRANCE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1042:1: SUBLANG_BULGARIAN_BULGARIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1043:1: SUBLANG_CATALAN_CATALAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1044:1: SUBLANG_CENTRAL_KURDISH_IRAQ = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1045:1: SUBLANG_CHEROKEE_CHEROKEE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1046:1: SUBLANG_CHINESE_HONGKONG = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1049:1: SUBLANG_CHINESE_MACAU = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1051:1: SUBLANG_CHINESE_SIMPLIFIED = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1048:1: SUBLANG_CHINESE_SINGAPORE = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1050:1: SUBLANG_CHINESE_TRADITIONAL = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1047:1: SUBLANG_CORSICAN_FRANCE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1052:1: SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1055:1: SUBLANG_CROATIAN_CROATIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1054:1: SUBLANG_CUSTOM_DEFAULT = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1003:1: SUBLANG_CUSTOM_UNSPECIFIED = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1004:1: SUBLANG_CZECH_CZECH_REPUBLIC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1053:1: SUBLANG_DANISH_DENMARK = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1056:1: SUBLANG_DARI_AFGHANISTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1057:1: SUBLANG_DEFAULT = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1001:1: SUBLANG_DIVEHI_MALDIVES = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1058:1: SUBLANG_DUTCH = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1059:1: SUBLANG_DUTCH_BELGIAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1060:1: SUBLANG_ENGLISH_AUS = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1063:1: SUBLANG_ENGLISH_BELIZE = 0x0a // /usr/x86_64-w64-mingw32/include/winnt.h:1071:1: SUBLANG_ENGLISH_CAN = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1064:1: SUBLANG_ENGLISH_CARIBBEAN = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:1070:1: SUBLANG_ENGLISH_EIRE = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1067:1: SUBLANG_ENGLISH_INDIA = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:1075:1: SUBLANG_ENGLISH_IRELAND = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1066:1: SUBLANG_ENGLISH_JAMAICA = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:1069:1: SUBLANG_ENGLISH_MALAYSIA = 0x11 // /usr/x86_64-w64-mingw32/include/winnt.h:1076:1: SUBLANG_ENGLISH_NZ = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1065:1: SUBLANG_ENGLISH_PHILIPPINES = 0x0d // /usr/x86_64-w64-mingw32/include/winnt.h:1074:1: SUBLANG_ENGLISH_SINGAPORE = 0x12 // /usr/x86_64-w64-mingw32/include/winnt.h:1077:1: SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:1068:1: SUBLANG_ENGLISH_TRINIDAD = 0x0b // /usr/x86_64-w64-mingw32/include/winnt.h:1072:1: SUBLANG_ENGLISH_UK = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1062:1: SUBLANG_ENGLISH_US = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1061:1: SUBLANG_ENGLISH_ZIMBABWE = 0x0c // /usr/x86_64-w64-mingw32/include/winnt.h:1073:1: SUBLANG_ESTONIAN_ESTONIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1078:1: SUBLANG_FAEROESE_FAROE_ISLANDS = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1079:1: SUBLANG_FILIPINO_PHILIPPINES = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1080:1: SUBLANG_FINNISH_FINLAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1081:1: SUBLANG_FRENCH = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1082:1: SUBLANG_FRENCH_BELGIAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1083:1: SUBLANG_FRENCH_CANADIAN = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1084:1: SUBLANG_FRENCH_LUXEMBOURG = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1086:1: SUBLANG_FRENCH_MONACO = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1087:1: SUBLANG_FRENCH_SWISS = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1085:1: SUBLANG_FRISIAN_NETHERLANDS = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1088:1: SUBLANG_FULAH_SENEGAL = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1089:1: SUBLANG_GALICIAN_GALICIAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1090:1: SUBLANG_GEORGIAN_GEORGIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1091:1: SUBLANG_GERMAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1092:1: SUBLANG_GERMAN_AUSTRIAN = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1094:1: SUBLANG_GERMAN_LIECHTENSTEIN = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1096:1: SUBLANG_GERMAN_LUXEMBOURG = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1095:1: SUBLANG_GERMAN_SWISS = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1093:1: SUBLANG_GREEK_GREECE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1097:1: SUBLANG_GREENLANDIC_GREENLAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1098:1: SUBLANG_GUJARATI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1099:1: SUBLANG_HAUSA_NIGERIA = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:1101:1: SUBLANG_HAUSA_NIGERIA_LATIN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1100:1: SUBLANG_HAWAIIAN_US = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1102:1: SUBLANG_HEBREW_ISRAEL = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1103:1: SUBLANG_HINDI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1104:1: SUBLANG_HUNGARIAN_HUNGARY = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1105:1: SUBLANG_ICELANDIC_ICELAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1106:1: SUBLANG_IGBO_NIGERIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1107:1: SUBLANG_INDONESIAN_INDONESIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1108:1: SUBLANG_INUKTITUT_CANADA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1109:1: SUBLANG_INUKTITUT_CANADA_LATIN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1110:1: SUBLANG_IRISH_IRELAND = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1111:1: SUBLANG_ITALIAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1112:1: SUBLANG_ITALIAN_SWISS = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1113:1: SUBLANG_JAPANESE_JAPAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1114:1: SUBLANG_KANNADA_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1115:1: SUBLANG_KASHMIRI_INDIA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1116:1: SUBLANG_KASHMIRI_SASIA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1117:1: SUBLANG_KAZAK_KAZAKHSTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1118:1: SUBLANG_KHMER_CAMBODIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1119:1: SUBLANG_KICHE_GUATEMALA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1120:1: SUBLANG_KINYARWANDA_RWANDA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1121:1: SUBLANG_KONKANI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1122:1: SUBLANG_KOREAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1123:1: SUBLANG_KYRGYZ_KYRGYZSTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1124:1: SUBLANG_LAO_LAO = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1125:1: SUBLANG_LAO_LAO_PDR = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:1126:1: SUBLANG_LATVIAN_LATVIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1127:1: SUBLANG_LITHUANIAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1131:1: SUBLANG_LOWER_SORBIAN_GERMANY = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1132:1: SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1133:1: SUBLANG_MACEDONIAN_MACEDONIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1134:1: SUBLANG_MALAYALAM_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1137:1: SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1136:1: SUBLANG_MALAY_MALAYSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1135:1: SUBLANG_MALTESE_MALTA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1138:1: SUBLANG_MAORI_NEW_ZEALAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1139:1: SUBLANG_MAPUDUNGUN_CHILE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1140:1: SUBLANG_MARATHI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1141:1: SUBLANG_MOHAWK_MOHAWK = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1142:1: SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1143:1: SUBLANG_MONGOLIAN_PRC = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1144:1: SUBLANG_NEPALI_INDIA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1146:1: SUBLANG_NEPALI_NEPAL = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1145:1: SUBLANG_NEUTRAL = 0x00 // /usr/x86_64-w64-mingw32/include/winnt.h:1000:1: SUBLANG_NORWEGIAN_BOKMAL = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1147:1: SUBLANG_NORWEGIAN_NYNORSK = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1148:1: SUBLANG_OCCITAN_FRANCE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1149:1: SUBLANG_ORIYA_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1150:1: SUBLANG_PASHTO_AFGHANISTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1151:1: SUBLANG_PERSIAN_IRAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1152:1: SUBLANG_POLISH_POLAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1153:1: SUBLANG_PORTUGUESE = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1158:1: SUBLANG_PORTUGUESE_BRAZILIAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1154:1: SUBLANG_PULAR_SENEGAL = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1159:1: SUBLANG_PUNJABI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1160:1: SUBLANG_PUNJABI_PAKISTAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1161:1: SUBLANG_QUECHUA_BOLIVIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1162:1: SUBLANG_QUECHUA_ECUADOR = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1163:1: SUBLANG_QUECHUA_PERU = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1164:1: SUBLANG_ROMANIAN_ROMANIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1165:1: SUBLANG_ROMANSH_SWITZERLAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1167:1: SUBLANG_RUSSIAN_RUSSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1168:1: SUBLANG_SAKHA_RUSSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1169:1: SUBLANG_SAMI_INARI_FINLAND = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:1178:1: SUBLANG_SAMI_LULE_NORWAY = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1173:1: SUBLANG_SAMI_LULE_SWEDEN = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1174:1: SUBLANG_SAMI_NORTHERN_FINLAND = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1172:1: SUBLANG_SAMI_NORTHERN_NORWAY = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1170:1: SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1171:1: SUBLANG_SAMI_SKOLT_FINLAND = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:1177:1: SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1175:1: SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:1176:1: SUBLANG_SANSKRIT_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1179:1: SUBLANG_SCOTTISH_GAELIC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1180:1: SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:1184:1: SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1183:1: SUBLANG_SERBIAN_CYRILLIC = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1182:1: SUBLANG_SERBIAN_LATIN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1181:1: SUBLANG_SERBIAN_MONTENEGRO_CYRILLIC = 0x0c // /usr/x86_64-w64-mingw32/include/winnt.h:1186:1: SUBLANG_SERBIAN_MONTENEGRO_LATIN = 0x0b // /usr/x86_64-w64-mingw32/include/winnt.h:1185:1: SUBLANG_SERBIAN_SERBIA_CYRILLIC = 0x0a // /usr/x86_64-w64-mingw32/include/winnt.h:1188:1: SUBLANG_SERBIAN_SERBIA_LATIN = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:1187:1: SUBLANG_SINDHI_AFGHANISTAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1190:1: SUBLANG_SINDHI_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1189:1: SUBLANG_SINDHI_PAKISTAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1191:1: SUBLANG_SINHALESE_SRI_LANKA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1192:1: SUBLANG_SLOVAK_SLOVAKIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1194:1: SUBLANG_SLOVENIAN_SLOVENIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1195:1: SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1193:1: SUBLANG_SPANISH = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1196:1: SUBLANG_SPANISH_ARGENTINA = 0x0b // /usr/x86_64-w64-mingw32/include/winnt.h:1206:1: SUBLANG_SPANISH_BOLIVIA = 0x10 // /usr/x86_64-w64-mingw32/include/winnt.h:1211:1: SUBLANG_SPANISH_CHILE = 0x0d // /usr/x86_64-w64-mingw32/include/winnt.h:1208:1: SUBLANG_SPANISH_COLOMBIA = 0x09 // /usr/x86_64-w64-mingw32/include/winnt.h:1204:1: SUBLANG_SPANISH_COSTA_RICA = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1200:1: SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07 // /usr/x86_64-w64-mingw32/include/winnt.h:1202:1: SUBLANG_SPANISH_ECUADOR = 0x0c // /usr/x86_64-w64-mingw32/include/winnt.h:1207:1: SUBLANG_SPANISH_EL_SALVADOR = 0x11 // /usr/x86_64-w64-mingw32/include/winnt.h:1212:1: SUBLANG_SPANISH_GUATEMALA = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1199:1: SUBLANG_SPANISH_HONDURAS = 0x12 // /usr/x86_64-w64-mingw32/include/winnt.h:1213:1: SUBLANG_SPANISH_MEXICAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1197:1: SUBLANG_SPANISH_MODERN = 0x03 // /usr/x86_64-w64-mingw32/include/winnt.h:1198:1: SUBLANG_SPANISH_NICARAGUA = 0x13 // /usr/x86_64-w64-mingw32/include/winnt.h:1214:1: SUBLANG_SPANISH_PANAMA = 0x06 // /usr/x86_64-w64-mingw32/include/winnt.h:1201:1: SUBLANG_SPANISH_PARAGUAY = 0x0f // /usr/x86_64-w64-mingw32/include/winnt.h:1210:1: SUBLANG_SPANISH_PERU = 0x0a // /usr/x86_64-w64-mingw32/include/winnt.h:1205:1: SUBLANG_SPANISH_PUERTO_RICO = 0x14 // /usr/x86_64-w64-mingw32/include/winnt.h:1215:1: SUBLANG_SPANISH_URUGUAY = 0x0e // /usr/x86_64-w64-mingw32/include/winnt.h:1209:1: SUBLANG_SPANISH_US = 0x15 // /usr/x86_64-w64-mingw32/include/winnt.h:1216:1: SUBLANG_SPANISH_VENEZUELA = 0x08 // /usr/x86_64-w64-mingw32/include/winnt.h:1203:1: SUBLANG_SWAHILI_KENYA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1217:1: SUBLANG_SWEDISH = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1221:1: SUBLANG_SWEDISH_FINLAND = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1222:1: SUBLANG_SYRIAC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1223:1: SUBLANG_SYRIAC_SYRIA = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:1224:1: SUBLANG_SYS_DEFAULT = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1002:1: SUBLANG_TAJIK_TAJIKISTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1225:1: SUBLANG_TAMAZIGHT_ALGERIA_LATIN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1226:1: SUBLANG_TAMAZIGHT_MOROCCO_TIFINAGH = 0x04 // /usr/x86_64-w64-mingw32/include/winnt.h:1227:1: SUBLANG_TAMIL_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1228:1: SUBLANG_TAMIL_SRI_LANKA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1229:1: SUBLANG_TATAR_RUSSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1230:1: SUBLANG_TELUGU_INDIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1231:1: SUBLANG_THAI_THAILAND = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1232:1: SUBLANG_TIBETAN_BHUTAN = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1234:1: SUBLANG_TIBETAN_PRC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1233:1: SUBLANG_TIGRIGNA_ERITREA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1235:1: SUBLANG_TIGRINYA_ERITREA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1236:1: SUBLANG_TIGRINYA_ETHIOPIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1237:1: SUBLANG_TSWANA_BOTSWANA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1238:1: SUBLANG_TSWANA_SOUTH_AFRICA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1239:1: SUBLANG_TURKISH_TURKEY = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1240:1: SUBLANG_TURKMEN_TURKMENISTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1241:1: SUBLANG_UIGHUR_PRC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1242:1: SUBLANG_UI_CUSTOM_DEFAULT = 0x05 // /usr/x86_64-w64-mingw32/include/winnt.h:1005:1: SUBLANG_UKRAINIAN_UKRAINE = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1243:1: SUBLANG_UPPER_SORBIAN_GERMANY = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1244:1: SUBLANG_URDU_INDIA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1246:1: SUBLANG_URDU_PAKISTAN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1245:1: SUBLANG_UZBEK_CYRILLIC = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1248:1: SUBLANG_UZBEK_LATIN = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1247:1: SUBLANG_VALENCIAN_VALENCIA = 0x02 // /usr/x86_64-w64-mingw32/include/winnt.h:1249:1: SUBLANG_VIETNAMESE_VIETNAM = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1250:1: SUBLANG_WELSH_UNITED_KINGDOM = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1251:1: SUBLANG_WOLOF_SENEGAL = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1252:1: SUBLANG_XHOSA_SOUTH_AFRICA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1254:1: SUBLANG_YAKUT_RUSSIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1255:1: SUBLANG_YI_PRC = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1256:1: SUBLANG_YORUBA_NIGERIA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1253:1: SUBLANG_ZULU_SOUTH_AFRICA = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:1257:1: SUBVERSION_MASK = 0x000000FF // /usr/x86_64-w64-mingw32/include/sdkddkver.h:153:1: SUCCESSFUL_ACCESS_ACE_FLAG = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:3343:1: SUPPORT_LANG_NUMBER = 32 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:57:1: SWP_ASYNCWINDOWPOS = 0x4000 // /usr/x86_64-w64-mingw32/include/winuser.h:2326:1: SWP_DEFERERASE = 0x2000 // /usr/x86_64-w64-mingw32/include/winuser.h:2325:1: SWP_DRAWFRAME = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:2323:1: SWP_FRAMECHANGED = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:2316:1: SWP_HIDEWINDOW = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:2318:1: SWP_NOACTIVATE = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:2315:1: SWP_NOCOPYBITS = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:2319:1: SWP_NOMOVE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:2312:1: SWP_NOOWNERZORDER = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:2320:1: SWP_NOREDRAW = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:2314:1: SWP_NOREPOSITION = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:2324:1: SWP_NOSENDCHANGING = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:2321:1: SWP_NOSIZE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:2311:1: SWP_NOZORDER = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:2313:1: SWP_SHOWWINDOW = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:2317:1: SW_ERASE = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:3587:1: SW_FORCEMINIMIZE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:213:1: SW_HIDE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:200:1: SW_INVALIDATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:3586:1: SW_MAX = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:214:1: SW_MAXIMIZE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:205:1: SW_MINIMIZE = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:208:1: SW_NORMAL = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:202:1: SW_OTHERUNZOOM = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:225:1: SW_OTHERZOOM = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:223:1: SW_PARENTCLOSING = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:222:1: SW_PARENTOPENING = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:224:1: SW_RESTORE = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:211:1: SW_SCROLLCHILDREN = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:3585:1: SW_SHOW = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:207:1: SW_SHOWDEFAULT = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:212:1: SW_SHOWMAXIMIZED = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:204:1: SW_SHOWMINIMIZED = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:203:1: SW_SHOWMINNOACTIVE = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:209:1: SW_SHOWNA = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:210:1: SW_SHOWNOACTIVATE = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:206:1: SW_SHOWNORMAL = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:201:1: SW_SMOOTHSCROLL = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:3588:1: SYMBOL_CHARSET = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1158:1: SYMLINK_FLAG_RELATIVE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:5099:1: SYMMETRICWRAPKEYBLOB = 0xb // /usr/x86_64-w64-mingw32/include/wincrypt.h:358:1: SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY = 0x02 // /usr/x86_64-w64-mingw32/include/synchapi.h:109:1: SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE = 0x04 // /usr/x86_64-w64-mingw32/include/synchapi.h:110:1: SYNCHRONIZATION_BARRIER_FLAGS_SPIN_ONLY = 0x01 // /usr/x86_64-w64-mingw32/include/synchapi.h:108:1: SYNCHRONIZE = 1048576 // /usr/x86_64-w64-mingw32/include/winnt.h:2883:1: SYSPAL_ERROR = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1656:1: SYSPAL_NOSTATIC = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1658:1: SYSPAL_NOSTATIC256 = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:1659:1: SYSPAL_STATIC = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1657:1: SYSRGN = 4 // /usr/x86_64-w64-mingw32/include/wingdi.h:2436:1: SYSTEM_ALARM_ACE_TYPE = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3306:1: SYSTEM_ALARM_CALLBACK_ACE_TYPE = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:3327:1: SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:3329:1: SYSTEM_ALARM_OBJECT_ACE_TYPE = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3316:1: SYSTEM_AUDIT_ACE_TYPE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3305:1: SYSTEM_AUDIT_CALLBACK_ACE_TYPE = 13 // /usr/x86_64-w64-mingw32/include/winnt.h:3326:1: SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:3328:1: SYSTEM_AUDIT_OBJECT_ACE_TYPE = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:3315:1: SYSTEM_CACHE_ALIGNMENT_SIZE = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:192:1: SYSTEM_FIXED_FONT = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:1454:1: SYSTEM_FONT = 13 // /usr/x86_64-w64-mingw32/include/wingdi.h:1451:1: SYSTEM_MANDATORY_LABEL_ACE_TYPE = 17 // /usr/x86_64-w64-mingw32/include/winnt.h:3331:1: SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:3395:1: SYSTEM_MANDATORY_LABEL_NO_READ_UP = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:3394:1: SYSTEM_MANDATORY_LABEL_NO_WRITE_UP = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:3393:1: SYSTEM_MANDATORY_LABEL_VALID_MASK = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:3397:1: SYSTEM_RESOURCE_ATTRIBUTE_ACE_TYPE = 18 // /usr/x86_64-w64-mingw32/include/winnt.h:3332:1: SYSTEM_SCOPED_POLICY_ID_ACE_TYPE = 19 // /usr/x86_64-w64-mingw32/include/winnt.h:3333:1: SYS_OPEN = 20 // /usr/x86_64-w64-mingw32/include/stdio.h:1486:1: S_ALLTHRESHOLD = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:557:1: S_LEGATO = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:560:1: S_NORMAL = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:559:1: S_PERIOD1024 = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:564:1: S_PERIOD2048 = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:565:1: S_PERIOD512 = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:563:1: S_PERIODVOICE = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:566:1: S_QUEUEEMPTY = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:555:1: S_SERBDNT = -5 // /usr/x86_64-w64-mingw32/include/winbase.h:576:1: S_SERDCC = -7 // /usr/x86_64-w64-mingw32/include/winbase.h:578:1: S_SERDDR = -14 // /usr/x86_64-w64-mingw32/include/winbase.h:585:1: S_SERDFQ = -13 // /usr/x86_64-w64-mingw32/include/winbase.h:584:1: S_SERDLN = -6 // /usr/x86_64-w64-mingw32/include/winbase.h:577:1: S_SERDMD = -10 // /usr/x86_64-w64-mingw32/include/winbase.h:581:1: S_SERDPT = -12 // /usr/x86_64-w64-mingw32/include/winbase.h:583:1: S_SERDSH = -11 // /usr/x86_64-w64-mingw32/include/winbase.h:582:1: S_SERDSR = -15 // /usr/x86_64-w64-mingw32/include/winbase.h:586:1: S_SERDST = -16 // /usr/x86_64-w64-mingw32/include/winbase.h:587:1: S_SERDTP = -8 // /usr/x86_64-w64-mingw32/include/winbase.h:579:1: S_SERDVL = -9 // /usr/x86_64-w64-mingw32/include/winbase.h:580:1: S_SERDVNA = -1 // /usr/x86_64-w64-mingw32/include/winbase.h:572:1: S_SERMACT = -3 // /usr/x86_64-w64-mingw32/include/winbase.h:574:1: S_SEROFM = -2 // /usr/x86_64-w64-mingw32/include/winbase.h:573:1: S_SERQFUL = -4 // /usr/x86_64-w64-mingw32/include/winbase.h:575:1: S_STACCATO = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:561:1: S_THRESHOLD = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:556:1: S_WHITE1024 = 5 // /usr/x86_64-w64-mingw32/include/winbase.h:568:1: S_WHITE2048 = 6 // /usr/x86_64-w64-mingw32/include/winbase.h:569:1: S_WHITE512 = 4 // /usr/x86_64-w64-mingw32/include/winbase.h:567:1: S_WHITEVOICE = 7 // /usr/x86_64-w64-mingw32/include/winbase.h:570:1: TABTYP_NORM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17591:1: TABTYP_VIEW = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17593:1: TABTYP_VTAB = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17592:1: TAPE_ABSOLUTE_BLOCK = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8654:1: TAPE_ABSOLUTE_POSITION = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8643:1: TAPE_CHECK_FOR_DRIVE_PROBLEM = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8784:1: TAPE_DRIVE_ABSOLUTE_BLK = 0x80001000 // /usr/x86_64-w64-mingw32/include/winnt.h:8713:1: TAPE_DRIVE_ABS_BLK_IMMED = 0x80002000 // /usr/x86_64-w64-mingw32/include/winnt.h:8714:1: TAPE_DRIVE_CLEAN_REQUESTS = 0x02000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8693:1: TAPE_DRIVE_COMPRESSION = 0x00020000 // /usr/x86_64-w64-mingw32/include/winnt.h:8686:1: TAPE_DRIVE_ECC = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:8685:1: TAPE_DRIVE_EJECT_MEDIA = 0x01000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8692:1: TAPE_DRIVE_END_OF_DATA = 0x80010000 // /usr/x86_64-w64-mingw32/include/winnt.h:8718:1: TAPE_DRIVE_EOT_WZ_SIZE = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:8684:1: TAPE_DRIVE_ERASE_BOP_ONLY = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8677:1: TAPE_DRIVE_ERASE_IMMEDIATE = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8678:1: TAPE_DRIVE_ERASE_LONG = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8676:1: TAPE_DRIVE_ERASE_SHORT = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8675:1: TAPE_DRIVE_FILEMARKS = 0x80040000 // /usr/x86_64-w64-mingw32/include/winnt.h:8720:1: TAPE_DRIVE_FIXED = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8671:1: TAPE_DRIVE_FIXED_BLOCK = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:8681:1: TAPE_DRIVE_FORMAT = 0xA0000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8734:1: TAPE_DRIVE_FORMAT_IMMEDIATE = 0xC0000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8735:1: TAPE_DRIVE_GET_ABSOLUTE_BLK = 0x00100000 // /usr/x86_64-w64-mingw32/include/winnt.h:8689:1: TAPE_DRIVE_GET_LOGICAL_BLK = 0x00200000 // /usr/x86_64-w64-mingw32/include/winnt.h:8690:1: TAPE_DRIVE_HIGH_FEATURES = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8736:1: TAPE_DRIVE_INITIATOR = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8673:1: TAPE_DRIVE_LOAD_UNLD_IMMED = 0x80000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8704:1: TAPE_DRIVE_LOAD_UNLOAD = 0x80000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8698:1: TAPE_DRIVE_LOCK_UNLK_IMMED = 0x80000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8706:1: TAPE_DRIVE_LOCK_UNLOCK = 0x80000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8700:1: TAPE_DRIVE_LOGICAL_BLK = 0x80004000 // /usr/x86_64-w64-mingw32/include/winnt.h:8715:1: TAPE_DRIVE_LOG_BLK_IMMED = 0x80008000 // /usr/x86_64-w64-mingw32/include/winnt.h:8716:1: TAPE_DRIVE_PADDING = 0x00040000 // /usr/x86_64-w64-mingw32/include/winnt.h:8687:1: TAPE_DRIVE_RELATIVE_BLKS = 0x80020000 // /usr/x86_64-w64-mingw32/include/winnt.h:8719:1: TAPE_DRIVE_REPORT_SMKS = 0x00080000 // /usr/x86_64-w64-mingw32/include/winnt.h:8688:1: TAPE_DRIVE_RESERVED_BIT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8696:1: TAPE_DRIVE_REVERSE_POSITION = 0x80400000 // /usr/x86_64-w64-mingw32/include/winnt.h:8725:1: TAPE_DRIVE_REWIND_IMMEDIATE = 0x80000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8701:1: TAPE_DRIVE_SELECT = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8672:1: TAPE_DRIVE_SEQUENTIAL_FMKS = 0x80080000 // /usr/x86_64-w64-mingw32/include/winnt.h:8721:1: TAPE_DRIVE_SEQUENTIAL_SMKS = 0x80200000 // /usr/x86_64-w64-mingw32/include/winnt.h:8724:1: TAPE_DRIVE_SETMARKS = 0x80100000 // /usr/x86_64-w64-mingw32/include/winnt.h:8723:1: TAPE_DRIVE_SET_BLOCK_SIZE = 0x80000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8702:1: TAPE_DRIVE_SET_CMP_BOP_ONLY = 0x04000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8694:1: TAPE_DRIVE_SET_COMPRESSION = 0x80000200 // /usr/x86_64-w64-mingw32/include/winnt.h:8709:1: TAPE_DRIVE_SET_ECC = 0x80000100 // /usr/x86_64-w64-mingw32/include/winnt.h:8708:1: TAPE_DRIVE_SET_EOT_WZ_SIZE = 0x00400000 // /usr/x86_64-w64-mingw32/include/winnt.h:8691:1: TAPE_DRIVE_SET_PADDING = 0x80000400 // /usr/x86_64-w64-mingw32/include/winnt.h:8710:1: TAPE_DRIVE_SET_REPORT_SMKS = 0x80000800 // /usr/x86_64-w64-mingw32/include/winnt.h:8711:1: TAPE_DRIVE_SPACE_IMMEDIATE = 0x80800000 // /usr/x86_64-w64-mingw32/include/winnt.h:8726:1: TAPE_DRIVE_TAPE_CAPACITY = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:8679:1: TAPE_DRIVE_TAPE_REMAINING = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:8680:1: TAPE_DRIVE_TENSION = 0x80000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8699:1: TAPE_DRIVE_TENSION_IMMED = 0x80000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8705:1: TAPE_DRIVE_VARIABLE_BLOCK = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:8682:1: TAPE_DRIVE_WRITE_FILEMARKS = 0x82000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8729:1: TAPE_DRIVE_WRITE_LONG_FMKS = 0x88000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8731:1: TAPE_DRIVE_WRITE_MARK_IMMED = 0x90000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8733:1: TAPE_DRIVE_WRITE_PROTECT = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:8683:1: TAPE_DRIVE_WRITE_SETMARKS = 0x81000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8728:1: TAPE_DRIVE_WRITE_SHORT_FMKS = 0x84000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8730:1: TAPE_ERASE_LONG = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8613:1: TAPE_ERASE_SHORT = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8612:1: TAPE_FILEMARKS = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8633:1: TAPE_FIXED_PARTITIONS = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8772:1: TAPE_FORMAT = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:8625:1: TAPE_INITIATOR_PARTITIONS = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8774:1: TAPE_LOAD = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8620:1: TAPE_LOCK = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8623:1: TAPE_LOGICAL_BLOCK = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8655:1: TAPE_LOGICAL_POSITION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8644:1: TAPE_LONG_FILEMARKS = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8635:1: TAPE_PSEUDO_LOGICAL_BLOCK = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8656:1: TAPE_PSEUDO_LOGICAL_POSITION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8645:1: TAPE_QUERY_DEVICE_ERROR_DATA = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8786:1: TAPE_QUERY_DRIVE_PARAMETERS = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8782:1: TAPE_QUERY_IO_ERROR_DATA = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:8785:1: TAPE_QUERY_MEDIA_CAPACITY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8783:1: TAPE_RESET_STATISTICS = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:290:1: TAPE_RETURN_ENV_INFO = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:289:1: TAPE_RETURN_STATISTICS = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:288:1: TAPE_REWIND = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8653:1: TAPE_SELECT_PARTITIONS = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8773:1: TAPE_SETMARKS = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8632:1: TAPE_SHORT_FILEMARKS = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8634:1: TAPE_SPACE_END_OF_DATA = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8657:1: TAPE_SPACE_FILEMARKS = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:8659:1: TAPE_SPACE_RELATIVE_BLOCKS = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:8658:1: TAPE_SPACE_SEQUENTIAL_FMKS = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:8660:1: TAPE_SPACE_SEQUENTIAL_SMKS = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:8662:1: TAPE_SPACE_SETMARKS = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8661:1: TAPE_TENSION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8622:1: TAPE_UNLOAD = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8621:1: TAPE_UNLOCK = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8624:1: TARGET_IS_NT351_OR_WIN95_OR_LATER = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:58:1: TARGET_IS_NT40_OR_LATER = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:57:1: TARGET_IS_NT50_OR_LATER = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:56:1: TARGET_IS_NT51_OR_LATER = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:55:1: TARGET_IS_NT60_OR_LATER = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:53:1: TARGET_IS_NT61_OR_LATER = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:48:1: TA_BASELINE = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:119:1: TA_BOTTOM = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:118:1: TA_CENTER = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:115:1: TA_LEFT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:113:1: TA_MASK = 287 // /usr/x86_64-w64-mingw32/include/wingdi.h:121:1: TA_NOUPDATECP = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:110:1: TA_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:114:1: TA_RTLREADING = 256 // /usr/x86_64-w64-mingw32/include/wingdi.h:120:1: TA_TOP = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:117:1: TA_UPDATECP = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:111:1: TCI_SRCCHARSET = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:711:1: TCI_SRCCODEPAGE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:712:1: TCI_SRCFONTSIG = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:713:1: TCI_SRCLOCALE = 0x1000 // /usr/x86_64-w64-mingw32/include/wingdi.h:714:1: TCP_BSDURGENT = 0x7000 // /usr/x86_64-w64-mingw32/include/winsock.h:198:1: TCP_NODELAY = 0x0001 // /usr/x86_64-w64-mingw32/include/winsock.h:197:1: TC_CP_STROKE = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:1605:1: TC_CR_90 = 0x00000008 // /usr/x86_64-w64-mingw32/include/wingdi.h:1606:1: TC_CR_ANY = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:1607:1: TC_EA_DOUBLE = 0x00000200 // /usr/x86_64-w64-mingw32/include/wingdi.h:1612:1: TC_GP_TRAP = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:2552:1: TC_HARDERR = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:2551:1: TC_IA_ABLE = 0x00000400 // /usr/x86_64-w64-mingw32/include/wingdi.h:1613:1: TC_NORMAL = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:2550:1: TC_OP_CHARACTER = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:1603:1: TC_OP_STROKE = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:1604:1: TC_RA_ABLE = 0x00002000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1616:1: TC_RESERVED = 0x00008000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1618:1: TC_SA_CONTIN = 0x00000100 // /usr/x86_64-w64-mingw32/include/wingdi.h:1611:1: TC_SA_DOUBLE = 0x00000040 // /usr/x86_64-w64-mingw32/include/wingdi.h:1609:1: TC_SA_INTEGER = 0x00000080 // /usr/x86_64-w64-mingw32/include/wingdi.h:1610:1: TC_SCROLLBLT = 0x00010000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1619:1: TC_SF_X_YINDEP = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:1608:1: TC_SIGNAL = 3 // /usr/x86_64-w64-mingw32/include/winbase.h:2553:1: TC_SO_ABLE = 0x00001000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1615:1: TC_UA_ABLE = 0x00000800 // /usr/x86_64-w64-mingw32/include/wingdi.h:1614:1: TC_VA_ABLE = 0x00004000 // /usr/x86_64-w64-mingw32/include/wingdi.h:1617:1: TECHNOLOGY = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1512:1: TERM_ANDINFO = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147165:1: TERM_CODED = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147162:1: TERM_COPIED = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147163:1: TERM_DYNAMIC = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147160:1: TERM_HEURTRUTH = 0x2000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147173:1: TERM_HIGHTRUTH = 0x4000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147175:1: TERM_IS = 0x0800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147171:1: TERM_LIKE = 0x0400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147170:1: TERM_LIKECOND = 0x0200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147169:1: TERM_LIKEOPT = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147168:1: TERM_OK = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147166:1: TERM_ORINFO = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147164:1: TERM_SLICE = 0x8000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147179:1: TERM_VARSELECT = 0x1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147172:1: TERM_VIRTUAL = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147161:1: TERM_VNULL = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147167:1: TEXTCAPS = 34 // /usr/x86_64-w64-mingw32/include/wingdi.h:1528:1: TF_Autoincrement = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17571:1: TF_DISCONNECT = 0x01 // /usr/x86_64-w64-mingw32/include/winsock.h:336:1: TF_Ephemeral = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17584:1: TF_Eponymous = 0x00008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17585:1: TF_HasGenerated = 0x00000060 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17575:1: TF_HasHidden = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17569:1: TF_HasNotNull = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17581:1: TF_HasPrimaryKey = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17570:1: TF_HasStat1 = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17572:1: TF_HasStat4 = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17583:1: TF_HasStored = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17574:1: TF_HasVirtual = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17573:1: TF_NoVisibleRowid = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17579:1: TF_OOOHidden = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17580:1: TF_REUSE_SOCKET = 0x02 // /usr/x86_64-w64-mingw32/include/winsock.h:337:1: TF_Readonly = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17568:1: TF_Shadow = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17582:1: TF_StatsUsed = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17577:1: TF_Strict = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17586:1: TF_WRITE_BEHIND = 0x04 // /usr/x86_64-w64-mingw32/include/winsock.h:338:1: TF_WithoutRowid = 0x00000080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17576:1: THAI_CHARSET = 222 // /usr/x86_64-w64-mingw32/include/wingdi.h:1171:1: THREAD_ALL_ACCESS = 2032639 // /usr/x86_64-w64-mingw32/include/winnt.h:4082:1: THREAD_BASE_PRIORITY_IDLE = -15 // /usr/x86_64-w64-mingw32/include/winnt.h:4169:1: THREAD_BASE_PRIORITY_LOWRT = 15 // /usr/x86_64-w64-mingw32/include/winnt.h:4166:1: THREAD_BASE_PRIORITY_MAX = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4167:1: THREAD_BASE_PRIORITY_MIN = -2 // /usr/x86_64-w64-mingw32/include/winnt.h:4168:1: THREAD_DIRECT_IMPERSONATION = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:4075:1: THREAD_GET_CONTEXT = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:4069:1: THREAD_IMPERSONATE = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:4074:1: THREAD_MODE_BACKGROUND_BEGIN = 0x00010000 // /usr/x86_64-w64-mingw32/include/winbase.h:420:1: THREAD_MODE_BACKGROUND_END = 0x00020000 // /usr/x86_64-w64-mingw32/include/winbase.h:421:1: THREAD_PRIORITY_ABOVE_NORMAL = 1 // /usr/x86_64-w64-mingw32/include/winbase.h:414:1: THREAD_PRIORITY_BELOW_NORMAL = -1 // /usr/x86_64-w64-mingw32/include/winbase.h:411:1: THREAD_PRIORITY_ERROR_RETURN = 2147483647 // /usr/x86_64-w64-mingw32/include/winbase.h:415:1: THREAD_PRIORITY_HIGHEST = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:413:1: THREAD_PRIORITY_IDLE = -15 // /usr/x86_64-w64-mingw32/include/winbase.h:418:1: THREAD_PRIORITY_LOWEST = -2 // /usr/x86_64-w64-mingw32/include/winbase.h:410:1: THREAD_PRIORITY_NORMAL = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:412:1: THREAD_PRIORITY_TIME_CRITICAL = 15 // /usr/x86_64-w64-mingw32/include/winbase.h:417:1: THREAD_PROFILING_FLAG_DISPATCH = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:4226:1: THREAD_QUERY_INFORMATION = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4072:1: THREAD_QUERY_LIMITED_INFORMATION = 2048 // /usr/x86_64-w64-mingw32/include/winnt.h:4077:1: THREAD_SET_CONTEXT = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:4070:1: THREAD_SET_INFORMATION = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:4071:1: THREAD_SET_LIMITED_INFORMATION = 1024 // /usr/x86_64-w64-mingw32/include/winnt.h:4076:1: THREAD_SET_THREAD_TOKEN = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:4073:1: THREAD_SUSPEND_RESUME = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4068:1: THREAD_TERMINATE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4067:1: TIMEOUT_ASYNC = 0xFFFFFFFF // /usr/x86_64-w64-mingw32/include/ddeml.h:133:1: TIMERR_BASE = 96 // /usr/x86_64-w64-mingw32/include/mmsystem.h:129:1: TIMERR_NOCANDO = 97 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1344:1: TIMERR_NOERROR = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1343:1: TIMERR_STRUCT = 129 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1345:1: TIMER_ABSTIME = 1 // /usr/x86_64-w64-mingw32/include/pthread_time.h:54:1: TIMER_ALL_ACCESS = 2031619 // /usr/x86_64-w64-mingw32/include/winnt.h:4599:1: TIMER_END = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20757:1: TIMER_MODIFY_STATE = 0x0002 // /usr/x86_64-w64-mingw32/include/winnt.h:4597:1: TIMER_QUERY_STATE = 0x0001 // /usr/x86_64-w64-mingw32/include/winnt.h:4596:1: TIMER_START = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20756:1: TIME_BYTES = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:62:1: TIME_CALLBACK_EVENT_PULSE = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1355:1: TIME_CALLBACK_EVENT_SET = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1354:1: TIME_CALLBACK_FUNCTION = 0x0000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1353:1: TIME_FORCE24HOURFORMAT = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnls.h:491:1: TIME_KILL_SYNCHRONOUS = 0x0100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1356:1: TIME_MIDI = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:64:1: TIME_MS = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:60:1: TIME_NOMINUTESORSECONDS = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnls.h:488:1: TIME_NOSECONDS = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnls.h:489:1: TIME_NOTIMEMARKER = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnls.h:490:1: TIME_ONESHOT = 0x0000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1350:1: TIME_PERIODIC = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1351:1: TIME_SAMPLES = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:61:1: TIME_SMPTE = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:63:1: TIME_TICKS = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:65:1: TIME_VALID_OID_FLUSH_OBJECT_FUNC = "TimeValidDllFlushObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5023:1: TIME_VALID_OID_GET_OBJECT_FUNC = "TimeValidDllGetObject" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5013:1: TIME_ZONE_ID_DAYLIGHT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4603:1: TIME_ZONE_ID_STANDARD = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4602:1: TIME_ZONE_ID_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4601:1: TKF_AVAILABLE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:5867:1: TKF_CONFIRMHOTKEY = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:5869:1: TKF_HOTKEYACTIVE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:5868:1: TKF_HOTKEYSOUND = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:5870:1: TKF_INDICATOR = 0x00000020 // /usr/x86_64-w64-mingw32/include/winuser.h:5871:1: TKF_TOGGLEKEYSON = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:5866:1: TK_ABORT = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13853:1: TK_ACTION = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13854:1: TK_ADD = 163 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13989:1: TK_AFTER = 29 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13855:1: TK_AGG_COLUMN = 169 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13995:1: TK_AGG_FUNCTION = 168 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13994:1: TK_ALL = 135 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13961:1: TK_ALTER = 162 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13988:1: TK_ALWAYS = 96 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13922:1: TK_ANALYZE = 30 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13856:1: TK_AND = 44 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13870:1: TK_ANY = 101 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13927:1: TK_AS = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13850:1: TK_ASC = 31 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13857:1: TK_ASTERISK = 180 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14006:1: TK_ATTACH = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13858:1: TK_AUTOINCR = 126 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13952:1: TK_BEFORE = 33 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13859:1: TK_BEGIN = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13831:1: TK_BETWEEN = 48 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13874:1: TK_BITAND = 102 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13928:1: TK_BITNOT = 114 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13940:1: TK_BITOR = 103 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13929:1: TK_BLOB = 154 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13980:1: TK_BY = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13860:1: TK_CASCADE = 35 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13861:1: TK_CASE = 157 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13983:1: TK_CAST = 36 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13862:1: TK_CHECK = 124 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13950:1: TK_COLLATE = 113 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13939:1: TK_COLUMN = 167 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13993:1: TK_COLUMNKW = 60 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13886:1: TK_COMMA = 25 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13851:1: TK_COMMIT = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13836:1: TK_CONCAT = 111 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13937:1: TK_CONFLICT = 37 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13863:1: TK_CONSTRAINT = 119 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13945:1: TK_CREATE = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13843:1: TK_CTIME_KW = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13926:1: TK_CURRENT = 85 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13911:1: TK_DATABASE = 38 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13864:1: TK_DEFAULT = 120 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13946:1: TK_DEFERRABLE = 131 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13957:1: TK_DEFERRED = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13833:1: TK_DELETE = 128 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13954:1: TK_DESC = 39 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13865:1: TK_DETACH = 40 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13866:1: TK_DISTINCT = 140 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13966:1: TK_DO = 61 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13887:1: TK_DOT = 141 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13967:1: TK_DROP = 133 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13959:1: TK_EACH = 41 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13867:1: TK_ELSE = 160 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13986:1: TK_END = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13837:1: TK_EQ = 53 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13879:1: TK_ERROR = 182 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14008:1: TK_ESCAPE = 58 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13884:1: TK_EXCEPT = 136 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13962:1: TK_EXCLUDE = 91 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13917:1: TK_EXCLUSIVE = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13835:1: TK_EXISTS = 20 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13846:1: TK_EXPLAIN = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13828:1: TK_FAIL = 42 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13868:1: TK_FILTER = 166 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13992:1: TK_FIRST = 83 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13909:1: TK_FLOAT = 153 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13979:1: TK_FOLLOWING = 86 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13912:1: TK_FOR = 62 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13888:1: TK_FOREIGN = 132 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13958:1: TK_FROM = 142 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13968:1: TK_FUNCTION = 172 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13998:1: TK_GE = 57 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13883:1: TK_GENERATED = 95 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13921:1: TK_GROUP = 146 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13972:1: TK_GROUPS = 92 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13918:1: TK_GT = 54 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13880:1: TK_HAVING = 147 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13973:1: TK_ID = 59 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13885:1: TK_IF = 18 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13844:1: TK_IF_NULL_ROW = 179 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14005:1: TK_IGNORE = 63 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13889:1: TK_ILLEGAL = 184 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14010:1: TK_IMMEDIATE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13834:1: TK_IN = 49 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13875:1: TK_INDEX = 161 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13987:1: TK_INDEXED = 116 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13942:1: TK_INITIALLY = 64 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13890:1: TK_INSERT = 127 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13953:1: TK_INSTEAD = 65 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13891:1: TK_INTEGER = 155 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13981:1: TK_INTERSECT = 137 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13963:1: TK_INTO = 151 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13977:1: TK_IS = 45 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13871:1: TK_ISNOT = 171 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13997:1: TK_ISNULL = 50 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13876:1: TK_JOIN = 143 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13969:1: TK_JOIN_KW = 118 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13944:1: TK_KEY = 67 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13893:1: TK_LAST = 84 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13910:1: TK_LE = 55 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13881:1: TK_LIKE_KW = 47 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13873:1: TK_LIMIT = 148 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13974:1: TK_LP = 22 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13848:1: TK_LSHIFT = 104 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13930:1: TK_LT = 56 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13882:1: TK_MATCH = 46 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13872:1: TK_MATERIALIZED = 97 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13923:1: TK_MINUS = 107 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13933:1: TK_NE = 52 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13878:1: TK_NO = 66 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13892:1: TK_NOT = 19 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13845:1: TK_NOTHING = 152 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13978:1: TK_NOTNULL = 51 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13877:1: TK_NULL = 121 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13947:1: TK_NULLS = 82 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13908:1: TK_OF = 68 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13894:1: TK_OFFSET = 69 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13895:1: TK_ON = 115 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13941:1: TK_OR = 43 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13869:1: TK_ORDER = 145 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13971:1: TK_OTHERS = 93 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13919:1: TK_OVER = 165 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13991:1: TK_PARTITION = 87 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13913:1: TK_PLAN = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13830:1: TK_PLUS = 106 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13932:1: TK_PRAGMA = 70 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13896:1: TK_PRECEDING = 88 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13914:1: TK_PRIMARY = 122 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13948:1: TK_PTR = 112 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13938:1: TK_QUERY = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13829:1: TK_RAISE = 71 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13897:1: TK_RANGE = 89 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13915:1: TK_RECURSIVE = 72 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13898:1: TK_REFERENCES = 125 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13951:1: TK_REGISTER = 176 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14002:1: TK_REINDEX = 98 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13924:1: TK_RELEASE = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13840:1: TK_REM = 110 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13936:1: TK_RENAME = 99 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13925:1: TK_REPLACE = 73 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13899:1: TK_RESTRICT = 74 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13900:1: TK_RETURNING = 150 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13976:1: TK_ROLLBACK = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13838:1: TK_ROW = 75 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13901:1: TK_ROWS = 76 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13902:1: TK_RP = 23 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13849:1: TK_RSHIFT = 105 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13931:1: TK_SAVEPOINT = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13839:1: TK_SELECT = 138 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13964:1: TK_SELECT_COLUMN = 178 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14004:1: TK_SEMI = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13827:1: TK_SET = 130 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13956:1: TK_SLASH = 109 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13935:1: TK_SPACE = 183 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14009:1: TK_SPAN = 181 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14007:1: TK_STAR = 108 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13934:1: TK_STRING = 117 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13943:1: TK_TABLE = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13842:1: TK_TEMP = 21 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13847:1: TK_THEN = 159 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13985:1: TK_TIES = 94 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13920:1: TK_TO = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13841:1: TK_TRANSACTION = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13832:1: TK_TRIGGER = 77 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13903:1: TK_TRUEFALSE = 170 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13996:1: TK_TRUTH = 175 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14001:1: TK_UMINUS = 173 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13999:1: TK_UNBOUNDED = 90 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13916:1: TK_UNION = 134 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13960:1: TK_UNIQUE = 123 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13949:1: TK_UPDATE = 129 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13955:1: TK_UPLUS = 174 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14000:1: TK_USING = 144 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13970:1: TK_VACUUM = 78 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13904:1: TK_VALUES = 139 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13965:1: TK_VARIABLE = 156 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13982:1: TK_VECTOR = 177 // testdata/sqlite-amalgamation-3380500/sqlite3.c:14003:1: TK_VIEW = 79 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13905:1: TK_VIRTUAL = 80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13906:1: TK_WHEN = 158 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13984:1: TK_WHERE = 149 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13975:1: TK_WINDOW = 164 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13990:1: TK_WITH = 81 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13907:1: TK_WITHOUT = 26 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13852:1: TLOSS = 5 // /usr/x86_64-w64-mingw32/include/math.h:33:1: TLS_MINIMUM_AVAILABLE = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:4099:1: TME_CANCEL = 0x80000000 // /usr/x86_64-w64-mingw32/include/winuser.h:1561:1: TME_HOVER = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:1557:1: TME_LEAVE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:1558:1: TME_NONCLIENT = 0x00000010 // /usr/x86_64-w64-mingw32/include/winuser.h:1559:1: TME_QUERY = 0x40000000 // /usr/x86_64-w64-mingw32/include/winuser.h:1560:1: TMPF_DEVICE = 0x08 // /usr/x86_64-w64-mingw32/include/wingdi.h:802:1: TMPF_FIXED_PITCH = 0x01 // /usr/x86_64-w64-mingw32/include/wingdi.h:800:1: TMPF_TRUETYPE = 0x04 // /usr/x86_64-w64-mingw32/include/wingdi.h:803:1: TMPF_VECTOR = 0x02 // /usr/x86_64-w64-mingw32/include/wingdi.h:801:1: TMP_MAX = 32767 // /usr/x86_64-w64-mingw32/include/stdio.h:64:1: TMP_MAX_S = 32767 // /usr/x86_64-w64-mingw32/include/sec_api/stdio_s.h:27:3: TOKEN_ADJUST_DEFAULT = 128 // /usr/x86_64-w64-mingw32/include/winnt.h:3708:1: TOKEN_ADJUST_GROUPS = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:3707:1: TOKEN_ADJUST_PRIVILEGES = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:3706:1: TOKEN_ADJUST_SESSIONID = 256 // /usr/x86_64-w64-mingw32/include/winnt.h:3709:1: TOKEN_ALL_ACCESS = 983551 // /usr/x86_64-w64-mingw32/include/winnt.h:3712:1: TOKEN_ALL_ACCESS_P = 983295 // /usr/x86_64-w64-mingw32/include/winnt.h:3711:1: TOKEN_ASSIGN_PRIMARY = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:3701:1: TOKEN_DUPLICATE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:3702:1: TOKEN_EXECUTE = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:3717:1: TOKEN_IMPERSONATE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:3703:1: TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:3839:1: TOKEN_MANDATORY_POLICY_NO_WRITE_UP = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:3838:1: TOKEN_MANDATORY_POLICY_OFF = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:3837:1: TOKEN_MANDATORY_POLICY_VALID_MASK = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:3841:1: TOKEN_QUERY = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3704:1: TOKEN_QUERY_SOURCE = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:3705:1: TOKEN_READ = 131080 // /usr/x86_64-w64-mingw32/include/winnt.h:3713:1: TOKEN_SOURCE_LENGTH = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:3867:1: TOKEN_WRITE = 131296 // /usr/x86_64-w64-mingw32/include/winnt.h:3715:1: TPM_BOTTOMALIGN = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:3391:1: TPM_CENTERALIGN = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:3387:1: TPM_HORIZONTAL = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3393:1: TPM_HORNEGANIMATION = 2048 // /usr/x86_64-w64-mingw32/include/winuser.h:3399:1: TPM_HORPOSANIMATION = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:3398:1: TPM_LAYOUTRTL = 32768 // /usr/x86_64-w64-mingw32/include/winuser.h:3403:1: TPM_LEFTALIGN = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3386:1: TPM_LEFTBUTTON = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3384:1: TPM_NOANIMATION = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:3402:1: TPM_NONOTIFY = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:3395:1: TPM_RECURSE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:3397:1: TPM_RETURNCMD = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:3396:1: TPM_RIGHTALIGN = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:3388:1: TPM_RIGHTBUTTON = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:3385:1: TPM_TOPALIGN = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:3389:1: TPM_VCENTERALIGN = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:3390:1: TPM_VERNEGANIMATION = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:3401:1: TPM_VERPOSANIMATION = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:3400:1: TPM_VERTICAL = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:3394:1: TRANSACTIONMANAGER_ALL_ACCESS = 983103 // /usr/x86_64-w64-mingw32/include/winnt.h:8957:1: TRANSACTIONMANAGER_BIND_TRANSACTION = 0x00020 // /usr/x86_64-w64-mingw32/include/winnt.h:8952:1: TRANSACTIONMANAGER_CREATE_RM = 0x00010 // /usr/x86_64-w64-mingw32/include/winnt.h:8951:1: TRANSACTIONMANAGER_GENERIC_EXECUTE = 131072 // /usr/x86_64-w64-mingw32/include/winnt.h:8956:1: TRANSACTIONMANAGER_GENERIC_READ = 131073 // /usr/x86_64-w64-mingw32/include/winnt.h:8954:1: TRANSACTIONMANAGER_GENERIC_WRITE = 131102 // /usr/x86_64-w64-mingw32/include/winnt.h:8955:1: TRANSACTIONMANAGER_QUERY_INFORMATION = 0x00001 // /usr/x86_64-w64-mingw32/include/winnt.h:8947:1: TRANSACTIONMANAGER_RECOVER = 0x00004 // /usr/x86_64-w64-mingw32/include/winnt.h:8949:1: TRANSACTIONMANAGER_RENAME = 0x00008 // /usr/x86_64-w64-mingw32/include/winnt.h:8950:1: TRANSACTIONMANAGER_SET_INFORMATION = 0x00002 // /usr/x86_64-w64-mingw32/include/winnt.h:8948:1: TRANSACTION_ALL_ACCESS = 2031679 // /usr/x86_64-w64-mingw32/include/winnt.h:8970:1: TRANSACTION_COMMIT = 8 // /usr/x86_64-w64-mingw32/include/winnt.h:8962:1: TRANSACTION_DO_NOT_PROMOTE = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:24:1: TRANSACTION_ENLIST = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:8961:1: TRANSACTION_GENERIC_EXECUTE = 1179672 // /usr/x86_64-w64-mingw32/include/winnt.h:8969:1: TRANSACTION_GENERIC_READ = 1179649 // /usr/x86_64-w64-mingw32/include/winnt.h:8967:1: TRANSACTION_GENERIC_WRITE = 1179710 // /usr/x86_64-w64-mingw32/include/winnt.h:8968:1: TRANSACTION_MANAGER_COMMIT_DEFAULT = 0x00000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:16:1: TRANSACTION_MANAGER_COMMIT_LOWEST = 0x00000008 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:19:1: TRANSACTION_MANAGER_COMMIT_SYSTEM_HIVES = 0x00000004 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:18:1: TRANSACTION_MANAGER_COMMIT_SYSTEM_VOLUME = 0x00000002 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:17:1: TRANSACTION_MANAGER_CORRUPT_FOR_PROGRESS = 0x00000020 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:21:1: TRANSACTION_MANAGER_CORRUPT_FOR_RECOVERY = 0x00000010 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:20:1: TRANSACTION_MANAGER_MAXIMUM_OPTION = 0x0000003f // /usr/x86_64-w64-mingw32/include/ktmtypes.h:22:1: TRANSACTION_MANAGER_VOLATILE = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:15:1: TRANSACTION_MAXIMUM_OPTION = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:25:1: TRANSACTION_NOTIFICATION_TM_ONLINE_FLAG_IS_CLUSTERED = 0x1 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:90:1: TRANSACTION_NOTIFY_COMMIT = 0x00000004 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:42:1: TRANSACTION_NOTIFY_COMMIT_COMPLETE = 0x00000040 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:46:1: TRANSACTION_NOTIFY_COMMIT_FINALIZE = 0x40000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:66:1: TRANSACTION_NOTIFY_COMMIT_REQUEST = 0x04000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:61:1: TRANSACTION_NOTIFY_DELEGATE_COMMIT = 0x00000400 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:50:1: TRANSACTION_NOTIFY_ENLIST_MASK = 0x00040000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:58:1: TRANSACTION_NOTIFY_ENLIST_PREPREPARE = 0x00001000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:52:1: TRANSACTION_NOTIFY_INDOUBT = 0x00004000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:54:1: TRANSACTION_NOTIFY_LAST_RECOVER = 0x00002000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:53:1: TRANSACTION_NOTIFY_MARSHAL = 0x00020000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:57:1: TRANSACTION_NOTIFY_MASK = 0x3fffffff // /usr/x86_64-w64-mingw32/include/ktmtypes.h:39:1: TRANSACTION_NOTIFY_PREPARE = 0x00000002 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:41:1: TRANSACTION_NOTIFY_PREPARE_COMPLETE = 0x00000020 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:45:1: TRANSACTION_NOTIFY_PREPREPARE = 0x00000001 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:40:1: TRANSACTION_NOTIFY_PREPREPARE_COMPLETE = 0x00000010 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:44:1: TRANSACTION_NOTIFY_PROMOTE = 0x08000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:62:1: TRANSACTION_NOTIFY_PROMOTE_NEW = 0x10000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:63:1: TRANSACTION_NOTIFY_PROPAGATE_PULL = 0x00008000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:55:1: TRANSACTION_NOTIFY_PROPAGATE_PUSH = 0x00010000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:56:1: TRANSACTION_NOTIFY_RECOVER = 0x00000100 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:48:1: TRANSACTION_NOTIFY_RECOVER_QUERY = 0x00000800 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:51:1: TRANSACTION_NOTIFY_REQUEST_OUTCOME = 0x20000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:64:1: TRANSACTION_NOTIFY_RM_DISCONNECTED = 0x01000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:59:1: TRANSACTION_NOTIFY_ROLLBACK = 0x00000008 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:43:1: TRANSACTION_NOTIFY_ROLLBACK_COMPLETE = 0x00000080 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:47:1: TRANSACTION_NOTIFY_SINGLE_PHASE_COMMIT = 0x00000200 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:49:1: TRANSACTION_NOTIFY_TM_ONLINE = 0x02000000 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:60:1: TRANSACTION_PROPAGATE = 32 // /usr/x86_64-w64-mingw32/include/winnt.h:8964:1: TRANSACTION_QUERY_INFORMATION = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8959:1: TRANSACTION_RESOURCE_MANAGER_RIGHTS = 1179703 // /usr/x86_64-w64-mingw32/include/winnt.h:8971:1: TRANSACTION_RIGHT_RESERVED1 = 64 // /usr/x86_64-w64-mingw32/include/winnt.h:8965:1: TRANSACTION_ROLLBACK = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:8963:1: TRANSACTION_SET_INFORMATION = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8960:1: TRANSFORM_CTM = 4107 // /usr/x86_64-w64-mingw32/include/wingdi.h:304:1: TRANSPARENT = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:1409:1: TRANSPORT_TYPE_CN = 0x01 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:168:1: TRANSPORT_TYPE_DG = 0x02 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:169:1: TRANSPORT_TYPE_LPC = 0x04 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:170:1: TRANSPORT_TYPE_WMSG = 0x08 // /usr/x86_64-w64-mingw32/include/rpcdcep.h:171:1: TRANS_NONE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65505:1: TRANS_READ = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65506:1: TRANS_WRITE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65507:1: TRIGGER_AFTER = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19017:1: TRIGGER_BEFORE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19016:1: TRUE = 1 // /usr/x86_64-w64-mingw32/include/minwindef.h:52:1: TRUETYPE_FONTTYPE = 0x004 // /usr/x86_64-w64-mingw32/include/wingdi.h:1395:1: TRUNCATE_EXISTING = 5 // /usr/x86_64-w64-mingw32/include/fileapi.h:22:1: TRY_AGAIN = 11002 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:178:1: TT_AVAILABLE = 0x0001 // /usr/x86_64-w64-mingw32/include/wingdi.h:2689:1: TT_ENABLED = 0x0002 // /usr/x86_64-w64-mingw32/include/wingdi.h:2690:1: TT_OPENTYPE_FONTTYPE = 0x20000 // /usr/x86_64-w64-mingw32/include/commdlg.h:476:1: TT_POLYGON_TYPE = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:2591:1: TT_PRIM_CSPLINE = 3 // /usr/x86_64-w64-mingw32/include/wingdi.h:2595:1: TT_PRIM_LINE = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:2593:1: TT_PRIM_QSPLINE = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:2594:1: TURKISH_CHARSET = 162 // /usr/x86_64-w64-mingw32/include/wingdi.h:1169:1: TWOSTOPBITS = 2 // /usr/x86_64-w64-mingw32/include/winbase.h:477:1: TYPE1_FONTTYPE = 0x40000 // /usr/x86_64-w64-mingw32/include/commdlg.h:477:1: UAS_EXACTLEGACY = 0x1000 // /usr/x86_64-w64-mingw32/include/urlmon.h:675:1: UCHAR_MAX = 255 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:82:1: UCLEANUI = 67108864 // /usr/x86_64-w64-mingw32/include/reason.h:60:1: UDIRTYUI = 134217728 // /usr/x86_64-w64-mingw32/include/reason.h:62:1: UINT_MAX = 4294967295 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:124:1: UISF_ACTIVE = 0x4 // /usr/x86_64-w64-mingw32/include/winuser.h:1225:1: UISF_HIDEACCEL = 0x2 // /usr/x86_64-w64-mingw32/include/winuser.h:1224:1: UISF_HIDEFOCUS = 0x1 // /usr/x86_64-w64-mingw32/include/winuser.h:1223:1: UIS_CLEAR = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1220:1: UIS_INITIALIZE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1221:1: UIS_SET = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1219:1: UI_CAP_2700 = 0x00000001 // /usr/x86_64-w64-mingw32/include/imm.h:320:1: UI_CAP_ROT90 = 0x00000002 // /usr/x86_64-w64-mingw32/include/imm.h:321:1: UI_CAP_ROTANY = 0x00000004 // /usr/x86_64-w64-mingw32/include/imm.h:322:1: ULLONG_MAX = 18446744073709551615 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:146:1: ULONG_LONG_MAX = 18446744073709551615 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:158:1: ULONG_MAX = 4294967295 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:135:1: ULW_ALPHA = 0x00000002 // /usr/x86_64-w64-mingw32/include/winuser.h:2254:1: ULW_COLORKEY = 0x00000001 // /usr/x86_64-w64-mingw32/include/winuser.h:2253:1: ULW_EX_NORESIZE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winuser.h:2256:1: ULW_OPAQUE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winuser.h:2255:1: UNALIGNED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:106:1: UNALIGNED64 = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:108:1: UNDEFINE_ALTERNATE = 0xD // /usr/x86_64-w64-mingw32/include/winioctl.h:1229:1: UNDEFINE_PRIMARY = 0xC // /usr/x86_64-w64-mingw32/include/winioctl.h:1228:1: UNDERFLOW = 4 // /usr/x86_64-w64-mingw32/include/math.h:32:1: UNICODE_NOCHAR = 0xFFFF // /usr/x86_64-w64-mingw32/include/winuser.h:1186:1: UNICODE_STRING_MAX_CHARS = 32767 // /usr/x86_64-w64-mingw32/include/winnt.h:601:1: UNIQUE_NAME = 0x00 // /usr/x86_64-w64-mingw32/include/nb30.h:78:1: UNIVERSAL_NAME_INFO_LEVEL = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:201:1: UNKNOWN_LOCK = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53624:1: UNLOAD_DLL_DEBUG_EVENT = 7 // /usr/x86_64-w64-mingw32/include/minwinbase.h:230:1: UNLOCK_ELEMENT = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1110:1: UNPROTECTED_DACL_SECURITY_INFORMATION = 536870912 // /usr/x86_64-w64-mingw32/include/winnt.h:4021:1: UNPROTECTED_SACL_SECURITY_INFORMATION = 268435456 // /usr/x86_64-w64-mingw32/include/winnt.h:4022:1: UNRECOVERED_READS_VALID = 0x00000008 // /usr/x86_64-w64-mingw32/include/winioctl.h:280:1: UNRECOVERED_WRITES_VALID = 0x00000002 // /usr/x86_64-w64-mingw32/include/winioctl.h:278:1: UNWIND_HISTORY_TABLE_GLOBAL = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:2828:1: UNWIND_HISTORY_TABLE_LOCAL = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:2829:1: UNWIND_HISTORY_TABLE_NONE = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2827:1: UNWIND_HISTORY_TABLE_SIZE = 12 // /usr/x86_64-w64-mingw32/include/winnt.h:2820:1: UNW_FLAG_CHAININFO = 0x4 // /usr/x86_64-w64-mingw32/include/winnt.h:1788:1: UNW_FLAG_EHANDLER = 0x1 // /usr/x86_64-w64-mingw32/include/winnt.h:1786:1: UNW_FLAG_NHANDLER = 0x0 // /usr/x86_64-w64-mingw32/include/winnt.h:1785:1: UNW_FLAG_UHANDLER = 0x2 // /usr/x86_64-w64-mingw32/include/winnt.h:1787:1: UOI_FLAGS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:855:1: UOI_NAME = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:856:1: UOI_TIMERPROC_EXCEPTION_SUPPRESSION = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:863:1: UOI_TYPE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:857:1: UOI_USER_SID = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:858:1: UPDFCACHE_IFBLANK = 16 // /usr/x86_64-w64-mingw32/include/oleidl.h:524:1: UPDFCACHE_IFBLANKORONSAVECACHE = 18 // /usr/x86_64-w64-mingw32/include/oleidl.h:528:1: UPDFCACHE_NODATACACHE = 1 // /usr/x86_64-w64-mingw32/include/oleidl.h:516:1: UPDFCACHE_NORMALCACHE = 8 // /usr/x86_64-w64-mingw32/include/oleidl.h:522:1: UPDFCACHE_ONLYIFBLANK = 2147483648 // /usr/x86_64-w64-mingw32/include/oleidl.h:526:1: UPDFCACHE_ONSAVECACHE = 2 // /usr/x86_64-w64-mingw32/include/oleidl.h:518:1: UPDFCACHE_ONSTOPCACHE = 4 // /usr/x86_64-w64-mingw32/include/oleidl.h:520:1: UPOINTER_32 = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:23:1: URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY = 0x1204 // /usr/x86_64-w64-mingw32/include/urlmon.h:7583:1: URLACTION_ACTIVEX_CURR_MAX = 0x120B // /usr/x86_64-w64-mingw32/include/urlmon.h:7591:1: URLACTION_ACTIVEX_DYNSRC_VIDEO_AND_ANIMATION = 0x120A // /usr/x86_64-w64-mingw32/include/urlmon.h:7589:1: URLACTION_ACTIVEX_MAX = 0x13ff // /usr/x86_64-w64-mingw32/include/urlmon.h:7592:1: URLACTION_ACTIVEX_MIN = 0x1200 // /usr/x86_64-w64-mingw32/include/urlmon.h:7576:1: URLACTION_ACTIVEX_NO_WEBOC_SCRIPT = 0x1206 // /usr/x86_64-w64-mingw32/include/urlmon.h:7585:1: URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY = 0x1202 // /usr/x86_64-w64-mingw32/include/urlmon.h:7580:1: URLACTION_ACTIVEX_OVERRIDE_DOMAINLIST = 0x120B // /usr/x86_64-w64-mingw32/include/urlmon.h:7590:1: URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY = 0x1201 // /usr/x86_64-w64-mingw32/include/urlmon.h:7579:1: URLACTION_ACTIVEX_OVERRIDE_OPTIN = 0x1208 // /usr/x86_64-w64-mingw32/include/urlmon.h:7587:1: URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION = 0x1207 // /usr/x86_64-w64-mingw32/include/urlmon.h:7586:1: URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY = 0x1203 // /usr/x86_64-w64-mingw32/include/urlmon.h:7581:1: URLACTION_ACTIVEX_RUN = 0x1200 // /usr/x86_64-w64-mingw32/include/urlmon.h:7577:1: URLACTION_ACTIVEX_SCRIPTLET_RUN = 0x1209 // /usr/x86_64-w64-mingw32/include/urlmon.h:7588:1: URLACTION_ACTIVEX_TREATASUNTRUSTED = 0x1205 // /usr/x86_64-w64-mingw32/include/urlmon.h:7584:1: URLACTION_ALLOW_ACTIVEX_FILTERING = 0x2702 // /usr/x86_64-w64-mingw32/include/urlmon.h:7743:1: URLACTION_ALLOW_AUDIO_VIDEO = 0x2701 // /usr/x86_64-w64-mingw32/include/urlmon.h:7742:1: URLACTION_ALLOW_AUDIO_VIDEO_PLUGINS = 0x2704 // /usr/x86_64-w64-mingw32/include/urlmon.h:7745:1: URLACTION_ALLOW_CROSSDOMAIN_APPCACHE_MANIFEST = 0x270A // /usr/x86_64-w64-mingw32/include/urlmon.h:7750:1: URLACTION_ALLOW_CROSSDOMAIN_DROP_ACROSS_WINDOWS = 0x2709 // /usr/x86_64-w64-mingw32/include/urlmon.h:7749:1: URLACTION_ALLOW_CROSSDOMAIN_DROP_WITHIN_WINDOW = 0x2708 // /usr/x86_64-w64-mingw32/include/urlmon.h:7748:1: URLACTION_ALLOW_RENDER_LEGACY_DXTFILTERS = 0x270B // /usr/x86_64-w64-mingw32/include/urlmon.h:7751:1: URLACTION_ALLOW_STRUCTURED_STORAGE_SNIFFING = 0x2703 // /usr/x86_64-w64-mingw32/include/urlmon.h:7744:1: URLACTION_ALLOW_XDOMAIN_SUBFRAME_RESIZE = 0x1408 // /usr/x86_64-w64-mingw32/include/urlmon.h:7600:1: URLACTION_ALLOW_ZONE_ELEVATION_OPT_OUT_ADDITION = 0x2706 // /usr/x86_64-w64-mingw32/include/urlmon.h:7747:1: URLACTION_ALLOW_ZONE_ELEVATION_VIA_OPT_OUT = 0x2705 // /usr/x86_64-w64-mingw32/include/urlmon.h:7746:1: URLACTION_AUTHENTICATE_CLIENT = 0x1A01 // /usr/x86_64-w64-mingw32/include/urlmon.h:7663:1: URLACTION_CHANNEL_SOFTDIST_MAX = 0x1Eff // /usr/x86_64-w64-mingw32/include/urlmon.h:7706:1: URLACTION_CHANNEL_SOFTDIST_MIN = 0x1E00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7701:1: URLACTION_CHANNEL_SOFTDIST_PERMISSIONS = 0x1E05 // /usr/x86_64-w64-mingw32/include/urlmon.h:7702:1: URLACTION_CLIENT_CERT_PROMPT = 0x1A04 // /usr/x86_64-w64-mingw32/include/urlmon.h:7671:1: URLACTION_COOKIES = 0x1A02 // /usr/x86_64-w64-mingw32/include/urlmon.h:7668:1: URLACTION_COOKIES_ENABLED = 0x1A10 // /usr/x86_64-w64-mingw32/include/urlmon.h:7676:1: URLACTION_COOKIES_SESSION = 0x1A03 // /usr/x86_64-w64-mingw32/include/urlmon.h:7669:1: URLACTION_COOKIES_SESSION_THIRD_PARTY = 0x1A06 // /usr/x86_64-w64-mingw32/include/urlmon.h:7674:1: URLACTION_COOKIES_THIRD_PARTY = 0x1A05 // /usr/x86_64-w64-mingw32/include/urlmon.h:7673:1: URLACTION_CREDENTIALS_USE = 0x1A00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7657:1: URLACTION_CROSS_DOMAIN_DATA = 0x1406 // /usr/x86_64-w64-mingw32/include/urlmon.h:7598:1: URLACTION_DOWNLOAD_CURR_MAX = 0x1004 // /usr/x86_64-w64-mingw32/include/urlmon.h:7573:1: URLACTION_DOWNLOAD_MAX = 0x11FF // /usr/x86_64-w64-mingw32/include/urlmon.h:7574:1: URLACTION_DOWNLOAD_MIN = 0x1000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7570:1: URLACTION_DOWNLOAD_SIGNED_ACTIVEX = 0x1001 // /usr/x86_64-w64-mingw32/include/urlmon.h:7571:1: URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX = 0x1004 // /usr/x86_64-w64-mingw32/include/urlmon.h:7572:1: URLACTION_HTML_ALLOW_CROSS_DOMAIN_CANVAS = 0x160D // /usr/x86_64-w64-mingw32/include/urlmon.h:7620:1: URLACTION_HTML_ALLOW_CROSS_DOMAIN_TEXTTRACK = 0x1610 // /usr/x86_64-w64-mingw32/include/urlmon.h:7623:1: URLACTION_HTML_ALLOW_CROSS_DOMAIN_WEBWORKER = 0x160F // /usr/x86_64-w64-mingw32/include/urlmon.h:7622:1: URLACTION_HTML_ALLOW_INDEXEDDB = 0x1611 // /usr/x86_64-w64-mingw32/include/urlmon.h:7624:1: URLACTION_HTML_ALLOW_INJECTED_DYNAMIC_HTML = 0x160B // /usr/x86_64-w64-mingw32/include/urlmon.h:7618:1: URLACTION_HTML_ALLOW_WINDOW_CLOSE = 0x160E // /usr/x86_64-w64-mingw32/include/urlmon.h:7621:1: URLACTION_HTML_FONT_DOWNLOAD = 0x1604 // /usr/x86_64-w64-mingw32/include/urlmon.h:7611:1: URLACTION_HTML_INCLUDE_FILE_PATH = 0x160A // /usr/x86_64-w64-mingw32/include/urlmon.h:7617:1: URLACTION_HTML_JAVA_RUN = 0x1605 // /usr/x86_64-w64-mingw32/include/urlmon.h:7612:1: URLACTION_HTML_MAX = 0x17ff // /usr/x86_64-w64-mingw32/include/urlmon.h:7626:1: URLACTION_HTML_META_REFRESH = 0x1608 // /usr/x86_64-w64-mingw32/include/urlmon.h:7615:1: URLACTION_HTML_MIN = 0x1600 // /usr/x86_64-w64-mingw32/include/urlmon.h:7607:1: URLACTION_HTML_MIXED_CONTENT = 0x1609 // /usr/x86_64-w64-mingw32/include/urlmon.h:7616:1: URLACTION_HTML_REQUIRE_UTF8_DOCUMENT_CODEPAGE = 0x160C // /usr/x86_64-w64-mingw32/include/urlmon.h:7619:1: URLACTION_HTML_SUBFRAME_NAVIGATE = 0x1607 // /usr/x86_64-w64-mingw32/include/urlmon.h:7614:1: URLACTION_HTML_SUBMIT_FORMS = 0x1601 // /usr/x86_64-w64-mingw32/include/urlmon.h:7608:1: URLACTION_HTML_SUBMIT_FORMS_FROM = 0x1602 // /usr/x86_64-w64-mingw32/include/urlmon.h:7609:1: URLACTION_HTML_SUBMIT_FORMS_TO = 0x1603 // /usr/x86_64-w64-mingw32/include/urlmon.h:7610:1: URLACTION_HTML_USERDATA_SAVE = 0x1606 // /usr/x86_64-w64-mingw32/include/urlmon.h:7613:1: URLACTION_INFODELIVERY_CURR_MAX = 0x1D06 // /usr/x86_64-w64-mingw32/include/urlmon.h:7699:1: URLACTION_INFODELIVERY_MAX = 0x1Dff // /usr/x86_64-w64-mingw32/include/urlmon.h:7700:1: URLACTION_INFODELIVERY_MIN = 0x1D00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7691:1: URLACTION_INFODELIVERY_NO_ADDING_CHANNELS = 0x1D00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7692:1: URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS = 0x1D03 // /usr/x86_64-w64-mingw32/include/urlmon.h:7695:1: URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING = 0x1D06 // /usr/x86_64-w64-mingw32/include/urlmon.h:7698:1: URLACTION_INFODELIVERY_NO_EDITING_CHANNELS = 0x1D01 // /usr/x86_64-w64-mingw32/include/urlmon.h:7693:1: URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS = 0x1D04 // /usr/x86_64-w64-mingw32/include/urlmon.h:7696:1: URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS = 0x1D02 // /usr/x86_64-w64-mingw32/include/urlmon.h:7694:1: URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS = 0x1D05 // /usr/x86_64-w64-mingw32/include/urlmon.h:7697:1: URLACTION_JAVA_CURR_MAX = 0x1C00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7688:1: URLACTION_JAVA_MAX = 0x1Cff // /usr/x86_64-w64-mingw32/include/urlmon.h:7689:1: URLACTION_JAVA_MIN = 0x1C00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7681:1: URLACTION_JAVA_PERMISSIONS = 0x1C00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7682:1: URLACTION_MIN = 0x1000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7568:1: URLACTION_NETWORK_CURR_MAX = 0x1A10 // /usr/x86_64-w64-mingw32/include/urlmon.h:7678:1: URLACTION_NETWORK_MAX = 0x1Bff // /usr/x86_64-w64-mingw32/include/urlmon.h:7679:1: URLACTION_NETWORK_MIN = 0x1A00 // /usr/x86_64-w64-mingw32/include/urlmon.h:7655:1: URLACTION_PLUGGABLE_PROTOCOL_XHR = 0x140B // /usr/x86_64-w64-mingw32/include/urlmon.h:7603:1: URLACTION_SCRIPT_CURR_MAX = 0x140B // /usr/x86_64-w64-mingw32/include/urlmon.h:7604:1: URLACTION_SCRIPT_JAVA_USE = 0x1402 // /usr/x86_64-w64-mingw32/include/urlmon.h:7596:1: URLACTION_SCRIPT_MAX = 0x15ff // /usr/x86_64-w64-mingw32/include/urlmon.h:7605:1: URLACTION_SCRIPT_MIN = 0x1400 // /usr/x86_64-w64-mingw32/include/urlmon.h:7594:1: URLACTION_SCRIPT_NAVIGATE = 0x140A // /usr/x86_64-w64-mingw32/include/urlmon.h:7602:1: URLACTION_SCRIPT_OVERRIDE_SAFETY = 0x1401 // /usr/x86_64-w64-mingw32/include/urlmon.h:7582:1: URLACTION_SCRIPT_PASTE = 0x1407 // /usr/x86_64-w64-mingw32/include/urlmon.h:7599:1: URLACTION_SCRIPT_RUN = 0x1400 // /usr/x86_64-w64-mingw32/include/urlmon.h:7595:1: URLACTION_SCRIPT_SAFE_ACTIVEX = 0x1405 // /usr/x86_64-w64-mingw32/include/urlmon.h:7597:1: URLACTION_SCRIPT_XSSFILTER = 0x1409 // /usr/x86_64-w64-mingw32/include/urlmon.h:7601:1: URLACTION_SHELL_CURR_MAX = 0x1811 // /usr/x86_64-w64-mingw32/include/urlmon.h:7652:1: URLACTION_SHELL_FILE_DOWNLOAD = 0x1803 // /usr/x86_64-w64-mingw32/include/urlmon.h:7631:1: URLACTION_SHELL_INSTALL_DTITEMS = 0x1800 // /usr/x86_64-w64-mingw32/include/urlmon.h:7629:1: URLACTION_SHELL_MAX = 0x19ff // /usr/x86_64-w64-mingw32/include/urlmon.h:7653:1: URLACTION_SHELL_MIN = 0x1800 // /usr/x86_64-w64-mingw32/include/urlmon.h:7628:1: URLACTION_SHELL_MOVE_OR_COPY = 0x1802 // /usr/x86_64-w64-mingw32/include/urlmon.h:7630:1: URLACTION_SHELL_SHELLEXECUTE = 0x1806 // /usr/x86_64-w64-mingw32/include/urlmon.h:7634:1: URLACTION_SHELL_VERB = 0x1804 // /usr/x86_64-w64-mingw32/include/urlmon.h:7632:1: URLACTION_SHELL_WEBVIEW_VERB = 0x1805 // /usr/x86_64-w64-mingw32/include/urlmon.h:7633:1: URLMON_OPTION_URL_ENCODING = 0x10000004 // /usr/x86_64-w64-mingw32/include/urlmon.h:683:1: URLMON_OPTION_USERAGENT = 0x10000001 // /usr/x86_64-w64-mingw32/include/urlmon.h:681:1: URLMON_OPTION_USERAGENT_REFRESH = 0x10000002 // /usr/x86_64-w64-mingw32/include/urlmon.h:682:1: URLOSTRM_GETNEWESTVERSION = 0x3 // /usr/x86_64-w64-mingw32/include/urlmon.h:4585:1: URLOSTRM_USECACHEDCOPY = 0x2 // /usr/x86_64-w64-mingw32/include/urlmon.h:4584:1: URLOSTRM_USECACHEDCOPY_ONLY = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:4583:1: URLPOLICY_ACTIVEX_CHECK_LIST = 0x10000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7578:1: URLPOLICY_ALLOW = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7753:1: URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE = 0x10000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7665:1: URLPOLICY_AUTHENTICATE_CLEARTEXT_OK = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7664:1: URLPOLICY_AUTHENTICATE_MUTUAL_ONLY = 0x30000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7666:1: URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL = 0x30000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7705:1: URLPOLICY_CHANNEL_SOFTDIST_PRECACHE = 0x20000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7704:1: URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT = 0x10000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7703:1: URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY = 0x30000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7661:1: URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT = 0x20000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7660:1: URLPOLICY_CREDENTIALS_MUST_PROMPT_USER = 0x10000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7659:1: URLPOLICY_CREDENTIALS_SILENT_LOGON_OK = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7658:1: URLPOLICY_DISALLOW = 0x3 // /usr/x86_64-w64-mingw32/include/urlmon.h:7755:1: URLPOLICY_DONTCHECKDLGBOX = 0x100 // /usr/x86_64-w64-mingw32/include/urlmon.h:7765:1: URLPOLICY_JAVA_CUSTOM = 0x800000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7687:1: URLPOLICY_JAVA_HIGH = 0x10000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7684:1: URLPOLICY_JAVA_LOW = 0x30000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7686:1: URLPOLICY_JAVA_MEDIUM = 0x20000 // /usr/x86_64-w64-mingw32/include/urlmon.h:7685:1: URLPOLICY_JAVA_PROHIBIT = 0x0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7683:1: URLPOLICY_LOG_ON_ALLOW = 0x40 // /usr/x86_64-w64-mingw32/include/urlmon.h:7758:1: URLPOLICY_LOG_ON_DISALLOW = 0x80 // /usr/x86_64-w64-mingw32/include/urlmon.h:7759:1: URLPOLICY_MASK_PERMISSIONS = 0x0f // /usr/x86_64-w64-mingw32/include/urlmon.h:7761:1: URLPOLICY_NOTIFY_ON_ALLOW = 0x10 // /usr/x86_64-w64-mingw32/include/urlmon.h:7756:1: URLPOLICY_NOTIFY_ON_DISALLOW = 0x20 // /usr/x86_64-w64-mingw32/include/urlmon.h:7757:1: URLPOLICY_QUERY = 0x1 // /usr/x86_64-w64-mingw32/include/urlmon.h:7754:1: URLZONE_ESC_FLAG = 0x100 // /usr/x86_64-w64-mingw32/include/urlmon.h:7795:1: URL_MK_LEGACY = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:626:1: URL_MK_NO_CANONICALIZE = 2 // /usr/x86_64-w64-mingw32/include/urlmon.h:628:1: URL_MK_UNIFORM = 1 // /usr/x86_64-w64-mingw32/include/urlmon.h:627:1: URL_OID_GET_OBJECT_URL_FUNC = "UrlDllGetObjectUrl" // /usr/x86_64-w64-mingw32/include/wincrypt.h:4978:1: USAGE_MATCH_TYPE_AND = 0x0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5388:1: USAGE_MATCH_TYPE_OR = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:5389:1: USER_CALL_IS_ASYNC = 0x0100 // /usr/x86_64-w64-mingw32/include/rpcndr.h:378:1: USER_CALL_NEW_CORRELATION_DESC = 0x0200 // /usr/x86_64-w64-mingw32/include/rpcndr.h:379:1: USER_MARSHAL_CB_SIGNATURE = 85 // /usr/x86_64-w64-mingw32/include/rpcndr.h:358:1: USER_MARSHAL_FC_BYTE = 1 // /usr/x86_64-w64-mingw32/include/rpcndr.h:637:1: USER_MARSHAL_FC_CHAR = 2 // /usr/x86_64-w64-mingw32/include/rpcndr.h:638:1: USER_MARSHAL_FC_DOUBLE = 12 // /usr/x86_64-w64-mingw32/include/rpcndr.h:648:1: USER_MARSHAL_FC_FLOAT = 10 // /usr/x86_64-w64-mingw32/include/rpcndr.h:646:1: USER_MARSHAL_FC_HYPER = 11 // /usr/x86_64-w64-mingw32/include/rpcndr.h:647:1: USER_MARSHAL_FC_LONG = 8 // /usr/x86_64-w64-mingw32/include/rpcndr.h:644:1: USER_MARSHAL_FC_SHORT = 6 // /usr/x86_64-w64-mingw32/include/rpcndr.h:642:1: USER_MARSHAL_FC_SMALL = 3 // /usr/x86_64-w64-mingw32/include/rpcndr.h:639:1: USER_MARSHAL_FC_ULONG = 9 // /usr/x86_64-w64-mingw32/include/rpcndr.h:645:1: USER_MARSHAL_FC_USHORT = 7 // /usr/x86_64-w64-mingw32/include/rpcndr.h:643:1: USER_MARSHAL_FC_USMALL = 4 // /usr/x86_64-w64-mingw32/include/rpcndr.h:640:1: USER_MARSHAL_FC_WCHAR = 5 // /usr/x86_64-w64-mingw32/include/rpcndr.h:641:1: USER_TIMER_MAXIMUM = 0x7FFFFFFF // /usr/x86_64-w64-mingw32/include/winuser.h:3025:1: USER_TIMER_MINIMUM = 0x0000000A // /usr/x86_64-w64-mingw32/include/winuser.h:3026:1: USE___UUIDOF = 1 // /usr/x86_64-w64-mingw32/include/_mingw.h:75:1: USHRT_MAX = 65535 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:113:1: USN_DELETE_FLAG_DELETE = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1505:1: USN_DELETE_FLAG_NOTIFY = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1506:1: USN_DELETE_VALID_FLAGS = 3 // /usr/x86_64-w64-mingw32/include/winioctl.h:1508:1: USN_PAGE_SIZE = 4096 // /usr/x86_64-w64-mingw32/include/winioctl.h:1465:1: USN_REASON_BASIC_INFO_CHANGE = 32768 // /usr/x86_64-w64-mingw32/include/winioctl.h:1480:1: USN_REASON_CLOSE = 2147483648 // /usr/x86_64-w64-mingw32/include/winioctl.h:1488:1: USN_REASON_COMPRESSION_CHANGE = 131072 // /usr/x86_64-w64-mingw32/include/winioctl.h:1482:1: USN_REASON_DATA_EXTEND = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1468:1: USN_REASON_DATA_OVERWRITE = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1467:1: USN_REASON_DATA_TRUNCATION = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:1469:1: USN_REASON_EA_CHANGE = 1024 // /usr/x86_64-w64-mingw32/include/winioctl.h:1475:1: USN_REASON_ENCRYPTION_CHANGE = 262144 // /usr/x86_64-w64-mingw32/include/winioctl.h:1483:1: USN_REASON_FILE_CREATE = 256 // /usr/x86_64-w64-mingw32/include/winioctl.h:1473:1: USN_REASON_FILE_DELETE = 512 // /usr/x86_64-w64-mingw32/include/winioctl.h:1474:1: USN_REASON_HARD_LINK_CHANGE = 65536 // /usr/x86_64-w64-mingw32/include/winioctl.h:1481:1: USN_REASON_INDEXABLE_CHANGE = 16384 // /usr/x86_64-w64-mingw32/include/winioctl.h:1479:1: USN_REASON_NAMED_DATA_EXTEND = 32 // /usr/x86_64-w64-mingw32/include/winioctl.h:1471:1: USN_REASON_NAMED_DATA_OVERWRITE = 16 // /usr/x86_64-w64-mingw32/include/winioctl.h:1470:1: USN_REASON_NAMED_DATA_TRUNCATION = 64 // /usr/x86_64-w64-mingw32/include/winioctl.h:1472:1: USN_REASON_OBJECT_ID_CHANGE = 524288 // /usr/x86_64-w64-mingw32/include/winioctl.h:1484:1: USN_REASON_RENAME_NEW_NAME = 8192 // /usr/x86_64-w64-mingw32/include/winioctl.h:1478:1: USN_REASON_RENAME_OLD_NAME = 4096 // /usr/x86_64-w64-mingw32/include/winioctl.h:1477:1: USN_REASON_REPARSE_POINT_CHANGE = 1048576 // /usr/x86_64-w64-mingw32/include/winioctl.h:1485:1: USN_REASON_SECURITY_CHANGE = 2048 // /usr/x86_64-w64-mingw32/include/winioctl.h:1476:1: USN_REASON_STREAM_CHANGE = 2097152 // /usr/x86_64-w64-mingw32/include/winioctl.h:1486:1: USN_SOURCE_AUXILIARY_DATA = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1527:1: USN_SOURCE_DATA_MANAGEMENT = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1526:1: USN_SOURCE_REPLICATION_MANAGEMENT = 4 // /usr/x86_64-w64-mingw32/include/winioctl.h:1528:1: UUID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:43:1: VALID_INHERIT_FLAGS = 31 // /usr/x86_64-w64-mingw32/include/winnt.h:3341:1: VALID_NTFT = 0xC0 // /usr/x86_64-w64-mingw32/include/winioctl.h:517:1: VARCMP_EQ = 1 // /usr/x86_64-w64-mingw32/include/oleauto.h:521:1: VARCMP_GT = 2 // /usr/x86_64-w64-mingw32/include/oleauto.h:522:1: VARCMP_LT = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:520:1: VARCMP_NULL = 3 // /usr/x86_64-w64-mingw32/include/oleauto.h:523:1: VARIABLE_PITCH = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:1153:1: VARIANT_ALPHABOOL = 0x02 // /usr/x86_64-w64-mingw32/include/oleauto.h:92:1: VARIANT_CALENDAR_GREGORIAN = 0x40 // /usr/x86_64-w64-mingw32/include/oleauto.h:97:1: VARIANT_CALENDAR_HIJRI = 0x08 // /usr/x86_64-w64-mingw32/include/oleauto.h:94:1: VARIANT_CALENDAR_THAI = 0x20 // /usr/x86_64-w64-mingw32/include/oleauto.h:96:1: VARIANT_LOCALBOOL = 0x10 // /usr/x86_64-w64-mingw32/include/oleauto.h:95:1: VARIANT_NOUSEROVERRIDE = 0x04 // /usr/x86_64-w64-mingw32/include/oleauto.h:93:1: VARIANT_NOVALUEPROP = 0x01 // /usr/x86_64-w64-mingw32/include/oleauto.h:91:1: VARIANT_USE_NLS = 0x80 // /usr/x86_64-w64-mingw32/include/oleauto.h:98:1: VDBE_DISPLAY_P4 = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22065:1: VDBE_MAGIC_DEAD = 0x5606c3c8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22491:1: VDBE_MAGIC_HALT = 0x319c2973 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22489:1: VDBE_MAGIC_INIT = 0x16bceaa5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22487:1: VDBE_MAGIC_RESET = 0x48fa9f76 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22490:1: VDBE_MAGIC_RUN = 0x2df20da3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22488:1: VENDOR_ID_LENGTH = 8 // /usr/x86_64-w64-mingw32/include/winioctl.h:989:1: VERTRES = 10 // /usr/x86_64-w64-mingw32/include/wingdi.h:1516:1: VERTSIZE = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1514:1: VER_AND = 6 // /usr/x86_64-w64-mingw32/include/winnt.h:7991:1: VER_BUILDNUMBER = 0x0000004 // /usr/x86_64-w64-mingw32/include/winnt.h:7999:1: VER_CONDITION_MASK = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7994:1: VER_EQUAL = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7986:1: VER_GREATER = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7987:1: VER_GREATER_EQUAL = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7988:1: VER_H = 0 // /usr/x86_64-w64-mingw32/include/winver.h:7:1: VER_LESS = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7989:1: VER_LESS_EQUAL = 5 // /usr/x86_64-w64-mingw32/include/winnt.h:7990:1: VER_MAJORVERSION = 0x0000002 // /usr/x86_64-w64-mingw32/include/winnt.h:7998:1: VER_MINORVERSION = 0x0000001 // /usr/x86_64-w64-mingw32/include/winnt.h:7997:1: VER_NT_DOMAIN_CONTROLLER = 0x0000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8007:1: VER_NT_SERVER = 0x0000003 // /usr/x86_64-w64-mingw32/include/winnt.h:8008:1: VER_NT_WORKSTATION = 0x0000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8006:1: VER_NUM_BITS_PER_CONDITION_MASK = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7995:1: VER_OR = 7 // /usr/x86_64-w64-mingw32/include/winnt.h:7992:1: VER_PLATFORMID = 0x0000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8000:1: VER_PLATFORM_WIN32_NT = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:8012:1: VER_PLATFORM_WIN32_WINDOWS = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:8011:1: VER_PLATFORM_WIN32s = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8010:1: VER_PRODUCT_TYPE = 0x0000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8004:1: VER_SERVER_NT = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:713:1: VER_SERVICEPACKMAJOR = 0x0000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8002:1: VER_SERVICEPACKMINOR = 0x0000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8001:1: VER_SUITENAME = 0x0000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8003:1: VER_SUITE_BACKOFFICE = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:716:1: VER_SUITE_BLADE = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnt.h:724:1: VER_SUITE_COMMUNICATIONS = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:717:1: VER_SUITE_COMPUTE_SERVER = 0x00004000 // /usr/x86_64-w64-mingw32/include/winnt.h:728:1: VER_SUITE_DATACENTER = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:721:1: VER_SUITE_EMBEDDEDNT = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:720:1: VER_SUITE_EMBEDDED_RESTRICTED = 0x00000800 // /usr/x86_64-w64-mingw32/include/winnt.h:725:1: VER_SUITE_ENTERPRISE = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:715:1: VER_SUITE_PERSONAL = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnt.h:723:1: VER_SUITE_SECURITY_APPLIANCE = 0x00001000 // /usr/x86_64-w64-mingw32/include/winnt.h:726:1: VER_SUITE_SINGLEUSERTS = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:722:1: VER_SUITE_SMALLBUSINESS = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:714:1: VER_SUITE_SMALLBUSINESS_RESTRICTED = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:719:1: VER_SUITE_STORAGE_SERVER = 0x00002000 // /usr/x86_64-w64-mingw32/include/winnt.h:727:1: VER_SUITE_TERMINAL = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:718:1: VER_SUITE_WH_SERVER = 0x00008000 // /usr/x86_64-w64-mingw32/include/winnt.h:729:1: VER_WORKSTATION_NT = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:712:1: VFFF_ISSHAREDFILE = 0x0001 // /usr/x86_64-w64-mingw32/include/winver.h:77:1: VFF_BUFFTOOSMALL = 0x0004 // /usr/x86_64-w64-mingw32/include/winver.h:81:1: VFF_CURNEDEST = 0x0001 // /usr/x86_64-w64-mingw32/include/winver.h:79:1: VFF_FILEINUSE = 0x0002 // /usr/x86_64-w64-mingw32/include/winver.h:80:1: VFT2_DRV_COMM = 10 // /usr/x86_64-w64-mingw32/include/winver.h:69:1: VFT2_DRV_DISPLAY = 4 // /usr/x86_64-w64-mingw32/include/winver.h:63:1: VFT2_DRV_INPUTMETHOD = 11 // /usr/x86_64-w64-mingw32/include/winver.h:70:1: VFT2_DRV_INSTALLABLE = 8 // /usr/x86_64-w64-mingw32/include/winver.h:67:1: VFT2_DRV_KEYBOARD = 2 // /usr/x86_64-w64-mingw32/include/winver.h:61:1: VFT2_DRV_LANGUAGE = 3 // /usr/x86_64-w64-mingw32/include/winver.h:62:1: VFT2_DRV_MOUSE = 5 // /usr/x86_64-w64-mingw32/include/winver.h:64:1: VFT2_DRV_NETWORK = 6 // /usr/x86_64-w64-mingw32/include/winver.h:65:1: VFT2_DRV_PRINTER = 1 // /usr/x86_64-w64-mingw32/include/winver.h:60:1: VFT2_DRV_SOUND = 9 // /usr/x86_64-w64-mingw32/include/winver.h:68:1: VFT2_DRV_SYSTEM = 7 // /usr/x86_64-w64-mingw32/include/winver.h:66:1: VFT2_DRV_VERSIONED_PRINTER = 12 // /usr/x86_64-w64-mingw32/include/winver.h:71:1: VFT2_FONT_RASTER = 1 // /usr/x86_64-w64-mingw32/include/winver.h:73:1: VFT2_FONT_TRUETYPE = 3 // /usr/x86_64-w64-mingw32/include/winver.h:75:1: VFT2_FONT_VECTOR = 2 // /usr/x86_64-w64-mingw32/include/winver.h:74:1: VFT2_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winver.h:59:1: VFT_APP = 1 // /usr/x86_64-w64-mingw32/include/winver.h:52:1: VFT_DLL = 2 // /usr/x86_64-w64-mingw32/include/winver.h:53:1: VFT_DRV = 3 // /usr/x86_64-w64-mingw32/include/winver.h:54:1: VFT_FONT = 4 // /usr/x86_64-w64-mingw32/include/winver.h:55:1: VFT_STATIC_LIB = 7 // /usr/x86_64-w64-mingw32/include/winver.h:57:1: VFT_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winver.h:51:1: VFT_VXD = 5 // /usr/x86_64-w64-mingw32/include/winver.h:56:1: VIETNAMESE_CHARSET = 163 // /usr/x86_64-w64-mingw32/include/wingdi.h:1170:1: VIEW_E_FIRST = 2147746112 // /usr/x86_64-w64-mingw32/include/winerror.h:2369:1: VIEW_E_LAST = 2147746127 // /usr/x86_64-w64-mingw32/include/winerror.h:2370:1: VIEW_S_FIRST = 262464 // /usr/x86_64-w64-mingw32/include/winerror.h:2371:1: VIEW_S_LAST = 262479 // /usr/x86_64-w64-mingw32/include/winerror.h:2372:1: VIFF_DONTDELETEOLD = 0x0002 // /usr/x86_64-w64-mingw32/include/winver.h:84:1: VIFF_FORCEINSTALL = 0x0001 // /usr/x86_64-w64-mingw32/include/winver.h:83:1: VIF_ACCESSVIOLATION = 512 // /usr/x86_64-w64-mingw32/include/winver.h:97:1: VIF_BUFFTOOSMALL = 262144 // /usr/x86_64-w64-mingw32/include/winver.h:108:1: VIF_CANNOTCREATE = 2048 // /usr/x86_64-w64-mingw32/include/winver.h:99:1: VIF_CANNOTDELETE = 4096 // /usr/x86_64-w64-mingw32/include/winver.h:100:1: VIF_CANNOTDELETECUR = 16384 // /usr/x86_64-w64-mingw32/include/winver.h:102:1: VIF_CANNOTLOADCABINET = 1048576 // /usr/x86_64-w64-mingw32/include/winver.h:110:1: VIF_CANNOTLOADLZ32 = 524288 // /usr/x86_64-w64-mingw32/include/winver.h:109:1: VIF_CANNOTREADDST = 131072 // /usr/x86_64-w64-mingw32/include/winver.h:106:1: VIF_CANNOTREADSRC = 65536 // /usr/x86_64-w64-mingw32/include/winver.h:105:1: VIF_CANNOTRENAME = 8192 // /usr/x86_64-w64-mingw32/include/winver.h:101:1: VIF_DIFFCODEPG = 16 // /usr/x86_64-w64-mingw32/include/winver.h:91:1: VIF_DIFFLANG = 8 // /usr/x86_64-w64-mingw32/include/winver.h:90:1: VIF_DIFFTYPE = 32 // /usr/x86_64-w64-mingw32/include/winver.h:92:1: VIF_FILEINUSE = 128 // /usr/x86_64-w64-mingw32/include/winver.h:95:1: VIF_MISMATCH = 2 // /usr/x86_64-w64-mingw32/include/winver.h:87:1: VIF_OUTOFMEMORY = 32768 // /usr/x86_64-w64-mingw32/include/winver.h:103:1: VIF_OUTOFSPACE = 256 // /usr/x86_64-w64-mingw32/include/winver.h:96:1: VIF_SHARINGVIOLATION = 1024 // /usr/x86_64-w64-mingw32/include/winver.h:98:1: VIF_SRCOLD = 4 // /usr/x86_64-w64-mingw32/include/winver.h:88:1: VIF_TEMPFILE = 1 // /usr/x86_64-w64-mingw32/include/winver.h:86:1: VIF_WRITEPROT = 64 // /usr/x86_64-w64-mingw32/include/winver.h:94:1: VK_ACCEPT = 0x1E // /usr/x86_64-w64-mingw32/include/winuser.h:274:1: VK_ADD = 0x6B // /usr/x86_64-w64-mingw32/include/winuser.h:308:1: VK_APPS = 0x5D // /usr/x86_64-w64-mingw32/include/winuser.h:295:1: VK_ATTN = 0xF6 // /usr/x86_64-w64-mingw32/include/winuser.h:437:1: VK_BACK = 0x08 // /usr/x86_64-w64-mingw32/include/winuser.h:253:1: VK_BROWSER_BACK = 0xA6 // /usr/x86_64-w64-mingw32/include/winuser.h:361:1: VK_BROWSER_FAVORITES = 0xAB // /usr/x86_64-w64-mingw32/include/winuser.h:366:1: VK_BROWSER_FORWARD = 0xA7 // /usr/x86_64-w64-mingw32/include/winuser.h:362:1: VK_BROWSER_HOME = 0xAC // /usr/x86_64-w64-mingw32/include/winuser.h:367:1: VK_BROWSER_REFRESH = 0xA8 // /usr/x86_64-w64-mingw32/include/winuser.h:363:1: VK_BROWSER_SEARCH = 0xAA // /usr/x86_64-w64-mingw32/include/winuser.h:365:1: VK_BROWSER_STOP = 0xA9 // /usr/x86_64-w64-mingw32/include/winuser.h:364:1: VK_CANCEL = 0x03 // /usr/x86_64-w64-mingw32/include/winuser.h:249:1: VK_CAPITAL = 0x14 // /usr/x86_64-w64-mingw32/include/winuser.h:261:1: VK_CLEAR = 0x0C // /usr/x86_64-w64-mingw32/include/winuser.h:255:1: VK_CONTROL = 0x11 // /usr/x86_64-w64-mingw32/include/winuser.h:258:1: VK_CONVERT = 0x1C // /usr/x86_64-w64-mingw32/include/winuser.h:272:1: VK_CRSEL = 0xF7 // /usr/x86_64-w64-mingw32/include/winuser.h:438:1: VK_DECIMAL = 0x6E // /usr/x86_64-w64-mingw32/include/winuser.h:311:1: VK_DELETE = 0x2E // /usr/x86_64-w64-mingw32/include/winuser.h:290:1: VK_DIVIDE = 0x6F // /usr/x86_64-w64-mingw32/include/winuser.h:312:1: VK_DOWN = 0x28 // /usr/x86_64-w64-mingw32/include/winuser.h:284:1: VK_END = 0x23 // /usr/x86_64-w64-mingw32/include/winuser.h:279:1: VK_EREOF = 0xF9 // /usr/x86_64-w64-mingw32/include/winuser.h:440:1: VK_ESCAPE = 0x1B // /usr/x86_64-w64-mingw32/include/winuser.h:271:1: VK_EXECUTE = 0x2B // /usr/x86_64-w64-mingw32/include/winuser.h:287:1: VK_EXSEL = 0xF8 // /usr/x86_64-w64-mingw32/include/winuser.h:439:1: VK_F1 = 0x70 // /usr/x86_64-w64-mingw32/include/winuser.h:313:1: VK_F10 = 0x79 // /usr/x86_64-w64-mingw32/include/winuser.h:322:1: VK_F11 = 0x7A // /usr/x86_64-w64-mingw32/include/winuser.h:323:1: VK_F12 = 0x7B // /usr/x86_64-w64-mingw32/include/winuser.h:324:1: VK_F13 = 0x7C // /usr/x86_64-w64-mingw32/include/winuser.h:325:1: VK_F14 = 0x7D // /usr/x86_64-w64-mingw32/include/winuser.h:326:1: VK_F15 = 0x7E // /usr/x86_64-w64-mingw32/include/winuser.h:327:1: VK_F16 = 0x7F // /usr/x86_64-w64-mingw32/include/winuser.h:328:1: VK_F17 = 0x80 // /usr/x86_64-w64-mingw32/include/winuser.h:329:1: VK_F18 = 0x81 // /usr/x86_64-w64-mingw32/include/winuser.h:330:1: VK_F19 = 0x82 // /usr/x86_64-w64-mingw32/include/winuser.h:331:1: VK_F2 = 0x71 // /usr/x86_64-w64-mingw32/include/winuser.h:314:1: VK_F20 = 0x83 // /usr/x86_64-w64-mingw32/include/winuser.h:332:1: VK_F21 = 0x84 // /usr/x86_64-w64-mingw32/include/winuser.h:333:1: VK_F22 = 0x85 // /usr/x86_64-w64-mingw32/include/winuser.h:334:1: VK_F23 = 0x86 // /usr/x86_64-w64-mingw32/include/winuser.h:335:1: VK_F24 = 0x87 // /usr/x86_64-w64-mingw32/include/winuser.h:336:1: VK_F3 = 0x72 // /usr/x86_64-w64-mingw32/include/winuser.h:315:1: VK_F4 = 0x73 // /usr/x86_64-w64-mingw32/include/winuser.h:316:1: VK_F5 = 0x74 // /usr/x86_64-w64-mingw32/include/winuser.h:317:1: VK_F6 = 0x75 // /usr/x86_64-w64-mingw32/include/winuser.h:318:1: VK_F7 = 0x76 // /usr/x86_64-w64-mingw32/include/winuser.h:319:1: VK_F8 = 0x77 // /usr/x86_64-w64-mingw32/include/winuser.h:320:1: VK_F9 = 0x78 // /usr/x86_64-w64-mingw32/include/winuser.h:321:1: VK_FINAL = 0x18 // /usr/x86_64-w64-mingw32/include/winuser.h:267:1: VK_HANGEUL = 0x15 // /usr/x86_64-w64-mingw32/include/winuser.h:263:1: VK_HANGUL = 0x15 // /usr/x86_64-w64-mingw32/include/winuser.h:264:1: VK_HANJA = 0x19 // /usr/x86_64-w64-mingw32/include/winuser.h:268:1: VK_HELP = 0x2F // /usr/x86_64-w64-mingw32/include/winuser.h:291:1: VK_HOME = 0x24 // /usr/x86_64-w64-mingw32/include/winuser.h:280:1: VK_ICO_00 = 0xE4 // /usr/x86_64-w64-mingw32/include/winuser.h:420:1: VK_ICO_CLEAR = 0xE6 // /usr/x86_64-w64-mingw32/include/winuser.h:422:1: VK_ICO_HELP = 0xE3 // /usr/x86_64-w64-mingw32/include/winuser.h:419:1: VK_IME_OFF = 0x1A // /usr/x86_64-w64-mingw32/include/winuser.h:270:1: VK_IME_ON = 0x16 // /usr/x86_64-w64-mingw32/include/winuser.h:265:1: VK_INSERT = 0x2D // /usr/x86_64-w64-mingw32/include/winuser.h:289:1: VK_JUNJA = 0x17 // /usr/x86_64-w64-mingw32/include/winuser.h:266:1: VK_KANA = 0x15 // /usr/x86_64-w64-mingw32/include/winuser.h:262:1: VK_KANJI = 0x19 // /usr/x86_64-w64-mingw32/include/winuser.h:269:1: VK_LAUNCH_APP1 = 0xB6 // /usr/x86_64-w64-mingw32/include/winuser.h:377:1: VK_LAUNCH_APP2 = 0xB7 // /usr/x86_64-w64-mingw32/include/winuser.h:378:1: VK_LAUNCH_MAIL = 0xB4 // /usr/x86_64-w64-mingw32/include/winuser.h:375:1: VK_LAUNCH_MEDIA_SELECT = 0xB5 // /usr/x86_64-w64-mingw32/include/winuser.h:376:1: VK_LBUTTON = 0x01 // /usr/x86_64-w64-mingw32/include/winuser.h:247:1: VK_LCONTROL = 0xA2 // /usr/x86_64-w64-mingw32/include/winuser.h:357:1: VK_LEFT = 0x25 // /usr/x86_64-w64-mingw32/include/winuser.h:281:1: VK_LMENU = 0xA4 // /usr/x86_64-w64-mingw32/include/winuser.h:359:1: VK_LSHIFT = 0xA0 // /usr/x86_64-w64-mingw32/include/winuser.h:355:1: VK_LWIN = 0x5B // /usr/x86_64-w64-mingw32/include/winuser.h:293:1: VK_MBUTTON = 0x04 // /usr/x86_64-w64-mingw32/include/winuser.h:250:1: VK_MEDIA_NEXT_TRACK = 0xB0 // /usr/x86_64-w64-mingw32/include/winuser.h:371:1: VK_MEDIA_PLAY_PAUSE = 0xB3 // /usr/x86_64-w64-mingw32/include/winuser.h:374:1: VK_MEDIA_PREV_TRACK = 0xB1 // /usr/x86_64-w64-mingw32/include/winuser.h:372:1: VK_MEDIA_STOP = 0xB2 // /usr/x86_64-w64-mingw32/include/winuser.h:373:1: VK_MENU = 0x12 // /usr/x86_64-w64-mingw32/include/winuser.h:259:1: VK_MODECHANGE = 0x1F // /usr/x86_64-w64-mingw32/include/winuser.h:275:1: VK_MULTIPLY = 0x6A // /usr/x86_64-w64-mingw32/include/winuser.h:307:1: VK_NEXT = 0x22 // /usr/x86_64-w64-mingw32/include/winuser.h:278:1: VK_NONAME = 0xFC // /usr/x86_64-w64-mingw32/include/winuser.h:443:1: VK_NONCONVERT = 0x1D // /usr/x86_64-w64-mingw32/include/winuser.h:273:1: VK_NUMLOCK = 0x90 // /usr/x86_64-w64-mingw32/include/winuser.h:347:1: VK_NUMPAD0 = 0x60 // /usr/x86_64-w64-mingw32/include/winuser.h:297:1: VK_NUMPAD1 = 0x61 // /usr/x86_64-w64-mingw32/include/winuser.h:298:1: VK_NUMPAD2 = 0x62 // /usr/x86_64-w64-mingw32/include/winuser.h:299:1: VK_NUMPAD3 = 0x63 // /usr/x86_64-w64-mingw32/include/winuser.h:300:1: VK_NUMPAD4 = 0x64 // /usr/x86_64-w64-mingw32/include/winuser.h:301:1: VK_NUMPAD5 = 0x65 // /usr/x86_64-w64-mingw32/include/winuser.h:302:1: VK_NUMPAD6 = 0x66 // /usr/x86_64-w64-mingw32/include/winuser.h:303:1: VK_NUMPAD7 = 0x67 // /usr/x86_64-w64-mingw32/include/winuser.h:304:1: VK_NUMPAD8 = 0x68 // /usr/x86_64-w64-mingw32/include/winuser.h:305:1: VK_NUMPAD9 = 0x69 // /usr/x86_64-w64-mingw32/include/winuser.h:306:1: VK_OEM_1 = 0xBA // /usr/x86_64-w64-mingw32/include/winuser.h:379:1: VK_OEM_102 = 0xE2 // /usr/x86_64-w64-mingw32/include/winuser.h:418:1: VK_OEM_2 = 0xBF // /usr/x86_64-w64-mingw32/include/winuser.h:384:1: VK_OEM_3 = 0xC0 // /usr/x86_64-w64-mingw32/include/winuser.h:385:1: VK_OEM_4 = 0xDB // /usr/x86_64-w64-mingw32/include/winuser.h:412:1: VK_OEM_5 = 0xDC // /usr/x86_64-w64-mingw32/include/winuser.h:413:1: VK_OEM_6 = 0xDD // /usr/x86_64-w64-mingw32/include/winuser.h:414:1: VK_OEM_7 = 0xDE // /usr/x86_64-w64-mingw32/include/winuser.h:415:1: VK_OEM_8 = 0xDF // /usr/x86_64-w64-mingw32/include/winuser.h:416:1: VK_OEM_ATTN = 0xF0 // /usr/x86_64-w64-mingw32/include/winuser.h:431:1: VK_OEM_AUTO = 0xF3 // /usr/x86_64-w64-mingw32/include/winuser.h:434:1: VK_OEM_AX = 0xE1 // /usr/x86_64-w64-mingw32/include/winuser.h:417:1: VK_OEM_BACKTAB = 0xF5 // /usr/x86_64-w64-mingw32/include/winuser.h:436:1: VK_OEM_CLEAR = 0xFE // /usr/x86_64-w64-mingw32/include/winuser.h:445:1: VK_OEM_COMMA = 0xBC // /usr/x86_64-w64-mingw32/include/winuser.h:381:1: VK_OEM_COPY = 0xF2 // /usr/x86_64-w64-mingw32/include/winuser.h:433:1: VK_OEM_CUSEL = 0xEF // /usr/x86_64-w64-mingw32/include/winuser.h:430:1: VK_OEM_ENLW = 0xF4 // /usr/x86_64-w64-mingw32/include/winuser.h:435:1: VK_OEM_FINISH = 0xF1 // /usr/x86_64-w64-mingw32/include/winuser.h:432:1: VK_OEM_FJ_JISHO = 0x92 // /usr/x86_64-w64-mingw32/include/winuser.h:350:1: VK_OEM_FJ_LOYA = 0x95 // /usr/x86_64-w64-mingw32/include/winuser.h:353:1: VK_OEM_FJ_MASSHOU = 0x93 // /usr/x86_64-w64-mingw32/include/winuser.h:351:1: VK_OEM_FJ_ROYA = 0x96 // /usr/x86_64-w64-mingw32/include/winuser.h:354:1: VK_OEM_FJ_TOUROKU = 0x94 // /usr/x86_64-w64-mingw32/include/winuser.h:352:1: VK_OEM_JUMP = 0xEA // /usr/x86_64-w64-mingw32/include/winuser.h:425:1: VK_OEM_MINUS = 0xBD // /usr/x86_64-w64-mingw32/include/winuser.h:382:1: VK_OEM_NEC_EQUAL = 0x92 // /usr/x86_64-w64-mingw32/include/winuser.h:349:1: VK_OEM_PA1 = 0xEB // /usr/x86_64-w64-mingw32/include/winuser.h:426:1: VK_OEM_PA2 = 0xEC // /usr/x86_64-w64-mingw32/include/winuser.h:427:1: VK_OEM_PA3 = 0xED // /usr/x86_64-w64-mingw32/include/winuser.h:428:1: VK_OEM_PERIOD = 0xBE // /usr/x86_64-w64-mingw32/include/winuser.h:383:1: VK_OEM_PLUS = 0xBB // /usr/x86_64-w64-mingw32/include/winuser.h:380:1: VK_OEM_RESET = 0xE9 // /usr/x86_64-w64-mingw32/include/winuser.h:424:1: VK_OEM_WSCTRL = 0xEE // /usr/x86_64-w64-mingw32/include/winuser.h:429:1: VK_PA1 = 0xFD // /usr/x86_64-w64-mingw32/include/winuser.h:444:1: VK_PACKET = 0xE7 // /usr/x86_64-w64-mingw32/include/winuser.h:423:1: VK_PAUSE = 0x13 // /usr/x86_64-w64-mingw32/include/winuser.h:260:1: VK_PLAY = 0xFA // /usr/x86_64-w64-mingw32/include/winuser.h:441:1: VK_PRINT = 0x2A // /usr/x86_64-w64-mingw32/include/winuser.h:286:1: VK_PRIOR = 0x21 // /usr/x86_64-w64-mingw32/include/winuser.h:277:1: VK_PROCESSKEY = 0xE5 // /usr/x86_64-w64-mingw32/include/winuser.h:421:1: VK_RBUTTON = 0x02 // /usr/x86_64-w64-mingw32/include/winuser.h:248:1: VK_RCONTROL = 0xA3 // /usr/x86_64-w64-mingw32/include/winuser.h:358:1: VK_RETURN = 0x0D // /usr/x86_64-w64-mingw32/include/winuser.h:256:1: VK_RIGHT = 0x27 // /usr/x86_64-w64-mingw32/include/winuser.h:283:1: VK_RMENU = 0xA5 // /usr/x86_64-w64-mingw32/include/winuser.h:360:1: VK_RSHIFT = 0xA1 // /usr/x86_64-w64-mingw32/include/winuser.h:356:1: VK_RWIN = 0x5C // /usr/x86_64-w64-mingw32/include/winuser.h:294:1: VK_SCROLL = 0x91 // /usr/x86_64-w64-mingw32/include/winuser.h:348:1: VK_SELECT = 0x29 // /usr/x86_64-w64-mingw32/include/winuser.h:285:1: VK_SEPARATOR = 0x6C // /usr/x86_64-w64-mingw32/include/winuser.h:309:1: VK_SHIFT = 0x10 // /usr/x86_64-w64-mingw32/include/winuser.h:257:1: VK_SLEEP = 0x5F // /usr/x86_64-w64-mingw32/include/winuser.h:296:1: VK_SNAPSHOT = 0x2C // /usr/x86_64-w64-mingw32/include/winuser.h:288:1: VK_SPACE = 0x20 // /usr/x86_64-w64-mingw32/include/winuser.h:276:1: VK_SUBTRACT = 0x6D // /usr/x86_64-w64-mingw32/include/winuser.h:310:1: VK_TAB = 0x09 // /usr/x86_64-w64-mingw32/include/winuser.h:254:1: VK_UP = 0x26 // /usr/x86_64-w64-mingw32/include/winuser.h:282:1: VK_VOLUME_DOWN = 0xAE // /usr/x86_64-w64-mingw32/include/winuser.h:369:1: VK_VOLUME_MUTE = 0xAD // /usr/x86_64-w64-mingw32/include/winuser.h:368:1: VK_VOLUME_UP = 0xAF // /usr/x86_64-w64-mingw32/include/winuser.h:370:1: VK_XBUTTON1 = 0x05 // /usr/x86_64-w64-mingw32/include/winuser.h:251:1: VK_XBUTTON2 = 0x06 // /usr/x86_64-w64-mingw32/include/winuser.h:252:1: VK_ZOOM = 0xFB // /usr/x86_64-w64-mingw32/include/winuser.h:442:1: VOLUME_IS_DIRTY = 1 // /usr/x86_64-w64-mingw32/include/winioctl.h:1541:1: VOLUME_NAME_DOS = 0x0 // /usr/x86_64-w64-mingw32/include/winbase.h:423:1: VOLUME_NAME_GUID = 0x1 // /usr/x86_64-w64-mingw32/include/winbase.h:424:1: VOLUME_NAME_NONE = 0x4 // /usr/x86_64-w64-mingw32/include/winbase.h:426:1: VOLUME_NAME_NT = 0x2 // /usr/x86_64-w64-mingw32/include/winbase.h:425:1: VOLUME_UPGRADE_SCHEDULED = 2 // /usr/x86_64-w64-mingw32/include/winioctl.h:1542:1: VOS_DOS = 65536 // /usr/x86_64-w64-mingw32/include/winver.h:33:1: VOS_DOS_WINDOWS16 = 65537 // /usr/x86_64-w64-mingw32/include/winver.h:45:1: VOS_DOS_WINDOWS32 = 65540 // /usr/x86_64-w64-mingw32/include/winver.h:46:1: VOS_NT = 262144 // /usr/x86_64-w64-mingw32/include/winver.h:36:1: VOS_NT_WINDOWS32 = 262148 // /usr/x86_64-w64-mingw32/include/winver.h:49:1: VOS_OS216 = 131072 // /usr/x86_64-w64-mingw32/include/winver.h:34:1: VOS_OS216_PM16 = 131074 // /usr/x86_64-w64-mingw32/include/winver.h:47:1: VOS_OS232 = 196608 // /usr/x86_64-w64-mingw32/include/winver.h:35:1: VOS_OS232_PM32 = 196611 // /usr/x86_64-w64-mingw32/include/winver.h:48:1: VOS_UNKNOWN = 0 // /usr/x86_64-w64-mingw32/include/winver.h:32:1: VOS_WINCE = 327680 // /usr/x86_64-w64-mingw32/include/winver.h:37:1: VOS__BASE = 0 // /usr/x86_64-w64-mingw32/include/winver.h:39:1: VOS__PM16 = 2 // /usr/x86_64-w64-mingw32/include/winver.h:41:1: VOS__PM32 = 3 // /usr/x86_64-w64-mingw32/include/winver.h:42:1: VOS__WINDOWS16 = 1 // /usr/x86_64-w64-mingw32/include/winver.h:40:1: VOS__WINDOWS32 = 4 // /usr/x86_64-w64-mingw32/include/winver.h:43:1: VP_COMMAND_GET = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:37:1: VP_COMMAND_SET = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:38:1: VP_CP_CMD_ACTIVATE = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:76:1: VP_CP_CMD_CHANGE = 0x0004 // /usr/x86_64-w64-mingw32/include/tvout.h:78:1: VP_CP_CMD_DEACTIVATE = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:77:1: VP_CP_TYPE_APS_TRIGGER = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:74:1: VP_CP_TYPE_MACROVISION = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:75:1: VP_FLAGS_BRIGHTNESS = 0x0040 // /usr/x86_64-w64-mingw32/include/tvout.h:46:1: VP_FLAGS_CONTRAST = 0x0080 // /usr/x86_64-w64-mingw32/include/tvout.h:47:1: VP_FLAGS_COPYPROTECT = 0x0100 // /usr/x86_64-w64-mingw32/include/tvout.h:48:1: VP_FLAGS_FLICKER = 0x0004 // /usr/x86_64-w64-mingw32/include/tvout.h:42:1: VP_FLAGS_MAX_UNSCALED = 0x0010 // /usr/x86_64-w64-mingw32/include/tvout.h:44:1: VP_FLAGS_OVERSCAN = 0x0008 // /usr/x86_64-w64-mingw32/include/tvout.h:43:1: VP_FLAGS_POSITION = 0x0020 // /usr/x86_64-w64-mingw32/include/tvout.h:45:1: VP_FLAGS_TV_MODE = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:40:1: VP_FLAGS_TV_STANDARD = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:41:1: VP_MODE_TV_PLAYBACK = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:51:1: VP_MODE_WIN_GRAPHICS = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:50:1: VP_TV_STANDARD_NTSC_433 = 0x00010000 // /usr/x86_64-w64-mingw32/include/tvout.h:69:1: VP_TV_STANDARD_NTSC_M = 0x0001 // /usr/x86_64-w64-mingw32/include/tvout.h:53:1: VP_TV_STANDARD_NTSC_M_J = 0x0002 // /usr/x86_64-w64-mingw32/include/tvout.h:54:1: VP_TV_STANDARD_PAL_60 = 0x00040000 // /usr/x86_64-w64-mingw32/include/tvout.h:71:1: VP_TV_STANDARD_PAL_B = 0x0004 // /usr/x86_64-w64-mingw32/include/tvout.h:55:1: VP_TV_STANDARD_PAL_D = 0x0008 // /usr/x86_64-w64-mingw32/include/tvout.h:56:1: VP_TV_STANDARD_PAL_G = 0x00020000 // /usr/x86_64-w64-mingw32/include/tvout.h:70:1: VP_TV_STANDARD_PAL_H = 0x0010 // /usr/x86_64-w64-mingw32/include/tvout.h:57:1: VP_TV_STANDARD_PAL_I = 0x0020 // /usr/x86_64-w64-mingw32/include/tvout.h:58:1: VP_TV_STANDARD_PAL_M = 0x0040 // /usr/x86_64-w64-mingw32/include/tvout.h:59:1: VP_TV_STANDARD_PAL_N = 0x0080 // /usr/x86_64-w64-mingw32/include/tvout.h:60:1: VP_TV_STANDARD_SECAM_B = 0x0100 // /usr/x86_64-w64-mingw32/include/tvout.h:61:1: VP_TV_STANDARD_SECAM_D = 0x0200 // /usr/x86_64-w64-mingw32/include/tvout.h:62:1: VP_TV_STANDARD_SECAM_G = 0x0400 // /usr/x86_64-w64-mingw32/include/tvout.h:63:1: VP_TV_STANDARD_SECAM_H = 0x0800 // /usr/x86_64-w64-mingw32/include/tvout.h:64:1: VP_TV_STANDARD_SECAM_K = 0x1000 // /usr/x86_64-w64-mingw32/include/tvout.h:65:1: VP_TV_STANDARD_SECAM_K1 = 0x2000 // /usr/x86_64-w64-mingw32/include/tvout.h:66:1: VP_TV_STANDARD_SECAM_L = 0x4000 // /usr/x86_64-w64-mingw32/include/tvout.h:67:1: VP_TV_STANDARD_SECAM_L1 = 0x00080000 // /usr/x86_64-w64-mingw32/include/tvout.h:72:1: VP_TV_STANDARD_WIN_VGA = 0x8000 // /usr/x86_64-w64-mingw32/include/tvout.h:68:1: VREFRESH = 116 // /usr/x86_64-w64-mingw32/include/wingdi.h:1549:1: VS_FFI_FILEFLAGSMASK = 63 // /usr/x86_64-w64-mingw32/include/winver.h:23:1: VS_FFI_SIGNATURE = 4277077181 // /usr/x86_64-w64-mingw32/include/winver.h:21:1: VS_FFI_STRUCVERSION = 65536 // /usr/x86_64-w64-mingw32/include/winver.h:22:1: VS_FF_DEBUG = 1 // /usr/x86_64-w64-mingw32/include/winver.h:25:1: VS_FF_INFOINFERRED = 16 // /usr/x86_64-w64-mingw32/include/winver.h:29:1: VS_FF_PATCHED = 4 // /usr/x86_64-w64-mingw32/include/winver.h:27:1: VS_FF_PRERELEASE = 2 // /usr/x86_64-w64-mingw32/include/winver.h:26:1: VS_FF_PRIVATEBUILD = 8 // /usr/x86_64-w64-mingw32/include/winver.h:28:1: VS_FF_SPECIALBUILD = 32 // /usr/x86_64-w64-mingw32/include/winver.h:30:1: VS_USER_DEFINED = 100 // /usr/x86_64-w64-mingw32/include/winver.h:19:1: VS_VERSION_INFO = 1 // /usr/x86_64-w64-mingw32/include/winver.h:18:1: VTA_BASELINE = 24 // /usr/x86_64-w64-mingw32/include/wingdi.h:123:1: VTA_BOTTOM = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:127:1: VTA_CENTER = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:126:1: VTA_LEFT = 8 // /usr/x86_64-w64-mingw32/include/wingdi.h:124:1: VTA_RIGHT = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:125:1: VTA_TOP = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:128:1: VTDATEGRE_MAX = 2958465 // /usr/x86_64-w64-mingw32/include/oleauto.h:118:1: VTDATEGRE_MIN = -657434 // /usr/x86_64-w64-mingw32/include/oleauto.h:119:1: WAIT_CHILD = 0 // /usr/x86_64-w64-mingw32/include/process.h:152:1: WAIT_GRANDCHILD = 1 // /usr/x86_64-w64-mingw32/include/process.h:153:1: WAIT_TIMEOUT = 258 // /usr/x86_64-w64-mingw32/include/winerror.h:228:1: WALINDEX_MAX_VERSION = 3007000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61231:1: WAL_ALL_BUT_WRITE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61248:1: WAL_CKPT_LOCK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61249:1: WAL_EXCLUSIVE_MODE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61499:1: WAL_FRAME_HDRSIZE = 24 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61430:1: WAL_HDRSIZE = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61433:1: WAL_HEAPMEMORY_MODE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61500:1: WAL_LOCK_CKPT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203969:1: WAL_LOCK_READ0 = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203970:1: WAL_LOCK_WRITE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203968:1: WAL_MAGIC = 0x377f0682 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61444:1: WAL_MAX_VERSION = 3007000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61230:1: WAL_NORMAL_MODE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61498:1: WAL_NREADER = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61252:1: WAL_RDONLY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61506:1: WAL_RDWR = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61505:1: WAL_RECOVER_LOCK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61250:1: WAL_RETRY = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:63328:1: WAL_SAVEPOINT_NDATA = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:53132:1: WAL_SHM_RDONLY = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61507:1: WAL_WRITE_LOCK = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:61247:1: WARNING_IPSEC_MM_POLICY_PRUNED = 13024 // /usr/x86_64-w64-mingw32/include/winerror.h:1935:1: WARNING_IPSEC_QM_POLICY_PRUNED = 13025 // /usr/x86_64-w64-mingw32/include/winerror.h:1936:1: WAVECAPS_LRVOLUME = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:386:1: WAVECAPS_PITCH = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:383:1: WAVECAPS_PLAYBACKRATE = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:384:1: WAVECAPS_SAMPLEACCURATE = 0x0020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:388:1: WAVECAPS_SYNC = 0x0010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:387:1: WAVECAPS_VOLUME = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:385:1: WAVERR_BADFORMAT = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:277:1: WAVERR_BASE = 32 // /usr/x86_64-w64-mingw32/include/mmsystem.h:127:1: WAVERR_LASTERROR = 35 // /usr/x86_64-w64-mingw32/include/mmsystem.h:281:1: WAVERR_STILLPLAYING = 33 // /usr/x86_64-w64-mingw32/include/mmsystem.h:278:1: WAVERR_SYNC = 35 // /usr/x86_64-w64-mingw32/include/mmsystem.h:280:1: WAVERR_UNPREPARED = 34 // /usr/x86_64-w64-mingw32/include/mmsystem.h:279:1: WAVE_ALLOWSYNC = 0x0002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:301:1: WAVE_FORMAT_1M08 = 0x00000001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:447:1: WAVE_FORMAT_1M16 = 0x00000004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:449:1: WAVE_FORMAT_1S08 = 0x00000002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:448:1: WAVE_FORMAT_1S16 = 0x00000008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:450:1: WAVE_FORMAT_2M08 = 0x00000010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:451:1: WAVE_FORMAT_2M16 = 0x00000040 // /usr/x86_64-w64-mingw32/include/mmsystem.h:453:1: WAVE_FORMAT_2S08 = 0x00000020 // /usr/x86_64-w64-mingw32/include/mmsystem.h:452:1: WAVE_FORMAT_2S16 = 0x00000080 // /usr/x86_64-w64-mingw32/include/mmsystem.h:454:1: WAVE_FORMAT_44M08 = 0x00000100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:460:1: WAVE_FORMAT_44M16 = 0x00000400 // /usr/x86_64-w64-mingw32/include/mmsystem.h:462:1: WAVE_FORMAT_44S08 = 0x00000200 // /usr/x86_64-w64-mingw32/include/mmsystem.h:461:1: WAVE_FORMAT_44S16 = 0x00000800 // /usr/x86_64-w64-mingw32/include/mmsystem.h:463:1: WAVE_FORMAT_48M08 = 0x00001000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:464:1: WAVE_FORMAT_48M16 = 0x00004000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:466:1: WAVE_FORMAT_48S08 = 0x00002000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:465:1: WAVE_FORMAT_48S16 = 0x00008000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:467:1: WAVE_FORMAT_4M08 = 0x00000100 // /usr/x86_64-w64-mingw32/include/mmsystem.h:455:1: WAVE_FORMAT_4M16 = 0x00000400 // /usr/x86_64-w64-mingw32/include/mmsystem.h:457:1: WAVE_FORMAT_4S08 = 0x00000200 // /usr/x86_64-w64-mingw32/include/mmsystem.h:456:1: WAVE_FORMAT_4S16 = 0x00000800 // /usr/x86_64-w64-mingw32/include/mmsystem.h:458:1: WAVE_FORMAT_96M08 = 0x00010000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:468:1: WAVE_FORMAT_96M16 = 0x00040000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:470:1: WAVE_FORMAT_96S08 = 0x00020000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:469:1: WAVE_FORMAT_96S16 = 0x00080000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:471:1: WAVE_FORMAT_DIRECT = 0x0008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:303:1: WAVE_FORMAT_DIRECT_QUERY = 9 // /usr/x86_64-w64-mingw32/include/mmsystem.h:304:1: WAVE_FORMAT_PCM = 1 // /usr/x86_64-w64-mingw32/include/mmsystem.h:482:1: WAVE_FORMAT_QUERY = 0x0001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:300:1: WAVE_INVALIDFORMAT = 0x00000000 // /usr/x86_64-w64-mingw32/include/mmsystem.h:446:1: WAVE_MAPPED = 0x0004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:302:1: WA_ACTIVE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1037:1: WA_CLICKACTIVE = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1038:1: WA_INACTIVE = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1036:1: WB_ISDELIMITER = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:4472:1: WB_LEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:4470:1: WB_RIGHT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:4471:1: WC_COMPOSITECHECK = 0x00000200 // /usr/x86_64-w64-mingw32/include/winnls.h:48:1: WC_DEFAULTCHAR = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnls.h:44:1: WC_DISCARDNS = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnls.h:42:1: WC_NO_BEST_FIT_CHARS = 0x00000400 // /usr/x86_64-w64-mingw32/include/winnls.h:49:1: WC_SEPCHARS = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnls.h:43:1: WDK_NTDDI_VERSION = 167772170 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:148:1: WDT_INPROC64_CALL = 1349805143 // /usr/x86_64-w64-mingw32/include/wtypes.h:224:1: WDT_INPROC_CALL = 1215587415 // /usr/x86_64-w64-mingw32/include/wtypes.h:220:1: WDT_REMOTE_CALL = 1383359575 // /usr/x86_64-w64-mingw32/include/wtypes.h:222:1: WGL_FONT_LINES = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:4315:1: WGL_FONT_POLYGONS = 1 // /usr/x86_64-w64-mingw32/include/wingdi.h:4316:1: WGL_SWAPMULTIPLE_MAX = 16 // /usr/x86_64-w64-mingw32/include/wingdi.h:4407:1: WGL_SWAP_MAIN_PLANE = 0x00000001 // /usr/x86_64-w64-mingw32/include/wingdi.h:4364:1: WGL_SWAP_OVERLAY1 = 0x00000002 // /usr/x86_64-w64-mingw32/include/wingdi.h:4365:1: WGL_SWAP_OVERLAY10 = 0x00000400 // /usr/x86_64-w64-mingw32/include/wingdi.h:4374:1: WGL_SWAP_OVERLAY11 = 0x00000800 // /usr/x86_64-w64-mingw32/include/wingdi.h:4375:1: WGL_SWAP_OVERLAY12 = 0x00001000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4376:1: WGL_SWAP_OVERLAY13 = 0x00002000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4377:1: WGL_SWAP_OVERLAY14 = 0x00004000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4378:1: WGL_SWAP_OVERLAY15 = 0x00008000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4379:1: WGL_SWAP_OVERLAY2 = 0x00000004 // /usr/x86_64-w64-mingw32/include/wingdi.h:4366:1: WGL_SWAP_OVERLAY3 = 0x00000008 // /usr/x86_64-w64-mingw32/include/wingdi.h:4367:1: WGL_SWAP_OVERLAY4 = 0x00000010 // /usr/x86_64-w64-mingw32/include/wingdi.h:4368:1: WGL_SWAP_OVERLAY5 = 0x00000020 // /usr/x86_64-w64-mingw32/include/wingdi.h:4369:1: WGL_SWAP_OVERLAY6 = 0x00000040 // /usr/x86_64-w64-mingw32/include/wingdi.h:4370:1: WGL_SWAP_OVERLAY7 = 0x00000080 // /usr/x86_64-w64-mingw32/include/wingdi.h:4371:1: WGL_SWAP_OVERLAY8 = 0x00000100 // /usr/x86_64-w64-mingw32/include/wingdi.h:4372:1: WGL_SWAP_OVERLAY9 = 0x00000200 // /usr/x86_64-w64-mingw32/include/wingdi.h:4373:1: WGL_SWAP_UNDERLAY1 = 0x00010000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4380:1: WGL_SWAP_UNDERLAY10 = 0x02000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4389:1: WGL_SWAP_UNDERLAY11 = 0x04000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4390:1: WGL_SWAP_UNDERLAY12 = 0x08000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4391:1: WGL_SWAP_UNDERLAY13 = 0x10000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4392:1: WGL_SWAP_UNDERLAY14 = 0x20000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4393:1: WGL_SWAP_UNDERLAY15 = 0x40000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4394:1: WGL_SWAP_UNDERLAY2 = 0x00020000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4381:1: WGL_SWAP_UNDERLAY3 = 0x00040000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4382:1: WGL_SWAP_UNDERLAY4 = 0x00080000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4383:1: WGL_SWAP_UNDERLAY5 = 0x00100000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4384:1: WGL_SWAP_UNDERLAY6 = 0x00200000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4385:1: WGL_SWAP_UNDERLAY7 = 0x00400000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4386:1: WGL_SWAP_UNDERLAY8 = 0x00800000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4387:1: WGL_SWAP_UNDERLAY9 = 0x01000000 // /usr/x86_64-w64-mingw32/include/wingdi.h:4388:1: WHDR_BEGINLOOP = 0x00000004 // /usr/x86_64-w64-mingw32/include/mmsystem.h:319:1: WHDR_DONE = 0x00000001 // /usr/x86_64-w64-mingw32/include/mmsystem.h:317:1: WHDR_ENDLOOP = 0x00000008 // /usr/x86_64-w64-mingw32/include/mmsystem.h:320:1: WHDR_INQUEUE = 0x00000010 // /usr/x86_64-w64-mingw32/include/mmsystem.h:321:1: WHDR_PREPARED = 0x00000002 // /usr/x86_64-w64-mingw32/include/mmsystem.h:318:1: WHEEL_DELTA = 120 // /usr/x86_64-w64-mingw32/include/winuser.h:1266:1: WHEEL_PAGESCROLL = 4294967295 // /usr/x86_64-w64-mingw32/include/winuser.h:1269:1: WHERE_AGG_DISTINCT = 0x0400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18399:1: WHERE_AUTO_INDEX = 0x00004000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147499:1: WHERE_BIGNULL_SORT = 0x00080000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147504:1: WHERE_BLOOMFILTER = 0x00400000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147507:1: WHERE_BOTH_LIMIT = 0x00000030 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147491:1: WHERE_BTM_LIMIT = 0x00000020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147490:1: WHERE_COLUMN_EQ = 0x00000001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147484:1: WHERE_COLUMN_IN = 0x00000004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147486:1: WHERE_COLUMN_NULL = 0x00000008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147487:1: WHERE_COLUMN_RANGE = 0x00000002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147485:1: WHERE_CONSTRAINT = 0x0000000f // testdata/sqlite-amalgamation-3380500/sqlite3.c:147488:1: WHERE_DISTINCTBY = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18396:1: WHERE_DISTINCT_NOOP = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18408:1: WHERE_DISTINCT_ORDERED = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18410:1: WHERE_DISTINCT_UNIQUE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18409:1: WHERE_DISTINCT_UNORDERED = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18411:1: WHERE_DUPLICATES_OK = 0x0010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18392:1: WHERE_GROUPBY = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18395:1: WHERE_IDX_ONLY = 0x00000040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147492:1: WHERE_INDEXED = 0x00000200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147494:1: WHERE_IN_ABLE = 0x00000800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147496:1: WHERE_IN_EARLYOUT = 0x00040000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147503:1: WHERE_IN_SEEKSCAN = 0x00100000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147505:1: WHERE_IPK = 0x00000100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147493:1: WHERE_MULTI_OR = 0x00002000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147498:1: WHERE_OMIT_OFFSET = 0x01000000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147509:1: WHERE_ONEPASS_DESIRED = 0x0004 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18390:1: WHERE_ONEPASS_MULTIROW = 0x0008 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18391:1: WHERE_ONEROW = 0x00001000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147497:1: WHERE_ORDERBY_LIMIT = 0x0800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18400:1: WHERE_ORDERBY_MAX = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18389:1: WHERE_ORDERBY_MIN = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18388:1: WHERE_ORDERBY_NORMAL = 0x0000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18387:1: WHERE_OR_SUBCLAUSE = 0x0020 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18393:1: WHERE_PARTIALIDX = 0x00020000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147502:1: WHERE_SELFCULL = 0x00800000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147508:1: WHERE_SKIPSCAN = 0x00008000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147500:1: WHERE_SORTBYGROUP = 0x0200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18398:1: WHERE_TOP_LIMIT = 0x00000010 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147489:1: WHERE_TRANSCONS = 0x00200000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147506:1: WHERE_UNQ_WANTED = 0x00010000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147501:1: WHERE_USE_LIMIT = 0x4000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18403:1: WHERE_VIRTUALTABLE = 0x00000400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147495:1: WHERE_WANT_DISTINCT = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:18397:1: WHITEONBLACK = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:90:1: WHITE_BRUSH = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1438:1: WHITE_PEN = 6 // /usr/x86_64-w64-mingw32/include/wingdi.h:1445:1: WH_CALLWNDPROC = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:456:1: WH_CALLWNDPROCRET = 12 // /usr/x86_64-w64-mingw32/include/winuser.h:464:1: WH_CBT = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:457:1: WH_DEBUG = 9 // /usr/x86_64-w64-mingw32/include/winuser.h:461:1: WH_FOREGROUNDIDLE = 11 // /usr/x86_64-w64-mingw32/include/winuser.h:463:1: WH_GETMESSAGE = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:455:1: WH_HARDWARE = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:460:1: WH_JOURNALPLAYBACK = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:453:1: WH_JOURNALRECORD = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:452:1: WH_KEYBOARD = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:454:1: WH_KEYBOARD_LL = 13 // /usr/x86_64-w64-mingw32/include/winuser.h:466:1: WH_MAX = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:469:1: WH_MAXHOOK = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:472:1: WH_MIN = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:450:1: WH_MINHOOK = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:471:1: WH_MOUSE = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:459:1: WH_MOUSE_LL = 14 // /usr/x86_64-w64-mingw32/include/winuser.h:467:1: WH_MSGFILTER = -1 // /usr/x86_64-w64-mingw32/include/winuser.h:451:1: WH_SHELL = 10 // /usr/x86_64-w64-mingw32/include/winuser.h:462:1: WH_SYSMSGFILTER = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:458:1: WIM_CLOSE = 959 // /usr/x86_64-w64-mingw32/include/mmsystem.h:295:1: WIM_DATA = 960 // /usr/x86_64-w64-mingw32/include/mmsystem.h:296:1: WIM_OPEN = 958 // /usr/x86_64-w64-mingw32/include/mmsystem.h:294:1: WIN32 = 1 // <predefined>:259:1: WIN64 = 1 // <predefined>:263:1: WINAPI = 0 // /usr/x86_64-w64-mingw32/include/intrin.h:102:1: WINAPI_FAMILY = 3 // /usr/x86_64-w64-mingw32/include/winapifamily.h:18:1: WINAPI_FAMILY_APP = 2 // /usr/x86_64-w64-mingw32/include/winapifamily.h:12:1: WINAPI_FAMILY_DESKTOP_APP = 3 // /usr/x86_64-w64-mingw32/include/winapifamily.h:13:1: WINAPI_INLINE = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:113:1: WINAPI_PARTITION_APP = 0x2 // /usr/x86_64-w64-mingw32/include/winapifamily.h:10:1: WINAPI_PARTITION_DESKTOP = 0x1 // /usr/x86_64-w64-mingw32/include/winapifamily.h:9:1: WINCRYPT_DWORD_CPP_ONLY = 0 // /usr/x86_64-w64-mingw32/include/wincrypt.h:3653:1: WINDING = 2 // /usr/x86_64-w64-mingw32/include/wingdi.h:101:1: WINDOW_AGGINVERSE = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:160055:1: WINDOW_AGGSTEP = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:160056:1: WINDOW_BUFFER_SIZE_EVENT = 0x4 // /usr/x86_64-w64-mingw32/include/wincon.h:107:1: WINDOW_ENDING_INT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:159759:1: WINDOW_ENDING_NUM = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:159762:1: WINDOW_NTH_VALUE_INT = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:159760:1: WINDOW_RETURN_ROW = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:160054:1: WINDOW_STARTING_INT = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:159758:1: WINDOW_STARTING_NUM = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:159761:1: WINEVENT_INCONTEXT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:5895:1: WINEVENT_OUTOFCONTEXT = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:5892:1: WINEVENT_SKIPOWNPROCESS = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:5894:1: WINEVENT_SKIPOWNTHREAD = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:5893:1: WINFILE_PERSIST_WAL = 0x04 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43228:1: WINFILE_PSOW = 0x10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43229:1: WINFILE_RDONLY = 0x02 // testdata/sqlite-amalgamation-3380500/sqlite3.c:43227:1: WININETINFO_OPTION_LOCK_HANDLE = 65534 // /usr/x86_64-w64-mingw32/include/urlmon.h:3881:1: WINNT = 1 // <predefined>:316:1: WINPERF_LOG_DEBUG = 2 // /usr/x86_64-w64-mingw32/include/winperf.h:189:1: WINPERF_LOG_NONE = 0 // /usr/x86_64-w64-mingw32/include/winperf.h:187:1: WINPERF_LOG_USER = 1 // /usr/x86_64-w64-mingw32/include/winperf.h:188:1: WINPERF_LOG_VERBOSE = 3 // /usr/x86_64-w64-mingw32/include/winperf.h:190:1: WINPTHREAD_API = 0 // /usr/x86_64-w64-mingw32/include/pthread_time.h:80:1: WINSCARDAPI = 0 // /usr/x86_64-w64-mingw32/include/winscard.h:31:1: WINSHM_RDLCK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46705:1: WINSHM_UNLCK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46704:1: WINSHM_WRLCK = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46706:1: WINSTA_ACCESSCLIPBOARD = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:819:1: WINSTA_ACCESSGLOBALATOMS = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:822:1: WINSTA_ALL_ACCESS = 895 // /usr/x86_64-w64-mingw32/include/winuser.h:826:1: WINSTA_CREATEDESKTOP = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:820:1: WINSTA_ENUMDESKTOPS = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:817:1: WINSTA_ENUMERATE = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:824:1: WINSTA_EXITWINDOWS = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:823:1: WINSTA_READATTRIBUTES = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:818:1: WINSTA_READSCREEN = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:825:1: WINSTA_WRITEATTRIBUTES = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:821:1: WINVER = 1282 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:181:1: WIN_PTHREADS_TIME_H = 0 // /usr/x86_64-w64-mingw32/include/pthread_time.h:26:1: WIN_SHM_BASE = 120 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46698:1: WIN_SHM_DMS = 128 // testdata/sqlite-amalgamation-3380500/sqlite3.c:46699:1: WIZ_BODYCX = 184 // /usr/x86_64-w64-mingw32/include/prsht.h:469:1: WIZ_BODYX = 92 // /usr/x86_64-w64-mingw32/include/prsht.h:468:1: WIZ_CXBMP = 80 // /usr/x86_64-w64-mingw32/include/prsht.h:466:1: WIZ_CXDLG = 276 // /usr/x86_64-w64-mingw32/include/prsht.h:463:1: WIZ_CYDLG = 140 // /usr/x86_64-w64-mingw32/include/prsht.h:464:1: WMSZ_BOTTOM = 6 // /usr/x86_64-w64-mingw32/include/winuser.h:1446:1: WMSZ_BOTTOMLEFT = 7 // /usr/x86_64-w64-mingw32/include/winuser.h:1447:1: WMSZ_BOTTOMRIGHT = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1448:1: WMSZ_LEFT = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1441:1: WMSZ_RIGHT = 2 // /usr/x86_64-w64-mingw32/include/winuser.h:1442:1: WMSZ_TOP = 3 // /usr/x86_64-w64-mingw32/include/winuser.h:1443:1: WMSZ_TOPLEFT = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1444:1: WMSZ_TOPRIGHT = 5 // /usr/x86_64-w64-mingw32/include/winuser.h:1445:1: WM_ACTIVATE = 0x0006 // /usr/x86_64-w64-mingw32/include/winuser.h:1034:1: WM_ACTIVATEAPP = 0x001C // /usr/x86_64-w64-mingw32/include/winuser.h:1061:1: WM_AFXFIRST = 0x0360 // /usr/x86_64-w64-mingw32/include/winuser.h:1434:1: WM_AFXLAST = 0x037F // /usr/x86_64-w64-mingw32/include/winuser.h:1435:1: WM_APP = 0x8000 // /usr/x86_64-w64-mingw32/include/winuser.h:1438:1: WM_APPCOMMAND = 0x0319 // /usr/x86_64-w64-mingw32/include/winuser.h:1415:1: WM_ASKCBFORMATNAME = 0x030C // /usr/x86_64-w64-mingw32/include/winuser.h:1406:1: WM_CANCELJOURNAL = 0x004B // /usr/x86_64-w64-mingw32/include/winuser.h:1112:1: WM_CANCELMODE = 0x001F // /usr/x86_64-w64-mingw32/include/winuser.h:1064:1: WM_CAPTURECHANGED = 0x0215 // /usr/x86_64-w64-mingw32/include/winuser.h:1283:1: WM_CHANGECBCHAIN = 0x030D // /usr/x86_64-w64-mingw32/include/winuser.h:1407:1: WM_CHANGEUISTATE = 0x0127 // /usr/x86_64-w64-mingw32/include/winuser.h:1215:1: WM_CHAR = 0x0102 // /usr/x86_64-w64-mingw32/include/winuser.h:1177:1: WM_CHARTOITEM = 0x002F // /usr/x86_64-w64-mingw32/include/winuser.h:1089:1: WM_CHILDACTIVATE = 0x0022 // /usr/x86_64-w64-mingw32/include/winuser.h:1067:1: WM_CHOOSEFONT_GETLOGFONT = 1025 // /usr/x86_64-w64-mingw32/include/commdlg.h:483:1: WM_CHOOSEFONT_SETFLAGS = 1126 // /usr/x86_64-w64-mingw32/include/commdlg.h:485:1: WM_CHOOSEFONT_SETLOGFONT = 1125 // /usr/x86_64-w64-mingw32/include/commdlg.h:484:1: WM_CLEAR = 0x0303 // /usr/x86_64-w64-mingw32/include/winuser.h:1397:1: WM_CLIPBOARDUPDATE = 0x031d // /usr/x86_64-w64-mingw32/include/winuser.h:1417:1: WM_CLOSE = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1048:1: WM_COMMAND = 0x0111 // /usr/x86_64-w64-mingw32/include/winuser.h:1195:1: WM_COMMNOTIFY = 0x0044 // /usr/x86_64-w64-mingw32/include/winuser.h:1100:1: WM_COMPACTING = 0x0041 // /usr/x86_64-w64-mingw32/include/winuser.h:1099:1: WM_COMPAREITEM = 0x0039 // /usr/x86_64-w64-mingw32/include/winuser.h:1095:1: WM_CONTEXTMENU = 0x007B // /usr/x86_64-w64-mingw32/include/winuser.h:1141:1: WM_COPY = 0x0301 // /usr/x86_64-w64-mingw32/include/winuser.h:1395:1: WM_COPYDATA = 0x004A // /usr/x86_64-w64-mingw32/include/winuser.h:1111:1: WM_CREATE = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1029:1: WM_CTLCOLORBTN = 0x0135 // /usr/x86_64-w64-mingw32/include/winuser.h:1231:1: WM_CTLCOLORDLG = 0x0136 // /usr/x86_64-w64-mingw32/include/winuser.h:1232:1: WM_CTLCOLOREDIT = 0x0133 // /usr/x86_64-w64-mingw32/include/winuser.h:1229:1: WM_CTLCOLORLISTBOX = 0x0134 // /usr/x86_64-w64-mingw32/include/winuser.h:1230:1: WM_CTLCOLORMSGBOX = 0x0132 // /usr/x86_64-w64-mingw32/include/winuser.h:1228:1: WM_CTLCOLORSCROLLBAR = 0x0137 // /usr/x86_64-w64-mingw32/include/winuser.h:1233:1: WM_CTLCOLORSTATIC = 0x0138 // /usr/x86_64-w64-mingw32/include/winuser.h:1234:1: WM_CUT = 0x0300 // /usr/x86_64-w64-mingw32/include/winuser.h:1394:1: WM_DDE_ACK = 996 // /usr/x86_64-w64-mingw32/include/dde.h:20:1: WM_DDE_ADVISE = 994 // /usr/x86_64-w64-mingw32/include/dde.h:18:1: WM_DDE_DATA = 997 // /usr/x86_64-w64-mingw32/include/dde.h:21:1: WM_DDE_EXECUTE = 1000 // /usr/x86_64-w64-mingw32/include/dde.h:24:1: WM_DDE_FIRST = 0x03E0 // /usr/x86_64-w64-mingw32/include/dde.h:15:1: WM_DDE_INITIATE = 992 // /usr/x86_64-w64-mingw32/include/dde.h:16:1: WM_DDE_LAST = 1000 // /usr/x86_64-w64-mingw32/include/dde.h:25:1: WM_DDE_POKE = 999 // /usr/x86_64-w64-mingw32/include/dde.h:23:1: WM_DDE_REQUEST = 998 // /usr/x86_64-w64-mingw32/include/dde.h:22:1: WM_DDE_TERMINATE = 993 // /usr/x86_64-w64-mingw32/include/dde.h:17:1: WM_DDE_UNADVISE = 995 // /usr/x86_64-w64-mingw32/include/dde.h:19:1: WM_DEADCHAR = 0x0103 // /usr/x86_64-w64-mingw32/include/winuser.h:1178:1: WM_DELETEITEM = 0x002D // /usr/x86_64-w64-mingw32/include/winuser.h:1087:1: WM_DESTROY = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1030:1: WM_DESTROYCLIPBOARD = 0x0307 // /usr/x86_64-w64-mingw32/include/winuser.h:1401:1: WM_DEVICECHANGE = 0x0219 // /usr/x86_64-w64-mingw32/include/winuser.h:1323:1: WM_DEVMODECHANGE = 0x001B // /usr/x86_64-w64-mingw32/include/winuser.h:1060:1: WM_DISPLAYCHANGE = 0x007E // /usr/x86_64-w64-mingw32/include/winuser.h:1144:1: WM_DRAWCLIPBOARD = 0x0308 // /usr/x86_64-w64-mingw32/include/winuser.h:1402:1: WM_DRAWITEM = 0x002B // /usr/x86_64-w64-mingw32/include/winuser.h:1085:1: WM_DROPFILES = 0x0233 // /usr/x86_64-w64-mingw32/include/winuser.h:1339:1: WM_ENABLE = 0x000A // /usr/x86_64-w64-mingw32/include/winuser.h:1042:1: WM_ENDSESSION = 0x0016 // /usr/x86_64-w64-mingw32/include/winuser.h:1052:1: WM_ENTERIDLE = 0x0121 // /usr/x86_64-w64-mingw32/include/winuser.h:1208:1: WM_ENTERMENULOOP = 0x0211 // /usr/x86_64-w64-mingw32/include/winuser.h:1279:1: WM_ENTERSIZEMOVE = 0x0231 // /usr/x86_64-w64-mingw32/include/winuser.h:1337:1: WM_ERASEBKGND = 0x0014 // /usr/x86_64-w64-mingw32/include/winuser.h:1055:1: WM_EXITMENULOOP = 0x0212 // /usr/x86_64-w64-mingw32/include/winuser.h:1280:1: WM_EXITSIZEMOVE = 0x0232 // /usr/x86_64-w64-mingw32/include/winuser.h:1338:1: WM_FONTCHANGE = 0x001D // /usr/x86_64-w64-mingw32/include/winuser.h:1062:1: WM_GETDLGCODE = 0x0087 // /usr/x86_64-w64-mingw32/include/winuser.h:1154:1: WM_GETFONT = 0x0031 // /usr/x86_64-w64-mingw32/include/winuser.h:1091:1: WM_GETHOTKEY = 0x0033 // /usr/x86_64-w64-mingw32/include/winuser.h:1093:1: WM_GETICON = 0x007F // /usr/x86_64-w64-mingw32/include/winuser.h:1145:1: WM_GETMINMAXINFO = 0x0024 // /usr/x86_64-w64-mingw32/include/winuser.h:1069:1: WM_GETOBJECT = 0x003D // /usr/x86_64-w64-mingw32/include/winuser.h:1097:1: WM_GETTEXT = 0x000D // /usr/x86_64-w64-mingw32/include/winuser.h:1045:1: WM_GETTEXTLENGTH = 0x000E // /usr/x86_64-w64-mingw32/include/winuser.h:1046:1: WM_HANDHELDFIRST = 0x0358 // /usr/x86_64-w64-mingw32/include/winuser.h:1432:1: WM_HANDHELDLAST = 0x035F // /usr/x86_64-w64-mingw32/include/winuser.h:1433:1: WM_HELP = 0x0053 // /usr/x86_64-w64-mingw32/include/winuser.h:1132:1: WM_HOTKEY = 0x0312 // /usr/x86_64-w64-mingw32/include/winuser.h:1412:1: WM_HSCROLL = 0x0114 // /usr/x86_64-w64-mingw32/include/winuser.h:1198:1: WM_HSCROLLCLIPBOARD = 0x030E // /usr/x86_64-w64-mingw32/include/winuser.h:1408:1: WM_ICONERASEBKGND = 0x0027 // /usr/x86_64-w64-mingw32/include/winuser.h:1082:1: WM_IME_CHAR = 0x0286 // /usr/x86_64-w64-mingw32/include/winuser.h:1374:1: WM_IME_COMPOSITION = 0x010F // /usr/x86_64-w64-mingw32/include/winuser.h:1192:1: WM_IME_COMPOSITIONFULL = 0x0284 // /usr/x86_64-w64-mingw32/include/winuser.h:1372:1: WM_IME_CONTROL = 0x0283 // /usr/x86_64-w64-mingw32/include/winuser.h:1371:1: WM_IME_ENDCOMPOSITION = 0x010E // /usr/x86_64-w64-mingw32/include/winuser.h:1191:1: WM_IME_KEYDOWN = 0x0290 // /usr/x86_64-w64-mingw32/include/winuser.h:1376:1: WM_IME_KEYLAST = 0x010F // /usr/x86_64-w64-mingw32/include/winuser.h:1193:1: WM_IME_KEYUP = 0x0291 // /usr/x86_64-w64-mingw32/include/winuser.h:1377:1: WM_IME_NOTIFY = 0x0282 // /usr/x86_64-w64-mingw32/include/winuser.h:1370:1: WM_IME_REQUEST = 0x0288 // /usr/x86_64-w64-mingw32/include/winuser.h:1375:1: WM_IME_SELECT = 0x0285 // /usr/x86_64-w64-mingw32/include/winuser.h:1373:1: WM_IME_SETCONTEXT = 0x0281 // /usr/x86_64-w64-mingw32/include/winuser.h:1369:1: WM_IME_STARTCOMPOSITION = 0x010D // /usr/x86_64-w64-mingw32/include/winuser.h:1190:1: WM_INITDIALOG = 0x0110 // /usr/x86_64-w64-mingw32/include/winuser.h:1194:1: WM_INITMENU = 0x0116 // /usr/x86_64-w64-mingw32/include/winuser.h:1200:1: WM_INITMENUPOPUP = 0x0117 // /usr/x86_64-w64-mingw32/include/winuser.h:1201:1: WM_INPUT = 0x00FF // /usr/x86_64-w64-mingw32/include/winuser.h:1173:1: WM_INPUTLANGCHANGE = 0x0051 // /usr/x86_64-w64-mingw32/include/winuser.h:1130:1: WM_INPUTLANGCHANGEREQUEST = 0x0050 // /usr/x86_64-w64-mingw32/include/winuser.h:1129:1: WM_INPUT_DEVICE_CHANGE = 0x00fe // /usr/x86_64-w64-mingw32/include/winuser.h:1172:1: WM_KEYDOWN = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:1175:1: WM_KEYFIRST = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:1174:1: WM_KEYLAST = 0x0109 // /usr/x86_64-w64-mingw32/include/winuser.h:1185:1: WM_KEYUP = 0x0101 // /usr/x86_64-w64-mingw32/include/winuser.h:1176:1: WM_KILLFOCUS = 0x0008 // /usr/x86_64-w64-mingw32/include/winuser.h:1041:1: WM_LBUTTONDBLCLK = 0x0203 // /usr/x86_64-w64-mingw32/include/winuser.h:1241:1: WM_LBUTTONDOWN = 0x0201 // /usr/x86_64-w64-mingw32/include/winuser.h:1239:1: WM_LBUTTONUP = 0x0202 // /usr/x86_64-w64-mingw32/include/winuser.h:1240:1: WM_MBUTTONDBLCLK = 0x0209 // /usr/x86_64-w64-mingw32/include/winuser.h:1247:1: WM_MBUTTONDOWN = 0x0207 // /usr/x86_64-w64-mingw32/include/winuser.h:1245:1: WM_MBUTTONUP = 0x0208 // /usr/x86_64-w64-mingw32/include/winuser.h:1246:1: WM_MDIACTIVATE = 0x0222 // /usr/x86_64-w64-mingw32/include/winuser.h:1327:1: WM_MDICASCADE = 0x0227 // /usr/x86_64-w64-mingw32/include/winuser.h:1332:1: WM_MDICREATE = 0x0220 // /usr/x86_64-w64-mingw32/include/winuser.h:1325:1: WM_MDIDESTROY = 0x0221 // /usr/x86_64-w64-mingw32/include/winuser.h:1326:1: WM_MDIGETACTIVE = 0x0229 // /usr/x86_64-w64-mingw32/include/winuser.h:1334:1: WM_MDIICONARRANGE = 0x0228 // /usr/x86_64-w64-mingw32/include/winuser.h:1333:1: WM_MDIMAXIMIZE = 0x0225 // /usr/x86_64-w64-mingw32/include/winuser.h:1330:1: WM_MDINEXT = 0x0224 // /usr/x86_64-w64-mingw32/include/winuser.h:1329:1: WM_MDIREFRESHMENU = 0x0234 // /usr/x86_64-w64-mingw32/include/winuser.h:1340:1: WM_MDIRESTORE = 0x0223 // /usr/x86_64-w64-mingw32/include/winuser.h:1328:1: WM_MDISETMENU = 0x0230 // /usr/x86_64-w64-mingw32/include/winuser.h:1336:1: WM_MDITILE = 0x0226 // /usr/x86_64-w64-mingw32/include/winuser.h:1331:1: WM_MEASUREITEM = 0x002C // /usr/x86_64-w64-mingw32/include/winuser.h:1086:1: WM_MENUCHAR = 0x0120 // /usr/x86_64-w64-mingw32/include/winuser.h:1207:1: WM_MENUCOMMAND = 0x0126 // /usr/x86_64-w64-mingw32/include/winuser.h:1214:1: WM_MENUDRAG = 0x0123 // /usr/x86_64-w64-mingw32/include/winuser.h:1211:1: WM_MENUGETOBJECT = 0x0124 // /usr/x86_64-w64-mingw32/include/winuser.h:1212:1: WM_MENURBUTTONUP = 0x0122 // /usr/x86_64-w64-mingw32/include/winuser.h:1210:1: WM_MENUSELECT = 0x011F // /usr/x86_64-w64-mingw32/include/winuser.h:1202:1: WM_MOUSEACTIVATE = 0x0021 // /usr/x86_64-w64-mingw32/include/winuser.h:1066:1: WM_MOUSEFIRST = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1237:1: WM_MOUSEHOVER = 0x02A1 // /usr/x86_64-w64-mingw32/include/winuser.h:1379:1: WM_MOUSELAST = 0x020d // /usr/x86_64-w64-mingw32/include/winuser.h:1259:1: WM_MOUSELEAVE = 0x02A3 // /usr/x86_64-w64-mingw32/include/winuser.h:1380:1: WM_MOUSEMOVE = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1238:1: WM_MOUSEWHEEL = 0x020A // /usr/x86_64-w64-mingw32/include/winuser.h:1248:1: WM_MOVE = 0x0003 // /usr/x86_64-w64-mingw32/include/winuser.h:1031:1: WM_MOVING = 0x0216 // /usr/x86_64-w64-mingw32/include/winuser.h:1284:1: WM_NCACTIVATE = 0x0086 // /usr/x86_64-w64-mingw32/include/winuser.h:1153:1: WM_NCCALCSIZE = 0x0083 // /usr/x86_64-w64-mingw32/include/winuser.h:1150:1: WM_NCCREATE = 0x0081 // /usr/x86_64-w64-mingw32/include/winuser.h:1148:1: WM_NCDESTROY = 0x0082 // /usr/x86_64-w64-mingw32/include/winuser.h:1149:1: WM_NCHITTEST = 0x0084 // /usr/x86_64-w64-mingw32/include/winuser.h:1151:1: WM_NCLBUTTONDBLCLK = 0x00A3 // /usr/x86_64-w64-mingw32/include/winuser.h:1161:1: WM_NCLBUTTONDOWN = 0x00A1 // /usr/x86_64-w64-mingw32/include/winuser.h:1159:1: WM_NCLBUTTONUP = 0x00A2 // /usr/x86_64-w64-mingw32/include/winuser.h:1160:1: WM_NCMBUTTONDBLCLK = 0x00A9 // /usr/x86_64-w64-mingw32/include/winuser.h:1167:1: WM_NCMBUTTONDOWN = 0x00A7 // /usr/x86_64-w64-mingw32/include/winuser.h:1165:1: WM_NCMBUTTONUP = 0x00A8 // /usr/x86_64-w64-mingw32/include/winuser.h:1166:1: WM_NCMOUSEHOVER = 0x02A0 // /usr/x86_64-w64-mingw32/include/winuser.h:1381:1: WM_NCMOUSELEAVE = 0x02A2 // /usr/x86_64-w64-mingw32/include/winuser.h:1382:1: WM_NCMOUSEMOVE = 0x00A0 // /usr/x86_64-w64-mingw32/include/winuser.h:1158:1: WM_NCPAINT = 0x0085 // /usr/x86_64-w64-mingw32/include/winuser.h:1152:1: WM_NCRBUTTONDBLCLK = 0x00A6 // /usr/x86_64-w64-mingw32/include/winuser.h:1164:1: WM_NCRBUTTONDOWN = 0x00A4 // /usr/x86_64-w64-mingw32/include/winuser.h:1162:1: WM_NCRBUTTONUP = 0x00A5 // /usr/x86_64-w64-mingw32/include/winuser.h:1163:1: WM_NCXBUTTONDBLCLK = 0x00AD // /usr/x86_64-w64-mingw32/include/winuser.h:1171:1: WM_NCXBUTTONDOWN = 0x00AB // /usr/x86_64-w64-mingw32/include/winuser.h:1169:1: WM_NCXBUTTONUP = 0x00AC // /usr/x86_64-w64-mingw32/include/winuser.h:1170:1: WM_NEXTDLGCTL = 0x0028 // /usr/x86_64-w64-mingw32/include/winuser.h:1083:1: WM_NEXTMENU = 0x0213 // /usr/x86_64-w64-mingw32/include/winuser.h:1281:1: WM_NOTIFY = 0x004E // /usr/x86_64-w64-mingw32/include/winuser.h:1128:1: WM_NOTIFYFORMAT = 0x0055 // /usr/x86_64-w64-mingw32/include/winuser.h:1134:1: WM_NULL = 0x0000 // /usr/x86_64-w64-mingw32/include/winuser.h:1028:1: WM_PAINT = 0x000F // /usr/x86_64-w64-mingw32/include/winuser.h:1047:1: WM_PAINTCLIPBOARD = 0x0309 // /usr/x86_64-w64-mingw32/include/winuser.h:1403:1: WM_PAINTICON = 0x0026 // /usr/x86_64-w64-mingw32/include/winuser.h:1081:1: WM_PALETTECHANGED = 0x0311 // /usr/x86_64-w64-mingw32/include/winuser.h:1411:1: WM_PALETTEISCHANGING = 0x0310 // /usr/x86_64-w64-mingw32/include/winuser.h:1410:1: WM_PARENTNOTIFY = 0x0210 // /usr/x86_64-w64-mingw32/include/winuser.h:1278:1: WM_PASTE = 0x0302 // /usr/x86_64-w64-mingw32/include/winuser.h:1396:1: WM_PENWINFIRST = 0x0380 // /usr/x86_64-w64-mingw32/include/winuser.h:1436:1: WM_PENWINLAST = 0x038F // /usr/x86_64-w64-mingw32/include/winuser.h:1437:1: WM_POWER = 0x0048 // /usr/x86_64-w64-mingw32/include/winuser.h:1103:1: WM_POWERBROADCAST = 0x0218 // /usr/x86_64-w64-mingw32/include/winuser.h:1285:1: WM_PRINT = 0x0317 // /usr/x86_64-w64-mingw32/include/winuser.h:1413:1: WM_PRINTCLIENT = 0x0318 // /usr/x86_64-w64-mingw32/include/winuser.h:1414:1: WM_PSD_ENVSTAMPRECT = 1029 // /usr/x86_64-w64-mingw32/include/commdlg.h:713:1: WM_PSD_FULLPAGERECT = 1025 // /usr/x86_64-w64-mingw32/include/commdlg.h:709:1: WM_PSD_GREEKTEXTRECT = 1028 // /usr/x86_64-w64-mingw32/include/commdlg.h:712:1: WM_PSD_MARGINRECT = 1027 // /usr/x86_64-w64-mingw32/include/commdlg.h:711:1: WM_PSD_MINMARGINRECT = 1026 // /usr/x86_64-w64-mingw32/include/commdlg.h:710:1: WM_PSD_PAGESETUPDLG = 1024 // /usr/x86_64-w64-mingw32/include/commdlg.h:708:1: WM_PSD_YAFULLPAGERECT = 1030 // /usr/x86_64-w64-mingw32/include/commdlg.h:714:1: WM_QUERYDRAGICON = 0x0037 // /usr/x86_64-w64-mingw32/include/winuser.h:1094:1: WM_QUERYENDSESSION = 0x0011 // /usr/x86_64-w64-mingw32/include/winuser.h:1050:1: WM_QUERYNEWPALETTE = 0x030F // /usr/x86_64-w64-mingw32/include/winuser.h:1409:1: WM_QUERYOPEN = 0x0013 // /usr/x86_64-w64-mingw32/include/winuser.h:1051:1: WM_QUERYUISTATE = 0x0129 // /usr/x86_64-w64-mingw32/include/winuser.h:1217:1: WM_QUEUESYNC = 0x0023 // /usr/x86_64-w64-mingw32/include/winuser.h:1068:1: WM_QUIT = 0x0012 // /usr/x86_64-w64-mingw32/include/winuser.h:1054:1: WM_RBUTTONDBLCLK = 0x0206 // /usr/x86_64-w64-mingw32/include/winuser.h:1244:1: WM_RBUTTONDOWN = 0x0204 // /usr/x86_64-w64-mingw32/include/winuser.h:1242:1: WM_RBUTTONUP = 0x0205 // /usr/x86_64-w64-mingw32/include/winuser.h:1243:1: WM_RENDERALLFORMATS = 0x0306 // /usr/x86_64-w64-mingw32/include/winuser.h:1400:1: WM_RENDERFORMAT = 0x0305 // /usr/x86_64-w64-mingw32/include/winuser.h:1399:1: WM_SETCURSOR = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1065:1: WM_SETFOCUS = 0x0007 // /usr/x86_64-w64-mingw32/include/winuser.h:1040:1: WM_SETFONT = 0x0030 // /usr/x86_64-w64-mingw32/include/winuser.h:1090:1: WM_SETHOTKEY = 0x0032 // /usr/x86_64-w64-mingw32/include/winuser.h:1092:1: WM_SETICON = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:1146:1: WM_SETREDRAW = 0x000B // /usr/x86_64-w64-mingw32/include/winuser.h:1043:1: WM_SETTEXT = 0x000C // /usr/x86_64-w64-mingw32/include/winuser.h:1044:1: WM_SETTINGCHANGE = 26 // /usr/x86_64-w64-mingw32/include/winuser.h:1059:1: WM_SHOWWINDOW = 0x0018 // /usr/x86_64-w64-mingw32/include/winuser.h:1057:1: WM_SIZE = 0x0005 // /usr/x86_64-w64-mingw32/include/winuser.h:1032:1: WM_SIZECLIPBOARD = 0x030B // /usr/x86_64-w64-mingw32/include/winuser.h:1405:1: WM_SIZING = 0x0214 // /usr/x86_64-w64-mingw32/include/winuser.h:1282:1: WM_SPOOLERSTATUS = 0x002A // /usr/x86_64-w64-mingw32/include/winuser.h:1084:1: WM_STYLECHANGED = 0x007D // /usr/x86_64-w64-mingw32/include/winuser.h:1143:1: WM_STYLECHANGING = 0x007C // /usr/x86_64-w64-mingw32/include/winuser.h:1142:1: WM_SYNCPAINT = 0x0088 // /usr/x86_64-w64-mingw32/include/winuser.h:1156:1: WM_SYSCHAR = 0x0106 // /usr/x86_64-w64-mingw32/include/winuser.h:1181:1: WM_SYSCOLORCHANGE = 0x0015 // /usr/x86_64-w64-mingw32/include/winuser.h:1056:1: WM_SYSCOMMAND = 0x0112 // /usr/x86_64-w64-mingw32/include/winuser.h:1196:1: WM_SYSDEADCHAR = 0x0107 // /usr/x86_64-w64-mingw32/include/winuser.h:1182:1: WM_SYSKEYDOWN = 0x0104 // /usr/x86_64-w64-mingw32/include/winuser.h:1179:1: WM_SYSKEYUP = 0x0105 // /usr/x86_64-w64-mingw32/include/winuser.h:1180:1: WM_TABLET_FIRST = 0x02c0 // /usr/x86_64-w64-mingw32/include/winuser.h:1384:1: WM_TABLET_LAST = 0x02df // /usr/x86_64-w64-mingw32/include/winuser.h:1385:1: WM_TCARD = 0x0052 // /usr/x86_64-w64-mingw32/include/winuser.h:1131:1: WM_THEMECHANGED = 0x031A // /usr/x86_64-w64-mingw32/include/winuser.h:1416:1: WM_TIMECHANGE = 0x001E // /usr/x86_64-w64-mingw32/include/winuser.h:1063:1: WM_TIMER = 0x0113 // /usr/x86_64-w64-mingw32/include/winuser.h:1197:1: WM_UNDO = 0x0304 // /usr/x86_64-w64-mingw32/include/winuser.h:1398:1: WM_UNICHAR = 0x0109 // /usr/x86_64-w64-mingw32/include/winuser.h:1184:1: WM_UNINITMENUPOPUP = 0x0125 // /usr/x86_64-w64-mingw32/include/winuser.h:1213:1: WM_UPDATEUISTATE = 0x0128 // /usr/x86_64-w64-mingw32/include/winuser.h:1216:1: WM_USER = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:1439:1: WM_USERCHANGED = 0x0054 // /usr/x86_64-w64-mingw32/include/winuser.h:1133:1: WM_VKEYTOITEM = 0x002E // /usr/x86_64-w64-mingw32/include/winuser.h:1088:1: WM_VSCROLL = 0x0115 // /usr/x86_64-w64-mingw32/include/winuser.h:1199:1: WM_VSCROLLCLIPBOARD = 0x030A // /usr/x86_64-w64-mingw32/include/winuser.h:1404:1: WM_WINDOWPOSCHANGED = 0x0047 // /usr/x86_64-w64-mingw32/include/winuser.h:1102:1: WM_WINDOWPOSCHANGING = 0x0046 // /usr/x86_64-w64-mingw32/include/winuser.h:1101:1: WM_WININICHANGE = 0x001A // /usr/x86_64-w64-mingw32/include/winuser.h:1058:1: WM_WTSSESSION_CHANGE = 0x02B1 // /usr/x86_64-w64-mingw32/include/winuser.h:1383:1: WM_XBUTTONDBLCLK = 0x020D // /usr/x86_64-w64-mingw32/include/winuser.h:1251:1: WM_XBUTTONDOWN = 0x020B // /usr/x86_64-w64-mingw32/include/winuser.h:1249:1: WM_XBUTTONUP = 0x020C // /usr/x86_64-w64-mingw32/include/winuser.h:1250:1: WNCON_DYNAMIC = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnetwk.h:346:1: WNCON_FORNETCARD = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnetwk.h:343:1: WNCON_NOTROUTED = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnetwk.h:344:1: WNCON_SLOWLINK = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnetwk.h:345:1: WNFMT_ABBREVIATED = 0x02 // /usr/x86_64-w64-mingw32/include/winnetwk.h:240:1: WNFMT_CONNECTION = 0x20 // /usr/x86_64-w64-mingw32/include/winnetwk.h:242:1: WNFMT_INENUM = 0x10 // /usr/x86_64-w64-mingw32/include/winnetwk.h:241:1: WNFMT_MULTILINE = 0x01 // /usr/x86_64-w64-mingw32/include/winnetwk.h:239:1: WNNC_CRED_MANAGER = 0xffff0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:82:1: WNNC_NET_10NET = 0x00050000 // /usr/x86_64-w64-mingw32/include/wnnc.h:18:1: WNNC_NET_3IN1 = 0x00270000 // /usr/x86_64-w64-mingw32/include/wnnc.h:52:1: WNNC_NET_9TILES = 0x00090000 // /usr/x86_64-w64-mingw32/include/wnnc.h:22:1: WNNC_NET_APPLETALK = 0x00130000 // /usr/x86_64-w64-mingw32/include/wnnc.h:32:1: WNNC_NET_AS400 = 0x000b0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:24:1: WNNC_NET_AVID = 0x001a0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:39:1: WNNC_NET_AVID1 = 0x003a0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:70:1: WNNC_NET_BMC = 0x00180000 // /usr/x86_64-w64-mingw32/include/wnnc.h:37:1: WNNC_NET_BWNFS = 0x00100000 // /usr/x86_64-w64-mingw32/include/wnnc.h:29:1: WNNC_NET_CLEARCASE = 0x00160000 // /usr/x86_64-w64-mingw32/include/wnnc.h:35:1: WNNC_NET_COGENT = 0x00110000 // /usr/x86_64-w64-mingw32/include/wnnc.h:30:1: WNNC_NET_CSC = 0x00260000 // /usr/x86_64-w64-mingw32/include/wnnc.h:51:1: WNNC_NET_DAV = 0x002e0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:58:1: WNNC_NET_DCE = 0x00190000 // /usr/x86_64-w64-mingw32/include/wnnc.h:38:1: WNNC_NET_DECORB = 0x00200000 // /usr/x86_64-w64-mingw32/include/wnnc.h:45:1: WNNC_NET_DFS = 0x003b0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:71:1: WNNC_NET_DISTINCT = 0x00230000 // /usr/x86_64-w64-mingw32/include/wnnc.h:48:1: WNNC_NET_DOCUSPACE = 0x001b0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:40:1: WNNC_NET_DRIVEONWEB = 0x003e0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:74:1: WNNC_NET_EXIFS = 0x002d0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:57:1: WNNC_NET_EXTENDNET = 0x00290000 // /usr/x86_64-w64-mingw32/include/wnnc.h:53:1: WNNC_NET_FARALLON = 0x00120000 // /usr/x86_64-w64-mingw32/include/wnnc.h:31:1: WNNC_NET_FJ_REDIR = 0x00220000 // /usr/x86_64-w64-mingw32/include/wnnc.h:47:1: WNNC_NET_FOXBAT = 0x002b0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:55:1: WNNC_NET_FRONTIER = 0x00170000 // /usr/x86_64-w64-mingw32/include/wnnc.h:36:1: WNNC_NET_FTP_NFS = 0x000c0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:25:1: WNNC_NET_GOOGLE = 0x00430000 // /usr/x86_64-w64-mingw32/include/wnnc.h:79:1: WNNC_NET_HOB_NFS = 0x00320000 // /usr/x86_64-w64-mingw32/include/wnnc.h:62:1: WNNC_NET_IBMAL = 0x00340000 // /usr/x86_64-w64-mingw32/include/wnnc.h:64:1: WNNC_NET_INTERGRAPH = 0x00140000 // /usr/x86_64-w64-mingw32/include/wnnc.h:33:1: WNNC_NET_KNOWARE = 0x002f0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:59:1: WNNC_NET_KWNP = 0x003c0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:72:1: WNNC_NET_LANMAN = 131072 // /usr/x86_64-w64-mingw32/include/wnnc.h:14:1: WNNC_NET_LANSTEP = 0x00080000 // /usr/x86_64-w64-mingw32/include/wnnc.h:21:1: WNNC_NET_LANTASTIC = 0x000a0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:23:1: WNNC_NET_LIFENET = 0x000e0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:27:1: WNNC_NET_LOCK = 0x00350000 // /usr/x86_64-w64-mingw32/include/wnnc.h:65:1: WNNC_NET_LOCUS = 0x00060000 // /usr/x86_64-w64-mingw32/include/wnnc.h:19:1: WNNC_NET_MANGOSOFT = 0x001c0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:41:1: WNNC_NET_MASFAX = 0x00310000 // /usr/x86_64-w64-mingw32/include/wnnc.h:61:1: WNNC_NET_MFILES = 0x00410000 // /usr/x86_64-w64-mingw32/include/wnnc.h:77:1: WNNC_NET_MSNET = 0x00010000 // /usr/x86_64-w64-mingw32/include/wnnc.h:13:1: WNNC_NET_MS_NFS = 0x00420000 // /usr/x86_64-w64-mingw32/include/wnnc.h:78:1: WNNC_NET_NDFS = 0x00440000 // /usr/x86_64-w64-mingw32/include/wnnc.h:80:1: WNNC_NET_NETWARE = 0x00030000 // /usr/x86_64-w64-mingw32/include/wnnc.h:16:1: WNNC_NET_OBJECT_DIRE = 0x00300000 // /usr/x86_64-w64-mingw32/include/wnnc.h:60:1: WNNC_NET_OPENAFS = 0x00390000 // /usr/x86_64-w64-mingw32/include/wnnc.h:69:1: WNNC_NET_PATHWORKS = 0x000d0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:26:1: WNNC_NET_POWERLAN = 0x000f0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:28:1: WNNC_NET_PROTSTOR = 0x00210000 // /usr/x86_64-w64-mingw32/include/wnnc.h:46:1: WNNC_NET_QUINCY = 0x00380000 // /usr/x86_64-w64-mingw32/include/wnnc.h:68:1: WNNC_NET_RDR2SAMPLE = 0x00250000 // /usr/x86_64-w64-mingw32/include/wnnc.h:50:1: WNNC_NET_RIVERFRONT1 = 0x001e0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:43:1: WNNC_NET_RIVERFRONT2 = 0x001f0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:44:1: WNNC_NET_RSFX = 0x00400000 // /usr/x86_64-w64-mingw32/include/wnnc.h:76:1: WNNC_NET_SERNET = 0x001d0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:42:1: WNNC_NET_SHIVA = 0x00330000 // /usr/x86_64-w64-mingw32/include/wnnc.h:63:1: WNNC_NET_SMB = 0x00020000 // /usr/x86_64-w64-mingw32/include/wnnc.h:15:1: WNNC_NET_SRT = 0x00370000 // /usr/x86_64-w64-mingw32/include/wnnc.h:67:1: WNNC_NET_STAC = 0x002a0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:54:1: WNNC_NET_SUN_PC_NFS = 0x00070000 // /usr/x86_64-w64-mingw32/include/wnnc.h:20:1: WNNC_NET_SYMFONET = 0x00150000 // /usr/x86_64-w64-mingw32/include/wnnc.h:34:1: WNNC_NET_TERMSRV = 0x00360000 // /usr/x86_64-w64-mingw32/include/wnnc.h:66:1: WNNC_NET_TWINS = 0x00240000 // /usr/x86_64-w64-mingw32/include/wnnc.h:49:1: WNNC_NET_VINES = 0x00040000 // /usr/x86_64-w64-mingw32/include/wnnc.h:17:1: WNNC_NET_VMWARE = 0x003f0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:75:1: WNNC_NET_YAHOO = 0x002c0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:56:1: WNNC_NET_ZENWORKS = 0x003d0000 // /usr/x86_64-w64-mingw32/include/wnnc.h:73:1: WN_ACCESS_DENIED = 5 // /usr/x86_64-w64-mingw32/include/winnetwk.h:303:1: WN_ALREADY_CONNECTED = 85 // /usr/x86_64-w64-mingw32/include/winnetwk.h:318:1: WN_BAD_DEV_TYPE = 66 // /usr/x86_64-w64-mingw32/include/winnetwk.h:325:1: WN_BAD_HANDLE = 6 // /usr/x86_64-w64-mingw32/include/winnetwk.h:310:1: WN_BAD_LEVEL = 124 // /usr/x86_64-w64-mingw32/include/winnetwk.h:309:1: WN_BAD_LOCALNAME = 1200 // /usr/x86_64-w64-mingw32/include/winnetwk.h:317:1: WN_BAD_NETNAME = 67 // /usr/x86_64-w64-mingw32/include/winnetwk.h:316:1: WN_BAD_PASSWORD = 86 // /usr/x86_64-w64-mingw32/include/winnetwk.h:302:1: WN_BAD_POINTER = 487 // /usr/x86_64-w64-mingw32/include/winnetwk.h:299:1: WN_BAD_PROFILE = 1206 // /usr/x86_64-w64-mingw32/include/winnetwk.h:324:1: WN_BAD_PROVIDER = 1204 // /usr/x86_64-w64-mingw32/include/winnetwk.h:322:1: WN_BAD_USER = 2202 // /usr/x86_64-w64-mingw32/include/winnetwk.h:301:1: WN_BAD_VALUE = 87 // /usr/x86_64-w64-mingw32/include/winnetwk.h:300:1: WN_CANCEL = 1223 // /usr/x86_64-w64-mingw32/include/winnetwk.h:295:1: WN_CANNOT_OPEN_PROFILE = 1205 // /usr/x86_64-w64-mingw32/include/winnetwk.h:323:1: WN_CONNECTED_OTHER_PASSWORD = 2108 // /usr/x86_64-w64-mingw32/include/winnetwk.h:327:1: WN_CONNECTED_OTHER_PASSWORD_DEFAULT = 2109 // /usr/x86_64-w64-mingw32/include/winnetwk.h:328:1: WN_CONNECTION_CLOSED = 1201 // /usr/x86_64-w64-mingw32/include/winnetwk.h:320:1: WN_DEVICE_ALREADY_REMEMBERED = 1202 // /usr/x86_64-w64-mingw32/include/winnetwk.h:326:1: WN_DEVICE_ERROR = 31 // /usr/x86_64-w64-mingw32/include/winnetwk.h:319:1: WN_DEVICE_IN_USE = 2404 // /usr/x86_64-w64-mingw32/include/winnetwk.h:315:1: WN_EXTENDED_ERROR = 1208 // /usr/x86_64-w64-mingw32/include/winnetwk.h:308:1: WN_FUNCTION_BUSY = 170 // /usr/x86_64-w64-mingw32/include/winnetwk.h:304:1: WN_MORE_DATA = 234 // /usr/x86_64-w64-mingw32/include/winnetwk.h:298:1: WN_NET_ERROR = 59 // /usr/x86_64-w64-mingw32/include/winnetwk.h:297:1: WN_NOT_AUTHENTICATED = 1244 // /usr/x86_64-w64-mingw32/include/winnetwk.h:331:1: WN_NOT_CONNECTED = 2250 // /usr/x86_64-w64-mingw32/include/winnetwk.h:313:1: WN_NOT_CONTAINER = 1207 // /usr/x86_64-w64-mingw32/include/winnetwk.h:330:1: WN_NOT_INITIALIZING = 1247 // /usr/x86_64-w64-mingw32/include/winnetwk.h:311:1: WN_NOT_LOGGED_ON = 1245 // /usr/x86_64-w64-mingw32/include/winnetwk.h:332:1: WN_NOT_SUPPORTED = 50 // /usr/x86_64-w64-mingw32/include/winnetwk.h:294:1: WN_NOT_VALIDATED = 1311 // /usr/x86_64-w64-mingw32/include/winnetwk.h:333:1: WN_NO_ERROR = 0 // /usr/x86_64-w64-mingw32/include/winnetwk.h:293:1: WN_NO_MORE_DEVICES = 1248 // /usr/x86_64-w64-mingw32/include/winnetwk.h:312:1: WN_NO_MORE_ENTRIES = 259 // /usr/x86_64-w64-mingw32/include/winnetwk.h:329:1: WN_NO_NETWORK = 1222 // /usr/x86_64-w64-mingw32/include/winnetwk.h:307:1: WN_NO_NET_OR_BAD_PATH = 1203 // /usr/x86_64-w64-mingw32/include/winnetwk.h:321:1: WN_OPEN_FILES = 2401 // /usr/x86_64-w64-mingw32/include/winnetwk.h:314:1: WN_OUT_OF_MEMORY = 8 // /usr/x86_64-w64-mingw32/include/winnetwk.h:306:1: WN_RETRY = 1237 // /usr/x86_64-w64-mingw32/include/winnetwk.h:296:1: WN_SUCCESS = 0 // /usr/x86_64-w64-mingw32/include/winnetwk.h:292:1: WN_WINDOWS_ERROR = 59 // /usr/x86_64-w64-mingw32/include/winnetwk.h:305:1: WOM_CLOSE = 956 // /usr/x86_64-w64-mingw32/include/mmsystem.h:292:1: WOM_DONE = 957 // /usr/x86_64-w64-mingw32/include/mmsystem.h:293:1: WOM_OPEN = 955 // /usr/x86_64-w64-mingw32/include/mmsystem.h:291:1: WOW64_CONTEXT_ALL = 65599 // /usr/x86_64-w64-mingw32/include/winnt.h:9162:1: WOW64_CONTEXT_CONTROL = 65537 // /usr/x86_64-w64-mingw32/include/winnt.h:9155:1: WOW64_CONTEXT_DEBUG_REGISTERS = 65552 // /usr/x86_64-w64-mingw32/include/winnt.h:9159:1: WOW64_CONTEXT_EXCEPTION_ACTIVE = 0x08000000 // /usr/x86_64-w64-mingw32/include/winnt.h:9166:1: WOW64_CONTEXT_EXCEPTION_REPORTING = 0x80000000 // /usr/x86_64-w64-mingw32/include/winnt.h:9169:1: WOW64_CONTEXT_EXCEPTION_REQUEST = 0x40000000 // /usr/x86_64-w64-mingw32/include/winnt.h:9168:1: WOW64_CONTEXT_EXTENDED_REGISTERS = 65568 // /usr/x86_64-w64-mingw32/include/winnt.h:9160:1: WOW64_CONTEXT_FLOATING_POINT = 65544 // /usr/x86_64-w64-mingw32/include/winnt.h:9158:1: WOW64_CONTEXT_FULL = 65543 // /usr/x86_64-w64-mingw32/include/winnt.h:9161:1: WOW64_CONTEXT_INTEGER = 65538 // /usr/x86_64-w64-mingw32/include/winnt.h:9156:1: WOW64_CONTEXT_SEGMENTS = 65540 // /usr/x86_64-w64-mingw32/include/winnt.h:9157:1: WOW64_CONTEXT_SERVICE_ACTIVE = 0x10000000 // /usr/x86_64-w64-mingw32/include/winnt.h:9167:1: WOW64_CONTEXT_XSTATE = 65600 // /usr/x86_64-w64-mingw32/include/winnt.h:9164:1: WOW64_CONTEXT_i386 = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:9153:1: WOW64_CONTEXT_i486 = 0x00010000 // /usr/x86_64-w64-mingw32/include/winnt.h:9154:1: WOW64_MAXIMUM_SUPPORTED_EXTENSION = 512 // /usr/x86_64-w64-mingw32/include/winnt.h:9172:1: WOW64_SIZE_OF_80387_REGISTERS = 80 // /usr/x86_64-w64-mingw32/include/winnt.h:9171:1: WO_ALL = 0x1fff // testdata/sqlite-amalgamation-3380500/sqlite3.c:147476:1: WO_AND = 0x0400 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147472:1: WO_AUX = 0x0040 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147468:1: WO_EQ = 0x0002 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147463:1: WO_EQUIV = 0x0800 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147473:1: WO_GE = 32 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147467:1: WO_GT = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147466:1: WO_IN = 0x0001 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147462:1: WO_IS = 0x0080 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147469:1: WO_ISNULL = 0x0100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147470:1: WO_LE = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147465:1: WO_LT = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147464:1: WO_NOOP = 0x1000 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147474:1: WO_OR = 0x0200 // testdata/sqlite-amalgamation-3380500/sqlite3.c:147471:1: WO_SINGLE = 0x01ff // testdata/sqlite-amalgamation-3380500/sqlite3.c:147477:1: WPF_ASYNCWINDOWPLACEMENT = 0x0004 // /usr/x86_64-w64-mingw32/include/winuser.h:1878:1: WPF_RESTORETOMAXIMIZED = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1877:1: WPF_SETMINPOSITION = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1876:1: WRC_Abort = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19309:1: WRC_Continue = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19307:1: WRC_Prune = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:19308:1: WRITE_COMPRESSION_INFO_VALID = 0x00000010 // /usr/x86_64-w64-mingw32/include/winioctl.h:281:1: WRITE_DAC = 262144 // /usr/x86_64-w64-mingw32/include/winnt.h:2881:1: WRITE_LOCK = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:65452:1: WRITE_OWNER = 524288 // /usr/x86_64-w64-mingw32/include/winnt.h:2882:1: WRITE_RESTRICTED = 0x8 // /usr/x86_64-w64-mingw32/include/winnt.h:4006:1: WRITE_WATCH_FLAG_RESET = 0x01 // /usr/x86_64-w64-mingw32/include/winnt.h:4954:1: WSABASEERR = 10000 // /usr/x86_64-w64-mingw32/include/winerror.h:1643:1: WSADESCRIPTION_LEN = 256 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsadata.h:10:1: WSAEACCES = 10013 // /usr/x86_64-w64-mingw32/include/winerror.h:1646:1: WSAEADDRINUSE = 10048 // /usr/x86_64-w64-mingw32/include/winerror.h:1663:1: WSAEADDRNOTAVAIL = 10049 // /usr/x86_64-w64-mingw32/include/winerror.h:1664:1: WSAEAFNOSUPPORT = 10047 // /usr/x86_64-w64-mingw32/include/winerror.h:1662:1: WSAEALREADY = 10037 // /usr/x86_64-w64-mingw32/include/winerror.h:1652:1: WSAEBADF = 10009 // /usr/x86_64-w64-mingw32/include/winerror.h:1645:1: WSAECANCELLED = 10103 // /usr/x86_64-w64-mingw32/include/winerror.h:1692:1: WSAECONNABORTED = 10053 // /usr/x86_64-w64-mingw32/include/winerror.h:1668:1: WSAECONNREFUSED = 10061 // /usr/x86_64-w64-mingw32/include/winerror.h:1676:1: WSAECONNRESET = 10054 // /usr/x86_64-w64-mingw32/include/winerror.h:1669:1: WSAEDESTADDRREQ = 10039 // /usr/x86_64-w64-mingw32/include/winerror.h:1654:1: WSAEDISCON = 10101 // /usr/x86_64-w64-mingw32/include/winerror.h:1690:1: WSAEDQUOT = 10069 // /usr/x86_64-w64-mingw32/include/winerror.h:1684:1: WSAEFAULT = 10014 // /usr/x86_64-w64-mingw32/include/winerror.h:1647:1: WSAEHOSTDOWN = 10064 // /usr/x86_64-w64-mingw32/include/winerror.h:1679:1: WSAEHOSTUNREACH = 10065 // /usr/x86_64-w64-mingw32/include/winerror.h:1680:1: WSAEINPROGRESS = 10036 // /usr/x86_64-w64-mingw32/include/winerror.h:1651:1: WSAEINTR = 10004 // /usr/x86_64-w64-mingw32/include/winerror.h:1644:1: WSAEINVAL = 10022 // /usr/x86_64-w64-mingw32/include/winerror.h:1648:1: WSAEINVALIDPROCTABLE = 10104 // /usr/x86_64-w64-mingw32/include/winerror.h:1693:1: WSAEINVALIDPROVIDER = 10105 // /usr/x86_64-w64-mingw32/include/winerror.h:1694:1: WSAEISCONN = 10056 // /usr/x86_64-w64-mingw32/include/winerror.h:1671:1: WSAELOOP = 10062 // /usr/x86_64-w64-mingw32/include/winerror.h:1677:1: WSAEMFILE = 10024 // /usr/x86_64-w64-mingw32/include/winerror.h:1649:1: WSAEMSGSIZE = 10040 // /usr/x86_64-w64-mingw32/include/winerror.h:1655:1: WSAENAMETOOLONG = 10063 // /usr/x86_64-w64-mingw32/include/winerror.h:1678:1: WSAENETDOWN = 10050 // /usr/x86_64-w64-mingw32/include/winerror.h:1665:1: WSAENETRESET = 10052 // /usr/x86_64-w64-mingw32/include/winerror.h:1667:1: WSAENETUNREACH = 10051 // /usr/x86_64-w64-mingw32/include/winerror.h:1666:1: WSAENOBUFS = 10055 // /usr/x86_64-w64-mingw32/include/winerror.h:1670:1: WSAENOMORE = 10102 // /usr/x86_64-w64-mingw32/include/winerror.h:1691:1: WSAENOPROTOOPT = 10042 // /usr/x86_64-w64-mingw32/include/winerror.h:1657:1: WSAENOTCONN = 10057 // /usr/x86_64-w64-mingw32/include/winerror.h:1672:1: WSAENOTEMPTY = 10066 // /usr/x86_64-w64-mingw32/include/winerror.h:1681:1: WSAENOTSOCK = 10038 // /usr/x86_64-w64-mingw32/include/winerror.h:1653:1: WSAEOPNOTSUPP = 10045 // /usr/x86_64-w64-mingw32/include/winerror.h:1660:1: WSAEPFNOSUPPORT = 10046 // /usr/x86_64-w64-mingw32/include/winerror.h:1661:1: WSAEPROCLIM = 10067 // /usr/x86_64-w64-mingw32/include/winerror.h:1682:1: WSAEPROTONOSUPPORT = 10043 // /usr/x86_64-w64-mingw32/include/winerror.h:1658:1: WSAEPROTOTYPE = 10041 // /usr/x86_64-w64-mingw32/include/winerror.h:1656:1: WSAEPROVIDERFAILEDINIT = 10106 // /usr/x86_64-w64-mingw32/include/winerror.h:1695:1: WSAEREFUSED = 10112 // /usr/x86_64-w64-mingw32/include/winerror.h:1701:1: WSAEREMOTE = 10071 // /usr/x86_64-w64-mingw32/include/winerror.h:1686:1: WSAESHUTDOWN = 10058 // /usr/x86_64-w64-mingw32/include/winerror.h:1673:1: WSAESOCKTNOSUPPORT = 10044 // /usr/x86_64-w64-mingw32/include/winerror.h:1659:1: WSAESTALE = 10070 // /usr/x86_64-w64-mingw32/include/winerror.h:1685:1: WSAETIMEDOUT = 10060 // /usr/x86_64-w64-mingw32/include/winerror.h:1675:1: WSAETOOMANYREFS = 10059 // /usr/x86_64-w64-mingw32/include/winerror.h:1674:1: WSAEUSERS = 10068 // /usr/x86_64-w64-mingw32/include/winerror.h:1683:1: WSAEWOULDBLOCK = 10035 // /usr/x86_64-w64-mingw32/include/winerror.h:1650:1: WSAHOST_NOT_FOUND = 11001 // /usr/x86_64-w64-mingw32/include/winerror.h:1703:1: WSANOTINITIALISED = 10093 // /usr/x86_64-w64-mingw32/include/winerror.h:1689:1: WSANO_ADDRESS = 11004 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsa_errnos.h:182:1: WSANO_DATA = 11004 // /usr/x86_64-w64-mingw32/include/winerror.h:1712:1: WSANO_RECOVERY = 11003 // /usr/x86_64-w64-mingw32/include/winerror.h:1709:1: WSASERVICE_NOT_FOUND = 10108 // /usr/x86_64-w64-mingw32/include/winerror.h:1697:1: WSASYSCALLFAILURE = 10107 // /usr/x86_64-w64-mingw32/include/winerror.h:1696:1: WSASYSNOTREADY = 10091 // /usr/x86_64-w64-mingw32/include/winerror.h:1687:1: WSASYS_STATUS_LEN = 128 // /usr/x86_64-w64-mingw32/include/psdk_inc/_wsadata.h:11:1: WSATRY_AGAIN = 11002 // /usr/x86_64-w64-mingw32/include/winerror.h:1706:1: WSATYPE_NOT_FOUND = 10109 // /usr/x86_64-w64-mingw32/include/winerror.h:1698:1: WSAVERNOTSUPPORTED = 10092 // /usr/x86_64-w64-mingw32/include/winerror.h:1688:1: WSA_E_CANCELLED = 10111 // /usr/x86_64-w64-mingw32/include/winerror.h:1700:1: WSA_E_NO_MORE = 10110 // /usr/x86_64-w64-mingw32/include/winerror.h:1699:1: WSA_QOS_ADMISSION_FAILURE = 11010 // /usr/x86_64-w64-mingw32/include/winerror.h:1730:1: WSA_QOS_BAD_OBJECT = 11013 // /usr/x86_64-w64-mingw32/include/winerror.h:1739:1: WSA_QOS_BAD_STYLE = 11012 // /usr/x86_64-w64-mingw32/include/winerror.h:1736:1: WSA_QOS_EFILTERCOUNT = 11021 // /usr/x86_64-w64-mingw32/include/winerror.h:1763:1: WSA_QOS_EFILTERSTYLE = 11019 // /usr/x86_64-w64-mingw32/include/winerror.h:1757:1: WSA_QOS_EFILTERTYPE = 11020 // /usr/x86_64-w64-mingw32/include/winerror.h:1760:1: WSA_QOS_EFLOWCOUNT = 11023 // /usr/x86_64-w64-mingw32/include/winerror.h:1769:1: WSA_QOS_EFLOWDESC = 11026 // /usr/x86_64-w64-mingw32/include/winerror.h:1781:1: WSA_QOS_EFLOWSPEC = 11017 // /usr/x86_64-w64-mingw32/include/winerror.h:1751:1: WSA_QOS_EOBJLENGTH = 11022 // /usr/x86_64-w64-mingw32/include/winerror.h:1766:1: WSA_QOS_EPOLICYOBJ = 11025 // /usr/x86_64-w64-mingw32/include/winerror.h:1778:1: WSA_QOS_EPROVSPECBUF = 11018 // /usr/x86_64-w64-mingw32/include/winerror.h:1754:1: WSA_QOS_EPSFILTERSPEC = 11028 // /usr/x86_64-w64-mingw32/include/winerror.h:1787:1: WSA_QOS_EPSFLOWSPEC = 11027 // /usr/x86_64-w64-mingw32/include/winerror.h:1784:1: WSA_QOS_ESDMODEOBJ = 11029 // /usr/x86_64-w64-mingw32/include/winerror.h:1790:1: WSA_QOS_ESERVICETYPE = 11016 // /usr/x86_64-w64-mingw32/include/winerror.h:1748:1: WSA_QOS_ESHAPERATEOBJ = 11030 // /usr/x86_64-w64-mingw32/include/winerror.h:1793:1: WSA_QOS_EUNKNOWNPSOBJ = 11024 // /usr/x86_64-w64-mingw32/include/winerror.h:1772:1: WSA_QOS_EUNKOWNPSOBJ = 11024 // /usr/x86_64-w64-mingw32/include/winerror.h:1775:1: WSA_QOS_GENERIC_ERROR = 11015 // /usr/x86_64-w64-mingw32/include/winerror.h:1745:1: WSA_QOS_NO_RECEIVERS = 11008 // /usr/x86_64-w64-mingw32/include/winerror.h:1724:1: WSA_QOS_NO_SENDERS = 11007 // /usr/x86_64-w64-mingw32/include/winerror.h:1721:1: WSA_QOS_POLICY_FAILURE = 11011 // /usr/x86_64-w64-mingw32/include/winerror.h:1733:1: WSA_QOS_RECEIVERS = 11005 // /usr/x86_64-w64-mingw32/include/winerror.h:1715:1: WSA_QOS_REQUEST_CONFIRMED = 11009 // /usr/x86_64-w64-mingw32/include/winerror.h:1727:1: WSA_QOS_RESERVED_PETYPE = 11031 // /usr/x86_64-w64-mingw32/include/winerror.h:1796:1: WSA_QOS_SENDERS = 11006 // /usr/x86_64-w64-mingw32/include/winerror.h:1718:1: WSA_QOS_TRAFFIC_CTRL_ERROR = 11014 // /usr/x86_64-w64-mingw32/include/winerror.h:1742:1: WSF_VISIBLE = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:830:1: WS_ACTIVECAPTION = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:6194:1: WS_BORDER = 8388608 // /usr/x86_64-w64-mingw32/include/winuser.h:1590:1: WS_CAPTION = 12582912 // /usr/x86_64-w64-mingw32/include/winuser.h:1589:1: WS_CHILD = 1073741824 // /usr/x86_64-w64-mingw32/include/winuser.h:1582:1: WS_CHILDWINDOW = 1073741824 // /usr/x86_64-w64-mingw32/include/winuser.h:1607:1: WS_CLIPCHILDREN = 33554432 // /usr/x86_64-w64-mingw32/include/winuser.h:1587:1: WS_CLIPSIBLINGS = 67108864 // /usr/x86_64-w64-mingw32/include/winuser.h:1586:1: WS_DISABLED = 134217728 // /usr/x86_64-w64-mingw32/include/winuser.h:1585:1: WS_DLGFRAME = 4194304 // /usr/x86_64-w64-mingw32/include/winuser.h:1591:1: WS_EX_ACCEPTFILES = 16 // /usr/x86_64-w64-mingw32/include/winuser.h:1612:1: WS_EX_APPWINDOW = 262144 // /usr/x86_64-w64-mingw32/include/winuser.h:1627:1: WS_EX_CLIENTEDGE = 512 // /usr/x86_64-w64-mingw32/include/winuser.h:1617:1: WS_EX_COMPOSITED = 33554432 // /usr/x86_64-w64-mingw32/include/winuser.h:1637:1: WS_EX_CONTEXTHELP = 1024 // /usr/x86_64-w64-mingw32/include/winuser.h:1618:1: WS_EX_CONTROLPARENT = 65536 // /usr/x86_64-w64-mingw32/include/winuser.h:1625:1: WS_EX_DLGMODALFRAME = 1 // /usr/x86_64-w64-mingw32/include/winuser.h:1609:1: WS_EX_LAYERED = 0x00080000 // /usr/x86_64-w64-mingw32/include/winuser.h:1631:1: WS_EX_LAYOUTRTL = 4194304 // /usr/x86_64-w64-mingw32/include/winuser.h:1636:1: WS_EX_LEFT = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1620:1: WS_EX_LEFTSCROLLBAR = 16384 // /usr/x86_64-w64-mingw32/include/winuser.h:1623:1: WS_EX_LTRREADING = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1622:1: WS_EX_MDICHILD = 64 // /usr/x86_64-w64-mingw32/include/winuser.h:1614:1: WS_EX_NOACTIVATE = 134217728 // /usr/x86_64-w64-mingw32/include/winuser.h:1638:1: WS_EX_NOINHERITLAYOUT = 1048576 // /usr/x86_64-w64-mingw32/include/winuser.h:1632:1: WS_EX_NOPARENTNOTIFY = 4 // /usr/x86_64-w64-mingw32/include/winuser.h:1610:1: WS_EX_OVERLAPPEDWINDOW = 768 // /usr/x86_64-w64-mingw32/include/winuser.h:1629:1: WS_EX_PALETTEWINDOW = 392 // /usr/x86_64-w64-mingw32/include/winuser.h:1630:1: WS_EX_RIGHT = 4096 // /usr/x86_64-w64-mingw32/include/winuser.h:1619:1: WS_EX_RIGHTSCROLLBAR = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1624:1: WS_EX_RTLREADING = 8192 // /usr/x86_64-w64-mingw32/include/winuser.h:1621:1: WS_EX_STATICEDGE = 131072 // /usr/x86_64-w64-mingw32/include/winuser.h:1626:1: WS_EX_TOOLWINDOW = 128 // /usr/x86_64-w64-mingw32/include/winuser.h:1615:1: WS_EX_TOPMOST = 8 // /usr/x86_64-w64-mingw32/include/winuser.h:1611:1: WS_EX_TRANSPARENT = 32 // /usr/x86_64-w64-mingw32/include/winuser.h:1613:1: WS_EX_WINDOWEDGE = 256 // /usr/x86_64-w64-mingw32/include/winuser.h:1616:1: WS_GROUP = 131072 // /usr/x86_64-w64-mingw32/include/winuser.h:1596:1: WS_HSCROLL = 1048576 // /usr/x86_64-w64-mingw32/include/winuser.h:1593:1: WS_ICONIC = 536870912 // /usr/x86_64-w64-mingw32/include/winuser.h:1601:1: WS_MAXIMIZE = 16777216 // /usr/x86_64-w64-mingw32/include/winuser.h:1588:1: WS_MAXIMIZEBOX = 65536 // /usr/x86_64-w64-mingw32/include/winuser.h:1599:1: WS_MINIMIZE = 536870912 // /usr/x86_64-w64-mingw32/include/winuser.h:1583:1: WS_MINIMIZEBOX = 131072 // /usr/x86_64-w64-mingw32/include/winuser.h:1598:1: WS_OVERLAPPED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1580:1: WS_OVERLAPPEDWINDOW = 13565952 // /usr/x86_64-w64-mingw32/include/winuser.h:1605:1: WS_POPUP = 2147483648 // /usr/x86_64-w64-mingw32/include/winuser.h:1581:1: WS_POPUPWINDOW = 2156396544 // /usr/x86_64-w64-mingw32/include/winuser.h:1606:1: WS_SIZEBOX = 262144 // /usr/x86_64-w64-mingw32/include/winuser.h:1602:1: WS_SYSMENU = 524288 // /usr/x86_64-w64-mingw32/include/winuser.h:1594:1: WS_TABSTOP = 65536 // /usr/x86_64-w64-mingw32/include/winuser.h:1597:1: WS_THICKFRAME = 262144 // /usr/x86_64-w64-mingw32/include/winuser.h:1595:1: WS_TILED = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:1600:1: WS_TILEDWINDOW = 13565952 // /usr/x86_64-w64-mingw32/include/winuser.h:1603:1: WS_VISIBLE = 268435456 // /usr/x86_64-w64-mingw32/include/winuser.h:1584:1: WS_VSCROLL = 2097152 // /usr/x86_64-w64-mingw32/include/winuser.h:1592:1: WTS_CONSOLE_CONNECT = 0x1 // /usr/x86_64-w64-mingw32/include/winuser.h:520:1: WTS_CONSOLE_DISCONNECT = 0x2 // /usr/x86_64-w64-mingw32/include/winuser.h:521:1: WTS_REMOTE_CONNECT = 0x3 // /usr/x86_64-w64-mingw32/include/winuser.h:522:1: WTS_REMOTE_DISCONNECT = 0x4 // /usr/x86_64-w64-mingw32/include/winuser.h:523:1: WTS_SESSION_CREATE = 0xa // /usr/x86_64-w64-mingw32/include/winuser.h:529:1: WTS_SESSION_LOCK = 0x7 // /usr/x86_64-w64-mingw32/include/winuser.h:526:1: WTS_SESSION_LOGOFF = 0x6 // /usr/x86_64-w64-mingw32/include/winuser.h:525:1: WTS_SESSION_LOGON = 0x5 // /usr/x86_64-w64-mingw32/include/winuser.h:524:1: WTS_SESSION_REMOTE_CONTROL = 0x9 // /usr/x86_64-w64-mingw32/include/winuser.h:528:1: WTS_SESSION_TERMINATE = 0xb // /usr/x86_64-w64-mingw32/include/winuser.h:530:1: WTS_SESSION_UNLOCK = 0x8 // /usr/x86_64-w64-mingw32/include/winuser.h:527:1: WT_EXECUTEDEFAULT = 0x00000000 // /usr/x86_64-w64-mingw32/include/winnt.h:8126:1: WT_EXECUTEDELETEWAIT = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8139:1: WT_EXECUTEINIOTHREAD = 0x00000001 // /usr/x86_64-w64-mingw32/include/winnt.h:8127:1: WT_EXECUTEINLONGTHREAD = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8140:1: WT_EXECUTEINPERSISTENTIOTHREAD = 0x00000040 // /usr/x86_64-w64-mingw32/include/winnt.h:8133:1: WT_EXECUTEINPERSISTENTTHREAD = 0x00000080 // /usr/x86_64-w64-mingw32/include/winnt.h:8134:1: WT_EXECUTEINTIMERTHREAD = 0x00000020 // /usr/x86_64-w64-mingw32/include/winnt.h:8131:1: WT_EXECUTEINUITHREAD = 0x00000002 // /usr/x86_64-w64-mingw32/include/winnt.h:8128:1: WT_EXECUTEINWAITTHREAD = 0x00000004 // /usr/x86_64-w64-mingw32/include/winnt.h:8129:1: WT_EXECUTELONGFUNCTION = 0x00000010 // /usr/x86_64-w64-mingw32/include/winnt.h:8132:1: WT_EXECUTEONLYONCE = 0x00000008 // /usr/x86_64-w64-mingw32/include/winnt.h:8130:1: WT_TRANSFER_IMPERSONATION = 0x00000100 // /usr/x86_64-w64-mingw32/include/winnt.h:8135:1: WVR_ALIGNBOTTOM = 0x0040 // /usr/x86_64-w64-mingw32/include/winuser.h:1538:1: WVR_ALIGNLEFT = 0x0020 // /usr/x86_64-w64-mingw32/include/winuser.h:1537:1: WVR_ALIGNRIGHT = 0x0080 // /usr/x86_64-w64-mingw32/include/winuser.h:1539:1: WVR_ALIGNTOP = 0x0010 // /usr/x86_64-w64-mingw32/include/winuser.h:1536:1: WVR_HREDRAW = 0x0100 // /usr/x86_64-w64-mingw32/include/winuser.h:1540:1: WVR_REDRAW = 768 // /usr/x86_64-w64-mingw32/include/winuser.h:1542:1: WVR_VALIDRECTS = 0x0400 // /usr/x86_64-w64-mingw32/include/winuser.h:1543:1: WVR_VREDRAW = 0x0200 // /usr/x86_64-w64-mingw32/include/winuser.h:1541:1: X3_BTYPE_QP_INST_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7087:1: X3_BTYPE_QP_INST_WORD_POS_X = 23 // /usr/x86_64-w64-mingw32/include/winnt.h:7086:1: X3_BTYPE_QP_INST_WORD_X = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7084:1: X3_BTYPE_QP_SIZE_X = 9 // /usr/x86_64-w64-mingw32/include/winnt.h:7085:1: X3_D_WH_INST_WORD_POS_X = 24 // /usr/x86_64-w64-mingw32/include/winnt.h:7056:1: X3_D_WH_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7054:1: X3_D_WH_SIGN_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7057:1: X3_D_WH_SIZE_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7055:1: X3_EMPTY_INST_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7092:1: X3_EMPTY_INST_WORD_POS_X = 14 // /usr/x86_64-w64-mingw32/include/winnt.h:7091:1: X3_EMPTY_INST_WORD_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7089:1: X3_EMPTY_SIZE_X = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7090:1: X3_IMM20_INST_WORD_POS_X = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7061:1: X3_IMM20_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7059:1: X3_IMM20_SIGN_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7062:1: X3_IMM20_SIZE_X = 20 // /usr/x86_64-w64-mingw32/include/winnt.h:7060:1: X3_IMM39_1_INST_WORD_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7066:1: X3_IMM39_1_INST_WORD_X = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:7064:1: X3_IMM39_1_SIGN_VAL_POS_X = 36 // /usr/x86_64-w64-mingw32/include/winnt.h:7067:1: X3_IMM39_1_SIZE_X = 23 // /usr/x86_64-w64-mingw32/include/winnt.h:7065:1: X3_IMM39_2_INST_WORD_POS_X = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:7071:1: X3_IMM39_2_INST_WORD_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7069:1: X3_IMM39_2_SIGN_VAL_POS_X = 20 // /usr/x86_64-w64-mingw32/include/winnt.h:7072:1: X3_IMM39_2_SIZE_X = 16 // /usr/x86_64-w64-mingw32/include/winnt.h:7070:1: X3_I_INST_WORD_POS_X = 27 // /usr/x86_64-w64-mingw32/include/winnt.h:7051:1: X3_I_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7049:1: X3_I_SIGN_VAL_POS_X = 59 // /usr/x86_64-w64-mingw32/include/winnt.h:7052:1: X3_I_SIZE_X = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7050:1: X3_OPCODE_INST_WORD_POS_X = 28 // /usr/x86_64-w64-mingw32/include/winnt.h:7046:1: X3_OPCODE_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7044:1: X3_OPCODE_SIGN_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7047:1: X3_OPCODE_SIZE_X = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7045:1: X3_P_INST_WORD_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7076:1: X3_P_INST_WORD_X = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:7074:1: X3_P_SIGN_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7077:1: X3_P_SIZE_X = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7075:1: X3_TMPLT_INST_WORD_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7081:1: X3_TMPLT_INST_WORD_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7079:1: X3_TMPLT_SIGN_VAL_POS_X = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7082:1: X3_TMPLT_SIZE_X = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:7080:1: X509_ASN_ENCODING = 0x1 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1435:1: X509_NDR_ENCODING = 0x2 // /usr/x86_64-w64-mingw32/include/wincrypt.h:1436:1: XACT_E_FIRST = 0x8004D000 // /usr/x86_64-w64-mingw32/include/winerror.h:2509:1: XACT_E_LAST = 0x8004D029 // /usr/x86_64-w64-mingw32/include/winerror.h:2510:1: XACT_S_FIRST = 0x0004D000 // /usr/x86_64-w64-mingw32/include/winerror.h:2511:1: XACT_S_LAST = 0x0004D010 // /usr/x86_64-w64-mingw32/include/winerror.h:2512:1: XBUTTON1 = 0x0001 // /usr/x86_64-w64-mingw32/include/winuser.h:1275:1: XBUTTON2 = 0x0002 // /usr/x86_64-w64-mingw32/include/winuser.h:1276:1: XCLASS_BOOL = 0x1000 // /usr/x86_64-w64-mingw32/include/ddeml.h:109:1: XCLASS_DATA = 0x2000 // /usr/x86_64-w64-mingw32/include/ddeml.h:110:1: XCLASS_FLAGS = 0x4000 // /usr/x86_64-w64-mingw32/include/ddeml.h:111:1: XCLASS_MASK = 0xFC00 // /usr/x86_64-w64-mingw32/include/ddeml.h:108:1: XCLASS_NOTIFICATION = 0x8000 // /usr/x86_64-w64-mingw32/include/ddeml.h:112:1: XN_EXPR = -2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17886:1: XN_ROWID = -1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:17885:1: XSTATE_AVX = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4775:1: XSTATE_GSSE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4774:1: XSTATE_LEGACY_FLOATING_POINT = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4772:1: XSTATE_LEGACY_SSE = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4773:1: XSTATE_MASK_AVX = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4781:1: XSTATE_MASK_GSSE = 4 // /usr/x86_64-w64-mingw32/include/winnt.h:4780:1: XSTATE_MASK_LEGACY = 3 // /usr/x86_64-w64-mingw32/include/winnt.h:4779:1: XSTATE_MASK_LEGACY_FLOATING_POINT = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:4777:1: XSTATE_MASK_LEGACY_SSE = 2 // /usr/x86_64-w64-mingw32/include/winnt.h:4778:1: XST_ADVACKRCVD = 13 // /usr/x86_64-w64-mingw32/include/ddeml.h:68:1: XST_ADVDATAACKRCVD = 16 // /usr/x86_64-w64-mingw32/include/ddeml.h:71:1: XST_ADVDATASENT = 15 // /usr/x86_64-w64-mingw32/include/ddeml.h:70:1: XST_ADVSENT = 11 // /usr/x86_64-w64-mingw32/include/ddeml.h:66:1: XST_CONNECTED = 2 // /usr/x86_64-w64-mingw32/include/ddeml.h:57:1: XST_DATARCVD = 6 // /usr/x86_64-w64-mingw32/include/ddeml.h:61:1: XST_EXECACKRCVD = 10 // /usr/x86_64-w64-mingw32/include/ddeml.h:65:1: XST_EXECSENT = 9 // /usr/x86_64-w64-mingw32/include/ddeml.h:64:1: XST_INCOMPLETE = 1 // /usr/x86_64-w64-mingw32/include/ddeml.h:56:1: XST_INIT1 = 3 // /usr/x86_64-w64-mingw32/include/ddeml.h:58:1: XST_INIT2 = 4 // /usr/x86_64-w64-mingw32/include/ddeml.h:59:1: XST_NULL = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:55:1: XST_POKEACKRCVD = 8 // /usr/x86_64-w64-mingw32/include/ddeml.h:63:1: XST_POKESENT = 7 // /usr/x86_64-w64-mingw32/include/ddeml.h:62:1: XST_REQSENT = 5 // /usr/x86_64-w64-mingw32/include/ddeml.h:60:1: XST_UNADVACKRCVD = 14 // /usr/x86_64-w64-mingw32/include/ddeml.h:69:1: XST_UNADVSENT = 12 // /usr/x86_64-w64-mingw32/include/ddeml.h:67:1: XTYPF_ACKREQ = 0x0008 // /usr/x86_64-w64-mingw32/include/ddeml.h:106:1: XTYPF_NOBLOCK = 0x0002 // /usr/x86_64-w64-mingw32/include/ddeml.h:104:1: XTYPF_NODATA = 0x0004 // /usr/x86_64-w64-mingw32/include/ddeml.h:105:1: XTYP_ADVDATA = 16400 // /usr/x86_64-w64-mingw32/include/ddeml.h:115:1: XTYP_ADVREQ = 8226 // /usr/x86_64-w64-mingw32/include/ddeml.h:116:1: XTYP_ADVSTART = 4144 // /usr/x86_64-w64-mingw32/include/ddeml.h:117:1: XTYP_ADVSTOP = 32832 // /usr/x86_64-w64-mingw32/include/ddeml.h:118:1: XTYP_CONNECT = 4194 // /usr/x86_64-w64-mingw32/include/ddeml.h:120:1: XTYP_CONNECT_CONFIRM = 32882 // /usr/x86_64-w64-mingw32/include/ddeml.h:121:1: XTYP_DISCONNECT = 32962 // /usr/x86_64-w64-mingw32/include/ddeml.h:126:1: XTYP_ERROR = 32770 // /usr/x86_64-w64-mingw32/include/ddeml.h:114:1: XTYP_EXECUTE = 16464 // /usr/x86_64-w64-mingw32/include/ddeml.h:119:1: XTYP_MASK = 0x00F0 // /usr/x86_64-w64-mingw32/include/ddeml.h:130:1: XTYP_MONITOR = 33010 // /usr/x86_64-w64-mingw32/include/ddeml.h:353:1: XTYP_POKE = 16528 // /usr/x86_64-w64-mingw32/include/ddeml.h:123:1: XTYP_REGISTER = 32930 // /usr/x86_64-w64-mingw32/include/ddeml.h:124:1: XTYP_REQUEST = 8368 // /usr/x86_64-w64-mingw32/include/ddeml.h:125:1: XTYP_SHIFT = 4 // /usr/x86_64-w64-mingw32/include/ddeml.h:131:1: XTYP_UNREGISTER = 32978 // /usr/x86_64-w64-mingw32/include/ddeml.h:127:1: XTYP_WILDCONNECT = 8418 // /usr/x86_64-w64-mingw32/include/ddeml.h:128:1: XTYP_XACT_COMPLETE = 32896 // /usr/x86_64-w64-mingw32/include/ddeml.h:122:1: YYFALLBACK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161914:1: YYNOCODE = 319 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161876:1: YYNOERRORRECOVERY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161433:1: YYNRULE = 402 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161916:1: YYNRULE_WITH_ACTION = 340 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161917:1: YYNSTATE = 574 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161915:1: YYNTOKEN = 185 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161918:1: YYPARSEFREENEVERNULL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161444:1: YYSTACKDEPTH = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161902:1: YYWILDCARD = 101 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161878:1: YY_ACCEPT_ACTION = 1234 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161923:1: YY_ACTTAB_COUNT = 2070 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161993:1: YY_ERROR_ACTION = 1233 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161922:1: YY_MAX_REDUCE = 1637 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161926:1: YY_MAX_SHIFT = 573 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161919:1: YY_MAX_SHIFTREDUCE = 1232 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161921:1: YY_MIN_REDUCE = 1236 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161925:1: YY_MIN_SHIFTREDUCE = 831 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161920:1: YY_NO_ACTION = 1235 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161924:1: YY_REDUCE_COUNT = 408 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162494:1: YY_REDUCE_MAX = 1715 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162496:1: YY_REDUCE_MIN = -267 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162495:1: YY_SHIFT_COUNT = 573 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162431:1: YY_SHIFT_MAX = 2045 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162433:1: YY_SHIFT_MIN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:162432:1: ZERO_PADDING = 3 // /usr/x86_64-w64-mingw32/include/wincrypt.h:419:1: X_ADXINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/adxintrin.h:29:1: X_AGLOBAL = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:346:1: X_ALLOCA_S_HEAP_MARKER = 0xDDDD // /usr/x86_64-w64-mingw32/include/malloc.h:137:1: X_ALLOCA_S_MARKER_SIZE = 16 // /usr/x86_64-w64-mingw32/include/malloc.h:142:1: X_ALLOCA_S_STACK_MARKER = 0xCCCC // /usr/x86_64-w64-mingw32/include/malloc.h:136:1: X_ALLOCA_S_THRESHOLD = 1024 // /usr/x86_64-w64-mingw32/include/malloc.h:135:1: X_ALPHA = 259 // /usr/x86_64-w64-mingw32/include/ctype.h:103:1: X_AMD64_ = 0 // /usr/x86_64-w64-mingw32/include/windows.h:53:1: X_AMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/ammintrin.h:28:1: X_ANONYMOUS_STRUCT = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:474:1: X_ANONYMOUS_UNION = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:473:1: X_ANSI_STDARG_H_ = 0 // /usr/x86_64-w64-mingw32/include/stdarg.h:37:1: X_ANSI_STDDEF_H = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:52:1: X_APIAPPCONTAINER_ = 0 // /usr/x86_64-w64-mingw32/include/securityappcontainer.h:6:1: X_APISECUREBASE_ = 0 // /usr/x86_64-w64-mingw32/include/securitybaseapi.h:6:1: X_APISETCCONV_ = 0 // /usr/x86_64-w64-mingw32/include/apisetcconv.h:7:1: X_APISETDEBUG_ = 0 // /usr/x86_64-w64-mingw32/include/debugapi.h:6:1: X_APISETFILE_ = 0 // /usr/x86_64-w64-mingw32/include/fileapi.h:6:1: X_APISETHANDLE_ = 0 // /usr/x86_64-w64-mingw32/include/handleapi.h:6:1: X_APISETLIBLOADER_ = 0 // /usr/x86_64-w64-mingw32/include/libloaderapi.h:6:1: X_APISETNAMESPACE_ = 0 // /usr/x86_64-w64-mingw32/include/namespaceapi.h:6:1: X_APISETREALTIME_ = 0 // /usr/x86_64-w64-mingw32/include/realtimeapiset.h:6:1: X_APISETSTRING_ = 0 // /usr/x86_64-w64-mingw32/include/stringapiset.h:7:1: X_APISETUTIL_ = 0 // /usr/x86_64-w64-mingw32/include/utilapiset.h:6:1: X_API_SET_H_ = 0 // /usr/x86_64-w64-mingw32/include/apiset.h:7:1: X_APPIDREGFLAGS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:247:1: X_ARGMAX = 100 // /usr/x86_64-w64-mingw32/include/_mingw.h:402:1: X_AUTH_IDENTITY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/rpcdce.h:319:1: X_AVX2INTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx2intrin.h:29:1: X_AVX5124FMAPSINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx5124fmapsintrin.h:29:1: X_AVX5124VNNIWINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx5124vnniwintrin.h:29:1: X_AVX512BF16INTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16intrin.h:29:1: X_AVX512BF16VLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16vlintrin.h:29:1: X_AVX512BITALGINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bitalgintrin.h:29:1: X_AVX512BWINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bwintrin.h:29:1: X_AVX512CDINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512cdintrin.h:29:1: X_AVX512DQINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512dqintrin.h:29:1: X_AVX512ERINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512erintrin.h:29:1: X_AVX512FINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:29:1: X_AVX512IFMAINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512ifmaintrin.h:29:1: X_AVX512IFMAVLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512ifmavlintrin.h:29:1: X_AVX512PFINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512pfintrin.h:29:1: X_AVX512VBMI2VLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vbmi2vlintrin.h:29:1: X_AVX512VBMIINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vbmiintrin.h:29:1: X_AVX512VBMIVLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vbmivlintrin.h:29:1: X_AVX512VLBWINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vlbwintrin.h:29:1: X_AVX512VLDQINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vldqintrin.h:29:1: X_AVX512VLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vlintrin.h:29:1: X_AVX512VNNIVLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vnnivlintrin.h:29:1: X_AVX512VP2INTERSECTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vp2intersectintrin.h:29:1: X_AVX512VP2INTERSECTVLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vp2intersectvlintrin.h:29:1: X_AVX512VPOPCNTDQINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vpopcntdqintrin.h:29:1: X_AVX512VPOPCNTDQVLINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vpopcntdqvlintrin.h:29:1: X_AVXINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:32:1: X_BASETSD_H_ = 0 // /usr/x86_64-w64-mingw32/include/basetsd.h:8:1: X_BEM_H_ = 0 // /usr/x86_64-w64-mingw32/include/bemapiset.h:6:1: X_BLANK = 0x40 // /usr/x86_64-w64-mingw32/include/ctype.h:99:1: X_BLOB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:380:1: X_BMI2INTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/bmi2intrin.h:29:1: X_BMIINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/bmiintrin.h:29:1: X_BOOLEAN_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:604:1: X_BSDTYPES_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/_bsd_types.h:8:1: X_Benign_race_begin_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:10:1: X_Benign_race_end_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:11:1: X_CALL_REPORTFAULT = 0x2 // /usr/x86_64-w64-mingw32/include/stdlib.h:139:1: X_CETINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/cetintrin.h:29:1: X_CLDEMOTE_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/cldemoteintrin.h:29:1: X_CLFLUSHOPTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/clflushoptintrin.h:29:1: X_CLOCK_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/time.h:59:1: X_CLWBINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/clwbintrin.h:29:1: X_CLZEROINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/clzerointrin.h:25:1: X_CMP_EQ_OQ = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:76:1: X_CMP_EQ_OS = 0x10 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:108:1: X_CMP_EQ_UQ = 0x08 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:92:1: X_CMP_EQ_US = 0x18 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:124:1: X_CMP_FALSE_OQ = 0x0b // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:98:1: X_CMP_FALSE_OS = 0x1b // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:130:1: X_CMP_GE_OQ = 0x1d // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:134:1: X_CMP_GE_OS = 0x0d // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:102:1: X_CMP_GT_OQ = 0x1e // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:136:1: X_CMP_GT_OS = 0x0e // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:104:1: X_CMP_LE_OQ = 0x12 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:112:1: X_CMP_LE_OS = 0x02 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:80:1: X_CMP_LT_OQ = 0x11 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:110:1: X_CMP_LT_OS = 0x01 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:78:1: X_CMP_NEQ_OQ = 0x0c // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:100:1: X_CMP_NEQ_OS = 0x1c // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:132:1: X_CMP_NEQ_UQ = 0x04 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:84:1: X_CMP_NEQ_US = 0x14 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:116:1: X_CMP_NGE_UQ = 0x19 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:126:1: X_CMP_NGE_US = 0x09 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:94:1: X_CMP_NGT_UQ = 0x1a // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:128:1: X_CMP_NGT_US = 0x0a // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:96:1: X_CMP_NLE_UQ = 0x16 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:120:1: X_CMP_NLE_US = 0x06 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:88:1: X_CMP_NLT_UQ = 0x15 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:118:1: X_CMP_NLT_US = 0x05 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:86:1: X_CMP_ORD_Q = 0x07 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:90:1: X_CMP_ORD_S = 0x17 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:122:1: X_CMP_TRUE_UQ = 0x0f // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:106:1: X_CMP_TRUE_US = 0x1f // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:138:1: X_CMP_UNORD_Q = 0x03 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:82:1: X_CMP_UNORD_S = 0x13 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:114:1: X_COMBASEAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/combaseapi.h:29:1: X_COMPLEX_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/math.h:259:1: X_COM_Outptr_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:93:1: X_COM_Outptr_opt_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:95:1: X_COM_Outptr_opt_result_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:96:1: X_COM_Outptr_result_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:94:1: X_CONST_RETURN = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:377:1: X_CONTROL = 0x20 // /usr/x86_64-w64-mingw32/include/ctype.h:98:1: X_CRTNOALIAS = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:29:1: X_CRTRESTRICT = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:33:1: X_CRT_ABS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:410:1: X_CRT_ALGO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:433:1: X_CRT_ALLOCATION_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:528:1: X_CRT_ALTERNATIVE_IMPORTED = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:313:1: X_CRT_ATOF_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:424:1: X_CRT_CTYPEDATA_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:20:1: X_CRT_DIRECTORY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:728:1: X_CRT_DOUBLE_DEC = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:72:1: X_CRT_ERRNO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:17:1: X_CRT_GETPID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/process.h:157:1: X_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS = 4 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:23:1: X_CRT_INTERNAL_LOCAL_SCANF_OPTIONS = 2 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:27:1: X_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY = 0x0008 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:15:1: X_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS = 0x0010 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:16:1: X_CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION = 0x0001 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:12:1: X_CRT_INTERNAL_PRINTF_LEGACY_WIDE_SPECIFIERS = 0x0004 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:14:1: X_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR = 0x0002 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:13:1: X_CRT_INTERNAL_SCANF_LEGACY_MSVCRT_COMPATIBILITY = 0x0004 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:20:1: X_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS = 0x0002 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:19:1: X_CRT_INTERNAL_SCANF_SECURECRT = 0x0001 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:18:1: X_CRT_MANAGED_HEAP_DEPRECATE = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:361:1: X_CRT_MATHERR_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/math.h:275:1: X_CRT_MEMORY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/string.h:44:1: X_CRT_PACKING = 8 // /usr/x86_64-w64-mingw32/include/corecrt.h:14:1: X_CRT_PERROR_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:648:1: X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:34:1: X_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:35:1: X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:36:1: X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:37:1: X_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:38:1: X_CRT_SECURE_NO_DEPRECATE = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:311:1: X_CRT_SWAB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:716:1: X_CRT_SYSTEM_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:518:1: X_CRT_TERMINATE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:387:1: X_CRT_USE_WINAPI_FAMILY_DESKTOP_APP = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:501:1: X_CRT_WCTYPEDATA_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:53:1: X_CRT_WPERROR_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:677:1: X_CRT_WSYSTEM_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:587:1: X_CTYPE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:106:1: X_CVTBUFSIZE = 349 // /usr/x86_64-w64-mingw32/include/stdlib.h:611:1: X_CY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:425:1: X_Const_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:194:1: X_DATETIMEAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/datetimeapi.h:7:1: X_DCOMSCM_REMOTECALL_FLAGS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:259:1: X_DDEHEADER_INCLUDED_ = 0 // /usr/x86_64-w64-mingw32/include/dde.h:7:1: X_DEF_WINBOOL_ = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:126:1: X_DEVIOCTL_ = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:43:1: X_DEV_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:50:1: X_DIGIT = 0x4 // /usr/x86_64-w64-mingw32/include/ctype.h:94:1: X_DIV_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:58:1: X_DLGSH_INCLUDED_ = 0 // /usr/x86_64-w64-mingw32/include/dlgs.h:7:1: X_DLL = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:326:1: X_DOMAIN = 1 // /usr/x86_64-w64-mingw32/include/math.h:19:1: X_DPI_AWARENESS_CONTEXTS_ = 0 // /usr/x86_64-w64-mingw32/include/windef.h:153:1: X_DWORDLONG_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:545:1: X_EMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:28:1: X_ENQCMDINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/enqcmdintrin.h:29:1: X_ERRCODE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:117:1: X_ERRHANDLING_H_ = 0 // /usr/x86_64-w64-mingw32/include/errhandlingapi.h:6:1: X_ERROR_STATUS_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:172:1: X_EXCEPTION_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/math.h:157:1: X_F16CINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/f16cintrin.h:29:1: X_FD_SET_WINSOCK_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/psdk_inc/_fd_types.h:89:1: X_FIBERS_H_ = 0 // /usr/x86_64-w64-mingw32/include/fibersapi.h:6:1: X_FILESYSTEMFSCTL_ = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:1268:1: X_FILETIME_ = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:226:1: X_FILE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:35:1: X_FILE_OFFSET_BITS = 64 // <builtin>:25:1: X_FILE_OFFSET_BITS_SET_FSEEKO = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:692:1: X_FILE_OFFSET_BITS_SET_FTELLO = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:699:1: X_FILE_OFFSET_BITS_SET_OFFT = 0 // /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:21:1: X_FLT_WINERROR_ = 0 // /usr/x86_64-w64-mingw32/include/fltwinerror.h:7:1: X_FMA4INTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/fma4intrin.h:29:1: X_FMAINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/fmaintrin.h:29:1: X_FORCENAMELESSUNION = 1 // /usr/x86_64-w64-mingw32/include/oaidl.h:478:1: X_FPCLASS_ND = 0x0010 // /usr/x86_64-w64-mingw32/include/math.h:64:1: X_FPCLASS_NINF = 0x0004 // /usr/x86_64-w64-mingw32/include/math.h:62:1: X_FPCLASS_NN = 0x0008 // /usr/x86_64-w64-mingw32/include/math.h:63:1: X_FPCLASS_NZ = 0x0020 // /usr/x86_64-w64-mingw32/include/math.h:65:1: X_FPCLASS_PD = 0x0080 // /usr/x86_64-w64-mingw32/include/math.h:67:1: X_FPCLASS_PINF = 0x0200 // /usr/x86_64-w64-mingw32/include/math.h:69:1: X_FPCLASS_PN = 0x0100 // /usr/x86_64-w64-mingw32/include/math.h:68:1: X_FPCLASS_PZ = 0x0040 // /usr/x86_64-w64-mingw32/include/math.h:66:1: X_FPCLASS_QNAN = 0x0002 // /usr/x86_64-w64-mingw32/include/math.h:61:1: X_FPCLASS_SNAN = 0x0001 // /usr/x86_64-w64-mingw32/include/math.h:60:1: X_FPOS_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:98:1: X_FREEA_INLINE = 0 // /usr/x86_64-w64-mingw32/include/malloc.h:161:1: X_FREEENTRY = 0 // /usr/x86_64-w64-mingw32/include/malloc.h:40:1: X_FTS5INT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:216840:1: X_FTS5_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:12558:1: X_FTSINT_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:173995:1: X_FXSRINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/fxsrintrin.h:29:1: X_Field_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:217:1: X_GCC_LIMITS_H_ = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:30:1: X_GCC_MAX_ALIGN_T = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:419:1: X_GFNIINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/gfniintrin.h:29:1: X_GNU_SOURCE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:242:1: X_GUIDDEF_H_ = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:73:1: X_HEAPAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/heapapi.h:6:1: X_HEAPBADBEGIN = -3 // /usr/x86_64-w64-mingw32/include/malloc.h:34:1: X_HEAPBADNODE = -4 // /usr/x86_64-w64-mingw32/include/malloc.h:35:1: X_HEAPBADPTR = -6 // /usr/x86_64-w64-mingw32/include/malloc.h:37:1: X_HEAPEMPTY = -1 // /usr/x86_64-w64-mingw32/include/malloc.h:32:1: X_HEAPEND = -5 // /usr/x86_64-w64-mingw32/include/malloc.h:36:1: X_HEAPINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/malloc.h:44:1: X_HEAPOK = -2 // /usr/x86_64-w64-mingw32/include/malloc.h:33:1: X_HEAP_MAXREQ = 0xFFFFFFFFFFFFFFE0 // /usr/x86_64-w64-mingw32/include/malloc.h:18:1: X_HEX = 0x80 // /usr/x86_64-w64-mingw32/include/ctype.h:100:1: X_HITLOGGING_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9167:1: X_HPOWERNOTIFY_DEF_ = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:2119:1: X_HRESULT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:418:1: X_HYPER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/rpcndr.h:68:1: X_I16_MAX = 32767 // /usr/x86_64-w64-mingw32/include/limits.h:54:1: X_I16_MIN = -32768 // /usr/x86_64-w64-mingw32/include/limits.h:53:1: X_I32_MAX = 2147483647 // /usr/x86_64-w64-mingw32/include/limits.h:58:1: X_I32_MIN = -2147483648 // /usr/x86_64-w64-mingw32/include/limits.h:57:1: X_I64_MAX = 9223372036854775807 // /usr/x86_64-w64-mingw32/include/limits.h:71:1: X_I64_MIN = -9223372036854775808 // /usr/x86_64-w64-mingw32/include/limits.h:70:1: X_I8_MAX = 127 // /usr/x86_64-w64-mingw32/include/limits.h:50:1: X_I8_MIN = -128 // /usr/x86_64-w64-mingw32/include/limits.h:49:1: X_IMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/immintrin.h:25:1: X_IMM_ = 0 // /usr/x86_64-w64-mingw32/include/imm.h:7:1: X_IMM_SDK_DEFINED_ = 0 // /usr/x86_64-w64-mingw32/include/imm.h:16:1: X_INC_CDERR = 0 // /usr/x86_64-w64-mingw32/include/cderr.h:7:1: X_INC_COMMDLG = 0 // /usr/x86_64-w64-mingw32/include/commdlg.h:9:1: X_INC_CORECRT = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:8:1: X_INC_CORECRT_STARTUP = 0 // /usr/x86_64-w64-mingw32/include/corecrt_startup.h:8:1: X_INC_CORECRT_WSTDLIB = 0 // /usr/x86_64-w64-mingw32/include/corecrt_wstdlib.h:7:1: X_INC_CRTDEFS = 0 // /usr/x86_64-w64-mingw32/include/crtdefs.h:8:1: X_INC_CRTDEFS_MACRO = 0 // /usr/x86_64-w64-mingw32/include/_mingw_mac.h:8:1: X_INC_CRT_UNICODE_MACROS = 2 // /usr/x86_64-w64-mingw32/include/_mingw_unicode.h:19:1: X_INC_CTYPE = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:7:1: X_INC_DDEMLH = 0 // /usr/x86_64-w64-mingw32/include/ddeml.h:7:1: X_INC_ERRNO = 0 // /usr/x86_64-w64-mingw32/include/errno.h:7:1: X_INC_EXCPT = 0 // /usr/x86_64-w64-mingw32/include/excpt.h:7:1: X_INC_LIMITS = 0 // /usr/x86_64-w64-mingw32/include/limits.h:9:1: X_INC_MINGW_SECAPI = 0 // /usr/x86_64-w64-mingw32/include/_mingw_secapi.h:8:1: X_INC_MMSYSTEM = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:7:1: X_INC_PROCESS = 0 // /usr/x86_64-w64-mingw32/include/process.h:7:1: X_INC_SDKDDKVER = 0 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:11:1: X_INC_SETJMP = 0 // /usr/x86_64-w64-mingw32/include/setjmp.h:7:1: X_INC_SHELLAPI = 0 // /usr/x86_64-w64-mingw32/include/shellapi.h:8:1: X_INC_STDARG = 0 // /usr/x86_64-w64-mingw32/include/_mingw_stdarg.h:8:1: X_INC_STDDEF = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:10:1: X_INC_STDIO = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:7:1: X_INC_STDIO_S = 0 // /usr/x86_64-w64-mingw32/include/sec_api/stdio_s.h:7:1: X_INC_STDLIB = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:7:1: X_INC_STDLIB_S = 0 // /usr/x86_64-w64-mingw32/include/sec_api/stdlib_s.h:7:1: X_INC_STRING = 0 // /usr/x86_64-w64-mingw32/include/string.h:7:1: X_INC_STRING_S = 0 // /usr/x86_64-w64-mingw32/include/sec_api/string_s.h:7:1: X_INC_SWPRINTF_INL = 0 // /usr/x86_64-w64-mingw32/include/swprintf.inl:8:1: X_INC_TYPES = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:7:1: X_INC_VADEFS = 0 // /usr/x86_64-w64-mingw32/include/vadefs.h:7:1: X_INC_VIRTDISK = 0 // /usr/x86_64-w64-mingw32/include/virtdisk.h:7:1: X_INC_WINAPIFAMILY = 0 // /usr/x86_64-w64-mingw32/include/winapifamily.h:7:1: X_INC_WINDOWS = 0 // /usr/x86_64-w64-mingw32/include/windows.h:23:1: X_INC_WTIME_INL = 0 // /usr/x86_64-w64-mingw32/include/time.h:190:1: X_INC_WTIME_S_INL = 0 // /usr/x86_64-w64-mingw32/include/time.h:202:1: X_INC__MINGW_H = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:8:1: X_INO_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:42:1: X_INT128_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:237:1: X_INTEGRAL_MAX_BITS = 64 // <predefined>:332:1: X_INTERLOCKAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/interlockedapi.h:6:1: X_INTPTR_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:62:1: X_INTRIN_MAC_ = 0 // /usr/x86_64-w64-mingw32/include/psdk_inc/intrin-impl.h:73:1: X_IOB_ENTRIES = 20 // /usr/x86_64-w64-mingw32/include/stdio.h:20:1: X_IOEOF = 0x0010 // /usr/x86_64-w64-mingw32/include/stdio.h:127:1: X_IOERR = 0x0020 // /usr/x86_64-w64-mingw32/include/stdio.h:128:1: X_IOFBF = 0x0000 // /usr/x86_64-w64-mingw32/include/stdio.h:122:1: X_IOLBF = 0x0040 // /usr/x86_64-w64-mingw32/include/stdio.h:123:1: X_IOMYBUF = 0x0008 // /usr/x86_64-w64-mingw32/include/stdio.h:126:1: X_IONBF = 0x0004 // /usr/x86_64-w64-mingw32/include/stdio.h:124:1: X_IOREAD = 0x0001 // /usr/x86_64-w64-mingw32/include/stdio.h:119:1: X_IORW = 0x0080 // /usr/x86_64-w64-mingw32/include/stdio.h:130:1: X_IOSTRG = 0x0040 // /usr/x86_64-w64-mingw32/include/stdio.h:129:1: X_IOWRT = 0x0002 // /usr/x86_64-w64-mingw32/include/stdio.h:120:1: X_IO_APISET_H_ = 0 // /usr/x86_64-w64-mingw32/include/ioapiset.h:6:1: X_IRQL_requires_same_ = 0 // /usr/x86_64-w64-mingw32/include/driverspecs.h:19:1: X_IRQL_restores_ = 0 // /usr/x86_64-w64-mingw32/include/driverspecs.h:20:1: X_IRQL_saves_ = 0 // /usr/x86_64-w64-mingw32/include/driverspecs.h:21:1: X_In_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:23:1: X_In_opt_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:24:1: X_In_opt_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:26:1: X_In_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:25:1: X_Inout_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:63:1: X_Inout_opt_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:64:1: X_Inout_opt_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:66:1: X_Inout_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:65:1: X_Interlocked_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:32:1: X_JBLEN = 16 // /usr/x86_64-w64-mingw32/include/setjmp.h:116:1: X_JMP_BUF_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/setjmp.h:200:1: X_JOBAPISET_H_ = 0 // /usr/x86_64-w64-mingw32/include/jobapi.h:6:1: X_KTMTYPES_ = 0 // /usr/x86_64-w64-mingw32/include/ktmtypes.h:7:1: X_LANGID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:460:1: X_LARGEFILE_SOURCE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:201:1: X_LARGE_FILE = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:197:1: X_LARGE_INTEGER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:500:1: X_LCID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:455:1: X_LDT_ENTRY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:2414:1: X_LEADBYTE = 0x8000 // /usr/x86_64-w64-mingw32/include/ctype.h:102:1: X_LIMITS_H___ = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include-fixed/limits.h:60:1: X_LIST_ENTRY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:610:1: X_LOGPALETTE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1031:1: X_LOWER = 0x2 // /usr/x86_64-w64-mingw32/include/ctype.h:93:1: X_LPAUTHENTICATIONEX_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2018:1: X_LPAUTHENTICATION_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:1930:1: X_LPBINDCALLBACKREDIRECT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9384:1: X_LPBINDHOST_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:4402:1: X_LPBINDING_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:1118:1: X_LPBINDPROTOCOL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:1030:1: X_LPBINDSTATUSCALLBACKEX_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:1712:1: X_LPBINDSTATUSCALLBACK_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:1285:1: X_LPBLOB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:381:1: X_LPCATALOGFILEINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:8814:1: X_LPCBYTE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winscard.h:22:1: X_LPCODEINSTALL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2659:1: X_LPCVOID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:155:1: X_LPDATAFILTER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:8909:1: X_LPENCODINGFILTERFACTORY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9047:1: X_LPGETBINDHANDLE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9282:1: X_LPHTTPNEGOTIATE2_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2239:1: X_LPHTTPNEGOTIATE3_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2352:1: X_LPHTTPNEGOTIATE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2132:1: X_LPHTTPSECURITY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:3884:1: X_LPIINTERNET = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:4695:1: X_LPIINTERNETBINDINFO = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:4764:1: X_LPIINTERNETBINDINFOEX = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:4893:1: X_LPIINTERNETPRIORITY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:6063:1: X_LPIINTERNETPROTOCOLINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:6158:1: X_LPIINTERNETPROTOCOLROOT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5006:1: X_LPIINTERNETPROTOCOLSINKSTACKABLE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5671:1: X_LPIINTERNETPROTOCOLSINK_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5545:1: X_LPIINTERNETPROTOCOL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5183:1: X_LPIINTERNETSESSION_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5775:1: X_LPIINTERNETTHREADSWITCH_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:5970:1: X_LPINTERNETHOSTSECURITYMANANGER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7439:1: X_LPINTERNETSECURITYMANANGER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:6629:1: X_LPINTERNETSECURITYMGRSITE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:6536:1: X_LPINTERNETZONEMANAGER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:7772:1: X_LPIWRAPPEDPROTOCOL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9196:1: X_LPMONIKERPROP_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:937:1: X_LPPERSISTMONIKER_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:788:1: X_LPSOFTDISTEXT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:8645:1: X_LPWINDOWFORBINDINGUI_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2573:1: X_LPWININETFILESTREAM_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:2476:1: X_LPWININETHTTPINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:3980:1: X_LPWININETHTTPTIMEOUTS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:4111:1: X_LPWININETINFO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:3775:1: X_LWPINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/lwpintrin.h:29:1: X_LZCNTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/lzcntintrin.h:30:1: X_LZEXPAND_ = 0 // /usr/x86_64-w64-mingw32/include/lzexpand.h:7:1: X_Literal_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:159:1: X_MALLOC_H_ = 0 // /usr/x86_64-w64-mingw32/include/malloc.h:7:1: X_MATH_H_ = 0 // /usr/x86_64-w64-mingw32/include/math.h:7:1: X_MAX_DIR = 256 // /usr/x86_64-w64-mingw32/include/stdlib.h:129:1: X_MAX_DRIVE = 3 // /usr/x86_64-w64-mingw32/include/stdlib.h:128:1: X_MAX_ENV = 32767 // /usr/x86_64-w64-mingw32/include/stdlib.h:141:1: X_MAX_EXT = 256 // /usr/x86_64-w64-mingw32/include/stdlib.h:131:1: X_MAX_FNAME = 256 // /usr/x86_64-w64-mingw32/include/stdlib.h:130:1: X_MAX_PATH = 260 // /usr/x86_64-w64-mingw32/include/stdlib.h:127:1: X_MAX_WAIT_MALLOC_CRT = 60000 // /usr/x86_64-w64-mingw32/include/malloc.h:108:1: X_MCIDEVICEID_ = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1785:1: X_MCIERROR_ = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:1780:1: X_MCX_H_ = 0 // /usr/x86_64-w64-mingw32/include/mcx.h:7:1: X_MEMORYAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/memoryapi.h:6:1: X_MINGW_IP_MREQ1_H = 0 // /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_mreq1.h:8:1: X_MINGW_IP_TYPES_H = 0 // /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:8:1: X_MINWINBASE_ = 0 // /usr/x86_64-w64-mingw32/include/minwinbase.h:2:1: X_MINWINDEF_ = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:2:1: X_MM3DNOW_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mm3dnow.h:28:1: X_MMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:28:1: X_MMRESULT_ = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:31:1: X_MM_CMPINT_EQ = 0x0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9864:1: X_MM_CMPINT_GE = 0x5 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9870:1: X_MM_CMPINT_GT = 0x6 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9872:1: X_MM_CMPINT_LE = 0x2 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9866:1: X_MM_CMPINT_LT = 0x1 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9865:1: X_MM_CMPINT_NE = 0x4 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9868:1: X_MM_CMPINT_NLE = 0x6 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9871:1: X_MM_CMPINT_NLT = 0x5 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9869:1: X_MM_CMPINT_UNUSED = 0x3 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:9867:1: X_MM_DENORMALS_ZERO_MASK = 0x0040 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pmmintrin.h:40:1: X_MM_DENORMALS_ZERO_OFF = 0x0000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pmmintrin.h:42:1: X_MM_DENORMALS_ZERO_ON = 0x0040 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pmmintrin.h:41:1: X_MM_EXCEPT_DENORM = 0x0002 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:84:1: X_MM_EXCEPT_DIV_ZERO = 0x0004 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:85:1: X_MM_EXCEPT_INEXACT = 0x0020 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:88:1: X_MM_EXCEPT_INVALID = 0x0001 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:83:1: X_MM_EXCEPT_MASK = 0x003f // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:82:1: X_MM_EXCEPT_OVERFLOW = 0x0008 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:86:1: X_MM_EXCEPT_UNDERFLOW = 0x0010 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:87:1: X_MM_FLUSH_ZERO_MASK = 0x8000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:104:1: X_MM_FLUSH_ZERO_OFF = 0x0000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:106:1: X_MM_FLUSH_ZERO_ON = 0x8000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:105:1: X_MM_FROUND_CEIL = 2 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:54:1: X_MM_FROUND_CUR_DIRECTION = 0x04 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:45:1: X_MM_FROUND_FLOOR = 1 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:52:1: X_MM_FROUND_NEARBYINT = 12 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:60:1: X_MM_FROUND_NINT = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:50:1: X_MM_FROUND_NO_EXC = 0x08 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:48:1: X_MM_FROUND_RAISE_EXC = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:47:1: X_MM_FROUND_RINT = 4 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:58:1: X_MM_FROUND_TO_NEAREST_INT = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:41:1: X_MM_FROUND_TO_NEG_INF = 0x01 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:42:1: X_MM_FROUND_TO_POS_INF = 0x02 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:43:1: X_MM_FROUND_TO_ZERO = 0x03 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:44:1: X_MM_FROUND_TRUNC = 3 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:56:1: X_MM_MALLOC_H_INCLUDED = 0 // /usr/x86_64-w64-mingw32/include/intrin.h:63:1: X_MM_MASK_DENORM = 0x0100 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:92:1: X_MM_MASK_DIV_ZERO = 0x0200 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:93:1: X_MM_MASK_INEXACT = 0x1000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:96:1: X_MM_MASK_INVALID = 0x0080 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:91:1: X_MM_MASK_MASK = 0x1f80 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:90:1: X_MM_MASK_OVERFLOW = 0x0400 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:94:1: X_MM_MASK_UNDERFLOW = 0x0800 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:95:1: X_MM_ROUND_DOWN = 0x2000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:100:1: X_MM_ROUND_MASK = 0x6000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:98:1: X_MM_ROUND_NEAREST = 0x0000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:99:1: X_MM_ROUND_TOWARD_ZERO = 0x6000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:102:1: X_MM_ROUND_UP = 0x4000 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:101:1: X_MODE_T_ = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:73:1: X_MOVDIRINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/movdirintrin.h:29:1: X_MSC_VER = 1900 // <defines>:25:1: X_MT = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:330:1: X_MWAITXINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mwaitxintrin.h:25:1: X_M_AMD64 = 100 // /usr/x86_64-w64-mingw32/include/_mingw_mac.h:62:1: X_M_X64 = 100 // /usr/x86_64-w64-mingw32/include/_mingw_mac.h:63:1: X_Maybe_raises_SEH_exception_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:183:1: X_Must_inspect_result_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:184:1: X_NAMEDPIPE_H_ = 0 // /usr/x86_64-w64-mingw32/include/namedpipeapi.h:6:1: X_NFILE = 512 // /usr/x86_64-w64-mingw32/include/stdio.h:18:1: X_NLSCMPERROR = 2147483647 // /usr/x86_64-w64-mingw32/include/string.h:26:1: X_NLSCMP_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/string.h:25:1: X_NSTREAM_ = 512 // /usr/x86_64-w64-mingw32/include/stdio.h:19:1: X_NTDDDISK_H_ = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:444:1: X_NTDDSCRD_H2_ = 0 // /usr/x86_64-w64-mingw32/include/winsmcrd.h:7:1: X_NTDDSTOR_H_ = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:156:1: X_NTDDTAPE_WINNT_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8610:1: X_NTSTATUS_PSDK = 0 // /usr/x86_64-w64-mingw32/include/bcrypt.h:26:1: X_NTTMAPI_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:8939:1: X_NT_TIB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:4120:1: X_No_competing_thread_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:35:1: X_No_competing_thread_begin_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:12:1: X_No_competing_thread_end_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:13:1: X_Notliteral_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:160:1: X_NullNull_terminated_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:202:1: X_Null_terminated_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:201:1: X_OBJBASE_H_ = 0 // /usr/x86_64-w64-mingw32/include/objbase.h:11:1: X_OBJIDLBASE_ = 0 // /usr/x86_64-w64-mingw32/include/objidlbase.h:6524:1: X_OFF64_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:12:1: X_OFF_T_ = 0 // /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:4:1: X_OFF_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:2:1: X_OLD_P_OVERLAY = 2 // /usr/x86_64-w64-mingw32/include/stdio.h:1557:1: X_OLE2_H_ = 0 // /usr/x86_64-w64-mingw32/include/ole2.h:8:1: X_OLEAUTO_H_ = 0 // /usr/x86_64-w64-mingw32/include/oleauto.h:7:1: X_ONEXIT_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:48:1: X_OS_COMMON_H_ = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:20638:1: X_OUT_TO_DEFAULT = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:133:1: X_OUT_TO_MSGBOX = 2 // /usr/x86_64-w64-mingw32/include/stdlib.h:135:1: X_OUT_TO_STDERR = 1 // /usr/x86_64-w64-mingw32/include/stdlib.h:134:1: X_OVERFLOW = 3 // /usr/x86_64-w64-mingw32/include/math.h:21:1: X_Out_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:41:1: X_Out_opt_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:42:1: X_Outptr_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:83:1: X_Outptr_opt_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:85:1: X_Outptr_opt_result_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:86:1: X_Outptr_opt_result_maybenull_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:90:1: X_Outptr_opt_result_nullonfailure_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:92:1: X_Outptr_opt_result_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:88:1: X_Outptr_result_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:84:1: X_Outptr_result_maybenull_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:89:1: X_Outptr_result_nullonfailure_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:91:1: X_Outptr_result_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:87:1: X_Outref_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:123:1: X_Outref_result_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:124:1: X_Outref_result_nullonfailure_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:137:1: X_PALETTEENTRY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:1021:1: X_PCONFIGINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pconfigintrin.h:29:1: X_PGLOBAL = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:342:1: X_PID_T_ = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:58:1: X_PKUINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pkuintrin.h:29:1: X_PLOSS = 6 // /usr/x86_64-w64-mingw32/include/math.h:24:1: X_PMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/pmmintrin.h:28:1: X_POPCNTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/popcntintrin.h:25:1: X_POSIX_CPUTIME = 200809 // /usr/x86_64-w64-mingw32/include/pthread_time.h:40:1: X_POSIX_MONOTONIC_CLOCK = 200809 // /usr/x86_64-w64-mingw32/include/pthread_time.h:35:1: X_POSIX_THREAD_CPUTIME = 200809 // /usr/x86_64-w64-mingw32/include/pthread_time.h:45:1: X_POSIX_TIMERS = 200809 // /usr/x86_64-w64-mingw32/include/pthread_time.h:30:1: X_PRFCHWINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/prfchwintrin.h:29:1: X_PROCESSENV_ = 0 // /usr/x86_64-w64-mingw32/include/processenv.h:7:1: X_PROCESSTHREADSAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/processthreadsapi.h:6:1: X_PROCESSTOPOLOGYAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/processtopologyapi.h:6:1: X_PROFILEAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/profileapi.h:6:1: X_PROPVARIANTINIT_DEFINED_ = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:1080:1: X_PROVIDER_STRUCTS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winreg.h:59:1: X_PRSHT_H_ = 0 // /usr/x86_64-w64-mingw32/include/prsht.h:7:1: X_PTRDIFF_T_ = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:90:1: X_PTRDIFF_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:88:1: X_PUNCT = 0x10 // /usr/x86_64-w64-mingw32/include/ctype.h:97:1: X_P_DETACH = 4 // /usr/x86_64-w64-mingw32/include/stdio.h:1559:1: X_P_NOWAIT = 1 // /usr/x86_64-w64-mingw32/include/stdio.h:1556:1: X_P_NOWAITO = 3 // /usr/x86_64-w64-mingw32/include/stdio.h:1558:1: X_P_OVERLAY = 2 // /usr/x86_64-w64-mingw32/include/stdio.h:1560:1: X_P_WAIT = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:1555:1: X_P_tmpdir = "\\" // /usr/x86_64-w64-mingw32/include/stdio.h:42:1: X_Points_to_data_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:158:1: X_Post_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:240:1: X_Post_equals_last_error_ = 0 // /usr/x86_64-w64-mingw32/include/specstrings.h:288:1: X_Pre_notnull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:249:1: X_Printf_format_string_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:227:1: X_QSORT_S_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sec_api/stdlib_s.h:40:1: X_RDSEEDINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rdseedintrin.h:29:1: X_REFCLSID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:133:1: X_REFFMTID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:142:1: X_REFGUID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:115:1: X_REFIID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:124:1: X_REFPROPVARIANT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:318:1: X_REFVARIANT_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/oaidl.h:566:1: X_REPORT_ERRMODE = 3 // /usr/x86_64-w64-mingw32/include/stdlib.h:136:1: X_ROTFLAGS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:172:1: X_ROTREGFLAGS_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:241:1: X_ROT_COMPARE_MAX_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:178:1: X_RSIZE_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:58:1: X_RTL_RUN_ONCE_DEF = 1 // /usr/x86_64-w64-mingw32/include/winnt.h:7778:1: X_RTMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:29:1: X_Raises_SEH_exception_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:182:1: X_Requires_no_locks_held_ = 0 // /usr/x86_64-w64-mingw32/include/concurrencysal.h:45:1: X_Reserved_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:193:1: X_Result_nullonfailure_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:138:1: X_Result_zeroonfailure_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:139:1: X_Ret_maybenull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:145:1: X_Ret_maybenull_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:143:1: X_Ret_notnull_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:144:1: X_Ret_null_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:146:1: X_Ret_valid_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:147:1: X_Ret_z_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:142:1: X_SECURECRT_ERRCODE_VALUES_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/errno.h:63:1: X_SECURECRT_FILL_BUFFER_PATTERN = 0xFD // /usr/x86_64-w64-mingw32/include/_mingw.h:349:1: X_SERIALIZEDPROPERTYVALUE_DEFINED_ = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:1099:1: X_SGXINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/sgxintrin.h:25:1: X_SHAINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/shaintrin.h:29:1: X_SIDD_BIT_MASK = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:616:1: X_SIDD_CMP_EQUAL_ANY = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:600:1: X_SIDD_CMP_EQUAL_EACH = 0x08 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:602:1: X_SIDD_CMP_EQUAL_ORDERED = 0x0c // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:603:1: X_SIDD_CMP_RANGES = 0x04 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:601:1: X_SIDD_LEAST_SIGNIFICANT = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:612:1: X_SIDD_MASKED_NEGATIVE_POLARITY = 0x30 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:609:1: X_SIDD_MASKED_POSITIVE_POLARITY = 0x20 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:608:1: X_SIDD_MOST_SIGNIFICANT = 0x40 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:613:1: X_SIDD_NEGATIVE_POLARITY = 0x10 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:607:1: X_SIDD_POSITIVE_POLARITY = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:606:1: X_SIDD_SBYTE_OPS = 0x02 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:596:1: X_SIDD_SWORD_OPS = 0x03 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:597:1: X_SIDD_UBYTE_OPS = 0x00 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:594:1: X_SIDD_UNIT_MASK = 0x40 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:617:1: X_SIDD_UWORD_OPS = 0x01 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:595:1: X_SIGN_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/math.h:286:1: X_SIGSET_T_ = 0 // /usr/x86_64-w64-mingw32/include/sys/types.h:101:1: X_SING = 2 // /usr/x86_64-w64-mingw32/include/math.h:20:1: X_SIZE_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:37:1: X_SLIST_HEADER_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7723:1: X_SMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/smmintrin.h:28:1: X_SPACE = 0x8 // /usr/x86_64-w64-mingw32/include/ctype.h:95:1: X_SPAWNV_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:1567:1: X_SQLITE3RBU_H = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:203509:1: X_SQLITE3RTREE_H_ = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:10709:1: X_SQLITE_OS_H_ = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:16188:1: X_SSIZE_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:47:1: X_STDARG_H = 0 // /usr/x86_64-w64-mingw32/include/stdarg.h:36:1: X_STDDEF_H = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:49:1: X_STDDEF_H_ = 0 // /usr/x86_64-w64-mingw32/include/stddef.h:50:1: X_STDIO_CONFIG_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt_stdio_config.h:8:1: X_STDIO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:1453:1: X_STDIO_S_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sec_api/stdio_s.h:25:1: X_STDSTREAM_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:112:1: X_STRALIGN_USE_SECURE_CRT = 0 // /usr/x86_64-w64-mingw32/include/stralign.h:10:1: X_SYNCHAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/synchapi.h:6:1: X_SYSINFOAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/sysinfoapi.h:6:1: X_SYSTEMTIME_ = 0 // /usr/x86_64-w64-mingw32/include/minwinbase.h:48:1: X_SYSTEMTOPOLOGY_H_ = 0 // /usr/x86_64-w64-mingw32/include/systemtopologyapi.h:6:1: X_SYS_GUID_OPERATORS_ = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:153:1: X_SYS_GUID_OPERATOR_EQ_ = 0 // /usr/x86_64-w64-mingw32/include/guiddef.h:178:1: X_SYS_OPEN = 20 // /usr/x86_64-w64-mingw32/include/stdio.h:63:1: X_Scanf_format_string_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:228:1: X_Scanf_s_format_string_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:229:1: X_Strict_type_match_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:256:1: X_TAGLC_ID_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:447:1: X_TBMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/tbmintrin.h:29:1: X_TCHAR_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:372:1: X_TEXTMETRIC_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:814:1: X_THREADLOCALEINFO = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:456:1: X_THREADPOOLAPISET_H_ = 0 // /usr/x86_64-w64-mingw32/include/threadpoolapiset.h:6:1: X_THREADPOOLLEGACYAPISET_H_ = 0 // /usr/x86_64-w64-mingw32/include/threadpoollegacyapiset.h:6:1: X_TIME32_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:122:1: X_TIME64_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:127:1: X_TIMEB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sys/timeb.h:51:1: X_TIMEB_H_ = 0 // /usr/x86_64-w64-mingw32/include/sys/timeb.h:7:1: X_TIMEB_H_S = 0 // /usr/x86_64-w64-mingw32/include/sec_api/sys/timeb_s.h:8:1: X_TIMESPEC_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sys/timeb.h:90:1: X_TIMEVAL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/_timeval.h:8:1: X_TIMEZONEAPI_H_ = 0 // /usr/x86_64-w64-mingw32/include/timezoneapi.h:6:1: X_TIMEZONE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/time.h:265:1: X_TIME_H_ = 0 // /usr/x86_64-w64-mingw32/include/time.h:7:1: X_TIME_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:139:1: X_TLOSS = 5 // /usr/x86_64-w64-mingw32/include/math.h:23:1: X_TMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/tmmintrin.h:28:1: X_TM_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/time.h:96:1: X_TWO_DIGIT_EXPONENT = 0x1 // /usr/x86_64-w64-mingw32/include/stdio.h:135:1: X_UI16_MAX = 0xffff // /usr/x86_64-w64-mingw32/include/limits.h:55:1: X_UI32_MAX = 0xffffffff // /usr/x86_64-w64-mingw32/include/limits.h:59:1: X_UI64_MAX = 0xffffffffffffffff // /usr/x86_64-w64-mingw32/include/limits.h:72:1: X_UI8_MAX = 0xff // /usr/x86_64-w64-mingw32/include/limits.h:51:1: X_UINTPTR_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:75:1: X_ULONGLONG_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:489:1: X_UNDERFLOW = 4 // /usr/x86_64-w64-mingw32/include/math.h:22:1: X_UPPER = 0x1 // /usr/x86_64-w64-mingw32/include/ctype.h:92:1: X_USEDENTRY = 1 // /usr/x86_64-w64-mingw32/include/malloc.h:41:1: X_Use_decl_annotations_ = 0 // /usr/x86_64-w64-mingw32/include/sal.h:185:1: X_VA_LIST = 0 // /usr/x86_64-w64-mingw32/include/stdarg.h:116:1: X_VA_LIST_ = 0 // /usr/x86_64-w64-mingw32/include/stdarg.h:113:1: X_VA_LIST_DEFINED = 0 // <builtin>:55:1: X_VA_LIST_T_H = 0 // /usr/x86_64-w64-mingw32/include/stdarg.h:122:1: X_VPCLMULQDQINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/vpclmulqdqintrin.h:29:1: X_W64 = 0 // /usr/x86_64-w64-mingw32/include/_mingw.h:296:1: X_WAITPKG_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/waitpkgintrin.h:29:1: X_WAIT_CHILD = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:1562:1: X_WAIT_GRANDCHILD = 1 // /usr/x86_64-w64-mingw32/include/stdio.h:1563:1: X_WAVEFORMATEX_ = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:491:1: X_WBNOINVDINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/wbnoinvdintrin.h:29:1: X_WCHAR_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:101:1: X_WCTYPE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:149:1: X_WCTYPE_INLINE_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/ctype.h:240:1: X_WCTYPE_T_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:108:1: X_WConst_return = 0 // /usr/x86_64-w64-mingw32/include/string.h:41:1: X_WEXEC_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/process.h:96:1: X_WIN32 = 1 // <predefined>:165:1: X_WIN32_IE = 1538 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:197:1: X_WIN32_IE_IE100 = 0x0a00 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:43:1: X_WIN32_IE_IE110 = 0x0A00 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:44:1: X_WIN32_IE_IE20 = 0x0200 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:29:1: X_WIN32_IE_IE30 = 0x0300 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:30:1: X_WIN32_IE_IE302 = 0x0302 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:31:1: X_WIN32_IE_IE40 = 0x0400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:32:1: X_WIN32_IE_IE401 = 0x0401 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:33:1: X_WIN32_IE_IE50 = 0x0500 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:34:1: X_WIN32_IE_IE501 = 0x0501 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:35:1: X_WIN32_IE_IE55 = 0x0550 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:36:1: X_WIN32_IE_IE60 = 0x0600 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:37:1: X_WIN32_IE_IE60SP1 = 0x0601 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:38:1: X_WIN32_IE_IE60SP2 = 0x0603 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:39:1: X_WIN32_IE_IE70 = 0x0700 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:40:1: X_WIN32_IE_IE80 = 0x0800 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:41:1: X_WIN32_IE_IE90 = 0x0900 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:42:1: X_WIN32_IE_LONGHORN = 1792 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:68:1: X_WIN32_IE_NT4 = 512 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:47:1: X_WIN32_IE_NT4SP1 = 512 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:48:1: X_WIN32_IE_NT4SP2 = 512 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:49:1: X_WIN32_IE_NT4SP3 = 770 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:50:1: X_WIN32_IE_NT4SP4 = 1025 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:51:1: X_WIN32_IE_NT4SP5 = 1025 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:52:1: X_WIN32_IE_NT4SP6 = 1280 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:53:1: X_WIN32_IE_WIN10 = 2560 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:73:1: X_WIN32_IE_WIN2K = 1281 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:57:1: X_WIN32_IE_WIN2KSP1 = 1281 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:58:1: X_WIN32_IE_WIN2KSP2 = 1281 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:59:1: X_WIN32_IE_WIN2KSP3 = 1281 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:60:1: X_WIN32_IE_WIN2KSP4 = 1281 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:61:1: X_WIN32_IE_WIN6 = 1792 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:67:1: X_WIN32_IE_WIN7 = 2048 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:69:1: X_WIN32_IE_WIN8 = 2560 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:70:1: X_WIN32_IE_WIN98 = 1025 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:54:1: X_WIN32_IE_WIN98SE = 1280 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:55:1: X_WIN32_IE_WINBLUE = 2560 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:71:1: X_WIN32_IE_WINME = 1360 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:56:1: X_WIN32_IE_WINTHRESHOLD = 2560 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:72:1: X_WIN32_IE_WS03 = 0x0602 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:65:1: X_WIN32_IE_WS03SP1 = 1539 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:66:1: X_WIN32_IE_XP = 1536 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:62:1: X_WIN32_IE_XPSP1 = 1537 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:63:1: X_WIN32_IE_XPSP2 = 1539 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:64:1: X_WIN32_WINNT = 0x502 // /usr/x86_64-w64-mingw32/include/_mingw.h:233:1: X_WIN32_WINNT_LONGHORN = 0x0600 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:21:1: X_WIN32_WINNT_NT4 = 0x0400 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:14:1: X_WIN32_WINNT_VISTA = 0x0600 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:19:1: X_WIN32_WINNT_WIN10 = 0x0A00 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:26:1: X_WIN32_WINNT_WIN2K = 0x0500 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:15:1: X_WIN32_WINNT_WIN6 = 0x0600 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:18:1: X_WIN32_WINNT_WIN7 = 0x0601 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:22:1: X_WIN32_WINNT_WIN8 = 0x0602 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:23:1: X_WIN32_WINNT_WINBLUE = 0x0603 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:24:1: X_WIN32_WINNT_WINTHRESHOLD = 0x0A00 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:25:1: X_WIN32_WINNT_WINXP = 0x0501 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:16:1: X_WIN32_WINNT_WS03 = 0x0502 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:17:1: X_WIN32_WINNT_WS08 = 0x0600 // /usr/x86_64-w64-mingw32/include/sdkddkver.h:20:1: X_WIN64 = 1 // <predefined>:14:1: X_WINBASE_ = 0 // /usr/x86_64-w64-mingw32/include/winbase.h:6:1: X_WINCON_ = 0 // /usr/x86_64-w64-mingw32/include/wincon.h:7:1: X_WINDEF_ = 0 // /usr/x86_64-w64-mingw32/include/windef.h:6:1: X_WINDOWS_ = 0 // /usr/x86_64-w64-mingw32/include/windows.h:7:1: X_WINERROR_ = 0 // /usr/x86_64-w64-mingw32/include/winerror.h:7:1: X_WINGDI_ = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:7:1: X_WINIOCTL_ = 0 // /usr/x86_64-w64-mingw32/include/winioctl.h:40:1: X_WINNETWK_ = 0 // /usr/x86_64-w64-mingw32/include/winnetwk.h:6:1: X_WINNLS_ = 0 // /usr/x86_64-w64-mingw32/include/winnls.h:7:1: X_WINNT_ = 0 // /usr/x86_64-w64-mingw32/include/winnt.h:7:1: X_WINPERF_ = 0 // /usr/x86_64-w64-mingw32/include/winperf.h:7:1: X_WINREG_ = 0 // /usr/x86_64-w64-mingw32/include/winreg.h:7:1: X_WINSCARD_H_ = 0 // /usr/x86_64-w64-mingw32/include/winscard.h:7:1: X_WINSOCKAPI_ = 0 // /usr/x86_64-w64-mingw32/include/winsock.h:7:1: X_WINSPOOL_ = 0 // /usr/x86_64-w64-mingw32/include/winspool.h:7:1: X_WINSVC_ = 0 // /usr/x86_64-w64-mingw32/include/winsvc.h:7:1: X_WINT_T = 0 // /usr/x86_64-w64-mingw32/include/corecrt.h:110:1: X_WINUSER_ = 0 // /usr/x86_64-w64-mingw32/include/winuser.h:9:1: X_WMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/wmmintrin.h:28:1: X_WNNC_ = 0 // /usr/x86_64-w64-mingw32/include/wnnc.h:7:1: X_WOW64APISET_H_ = 0 // /usr/x86_64-w64-mingw32/include/wow64apiset.h:6:1: X_WRITE_ABORT_MSG = 0x1 // /usr/x86_64-w64-mingw32/include/stdlib.h:138:1: X_WSPAWN_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:1543:1: X_WSTDIO_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdio.h:958:1: X_WSTDIO_S_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sec_api/stdio_s.h:579:1: X_WSTDLIBP_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:673:1: X_WSTDLIB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/stdlib.h:553:1: X_WSTRING_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/string.h:129:1: X_WSTRING_S_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/sec_api/string_s.h:48:1: X_WTIME_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/time.h:213:1: X_X86INTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/x86intrin.h:25:1: X_XABORT_CAPACITY = 8 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:41:1: X_XABORT_CONFLICT = 4 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:40:1: X_XABORT_DEBUG = 16 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:42:1: X_XABORT_EXPLICIT = 1 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:38:1: X_XABORT_NESTED = 32 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:43:1: X_XABORT_RETRY = 2 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:39:1: X_XBEGIN_STARTED = 18446744073709551615 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/rtmintrin.h:37:1: X_XFORM_ = 0 // /usr/x86_64-w64-mingw32/include/wingdi.h:450:1: X_XHRPLUGGABLEPROTOCOL_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/urlmon.h:9374:1: X_XMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:28:1: X_XOPEN_SOURCE = 600 // testdata/sqlite-amalgamation-3380500/sqlite3.c:13528:1: X_XOPMMINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xopintrin.h:29:1: X_XSAVECINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xsavecintrin.h:29:1: X_XSAVEINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xsaveintrin.h:29:1: X_XSAVEOPTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xsaveoptintrin.h:29:1: X_XSAVESINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xsavesintrin.h:29:1: X_XTESTINTRIN_H_INCLUDED = 0 // /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xtestintrin.h:29:1: X_huge = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:22:1: X_loadds = 0 // /usr/x86_64-w64-mingw32/include/mmsystem.h:21:1: X_tagBLOB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypesbase.h:379:1: X_tagBSTRBLOB_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:491:1: X_tagCY_DEFINED = 0 // /usr/x86_64-w64-mingw32/include/wtypes.h:424:1: BBatch = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:59671:1: CPRIV_KEY_CACHE_MAX_ITEMS_DEFAULT = 20 // /usr/x86_64-w64-mingw32/include/wincrypt.h:619:1: CPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS_DEFAULT = 86400 // /usr/x86_64-w64-mingw32/include/wincrypt.h:622:1: CbNDRContext = 20 // /usr/x86_64-w64-mingw32/include/rpcndr.h:137:1: Cdecl = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:81:1: Chx1 = 0x0410 // /usr/x86_64-w64-mingw32/include/dlgs.h:30:1: Chx10 = 0x0419 // /usr/x86_64-w64-mingw32/include/dlgs.h:39:1: Chx11 = 0x041a // /usr/x86_64-w64-mingw32/include/dlgs.h:40:1: Chx12 = 0x041b // /usr/x86_64-w64-mingw32/include/dlgs.h:41:1: Chx13 = 0x041c // /usr/x86_64-w64-mingw32/include/dlgs.h:42:1: Chx14 = 0x041d // /usr/x86_64-w64-mingw32/include/dlgs.h:43:1: Chx15 = 0x041e // /usr/x86_64-w64-mingw32/include/dlgs.h:44:1: Chx16 = 0x041f // /usr/x86_64-w64-mingw32/include/dlgs.h:45:1: Chx2 = 0x0411 // /usr/x86_64-w64-mingw32/include/dlgs.h:31:1: Chx3 = 0x0412 // /usr/x86_64-w64-mingw32/include/dlgs.h:32:1: Chx4 = 0x0413 // /usr/x86_64-w64-mingw32/include/dlgs.h:33:1: Chx5 = 0x0414 // /usr/x86_64-w64-mingw32/include/dlgs.h:34:1: Chx6 = 0x0415 // /usr/x86_64-w64-mingw32/include/dlgs.h:35:1: Chx7 = 0x0416 // /usr/x86_64-w64-mingw32/include/dlgs.h:36:1: Chx8 = 0x0417 // /usr/x86_64-w64-mingw32/include/dlgs.h:37:1: Chx9 = 0x0418 // /usr/x86_64-w64-mingw32/include/dlgs.h:38:1: Cmb1 = 0x0470 // /usr/x86_64-w64-mingw32/include/dlgs.h:131:1: Cmb10 = 0x0479 // /usr/x86_64-w64-mingw32/include/dlgs.h:140:1: Cmb11 = 0x047a // /usr/x86_64-w64-mingw32/include/dlgs.h:141:1: Cmb12 = 0x047b // /usr/x86_64-w64-mingw32/include/dlgs.h:142:1: Cmb13 = 0x047c // /usr/x86_64-w64-mingw32/include/dlgs.h:143:1: Cmb14 = 0x047d // /usr/x86_64-w64-mingw32/include/dlgs.h:144:1: Cmb15 = 0x047e // /usr/x86_64-w64-mingw32/include/dlgs.h:145:1: Cmb16 = 0x047f // /usr/x86_64-w64-mingw32/include/dlgs.h:146:1: Cmb2 = 0x0471 // /usr/x86_64-w64-mingw32/include/dlgs.h:132:1: Cmb3 = 0x0472 // /usr/x86_64-w64-mingw32/include/dlgs.h:133:1: Cmb4 = 0x0473 // /usr/x86_64-w64-mingw32/include/dlgs.h:134:1: Cmb5 = 0x0474 // /usr/x86_64-w64-mingw32/include/dlgs.h:135:1: Cmb6 = 0x0475 // /usr/x86_64-w64-mingw32/include/dlgs.h:136:1: Cmb7 = 0x0476 // /usr/x86_64-w64-mingw32/include/dlgs.h:137:1: Cmb8 = 0x0477 // /usr/x86_64-w64-mingw32/include/dlgs.h:138:1: Cmb9 = 0x0478 // /usr/x86_64-w64-mingw32/include/dlgs.h:139:1: Ctl1 = 0x04A0 // /usr/x86_64-w64-mingw32/include/dlgs.h:174:1: CtlFirst = 0x0400 // /usr/x86_64-w64-mingw32/include/dlgs.h:9:1: CtlLast = 0x04ff // /usr/x86_64-w64-mingw32/include/dlgs.h:10:1: DwFORCE_KEY_PROTECTION_DISABLED = 0x0 // /usr/x86_64-w64-mingw32/include/dpapi.h:23:1: DwFORCE_KEY_PROTECTION_HIGH = 0x2 // /usr/x86_64-w64-mingw32/include/dpapi.h:25:1: DwFORCE_KEY_PROTECTION_USER_SELECT = 0x1 // /usr/x86_64-w64-mingw32/include/dpapi.h:24:1: Edt1 = 0x0480 // /usr/x86_64-w64-mingw32/include/dlgs.h:148:1: Edt10 = 0x0489 // /usr/x86_64-w64-mingw32/include/dlgs.h:157:1: Edt11 = 0x048a // /usr/x86_64-w64-mingw32/include/dlgs.h:158:1: Edt12 = 0x048b // /usr/x86_64-w64-mingw32/include/dlgs.h:159:1: Edt13 = 0x048c // /usr/x86_64-w64-mingw32/include/dlgs.h:160:1: Edt14 = 0x048d // /usr/x86_64-w64-mingw32/include/dlgs.h:161:1: Edt15 = 0x048e // /usr/x86_64-w64-mingw32/include/dlgs.h:162:1: Edt16 = 0x048f // /usr/x86_64-w64-mingw32/include/dlgs.h:163:1: Edt2 = 0x0481 // /usr/x86_64-w64-mingw32/include/dlgs.h:149:1: Edt3 = 0x0482 // /usr/x86_64-w64-mingw32/include/dlgs.h:150:1: Edt4 = 0x0483 // /usr/x86_64-w64-mingw32/include/dlgs.h:151:1: Edt5 = 0x0484 // /usr/x86_64-w64-mingw32/include/dlgs.h:152:1: Edt6 = 0x0485 // /usr/x86_64-w64-mingw32/include/dlgs.h:153:1: Edt7 = 0x0486 // /usr/x86_64-w64-mingw32/include/dlgs.h:154:1: Edt8 = 0x0487 // /usr/x86_64-w64-mingw32/include/dlgs.h:155:1: Edt9 = 0x0488 // /usr/x86_64-w64-mingw32/include/dlgs.h:156:1: EtBUFSIZE = 70 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29629:1: EtCHARX = 8 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29454:1: EtDECIMAL = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29464:1: EtDYNSTRING = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29452:1: EtEXP = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29448:1: EtFLOAT = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29447:1: EtGENERIC = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29449:1: EtINVALID = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29466:1: EtORDINAL = 15 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29463:1: EtPERCENT = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29453:1: EtPOINTER = 13 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29461:1: EtRADIX = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29446:1: EtSIZE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29450:1: EtSQLESCAPE = 9 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29456:1: EtSQLESCAPE2 = 10 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29457:1: EtSQLESCAPE3 = 14 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29462:1: EtSRCITEM = 12 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29460:1: EtSTRING = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29451:1: EtTOKEN = 11 // testdata/sqlite-amalgamation-3380500/sqlite3.c:29459:1: Far = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:73:1: Frm1 = 0x0434 // /usr/x86_64-w64-mingw32/include/dlgs.h:68:1: Frm2 = 0x0435 // /usr/x86_64-w64-mingw32/include/dlgs.h:69:1: Frm3 = 0x0436 // /usr/x86_64-w64-mingw32/include/dlgs.h:70:1: Frm4 = 0x0437 // /usr/x86_64-w64-mingw32/include/dlgs.h:71:1: Fts5YYNFTS5TOKEN = 16 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217860:1: Fts5YYNOCODE = 27 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217832:1: Fts5YYNOERRORRECOVERY = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217735:1: Fts5YYNRULE = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217858:1: Fts5YYNRULE_WITH_ACTION = 28 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217859:1: Fts5YYNSTATE = 35 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217857:1: Fts5YYPARSEFREENOTNULL = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217746:1: Fts5YYSTACKDEPTH = 100 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217845:1: Fts5YY_ACCEPT_ACTION = 81 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217865:1: Fts5YY_ACTTAB_COUNT = 105 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217935:1: Fts5YY_ERROR_ACTION = 80 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217864:1: Fts5YY_MAX_REDUCE = 110 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217868:1: Fts5YY_MAX_SHIFT = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217861:1: Fts5YY_MAX_SHIFTREDUCE = 79 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217863:1: Fts5YY_MIN_REDUCE = 83 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217867:1: Fts5YY_MIN_SHIFTREDUCE = 52 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217862:1: Fts5YY_NO_ACTION = 82 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217866:1: Fts5YY_REDUCE_COUNT = 17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217973:1: Fts5YY_REDUCE_MAX = 67 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217975:1: Fts5YY_REDUCE_MIN = -17 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217974:1: Fts5YY_SHIFT_COUNT = 34 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217964:1: Fts5YY_SHIFT_MAX = 93 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217966:1: Fts5YY_SHIFT_MIN = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217965:1: Grp1 = 0x0430 // /usr/x86_64-w64-mingw32/include/dlgs.h:64:1: Grp2 = 0x0431 // /usr/x86_64-w64-mingw32/include/dlgs.h:65:1: Grp3 = 0x0432 // /usr/x86_64-w64-mingw32/include/dlgs.h:66:1: Grp4 = 0x0433 // /usr/x86_64-w64-mingw32/include/dlgs.h:67:1: Ico1 = 0x043c // /usr/x86_64-w64-mingw32/include/dlgs.h:76:1: Ico2 = 0x043d // /usr/x86_64-w64-mingw32/include/dlgs.h:77:1: Ico3 = 0x043e // /usr/x86_64-w64-mingw32/include/dlgs.h:78:1: Ico4 = 0x043f // /usr/x86_64-w64-mingw32/include/dlgs.h:79:1: Lst1 = 0x0460 // /usr/x86_64-w64-mingw32/include/dlgs.h:114:1: Lst10 = 0x0469 // /usr/x86_64-w64-mingw32/include/dlgs.h:123:1: Lst11 = 0x046a // /usr/x86_64-w64-mingw32/include/dlgs.h:124:1: Lst12 = 0x046b // /usr/x86_64-w64-mingw32/include/dlgs.h:125:1: Lst13 = 0x046c // /usr/x86_64-w64-mingw32/include/dlgs.h:126:1: Lst14 = 0x046d // /usr/x86_64-w64-mingw32/include/dlgs.h:127:1: Lst15 = 0x046e // /usr/x86_64-w64-mingw32/include/dlgs.h:128:1: Lst16 = 0x046f // /usr/x86_64-w64-mingw32/include/dlgs.h:129:1: Lst2 = 0x0461 // /usr/x86_64-w64-mingw32/include/dlgs.h:115:1: Lst3 = 0x0462 // /usr/x86_64-w64-mingw32/include/dlgs.h:116:1: Lst4 = 0x0463 // /usr/x86_64-w64-mingw32/include/dlgs.h:117:1: Lst5 = 0x0464 // /usr/x86_64-w64-mingw32/include/dlgs.h:118:1: Lst6 = 0x0465 // /usr/x86_64-w64-mingw32/include/dlgs.h:119:1: Lst7 = 0x0466 // /usr/x86_64-w64-mingw32/include/dlgs.h:120:1: Lst8 = 0x0467 // /usr/x86_64-w64-mingw32/include/dlgs.h:121:1: Lst9 = 0x0468 // /usr/x86_64-w64-mingw32/include/dlgs.h:122:1: Near = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:74:1: Pascal = 0 // /usr/x86_64-w64-mingw32/include/minwindef.h:78:1: Psh1 = 0x0400 // /usr/x86_64-w64-mingw32/include/dlgs.h:12:1: Psh10 = 0x0409 // /usr/x86_64-w64-mingw32/include/dlgs.h:21:1: Psh11 = 0x040a // /usr/x86_64-w64-mingw32/include/dlgs.h:22:1: Psh12 = 0x040b // /usr/x86_64-w64-mingw32/include/dlgs.h:23:1: Psh13 = 0x040c // /usr/x86_64-w64-mingw32/include/dlgs.h:24:1: Psh14 = 0x040d // /usr/x86_64-w64-mingw32/include/dlgs.h:25:1: Psh15 = 0x040e // /usr/x86_64-w64-mingw32/include/dlgs.h:26:1: Psh16 = 0x040f // /usr/x86_64-w64-mingw32/include/dlgs.h:28:1: Psh2 = 0x0401 // /usr/x86_64-w64-mingw32/include/dlgs.h:13:1: Psh3 = 0x0402 // /usr/x86_64-w64-mingw32/include/dlgs.h:14:1: Psh4 = 0x0403 // /usr/x86_64-w64-mingw32/include/dlgs.h:15:1: Psh5 = 0x0404 // /usr/x86_64-w64-mingw32/include/dlgs.h:16:1: Psh6 = 0x0405 // /usr/x86_64-w64-mingw32/include/dlgs.h:17:1: Psh7 = 0x0406 // /usr/x86_64-w64-mingw32/include/dlgs.h:18:1: Psh8 = 0x0407 // /usr/x86_64-w64-mingw32/include/dlgs.h:19:1: Psh9 = 0x0408 // /usr/x86_64-w64-mingw32/include/dlgs.h:20:1: PshHelp = 1038 // /usr/x86_64-w64-mingw32/include/dlgs.h:27:1: Rad1 = 0x0420 // /usr/x86_64-w64-mingw32/include/dlgs.h:47:1: Rad10 = 0x0429 // /usr/x86_64-w64-mingw32/include/dlgs.h:56:1: Rad11 = 0x042a // /usr/x86_64-w64-mingw32/include/dlgs.h:57:1: Rad12 = 0x042b // /usr/x86_64-w64-mingw32/include/dlgs.h:58:1: Rad13 = 0x042c // /usr/x86_64-w64-mingw32/include/dlgs.h:59:1: Rad14 = 0x042d // /usr/x86_64-w64-mingw32/include/dlgs.h:60:1: Rad15 = 0x042e // /usr/x86_64-w64-mingw32/include/dlgs.h:61:1: Rad16 = 0x042f // /usr/x86_64-w64-mingw32/include/dlgs.h:62:1: Rad2 = 0x0421 // /usr/x86_64-w64-mingw32/include/dlgs.h:48:1: Rad3 = 0x0422 // /usr/x86_64-w64-mingw32/include/dlgs.h:49:1: Rad4 = 0x0423 // /usr/x86_64-w64-mingw32/include/dlgs.h:50:1: Rad5 = 0x0424 // /usr/x86_64-w64-mingw32/include/dlgs.h:51:1: Rad6 = 0x0425 // /usr/x86_64-w64-mingw32/include/dlgs.h:52:1: Rad7 = 0x0426 // /usr/x86_64-w64-mingw32/include/dlgs.h:53:1: Rad8 = 0x0427 // /usr/x86_64-w64-mingw32/include/dlgs.h:54:1: Rad9 = 0x0428 // /usr/x86_64-w64-mingw32/include/dlgs.h:55:1: Rct1 = 0x0438 // /usr/x86_64-w64-mingw32/include/dlgs.h:72:1: Rct2 = 0x0439 // /usr/x86_64-w64-mingw32/include/dlgs.h:73:1: Rct3 = 0x043a // /usr/x86_64-w64-mingw32/include/dlgs.h:74:1: Rct4 = 0x043b // /usr/x86_64-w64-mingw32/include/dlgs.h:75:1: Scr1 = 0x0490 // /usr/x86_64-w64-mingw32/include/dlgs.h:165:1: Scr2 = 0x0491 // /usr/x86_64-w64-mingw32/include/dlgs.h:166:1: Scr3 = 0x0492 // /usr/x86_64-w64-mingw32/include/dlgs.h:167:1: Scr4 = 0x0493 // /usr/x86_64-w64-mingw32/include/dlgs.h:168:1: Scr5 = 0x0494 // /usr/x86_64-w64-mingw32/include/dlgs.h:169:1: Scr6 = 0x0495 // /usr/x86_64-w64-mingw32/include/dlgs.h:170:1: Scr7 = 0x0496 // /usr/x86_64-w64-mingw32/include/dlgs.h:171:1: Scr8 = 0x0497 // /usr/x86_64-w64-mingw32/include/dlgs.h:172:1: Sqlite3Fts5ParserCTX_FETCH = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217855:1: Sqlite3Fts5ParserCTX_PARAM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217854:1: Sqlite3Fts5ParserCTX_PDECL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217853:1: Sqlite3Fts5ParserCTX_SDECL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217852:1: Sqlite3Fts5ParserCTX_STORE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:217856:1: Sqlite3ParserARG_FETCH = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161907:1: Sqlite3ParserARG_PARAM = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161906:1: Sqlite3ParserARG_PDECL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161905:1: Sqlite3ParserARG_SDECL = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161904:1: Sqlite3ParserARG_STORE = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161908:1: Sqlite3Parser_ENGINEALWAYSONSTACK = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:161456:1: Stc1 = 0x0440 // /usr/x86_64-w64-mingw32/include/dlgs.h:81:1: Stc10 = 0x0449 // /usr/x86_64-w64-mingw32/include/dlgs.h:90:1: Stc11 = 0x044a // /usr/x86_64-w64-mingw32/include/dlgs.h:91:1: Stc12 = 0x044b // /usr/x86_64-w64-mingw32/include/dlgs.h:92:1: Stc13 = 0x044c // /usr/x86_64-w64-mingw32/include/dlgs.h:93:1: Stc14 = 0x044d // /usr/x86_64-w64-mingw32/include/dlgs.h:94:1: Stc15 = 0x044e // /usr/x86_64-w64-mingw32/include/dlgs.h:95:1: Stc16 = 0x044f // /usr/x86_64-w64-mingw32/include/dlgs.h:96:1: Stc17 = 0x0450 // /usr/x86_64-w64-mingw32/include/dlgs.h:97:1: Stc18 = 0x0451 // /usr/x86_64-w64-mingw32/include/dlgs.h:98:1: Stc19 = 0x0452 // /usr/x86_64-w64-mingw32/include/dlgs.h:99:1: Stc2 = 0x0441 // /usr/x86_64-w64-mingw32/include/dlgs.h:82:1: Stc20 = 0x0453 // /usr/x86_64-w64-mingw32/include/dlgs.h:100:1: Stc21 = 0x0454 // /usr/x86_64-w64-mingw32/include/dlgs.h:101:1: Stc22 = 0x0455 // /usr/x86_64-w64-mingw32/include/dlgs.h:102:1: Stc23 = 0x0456 // /usr/x86_64-w64-mingw32/include/dlgs.h:103:1: Stc24 = 0x0457 // /usr/x86_64-w64-mingw32/include/dlgs.h:104:1: Stc25 = 0x0458 // /usr/x86_64-w64-mingw32/include/dlgs.h:105:1: Stc26 = 0x0459 // /usr/x86_64-w64-mingw32/include/dlgs.h:106:1: Stc27 = 0x045a // /usr/x86_64-w64-mingw32/include/dlgs.h:107:1: Stc28 = 0x045b // /usr/x86_64-w64-mingw32/include/dlgs.h:108:1: Stc29 = 0x045c // /usr/x86_64-w64-mingw32/include/dlgs.h:109:1: Stc3 = 0x0442 // /usr/x86_64-w64-mingw32/include/dlgs.h:83:1: Stc30 = 0x045d // /usr/x86_64-w64-mingw32/include/dlgs.h:110:1: Stc31 = 0x045e // /usr/x86_64-w64-mingw32/include/dlgs.h:111:1: Stc32 = 0x045f // /usr/x86_64-w64-mingw32/include/dlgs.h:112:1: Stc4 = 0x0443 // /usr/x86_64-w64-mingw32/include/dlgs.h:84:1: Stc5 = 0x0444 // /usr/x86_64-w64-mingw32/include/dlgs.h:85:1: Stc6 = 0x0445 // /usr/x86_64-w64-mingw32/include/dlgs.h:86:1: Stc7 = 0x0446 // /usr/x86_64-w64-mingw32/include/dlgs.h:87:1: Stc8 = 0x0447 // /usr/x86_64-w64-mingw32/include/dlgs.h:88:1: Stc9 = 0x0448 // /usr/x86_64-w64-mingw32/include/dlgs.h:89:1: SzFORCE_KEY_PROTECTION = "ForceKeyProtection" // /usr/x86_64-w64-mingw32/include/dpapi.h:21:1: SzKEY_CACHE_ENABLED = "CachePrivateKeys" // /usr/x86_64-w64-mingw32/include/wincrypt.h:614:1: SzKEY_CACHE_SECONDS = "PrivateKeyLifetimeSeconds" // /usr/x86_64-w64-mingw32/include/wincrypt.h:615:1: SzKEY_CRYPTOAPI_PRIVATE_KEY_OPTIONS = "Software\\Policies\\Microsoft\\Cryptography" // /usr/x86_64-w64-mingw32/include/wincrypt.h:611:1: SzOIDVerisign_FailInfo = "2.16.840.1.113733.1.9.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2316:1: SzOIDVerisign_MessageType = "2.16.840.1.113733.1.9.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2314:1: SzOIDVerisign_PkiStatus = "2.16.840.1.113733.1.9.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2315:1: SzOIDVerisign_RecipientNonce = "2.16.840.1.113733.1.9.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2319:1: SzOIDVerisign_SenderNonce = "2.16.840.1.113733.1.9.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2318:1: SzOIDVerisign_TransactionID = "2.16.840.1.113733.1.9.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2321:1: SzOID_ANSI_X942 = "1.2.840.10046" // /usr/x86_64-w64-mingw32/include/wincrypt.h:936:1: SzOID_ANSI_X942_DH = "1.2.840.10046.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:937:1: SzOID_ANY_APPLICATION_POLICY = "1.3.6.1.4.1.311.10.12.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1677:1: SzOID_ANY_CERT_POLICY = "2.5.29.32.0" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1610:1: SzOID_ANY_ENHANCED_KEY_USAGE = "2.5.29.37.0" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1622:1: SzOID_APPLICATION_CERT_POLICIES = "1.3.6.1.4.1.311.21.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1696:1: SzOID_APPLICATION_POLICY_CONSTRAINTS = "1.3.6.1.4.1.311.21.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1698:1: SzOID_APPLICATION_POLICY_MAPPINGS = "1.3.6.1.4.1.311.21.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1697:1: SzOID_ARCHIVED_KEY_ATTR = "1.3.6.1.4.1.311.21.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1699:1: SzOID_ARCHIVED_KEY_CERT_HASH = "1.3.6.1.4.1.311.21.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1702:1: SzOID_ATTEST_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.5.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1748:1: SzOID_ATTR_PLATFORM_SPECIFICATION = "2.23.133.2.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1873:1: SzOID_ATTR_SUPPORTED_ALGORITHMS = "2.5.4.52" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1871:1: SzOID_ATTR_TPM_SECURITY_ASSERTIONS = "2.23.133.2.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1874:1: SzOID_ATTR_TPM_SPECIFICATION = "2.23.133.2.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1872:1: SzOID_AUTHORITY_INFO_ACCESS = "1.3.6.1.5.5.7.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1645:1: SzOID_AUTHORITY_KEY_IDENTIFIER = "2.5.29.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1596:1: SzOID_AUTHORITY_KEY_IDENTIFIER2 = "2.5.29.35" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1613:1: SzOID_AUTHORITY_REVOCATION_LIST = "2.5.4.38" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1164:1: SzOID_AUTO_ENROLL_CTL_USAGE = "1.3.6.1.4.1.311.20.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1679:1: SzOID_BACKGROUND_OTHER_LOGOTYPE = "1.3.6.1.5.5.7.20.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2567:1: SzOID_BASIC_CONSTRAINTS = "2.5.29.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1602:1: SzOID_BASIC_CONSTRAINTS2 = "2.5.29.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1607:1: SzOID_BIOMETRIC_EXT = "1.3.6.1.5.5.7.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1647:1: SzOID_BIOMETRIC_SIGNING = "1.3.6.1.4.1.311.10.3.41" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1801:1: SzOID_BUSINESS_CATEGORY = "2.5.4.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1141:1: SzOID_CA_CERTIFICATE = "2.5.4.37" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1163:1: SzOID_CERTIFICATE_REVOCATION_LIST = "2.5.4.39" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1165:1: SzOID_CERTIFICATE_TEMPLATE = "1.3.6.1.4.1.311.21.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1693:1: SzOID_CERTSRV_CA_VERSION = "1.3.6.1.4.1.311.21.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1686:1: SzOID_CERTSRV_CROSSCA_VERSION = "1.3.6.1.4.1.311.21.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1707:1: SzOID_CERTSRV_PREVIOUS_CERT_HASH = "1.3.6.1.4.1.311.21.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1688:1: SzOID_CERT_DISALLOWED_FILETIME_PROP_ID = "1.3.6.1.4.1.311.10.11.104" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3687:1: SzOID_CERT_EXTENSIONS = "1.3.6.1.4.1.311.2.1.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1652:1: SzOID_CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3682:1: SzOID_CERT_KEY_IDENTIFIER_PROP_ID = "1.3.6.1.4.1.311.10.11.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3681:1: SzOID_CERT_MANIFOLD = "1.3.6.1.4.1.311.20.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1683:1: SzOID_CERT_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3684:1: SzOID_CERT_POLICIES = "2.5.29.32" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1609:1: SzOID_CERT_POLICIES_95 = "2.5.29.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1598:1: SzOID_CERT_POLICIES_95_QUALIFIER1 = "2.16.840.1.113733.1.7.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1826:1: SzOID_CERT_PROP_ID_PREFIX = "1.3.6.1.4.1.311.10.11." // /usr/x86_64-w64-mingw32/include/wincrypt.h:3673:1: SzOID_CERT_SIGNATURE_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3685:1: SzOID_CERT_STRONG_KEY_OS_1 = "1.3.6.1.4.1.311.72.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2882:1: SzOID_CERT_STRONG_KEY_OS_PREFIX = "1.3.6.1.4.1.311.72.2." // /usr/x86_64-w64-mingw32/include/wincrypt.h:2881:1: SzOID_CERT_STRONG_SIGN_OS_1 = "1.3.6.1.4.1.311.72.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2875:1: SzOID_CERT_STRONG_SIGN_OS_PREFIX = "1.3.6.1.4.1.311.72.1." // /usr/x86_64-w64-mingw32/include/wincrypt.h:2873:1: SzOID_CERT_SUBJECT_NAME_MD5_HASH_PROP_ID = "1.3.6.1.4.1.311.10.11.29" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3683:1: SzOID_CMC = "1.3.6.1.5.5.7.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2350:1: SzOID_CMC_ADD_ATTRIBUTES = "1.3.6.1.4.1.311.10.10.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2372:1: SzOID_CMC_ADD_EXTENSIONS = "1.3.6.1.5.5.7.7.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2358:1: SzOID_CMC_DATA_RETURN = "1.3.6.1.5.5.7.7.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2354:1: SzOID_CMC_DECRYPTED_POP = "1.3.6.1.5.5.7.7.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2360:1: SzOID_CMC_ENCRYPTED_POP = "1.3.6.1.5.5.7.7.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2359:1: SzOID_CMC_GET_CERT = "1.3.6.1.5.5.7.7.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2362:1: SzOID_CMC_GET_CRL = "1.3.6.1.5.5.7.7.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2363:1: SzOID_CMC_IDENTIFICATION = "1.3.6.1.5.5.7.7.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2352:1: SzOID_CMC_IDENTITY_PROOF = "1.3.6.1.5.5.7.7.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2353:1: SzOID_CMC_ID_CONFIRM_CERT_ACCEPTANCE = "1.3.6.1.5.5.7.7.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2370:1: SzOID_CMC_ID_POP_LINK_RANDOM = "1.3.6.1.5.5.7.7.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2368:1: SzOID_CMC_ID_POP_LINK_WITNESS = "1.3.6.1.5.5.7.7.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2369:1: SzOID_CMC_LRA_POP_WITNESS = "1.3.6.1.5.5.7.7.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2361:1: SzOID_CMC_QUERY_PENDING = "1.3.6.1.5.5.7.7.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2367:1: SzOID_CMC_RECIPIENT_NONCE = "1.3.6.1.5.5.7.7.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2357:1: SzOID_CMC_REG_INFO = "1.3.6.1.5.5.7.7.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2365:1: SzOID_CMC_RESPONSE_INFO = "1.3.6.1.5.5.7.7.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2366:1: SzOID_CMC_REVOKE_REQUEST = "1.3.6.1.5.5.7.7.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2364:1: SzOID_CMC_SENDER_NONCE = "1.3.6.1.5.5.7.7.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2356:1: SzOID_CMC_STATUS_INFO = "1.3.6.1.5.5.7.7.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2351:1: SzOID_CMC_TRANSACTION_ID = "1.3.6.1.5.5.7.7.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2355:1: SzOID_CN_ECDSA_SHA256 = "1.2.156.11235.1.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:964:1: SzOID_COMMON_NAME = "2.5.4.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1129:1: SzOID_COUNTRY_NAME = "2.5.4.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1132:1: SzOID_CRL_DIST_POINTS = "2.5.29.31" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1619:1: SzOID_CRL_NEXT_PUBLISH = "1.3.6.1.4.1.311.21.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1690:1: SzOID_CRL_NUMBER = "2.5.29.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1624:1: SzOID_CRL_REASON_CODE = "2.5.29.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1617:1: SzOID_CRL_SELF_CDP = "1.3.6.1.4.1.311.21.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1700:1: SzOID_CRL_VIRTUAL_BASE = "1.3.6.1.4.1.311.21.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1689:1: SzOID_CROSS_CERTIFICATE_PAIR = "2.5.4.40" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1166:1: SzOID_CROSS_CERT_DIST_POINTS = "1.3.6.1.4.1.311.10.9.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1655:1: SzOID_CTL = "1.3.6.1.4.1.311.10.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1657:1: SzOID_CT_CERT_SCTLIST = "1.3.6.1.4.1.11129.2.4.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1836:1: SzOID_CT_PKI_DATA = "1.3.6.1.5.5.7.12.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2345:1: SzOID_CT_PKI_RESPONSE = "1.3.6.1.5.5.7.12.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2346:1: SzOID_DELTA_CRL_INDICATOR = "2.5.29.27" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1626:1: SzOID_DESCRIPTION = "2.5.4.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1139:1: SzOID_DESTINATION_INDICATOR = "2.5.4.27" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1153:1: SzOID_DEVICE_SERIAL_NUMBER = "2.5.4.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1131:1: SzOID_DH_SINGLE_PASS_STDDH_SHA1_KDF = "1.3.133.16.840.63.0.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1010:1: SzOID_DH_SINGLE_PASS_STDDH_SHA256_KDF = "1.3.132.1.11.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1011:1: SzOID_DH_SINGLE_PASS_STDDH_SHA384_KDF = "1.3.132.1.11.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1012:1: SzOID_DISALLOWED_LIST = "1.3.6.1.4.1.311.10.3.30" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1793:1: SzOID_DN_QUALIFIER = "2.5.4.46" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1169:1: SzOID_DOMAIN_COMPONENT = "0.9.2342.19200300.100.1.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1171:1: SzOID_DRM = "1.3.6.1.4.1.311.10.5.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1764:1: SzOID_DRM_INDIVIDUALIZATION = "1.3.6.1.4.1.311.10.5.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1768:1: SzOID_DS = "2.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1014:1: SzOID_DSALG = "2.5.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1015:1: SzOID_DSALG_CRPT = "2.5.8.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1016:1: SzOID_DSALG_HASH = "2.5.8.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1017:1: SzOID_DSALG_RSA = "2.5.8.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1019:1: SzOID_DSALG_SIGN = "2.5.8.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1018:1: SzOID_DS_EMAIL_REPLICATION = "1.3.6.1.4.1.311.21.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1704:1: SzOID_DYNAMIC_CODE_GEN_SIGNER = "1.3.6.1.4.1.311.76.5.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1808:1: SzOID_ECC_CURVE_BRAINPOOLP160R1 = "1.3.36.3.3.2.8.1.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:948:1: SzOID_ECC_CURVE_BRAINPOOLP160T1 = "1.3.36.3.3.2.8.1.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:949:1: SzOID_ECC_CURVE_BRAINPOOLP192R1 = "1.3.36.3.3.2.8.1.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:950:1: SzOID_ECC_CURVE_BRAINPOOLP192T1 = "1.3.36.3.3.2.8.1.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:951:1: SzOID_ECC_CURVE_BRAINPOOLP224R1 = "1.3.36.3.3.2.8.1.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:952:1: SzOID_ECC_CURVE_BRAINPOOLP224T1 = "1.3.36.3.3.2.8.1.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:953:1: SzOID_ECC_CURVE_BRAINPOOLP256R1 = "1.3.36.3.3.2.8.1.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:954:1: SzOID_ECC_CURVE_BRAINPOOLP256T1 = "1.3.36.3.3.2.8.1.1.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:955:1: SzOID_ECC_CURVE_BRAINPOOLP320R1 = "1.3.36.3.3.2.8.1.1.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:956:1: SzOID_ECC_CURVE_BRAINPOOLP320T1 = "1.3.36.3.3.2.8.1.1.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:957:1: SzOID_ECC_CURVE_BRAINPOOLP384R1 = "1.3.36.3.3.2.8.1.1.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:958:1: SzOID_ECC_CURVE_BRAINPOOLP384T1 = "1.3.36.3.3.2.8.1.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:959:1: SzOID_ECC_CURVE_BRAINPOOLP512R1 = "1.3.36.3.3.2.8.1.1.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:960:1: SzOID_ECC_CURVE_BRAINPOOLP512T1 = "1.3.36.3.3.2.8.1.1.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:961:1: SzOID_ECC_CURVE_EC192WAPI = "1.2.156.11235.1.1.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:963:1: SzOID_ECC_CURVE_NISTP192 = "1.2.840.10045.3.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:966:1: SzOID_ECC_CURVE_NISTP224 = "1.3.132.0.33" // /usr/x86_64-w64-mingw32/include/wincrypt.h:967:1: SzOID_ECC_CURVE_P256 = "1.2.840.10045.3.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:944:1: SzOID_ECC_CURVE_P384 = "1.3.132.0.34" // /usr/x86_64-w64-mingw32/include/wincrypt.h:945:1: SzOID_ECC_CURVE_P521 = "1.3.132.0.35" // /usr/x86_64-w64-mingw32/include/wincrypt.h:946:1: SzOID_ECC_CURVE_SECP160K1 = "1.3.132.0.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:972:1: SzOID_ECC_CURVE_SECP160R1 = "1.3.132.0.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:973:1: SzOID_ECC_CURVE_SECP160R2 = "1.3.132.0.30" // /usr/x86_64-w64-mingw32/include/wincrypt.h:974:1: SzOID_ECC_CURVE_SECP192K1 = "1.3.132.0.31" // /usr/x86_64-w64-mingw32/include/wincrypt.h:975:1: SzOID_ECC_CURVE_SECP224K1 = "1.3.132.0.32" // /usr/x86_64-w64-mingw32/include/wincrypt.h:977:1: SzOID_ECC_CURVE_SECP256K1 = "1.3.132.0.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:979:1: SzOID_ECC_CURVE_WTLS9 = "2.23.43.1.4.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:985:1: SzOID_ECC_CURVE_X962P192V1 = "1.2.840.10045.3.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:988:1: SzOID_ECC_CURVE_X962P192V2 = "1.2.840.10045.3.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:989:1: SzOID_ECC_CURVE_X962P192V3 = "1.2.840.10045.3.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:990:1: SzOID_ECC_CURVE_X962P239V1 = "1.2.840.10045.3.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:991:1: SzOID_ECC_CURVE_X962P239V2 = "1.2.840.10045.3.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:992:1: SzOID_ECC_CURVE_X962P239V3 = "1.2.840.10045.3.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:993:1: SzOID_ECC_PUBLIC_KEY = "1.2.840.10045.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:943:1: SzOID_ECDSA_SHA1 = "1.2.840.10045.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:996:1: SzOID_ECDSA_SHA256 = "1.2.840.10045.4.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:998:1: SzOID_ECDSA_SHA384 = "1.2.840.10045.4.3.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:999:1: SzOID_ECDSA_SHA512 = "1.2.840.10045.4.3.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1000:1: SzOID_ECDSA_SPECIFIED = "1.2.840.10045.4.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:997:1: SzOID_EFS_RECOVERY = "1.3.6.1.4.1.311.10.3.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1745:1: SzOID_EMBEDDED_NT_CRYPTO = "1.3.6.1.4.1.311.10.3.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1751:1: SzOID_ENCLAVE_SIGNING = "1.3.6.1.4.1.311.10.3.42" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1802:1: SzOID_ENCRYPTED_KEY_HASH = "1.3.6.1.4.1.311.21.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1706:1: SzOID_ENHANCED_KEY_USAGE = "2.5.29.37" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1620:1: SzOID_ENROLLMENT_AGENT = "1.3.6.1.4.1.311.20.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1641:1: SzOID_ENROLLMENT_CSP_PROVIDER = "1.3.6.1.4.1.311.13.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1638:1: SzOID_ENROLLMENT_NAME_VALUE_PAIR = "1.3.6.1.4.1.311.13.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1637:1: SzOID_ENROLL_AIK_INFO = "1.3.6.1.4.1.311.21.39" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1839:1: SzOID_ENROLL_ATTESTATION_CHALLENGE = "1.3.6.1.4.1.311.21.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1846:1: SzOID_ENROLL_ATTESTATION_STATEMENT = "1.3.6.1.4.1.311.21.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1840:1: SzOID_ENROLL_CAXCHGCERT_HASH = "1.3.6.1.4.1.311.21.27" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1845:1: SzOID_ENROLL_CERTTYPE_EXTENSION = "1.3.6.1.4.1.311.20.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1681:1: SzOID_ENROLL_EKPUB_CHALLENGE = "1.3.6.1.4.1.311.21.26" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1844:1: SzOID_ENROLL_EKVERIFYCERT = "1.3.6.1.4.1.311.21.31" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1854:1: SzOID_ENROLL_EKVERIFYCREDS = "1.3.6.1.4.1.311.21.32" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1855:1: SzOID_ENROLL_EKVERIFYKEY = "1.3.6.1.4.1.311.21.30" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1853:1: SzOID_ENROLL_EK_CA_KEYID = "1.3.6.1.4.1.311.21.43" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1869:1: SzOID_ENROLL_EK_INFO = "1.3.6.1.4.1.311.21.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1838:1: SzOID_ENROLL_ENCRYPTION_ALGORITHM = "1.3.6.1.4.1.311.21.29" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1847:1: SzOID_ENROLL_KEY_AFFINITY = "1.3.6.1.4.1.311.21.41" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1865:1: SzOID_ENROLL_KSP_NAME = "1.3.6.1.4.1.311.21.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1842:1: SzOID_ENROLL_SCEP_CHALLENGE_ANSWER = "1.3.6.1.4.1.311.21.35" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1860:1: SzOID_ENROLL_SCEP_CLIENT_REQUEST = "1.3.6.1.4.1.311.21.37" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1861:1: SzOID_ENROLL_SCEP_ERROR = "1.3.6.1.4.1.311.21.33" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1857:1: SzOID_ENROLL_SCEP_SERVER_MESSAGE = "1.3.6.1.4.1.311.21.38" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1862:1: SzOID_ENROLL_SCEP_SERVER_SECRET = "1.3.6.1.4.1.311.21.40" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1863:1: SzOID_ENROLL_SCEP_SERVER_STATE = "1.3.6.1.4.1.311.21.34" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1859:1: SzOID_ENROLL_SCEP_SIGNER_HASH = "1.3.6.1.4.1.311.21.42" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1867:1: SzOID_ENTERPRISE_OID_ROOT = "1.3.6.1.4.1.311.21.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1694:1: SzOID_EV_RDN_COUNTRY = "1.3.6.1.4.1.311.60.2.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1184:1: SzOID_EV_RDN_LOCALE = "1.3.6.1.4.1.311.60.2.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1182:1: SzOID_EV_RDN_STATE_OR_PROVINCE = "1.3.6.1.4.1.311.60.2.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1183:1: SzOID_EV_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.39" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1800:1: SzOID_FACSIMILE_TELEPHONE_NUMBER = "2.5.4.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1149:1: SzOID_FRESHEST_CRL = "2.5.29.46" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1629:1: SzOID_GIVEN_NAME = "2.5.4.42" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1167:1: SzOID_HPKP_DOMAIN_NAME_CTL = "1.3.6.1.4.1.311.10.3.60" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1804:1: SzOID_HPKP_HEADER_VALUE_CTL = "1.3.6.1.4.1.311.10.3.61" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1805:1: SzOID_INFOSEC = "2.16.840.1.101.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1059:1: SzOID_INFOSEC_SuiteAConfidentiality = "2.16.840.1.101.2.1.1.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1073:1: SzOID_INFOSEC_SuiteAIntegrity = "2.16.840.1.101.2.1.1.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1074:1: SzOID_INFOSEC_SuiteAKMandSig = "2.16.840.1.101.2.1.1.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1077:1: SzOID_INFOSEC_SuiteAKeyManagement = "2.16.840.1.101.2.1.1.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1076:1: SzOID_INFOSEC_SuiteASignature = "2.16.840.1.101.2.1.1.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1072:1: SzOID_INFOSEC_SuiteATokenProtection = "2.16.840.1.101.2.1.1.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1075:1: SzOID_INFOSEC_mosaicConfidentiality = "2.16.840.1.101.2.1.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1063:1: SzOID_INFOSEC_mosaicIntegrity = "2.16.840.1.101.2.1.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1065:1: SzOID_INFOSEC_mosaicKMandSig = "2.16.840.1.101.2.1.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1071:1: SzOID_INFOSEC_mosaicKMandUpdSig = "2.16.840.1.101.2.1.1.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1079:1: SzOID_INFOSEC_mosaicKeyManagement = "2.16.840.1.101.2.1.1.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1069:1: SzOID_INFOSEC_mosaicSignature = "2.16.840.1.101.2.1.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1061:1: SzOID_INFOSEC_mosaicTokenProtection = "2.16.840.1.101.2.1.1.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1067:1: SzOID_INFOSEC_mosaicUpdatedInteg = "2.16.840.1.101.2.1.1.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1080:1: SzOID_INFOSEC_mosaicUpdatedSig = "2.16.840.1.101.2.1.1.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1078:1: SzOID_INFOSEC_sdnsConfidentiality = "2.16.840.1.101.2.1.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1062:1: SzOID_INFOSEC_sdnsIntegrity = "2.16.840.1.101.2.1.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1064:1: SzOID_INFOSEC_sdnsKMandSig = "2.16.840.1.101.2.1.1.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1070:1: SzOID_INFOSEC_sdnsKeyManagement = "2.16.840.1.101.2.1.1.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1068:1: SzOID_INFOSEC_sdnsSignature = "2.16.840.1.101.2.1.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1060:1: SzOID_INFOSEC_sdnsTokenProtection = "2.16.840.1.101.2.1.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1066:1: SzOID_INHIBIT_ANY_POLICY = "2.5.29.54" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1611:1: SzOID_INITIALS = "2.5.4.43" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1168:1: SzOID_INTERNATIONALIZED_EMAIL_ADDRESS = "1.3.6.1.4.1.311.20.2.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1670:1: SzOID_INTERNATIONAL_ISDN_NUMBER = "2.5.4.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1151:1: SzOID_IPSEC_KP_IKE_INTERMEDIATE = "1.3.6.1.5.5.8.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1728:1: SzOID_ISSUED_CERT_HASH = "1.3.6.1.4.1.311.21.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1703:1: SzOID_ISSUER_ALT_NAME = "2.5.29.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1601:1: SzOID_ISSUER_ALT_NAME2 = "2.5.29.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1616:1: SzOID_ISSUING_DIST_POINT = "2.5.29.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1627:1: SzOID_IUM_SIGNING = "1.3.6.1.4.1.311.10.3.37" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1799:1: SzOID_KEYID_RDN = "1.3.6.1.4.1.311.10.7.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1180:1: SzOID_KEY_ATTRIBUTES = "2.5.29.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1597:1: SzOID_KEY_USAGE = "2.5.29.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1605:1: SzOID_KEY_USAGE_RESTRICTION = "2.5.29.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1599:1: SzOID_KP_CA_EXCHANGE = "1.3.6.1.4.1.311.21.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1691:1: SzOID_KP_CSP_SIGNATURE = "1.3.6.1.4.1.311.10.3.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1759:1: SzOID_KP_CTL_USAGE_SIGNING = "1.3.6.1.4.1.311.10.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1732:1: SzOID_KP_DOCUMENT_SIGNING = "1.3.6.1.4.1.311.10.3.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1755:1: SzOID_KP_EFS = "1.3.6.1.4.1.311.10.3.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1744:1: SzOID_KP_FLIGHT_SIGNING = "1.3.6.1.4.1.311.10.3.27" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1760:1: SzOID_KP_KERNEL_MODE_CODE_SIGNING = "1.3.6.1.4.1.311.61.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1783:1: SzOID_KP_KERNEL_MODE_HAL_EXTENSION_SIGNING = "1.3.6.1.4.1.311.61.5.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1806:1: SzOID_KP_KERNEL_MODE_TRUSTED_BOOT_SIGNING = "1.3.6.1.4.1.311.61.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1784:1: SzOID_KP_KEY_RECOVERY = "1.3.6.1.4.1.311.10.3.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1754:1: SzOID_KP_KEY_RECOVERY_AGENT = "1.3.6.1.4.1.311.21.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1692:1: SzOID_KP_LIFETIME_SIGNING = "1.3.6.1.4.1.311.10.3.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1756:1: SzOID_KP_MOBILE_DEVICE_SOFTWARE = "1.3.6.1.4.1.311.10.3.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1757:1: SzOID_KP_QUALIFIED_SUBORDINATION = "1.3.6.1.4.1.311.10.3.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1753:1: SzOID_KP_SMARTCARD_LOGON = "1.3.6.1.4.1.311.20.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1780:1: SzOID_KP_SMART_DISPLAY = "1.3.6.1.4.1.311.10.3.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1758:1: SzOID_KP_TIME_STAMP_SIGNING = "1.3.6.1.4.1.311.10.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1734:1: SzOID_KP_TPM_AIK_CERTIFICATE = "2.23.133.8.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1851:1: SzOID_KP_TPM_EK_CERTIFICATE = "2.23.133.8.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1849:1: SzOID_KP_TPM_PLATFORM_CERTIFICATE = "2.23.133.8.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1850:1: SzOID_LEGACY_POLICY_MAPPINGS = "2.5.29.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1633:1: SzOID_LICENSES = "1.3.6.1.4.1.311.10.6.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1772:1: SzOID_LICENSE_SERVER = "1.3.6.1.4.1.311.10.6.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1776:1: SzOID_LOCALITY_NAME = "2.5.4.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1133:1: SzOID_LOCAL_MACHINE_KEYSET = "1.3.6.1.4.1.311.17.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1176:1: SzOID_LOGOTYPE_EXT = "1.3.6.1.5.5.7.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1649:1: SzOID_LOYALTY_OTHER_LOGOTYPE = "1.3.6.1.5.5.7.20.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2566:1: SzOID_MEMBER = "2.5.4.31" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1157:1: SzOID_MICROSOFT_PUBLISHER_SIGNER = "1.3.6.1.4.1.311.76.8.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1809:1: SzOID_NAME_CONSTRAINTS = "2.5.29.30" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1630:1: SzOID_NETSCAPE = "2.16.840.1.113730" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2323:1: SzOID_NETSCAPE_BASE_URL = "2.16.840.1.113730.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2326:1: SzOID_NETSCAPE_CA_POLICY_URL = "2.16.840.1.113730.1.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2330:1: SzOID_NETSCAPE_CA_REVOCATION_URL = "2.16.840.1.113730.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2328:1: SzOID_NETSCAPE_CERT_EXTENSION = "2.16.840.1.113730.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2324:1: SzOID_NETSCAPE_CERT_RENEWAL_URL = "2.16.840.1.113730.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2329:1: SzOID_NETSCAPE_CERT_SEQUENCE = "2.16.840.1.113730.2.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2335:1: SzOID_NETSCAPE_CERT_TYPE = "2.16.840.1.113730.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2325:1: SzOID_NETSCAPE_COMMENT = "2.16.840.1.113730.1.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2332:1: SzOID_NETSCAPE_DATA_TYPE = "2.16.840.1.113730.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2334:1: SzOID_NETSCAPE_REVOCATION_URL = "2.16.840.1.113730.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2327:1: SzOID_NETSCAPE_SSL_SERVER_NAME = "2.16.840.1.113730.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2331:1: SzOID_NEXT_UPDATE_LOCATION = "1.3.6.1.4.1.311.10.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1653:1: SzOID_NIST_AES128_CBC = "2.16.840.1.101.3.4.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1002:1: SzOID_NIST_AES128_WRAP = "2.16.840.1.101.3.4.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1006:1: SzOID_NIST_AES192_CBC = "2.16.840.1.101.3.4.1.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1003:1: SzOID_NIST_AES192_WRAP = "2.16.840.1.101.3.4.1.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1007:1: SzOID_NIST_AES256_CBC = "2.16.840.1.101.3.4.1.42" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1004:1: SzOID_NIST_AES256_WRAP = "2.16.840.1.101.3.4.1.45" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1008:1: SzOID_NIST_sha256 = "2.16.840.1.101.3.4.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1082:1: SzOID_NIST_sha384 = "2.16.840.1.101.3.4.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1083:1: SzOID_NIST_sha512 = "2.16.840.1.101.3.4.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1084:1: SzOID_NT5_CRYPTO = "1.3.6.1.4.1.311.10.3.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1749:1: SzOID_NTDS_REPLICATION = "1.3.6.1.4.1.311.25.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1709:1: SzOID_NT_PRINCIPAL_NAME = "1.3.6.1.4.1.311.20.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1666:1: SzOID_OEM_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1750:1: SzOID_OIW = "1.3.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1021:1: SzOID_OIWDIR = "1.3.14.7.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1052:1: SzOID_OIWDIR_CRPT = "1.3.14.7.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1053:1: SzOID_OIWDIR_HASH = "1.3.14.7.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1054:1: SzOID_OIWDIR_SIGN = "1.3.14.7.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1055:1: SzOID_OIWDIR_md2 = "1.3.14.7.2.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1056:1: SzOID_OIWDIR_md2RSA = "1.3.14.7.2.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1057:1: SzOID_OIWSEC = "1.3.14.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1023:1: SzOID_OIWSEC_desCBC = "1.3.14.3.2.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1028:1: SzOID_OIWSEC_desCFB = "1.3.14.3.2.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1030:1: SzOID_OIWSEC_desECB = "1.3.14.3.2.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1027:1: SzOID_OIWSEC_desEDE = "1.3.14.3.2.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1038:1: SzOID_OIWSEC_desMAC = "1.3.14.3.2.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1031:1: SzOID_OIWSEC_desOFB = "1.3.14.3.2.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1029:1: SzOID_OIWSEC_dhCommMod = "1.3.14.3.2.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1037:1: SzOID_OIWSEC_dsa = "1.3.14.3.2.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1033:1: SzOID_OIWSEC_dsaComm = "1.3.14.3.2.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1041:1: SzOID_OIWSEC_dsaCommSHA = "1.3.14.3.2.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1042:1: SzOID_OIWSEC_dsaCommSHA1 = "1.3.14.3.2.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1049:1: SzOID_OIWSEC_dsaSHA1 = "1.3.14.3.2.27" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1048:1: SzOID_OIWSEC_keyHashSeal = "1.3.14.3.2.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1044:1: SzOID_OIWSEC_md2RSASign = "1.3.14.3.2.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1045:1: SzOID_OIWSEC_md4RSA = "1.3.14.3.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1024:1: SzOID_OIWSEC_md4RSA2 = "1.3.14.3.2.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1026:1: SzOID_OIWSEC_md5RSA = "1.3.14.3.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1025:1: SzOID_OIWSEC_md5RSASign = "1.3.14.3.2.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1046:1: SzOID_OIWSEC_mdc2 = "1.3.14.3.2.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1040:1: SzOID_OIWSEC_mdc2RSA = "1.3.14.3.2.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1035:1: SzOID_OIWSEC_rsaSign = "1.3.14.3.2.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1032:1: SzOID_OIWSEC_rsaXchg = "1.3.14.3.2.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1043:1: SzOID_OIWSEC_sha = "1.3.14.3.2.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1039:1: SzOID_OIWSEC_sha1 = "1.3.14.3.2.26" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1047:1: SzOID_OIWSEC_sha1RSASign = "1.3.14.3.2.29" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1050:1: SzOID_OIWSEC_shaDSA = "1.3.14.3.2.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1034:1: SzOID_OIWSEC_shaRSA = "1.3.14.3.2.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1036:1: SzOID_ORGANIZATIONAL_UNIT_NAME = "2.5.4.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1137:1: SzOID_ORGANIZATION_NAME = "2.5.4.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1136:1: SzOID_OS_VERSION = "1.3.6.1.4.1.311.13.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1639:1: SzOID_OWNER = "2.5.4.32" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1158:1: SzOID_PHYSICAL_DELIVERY_OFFICE_NAME = "2.5.4.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1145:1: SzOID_PIN_RULES_CTL = "1.3.6.1.4.1.311.10.3.32" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1795:1: SzOID_PIN_RULES_DOMAIN_NAME = "1.3.6.1.4.1.311.10.3.34" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1797:1: SzOID_PIN_RULES_EXT = "1.3.6.1.4.1.311.10.3.33" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1796:1: SzOID_PIN_RULES_LOG_END_DATE_EXT = "1.3.6.1.4.1.311.10.3.35" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1798:1: SzOID_PIN_RULES_SIGNER = "1.3.6.1.4.1.311.10.3.31" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1794:1: SzOID_PKCS = "1.2.840.113549.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:865:1: SzOID_PKCS_1 = "1.2.840.113549.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:869:1: SzOID_PKCS_10 = "1.2.840.113549.1.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:878:1: SzOID_PKCS_12 = "1.2.840.113549.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:879:1: SzOID_PKCS_12_EXTENDED_ATTRIBUTES = "1.3.6.1.4.1.311.17.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1177:1: SzOID_PKCS_12_FRIENDLY_NAME_ATTR = "1.2.840.113549.1.9.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1173:1: SzOID_PKCS_12_KEY_PROVIDER_NAME_ATTR = "1.3.6.1.4.1.311.17.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1175:1: SzOID_PKCS_12_LOCAL_KEY_ID = "1.2.840.113549.1.9.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1174:1: SzOID_PKCS_12_PROTECTED_PASSWORD_SECRET_BAG_TYPE_ID = "1.3.6.1.4.1.311.17.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1178:1: SzOID_PKCS_12_PbeIds = "1.2.840.113549.1.12.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5667:1: SzOID_PKCS_12_pbeWithSHA1And128BitRC2 = "1.2.840.113549.1.12.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5672:1: SzOID_PKCS_12_pbeWithSHA1And128BitRC4 = "1.2.840.113549.1.12.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5668:1: SzOID_PKCS_12_pbeWithSHA1And2KeyTripleDES = "1.2.840.113549.1.12.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5671:1: SzOID_PKCS_12_pbeWithSHA1And3KeyTripleDES = "1.2.840.113549.1.12.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5670:1: SzOID_PKCS_12_pbeWithSHA1And40BitRC2 = "1.2.840.113549.1.12.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5673:1: SzOID_PKCS_12_pbeWithSHA1And40BitRC4 = "1.2.840.113549.1.12.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5669:1: SzOID_PKCS_2 = "1.2.840.113549.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:870:1: SzOID_PKCS_3 = "1.2.840.113549.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:871:1: SzOID_PKCS_4 = "1.2.840.113549.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:872:1: SzOID_PKCS_5 = "1.2.840.113549.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:873:1: SzOID_PKCS_5_PBES2 = "1.2.840.113549.1.5.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5675:1: SzOID_PKCS_5_PBKDF2 = "1.2.840.113549.1.5.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:5674:1: SzOID_PKCS_6 = "1.2.840.113549.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:874:1: SzOID_PKCS_7 = "1.2.840.113549.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:875:1: SzOID_PKCS_7_DATA = "1.2.840.113549.1.7.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2890:1: SzOID_PKCS_7_DIGESTED = "1.2.840.113549.1.7.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2894:1: SzOID_PKCS_7_ENCRYPTED = "1.2.840.113549.1.7.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2895:1: SzOID_PKCS_7_ENVELOPED = "1.2.840.113549.1.7.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2892:1: SzOID_PKCS_7_SIGNED = "1.2.840.113549.1.7.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2891:1: SzOID_PKCS_7_SIGNEDANDENVELOPED = "1.2.840.113549.1.7.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2893:1: SzOID_PKCS_8 = "1.2.840.113549.1.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:876:1: SzOID_PKCS_9 = "1.2.840.113549.1.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:877:1: SzOID_PKCS_9_CONTENT_TYPE = "1.2.840.113549.1.9.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2897:1: SzOID_PKCS_9_MESSAGE_DIGEST = "1.2.840.113549.1.9.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2898:1: SzOID_PKINIT_KP_KDC = "1.3.6.1.5.2.3.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1730:1: SzOID_PKIX = "1.3.6.1.5.5.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1643:1: SzOID_PKIX_ACC_DESCR = "1.3.6.1.5.5.7.48" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2092:1: SzOID_PKIX_CA_ISSUERS = "1.3.6.1.5.5.7.48.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2094:1: SzOID_PKIX_CA_REPOSITORY = "1.3.6.1.5.5.7.48.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2096:1: SzOID_PKIX_KP = "1.3.6.1.5.5.7.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1713:1: SzOID_PKIX_KP_CLIENT_AUTH = "1.3.6.1.5.5.7.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1716:1: SzOID_PKIX_KP_CODE_SIGNING = "1.3.6.1.5.5.7.3.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1717:1: SzOID_PKIX_KP_EMAIL_PROTECTION = "1.3.6.1.5.5.7.3.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1718:1: SzOID_PKIX_KP_IPSEC_END_SYSTEM = "1.3.6.1.5.5.7.3.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1719:1: SzOID_PKIX_KP_IPSEC_TUNNEL = "1.3.6.1.5.5.7.3.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1720:1: SzOID_PKIX_KP_IPSEC_USER = "1.3.6.1.5.5.7.3.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1721:1: SzOID_PKIX_KP_OCSP_SIGNING = "1.3.6.1.5.5.7.3.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1723:1: SzOID_PKIX_KP_SERVER_AUTH = "1.3.6.1.5.5.7.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1715:1: SzOID_PKIX_KP_TIMESTAMP_SIGNING = "1.3.6.1.5.5.7.3.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1722:1: SzOID_PKIX_NO_SIGNATURE = "1.3.6.1.5.5.7.6.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2348:1: SzOID_PKIX_OCSP = "1.3.6.1.5.5.7.48.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2093:1: SzOID_PKIX_OCSP_BASIC_SIGNED_RESPONSE = "1.3.6.1.5.5.7.48.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2647:1: SzOID_PKIX_OCSP_NOCHECK = "1.3.6.1.5.5.7.48.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1726:1: SzOID_PKIX_OCSP_NONCE = "1.3.6.1.5.5.7.48.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1725:1: SzOID_PKIX_PE = "1.3.6.1.5.5.7.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1644:1: SzOID_PKIX_POLICY_QUALIFIER_CPS = "1.3.6.1.5.5.7.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1816:1: SzOID_PKIX_POLICY_QUALIFIER_USERNOTICE = "1.3.6.1.5.5.7.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1817:1: SzOID_PKIX_TIME_STAMPING = "1.3.6.1.5.5.7.48.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2095:1: SzOID_PLATFORM_MANIFEST_BINARY_ID = "1.3.6.1.4.1.311.10.3.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1761:1: SzOID_POLICY_CONSTRAINTS = "2.5.29.36" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1634:1: SzOID_POLICY_MAPPINGS = "2.5.29.33" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1632:1: SzOID_POSTAL_ADDRESS = "2.5.4.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1142:1: SzOID_POSTAL_CODE = "2.5.4.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1143:1: SzOID_POST_OFFICE_BOX = "2.5.4.18" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1144:1: SzOID_PREFERRED_DELIVERY_METHOD = "2.5.4.28" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1154:1: SzOID_PRESENTATION_ADDRESS = "2.5.4.29" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1155:1: SzOID_PRIVATEKEY_USAGE_PERIOD = "2.5.29.16" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1606:1: SzOID_PRODUCT_UPDATE = "1.3.6.1.4.1.311.31.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1674:1: SzOID_PROTECTED_PROCESS_LIGHT_SIGNER = "1.3.6.1.4.1.311.10.3.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1788:1: SzOID_PROTECTED_PROCESS_SIGNER = "1.3.6.1.4.1.311.10.3.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1790:1: SzOID_QC_EU_COMPLIANCE = "0.4.0.1862.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2280:1: SzOID_QC_SSCD = "0.4.0.1862.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2281:1: SzOID_QC_STATEMENTS_EXT = "1.3.6.1.5.5.7.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1648:1: SzOID_RDN_DUMMY_SIGNER = "1.3.6.1.4.1.311.21.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1695:1: SzOID_RDN_TCG_PLATFORM_MANUFACTURER = "2.23.133.2.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1832:1: SzOID_RDN_TCG_PLATFORM_MODEL = "2.23.133.2.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1833:1: SzOID_RDN_TCG_PLATFORM_VERSION = "2.23.133.2.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1834:1: SzOID_RDN_TPM_MANUFACTURER = "2.23.133.2.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1828:1: SzOID_RDN_TPM_MODEL = "2.23.133.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1829:1: SzOID_RDN_TPM_VERSION = "2.23.133.2.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1830:1: SzOID_REASON_CODE_HOLD = "2.5.29.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1618:1: SzOID_REGISTERED_ADDRESS = "2.5.4.26" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1152:1: SzOID_REMOVE_CERTIFICATE = "1.3.6.1.4.1.311.10.8.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1654:1: SzOID_RENEWAL_CERTIFICATE = "1.3.6.1.4.1.311.13.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1636:1: SzOID_REQUEST_CLIENT_INFO = "1.3.6.1.4.1.311.21.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1705:1: SzOID_REQUIRE_CERT_CHAIN_POLICY = "1.3.6.1.4.1.311.21.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1701:1: SzOID_REVOKED_LIST_SIGNER = "1.3.6.1.4.1.311.10.3.19" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1785:1: SzOID_RFC3161_counterSign = "1.3.6.1.4.1.311.3.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:920:1: SzOID_ROLE_OCCUPANT = "2.5.4.33" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1159:1: SzOID_ROOT_LIST_SIGNER = "1.3.6.1.4.1.311.10.3.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1752:1: SzOID_ROOT_PROGRAM_AUTO_UPDATE_CA_REVOCATION = "1.3.6.1.4.1.311.60.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3695:1: SzOID_ROOT_PROGRAM_AUTO_UPDATE_END_REVOCATION = "1.3.6.1.4.1.311.60.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3696:1: SzOID_ROOT_PROGRAM_FLAGS = "1.3.6.1.4.1.311.60.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1819:1: SzOID_ROOT_PROGRAM_NO_OCSP_FAILOVER_TO_CRL = "1.3.6.1.4.1.311.60.3.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3697:1: SzOID_RSA = "1.2.840.113549" // /usr/x86_64-w64-mingw32/include/wincrypt.h:864:1: SzOID_RSAES_OAEP = "1.2.840.113549.1.1.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:888:1: SzOID_RSA_DES_EDE3_CBC = "1.2.840.113549.3.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:933:1: SzOID_RSA_DH = "1.2.840.113549.1.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:896:1: SzOID_RSA_ENCRYPT = "1.2.840.113549.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:867:1: SzOID_RSA_HASH = "1.2.840.113549.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:866:1: SzOID_RSA_MD2 = "1.2.840.113549.2.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:927:1: SzOID_RSA_MD2RSA = "1.2.840.113549.1.1.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:882:1: SzOID_RSA_MD4 = "1.2.840.113549.2.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:928:1: SzOID_RSA_MD4RSA = "1.2.840.113549.1.1.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:883:1: SzOID_RSA_MD5 = "1.2.840.113549.2.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:929:1: SzOID_RSA_MD5RSA = "1.2.840.113549.1.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:884:1: SzOID_RSA_MGF1 = "1.2.840.113549.1.1.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:889:1: SzOID_RSA_PSPECIFIED = "1.2.840.113549.1.1.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:890:1: SzOID_RSA_RC2CBC = "1.2.840.113549.3.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:931:1: SzOID_RSA_RC4 = "1.2.840.113549.3.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:932:1: SzOID_RSA_RC5_CBCPad = "1.2.840.113549.3.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:934:1: SzOID_RSA_RSA = "1.2.840.113549.1.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:881:1: SzOID_RSA_SETOAEP_RSA = "1.2.840.113549.1.1.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:886:1: SzOID_RSA_SHA1RSA = "1.2.840.113549.1.1.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:885:1: SzOID_RSA_SHA256RSA = "1.2.840.113549.1.1.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:892:1: SzOID_RSA_SHA384RSA = "1.2.840.113549.1.1.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:893:1: SzOID_RSA_SHA512RSA = "1.2.840.113549.1.1.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:894:1: SzOID_RSA_SMIMECapabilities = "1.2.840.113549.1.9.15" // /usr/x86_64-w64-mingw32/include/wincrypt.h:916:1: SzOID_RSA_SMIMEalg = "1.2.840.113549.1.9.16.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:922:1: SzOID_RSA_SMIMEalgCMS3DESwrap = "1.2.840.113549.1.9.16.3.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:924:1: SzOID_RSA_SMIMEalgCMSRC2wrap = "1.2.840.113549.1.9.16.3.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:925:1: SzOID_RSA_SMIMEalgESDH = "1.2.840.113549.1.9.16.3.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:923:1: SzOID_RSA_SSA_PSS = "1.2.840.113549.1.1.10" // /usr/x86_64-w64-mingw32/include/wincrypt.h:891:1: SzOID_RSA_certExtensions = "1.2.840.113549.1.9.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:915:1: SzOID_RSA_challengePwd = "1.2.840.113549.1.9.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:912:1: SzOID_RSA_contentType = "1.2.840.113549.1.9.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:908:1: SzOID_RSA_counterSign = "1.2.840.113549.1.9.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:911:1: SzOID_RSA_data = "1.2.840.113549.1.7.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:898:1: SzOID_RSA_digestedData = "1.2.840.113549.1.7.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:902:1: SzOID_RSA_emailAddr = "1.2.840.113549.1.9.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:906:1: SzOID_RSA_encryptedData = "1.2.840.113549.1.7.6" // /usr/x86_64-w64-mingw32/include/wincrypt.h:904:1: SzOID_RSA_envelopedData = "1.2.840.113549.1.7.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:900:1: SzOID_RSA_extCertAttrs = "1.2.840.113549.1.9.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:914:1: SzOID_RSA_hashedData = "1.2.840.113549.1.7.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:903:1: SzOID_RSA_messageDigest = "1.2.840.113549.1.9.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:909:1: SzOID_RSA_preferSignedData = "1.2.840.113549.1.9.15.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:917:1: SzOID_RSA_signEnvData = "1.2.840.113549.1.7.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:901:1: SzOID_RSA_signedData = "1.2.840.113549.1.7.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:899:1: SzOID_RSA_signingTime = "1.2.840.113549.1.9.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:910:1: SzOID_RSA_unstructAddr = "1.2.840.113549.1.9.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:913:1: SzOID_RSA_unstructName = "1.2.840.113549.1.9.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:907:1: SzOID_SEARCH_GUIDE = "2.5.4.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1140:1: SzOID_SEE_ALSO = "2.5.4.34" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1160:1: SzOID_SERIALIZED = "1.3.6.1.4.1.311.10.3.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1662:1: SzOID_SERVER_GATED_CRYPTO = "1.3.6.1.4.1.311.10.3.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1737:1: SzOID_SGC_NETSCAPE = "2.16.840.1.113730.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1741:1: SzOID_SITE_PIN_RULES_FLAGS_ATTR = "1.3.6.1.4.1.311.10.4.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1812:1: SzOID_SITE_PIN_RULES_INDEX_ATTR = "1.3.6.1.4.1.311.10.4.2" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1811:1: SzOID_SORTED_CTL = "1.3.6.1.4.1.311.10.1.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1659:1: SzOID_STATE_OR_PROVINCE_NAME = "2.5.4.8" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1134:1: SzOID_STREET_ADDRESS = "2.5.4.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1135:1: SzOID_SUBJECT_ALT_NAME = "2.5.29.7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1600:1: SzOID_SUBJECT_ALT_NAME2 = "2.5.29.17" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1615:1: SzOID_SUBJECT_DIR_ATTRS = "2.5.29.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1711:1: SzOID_SUBJECT_INFO_ACCESS = "1.3.6.1.5.5.7.1.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1646:1: SzOID_SUBJECT_KEY_IDENTIFIER = "2.5.29.14" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1614:1: SzOID_SUPPORTED_APPLICATION_CONTEXT = "2.5.4.30" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1156:1: SzOID_SUR_NAME = "2.5.4.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1130:1: SzOID_SYNC_ROOT_CTL_EXT = "1.3.6.1.4.1.311.10.3.50" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1803:1: SzOID_TELEPHONE_NUMBER = "2.5.4.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1146:1: SzOID_TELETEXT_TERMINAL_IDENTIFIER = "2.5.4.22" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1148:1: SzOID_TELEX_NUMBER = "2.5.4.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1147:1: SzOID_TIMESTAMP_TOKEN = "1.2.840.113549.1.9.16.1.4" // /usr/x86_64-w64-mingw32/include/wincrypt.h:919:1: SzOID_TITLE = "2.5.4.12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1138:1: SzOID_TLS_FEATURES_EXT = "1.3.6.1.5.5.7.1.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1650:1: SzOID_USER_CERTIFICATE = "2.5.4.36" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1162:1: SzOID_USER_PASSWORD = "2.5.4.35" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1161:1: SzOID_VERISIGN_BITSTRING_6_13 = "2.16.840.1.113733.1.6.13" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2310:1: SzOID_VERISIGN_ISS_STRONG_CRYPTO = "2.16.840.1.113733.1.8.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2312:1: SzOID_VERISIGN_ONSITE_JURISDICTION_HASH = "2.16.840.1.113733.1.6.11" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2309:1: SzOID_VERISIGN_PRIVATE_6_9 = "2.16.840.1.113733.1.6.9" // /usr/x86_64-w64-mingw32/include/wincrypt.h:2308:1: SzOID_WHQL_CRYPTO = "1.3.6.1.4.1.311.10.3.5" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1747:1: SzOID_WINDOWS_KITS_SIGNER = "1.3.6.1.4.1.311.10.3.20" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1786:1: SzOID_WINDOWS_RT_SIGNER = "1.3.6.1.4.1.311.10.3.21" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1787:1: SzOID_WINDOWS_SOFTWARE_EXTENSION_SIGNER = "1.3.6.1.4.1.311.10.3.26" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1792:1: SzOID_WINDOWS_STORE_SIGNER = "1.3.6.1.4.1.311.76.3.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1807:1: SzOID_WINDOWS_TCB_SIGNER = "1.3.6.1.4.1.311.10.3.23" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1789:1: SzOID_WINDOWS_THIRD_PARTY_COMPONENT_SIGNER = "1.3.6.1.4.1.311.10.3.25" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1791:1: SzOID_X21_ADDRESS = "2.5.4.24" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1150:1: SzOID_X957 = "1.2.840.10040" // /usr/x86_64-w64-mingw32/include/wincrypt.h:939:1: SzOID_X957_DSA = "1.2.840.10040.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:940:1: SzOID_X957_SHA1DSA = "1.2.840.10040.4.3" // /usr/x86_64-w64-mingw32/include/wincrypt.h:941:1: SzOID_YESNO_TRUST_ATTR = "1.3.6.1.4.1.311.10.4.1" // /usr/x86_64-w64-mingw32/include/wincrypt.h:1810:1: SzPRIV_KEY_CACHE_MAX_ITEMS = "PrivKeyCacheMaxItems" // /usr/x86_64-w64-mingw32/include/wincrypt.h:618:1: SzPRIV_KEY_CACHE_PURGE_INTERVAL_SECONDS = "PrivKeyCachePurgeIntervalSeconds" // /usr/x86_64-w64-mingw32/include/wincrypt.h:621:1: Sz_CERT_STORE_PROV_COLLECTION = "Collection" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3773:1: Sz_CERT_STORE_PROV_FILENAME_W = "File" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3765:1: Sz_CERT_STORE_PROV_LDAP_W = "Ldap" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3782:1: Sz_CERT_STORE_PROV_MEMORY = "Memory" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3764:1: Sz_CERT_STORE_PROV_PHYSICAL_W = "Physical" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3776:1: Sz_CERT_STORE_PROV_PKCS12 = "PKCS12" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3770:1: Sz_CERT_STORE_PROV_PKCS7 = "PKCS7" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3769:1: Sz_CERT_STORE_PROV_SERIALIZED = "Serialized" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3771:1: Sz_CERT_STORE_PROV_SMART_CARD_W = "SmartCard" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3779:1: Sz_CERT_STORE_PROV_SYSTEM_REGISTRY_W = "SystemRegistry" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3774:1: Sz_CERT_STORE_PROV_SYSTEM_W = "System" // /usr/x86_64-w64-mingw32/include/wincrypt.h:3767:1: Tag_inner_PROPVARIANT = 0 // /usr/x86_64-w64-mingw32/include/propidl.h:221:1: TkCREATE = 4 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168185:1: TkEND = 7 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168188:1: TkEXPLAIN = 3 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168184:1: TkOTHER = 2 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168182:1: TkSEMI = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168180:1: TkTEMP = 5 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168186:1: TkTRIGGER = 6 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168187:1: TkWS = 1 // testdata/sqlite-amalgamation-3380500/sqlite3.c:168181:1: WsdAutoextInit = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:129676:1: WsdHooksInit = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:24920:1: WsdStatInit = 0 // testdata/sqlite-amalgamation-3380500/sqlite3.c:22727:1: ) const ( /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:4271:1: */ X_MM_PERM_AAAA = 0 X_MM_PERM_AAAB = 1 X_MM_PERM_AAAC = 2 X_MM_PERM_AAAD = 3 X_MM_PERM_AABA = 4 X_MM_PERM_AABB = 5 X_MM_PERM_AABC = 6 X_MM_PERM_AABD = 7 X_MM_PERM_AACA = 8 X_MM_PERM_AACB = 9 X_MM_PERM_AACC = 10 X_MM_PERM_AACD = 11 X_MM_PERM_AADA = 12 X_MM_PERM_AADB = 13 X_MM_PERM_AADC = 14 X_MM_PERM_AADD = 15 X_MM_PERM_ABAA = 16 X_MM_PERM_ABAB = 17 X_MM_PERM_ABAC = 18 X_MM_PERM_ABAD = 19 X_MM_PERM_ABBA = 20 X_MM_PERM_ABBB = 21 X_MM_PERM_ABBC = 22 X_MM_PERM_ABBD = 23 X_MM_PERM_ABCA = 24 X_MM_PERM_ABCB = 25 X_MM_PERM_ABCC = 26 X_MM_PERM_ABCD = 27 X_MM_PERM_ABDA = 28 X_MM_PERM_ABDB = 29 X_MM_PERM_ABDC = 30 X_MM_PERM_ABDD = 31 X_MM_PERM_ACAA = 32 X_MM_PERM_ACAB = 33 X_MM_PERM_ACAC = 34 X_MM_PERM_ACAD = 35 X_MM_PERM_ACBA = 36 X_MM_PERM_ACBB = 37 X_MM_PERM_ACBC = 38 X_MM_PERM_ACBD = 39 X_MM_PERM_ACCA = 40 X_MM_PERM_ACCB = 41 X_MM_PERM_ACCC = 42 X_MM_PERM_ACCD = 43 X_MM_PERM_ACDA = 44 X_MM_PERM_ACDB = 45 X_MM_PERM_ACDC = 46 X_MM_PERM_ACDD = 47 X_MM_PERM_ADAA = 48 X_MM_PERM_ADAB = 49 X_MM_PERM_ADAC = 50 X_MM_PERM_ADAD = 51 X_MM_PERM_ADBA = 52 X_MM_PERM_ADBB = 53 X_MM_PERM_ADBC = 54 X_MM_PERM_ADBD = 55 X_MM_PERM_ADCA = 56 X_MM_PERM_ADCB = 57 X_MM_PERM_ADCC = 58 X_MM_PERM_ADCD = 59 X_MM_PERM_ADDA = 60 X_MM_PERM_ADDB = 61 X_MM_PERM_ADDC = 62 X_MM_PERM_ADDD = 63 X_MM_PERM_BAAA = 64 X_MM_PERM_BAAB = 65 X_MM_PERM_BAAC = 66 X_MM_PERM_BAAD = 67 X_MM_PERM_BABA = 68 X_MM_PERM_BABB = 69 X_MM_PERM_BABC = 70 X_MM_PERM_BABD = 71 X_MM_PERM_BACA = 72 X_MM_PERM_BACB = 73 X_MM_PERM_BACC = 74 X_MM_PERM_BACD = 75 X_MM_PERM_BADA = 76 X_MM_PERM_BADB = 77 X_MM_PERM_BADC = 78 X_MM_PERM_BADD = 79 X_MM_PERM_BBAA = 80 X_MM_PERM_BBAB = 81 X_MM_PERM_BBAC = 82 X_MM_PERM_BBAD = 83 X_MM_PERM_BBBA = 84 X_MM_PERM_BBBB = 85 X_MM_PERM_BBBC = 86 X_MM_PERM_BBBD = 87 X_MM_PERM_BBCA = 88 X_MM_PERM_BBCB = 89 X_MM_PERM_BBCC = 90 X_MM_PERM_BBCD = 91 X_MM_PERM_BBDA = 92 X_MM_PERM_BBDB = 93 X_MM_PERM_BBDC = 94 X_MM_PERM_BBDD = 95 X_MM_PERM_BCAA = 96 X_MM_PERM_BCAB = 97 X_MM_PERM_BCAC = 98 X_MM_PERM_BCAD = 99 X_MM_PERM_BCBA = 100 X_MM_PERM_BCBB = 101 X_MM_PERM_BCBC = 102 X_MM_PERM_BCBD = 103 X_MM_PERM_BCCA = 104 X_MM_PERM_BCCB = 105 X_MM_PERM_BCCC = 106 X_MM_PERM_BCCD = 107 X_MM_PERM_BCDA = 108 X_MM_PERM_BCDB = 109 X_MM_PERM_BCDC = 110 X_MM_PERM_BCDD = 111 X_MM_PERM_BDAA = 112 X_MM_PERM_BDAB = 113 X_MM_PERM_BDAC = 114 X_MM_PERM_BDAD = 115 X_MM_PERM_BDBA = 116 X_MM_PERM_BDBB = 117 X_MM_PERM_BDBC = 118 X_MM_PERM_BDBD = 119 X_MM_PERM_BDCA = 120 X_MM_PERM_BDCB = 121 X_MM_PERM_BDCC = 122 X_MM_PERM_BDCD = 123 X_MM_PERM_BDDA = 124 X_MM_PERM_BDDB = 125 X_MM_PERM_BDDC = 126 X_MM_PERM_BDDD = 127 X_MM_PERM_CAAA = 128 X_MM_PERM_CAAB = 129 X_MM_PERM_CAAC = 130 X_MM_PERM_CAAD = 131 X_MM_PERM_CABA = 132 X_MM_PERM_CABB = 133 X_MM_PERM_CABC = 134 X_MM_PERM_CABD = 135 X_MM_PERM_CACA = 136 X_MM_PERM_CACB = 137 X_MM_PERM_CACC = 138 X_MM_PERM_CACD = 139 X_MM_PERM_CADA = 140 X_MM_PERM_CADB = 141 X_MM_PERM_CADC = 142 X_MM_PERM_CADD = 143 X_MM_PERM_CBAA = 144 X_MM_PERM_CBAB = 145 X_MM_PERM_CBAC = 146 X_MM_PERM_CBAD = 147 X_MM_PERM_CBBA = 148 X_MM_PERM_CBBB = 149 X_MM_PERM_CBBC = 150 X_MM_PERM_CBBD = 151 X_MM_PERM_CBCA = 152 X_MM_PERM_CBCB = 153 X_MM_PERM_CBCC = 154 X_MM_PERM_CBCD = 155 X_MM_PERM_CBDA = 156 X_MM_PERM_CBDB = 157 X_MM_PERM_CBDC = 158 X_MM_PERM_CBDD = 159 X_MM_PERM_CCAA = 160 X_MM_PERM_CCAB = 161 X_MM_PERM_CCAC = 162 X_MM_PERM_CCAD = 163 X_MM_PERM_CCBA = 164 X_MM_PERM_CCBB = 165 X_MM_PERM_CCBC = 166 X_MM_PERM_CCBD = 167 X_MM_PERM_CCCA = 168 X_MM_PERM_CCCB = 169 X_MM_PERM_CCCC = 170 X_MM_PERM_CCCD = 171 X_MM_PERM_CCDA = 172 X_MM_PERM_CCDB = 173 X_MM_PERM_CCDC = 174 X_MM_PERM_CCDD = 175 X_MM_PERM_CDAA = 176 X_MM_PERM_CDAB = 177 X_MM_PERM_CDAC = 178 X_MM_PERM_CDAD = 179 X_MM_PERM_CDBA = 180 X_MM_PERM_CDBB = 181 X_MM_PERM_CDBC = 182 X_MM_PERM_CDBD = 183 X_MM_PERM_CDCA = 184 X_MM_PERM_CDCB = 185 X_MM_PERM_CDCC = 186 X_MM_PERM_CDCD = 187 X_MM_PERM_CDDA = 188 X_MM_PERM_CDDB = 189 X_MM_PERM_CDDC = 190 X_MM_PERM_CDDD = 191 X_MM_PERM_DAAA = 192 X_MM_PERM_DAAB = 193 X_MM_PERM_DAAC = 194 X_MM_PERM_DAAD = 195 X_MM_PERM_DABA = 196 X_MM_PERM_DABB = 197 X_MM_PERM_DABC = 198 X_MM_PERM_DABD = 199 X_MM_PERM_DACA = 200 X_MM_PERM_DACB = 201 X_MM_PERM_DACC = 202 X_MM_PERM_DACD = 203 X_MM_PERM_DADA = 204 X_MM_PERM_DADB = 205 X_MM_PERM_DADC = 206 X_MM_PERM_DADD = 207 X_MM_PERM_DBAA = 208 X_MM_PERM_DBAB = 209 X_MM_PERM_DBAC = 210 X_MM_PERM_DBAD = 211 X_MM_PERM_DBBA = 212 X_MM_PERM_DBBB = 213 X_MM_PERM_DBBC = 214 X_MM_PERM_DBBD = 215 X_MM_PERM_DBCA = 216 X_MM_PERM_DBCB = 217 X_MM_PERM_DBCC = 218 X_MM_PERM_DBCD = 219 X_MM_PERM_DBDA = 220 X_MM_PERM_DBDB = 221 X_MM_PERM_DBDC = 222 X_MM_PERM_DBDD = 223 X_MM_PERM_DCAA = 224 X_MM_PERM_DCAB = 225 X_MM_PERM_DCAC = 226 X_MM_PERM_DCAD = 227 X_MM_PERM_DCBA = 228 X_MM_PERM_DCBB = 229 X_MM_PERM_DCBC = 230 X_MM_PERM_DCBD = 231 X_MM_PERM_DCCA = 232 X_MM_PERM_DCCB = 233 X_MM_PERM_DCCC = 234 X_MM_PERM_DCCD = 235 X_MM_PERM_DCDA = 236 X_MM_PERM_DCDB = 237 X_MM_PERM_DCDC = 238 X_MM_PERM_DCDD = 239 X_MM_PERM_DDAA = 240 X_MM_PERM_DDAB = 241 X_MM_PERM_DDAC = 242 X_MM_PERM_DDAD = 243 X_MM_PERM_DDBA = 244 X_MM_PERM_DDBB = 245 X_MM_PERM_DDBC = 246 X_MM_PERM_DDBD = 247 X_MM_PERM_DDCA = 248 X_MM_PERM_DDCB = 249 X_MM_PERM_DDCC = 250 X_MM_PERM_DDCD = 251 X_MM_PERM_DDDA = 252 X_MM_PERM_DDDB = 253 X_MM_PERM_DDDC = 254 X_MM_PERM_DDDD = 255 ) // Constants for mantissa extraction const ( /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:8686:1: */ X_MM_MANT_NORM_1_2 = 0 // interval [1, 2) X_MM_MANT_NORM_p5_2 = 1 // interval [0.5, 2) X_MM_MANT_NORM_p5_1 = 2 // interval [0.5, 1) X_MM_MANT_NORM_p75_1p5 = 3 ) const ( /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:8694:1: */ X_MM_MANT_SIGN_src = 0 // sign = sign(SRC) X_MM_MANT_SIGN_zero = 1 // sign = 0 X_MM_MANT_SIGN_nan = 2 ) // Copyright (C) 2002-2020 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 // <http://www.gnu.org/licenses/>. // 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-2020 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 // <http://www.gnu.org/licenses/>. // 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-2020 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 // <http://www.gnu.org/licenses/>. // Constants for use with _mm_prefetch. const ( /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:37:1: */ // _MM_HINT_ET is _MM_HINT_T with set 3rd bit. X_MM_HINT_ET0 = 7 X_MM_HINT_ET1 = 6 X_MM_HINT_T0 = 3 X_MM_HINT_T1 = 2 X_MM_HINT_T2 = 1 X_MM_HINT_NTA = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/bcrypt.h:417:3: */ DSA_HASH_ALGORITHM_SHA1 = 0 DSA_HASH_ALGORITHM_SHA256 = 1 DSA_HASH_ALGORITHM_SHA512 = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/combaseapi.h:138:1: */ REGCLS_SINGLEUSE = 0 REGCLS_MULTIPLEUSE = 1 REGCLS_MULTI_SEPARATE = 2 REGCLS_SUSPENDED = 4 REGCLS_SURROGATE = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/combaseapi.h:149:1: */ COINITBASE_MULTITHREADED = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/combaseapi.h:216:1: */ SMEXF_SERVER = 1 SMEXF_HANDLER = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/combaseapi.h:320: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 ( /* /usr/x86_64-w64-mingw32/include/memoryapi.h:18:3: */ LowMemoryResourceNotification = 0 HighMemoryResourceNotification = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/minwinbase.h:102:3: */ FindExInfoStandard = 0 FindExInfoBasic = 1 FindExInfoMaxInfoLevel = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/minwinbase.h:114:3: */ FindExSearchNameMatch = 0 FindExSearchLimitToDirectories = 1 FindExSearchLimitToDevices = 2 FindExSearchMaxSearchOp = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/minwinbase.h:131:3: */ GetFileExInfoStandard = 0 GetFileExMaxInfoLevel = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/msxml.h:242: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 ( /* /usr/x86_64-w64-mingw32/include/msxml.h:248:3: */ XMLELEMTYPE_ELEMENT = 0 XMLELEMTYPE_TEXT = 1 XMLELEMTYPE_COMMENT = 2 XMLELEMTYPE_DOCUMENT = 3 XMLELEMTYPE_DTD = 4 XMLELEMTYPE_PI = 5 XMLELEMTYPE_OTHER = 6 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:2472:1: */ DESCKIND_NONE = 0 DESCKIND_FUNCDESC = 1 DESCKIND_VARDESC = 2 DESCKIND_TYPECOMP = 3 DESCKIND_IMPLICITAPPOBJ = 4 DESCKIND_MAX = 5 ) // **************************************************************************** // // ITypeLib interface const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:3732:1: */ SYS_WIN16 = 0 SYS_WIN32 = 1 SYS_MAC = 2 SYS_WIN64 = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:3739:1: */ LIBFLAG_FRESTRICTED = 1 LIBFLAG_FCONTROL = 2 LIBFLAG_FHIDDEN = 4 LIBFLAG_FHASDISKIMAGE = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:399: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:4348: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:640: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:784: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:798:1: */ FUNC_VIRTUAL = 0 FUNC_PUREVIRTUAL = 1 FUNC_NONVIRTUAL = 2 FUNC_STATIC = 3 FUNC_DISPATCH = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:806:1: */ INVOKE_FUNC = 1 INVOKE_PROPERTYGET = 2 INVOKE_PROPERTYPUT = 4 INVOKE_PROPERTYPUTREF = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:829:1: */ VAR_PERINSTANCE = 0 VAR_STATIC = 1 VAR_CONST = 2 VAR_DISPATCH = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:858: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:876: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 ( /* /usr/x86_64-w64-mingw32/include/oaidl.h:892: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 ( /* /usr/x86_64-w64-mingw32/include/objbase.h:16:1: */ COINIT_APARTMENTTHREADED = 2 COINIT_MULTITHREADED = 0 COINIT_DISABLE_OLE1DDE = 4 COINIT_SPEED_OVER_MEMORY = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/objbase.h:87:1: */ SD_LAUNCHPERMISSIONS = 0 SD_ACCESSPERMISSIONS = 1 SD_LAUNCHRESTRICTIONS = 2 SD_ACCESSRESTRICTIONS = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/objidl.h:12272:1: */ DATADIR_GET = 1 DATADIR_SET = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:12728:1: */ CALLTYPE_TOPLEVEL = 1 CALLTYPE_NESTED = 2 CALLTYPE_ASYNC = 3 CALLTYPE_TOPLEVEL_CALLPENDING = 4 CALLTYPE_ASYNC_CALLPENDING = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:12735:1: */ SERVERCALL_ISHANDLED = 0 SERVERCALL_REJECTED = 1 SERVERCALL_RETRYLATER = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:12740:1: */ PENDINGTYPE_TOPLEVEL = 1 PENDINGTYPE_NESTED = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:12744:1: */ PENDINGMSG_CANCELCALL = 0 PENDINGMSG_WAITNOPROCESS = 1 PENDINGMSG_WAITDEFPROCESS = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:14295:1: */ ServerApplication = 0 LibraryApplication = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:14299:1: */ IdleShutdown = 0 ForcedShutdown = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/objidl.h:7990:1: */ BIND_MAYBOTHERUSER = 1 BIND_JUSTTESTEXISTENCE = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/objidl.h:9060:1: */ MKRREDUCE_ONE = 196608 MKRREDUCE_TOUSER = 131072 MKRREDUCE_THROUGHUSER = 65536 MKRREDUCE_ALL = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1267:1: */ EXTCONN_STRONG = 1 EXTCONN_WEAK = 2 EXTCONN_CALLABLE = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2057:1: */ STGTY_STORAGE = 1 STGTY_STREAM = 2 STGTY_LOCKBYTES = 3 STGTY_PROPERTY = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2064:1: */ STREAM_SEEK_SET = 0 STREAM_SEEK_CUR = 1 STREAM_SEEK_END = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2070:1: */ LOCK_WRITE = 1 LOCK_EXCLUSIVE = 2 LOCK_ONLYONCE = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3588: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 ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3870:1: */ COMBND_RPCTIMEOUT = 1 COMBND_SERVER_LOCALITY = 2 COMBND_RESERVED1 = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3876:1: */ SERVER_LOCALITY_PROCESS_LOCAL = 0 SERVER_LOCALITY_MACHINE_LOCAL = 1 SERVER_LOCALITY_REMOTE = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3981:1: */ COMGLB_EXCEPTION_HANDLING = 1 COMGLB_APPID = 2 COMGLB_RPC_THREADPOOL_SETTING = 3 COMGLB_RO_SETTINGS = 4 COMGLB_UNMARSHALING_POLICY = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3989:1: */ COMGLB_EXCEPTION_HANDLE = 0 COMGLB_EXCEPTION_DONOT_HANDLE_FATAL = 1 COMGLB_EXCEPTION_DONOT_HANDLE = 1 COMGLB_EXCEPTION_DONOT_HANDLE_ANY = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3996:1: */ COMGLB_RPC_THREADPOOL_SETTING_DEFAULT_POOL = 0 COMGLB_RPC_THREADPOOL_SETTING_PRIVATE_POOL = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4001: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 ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4012:1: */ COMGLB_UNMARSHALING_POLICY_NORMAL = 0 COMGLB_UNMARSHALING_POLICY_STRONG = 1 COMGLB_UNMARSHALING_POLICY_HYBRID = 2 ) // **************************************************************************** // // IAsyncManager interface const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4875:1: */ DCOM_NONE = 0 DCOM_CALL_COMPLETE = 1 DCOM_CALL_CANCELED = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6049: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 ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6059:1: */ APTTYPE_CURRENT = -1 APTTYPE_STA = 0 APTTYPE_MTA = 1 APTTYPE_NA = 2 APTTYPE_MAINSTA = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6069:1: */ THDTYPE_BLOCKMESSAGES = 0 THDTYPE_PROCESSMESSAGES = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6329:1: */ CO_MARSHALING_SOURCE_IS_APP_CONTAINER = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/oleauto.h:590:1: */ REGKIND_DEFAULT = 0 REGKIND_REGISTER = 1 REGKIND_NONE = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1123:1: */ OLEGETMONIKER_ONLYIFTHERE = 1 OLEGETMONIKER_FORCEASSIGN = 2 OLEGETMONIKER_UNASSIGN = 3 OLEGETMONIKER_TEMPFORUSER = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1130:1: */ OLEWHICHMK_CONTAINER = 1 OLEWHICHMK_OBJREL = 2 OLEWHICHMK_OBJFULL = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1136:1: */ USERCLASSTYPE_FULL = 1 USERCLASSTYPE_SHORT = 2 USERCLASSTYPE_APPNAME = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1142: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 ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1166:1: */ OLECLOSE_SAVEIFDIRTY = 0 OLECLOSE_NOSAVE = 1 OLECLOSE_PROMPTSAVE = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1504:1: */ OLERENDER_NONE = 0 OLERENDER_DRAW = 1 OLERENDER_FORMAT = 2 OLERENDER_ASIS = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1631:1: */ OLEUPDATE_ALWAYS = 1 OLEUPDATE_ONCALL = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1639:1: */ OLELINKBIND_EVENIFCLASSDIFF = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1835:1: */ BINDSPEED_INDEFINITE = 1 BINDSPEED_MODERATE = 2 BINDSPEED_IMMEDIATE = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:1841:1: */ OLECONTF_EMBEDDINGS = 1 OLECONTF_LINKS = 2 OLECONTF_OTHERS = 4 OLECONTF_ONLYUSER = 8 OLECONTF_ONLYIFRUNNING = 16 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:3732:1: */ OLEVERBATTRIB_NEVERDIRTIES = 1 OLEVERBATTRIB_ONCONTAINERMENU = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/oleidl.h:535:1: */ DISCARDCACHE_SAVEIFDIRTY = 0 DISCARDCACHE_NOSAVE = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/propidl.h:402: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 ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:20:3: */ RpcNotificationTypeNone = 0 RpcNotificationTypeEvent = 1 RpcNotificationTypeApc = 2 RpcNotificationTypeIoc = 3 RpcNotificationTypeHwnd = 4 RpcNotificationTypeCallback = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:214:1: */ RctInvalid = 0 RctNormal = 1 RctTraining = 2 RctGuaranteed = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:221:1: */ RlafInvalid = 0 RlafIPv4 = 1 RlafIPv6 = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:227:1: */ RpcNotificationCallNone = 0 RpcNotificationClientDisconnect = 1 RpcNotificationCallCancel = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:233:1: */ RcclInvalid = 0 RcclLocal = 1 RcclRemote = 2 RcclClientUnknownLocality = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:25:3: */ RpcCallComplete = 0 RpcSendComplete = 1 RpcReceiveComplete = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcasync.h:78:3: */ EeptAnsiString = 1 EeptUnicodeString = 2 EeptLongVal = 3 EeptShortVal = 4 EeptPointerVal = 5 EeptNone = 6 EeptBinary = 7 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:41:3: */ PROTOCOL_NOT_LOADED = 1 PROTOCOL_LOADED = 2 PROTOCOL_ADDRESS_CHANGE = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/rpcndr.h:391:3: */ IDL_CS_NO_CONVERT = 0 IDL_CS_IN_PLACE_CONVERT = 1 IDL_CS_NEW_BUFFER_CONVERT = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcndr.h:495:3: */ XLAT_SERVER = 1 XLAT_CLIENT = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcndr.h:672:3: */ STUB_UNMARSHAL = 0 STUB_CALL_SERVER = 1 STUB_MARSHAL = 2 STUB_CALL_SERVER_NO_HRESULT = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/rpcndr.h:676:3: */ PROXY_CALCSIZE = 0 PROXY_GETBUFFER = 1 PROXY_MARSHAL = 2 PROXY_SENDRECEIVE = 3 PROXY_UNMARSHAL = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/sysinfoapi.h:70:3: */ ComputerNameNetBIOS = 0 ComputerNameDnsHostname = 1 ComputerNameDnsDomain = 2 ComputerNameDnsFullyQualified = 3 ComputerNamePhysicalNetBIOS = 4 ComputerNamePhysicalDnsHostname = 5 ComputerNamePhysicalDnsDomain = 6 ComputerNamePhysicalDnsFullyQualified = 7 ComputerNameMax = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1295:1: */ BINDVERB_GET = 0 BINDVERB_POST = 1 BINDVERB_PUT = 2 BINDVERB_CUSTOM = 3 BINDVERB_RESERVED1 = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1303:1: */ BINDINFOF_URLENCODESTGMEDDATA = 1 BINDINFOF_URLENCODEDEXTRAINFO = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1308: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1342:1: */ URL_ENCODING_NONE = 0 URL_ENCODING_ENABLE_UTF8 = 268435456 URL_ENCODING_DISABLE_UTF8 = 536870912 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1398: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1416:1: */ BSCF_FIRSTDATANOTIFICATION = 1 BSCF_INTERMEDIATEDATANOTIFICATION = 2 BSCF_LASTDATANOTIFICATION = 4 BSCF_DATAFULLYAVAILABLE = 8 BSCF_AVAILABLEDATASIZEUNKNOWN = 16 BSCF_SKIPDRAINDATAFORFILEURLS = 32 BSCF_64BITLENGTHDOWNLOAD = 64 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1426: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:1722: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:2028:1: */ AUTHENTICATEF_PROXY = 1 AUTHENTICATEF_BASIC = 2 AUTHENTICATEF_HTTP = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:2669: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:4774: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:5016: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:5785:1: */ OIBDG_APARTMENTTHREADED = 256 OIBDG_DATAONLY = 4096 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6168: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6190:1: */ PSU_DEFAULT = 1 PSU_SECURITY_URL_ONLY = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6195: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6653: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6676:1: */ PUAFOUT_DEFAULT = 0 PUAFOUT_ISLOCKZONEPOLICY = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:6682:1: */ SZM_CREATE = 0 SZM_DELETE = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:7782: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:7797: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:7808:1: */ MAX_ZONE_PATH = 260 MAX_ZONE_DESCRIPTION = 200 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:7813: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 ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:7841:1: */ URLZONEREG_DEFAULT = 0 URLZONEREG_HKLM = 1 URLZONEREG_HKCU = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:9292:1: */ BINDHANDLETYPES_APPCACHE = 0 BINDHANDLETYPES_DEPENDENCY = 1 BINDHANDLETYPES_COUNT = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/urlmon.h:946:1: */ MIMETYPEPROP = 0 USE_SRC_URL = 1 CLASSIDPROP = 2 TRUSTEDDOWNLOADPROP = 3 POPUPLEVELPROP = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/winbase.h:1184:3: */ ThreadMemoryPriority = 0 ThreadAbsoluteCpuPriority = 1 ThreadInformationClassMax = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winbase.h:1279:3: */ DEPPolicyAlwaysOff = 0 DEPPolicyAlwaysOn = 1 DEPPolicyOptIn = 2 DEPPolicyOptOut = 3 DEPTotalPolicyCount = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/winbase.h:1570:3: */ ProcessMemoryPriority = 0 ProcessInformationClassMax = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winbase.h:2216:3: */ FindStreamInfoStandard = 0 FindStreamInfoMaxInfoLevel = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3656:3: */ KeyTypeOther = 0 KeyTypeVirtualSmartCard = 1 KeyTypePhysicalSmartCard = 2 KeyTypePassport = 3 KeyTypePassportRemote = 4 KeyTypePassportSmartCard = 5 KeyTypeHardware = 6 KeyTypeSoftware = 7 KeyTypeSelfSigned = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/windef.h:157:1: */ DPI_AWARENESS_INVALID = -1 DPI_AWARENESS_UNAWARE = 0 DPI_AWARENESS_SYSTEM_AWARE = 1 DPI_AWARENESS_PER_MONITOR_AWARE = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/windef.h:170:1: */ DPI_HOSTING_BEHAVIOR_INVALID = -1 DPI_HOSTING_BEHAVIOR_DEFAULT = 0 DPI_HOSTING_BEHAVIOR_MIXED = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:1231: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 ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:1762:1: */ StorageDeviceProperty = 0 StorageAdapterProperty = 1 StorageDeviceIdProperty = 2 StorageDeviceUniqueIdProperty = 3 StorageDeviceWriteCacheProperty = 4 StorageMiniportProperty = 5 StorageAccessAlignmentProperty = 6 StorageDeviceSeekPenaltyProperty = 7 StorageDeviceTrimProperty = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:1774:1: */ PropertyStandardQuery = 0 PropertyExistsQuery = 1 PropertyMaskQuery = 2 PropertyQueryMaxDefined = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:292: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 ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:366:3: */ BusTypeUnknown = 0 BusTypeScsi = 1 BusTypeAtapi = 2 BusTypeAta = 3 BusType1394 = 4 BusTypeSsa = 5 BusTypeFibre = 6 BusTypeUsb = 7 BusTypeRAID = 8 BusTypeMax = 9 BusTypeMaxReserved = 127 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:525: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 ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:603:1: */ PARTITION_STYLE_MBR = 0 PARTITION_STYLE_GPT = 1 PARTITION_STYLE_RAW = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:693:1: */ DetectNone = 0 DetectInt13 = 1 DetectExInt13 = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:755:1: */ EqualPriority = 0 KeepPrefetchedData = 1 KeepReadData = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:846: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 ( /* /usr/x86_64-w64-mingw32/include/winioctl.h:994:1: */ AllElements = 0 ChangerTransport = 1 ChangerSlot = 2 ChangerIEPort = 3 ChangerDrive = 4 ChangerDoor = 5 ChangerKeypad = 6 ChangerMaxElement = 7 ) const ( /* /usr/x86_64-w64-mingw32/include/winnls.h:720:3: */ COMPARE_STRING = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/winnls.h:772:3: */ GEOCLASS_NATION = 16 GEOCLASS_REGION = 14 GEOCLASS_ALL = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:2946:5: */ SidTypeUser = 1 SidTypeGroup = 2 SidTypeDomain = 3 SidTypeAlias = 4 SidTypeWellKnownGroup = 5 SidTypeDeletedAccount = 6 SidTypeInvalid = 7 SidTypeUnknown = 8 SidTypeComputer = 9 SidTypeLabel = 10 SidTypeLogonSession = 11 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3189: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3500:5: */ AclRevisionInformation = 1 AclSizeInformation = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3570:5: */ AuditEventObjectAccess = 0 AuditEventDirectoryServiceAccess = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3602: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3692:5: */ SecurityAnonymous = 0 SecurityIdentification = 1 SecurityImpersonation = 2 SecurityDelegation = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3719:5: */ TokenPrimary = 1 TokenImpersonation = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3724:5: */ TokenElevationTypeDefault = 1 TokenElevationTypeFull = 2 TokenElevationTypeLimited = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3730: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:3898:5: */ MandatoryLevelUntrusted = 0 MandatoryLevelLow = 1 MandatoryLevelMedium = 2 MandatoryLevelHigh = 3 MandatoryLevelSystem = 4 MandatoryLevelSecureProcess = 5 MandatoryLevelCount = 6 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4024:5: */ SeLearningModeInvalidType = 0 SeLearningModeSettings = 1 SeLearningModeMax = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4228:5: */ PMCCounter = 0 MaxHardwareCounterType = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4233: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4431:5: */ ToleranceLow = 1 ToleranceMedium = 2 ToleranceHigh = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4437:5: */ ToleranceIntervalShort = 1 ToleranceIntervalMedium = 2 ToleranceIntervalLong = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4556: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4580:5: */ FirmwareTypeUnknown = 0 FirmwareTypeBios = 1 FirmwareTypeUefi = 2 FirmwareTypeMax = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4605:5: */ RelationProcessorCore = 0 RelationNumaNode = 1 RelationCache = 2 RelationProcessorPackage = 3 RelationGroup = 4 RelationAll = 65535 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4612:5: */ CacheUnified = 0 CacheInstruction = 1 CacheData = 2 CacheTrace = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:467:1: */ UNSPECIFIED_COMPARTMENT_ID = 0 DEFAULT_COMPARTMENT_ID = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4908:3: */ MemExtendedParameterInvalidType = 0 MemExtendedParameterAddressRequirements = 1 MemExtendedParameterNumaNode = 2 MemExtendedParameterPartitionHandle = 3 MemExtendedParameterUserPhysicalHandle = 4 MemExtendedParameterAttributeFlags = 5 MemExtendedParameterMax = 6 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:4946:3: */ MemSectionExtendedParameterInvalidType = 0 MemSectionExtendedParameterUserPhysicalFlags = 1 MemSectionExtendedParameterNumaNode = 2 MemSectionExtendedParameterMax = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5346:3: */ PowerSystemUnspecified = 0 PowerSystemWorking = 1 PowerSystemSleeping1 = 2 PowerSystemSleeping2 = 3 PowerSystemSleeping3 = 4 PowerSystemHibernate = 5 PowerSystemShutdown = 6 PowerSystemMaximum = 7 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5352:3: */ PowerActionNone = 0 PowerActionReserved = 1 PowerActionSleep = 2 PowerActionHibernate = 3 PowerActionShutdown = 4 PowerActionShutdownReset = 5 PowerActionShutdownOff = 6 PowerActionWarmEject = 7 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5358:3: */ PowerDeviceUnspecified = 0 PowerDeviceD0 = 1 PowerDeviceD1 = 2 PowerDeviceD2 = 3 PowerDeviceD3 = 4 PowerDeviceMaximum = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5363:3: */ PowerMonitorOff = 0 PowerMonitorOn = 1 PowerMonitorDim = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5367:3: */ PowerUserPresent = 0 PowerUserNotPresent = 1 PowerUserInactive = 2 PowerUserMaximum = 3 PowerUserInvalid = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5383:3: */ LT_DONT_CARE = 0 LT_LOWEST_LATENCY = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5398:3: */ PowerRequestDisplayRequired = 0 PowerRequestSystemRequired = 1 PowerRequestAwayModeRequired = 2 PowerRequestExecutionRequired = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5426: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5510:5: */ UserNotPresent = 0 UserPresent = 1 UserUnknown = 255 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5546: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5576:5: */ PoAc = 0 PoDc = 1 PoHot = 2 PoConditionMaximum = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:5603:5: */ PlatformRoleUnspecified = 0 PlatformRoleDesktop = 1 PlatformRoleMobile = 2 PlatformRoleWorkstation = 3 PlatformRoleEnterpriseServer = 4 PlatformRoleSOHOServer = 5 PlatformRoleAppliancePC = 6 PlatformRolePerformanceServer = 7 PlatformRoleSlate = 8 PlatformRoleMaximum = 9 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:6740:5: */ IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:7611:5: */ IMPORT_OBJECT_CODE = 0 IMPORT_OBJECT_DATA = 1 IMPORT_OBJECT_CONST = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:7615:5: */ IMPORT_OBJECT_ORDINAL = 0 IMPORT_OBJECT_NAME = 1 IMPORT_OBJECT_NAME_NO_PREFIX = 2 IMPORT_OBJECT_NAME_UNDECORATE = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:7621: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8028:5: */ UmsThreadInvalidInfoClass = 0 UmsThreadUserContext = 1 UmsThreadPriority = 2 UmsThreadAffinity = 3 UmsThreadTeb = 4 UmsThreadIsSuspended = 5 UmsThreadIsTerminated = 6 UmsThreadMaxInfoClass = 7 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8039:5: */ UmsSchedulerStartup = 0 UmsSchedulerThreadBlocked = 1 UmsSchedulerThreadYield = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8114:5: */ HeapCompatibilityInformation = 0 HeapEnableTerminationOnCorruption = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8142:5: */ ActivationContextBasicInformation = 1 ActivationContextDetailedInformation = 2 AssemblyDetailedInformationInActivationContext = 3 FileInformationInAssemblyOfAssemblyInActivationContext = 4 RunlevelInformationInActivationContext = 5 CompatibilityInformationInActivationContext = 6 ActivationContextManifestResourceName = 7 MaxActivationContextInfoClass = 8 AssemblyDetailedInformationInActivationContxt = 3 FileInformationInAssemblyOfAssemblyInActivationContxt = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8155: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8163:5: */ ACTCTX_COMPATIBILITY_ELEMENT_TYPE_UNKNOWN = 0 ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS = 1 ACTCTX_COMPATIBILITY_ELEMENT_TYPE_MITIGATION = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8584:5: */ DriverType = 1 FileSystemType = 2 Win32ServiceOwnProcess = 16 Win32ServiceShareProcess = 32 AdapterType = 4 RecognizerType = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8589:5: */ BootLoad = 0 SystemLoad = 1 AutoLoad = 2 DemandLoad = 3 DisableLoad = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8594:5: */ IgnoreError = 0 NormalError = 1 SevereError = 2 CriticalError = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8794: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8804: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 ( /* /usr/x86_64-w64-mingw32/include/winnt.h:8997:7: */ TransactionOutcomeUndetermined = 1 TransactionOutcomeCommitted = 2 TransactionOutcomeAborted = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9003:7: */ TransactionStateNormal = 1 TransactionStateIndoubt = 2 TransactionStateCommittedNotify = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9075:7: */ TransactionBasicInformation = 0 TransactionPropertiesInformation = 1 TransactionEnlistmentInformation = 2 TransactionSuperiorEnlistmentInformation = 3 TransactionBindInformation = 4 TransactionDTCPrivateInformation = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9084:7: */ TransactionManagerBasicInformation = 0 TransactionManagerLogInformation = 1 TransactionManagerLogPathInformation = 2 TransactionManagerOnlineProbeInformation = 3 TransactionManagerRecoveryInformation = 4 TransactionManagerOldestTransactionInformation = 5 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9093:7: */ ResourceManagerBasicInformation = 0 ResourceManagerCompletionInformation = 1 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9110:7: */ EnlistmentBasicInformation = 0 EnlistmentRecoveryInformation = 1 EnlistmentCrmInformation = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winnt.h:9125:7: */ KTMOBJECT_TRANSACTION = 0 KTMOBJECT_TRANSACTION_MANAGER = 1 KTMOBJECT_RESOURCE_MANAGER = 2 KTMOBJECT_ENLISTMENT = 3 KTMOBJECT_INVALID = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/winsvc.h:106:3: */ SC_ACTION_NONE = 0 SC_ACTION_RESTART = 1 SC_ACTION_REBOOT = 2 SC_ACTION_RUN_COMMAND = 3 ) const ( /* /usr/x86_64-w64-mingw32/include/winsvc.h:139:3: */ SC_STATUS_PROCESS_INFO = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/winsvc.h:143:3: */ SC_ENUM_PROCESS_INFO = 0 ) const ( /* /usr/x86_64-w64-mingw32/include/winuser.h:2440:3: */ DCDC_DEFAULT = 0 DCDC_DISABLE_FONT_UPDATE = 1 DCDC_DISABLE_RELAYOUT = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/winuser.h:2449:3: */ DDC_DEFAULT = 0 DDC_DISABLE_ALL = 1 DDC_DISABLE_RESIZE = 2 DDC_DISABLE_CONTROL_RELAYOUT = 4 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypes.h:182:1: */ DVASPECT_CONTENT = 1 DVASPECT_THUMBNAIL = 2 DVASPECT_ICON = 4 DVASPECT_DOCPRINT = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypes.h:189:1: */ STGC_DEFAULT = 0 STGC_OVERWRITE = 1 STGC_ONLYIFCURRENT = 2 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4 STGC_CONSOLIDATE = 8 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypes.h:197:1: */ STGMOVE_MOVE = 0 STGMOVE_COPY = 1 STGMOVE_SHALLOWCOPY = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypes.h:203:1: */ STATFLAG_DEFAULT = 0 STATFLAG_NONAME = 1 STATFLAG_NOOPEN = 2 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypes.h:513: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 ( /* /usr/x86_64-w64-mingw32/include/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 ( /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:233:1: */ MEMCTX_TASK = 1 MEMCTX_SHARED = 2 MEMCTX_MACSYSTEM = 3 MEMCTX_UNKNOWN = -1 MEMCTX_SAME = -2 ) const ( /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:269: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 ( /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:298: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 ( /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:309:1: */ MSHCTX_LOCAL = 0 MSHCTX_NOSHAREDMEM = 1 MSHCTX_DIFFERENTMACHINE = 2 MSHCTX_INPROC = 3 MSHCTX_CROSSCTX = 4 ) type Ptrdiff_t = int64 /* <builtin>:3:26 */ type Size_t = uint64 /* <builtin>:9:23 */ type Wchar_t = uint16 /* <builtin>:15:24 */ type X__int128_t = struct { Flo int64 Fhi int64 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 type X__uint128_t = struct { Flo uint64 Fhi uint64 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ type X__float128 = float64 /* <builtin>:47:21 */ type Va_list = X__builtin_va_list /* <builtin>:50:27 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite // version 3.38.5. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements // of 5% or more are commonly seen when SQLite is compiled as a single // translation unit. // // This file is all you need to compile SQLite. To use SQLite in other // programs, you need this file and the "sqlite3.h" header file that defines // the programming interface to the SQLite library. (If you do not have // the "sqlite3.h" header file at hand, you will find a copy embedded within // the text of this file. Search for "Begin file sqlite3.h" to find the start // of the embedded sqlite3.h header file.) Additional code files may be needed // if you want a wrapper to interface SQLite with your choice of programming // language. The code for the "sqlite3" command-line shell is also in a // separate file. This file contains only code for the core SQLite library. //************* Begin file sqliteInt.h ************************************** // 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. // // Special Comments: // // Some comments have special meaning to the tools that measure test // coverage: // // NO_TEST - The branches on this line are not // measured by branch coverage. This is // used on lines of code that actually // implement parts of coverage testing. // // OPTIMIZATION-IF-TRUE - This branch is allowed to alway be false // and the correct answer is still obtained, // though perhaps more slowly. // // OPTIMIZATION-IF-FALSE - This branch is allowed to alway be true // and the correct answer is still obtained, // though perhaps more slowly. // // PREVENTS-HARMLESS-OVERREAD - This branch prevents a buffer overread // that would be harmless and undetectable // if it did occur. // // In all cases, the special comment must be enclosed in the usual // slash-asterisk...asterisk-slash comment marks, with no spaces between the // asterisks and the comment text. // Make sure the Tcl calling convention macro is defined. This macro is // only used by test code and Tcl integration code. // Include the header file used to customize the compiler options for MSVC. // This should be done first so that it can successfully prevent spurious // compiler warnings due to subsequent content in this file and other files // that are included by this file. //************* Include msvc.h in the middle of sqliteInt.h ***************** //************* Begin file msvc.h ******************************************* // 2015 January 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. // // // // This file contains code that is specific to MSVC. //************* End of msvc.h *********************************************** //************* Continuing where we left off in sqliteInt.h ***************** // Special setup for VxWorks //************* Include vxworks.h in the middle of sqliteInt.h ************** //************* Begin file vxworks.h **************************************** // 2015-03-02 // // 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 code that is specific to Wind River's VxWorks // This is not VxWorks. //************* End of vxworks.h ******************************************** //************* Continuing where we left off in sqliteInt.h ***************** // These #defines should enable >2GB file support on POSIX if the // underlying operating system supports it. If the OS lacks // large file support, or if the OS is windows, these should be no-ops. // // Ticket #2739: The _LARGEFILE_SOURCE macro must appear before any // system #includes. Hence, this block of code must be the very first // code in all source files. // // Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch // on the compiler command line. This is necessary if you are compiling // on a recent machine (ex: Red Hat 7.2) but you want your code to work // on an older machine (ex: Red Hat 6.0). If you compile on Red Hat 7.2 // without this option, LFS is enable. But LFS does not exist in the kernel // in Red Hat 6.0, so the code won't work. Hence, for maximum binary // portability you should omit LFS. // // The previous paragraph was written in 2005. (This paragraph is written // on 2008-11-28.) These days, all Linux kernels support large files, so // you should probably leave LFS enabled. But some embedded platforms might // lack LFS in which case the SQLITE_DISABLE_LFS macro might still be useful. // // Similar is true for Mac OS X. LFS is only supported on Mac OS X 9 and later. // The GCC_VERSION and MSVC_VERSION macros are used to // conditionally include optimizations for each of these compilers. A // value of 0 means that compiler is not being used. The // SQLITE_DISABLE_INTRINSIC macro means do not use any compiler-specific // optimizations, and hence set all compiler macros to 0 // // There was once also a CLANG_VERSION macro. However, we learn that the // version numbers in clang are for "marketing" only and are inconsistent // and unreliable. Fortunately, all versions of clang also recognize the // gcc version numbers and have reasonable settings for gcc version numbers, // so the GCC_VERSION macro will be set to a correct non-zero value even // when compiling with clang. // Some C99 functions in "math.h" are only present for MSVC when its version // is associated with Visual Studio 2013 or higher. // Needed for various definitions... // Macro to disable warnings about missing "break" at the end of a "case". // For MinGW, check to see if we can include the header file containing its // version information, among other things. Normally, this internal MinGW // header file would [only] be included automatically by other MinGW header // files; however, the contained version information is now required by this // header file to work around binary compatibility issues (see below) and // this is the only known way to reliably obtain it. This entire #if block // would be completely unnecessary if there was any other way of detecting // MinGW via their preprocessor (e.g. if they customized their GCC to define // some MinGW-specific macros). When compiling for MinGW, either the // _HAVE_MINGW_H or _HAVE__MINGW_H (note the extra underscore) macro must be // defined; otherwise, detection of conditions specific to MinGW will be // disabled. // For MinGW version 4.x (and higher), check to see if the _USE_32BIT_TIME_T // define is required to maintain binary compatibility with the MSVC runtime // library in use (e.g. for Windows XP). // Optionally #include a user-defined header, whereby compilation options // may be set prior to where they take effect, but after platform setup. // If SQLITE_CUSTOM_INCLUDE=? is defined, its value names the #include // file. // The public SQLite interface. The _FILE_OFFSET_BITS macro must appear // first in QNX. Also, the _USE_32BIT_TIME_T macro must appear first for // MinGW. //************* Include sqlite3.h in the middle of sqliteInt.h ************** //************* Begin file sqlite3.h **************************************** // 2001-09-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 library // presents to client programs. If a C-function, structure, datatype, // or constant definition does not appear in this file, then it is // not a published API of SQLite, is subject to change without // notice, and should not be referenced by programs that use SQLite. // // Some of the definitions that are in this file are marked as // "experimental". Experimental interfaces are normally new // features recently added to SQLite. We do not anticipate changes // to experimental interfaces but reserve the right to make minor changes // if experience from use "in the wild" suggest such changes are prudent. // // The official C-language API documentation for SQLite is derived // from comments in this file. This file is the authoritative source // on how SQLite interfaces are supposed to operate. // // The name of this file under configuration management is "sqlite.h.in". // The makefile makes some minor changes to this file (such as inserting // the version number) and changes its name to "sqlite3.h" as // part of the build process. // 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 <stdarg.h> // Define __gnuc_va_list. type X__gnuc_va_list = X__builtin_va_list /* /usr/x86_64-w64-mingw32/include/stdarg.h:45:27 */ // for backward compatibility // Use GCC builtins // Copyright (C) 1989-2020 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 // <http://www.gnu.org/licenses/>. // ISO C Standard: 7.15 Variable arguments <stdarg.h> // Make sure we can call this stuff from C++. // Facilitate override of interface linkage and calling conventions. // Be aware that these macros may not be used within this particular // translation of the amalgamation and its associated header file. // // The SQLITE_EXTERN and SQLITE_API macros are used to instruct the // compiler that the target identifier should have external linkage. // // The SQLITE_CDECL macro is used to set the calling convention for // public functions that accept a variable number of arguments. // // The SQLITE_APICALL macro is used to set the calling convention for // public functions that accept a fixed number of arguments. // // The SQLITE_STDCALL macro is no longer used and is now deprecated. // // The SQLITE_CALLBACK macro is used to set the calling convention for // function pointers. // // The SQLITE_SYSAPI macro is used to set the calling convention for // functions provided by the operating system. // // Currently, the SQLITE_CDECL, SQLITE_APICALL, SQLITE_CALLBACK, and // SQLITE_SYSAPI macros are used only when building for environments // that require non-default calling conventions. // These no-op macros are used in front of interfaces to mark those // interfaces as either deprecated or experimental. New applications // should not use deprecated interfaces - they are supported for backwards // compatibility only. Application writers should be aware that // experimental interfaces are subject to change in point releases. // // These macros used to resolve to various kinds of compiler magic that // would generate warning messages when they were used. But that // compiler magic ended up generating such a flurry of bug reports // that we have taken it all out and gone back to using simple // noop macros. // Ensure these symbols were not defined by some previous header file. // CAPI3REF: Compile-Time Library Version Numbers // // ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header // evaluates to a string literal that is the SQLite version in the // format "X.Y.Z" where X is the major version number (always 3 for // SQLite3) and Y is the minor version number and Z is the release number.)^ // ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer // with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same // numbers used in [SQLITE_VERSION].)^ // The SQLITE_VERSION_NUMBER for any given release of SQLite will also // be larger than the release from which it is derived. Either Y will // be held constant and Z will be incremented or else Y will be incremented // and Z will be reset to zero. // // Since [version 3.6.18] ([dateof:3.6.18]), // SQLite source code has been stored in the // <a href="http://www.fossil-scm.org/">Fossil configuration management // system</a>. ^The SQLITE_SOURCE_ID macro evaluates to // a string which identifies a particular check-in of SQLite // within its configuration management system. ^The SQLITE_SOURCE_ID // string contains the date and time of the check-in (UTC) and a SHA1 // or SHA3-256 hash of the entire source tree. If the source code has // been edited in any way since it was last checked in, then the last // four hexadecimal digits of the hash may be modified. // // See also: [sqlite3_libversion()], // [sqlite3_libversion_number()], [sqlite3_sourceid()], // [sqlite_version()] and [sqlite_source_id()]. // CAPI3REF: Run-Time Library Version Numbers // KEYWORDS: sqlite3_version sqlite3_sourceid // // These interfaces provide the same information as the [SQLITE_VERSION], // [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros // but are associated with the library instead of the header file. ^(Cautious // programmers might include assert() statements in their application to // verify that values returned by these interfaces match the macros in // the header, and thus ensure that the application is // compiled with matching library and header files. // // // assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER ); // assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 ); // assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 ); // // // ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] // macro. ^The sqlite3_libversion() function returns a pointer to the // to the sqlite3_version[] string constant. The sqlite3_libversion() // function is provided for use in DLLs since DLL users usually do not have // direct access to string constants within the DLL. ^The // sqlite3_libversion_number() function returns an integer equal to // [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns // a pointer to a string constant whose value is the same as the // [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built // using an edited copy of [the amalgamation], then the last four characters // of the hash might be different from [SQLITE_SOURCE_ID].)^ // // See also: [sqlite_version()] and [sqlite_source_id()]. var Xsqlite3_version = *(*[7]int8)(unsafe.Pointer(ts)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:491:23 */ // 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 sqlite3 = 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 FerrByteOffset 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 FeOpenState U8 F__ccgo_pad1 [2]byte FnextPagesize int32 FnChange I64 FnTotalChange I64 FaLimit [12]int32 FnMaxSorterMmap int32 F__ccgo_pad2 [4]byte Finit struct { FnewTnum Pgno FiDb U8 Fbusy U8 F__ccgo_pad1 [2]byte ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */ F__ccgo_pad2 [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 FpAutovacPagesArg uintptr FxAutovacDestr uintptr FxAutovacPages uintptr FpParse uintptr FpPreUpdateArg uintptr FxPreUpdateCallback uintptr FpPreUpdate uintptr FxWalCallback uintptr FpWalArg uintptr FxCollNeeded uintptr FxCollNeeded16 uintptr FpCollNeededArg uintptr FpErr uintptr Fu1 struct { F__ccgo_pad1 [0]uint64 FisInterrupted int32 F__ccgo_pad2 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // 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 Sqlite3 = sqlite3 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:24 */ // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:604:19 */ type Sqlite_uint64 = uint64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:605:28 */ type Sqlite3_int64 = Sqlite_int64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:610:22 */ type Sqlite3_uint64 = Sqlite_uint64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:611: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:667: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. // // Only those flags marked as "Ok for sqlite3_open_v2()" may be // used as the third argument to the [sqlite3_open_v2()] interface. // The other flags have historically been ignored by sqlite3_open_v2(), // though future versions of SQLite might change so that an error is // raised if any of the disallowed bits are passed into sqlite3_open_v2(). // Applications should not depend on the historical behavior. // // Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into // [sqlite3_open_v2()] does *not* cause the underlying database file // to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into // [sqlite3_open_v2()] has historically be a no-op and might become an // error in future versions of SQLite. // 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 = struct{ FpMethods uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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. // // Only those flags marked as "Ok for sqlite3_open_v2()" may be // used as the third argument to the [sqlite3_open_v2()] interface. // The other flags have historically been ignored by sqlite3_open_v2(), // though future versions of SQLite might change so that an error is // raised if any of the disallowed bits are passed into sqlite3_open_v2(). // Applications should not depend on the historical behavior. // // Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into // [sqlite3_open_v2()] does *not* cause the underlying database file // to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into // [sqlite3_open_v2()] has historically be a no-op and might become an // error in future versions of SQLite. // 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_file /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1028:29 */ type sqlite3_io_methods = struct { FiVersion int32 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 // <ul> // <li> [SQLITE_LOCK_NONE], // <li> [SQLITE_LOCK_SHARED], // <li> [SQLITE_LOCK_RESERVED], // <li> [SQLITE_LOCK_PENDING], or // <li> [SQLITE_LOCK_EXCLUSIVE]. // </ul> // 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: // // <ul> // <li> [SQLITE_IOCAP_ATOMIC] // <li> [SQLITE_IOCAP_ATOMIC512] // <li> [SQLITE_IOCAP_ATOMIC1K] // <li> [SQLITE_IOCAP_ATOMIC2K] // <li> [SQLITE_IOCAP_ATOMIC4K] // <li> [SQLITE_IOCAP_ATOMIC8K] // <li> [SQLITE_IOCAP_ATOMIC16K] // <li> [SQLITE_IOCAP_ATOMIC32K] // <li> [SQLITE_IOCAP_ATOMIC64K] // <li> [SQLITE_IOCAP_SAFE_APPEND] // <li> [SQLITE_IOCAP_SEQUENTIAL] // <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN] // <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE] // <li> [SQLITE_IOCAP_IMMUTABLE] // <li> [SQLITE_IOCAP_BATCH_ATOMIC] // </ul> // // 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_methods /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1127:35 */ // 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 = 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 Fchanges64 uintptr Ftotal_changes64 uintptr Fautovacuum_pages uintptr Ferror_offset uintptr Fvtab_rhs_value uintptr Fvtab_distinct uintptr Fvtab_in uintptr Fvtab_in_first uintptr Fvtab_in_next uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1560: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_routines = sqlite3_api_routines /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1560:37 */ // 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: // // <ul> // <li> [SQLITE_OPEN_MAIN_DB] // <li> [SQLITE_OPEN_MAIN_JOURNAL] // <li> [SQLITE_OPEN_TEMP_DB] // <li> [SQLITE_OPEN_TEMP_JOURNAL] // <li> [SQLITE_OPEN_TRANSIENT_DB] // <li> [SQLITE_OPEN_SUBJOURNAL] // <li> [SQLITE_OPEN_SUPER_JOURNAL] // <li> [SQLITE_OPEN_WAL] // </ul>)^ // // 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: // // <ul> // <li> [SQLITE_OPEN_DELETEONCLOSE] // <li> [SQLITE_OPEN_EXCLUSIVE] // </ul> // // 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 <i>not</i> 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 = struct { FiVersion int32 FszOsFile int32 FmxPathname int32 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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: // // <ul> // <li> [SQLITE_OPEN_MAIN_DB] // <li> [SQLITE_OPEN_MAIN_JOURNAL] // <li> [SQLITE_OPEN_TEMP_DB] // <li> [SQLITE_OPEN_TEMP_JOURNAL] // <li> [SQLITE_OPEN_TRANSIENT_DB] // <li> [SQLITE_OPEN_SUBJOURNAL] // <li> [SQLITE_OPEN_SUPER_JOURNAL] // <li> [SQLITE_OPEN_WAL] // </ul>)^ // // 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: // // <ul> // <li> [SQLITE_OPEN_DELETEONCLOSE] // <li> [SQLITE_OPEN_EXCLUSIVE] // </ul> // // 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 <i>not</i> 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_vfs /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1731:28 */ type Sqlite3_syscall_ptr = uintptr /* testdata/sqlite-amalgamation-3380500/sqlite3.c:1732: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_methods = struct { FxMalloc uintptr FxFree uintptr FxRealloc uintptr FxSize uintptr FxRoundup uintptr FxInit uintptr FxShutdown uintptr FpAppData uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:2029: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_methods /* testdata/sqlite-amalgamation-3380500/sqlite3.c:2029: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 objects returned by [sqlite3_vtab_rhs_value()] // 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 = 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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // 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 objects returned by [sqlite3_vtab_rhs_value()] // 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_value /* testdata/sqlite-amalgamation-3380500/sqlite3.c:4675: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 = struct { FpOut uintptr FpFunc uintptr FpMem uintptr FpVdbe uintptr FiOp int32 FisError int32 FskipFlag U8 Fargc U8 F__ccgo_pad1 [6]byte Fargv [1]uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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_context = sqlite3_context /* testdata/sqlite-amalgamation-3380500/sqlite3.c:4689:32 */ // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:6058: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_vtab = struct { FpModule uintptr FnRef int32 F__ccgo_pad1 [4]byte FzErrMsg uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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_vtab /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7243:29 */ type sqlite3_index_info = struct { FnConstraint int32 F__ccgo_pad1 [4]byte FaConstraint uintptr FnOrderBy int32 F__ccgo_pad2 [4]byte FaOrderBy uintptr FaConstraintUsage uintptr FidxNum int32 F__ccgo_pad3 [4]byte FidxStr uintptr FneedToFreeIdxStr int32 ForderByConsumed int32 FestimatedCost float64 FestimatedRows Sqlite3_int64 FidxFlags int32 F__ccgo_pad4 [4]byte FcolUsed Sqlite3_uint64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7244:9 */ type Sqlite3_index_info = sqlite3_index_info /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7244:35 */ type sqlite3_vtab_cursor = struct{ FpVtab uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7245:9 */ type Sqlite3_vtab_cursor = sqlite3_vtab_cursor /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7245:36 */ type sqlite3_module = struct { FiVersion int32 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Sqlite3_module = sqlite3_module /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7246: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: // // <blockquote>column OP expr</blockquote> // // 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 F__ccgo_pad1 [2]byte FiTermOffset int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7244: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: // // <blockquote>column OP expr</blockquote> // // 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 F__ccgo_pad1 [3]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7244: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: // // <blockquote>column OP expr</blockquote> // // 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 F__ccgo_pad1 [3]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:7244: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): // // <ul> // <li> [sqlite3_mutex_alloc()] </li> // <li> [sqlite3_mutex_free()] </li> // <li> [sqlite3_mutex_enter()] </li> // <li> [sqlite3_mutex_try()] </li> // <li> [sqlite3_mutex_leave()] </li> // <li> [sqlite3_mutex_held()] </li> // <li> [sqlite3_mutex_notheld()] </li> // </ul>)^ // // 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 = struct { FxMutexInit uintptr FxMutexEnd uintptr FxMutexAlloc uintptr FxMutexFree uintptr FxMutexEnter uintptr FxMutexTry uintptr FxMutexLeave uintptr FxMutexHeld uintptr FxMutexNotheld uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:8110: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): // // <ul> // <li> [sqlite3_mutex_alloc()] </li> // <li> [sqlite3_mutex_free()] </li> // <li> [sqlite3_mutex_enter()] </li> // <li> [sqlite3_mutex_try()] </li> // <li> [sqlite3_mutex_leave()] </li> // <li> [sqlite3_mutex_held()] </li> // <li> [sqlite3_mutex_notheld()] </li> // </ul>)^ // // 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_methods /* testdata/sqlite-amalgamation-3380500/sqlite3.c:8110: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: // <ol> // <li> ^The sqlite3_str object is created using [sqlite3_str_new()]. // <li> ^Text is appended to the sqlite3_str object using various // methods, such as [sqlite3_str_appendf()]. // <li> ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // </ol> type sqlite3_str = struct { Fdb uintptr FzText uintptr FnAlloc U32 FmxAlloc U32 FnChar U32 FaccError U8 FprintfFlags U8 F__ccgo_pad1 [2]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:8374:9 */ // 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: // <ol> // <li> ^The sqlite3_str object is created using [sqlite3_str_new()]. // <li> ^Text is appended to the sqlite3_str object using various // methods, such as [sqlite3_str_appendf()]. // <li> ^The sqlite3_str object is destroyed and the string it created // is returned using the [sqlite3_str_finish()] interface. // </ol> type Sqlite3_str = sqlite3_str /* testdata/sqlite-amalgamation-3380500/sqlite3.c:8374:28 */ // 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 = struct { FpBuf uintptr FpExtra uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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_page /* testdata/sqlite-amalgamation-3380500/sqlite3.c:8879: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: // // <table border=1 width=85% align=center> // <tr><th> createFlag <th> Behavior when page is not already in cache // <tr><td> 0 <td> Do not allocate a new page. Return NULL. // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so. // Otherwise return NULL. // <tr><td> 2 <td> Make every effort to allocate a new page. Only return // NULL if allocating a new page is effectively impossible. // </table> // // ^(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 = struct { FiVersion int32 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:9044: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: // // <table border=1 width=85% align=center> // <tr><th> createFlag <th> Behavior when page is not already in cache // <tr><td> 0 <td> Do not allocate a new page. Return NULL. // <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so. // Otherwise return NULL. // <tr><td> 2 <td> Make every effort to allocate a new page. Only return // NULL if allocating a new page is effectively impossible. // </table> // // ^(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_methods2 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:9044: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_methods = struct { FpArg uintptr FxInit uintptr FxShutdown uintptr FxCreate uintptr FxCachesize uintptr FxPagecount uintptr FxFetch uintptr FxUnpin uintptr FxRekey uintptr FxTruncate uintptr FxDestroy uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:9067: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_methods /* testdata/sqlite-amalgamation-3380500/sqlite3.c:9067:39 */ // CAPI3REF: Online Backup Object // // The sqlite3_backup object records state information about an ongoing // online backup operation. ^The sqlite3_backup object is created by // a call to [sqlite3_backup_init()] and is destroyed by a call to // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] type sqlite3_backup = struct { FpDestDb uintptr FpDest uintptr FiDestSchema U32 FbDestLocked int32 FiNext Pgno F__ccgo_pad1 [4]byte FpSrcDb uintptr FpSrc uintptr Frc int32 FnRemaining Pgno FnPagecount Pgno FisAttached int32 FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // CAPI3REF: Online Backup Object // // The sqlite3_backup object records state information about an ongoing // online backup operation. ^The sqlite3_backup object is created by // a call to [sqlite3_backup_init()] and is destroyed by a call to // [sqlite3_backup_finish()]. // // See Also: [Using the SQLite Online Backup API] type Sqlite3_backup = sqlite3_backup /* testdata/sqlite-amalgamation-3380500/sqlite3.c:9093:31 */ // 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 = struct{ Fhidden [48]uint8 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10385: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_snapshot /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10387: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_geometry = struct { FpContext uintptr FnParam int32 F__ccgo_pad1 [4]byte FaParam uintptr FpUser uintptr FxDelUser uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10716: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_geometry /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10716:39 */ type sqlite3_rtree_query_info = struct { FpContext uintptr FnParam int32 F__ccgo_pad1 [4]byte FaParam uintptr FpUser uintptr FxDelUser uintptr FaCoord uintptr FanQueue uintptr FnCoord int32 FiLevel int32 FmxLevel int32 F__ccgo_pad2 [4]byte FiRowid Sqlite3_int64 FrParentScore Sqlite3_rtree_dbl FeParentWithin int32 FeWithin int32 FrScore Sqlite3_rtree_dbl FapSqlParam uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10717:9 */ type Sqlite3_rtree_query_info = sqlite3_rtree_query_info /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10717:41 */ // The double-precision datatype used by RTree depends on the // SQLITE_RTREE_INT_ONLY compile-time option. type Sqlite3_rtree_dbl = float64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10725:18 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. //******* End of sqlite3rtree.h ******** //******* Begin file sqlite3session.h ******** // Make sure we can call this stuff from C++. // CAPI3REF: Session Object Handle // // An instance of this object is a [session] that can be used to // record changes to a database. type sqlite3_session = struct { Fdb uintptr FzDb uintptr FbEnableSize int32 FbEnable int32 FbIndirect int32 FbAutoAttach int32 Frc int32 F__ccgo_pad1 [4]byte FpFilterCtx uintptr FxTableFilter uintptr FnMalloc I64 FnMaxChangesetSize I64 FpZeroBlob uintptr FpNext uintptr FpTable uintptr Fhook SessionHook } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10832:9 */ // Allowed values for sqlite3_rtree_query.eWithin and .eParentWithin. //******* End of sqlite3rtree.h ******** //******* Begin file sqlite3session.h ******** // Make sure we can call this stuff from C++. // CAPI3REF: Session Object Handle // // An instance of this object is a [session] that can be used to // record changes to a database. type Sqlite3_session = sqlite3_session /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10832:32 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. type sqlite3_changeset_iter = struct { Fin SessionInput Ftblhdr SessionBuffer FbPatchset int32 FbInvert int32 FbSkipEmpty int32 Frc int32 FpConflict uintptr FzTab uintptr FnCol int32 Fop int32 FbIndirect int32 F__ccgo_pad1 [4]byte FabPK uintptr FapValue uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10840:9 */ // CAPI3REF: Changeset Iterator Handle // // An instance of this object acts as a cursor for iterating // over the elements of a [changeset] or [patchset]. type Sqlite3_changeset_iter = sqlite3_changeset_iter /* testdata/sqlite-amalgamation-3380500/sqlite3.c:10840:39 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] type sqlite3_changegroup = struct { Frc int32 FbPatch int32 FpList uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:11692:9 */ // CAPI3REF: Changegroup Handle // // A changegroup is an object used to combine two or more // [changesets] or [patchsets] type Sqlite3_changegroup = sqlite3_changegroup /* testdata/sqlite-amalgamation-3380500/sqlite3.c:11692:36 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // // The following flags may passed via the 9th parameter to // [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]: // // <dl> // <dt>SQLITE_CHANGESETAPPLY_NOSAVEPOINT <dd> // Usually, the sessions module encloses all operations performed by // a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The // SAVEPOINT is committed if the changeset or patchset is successfully // applied, or rolled back if an error occurs. Specifying this flag // causes the sessions module to omit this savepoint. In this case, if the // caller has an open transaction or savepoint when apply_v2() is called, // it may revert the partially applied changeset by rolling it back. // // <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> // Invert the changeset before applying it. This is equivalent to inverting // a changeset using sqlite3changeset_invert() before applying it. It is // an error to specify this flag with a patchset. // CAPI3REF: Constants Passed To The Conflict Handler // // Values that may be passed as the second argument to a conflict-handler. // // <dl> // <dt>SQLITE_CHANGESET_DATA<dd> // The conflict handler is invoked with CHANGESET_DATA as the second argument // when processing a DELETE or UPDATE change if a row with the required // PRIMARY KEY fields is present in the database, but one or more other // (non primary-key) fields modified by the update do not contain the // expected "before" values. // // The conflicting row, in this case, is the database row with the matching // primary key. // // <dt>SQLITE_CHANGESET_NOTFOUND<dd> // The conflict handler is invoked with CHANGESET_NOTFOUND as the second // argument when processing a DELETE or UPDATE change if a row with the // required PRIMARY KEY fields is not present in the database. // // There is no conflicting row in this case. The results of invoking the // sqlite3changeset_conflict() API are undefined. // // <dt>SQLITE_CHANGESET_CONFLICT<dd> // CHANGESET_CONFLICT is passed as the second argument to the conflict // handler while processing an INSERT change if the operation would result // in duplicate primary key values. // // The conflicting row in this case is the database row with the matching // primary key. // // <dt>SQLITE_CHANGESET_FOREIGN_KEY<dd> // If foreign key handling is enabled, and applying a changeset leaves the // database in a state containing foreign key violations, the conflict // handler is invoked with CHANGESET_FOREIGN_KEY as the second argument // exactly once before the changeset is committed. If the conflict handler // returns CHANGESET_OMIT, the changes, including those that caused the // foreign key constraint violation, are committed. Or, if it returns // CHANGESET_ABORT, the changeset is rolled back. // // No current or conflicting row information is provided. The only function // it is possible to call on the supplied sqlite3_changeset_iter handle // is sqlite3changeset_fk_conflicts(). // // <dt>SQLITE_CHANGESET_CONSTRAINT<dd> // If any other constraint violation occurs while applying a change (i.e. // a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is // invoked with CHANGESET_CONSTRAINT as the second argument. // // There is no conflicting row in this case. The results of invoking the // sqlite3changeset_conflict() API are undefined. // // </dl> // CAPI3REF: Constants Returned By The Conflict Handler // // A conflict handler callback must return one of the following three values. // // <dl> // <dt>SQLITE_CHANGESET_OMIT<dd> // If a conflict handler returns this value no special action is taken. The // change that caused the conflict is not applied. The session module // continues to the next change in the changeset. // // <dt>SQLITE_CHANGESET_REPLACE<dd> // This value may only be returned if the second argument to the conflict // handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this // is not the case, any changes applied so far are rolled back and the // call to sqlite3changeset_apply() returns SQLITE_MISUSE. // // If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict // handler, then the conflicting row is either updated or deleted, depending // on the type of change. // // If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict // handler, then the conflicting row is removed from the database and a // second attempt to apply the change is made. If this second attempt fails, // the original row is restored to the database before continuing. // // <dt>SQLITE_CHANGESET_ABORT<dd> // If this value is returned, any changes applied so far are rolled back // and the call to sqlite3changeset_apply() returns SQLITE_ABORT. // </dl> // CAPI3REF: Rebasing changesets // EXPERIMENTAL // // Suppose there is a site hosting a database in state S0. And that // modifications are made that move that database to state S1 and a // changeset recorded (the "local" changeset). Then, a changeset based // on S0 is received from another site (the "remote" changeset) and // applied to the database. The database is then in state // (S1+"remote"), where the exact state depends on any conflict // resolution decisions (OMIT or REPLACE) made while applying "remote". // Rebasing a changeset is to update it to take those conflict // resolution decisions into account, so that the same conflicts // do not have to be resolved elsewhere in the network. // // For example, if both the local and remote changesets contain an // INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)": // // local: INSERT INTO t1 VALUES(1, 'v1'); // remote: INSERT INTO t1 VALUES(1, 'v2'); // // and the conflict resolution is REPLACE, then the INSERT change is // removed from the local changeset (it was overridden). Or, if the // conflict resolution was "OMIT", then the local changeset is modified // to instead contain: // // UPDATE t1 SET b = 'v2' WHERE a=1; // // Changes within the local changeset are rebased as follows: // // <dl> // <dt>Local INSERT<dd> // This may only conflict with a remote INSERT. If the conflict // resolution was OMIT, then add an UPDATE change to the rebased // changeset. Or, if the conflict resolution was REPLACE, add // nothing to the rebased changeset. // // <dt>Local DELETE<dd> // This may conflict with a remote UPDATE or DELETE. In both cases the // only possible resolution is OMIT. If the remote operation was a // DELETE, then add no change to the rebased changeset. If the remote // operation was an UPDATE, then the old.* fields of change are updated // to reflect the new.* values in the UPDATE. // // <dt>Local UPDATE<dd> // This may conflict with a remote UPDATE or DELETE. If it conflicts // with a DELETE, and the conflict resolution was OMIT, then the update // is changed into an INSERT. Any undefined values in the new.* record // from the update change are filled in using the old.* values from // the conflicting DELETE. Or, if the conflict resolution was REPLACE, // the UPDATE change is simply omitted from the rebased changeset. // // If conflict is with a remote UPDATE and the resolution is OMIT, then // the old.* values are rebased using the new.* values in the remote // change. Or, if the resolution is REPLACE, then the change is copied // into the rebased changeset with updates to columns also updated by // the conflicting remote UPDATE removed. If this means no columns would // be updated, the change is omitted. // </dl> // // A local change may be rebased against multiple remote changes // simultaneously. If a single key is modified by multiple remote // changesets, they are combined as follows before the local changeset // is rebased: // // <ul> // <li> If there has been one or more REPLACE resolutions on a // key, it is rebased according to a REPLACE. // // <li> If there have been no REPLACE resolutions on a key, then // the local changeset is rebased according to the most recent // of the OMIT resolutions. // </ul> // // Note that conflict resolutions from multiple remote changesets are // combined on a per-field basis, not per-row. This means that in the // case of multiple remote UPDATE operations, some fields of a single // local change may be rebased for REPLACE while others are rebased for // OMIT. // // In order to rebase a local changeset, the remote changeset must first // be applied to the local database using sqlite3changeset_apply_v2() and // the buffer of rebase information captured. Then: // // <ol> // <li> An sqlite3_rebaser object is created by calling // sqlite3rebaser_create(). // <li> The new object is configured with the rebase buffer obtained from // sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure(). // If the local changeset is to be rebased against multiple remote // changesets, then sqlite3rebaser_configure() should be called // multiple times, in the same order that the multiple // sqlite3changeset_apply_v2() calls were made. // <li> Each local changeset is rebased by calling sqlite3rebaser_rebase(). // <li> The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // </ol> type sqlite3_rebaser = struct{ Fgrp Sqlite3_changegroup } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12256:9 */ // CAPI3REF: Flags for sqlite3changeset_apply_v2 // // The following flags may passed via the 9th parameter to // [sqlite3changeset_apply_v2] and [sqlite3changeset_apply_v2_strm]: // // <dl> // <dt>SQLITE_CHANGESETAPPLY_NOSAVEPOINT <dd> // Usually, the sessions module encloses all operations performed by // a single call to apply_v2() or apply_v2_strm() in a [SAVEPOINT]. The // SAVEPOINT is committed if the changeset or patchset is successfully // applied, or rolled back if an error occurs. Specifying this flag // causes the sessions module to omit this savepoint. In this case, if the // caller has an open transaction or savepoint when apply_v2() is called, // it may revert the partially applied changeset by rolling it back. // // <dt>SQLITE_CHANGESETAPPLY_INVERT <dd> // Invert the changeset before applying it. This is equivalent to inverting // a changeset using sqlite3changeset_invert() before applying it. It is // an error to specify this flag with a patchset. // CAPI3REF: Constants Passed To The Conflict Handler // // Values that may be passed as the second argument to a conflict-handler. // // <dl> // <dt>SQLITE_CHANGESET_DATA<dd> // The conflict handler is invoked with CHANGESET_DATA as the second argument // when processing a DELETE or UPDATE change if a row with the required // PRIMARY KEY fields is present in the database, but one or more other // (non primary-key) fields modified by the update do not contain the // expected "before" values. // // The conflicting row, in this case, is the database row with the matching // primary key. // // <dt>SQLITE_CHANGESET_NOTFOUND<dd> // The conflict handler is invoked with CHANGESET_NOTFOUND as the second // argument when processing a DELETE or UPDATE change if a row with the // required PRIMARY KEY fields is not present in the database. // // There is no conflicting row in this case. The results of invoking the // sqlite3changeset_conflict() API are undefined. // // <dt>SQLITE_CHANGESET_CONFLICT<dd> // CHANGESET_CONFLICT is passed as the second argument to the conflict // handler while processing an INSERT change if the operation would result // in duplicate primary key values. // // The conflicting row in this case is the database row with the matching // primary key. // // <dt>SQLITE_CHANGESET_FOREIGN_KEY<dd> // If foreign key handling is enabled, and applying a changeset leaves the // database in a state containing foreign key violations, the conflict // handler is invoked with CHANGESET_FOREIGN_KEY as the second argument // exactly once before the changeset is committed. If the conflict handler // returns CHANGESET_OMIT, the changes, including those that caused the // foreign key constraint violation, are committed. Or, if it returns // CHANGESET_ABORT, the changeset is rolled back. // // No current or conflicting row information is provided. The only function // it is possible to call on the supplied sqlite3_changeset_iter handle // is sqlite3changeset_fk_conflicts(). // // <dt>SQLITE_CHANGESET_CONSTRAINT<dd> // If any other constraint violation occurs while applying a change (i.e. // a UNIQUE, CHECK or NOT NULL constraint), the conflict handler is // invoked with CHANGESET_CONSTRAINT as the second argument. // // There is no conflicting row in this case. The results of invoking the // sqlite3changeset_conflict() API are undefined. // // </dl> // CAPI3REF: Constants Returned By The Conflict Handler // // A conflict handler callback must return one of the following three values. // // <dl> // <dt>SQLITE_CHANGESET_OMIT<dd> // If a conflict handler returns this value no special action is taken. The // change that caused the conflict is not applied. The session module // continues to the next change in the changeset. // // <dt>SQLITE_CHANGESET_REPLACE<dd> // This value may only be returned if the second argument to the conflict // handler was SQLITE_CHANGESET_DATA or SQLITE_CHANGESET_CONFLICT. If this // is not the case, any changes applied so far are rolled back and the // call to sqlite3changeset_apply() returns SQLITE_MISUSE. // // If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_DATA conflict // handler, then the conflicting row is either updated or deleted, depending // on the type of change. // // If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict // handler, then the conflicting row is removed from the database and a // second attempt to apply the change is made. If this second attempt fails, // the original row is restored to the database before continuing. // // <dt>SQLITE_CHANGESET_ABORT<dd> // If this value is returned, any changes applied so far are rolled back // and the call to sqlite3changeset_apply() returns SQLITE_ABORT. // </dl> // CAPI3REF: Rebasing changesets // EXPERIMENTAL // // Suppose there is a site hosting a database in state S0. And that // modifications are made that move that database to state S1 and a // changeset recorded (the "local" changeset). Then, a changeset based // on S0 is received from another site (the "remote" changeset) and // applied to the database. The database is then in state // (S1+"remote"), where the exact state depends on any conflict // resolution decisions (OMIT or REPLACE) made while applying "remote". // Rebasing a changeset is to update it to take those conflict // resolution decisions into account, so that the same conflicts // do not have to be resolved elsewhere in the network. // // For example, if both the local and remote changesets contain an // INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)": // // local: INSERT INTO t1 VALUES(1, 'v1'); // remote: INSERT INTO t1 VALUES(1, 'v2'); // // and the conflict resolution is REPLACE, then the INSERT change is // removed from the local changeset (it was overridden). Or, if the // conflict resolution was "OMIT", then the local changeset is modified // to instead contain: // // UPDATE t1 SET b = 'v2' WHERE a=1; // // Changes within the local changeset are rebased as follows: // // <dl> // <dt>Local INSERT<dd> // This may only conflict with a remote INSERT. If the conflict // resolution was OMIT, then add an UPDATE change to the rebased // changeset. Or, if the conflict resolution was REPLACE, add // nothing to the rebased changeset. // // <dt>Local DELETE<dd> // This may conflict with a remote UPDATE or DELETE. In both cases the // only possible resolution is OMIT. If the remote operation was a // DELETE, then add no change to the rebased changeset. If the remote // operation was an UPDATE, then the old.* fields of change are updated // to reflect the new.* values in the UPDATE. // // <dt>Local UPDATE<dd> // This may conflict with a remote UPDATE or DELETE. If it conflicts // with a DELETE, and the conflict resolution was OMIT, then the update // is changed into an INSERT. Any undefined values in the new.* record // from the update change are filled in using the old.* values from // the conflicting DELETE. Or, if the conflict resolution was REPLACE, // the UPDATE change is simply omitted from the rebased changeset. // // If conflict is with a remote UPDATE and the resolution is OMIT, then // the old.* values are rebased using the new.* values in the remote // change. Or, if the resolution is REPLACE, then the change is copied // into the rebased changeset with updates to columns also updated by // the conflicting remote UPDATE removed. If this means no columns would // be updated, the change is omitted. // </dl> // // A local change may be rebased against multiple remote changes // simultaneously. If a single key is modified by multiple remote // changesets, they are combined as follows before the local changeset // is rebased: // // <ul> // <li> If there has been one or more REPLACE resolutions on a // key, it is rebased according to a REPLACE. // // <li> If there have been no REPLACE resolutions on a key, then // the local changeset is rebased according to the most recent // of the OMIT resolutions. // </ul> // // Note that conflict resolutions from multiple remote changesets are // combined on a per-field basis, not per-row. This means that in the // case of multiple remote UPDATE operations, some fields of a single // local change may be rebased for REPLACE while others are rebased for // OMIT. // // In order to rebase a local changeset, the remote changeset must first // be applied to the local database using sqlite3changeset_apply_v2() and // the buffer of rebase information captured. Then: // // <ol> // <li> An sqlite3_rebaser object is created by calling // sqlite3rebaser_create(). // <li> The new object is configured with the rebase buffer obtained from // sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure(). // If the local changeset is to be rebased against multiple remote // changesets, then sqlite3rebaser_configure() should be called // multiple times, in the same order that the multiple // sqlite3changeset_apply_v2() calls were made. // <li> Each local changeset is rebased by calling sqlite3rebaser_rebase(). // <li> The sqlite3_rebaser object is deleted by calling // sqlite3rebaser_delete(). // </ol> type Sqlite3_rebaser = sqlite3_rebaser /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12256:32 */ // CAPI3REF: Values for sqlite3session_config(). // Make sure we can call this stuff from C++. //******* 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 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12572:9 */ // CAPI3REF: Values for sqlite3session_config(). // Make sure we can call this stuff from C++. //******* 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12572:33 */ type Fts5PhraseIter1 = struct { Fa uintptr Fb uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12574:9 */ type Fts5PhraseIter = Fts5PhraseIter1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12574:31 */ type Fts5_extension_function = uintptr /* testdata/sqlite-amalgamation-3380500/sqlite3.c:12576:14 */ type fts5_tokenizer = struct { FxCreate uintptr FxDelete uintptr FxTokenize uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13035:9 */ type Fts5_tokenizer = fts5_tokenizer /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13035: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_api = struct { FiVersion int32 F__ccgo_pad1 [4]byte FxCreateTokenizer uintptr FxFindTokenizer uintptr FxCreateFunction uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13071: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_api /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13071:25 */ type Ssize_t = int64 /* /usr/x86_64-w64-mingw32/include/corecrt.h:50:35 */ type Rsize_t = Size_t /* /usr/x86_64-w64-mingw32/include/corecrt.h:57:16 */ type Intptr_t = int64 /* /usr/x86_64-w64-mingw32/include/corecrt.h:67:35 */ type Uintptr_t = uint64 /* /usr/x86_64-w64-mingw32/include/corecrt.h:80:44 */ type Wint_t = uint16 /* /usr/x86_64-w64-mingw32/include/corecrt.h:111:24 */ type Wctype_t = uint16 /* /usr/x86_64-w64-mingw32/include/corecrt.h:112:24 */ type Errno_t = int32 /* /usr/x86_64-w64-mingw32/include/corecrt.h:118:13 */ type X__time32_t = int32 /* /usr/x86_64-w64-mingw32/include/corecrt.h:123:14 */ type X__time64_t = int64 /* /usr/x86_64-w64-mingw32/include/corecrt.h:128:35 */ type Time_t = X__time64_t /* /usr/x86_64-w64-mingw32/include/corecrt.h:143: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 } /* /usr/x86_64-w64-mingw32/include/corecrt.h:435:1 */ type Pthreadlocinfo = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt.h:437:39 */ type Pthreadmbcinfo = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt.h:438:36 */ type localeinfo_struct = struct { Flocinfo Pthreadlocinfo Fmbcinfo Pthreadmbcinfo } /* /usr/x86_64-w64-mingw32/include/corecrt.h:441:9 */ type X_locale_tstruct = localeinfo_struct /* /usr/x86_64-w64-mingw32/include/corecrt.h:444:3 */ type X_locale_t = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt.h:444:19 */ type tagLC_ID = struct { FwLanguage uint16 FwCountry uint16 FwCodePage uint16 } /* /usr/x86_64-w64-mingw32/include/corecrt.h:435:1 */ type LC_ID = tagLC_ID /* /usr/x86_64-w64-mingw32/include/corecrt.h:452:3 */ type LPLC_ID = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt.h:452:9 */ type Threadlocinfo = threadlocaleinfostruct /* /usr/x86_64-w64-mingw32/include/corecrt.h:487: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 _SETJMP_FLOAT128 = struct{ FPart [2]uint64 } /* /usr/x86_64-w64-mingw32/include/setjmp.h:112: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. type SETJMP_FLOAT128 = _SETJMP_FLOAT128 /* /usr/x86_64-w64-mingw32/include/setjmp.h:114:5 */ type X_JBTYPE = SETJMP_FLOAT128 /* /usr/x86_64-w64-mingw32/include/setjmp.h:117:27 */ type _JUMP_BUFFER = 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 } /* /usr/x86_64-w64-mingw32/include/setjmp.h:119:11 */ type X_JUMP_BUFFER = _JUMP_BUFFER /* /usr/x86_64-w64-mingw32/include/setjmp.h:142:5 */ type Jmp_buf = [16]X_JBTYPE /* /usr/x86_64-w64-mingw32/include/setjmp.h:199:19 */ // ISO C Standard: 7.17 Common definitions <stddef.h> // 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, <type/vxTypesBase.h> 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 } /* /usr/x86_64-w64-mingw32/include/stddef.h:427:3 */ // Copyright (C) 1992-2020 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 // <http://www.gnu.org/licenses/>. // 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-2020 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 // <http://www.gnu.org/licenses/>. // 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 X_onexit_t = uintptr /* /usr/x86_64-w64-mingw32/include/stdlib.h:50:15 */ type _div_t = struct { Fquot int32 Frem int32 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:60:11 */ type Div_t = _div_t /* /usr/x86_64-w64-mingw32/include/stdlib.h:63:5 */ type _ldiv_t = struct { Fquot int32 Frem int32 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:65:11 */ type Ldiv_t = _ldiv_t /* /usr/x86_64-w64-mingw32/include/stdlib.h:68:5 */ type X_LDOUBLE = struct{ Fld [10]uint8 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:77:5 */ type X_CRT_DOUBLE = struct{ Fx float64 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:84:5 */ type X_CRT_FLOAT = struct{ Ff float32 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:88:5 */ type X_LONGDOUBLE = struct{ Fx float64 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:95:5 */ type X_LDBL12 = struct{ Fld12 [12]uint8 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:102:5 */ type X_purecall_handler = uintptr /* /usr/x86_64-w64-mingw32/include/stdlib.h:143:16 */ type X_invalid_parameter_handler = uintptr /* /usr/x86_64-w64-mingw32/include/stdlib.h:148:16 */ type Lldiv_t = struct { Fquot int64 Frem int64 } /* /usr/x86_64-w64-mingw32/include/stdlib.h:727: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/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 X_HEAPINFO = _heapinfo /* /usr/x86_64-w64-mingw32/include/malloc.h:50:5 */ // On LP64 systems, longs are 64-bit. Use the appropriate rotate // function. // For including AVX instructions // Copyright (C) 2008-2020 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 // <http://www.gnu.org/licenses/>. // Copyright (C) 2002-2020 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 // <http://www.gnu.org/licenses/>. // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 9.0. // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m64 = [2]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:44:13 */ // Unaligned version of the same type type X__m64_u = [2]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:47:13 */ // Internal data types for implementing the intrinsics. type X__v2si = [2]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:50:13 */ type X__v4hi = [4]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:51:15 */ type X__v8qi = [8]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:52:14 */ type X__v1di = [1]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:53:19 */ type X__v2sf = [2]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/mmintrin.h:54:15 */ // Loads one cache line from address P to a location "closer" to the // processor. The selector I specifies the type of prefetch operation. // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m128 = [4]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:69:15 */ // Unaligned version of the same type. type X__m128_u = [4]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:72:15 */ // Internal data types for implementing the intrinsics. type X__v4sf = [4]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/xmmintrin.h:75:15 */ // Transpose the 4x4 matrix composed of row[0-3]. // For backward source compatibility. // Copyright (C) 2003-2020 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 // <http://www.gnu.org/licenses/>. // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 9.0. // We need definitions from the SSE header files // Copyright (C) 2002-2020 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 // <http://www.gnu.org/licenses/>. // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 9.0. // SSE2 type X__v2df = [2]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:40:16 */ type X__v2di = [2]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:41:19 */ type X__v2du = [2]uint64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:42:28 */ type X__v4si = [4]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:43:13 */ type X__v4su = [4]uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:44:22 */ type X__v8hi = [8]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:45:15 */ type X__v8hu = [8]uint16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:46:24 */ type X__v16qi = [16]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:47:14 */ type X__v16qs = [16]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:48:21 */ type X__v16qu = [16]uint8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:49:23 */ // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m128i = [2]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:53:19 */ type X__m128d = [2]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:54:16 */ // Unaligned version of the same types. type X__m128i_u = [2]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:57:19 */ type X__m128d_u = [2]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/emmintrin.h:58:16 */ // Copyright (C) 2008-2020 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 // <http://www.gnu.org/licenses/>. // Implemented from the specification included in the Intel C++ Compiler // User Guide and Reference, version 11.0. // Internal data types for implementing the intrinsics. type X__v4df = [4]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:41:16 */ type X__v8sf = [8]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:42:15 */ type X__v4di = [4]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:43:19 */ type X__v4du = [4]uint64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:44:28 */ type X__v8si = [8]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:45:13 */ type X__v8su = [8]uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:46:22 */ type X__v16hi = [16]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:47:15 */ type X__v16hu = [16]uint16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:48:24 */ type X__v32qi = [32]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:49:14 */ type X__v32qs = [32]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:50:21 */ type X__v32qu = [32]uint8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:51:23 */ // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m256 = [8]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:55:15 */ type X__m256i = [4]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:57:19 */ type X__m256d = [4]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:59:16 */ // Unaligned version of the same types. type X__m256_u = [8]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:63:15 */ type X__m256i_u = [4]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:66:19 */ type X__m256d_u = [4]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avxintrin.h:69:16 */ // Copyright (C) 2013-2020 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 // <http://www.gnu.org/licenses/>. // Internal data types for implementing the intrinsics. type X__v8df = [8]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:38:16 */ type X__v16sf = [16]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:39:15 */ type X__v8di = [8]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:40:19 */ type X__v8du = [8]uint64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:41:28 */ type X__v16si = [16]int32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:42:13 */ type X__v16su = [16]uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:43:22 */ type X__v32hi = [32]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:44:15 */ type X__v32hu = [32]uint16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:45:24 */ type X__v64qi = [64]int8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:46:14 */ type X__v64qu = [64]uint8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:47:23 */ // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m512 = [16]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:51:15 */ type X__m512i = [8]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:52:19 */ type X__m512d = [8]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:53:16 */ // Unaligned version of the same type. type X__m512_u = [16]float32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:56:15 */ type X__m512i_u = [8]int64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:57:19 */ type X__m512d_u = [8]float64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:58:16 */ type X__mmask8 = uint8 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:60:24 */ type X__mmask16 = uint16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:61:24 */ type X_MM_PERM_ENUM = uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:4359:3 */ // Constants for mantissa extraction type X_MM_MANTISSA_NORM_ENUM = uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:8692:3 */ type X_MM_MANTISSA_SIGN_ENUM = uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512fintrin.h:8699:3 */ // Copyright (C) 2014-2020 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 // <http://www.gnu.org/licenses/>. // Internal data types for implementing the intrinsics. type X__mmask32 = uint32 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512vlintrin.h:38:22 */ type X__mmask64 = uint64 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bwintrin.h:41:28 */ // Copyright (C) 2019-2020 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 // <http://www.gnu.org/licenses/>. // Internal data types for implementing the intrinsics. type X__v16bh = [16]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16vlintrin.h:38:15 */ type X__v8bh = [8]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16vlintrin.h:39:15 */ // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m256bh = [16]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16vlintrin.h:43:15 */ type X__m128bh = [8]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16vlintrin.h:44:15 */ // Copyright (C) 2019-2020 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 // <http://www.gnu.org/licenses/>. // Internal data types for implementing the intrinsics. type X__v32bh = [32]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16intrin.h:38:15 */ // The Intel API is flexible enough that we must allow aliasing with other // vector types, and their scalar components. type X__m512bh = [32]int16 /* /usr/lib/gcc/x86_64-w64-mingw32/10-win32/include/avx512bf16intrin.h:42:15 */ // The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. // 0 means mutexes are permanently disable and the library is never // threadsafe. 1 means the library is serialized which is the highest // level of threadsafety. 2 means the library is multithreaded - multiple // threads can use SQLite as long as no two threads try to use the same // database connection at the same time. // // Older versions of SQLite used an optional THREADSAFE macro. // We support that for legacy. // // To ensure that the correct value of "THREADSAFE" is reported when querying // for compile-time options at runtime (e.g. "PRAGMA compile_options"), this // logic is partially replicated in ctime.c. If it is updated here, it should // also be updated there. // Powersafe overwrite is on by default. But can be turned off using // the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option. // EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by // default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in // which case memory allocation statistics are disabled by default. // Exactly one of the following macros must be defined in order to // specify which memory allocation subsystem to use. // // SQLITE_SYSTEM_MALLOC // Use normal system malloc() // SQLITE_WIN32_MALLOC // Use Win32 native heap API // SQLITE_ZERO_MALLOC // Use a stub allocator that always fails // SQLITE_MEMDEBUG // Debugging version of system malloc() // // On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the // assert() macro is enabled, each call into the Win32 native heap subsystem // will cause HeapValidate to be called. If heap validation should fail, an // assertion will be triggered. // // If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as // the default. // If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the // sizes of memory allocations below this value where possible. // We need to define _XOPEN_SOURCE as follows in order to enable // recursive mutexes on most Unix systems and fchmod() on OpenBSD. // But _XOPEN_SOURCE define causes problems for Mac OS X, so omit // it. // NDEBUG and SQLITE_DEBUG are opposites. It should always be true that // defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true, // make it true by defining or undefining NDEBUG. // // Setting NDEBUG makes the code smaller and faster by disabling the // assert() statements in the code. So we want the default action // to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG // is set. Thus NDEBUG becomes an opt-in rather than an opt-out // feature. // Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on. // The testcase() macro is used to aid in coverage testing. When // doing coverage testing, the condition inside the argument to // testcase() must be evaluated both true and false in order to // get full branch coverage. The testcase() macro is inserted // to help ensure adequate test coverage in places where simple // condition/decision coverage is inadequate. For example, testcase() // can be used to make sure boundary values are tested. For // bitmask tests, testcase() can be used to make sure each bit // is significant and used at least once. On switch statements // where multiple cases go to the same block of code, testcase() // can insure that all cases are evaluated. // The TESTONLY macro is used to enclose variable declarations or // other bits of code that are needed to support the arguments // within testcase() and assert() macros. // Sometimes we need a small amount of code such as a variable initialization // to setup for a later assert() statement. We do not want this code to // appear when assert() is disabled. The following macro is therefore // used to contain that setup code. The "VVA" acronym stands for // "Verification, Validation, and Accreditation". In other words, the // code within VVA_ONLY() will only run during verification processes. // Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage // and mutation testing // The ALWAYS and NEVER macros surround boolean expressions which // are intended to always be true or false, respectively. Such // expressions could be omitted from the code completely. But they // are included in a few cases in order to enhance the resilience // of SQLite to unexpected behavior - to make the code "self-healing" // or "ductile" rather than being "brittle" and crashing at the first // hint of unplanned behavior. // // In other words, ALWAYS and NEVER are added for defensive code. // // When doing coverage testing ALWAYS and NEVER are hard-coded to // be true and false so that the unreachable code they specify will // not be counted as untested code. // Some conditionals are optimizations only. In other words, if the // conditionals are replaced with a constant 1 (true) or 0 (false) then // the correct answer is still obtained, though perhaps not as quickly. // // The following macros mark these optimizations conditionals. // Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is // defined. We need to defend against those failures when testing with // SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches // during a normal build. The following macro can be used to disable tests // that are always false except when SQLITE_TEST_REALLOC_STRESS is set. // Declarations used for tracing the operating system interfaces. // 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 // SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTERTABLE // 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. //************* Include hash.h in the middle of sqliteInt.h ***************** //************* Begin file hash.h ******************************************* // 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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. // 0 means mutexes are permanently disable and the library is never // threadsafe. 1 means the library is serialized which is the highest // level of threadsafety. 2 means the library is multithreaded - multiple // threads can use SQLite as long as no two threads try to use the same // database connection at the same time. // // Older versions of SQLite used an optional THREADSAFE macro. // We support that for legacy. // // To ensure that the correct value of "THREADSAFE" is reported when querying // for compile-time options at runtime (e.g. "PRAGMA compile_options"), this // logic is partially replicated in ctime.c. If it is updated here, it should // also be updated there. // Powersafe overwrite is on by default. But can be turned off using // the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option. // EVIDENCE-OF: R-25715-37072 Memory allocation statistics are enabled by // default unless SQLite is compiled with SQLITE_DEFAULT_MEMSTATUS=0 in // which case memory allocation statistics are disabled by default. // Exactly one of the following macros must be defined in order to // specify which memory allocation subsystem to use. // // SQLITE_SYSTEM_MALLOC // Use normal system malloc() // SQLITE_WIN32_MALLOC // Use Win32 native heap API // SQLITE_ZERO_MALLOC // Use a stub allocator that always fails // SQLITE_MEMDEBUG // Debugging version of system malloc() // // On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the // assert() macro is enabled, each call into the Win32 native heap subsystem // will cause HeapValidate to be called. If heap validation should fail, an // assertion will be triggered. // // If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as // the default. // If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the // sizes of memory allocations below this value where possible. // We need to define _XOPEN_SOURCE as follows in order to enable // recursive mutexes on most Unix systems and fchmod() on OpenBSD. // But _XOPEN_SOURCE define causes problems for Mac OS X, so omit // it. // NDEBUG and SQLITE_DEBUG are opposites. It should always be true that // defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true, // make it true by defining or undefining NDEBUG. // // Setting NDEBUG makes the code smaller and faster by disabling the // assert() statements in the code. So we want the default action // to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG // is set. Thus NDEBUG becomes an opt-in rather than an opt-out // feature. // Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on. // The testcase() macro is used to aid in coverage testing. When // doing coverage testing, the condition inside the argument to // testcase() must be evaluated both true and false in order to // get full branch coverage. The testcase() macro is inserted // to help ensure adequate test coverage in places where simple // condition/decision coverage is inadequate. For example, testcase() // can be used to make sure boundary values are tested. For // bitmask tests, testcase() can be used to make sure each bit // is significant and used at least once. On switch statements // where multiple cases go to the same block of code, testcase() // can insure that all cases are evaluated. // The TESTONLY macro is used to enclose variable declarations or // other bits of code that are needed to support the arguments // within testcase() and assert() macros. // Sometimes we need a small amount of code such as a variable initialization // to setup for a later assert() statement. We do not want this code to // appear when assert() is disabled. The following macro is therefore // used to contain that setup code. The "VVA" acronym stands for // "Verification, Validation, and Accreditation". In other words, the // code within VVA_ONLY() will only run during verification processes. // Disable ALWAYS() and NEVER() (make them pass-throughs) for coverage // and mutation testing // The ALWAYS and NEVER macros surround boolean expressions which // are intended to always be true or false, respectively. Such // expressions could be omitted from the code completely. But they // are included in a few cases in order to enhance the resilience // of SQLite to unexpected behavior - to make the code "self-healing" // or "ductile" rather than being "brittle" and crashing at the first // hint of unplanned behavior. // // In other words, ALWAYS and NEVER are added for defensive code. // // When doing coverage testing ALWAYS and NEVER are hard-coded to // be true and false so that the unreachable code they specify will // not be counted as untested code. // Some conditionals are optimizations only. In other words, if the // conditionals are replaced with a constant 1 (true) or 0 (false) then // the correct answer is still obtained, though perhaps not as quickly. // // The following macros mark these optimizations conditionals. // Some malloc failures are only possible if SQLITE_TEST_REALLOC_STRESS is // defined. We need to defend against those failures when testing with // SQLITE_TEST_REALLOC_STRESS, but we don't want the unreachable branches // during a normal build. The following macro can be used to disable tests // that are always false except when SQLITE_TEST_REALLOC_STRESS is set. // Declarations used for tracing the operating system interfaces. // 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 // SQLITE_OMIT_VIRTUALTABLE implies SQLITE_OMIT_ALTERTABLE // 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. //************* Include hash.h in the middle of sqliteInt.h ***************** //************* Begin file hash.h ******************************************* // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13744:21 */ type HashElem1 = struct { Fnext uintptr Fprev uintptr Fdata uintptr FpKey uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type HashElem = HashElem1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:13745: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 F__ccgo_pad1 [4]byte Fchain uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Macros for looping over all elements of a hash table. The idiom is // like this: // // Hash h; // HashElem *p; // ... // for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){ // SomeStructure *pData = sqliteHashData(p); // // do something with pData // } // #define sqliteHashKey(E) ((E)->pKey) // NOT USED // #define sqliteHashKeysize(E) ((E)->nKey) // NOT USED // Number of entries in a hash table //************* End of hash.h *********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include parse.h in the middle of sqliteInt.h **************** //************* Begin file parse.h ****************************************** //************* End of parse.h ********************************************** //************* Continuing where we left off in sqliteInt.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 Wine project. // 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 _iobuf = struct { F_ptr uintptr F_cnt int32 F__ccgo_pad1 [4]byte F_base uintptr F_flag int32 F_file int32 F_charbuf int32 F_bufsiz int32 F_tmpfname uintptr } /* /usr/x86_64-w64-mingw32/include/stdio.h:24:3 */ type FILE = _iobuf /* /usr/x86_64-w64-mingw32/include/stdio.h:34:25 */ type X_off_t = int32 /* /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:5:16 */ type Off32_t = int32 /* /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:7:16 */ type X_off64_t = int64 /* /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:13:39 */ type Off64_t = int64 /* /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:15:39 */ type Off_t = Off64_t /* /usr/x86_64-w64-mingw32/include/_mingw_off_t.h:24:17 */ type Fpos_t = int64 /* /usr/x86_64-w64-mingw32/include/stdio.h:102:37 */ func vsnwprintf(tls *libc.TLS, __stream uintptr, __n Size_t, __format uintptr, __local_argv X__builtin_va_list) int32 { /* /usr/x86_64-w64-mingw32/include/stdio.h:1145:5: */ return libc.X__mingw_vsnwprintf(tls, __stream, __n, __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. // * // This file has no copyright assigned and is placed in the Public 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 X__builtin_va_list) int32 { /* /usr/x86_64-w64-mingw32/include/swprintf.inl:27:5: */ return vsnwprintf(tls, __stream, __count, __format, __local_argv) } // 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. // ISO C Standard: 7.17 Common definitions <stddef.h> // Copyright (C) 1989-2020 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 // <http://www.gnu.org/licenses/>. // ISO C Standard: 7.17 Common definitions <stddef.h> // Use a macro to replace memcpy() if compiled with SQLITE_INLINE_MEMCPY. // This allows better measurements of where memcpy() is used when running // cachegrind. But this macro version of memcpy() is very slow so it // should not be used in production. This is a performance measurement // hack only. // If compiling for a processor that lacks floating point support, // substitute integer for floating-point // OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 // afterward. Having this macro allows us to cause the C compiler // to omit code used by TEMP tables without messy #ifndef statements. // The "file format" number is an integer that is incremented whenever // the VDBE-level file format changes. The following macros define the // the default file format for new databases and the maximum file format // that the library can read. // Determine whether triggers are recursive by default. This can be // changed at run-time using a pragma. // Provide a default value for SQLITE_TEMP_STORE in case it is not specified // on the command-line // If no value has been provided for SQLITE_MAX_WORKER_THREADS, or if // SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it // to zero. // The default initial allocation for the pagecache when using separate // pagecaches for each database connection. A positive number is the // number of pages. A negative number N translations means that a buffer // of -1024*N bytes is allocated and used for as many pages as it will hold. // // The default value of "20" was chosen to minimize the run-time of the // speedtest1 test program with options: --shrink-memory --reprepare // Default value for the SQLITE_CONFIG_SORTERREF_SIZE option. // The compile-time options SQLITE_MMAP_READWRITE and // SQLITE_ENABLE_BATCH_ATOMIC_WRITE are not compatible with one another. // You must choose one or the other (or neither) but not both. // GCC does not define the offsetof() macro so we'll have to do it // ourselves. // Macros to compute minimum and maximum of two numbers. // Swap two objects of type TYPE. // Check to see if this machine uses EBCDIC. (Yes, believe it or // not, there are still machines out there that use EBCDIC.) // Integers of known sizes. These typedefs might change for architectures // where the sizes very. Preprocessor macros are available so that the // types can be conveniently redefined at compile-type. Like this: // // cc '-DUINTPTR_TYPE=long long int' ... type I64 = Sqlite_int64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14217:22 */ // 8-byte signed integer type U64 = Sqlite_uint64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14218:23 */ // 8-byte unsigned integer type U32 = uint32 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14219:21 */ // 4-byte unsigned integer type U16 = uint16 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14220:21 */ // 2-byte unsigned integer type I16 = int16 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14221:20 */ // 2-byte signed integer type U8 = uint8 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14222:20 */ // 1-byte unsigned integer type I8 = int8 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14223: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14242: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14268: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 = U64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14293:15 */ // 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 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14464:28 */ // Name of table that holds the database schema. // // The PREFERRED names are used whereever possible. But LEGACY is also // used for backwards compatibility. // // 1. Queries can use either the PREFERRED or the LEGACY names // 2. The sqlite3_set_authorizer() callback uses the LEGACY name // 3. The PRAGMA table_list statement uses the PREFERRED name // // The LEGACY names are stored in the internal symbol hash table // in support of (2). Names are translated using sqlite3PreferredTableName() // for (3). The sqlite3FindTable() function takes care of translating // names for (1). // // Note that "sqlite_temp_schema" can also be called "temp.sqlite_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 F__ccgo_pad1 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Name of table that holds the database schema. // // The PREFERRED names are used whereever possible. But LEGACY is also // used for backwards compatibility. // // 1. Queries can use either the PREFERRED or the LEGACY names // 2. The sqlite3_set_authorizer() callback uses the LEGACY name // 3. The PRAGMA table_list statement uses the PREFERRED name // // The LEGACY names are stored in the internal symbol hash table // in support of (2). Names are translated using sqlite3PreferredTableName() // for (3). The sqlite3FindTable() function takes care of translating // names for (1). // // Note that "sqlite_temp_schema" can also be called "temp.sqlite_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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14574:24 */ type AuthContext1 = struct { FzAuthContext uintptr FpParse uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14575:9 */ type AuthContext = AuthContext1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14575:28 */ type AutoincInfo1 = struct { FpNext uintptr FpTab uintptr FiDb int32 FregCtr int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type AutoincInfo = AutoincInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14576:28 */ type Bitvec1 = struct { FiSize U32 FnSet U32 FiDivisor U32 F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FaBitmap [496]U8 } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Bitvec = Bitvec1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14577:23 */ type CollSeq1 = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte FpUser uintptr FxCmp uintptr FxDel uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type CollSeq = CollSeq1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14578:24 */ type Column1 = struct { FzCnName uintptr FnotNull uint8 /* unsigned notNull: 4, unsigned eCType: 4 */ F__ccgo_pad1 [1]byte Faffinity int8 FszEst U8 FhName U8 F__ccgo_pad2 [1]byte FiDflt U16 FcolFlags U16 F__ccgo_pad3 [6]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Column = Column1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14579:23 */ type Cte1 = struct { FzName uintptr FpCols uintptr FpSelect uintptr FzCteErr uintptr FpUse uintptr FeM10d U8 F__ccgo_pad1 [7]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Cte = Cte1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14580:20 */ type CteUse1 = struct { FnUse int32 FaddrM9e int32 FregRtn int32 FiCur int32 FnRowEst LogEst FeM10d U8 F__ccgo_pad1 [1]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type CteUse = CteUse1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14581:23 */ type Db1 = struct { FzDbSName uintptr FpBt uintptr Fsafety_level U8 FbSyncSet U8 F__ccgo_pad1 [6]byte FpSchema uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Db = Db1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14582:19 */ type DbFixer1 = struct { FpParse uintptr Fw Walker FpSchema uintptr FbTemp U8 F__ccgo_pad1 [7]byte FzDb uintptr FzType uintptr FpName uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14583:9 */ type DbFixer = DbFixer1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14583: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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Schema = Schema1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14584:23 */ type Expr1 = struct { Fop U8 FaffExpr int8 Fop2 U8 F__ccgo_pad1 [1]byte Fflags U32 Fu struct{ FzToken uintptr } FpLeft uintptr FpRight uintptr Fx struct{ FpList uintptr } FnHeight int32 FiTable int32 FiColumn YnVar FiAgg I16 Fw struct{ FiRightJoinTable int32 } FpAggInfo uintptr Fy struct{ FpTab uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Expr = Expr1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14585:21 */ type ExprList1 = struct { FnExpr int32 FnAlloc int32 Fa [1]struct { FpExpr uintptr FzEName uintptr FsortFlags U8 F__ccgo_pad1 [3]byte FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ F__ccgo_pad2 [3]byte Fu struct { F__ccgo_pad1 [0]uint32 Fx struct { FiOrderByCol U16 FiAlias U16 } } F__ccgo_pad3 [4]byte } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type ExprList = ExprList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14586:25 */ type FKey1 = struct { FpFrom uintptr FpNextFrom uintptr FzTo uintptr FpNextTo uintptr FpPrevTo uintptr FnCol int32 FisDeferred U8 FaAction [2]U8 F__ccgo_pad1 [1]byte FapTrigger [2]uintptr FaCol [1]struct { FiFrom int32 F__ccgo_pad1 [4]byte FzCol uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14587:9 */ type FKey = FKey1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14587:21 */ type FuncDestructor1 = struct { FnRef int32 F__ccgo_pad1 [4]byte FxDestroy uintptr FpUserData uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14588:9 */ type FuncDestructor = FuncDestructor1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14588:31 */ type FuncDef1 = struct { FnArg I8 F__ccgo_pad1 [3]byte FfuncFlags U32 FpUserData uintptr FpNext uintptr FxSFunc uintptr FxFinalize uintptr FxValue uintptr FxInverse uintptr FzName uintptr Fu struct{ FpHash uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type FuncDef = FuncDef1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14589:24 */ type FuncDefHash1 = struct{ Fa [23]uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14590:9 */ type FuncDefHash = FuncDefHash1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14590:28 */ type IdList1 = struct { Fa uintptr FnId int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type IdList = IdList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14591: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 F__ccgo_pad1 [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 */ F__ccgo_pad2 [2]byte FnSample int32 FnSampleCol int32 FaAvgEq uintptr FaSample uintptr FaiRowEst uintptr FnRowEst0 TRowcnt F__ccgo_pad3 [4]byte FcolNotIdxed Bitmask } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Index = Index1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14592:22 */ type IndexSample1 = struct { Fp uintptr Fn int32 F__ccgo_pad1 [4]byte FanEq uintptr FanLt uintptr FanDLt uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type IndexSample = IndexSample1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14593:28 */ type KeyInfo1 = struct { FnRef U32 Fenc U8 F__ccgo_pad1 [1]byte FnKeyField U16 FnAllField U16 F__ccgo_pad2 [6]byte Fdb uintptr FaSortFlags uintptr FaColl [1]uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type KeyInfo = KeyInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14595:24 */ type Lookaside1 = struct { FbDisable U32 Fsz U16 FszTrue U16 FbMalloced U8 F__ccgo_pad1 [3]byte FnSlot U32 FanStat [3]U32 F__ccgo_pad2 [4]byte FpInit uintptr FpFree uintptr FpSmallInit uintptr FpSmallFree uintptr FpMiddle uintptr FpStart uintptr FpEnd uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Lookaside = Lookaside1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14596:26 */ type LookasideSlot1 = struct{ FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type LookasideSlot = LookasideSlot1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14597:30 */ type Module1 = struct { FpModule uintptr FzName uintptr FnRefModule int32 F__ccgo_pad1 [4]byte FpAux uintptr FxDestroy uintptr FpEpoTab uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Module = Module1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14598:23 */ type NameContext1 = struct { FpParse uintptr FpSrcList uintptr FuNC struct{ FpEList uintptr } FpNext uintptr FnRef int32 FnNcErr int32 FncFlags int32 F__ccgo_pad1 [4]byte FpWinSelect uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14599:9 */ type NameContext = NameContext1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14599: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 F__ccgo_pad1 [2]byte FnRangeReg int32 FiRangeReg int32 FnErr int32 FnTab int32 FnMem int32 FszOpAlloc int32 FiSelfTab int32 FnLabel int32 FnLabelAlloc int32 F__ccgo_pad2 [4]byte FaLabel uintptr FpConstExpr uintptr FconstraintName Token FwriteMask YDbMask FcookieMask YDbMask FregRowid int32 FregRoot int32 FnMaxArg int32 FnSelect int32 FnTableLock int32 F__ccgo_pad3 [4]byte FaTableLock uintptr FpAinc uintptr FpToplevel uintptr FpTriggerTab uintptr FpTriggerPrg uintptr FpCleanup uintptr Fu1 struct { F__ccgo_pad1 [0]uint64 FaddrCrTab int32 F__ccgo_pad2 [4]byte } FnQueryLoop U32 Foldmask U32 Fnewmask U32 FeTriggerOp U8 FbReturning U8 FeOrconf U8 FdisableTriggers U8 FaTempReg [8]int32 FpOuterParse uintptr FsNameToken Token FsLastToken Token FnVar YnVar FiPkSortOrder U8 Fexplain U8 FeParseMode U8 F__ccgo_pad4 [3]byte FnVtabLock int32 FnHeight int32 FaddrExplain int32 F__ccgo_pad5 [4]byte FpVList uintptr FpReprepare uintptr FzTail uintptr FpNewTable uintptr FpNewIndex uintptr FpNewTrigger uintptr FzAuthContext uintptr FsArg Token FapVtabLock uintptr FpWith uintptr FpRename uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Parse = Parse1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14600:22 */ type ParseCleanup1 = struct { FpNext uintptr FpPtr uintptr FxCleanup uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type ParseCleanup = ParseCleanup1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14601:29 */ type PreUpdate1 = struct { Fv uintptr FpCsr uintptr Fop int32 F__ccgo_pad1 [4]byte FaRecord uintptr Fkeyinfo KeyInfo FpUnpacked uintptr FpNewUnpacked uintptr FiNewReg int32 FiBlobWrite int32 FiKey1 I64 FiKey2 I64 FaNew uintptr FpTab uintptr FpPk uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type PreUpdate = PreUpdate1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14602:26 */ type PrintfArguments1 = struct { FnArg int32 FnUsed int32 FapArg uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14603:9 */ type PrintfArguments = PrintfArguments1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14603:32 */ type RenameToken1 = struct { Fp uintptr Ft Token FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type RenameToken = RenameToken1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14604:28 */ type Returning1 = struct { FpParse uintptr FpReturnEL uintptr FretTrig Trigger FretTStep TriggerStep FiRetCur int32 FnRetCol int32 FiRetReg int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14605:9 */ type Returning = Returning1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14605:26 */ type RowSet1 = struct { FpChunk uintptr Fdb uintptr FpEntry uintptr FpLast uintptr FpFresh uintptr FpForest uintptr FnFresh U16 FrsFlags U16 FiBatch int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14606:9 */ type RowSet = RowSet1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14606:23 */ type Savepoint1 = struct { FzName uintptr FnDeferredCons I64 FnDeferredImmCons I64 FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Savepoint = Savepoint1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14607:26 */ type Select1 = struct { Fop U8 F__ccgo_pad1 [1]byte FnSelectRow LogEst FselFlags U32 FiLimit int32 FiOffset int32 FselId U32 FaddrOpenEphm [2]int32 F__ccgo_pad2 [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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Select = Select1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14608:23 */ type SQLiteThread1 = struct { Ftid uintptr Fid uint32 F__ccgo_pad1 [4]byte FxTask uintptr FpIn uintptr FpResult uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14609:9 */ type SQLiteThread = SQLiteThread1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14609:29 */ type SelectDest1 = struct { FeDest U8 F__ccgo_pad1 [3]byte FiSDParm int32 FiSDParm2 int32 FiSdst int32 FnSdst int32 F__ccgo_pad2 [4]byte FzAffSdst uintptr FpOrderBy uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14610:9 */ type SelectDest = SelectDest1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14610:27 */ type SrcItem1 = struct { FpSchema uintptr FzDatabase uintptr FzName uintptr FzAlias uintptr FpTab uintptr FpSelect uintptr FaddrFillSub int32 FregReturn int32 FregResult int32 Ffg struct { F__ccgo_pad1 [0]uint32 Fjointype U8 F__ccgo_pad2 [3]byte FnotIndexed uint16 /* unsigned notIndexed: 1, unsigned isIndexedBy: 1, unsigned isTabFunc: 1, unsigned isCorrelated: 1, unsigned viaCoroutine: 1, unsigned isRecursive: 1, unsigned fromDDL: 1, unsigned isCte: 1, unsigned notCte: 1 */ F__ccgo_pad3 [2]byte } FiCursor int32 FpOn uintptr FpUsing uintptr FcolUsed Bitmask Fu1 struct{ FzIndexedBy uintptr } Fu2 struct{ FpIBIndex uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type SrcItem = SrcItem1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14611:24 */ type SrcList1 = struct { FnSrc int32 FnAlloc U32 Fa [1]SrcItem } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type SrcList = SrcList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14612:24 */ type StrAccum = sqlite3_str /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14613:28 */ // Internal alias for sqlite3_str type Table1 = struct { FzName uintptr FaCol uintptr FpIndex uintptr FzColAff uintptr FpCheck uintptr Ftnum Pgno FnTabRef U32 FtabFlags U32 FiPKey I16 FnCol I16 FnNVCol I16 FnRowLogEst LogEst FszTabRow LogEst FkeyConf U8 FeTabType U8 Fu struct { Ftab struct { FaddColOffset int32 F__ccgo_pad1 [4]byte FpFKey uintptr FpDfltList uintptr } } FpTrigger uintptr FpSchema uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Internal alias for sqlite3_str type Table = Table1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14614:22 */ type TableLock1 = struct { FiDb int32 FiTab Pgno FisWriteLock U8 F__ccgo_pad1 [7]byte FzLockName uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type TableLock = TableLock1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14615:26 */ type Token1 = struct { Fz uintptr Fn uint32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Token = Token1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14616:22 */ type Trigger1 = struct { FzName uintptr Ftable uintptr Fop U8 Ftr_tm U8 FbReturning U8 F__ccgo_pad1 [5]byte FpWhen uintptr FpColumns uintptr FpSchema uintptr FpTabSchema uintptr Fstep_list uintptr FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Trigger = Trigger1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14618:24 */ type TriggerPrg1 = struct { FpTrigger uintptr FpNext uintptr FpProgram uintptr Forconf int32 FaColmask [2]U32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type TriggerPrg = TriggerPrg1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14619:27 */ type TriggerStep1 = struct { Fop U8 Forconf U8 F__ccgo_pad1 [6]byte FpTrig uintptr FpSelect uintptr FzTarget uintptr FpFrom uintptr FpWhere uintptr FpExprList uintptr FpIdList uintptr FpUpsert uintptr FzSpan uintptr FpNext uintptr FpLast uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type TriggerStep = TriggerStep1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14620:28 */ type UnpackedRecord1 = struct { FpKeyInfo uintptr FaMem uintptr FnField U16 Fdefault_rc I8 FerrCode U8 Fr1 I8 Fr2 I8 FeqSeen U8 F__ccgo_pad1 [1]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type UnpackedRecord = UnpackedRecord1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14621:31 */ type Upsert1 = struct { FpUpsertTarget uintptr FpUpsertTargetWhere uintptr FpUpsertSet uintptr FpUpsertWhere uintptr FpNextUpsert uintptr FisDoUpdate U8 F__ccgo_pad1 [7]byte FpToFree uintptr FpUpsertIdx uintptr FpUpsertSrc uintptr FregData int32 FiDataCur int32 FiIdxCur int32 F__ccgo_pad2 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Upsert = Upsert1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14622:23 */ type VTable1 = struct { Fdb uintptr FpMod uintptr FpVtab uintptr FnRef int32 FbConstraint U8 FeVtabRisk U8 F__ccgo_pad1 [2]byte FiSavepoint int32 F__ccgo_pad2 [4]byte FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type VTable = VTable1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14623:23 */ type VtabCtx1 = struct { FpVTable uintptr FpTab uintptr FpPrior uintptr FbDeclared int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type VtabCtx = VtabCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14624:24 */ type Walker1 = struct { FpParse uintptr FxExprCallback uintptr FxSelectCallback uintptr FxSelectCallback2 uintptr FwalkerDepth int32 FeCode U16 F__ccgo_pad1 [2]byte Fu struct{ FpNC uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14583:9 */ type Walker = Walker1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14625:23 */ type WhereInfo1 = struct { FpParse uintptr FpTabList uintptr FpOrderBy uintptr FpResultSet uintptr FpWhere uintptr FpLimit uintptr FaiCurOnePass [2]int32 FiContinue int32 FiBreak int32 FsavedNQueryLoop int32 FwctrlFlags U16 FiLimit LogEst FnLevel U8 FnOBSat I8 FeOnePass U8 FeDistinct U8 FbDeferredSeek uint8 /* unsigned bDeferredSeek: 1, unsigned untestedTerms: 1, unsigned bOrderedInnerLoop: 1, unsigned sorted: 1 */ F__ccgo_pad1 [1]byte FnRowOut LogEst FiTop int32 FiEndWhere int32 FpLoops uintptr FpExprMods uintptr FrevMask Bitmask FsWC WhereClause FsMaskSet WhereMaskSet Fa [1]WhereLevel } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14626:9 */ type WhereInfo = WhereInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14626:26 */ type Window1 = struct { FzName uintptr FzBase uintptr FpPartition uintptr FpOrderBy uintptr FeFrmType U8 FeStart U8 FeEnd U8 FbImplicitFrame U8 FeExclude U8 F__ccgo_pad1 [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 F__ccgo_pad2 [3]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type Window = Window1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14627:23 */ type With1 = struct { FnCte int32 FbView int32 FpOuter uintptr Fa [1]Cte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type With = With1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14628: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14641: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14664: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. //************* Include pager.h in the middle of sqliteInt.h **************** //************* Begin file pager.h ****************************************** // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14705:13 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager1 = struct { FpVfs uintptr FexclusiveMode U8 FjournalMode U8 FuseJournal U8 FnoSync U8 FfullSync U8 FextraSync U8 FsyncFlags U8 FwalSyncFlags U8 FtempFile U8 FnoLock U8 FreadOnly U8 FmemDb U8 FmemVfs U8 FeState U8 FeLock U8 FchangeCountDone U8 FsetSuper U8 FdoNotSpill U8 FsubjInMemory U8 FbUseFetch U8 FhasHeldSharedLock U8 F__ccgo_pad1 [3]byte FdbSize Pgno FdbOrigSize Pgno FdbFileSize Pgno FdbHintSize Pgno FerrCode int32 FnRec int32 FcksumInit U32 FnSubRec U32 FpInJournal uintptr Ffd uintptr Fjfd uintptr Fsjfd uintptr FjournalOff I64 FjournalHdr I64 FpBackup uintptr FaSavepoint uintptr FnSavepoint int32 FiDataVersion U32 FdbFileVers [16]int8 FnMmapOut int32 F__ccgo_pad2 [4]byte FszMmap Sqlite3_int64 FpMmapFreelist uintptr FnExtra U16 FnReserve I16 FvfsFlags U32 FsectorSize U32 FmxPgno Pgno FpageSize I64 FjournalSizeLimit I64 FzFilename uintptr FzJournal uintptr FxBusyHandler uintptr FpBusyHandlerArg uintptr FaStat [4]int32 FxReiniter uintptr FxGet uintptr FpTmpSpace uintptr FpPCache uintptr FpWal uintptr FzWal uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Each open file is managed by a separate instance of the "Pager" structure. type Pager = Pager1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14710:22 */ // Handle type for pages. type PgHdr2 = struct { FpPage uintptr FpData uintptr FpExtra uintptr FpCache uintptr FpDirty uintptr FpPager uintptr Fpgno Pgno Fflags U16 FnRef I16 FpDirtyNext uintptr FpDirtyPrev uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Handle type for pages. type DbPage = PgHdr2 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14715:22 */ // Functions to support testing and debugging. //************* End of pager.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include btree.h in the middle of sqliteInt.h **************** //************* Begin file btree.h ****************************************** // 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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Functions to support testing and debugging. //************* End of pager.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include btree.h in the middle of sqliteInt.h **************** //************* Begin file btree.h ****************************************** // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14958:22 */ 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 F__ccgo_pad1 [2]byte FpKeyInfo uintptr FpPage uintptr FapPage [19]uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type BtCursor = BtCursor1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14959:25 */ 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 F__ccgo_pad1 [1]byte FbtsFlags U16 FmaxLocal U16 FminLocal U16 FmaxLeaf U16 FminLeaf U16 F__ccgo_pad2 [2]byte FpageSize U32 FusableSize U32 FnTransaction int32 FnPage U32 F__ccgo_pad3 [4]byte FpSchema uintptr FxFreeSchema uintptr Fmutex uintptr FpHasContent uintptr FnRef int32 F__ccgo_pad4 [4]byte FpNext uintptr FpLock uintptr FpWriter uintptr FpTmpSpace uintptr FnPreformatSize int32 F__ccgo_pad5 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type BtShared = BtShared1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14960:25 */ type BtreePayload1 = struct { FpKey uintptr FnKey Sqlite3_int64 FpData uintptr FaMem uintptr FnMem U16 F__ccgo_pad1 [2]byte FnData int32 FnZero int32 F__ccgo_pad2 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14961:9 */ type BtreePayload = BtreePayload1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14961:29 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include vdbe.h in the middle of sqliteInt.h ***************** //************* Begin file vdbe.h ******************************************* // 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. // #include <stdio.h> // 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 F__ccgo_pad1 [2]byte FiVdbeMagic U32 FnMem int32 FnCursor int32 FcacheCtr U32 Fpc int32 Frc int32 F__ccgo_pad2 [4]byte FnChange I64 FiStatement int32 F__ccgo_pad3 [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 F__ccgo_pad4 [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 */ F__ccgo_pad5 [2]byte FbtreeMask YDbMask FlockMask YDbMask FaCounter [9]U32 FzSql uintptr FpFree uintptr FpFrame uintptr FpDelFrame uintptr FnFrame int32 Fexpmask U32 FpProgram uintptr FpAuxData uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ //************* End of btree.h ********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include vdbe.h in the middle of sqliteInt.h ***************** //************* Begin file vdbe.h ******************************************* // 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. // #include <stdio.h> // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15363:21 */ // The names of the following types declared in vdbeInt.h are required // for the VdbeOp definition. type Mem = sqlite3_value /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15369:30 */ type SubProgram1 = struct { FaOp uintptr FnOp int32 FnMem int32 FnCsr int32 F__ccgo_pad1 [4]byte FaOnce uintptr Ftoken uintptr FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type SubProgram = SubProgram1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15370: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 { F__ccgo_pad1 [0]uint64 Fi int32 F__ccgo_pad2 [4]byte } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 { F__ccgo_pad1 [0]uint64 Fi int32 F__ccgo_pad2 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type VdbeOp = VdbeOp1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15416: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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15436:1 */ type VdbeOpList = VdbeOpList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15442:27 */ type RecordCompare = uintptr /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15857:13 */ // Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on // each VDBE opcode. // // Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op // comments in VDBE programs that show key decision points in the code // generator. // 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. //************* End of vdbe.h *********************************************** //************* Continuing where we left off in sqliteInt.h ***************** //************* Include pcache.h in the middle of sqliteInt.h *************** //************* Begin file pcache.h ***************************************** // 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 = PgHdr2 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15990:22 */ type PCache2 = struct { FpDirty uintptr FpDirtyTail uintptr FpSynced uintptr FnRefSum int32 FszCache int32 FszSpill int32 FszPage int32 FszExtra int32 FbPurgeable U8 FeCreate U8 F__ccgo_pad1 [2]byte FxStress uintptr FpStress uintptr FpCache uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type PCache = PCache2 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:15991:23 */ // typedef for the authorization callback function. type Sqlite3_xauth = uintptr /* testdata/sqlite-amalgamation-3380500/sqlite3.c:16759: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 F__ccgo_pad1 [2]byte ForphanTrigger uint8 /* unsigned orphanTrigger: 1, unsigned imposterTable: 1, unsigned reopenMemdb: 1 */ F__ccgo_pad2 [7]byte FazInit uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 // Allowed values for Table.eTabType // 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 F__ccgo_pad1 [4]byte FzCol uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14587: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 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 FiDistAddr int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:17979: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. // Macros can be used to test, set, or clear bits in the // Expr.flags field. // Macros used to ensure that the correct members of unions are accessed // in Expr. // 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 F__ccgo_pad1 [3]byte FeEName uint8 /* unsigned eEName: 2, unsigned done: 1, unsigned reusable: 1, unsigned bSorterRef: 1, unsigned bNulls: 1 */ F__ccgo_pad2 [3]byte Fu struct { F__ccgo_pad1 [0]uint32 Fx struct { FiOrderByCol U16 FiAlias U16 } } F__ccgo_pad3 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // The yDbMask datatype for the bitmask of all attached databases. type YDbMask = uint32 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:18758: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 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19119:3 */ // Allowed values for mInitFlags // Tuning parameters are set using SQLITE_TESTCTRL_TUNE and are controlled // on debug-builds of the CLI using ".testctrl tune ID VALUE". Tuning // parameters are for temporary use during development, to help find // optimial values for parameters in the query planner. The should not // be used on trunk check-ins. They are a temporary mechanism available // for transient development builds only. // // Tuning parameters are numbered starting with 1. // 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 F__ccgo_pad1 [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 F__ccgo_pad2 [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 F__ccgo_pad3 [4]byte FpInitMutex uintptr FxLog uintptr FpLogArg uintptr FmxMemdbSize Sqlite3_int64 FxTestCallback uintptr FbLocaltimeFault int32 F__ccgo_pad4 [4]byte FxAltLocaltime uintptr FiOnceResetThreshold int32 FszSorterRef U32 FiPrngSeed uint32 F__ccgo_pad5 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19150:1 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type RefSrcList = struct { Fdb uintptr FpRef uintptr FnExclude I64 FaiExclude uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19250:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type IdxCover = struct { FpIdx uintptr FiCur int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19252:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type IdxExprTrans1 = struct { FpIdxExpr uintptr FiTabCur int32 FiIdxCur int32 FiIdxCol int32 FiTabCol int32 FpWInfo uintptr Fdb uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19253:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type WindowRewrite1 = struct { FpWin uintptr FpSrc uintptr FpSub uintptr FpTab uintptr FpSubSelect uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19256:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type WhereConst1 = struct { FpParse uintptr FpOomFault uintptr FnConst int32 FnChng int32 FbHasAffBlob int32 F__ccgo_pad1 [4]byte FapExpr uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19257:5 */ // This macro is used inside of assert() statements to indicate that // the assert is only valid on a well-formed database. Instead of: // // assert( X ); // // One writes: // // assert( X || CORRUPT_DB ); // // CORRUPT_DB is true during normal operation. CORRUPT_DB does not indicate // that the database is definitely corrupt, only that it might be corrupt. // For most test cases, CORRUPT_DB is set to false using a special // sqlite3_test_control(). This enables assert() statements to prove // things that are always true for well-formed databases. // Context pointer passed down through the tree-walk. type RenameCtx1 = struct { FpList uintptr FnList int32 FiCol int32 FpTab uintptr FzOld uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:19258:5 */ //************* End of sqliteInt.h ****************************************** //************* Begin file os_common.h ************************************** // 2004 May 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 file contains macros and a little bit of code that is common to // all of the platform-specific files (os_*.c) and is #included into those // files. // // This file should be #included by the os_*.c files only. It is not a // general purpose header file. // At least two bugs have slipped in because we changed the MEMORY_DEBUG // macro to SQLITE_DEBUG and some older makefiles have not yet made the // switch. The following code should catch this problem at compile-time. // Macros for performance tracing. Normally turned off. Only works // on i486 hardware. // If we compile with the SQLITE_TEST macro set, then the following block // of code will give us the ability to simulate a disk I/O error. This // is used for testing the I/O recovery logic. // When testing, keep a count of the number of open files. //************* End of os_common.h ****************************************** //************* Begin file ctime.c ****************************************** // DO NOT EDIT! // This file is automatically generated by the script in the canonical // SQLite source tree at tool/mkctimec.tcl. // // To modify this header, edit any of the various lists in that script // which specify categories of generated conditionals in this file. // 2010 February 23 // // 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 routines used to report what compile-time options // SQLite was built with. // Include the configuration header output by 'configure' if we're using the // autoconf-based build // These macros are provided to "stringify" the value of the define // for those options in which the value is meaningful. // Like CTIMEOPT_VAL, but especially for SQLITE_DEFAULT_LOOKASIDE. This // option requires a separate macro because legal values contain a single // comma. e.g. (-DSQLITE_DEFAULT_LOOKASIDE="100,100") // #include "sqliteInt.h" // An array of names of all compile-time options. This array should // be sorted A-Z. // // This array looks large, but in a typical installation actually uses // only a handful of compile-time options, so most times this array is usually // rather short and uses little memory space. var sqlite3azCompileOpt = [51]uintptr{ ts + 7, ts + 27, ts + 46, ts + 65, ts + 90, ts + 112, ts + 142, ts + 162, ts + 185, ts + 210, ts + 237, ts + 262, ts + 284, ts + 316, ts + 342, ts + 367, ts + 390, ts + 402, ts + 417, ts + 439, ts + 464, ts + 487, ts + 509, ts + 520, ts + 533, ts + 548, ts + 564, ts + 577, ts + 598, ts + 622, ts + 645, ts + 661, ts + 677, ts + 701, ts + 728, ts + 748, ts + 769, ts + 791, ts + 821, ts + 846, ts + 872, ts + 892, ts + 918, ts + 941, ts + 967, ts + 989, ts + 1010, ts + 1021, ts + 1029, ts + 1043, ts + 1056, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:20869:19 */ func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21596:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint64(unsafe.Sizeof(sqlite3azCompileOpt)) / uint64(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } //************* End of ctime.c ********************************************** //************* Begin file global.c ***************************************** // 2008 June 13 // // 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 definitions of global variables and constants. // #include "sqliteInt.h" // 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 Xsqlite3UpperToLower = [274]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), // All of the upper-to-lower conversion data is above. The following // 18 integers are completely unrelated. They are appended to the // sqlite3UpperToLower[] array to avoid UBSAN warnings. Here's what is // going on: // // The SQL comparison operators (<>, =, >, <=, <, and >=) are implemented // by invoking sqlite3MemCompare(A,B) which compares values A and B and // returns negative, zero, or positive if A is less then, equal to, or // greater than B, respectively. Then the true false results is found by // consulting sqlite3aLTb[opcode], sqlite3aEQb[opcode], or // sqlite3aGTb[opcode] depending on whether the result of compare(A,B) // is negative, zero, or positive, where opcode is the specific opcode. // The only works because the comparison opcodes are consecutive and in // this order: NE EQ GT LE LT GE. Various assert()s throughout the code // ensure that is the case. // // These elements must be appended to another array. Otherwise the // index (here shown as [256-OP_Ne]) would be out-of-bounds and thus // be undefined behavior. That's goofy, but the C-standards people thought // it was a good idea, so here we are. // NE EQ GT LE LT GE uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21628:36 */ var Xsqlite3aLTb uintptr = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21690:36 */ var Xsqlite3aEQb uintptr = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21691:36 */ var Xsqlite3aGTb uintptr = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21692:36 */ // 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 Xsqlite3CtypeMap = [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 ........ } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21722:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is // disabled by default. // // EVIDENCE-OF: R-38799-08373 URI filenames can be enabled or disabled // using the SQLITE_USE_URI=1 or SQLITE_USE_URI=0 compile-time options. // // EVIDENCE-OF: R-43642-56306 By default, URI handling is globally // disabled. The default value may be changed by compiling with the // SQLITE_USE_URI symbol defined. // EVIDENCE-OF: R-38720-18127 The default setting is determined by the // SQLITE_ALLOW_COVERING_INDEX_SCAN compile-time option, or is "on" if // that compile-time option is omitted. // The minimum PMA size is set to this value multiplied by the database // page size in bytes. // Statement journals spill to disk when their size exceeds the following // threshold (in bytes). 0 means that statement journals are created and // written to disk immediately (the default behavior for SQLite versions // before 3.12.0). -1 means always keep the entire statement journal in // memory. (The statement journal is also always held entirely in memory // if journal_mode=MEMORY or if temp_store=MEMORY, regardless of this // setting.) // The default lookaside-configuration, the format "SZ,N". SZ is the // number of bytes in each lookaside slot (should be a multiple of 8) // and N is the number of slots. The lookaside-configuration can be // changed as start-time using sqlite3_config(SQLITE_CONFIG_LOOKASIDE) // or at run-time for an individual database connection using // sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE); // // With the two-size-lookaside enhancement, less lookaside is required. // The default configuration of 1200,40 actually provides 30 1200-byte slots // and 93 128-byte slots, which is more lookaside than is available // using the older 1200,100 configuration without two-size-lookaside. // The default maximum size of an in-memory database created using // sqlite3_deserialize() // The following singleton contains the global configuration for // the SQLite library. var Xsqlite3Config = Sqlite3Config{ FbMemstat: SQLITE_DEFAULT_MEMSTATUS, // bMemstat FbCoreMutex: U8(1), // bCoreMutex FbFullMutex: U8(libc.Bool32(SQLITE_THREADSAFE == 1)), FbUseCis: U8(SQLITE_ALLOW_COVERING_INDEX_SCAN), // bSmallMalloc FbExtraSchemaChecks: U8(1), // bExtraSchemaChecks FmxStrlen: 0x7ffffffe, // neverCorrupt FszLookaside: 1200, FnLookaside: 40, // szLookaside, nLookaside FnStmtSpill: 64 * 1024, FmxMmap: int64(SQLITE_MAX_MMAP_SIZE), // szPage FnPage: SQLITE_DEFAULT_PCACHE_INITSZ, // sharedCacheEnabled FszPma: U32(SQLITE_SORTER_PMASZ), // pLogArg FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // xAltLocaltime FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21842:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. var Xsqlite3BuiltinFunctions FuncDefHash /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21904:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses // the database page that contains the pending byte. It never attempts // to read or write that page. The pending byte page is set aside // for use by the VFS layers as space for managing file locks. // // During testing, it is often desirable to move the pending byte to // a different position in the file. This allows code that has to // deal with the pending byte to run on files that are much smaller // than 1 GiB. The sqlite3_test_control() interface can be used to // move the pending byte. // // IMPORTANT: Changing the pending byte to any value other than // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. var Xsqlite3PendingByte int32 = 0x40000000 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21945:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. var Xsqlite3SelectTrace U32 = U32(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21951:20 */ var Xsqlite3WhereTrace U32 = U32(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21952:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. var Xsqlite3OpcodeProperty = [185]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x01), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 80 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02) /* 88 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00) /* 136 */, uint8(0x00), uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10) /* 144 */, uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 176 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 184 */, uint8(0x00)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21961:36 */ // Name of the default collating sequence var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1069)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21966:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. // // sqlite3StdType[] The actual names of the datatypes. // // sqlite3StdTypeLen[] The length (in bytes) of each entry // in sqlite3StdType[]. // // sqlite3StdTypeAffinity[] The affinity associated with each entry // in sqlite3StdType[]. // // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21984:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21985:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), int8(SQLITE_INTEGER), int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:21993:27 */ var Xsqlite3StdType = [6]uintptr{ ts + 1076, ts + 1080, ts + 1085, ts + 1089, ts + 1097, ts + 1102, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22001:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** // 2008 June 18 // // 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 module implements the sqlite3_status() interface and related // functionality. // #include "sqliteInt.h" //************* Include vdbeInt.h in the middle of status.c ***************** //************* Begin file vdbeInt.h **************************************** // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22075:23 */ // Boolean values type Bool = uint32 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22080:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { FmnPmaSize int32 FmxPmaSize int32 FmxKeysize int32 Fpgsz int32 FpReader uintptr FpMerger uintptr Fdb uintptr FpKeyInfo uintptr FpUnpacked uintptr Flist SorterList FiMemory int32 FnMemory int32 FbUsePMA U8 FbUseThreads U8 FiPrev U8 FnTask U8 FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // Opaque type used by code in vdbesort.c type VdbeSorter = VdbeSorter1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { FiAuxOp int32 FiAuxArg int32 FpAux uintptr FxDeleteAux uintptr FpNextAux uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData type AuxData = AuxData1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22086: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 F__ccgo_pad1 [3]byte FisEphemeral uint8 /* Bool isEphemeral: 1, Bool useRandomRowid: 1, Bool isOrdered: 1, Bool hasBeenDuped: 1 */ F__ccgo_pad2 [1]byte FseekHit U16 F__ccgo_pad3 [4]byte Fub struct{ FpBtx uintptr } FseqCount I64 FcacheStatus U32 FseekResult int32 FpAltCursor uintptr Fuc struct{ FpCursor uintptr } FpKeyInfo uintptr FiHdrOffset U32 FpgnoRoot Pgno FnField I16 FnHdrParsed U16 F__ccgo_pad4 [4]byte FmovetoTarget I64 FaOffset uintptr FaRow uintptr FpayloadSize U32 FszRow U32 FaType [1]U32 F__ccgo_pad5 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22104: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 I64 FnDbChange I64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22193: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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. type Bft = uint32 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22376: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 F__ccgo_pad1 [6]byte FzName uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22381:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. type ScanStatus = ScanStatus1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22381: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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22398: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22398:28 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the // set of values on the right-hand side of an IN constraint. // // The value as passed into xFilter is an sqlite3_value with a "pointer" // type, such as is generated by sqlite3_result_pointer() and read by // sqlite3_value_pointer. Such values have MEM_Term|MEM_Subtype|MEM_Null // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. type ValueList1 = struct { FpCsr uintptr FpOut uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22526:9 */ // An instance of this object is used to pass an vector of values into // OP_VFilter, the xFilter method of a virtual table. The vector is the // set of values on the right-hand side of an IN constraint. // // The value as passed into xFilter is an sqlite3_value with a "pointer" // type, such as is generated by sqlite3_result_pointer() and read by // sqlite3_value_pointer. Such values have MEM_Term|MEM_Subtype|MEM_Null // and a subtype of 'p'. The sqlite3_vtab_in_first() and _next() interfaces // know how to use this object to step through all the values in the // right operand of the IN constraint. type ValueList = ValueList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22526:26 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. type Sqlite3StatValueType = Sqlite3_int64 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22689:23 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22693:9 */ type Sqlite3StatType = sqlite3StatType /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22693:32 */ var sqlite3Stat = sqlite3StatType{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22697:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. var statMutex = [10]int8{ int8(0), // SQLITE_STATUS_MEMORY_USED int8(1), // SQLITE_STATUS_PAGECACHE_USED int8(1), // SQLITE_STATUS_PAGECACHE_OVERFLOW int8(0), // SQLITE_STATUS_SCRATCH_USED int8(0), // SQLITE_STATUS_SCRATCH_OVERFLOW int8(0), // SQLITE_STATUS_MALLOC_SIZE int8(0), // SQLITE_STATUS_PARSER_STACK int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22703:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, // we have to locate the state vector at run-time. In the more common // case where writable static data is supported, wsdStat can refer directly // to the "sqlite3Stat" state vector declared above. // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22735:30: */ return *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } // Add N to the value of a status record. The caller must hold the // appropriate mutex. (Locking is checked by assert()). // // The StatusUp() routine can accept positive or negative values for N. // The value of N is added to the current status value and the high-water // mark is adjusted if necessary. // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22755:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } } func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22766:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22780:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) if newValue > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) { *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = newValue } } // Query status information. func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22800:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint64(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint64(unsafe.Sizeof(Sqlite3StatValueType(0)))) { return Xsqlite3MisuseError(tls, 22809) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) } else { pMutex = Xsqlite3MallocMutex(tls) } Xsqlite3_mutex_enter(tls, pMutex) *(*Sqlite3_int64)(unsafe.Pointer(pCurrent)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) *(*Sqlite3_int64)(unsafe.Pointer(pHighwater)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) if resetFlag != 0 { *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 80 + uintptr(op)*8)) = *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*8)) } Xsqlite3_mutex_leave(tls, pMutex) _ = pMutex // Prevent warning when SQLITE_THREADSAFE=0 return SQLITE_OK } func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22825:16: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */)) = int64(0) *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */)) = int64(0) var rc int32 rc = Xsqlite3_status64(tls, op, bp, bp+8, resetFlag) if rc == 0 { *(*int32)(unsafe.Pointer(pCurrent)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */))) *(*int32)(unsafe.Pointer(pHighwater)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */))) } return rc } // Return the number of LookasideSlot elements on the linked list func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22842:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext cnt++ } return cnt } // Count the number of slots of lookaside memory that are outstanding func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22854:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) nFree = nFree + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree) if pHighwater != 0 { *(*int32)(unsafe.Pointer(pHighwater)) = int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot - nInit) } return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FnSlot - (nInit + nFree)) } // Query status information for a single database connection func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22868:16: */ bp := tls.Alloc(12) defer tls.Free(12) var rc int32 = SQLITE_OK // Return code Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) switch op { case SQLITE_DBSTATUS_LOOKASIDE_USED: { *(*int32)(unsafe.Pointer(pCurrent)) = Xsqlite3LookasideUsed(tls, db, pHighwater) if resetFlag != 0 { var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree if p != 0 { for (*LookasideSlot)(unsafe.Pointer(p)).FpNext != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext } (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = uintptr(0) } p = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree if p != 0 { for (*LookasideSlot)(unsafe.Pointer(p)).FpNext != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext } (*LookasideSlot)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = uintptr(0) } } break } case SQLITE_DBSTATUS_LOOKASIDE_HIT: fallthrough case SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE: fallthrough case SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: { *(*int32)(unsafe.Pointer(pCurrent)) = 0 *(*int32)(unsafe.Pointer(pHighwater)) = int32(*(*U32)(unsafe.Pointer(db + 440 + 16 + uintptr(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)*4))) if resetFlag != 0 { *(*U32)(unsafe.Pointer(db + 440 + 16 + uintptr(op-SQLITE_DBSTATUS_LOOKASIDE_HIT)*4)) = U32(0) } break } // Return an approximation for the amount of memory currently used // by all pagers associated with the given database connection. The // highwater mark is meaningless and is returned as zero. case SQLITE_DBSTATUS_CACHE_USED_SHARED: fallthrough case SQLITE_DBSTATUS_CACHE_USED: { var totalUsed int32 = 0 var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { var pPager uintptr = Xsqlite3BtreePager(tls, pBt) var nByte int32 = Xsqlite3PagerMemUsed(tls, pPager) if op == SQLITE_DBSTATUS_CACHE_USED_SHARED { nByte = nByte / Xsqlite3BtreeConnectionCount(tls, pBt) } totalUsed = totalUsed + nByte } } Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pCurrent)) = totalUsed *(*int32)(unsafe.Pointer(pHighwater)) = 0 break } // *pCurrent gets an accurate estimate of the amount of memory used // to store the schema for all databases (main, temp, and any ATTACHed // databases. *pHighwater is set to zero. case SQLITE_DBSTATUS_SCHEMA_USED: { var i int32 // Used to iterate through schemas *(*int32)(unsafe.Pointer(bp /* nByte */)) = 0 // Used to accumulate return value Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp /* &nByte */ for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpSchema if pSchema != uintptr(0) { var p uintptr *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(uint32((*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(unsafe.Sizeof(HashElem{})))) * ((*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fcount + (*Schema)(unsafe.Pointer(pSchema)).FtrigHash.Fcount + (*Schema)(unsafe.Pointer(pSchema)).FidxHash.Fcount + (*Schema)(unsafe.Pointer(pSchema)).FfkeyHash.Fcount)) *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FtblHash.Fht)) *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FtrigHash.Fht)) *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FidxHash.Fht)) *(*int32)(unsafe.Pointer(bp /* nByte */)) += int32(Xsqlite3_msize(tls, (*Schema)(unsafe.Pointer(pSchema)).FfkeyHash.Fht)) for p = (*Hash)(unsafe.Pointer(pSchema + 56)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { Xsqlite3DeleteTrigger(tls, db, (*HashElem)(unsafe.Pointer(p)).Fdata) } for p = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; p != 0; p = (*HashElem)(unsafe.Pointer(p)).Fnext { Xsqlite3DeleteTable(tls, db, (*HashElem)(unsafe.Pointer(p)).Fdata) } } } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) Xsqlite3BtreeLeaveAll(tls, db) *(*int32)(unsafe.Pointer(pHighwater)) = 0 *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp /* nByte */)) break } // *pCurrent gets an accurate estimate of the amount of memory used // to store all prepared statements. // *pHighwater is set to zero. case SQLITE_DBSTATUS_STMT_USED: { var pVdbe uintptr // Used to iterate through VMs *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)) = 0 // Used to accumulate return value (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp + 4 /* &nByte */ for pVdbe = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; pVdbe != 0; pVdbe = (*Vdbe1)(unsafe.Pointer(pVdbe)).FpNext { Xsqlite3VdbeClearObject(tls, db, pVdbe) Xsqlite3DbFree(tls, db, pVdbe) } (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-64479-57858 *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)) break } // Set *pCurrent to the total cache hits or misses encountered by all // pagers the database handle is connected to. *pHighwater is always set // to zero. case SQLITE_DBSTATUS_CACHE_SPILL: op = SQLITE_DBSTATUS_CACHE_WRITE + 1 fallthrough case SQLITE_DBSTATUS_CACHE_HIT: fallthrough case SQLITE_DBSTATUS_CACHE_MISS: fallthrough case SQLITE_DBSTATUS_CACHE_WRITE: { var i int32 *(*int32)(unsafe.Pointer(bp + 8 /* nRet */)) = 0 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt != 0 { var pPager uintptr = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt) Xsqlite3PagerCacheStat(tls, pPager, op, resetFlag, bp+8) } } *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-42420-56072 // IMP: R-54100-20147 // IMP: R-29431-39229 *(*int32)(unsafe.Pointer(pCurrent)) = *(*int32)(unsafe.Pointer(bp + 8 /* nRet */)) break } // Set *pCurrent to non-zero if there are unresolved deferred foreign // key constraints. Set *pCurrent to zero if all foreign key constraints // have been satisfied. The *pHighwater is always set to zero. case SQLITE_DBSTATUS_DEFERRED_FKS: { *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-11967-56545 *(*int32)(unsafe.Pointer(pCurrent)) = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons > int64(0)) break } default: { rc = SQLITE_ERROR } } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } //************* End of status.c ********************************************* //************* Begin file date.c ******************************************* // 2003 October 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. // // // This file contains the C functions that implement date and time // functions for SQLite. // // There is only one exported symbol in this file - the function // sqlite3RegisterDateTimeFunctions() found at the bottom of the file. // All other code has file scope. // // SQLite processes all times and dates as julian day numbers. The // dates and times are stored as the number of days since noon // in Greenwich on November 24, 4714 B.C. according to the Gregorian // calendar system. // // 1970-01-01 00:00:00 is JD 2440587.5 // 2000-01-01 00:00:00 is JD 2451544.5 // // This implementation requires years to be expressed as a 4-digit number // which means that only dates between 0000-01-01 and 9999-12-31 can // be represented, even though julian day numbers allow a much wider // range of dates. // // The Gregorian calendar system is used for all dates and times, // even those that predate the Gregorian calendar. Historians usually // use the julian calendar for dates prior to 1582-10-15 and for some // dates afterwards, depending on locale. Beware of this difference. // // The conversion algorithms are implemented based on descriptions // in the following text: // // Jean Meeus // Astronomical Algorithms, 2nd Edition, 1998 // ISBN 0-943396-61-1 // Willmann-Bell, Inc // Richmond, Virginia (USA) // #include "sqliteInt.h" // #include <stdlib.h> // #include <assert.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. type Clock_t = int32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/time.h:97:3 */ func localtime(tls *libc.TLS, _Time uintptr) uintptr { /* /usr/x86_64-w64-mingw32/include/time.h:232:27: */ return libc.X_localtime64(tls, _Time) } var Xdaylight int32 /* /usr/x86_64-w64-mingw32/include/time.h:256:22: */ var Xtimezone int32 /* /usr/x86_64-w64-mingw32/include/time.h:257:23: */ var Xtzname [2]uintptr /* /usr/x86_64-w64-mingw32/include/time.h:258: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 timeval = struct { Ftv_sec int32 Ftv_usec int32 } /* /usr/x86_64-w64-mingw32/include/_timeval.h:10:1 */ type timezone = struct { Ftz_minuteswest int32 Ftz_dsttime int32 } /* /usr/x86_64-w64-mingw32/include/time.h:266: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 X__time32_t Fmillitm uint16 Ftimezone int16 Fdstflag int16 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/sys/timeb.h:53:3 */ type timeb = struct { Ftime Time_t Fmillitm uint16 Ftimezone int16 Fdstflag int16 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/sys/timeb.h:61:3 */ type __timeb64 = struct { Ftime X__time64_t Fmillitm uint16 Ftimezone int16 Fdstflag int16 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/sys/timeb.h:69:3 */ type timespec = struct { Ftv_sec Time_t Ftv_nsec int32 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/sys/timeb.h:91:1 */ type itimerspec = struct { Fit_interval struct { Ftv_sec Time_t Ftv_nsec int32 F__ccgo_pad1 [4]byte } Fit_value struct { Ftv_sec Time_t Ftv_nsec int32 F__ccgo_pad1 [4]byte } } /* /usr/x86_64-w64-mingw32/include/sys/timeb.h:96:1 */ // 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 /* /usr/x86_64-w64-mingw32/include/pthread_time.h:49:13 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. type DateTime1 = struct { FiJD Sqlite3_int64 FY int32 FM int32 FD int32 Fh int32 Fm int32 Ftz int32 Fs float64 FvalidJD int8 FrawS int8 FvalidYMD int8 FvalidHMS int8 FvalidTZ int8 FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23128:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. type DateTime = DateTime1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23128:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. // // zFormat[] contains 4 characters for each integer converted, except for // the last integer which is specified by three characters. The meaning // of a four-character format specifiers ABCD is: // // A: number of digits to convert. Always "2" or "4". // B: minimum value. Always "0" or "1". // C: maximum value, decoded as: // a: 12 // b: 14 // c: 24 // d: 31 // e: 59 // f: 9999 // D: the separator character, or \000 to indicate this is the // last number to convert. // // Example: To translate an ISO-8601 date YYYY-MM-DD, the format would // be "40f-21a-20c". The "40f-" indicates the 4-digit year followed by "-". // The "21a-" indicates the 2-digit month followed by "-". The "20c" indicates // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23172:12: */ var ap Va_list _ = ap var cnt int32 var nextC int8 var N int8 var min int8 var val int32 var max U16 cnt = 0 ap = va __1: N = int8(int32(*(*int8)(unsafe.Pointer(zFormat))) - '0') min = int8(int32(*(*int8)(unsafe.Pointer(zFormat + 1))) - '0') val = 0 max = aMx[int32(*(*int8)(unsafe.Pointer(zFormat + 2)))-'a'] nextC = *(*int8)(unsafe.Pointer(zFormat + 3)) val = 0 __4: if !(libc.PostDecInt8(&N, 1) != 0) { goto __5 } if !!(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))])&0x04 != 0) { goto __6 } goto end_getDigits __6: ; val = val*10 + int32(*(*int8)(unsafe.Pointer(zDate))) - '0' zDate++ goto __4 __5: ; if !(val < int32(min) || val > int32(max) || int32(nextC) != 0 && int32(nextC) != int32(*(*int8)(unsafe.Pointer(zDate)))) { goto __7 } goto end_getDigits __7: ; *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = val zDate++ cnt++ zFormat += uintptr(4) goto __2 __2: if nextC != 0 { goto __1 } goto __3 __3: ; end_getDigits: _ = ap return cnt } var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23175:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: // // (+/-)HH:MM // // Or the "zulu" notation: // // Z // // If the parse is successful, write the number of minutes // of change in p->tz and return 0. If a parser error occurs, // return non-zero. // // A missing specifier is not considered an error. func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23226:12: */ bp := tls.Alloc(24) defer tls.Free(24) var sgn int32 // var nHr int32 at bp+16, 4 // var nMn int32 at bp+20, 4 var c int32 sgn = 0 __1: if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))])&0x01 != 0) { goto __2 } zDate++ goto __1 __2: ; (*DateTime)(unsafe.Pointer(p)).Ftz = 0 c = int32(*(*int8)(unsafe.Pointer(zDate))) if !(c == '-') { goto __3 } sgn = -1 goto __4 __3: if !(c == '+') { goto __5 } sgn = +1 goto __6 __5: if !(c == 'Z' || c == 'z') { goto __7 } zDate++ goto zulu_time goto __8 __7: return libc.Bool32(c != 0) __8: ; __6: ; __4: ; zDate++ if !(getDigits(tls, zDate, ts+1107, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 __9: ; zDate += uintptr(5) (*DateTime)(unsafe.Pointer(p)).Ftz = sgn * (*(*int32)(unsafe.Pointer(bp + 20)) + *(*int32)(unsafe.Pointer(bp + 16))*60) zulu_time: __10: if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))])&0x01 != 0) { goto __11 } zDate++ goto __10 __11: ; (*DateTime)(unsafe.Pointer(p)).FtzSet = int8(1) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(zDate))) != 0) } // Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF. // The HH, MM, and SS must each be exactly 2 digits. The // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23262:12: */ bp := tls.Alloc(36) defer tls.Free(36) // var h int32 at bp+24, 4 // var m int32 at bp+28, 4 // var s int32 at bp+32, 4 var ms float64 = 0.0 if getDigits(tls, zDate, ts+1115, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ if getDigits(tls, zDate, ts+1123, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) if int32(*(*int8)(unsafe.Pointer(zDate))) == '.' && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate + 1)))])&0x04 != 0 { var rScale float64 = 1.0 zDate++ for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))])&0x04 != 0 { ms = ms*10.0 + float64(*(*int8)(unsafe.Pointer(zDate))) - float64('0') rScale = rScale * 10.0 zDate++ } ms = ms / rScale } } else { *(*int32)(unsafe.Pointer(bp + 32 /* s */)) = 0 } (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).Fh = *(*int32)(unsafe.Pointer(bp + 24 /* h */)) (*DateTime)(unsafe.Pointer(p)).Fm = *(*int32)(unsafe.Pointer(bp + 28 /* m */)) (*DateTime)(unsafe.Pointer(p)).Fs = float64(*(*int32)(unsafe.Pointer(bp + 32))) + ms if parseTimezone(tls, zDate, p) != 0 { return 1 } (*DateTime)(unsafe.Pointer(p)).FvalidTZ = func() int8 { if (*DateTime)(unsafe.Pointer(p)).Ftz != 0 { return int8(1) } return int8(0) }() return 0 } // Put the DateTime object into its error state. func datetimeError(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23302:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } // Convert from YYYY-MM-DD HH:MM:SS to julian day. We always assume // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 func computeJD(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23313:13: */ var Y int32 var M int32 var D int32 var A int32 var B int32 var X1 int32 var X2 int32 if (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 { return } if (*DateTime)(unsafe.Pointer(p)).FvalidYMD != 0 { Y = (*DateTime)(unsafe.Pointer(p)).FY M = (*DateTime)(unsafe.Pointer(p)).FM D = (*DateTime)(unsafe.Pointer(p)).FD } else { Y = 2000 // If no YMD specified, assume 2000-Jan-01 M = 1 D = 1 } if Y < -4713 || Y > 9999 || (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { datetimeError(tls, p) return } if M <= 2 { Y-- M = M + 12 } A = Y / 100 B = 2 - A + A/4 X1 = 36525 * (Y + 4716) / 100 X2 = 306001 * (M + 1) / 10000 (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64((float64(X1+X2+D+B) - 1524.5) * float64(86400000)) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { *(*Sqlite3_int64)(unsafe.Pointer(p)) += Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Fh*3600000+(*DateTime)(unsafe.Pointer(p)).Fm*60000) + libc.Int64FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs*float64(1000)) if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 { *(*Sqlite3_int64)(unsafe.Pointer(p)) -= Sqlite3_int64((*DateTime)(unsafe.Pointer(p)).Ftz * 60000) (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) } } } // Parse dates of the form // // YYYY-MM-DD HH:MM:SS.FFF // YYYY-MM-DD HH:MM:SS // YYYY-MM-DD HH:MM // YYYY-MM-DD // // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23363:12: */ bp := tls.Alloc(36) defer tls.Free(36) // var Y int32 at bp+24, 4 // var M int32 at bp+28, 4 // var D int32 at bp+32, 4 var neg int32 if int32(*(*int8)(unsafe.Pointer(zDate))) == '-' { zDate++ neg = 1 } else { neg = 0 } if getDigits(tls, zDate, ts+1127, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))])&0x01 != 0 || 'T' == int32(*(*U8)(unsafe.Pointer(zDate))) { zDate++ } if parseHhMmSs(tls, zDate, p) == 0 { // We got the time } else if int32(*(*int8)(unsafe.Pointer(zDate))) == 0 { (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) } else { return 1 } (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FY = func() int32 { if neg != 0 { return -*(*int32)(unsafe.Pointer(bp + 24 /* Y */)) } return *(*int32)(unsafe.Pointer(bp + 24 /* Y */)) }() (*DateTime)(unsafe.Pointer(p)).FM = *(*int32)(unsafe.Pointer(bp + 28 /* M */)) (*DateTime)(unsafe.Pointer(p)).FD = *(*int32)(unsafe.Pointer(bp + 32 /* D */)) if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 { computeJD(tls, p) } return 0 } // Set the time to the current time reported by the VFS. // // Return the number of errors. func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23400:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) return 0 } else { return 1 } return int32(0) } // Input "r" is a numeric quantity which might be a julian day number, // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23416:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(r*86400000.0 + 0.5) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) } } // Attempt to parse the given string into a julian day number. Return // the number of errors. // // The following are acceptable forms for the input string: // // YYYY-MM-DD HH:MM:SS.FFF +/-HH:MM // DDDD.DD // now // // In the first form, the +/-HH:MM is always optional. The fractional // seconds extension (the ".FFF") is optional. The seconds portion // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23441:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var r float64 at bp, 8 if parseYyyyMmDd(tls, zDate, p) == 0 { return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 } else if Xsqlite3StrICmp(tls, zDate, ts+1139) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { return setDateTimeToCurrent(tls, context, p) } else if Xsqlite3AtoF(tls, zDate, bp, Xsqlite3Strlen30(tls, zDate), uint8(SQLITE_UTF8)) > 0 { setRawDateNumber(tls, p, *(*float64)(unsafe.Pointer(bp /* r */))) return 0 } return 1 } // The julian day number for 9999-12-31 23:59:59.999 is 5373484.4999999. // Multiplying this by 86400000 gives 464269060799999 as the maximum value // for DateTime.iJD. // // But some older compilers (ex: gcc 4.2.1 on older Macs) cannot deal with // such a large integer literal, so we have to encode it. // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23474:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. func computeYMD(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23481:13: */ var Z int32 var A int32 var B int32 var C int32 var D int32 var E int32 var X1 int32 if (*DateTime)(unsafe.Pointer(p)).FvalidYMD != 0 { return } if !(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) { (*DateTime)(unsafe.Pointer(p)).FY = 2000 (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 } else if !(validJulianDay(tls, (*DateTime)(unsafe.Pointer(p)).FiJD) != 0) { datetimeError(tls, p) return } else { Z = int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) / int64(86400000)) A = libc.Int32FromFloat64((float64(Z) - 1867216.25) / 36524.25) A = Z + 1 + A - A/4 B = A + 1524 C = libc.Int32FromFloat64((float64(B) - 122.1) / 365.25) D = 36525 * (C & 32767) / 100 E = libc.Int32FromFloat64(float64(B-D) / 30.6001) X1 = libc.Int32FromFloat64(30.6001 * float64(E)) (*DateTime)(unsafe.Pointer(p)).FD = B - D - X1 (*DateTime)(unsafe.Pointer(p)).FM = func() int32 { if E < 14 { return E - 1 } return E - 13 }() (*DateTime)(unsafe.Pointer(p)).FY = func() int32 { if (*DateTime)(unsafe.Pointer(p)).FM > 2 { return C - 4716 } return C - 4715 }() } (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) } // Compute the Hour, Minute, and Seconds from the julian day number. func computeHMS(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23510:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return } computeJD(tls, p) s = int32(((*DateTime)(unsafe.Pointer(p)).FiJD + int64(43200000)) % int64(86400000)) (*DateTime)(unsafe.Pointer(p)).Fs = float64(s) / 1000.0 s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(p)).Fs) *(*float64)(unsafe.Pointer(p + 32)) -= float64(s) (*DateTime)(unsafe.Pointer(p)).Fh = s / 3600 s = s - (*DateTime)(unsafe.Pointer(p)).Fh*3600 (*DateTime)(unsafe.Pointer(p)).Fm = s / 60 *(*float64)(unsafe.Pointer(p + 32)) += float64(s - (*DateTime)(unsafe.Pointer(p)).Fm*60) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) } // Compute both YMD and HMS func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23529:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23537:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) } // On recent Windows platforms, the localtime_s() function is available // as part of the "Secure CRT". It is essentially equivalent to // localtime_r() available under most POSIX platforms, except that the // order of the parameters is reversed. // // See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx. // // If the user has not indicated to use localtime_r() or localtime_s() // already, check for an MSVC build environment that provides // localtime_s(). // The following routine implements the rough equivalent of localtime_r() // using whatever operating-system specific localtime facility that // is available. This routine returns 0 on success and // non-zero on any kind of error. // // If the sqlite3GlobalConfig.bLocaltimeFault variable is non-zero then this // routine will always fail. If bLocaltimeFault is nonzero and // sqlite3GlobalConfig.xAltLocaltime is not NULL, then xAltLocaltime() is // invoked in place of the OS-defined localtime() function. // // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23577:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) pX = localtime(tls, t) if Xsqlite3Config.FbLocaltimeFault != 0 { if Xsqlite3Config.FxAltLocaltime != uintptr(0) && 0 == (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxAltLocaltime})).f(tls, t, pTm) { pX = pTm } else { pX = uintptr(0) } } if pX != 0 { *(*tm)(unsafe.Pointer(pTm)) = *(*tm)(unsafe.Pointer(pX)) } Xsqlite3_mutex_leave(tls, mutex) rc = libc.Bool32(pX == uintptr(0)) return rc } // Assuming the input DateTime is UTC, move it to its localtime equivalent. func toLocaltime(tls *libc.TLS, p uintptr, pCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23627:12: */ bp := tls.Alloc(96) defer tls.Free(96) // var t Time_t at bp+88, 8 // var sLocal tm at bp, 36 var iYearDiff int32 // Initialize the contents of sLocal to avoid a compiler warning. libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(tm{}))) computeJD(tls, p) if (*DateTime)(unsafe.Pointer(p)).FiJD < int64(2108667600)*int64(100000) || (*DateTime)(unsafe.Pointer(p)).FiJD > int64(2130141456)*int64(100000) { // EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only // works for years between 1970 and 2037. For dates outside this range, // SQLite attempts to map the year into an equivalent year within this // range, do the calculation, then map the year back. *(*DateTime)(unsafe.Pointer(bp + 40 /* x */)) = *(*DateTime)(unsafe.Pointer(p)) computeYMD_HMS(tls, bp+40) iYearDiff = 2000 + (*DateTime)(unsafe.Pointer(bp+40)).FY%4 - (*DateTime)(unsafe.Pointer(bp+40)).FY *(*int32)(unsafe.Pointer(bp + 40 + 8)) += iYearDiff (*DateTime)(unsafe.Pointer(bp + 40 /* &x */)).FvalidJD = int8(0) computeJD(tls, bp+40) *(*Time_t)(unsafe.Pointer(bp + 88 /* t */)) = (*DateTime)(unsafe.Pointer(bp+40)).FiJD/int64(1000) - int64(21086676)*int64(10000) } else { iYearDiff = 0 *(*Time_t)(unsafe.Pointer(bp + 88 /* t */)) = (*DateTime)(unsafe.Pointer(p)).FiJD/int64(1000) - int64(21086676)*int64(10000) } if osLocaltime(tls, bp+88, bp) != 0 { Xsqlite3_result_error(tls, pCtx, ts+1143, -1) return SQLITE_ERROR } (*DateTime)(unsafe.Pointer(p)).FY = (*tm)(unsafe.Pointer(bp)).Ftm_year + 1900 - iYearDiff (*DateTime)(unsafe.Pointer(p)).FM = (*tm)(unsafe.Pointer(bp)).Ftm_mon + 1 (*DateTime)(unsafe.Pointer(p)).FD = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_mday (*DateTime)(unsafe.Pointer(p)).Fh = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_hour (*DateTime)(unsafe.Pointer(p)).Fm = (*tm)(unsafe.Pointer(bp /* &sLocal */)).Ftm_min (*DateTime)(unsafe.Pointer(p)).Fs = float64((*tm)(unsafe.Pointer(bp)).Ftm_sec) + float64((*DateTime)(unsafe.Pointer(p)).FiJD%int64(1000))*0.001 (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FisError = int8(0) return SQLITE_OK } // The following table defines various date transformations of the form // // 'NNN days' // // Where NNN is an arbitrary floating-point number and "days" can be one // of several units of time. var aXformType = [6]struct { FnName U8 FzName [7]int8 FrLimit float32 FrXform float32 }{ {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1166 /* "second" */)), FrLimit: 4.6427e+14, FrXform: 1.0}, {FnName: U8(6), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1173 /* "minute" */)), FrLimit: 7.7379e+12, FrXform: 60.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1180 /* "hour\x00\x00" */)), FrLimit: 1.2897e+11, FrXform: 3600.0}, {FnName: U8(3), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1187 /* "day\x00\x00\x00" */)), FrLimit: 5373485.0, FrXform: 86400.0}, {FnName: U8(5), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1194 /* "month\x00" */)), FrLimit: 176546.0, FrXform: 2592000.0}, {FnName: U8(4), FzName: *(*[7]int8)(unsafe.Pointer(ts + 1201 /* "year\x00\x00" */)), FrLimit: 14713.0, FrXform: 31536000.0}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23691:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: // // NNN days // NNN hours // NNN minutes // NNN.NNNN seconds // NNN months // NNN years // start of month // start of year // start of week // start of day // weekday N // unixepoch // localtime // utc // // Return 0 on success and 1 if there is any kind of error. If the error // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr, idx int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23724:12: */ bp := tls.Alloc(104) defer tls.Free(104) var rc int32 = 1 // var r float64 at bp+48, 8 switch int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z)))]) { case 'a': { // auto // // If rawS is available, then interpret as a julian day number, or // a unix timestamp, depending on its magnitude. if Xsqlite3_stricmp(tls, z, ts+1208) == 0 { if idx > 1 { return 1 } // IMP: R-33611-57934 if !(int32((*DateTime)(unsafe.Pointer(p)).FrawS) != 0) || (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 { rc = 0 (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) } else if (*DateTime)(unsafe.Pointer(p)).Fs >= float64(int64(-21086676)*int64(10000)) && (*DateTime)(unsafe.Pointer(p)).Fs <= float64(int64(25340230)*int64(10000)+int64(799)) { *(*float64)(unsafe.Pointer(bp + 48 /* r */)) = (*DateTime)(unsafe.Pointer(p)).Fs*1000.0 + 210866760000000.0 clearYMD_HMS_TZ(tls, p) (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48)) + 0.5) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } } break } case 'j': { // julianday // // Always interpret the prior number as a julian-day value. If this // is not the first modifier, or if the prior argument is not a numeric // value in the allowed range of julian day numbers understood by // SQLite (0..5373484.5) then the result will be NULL. if Xsqlite3_stricmp(tls, z, ts+1213) == 0 { if idx > 1 { return 1 } // IMP: R-31176-64601 if (*DateTime)(unsafe.Pointer(p)).FvalidJD != 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { rc = 0 (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) } } break } case 'l': { // localtime // // Assuming the current time value is UTC (a.k.a. GMT), shift it to // show local time. if Xsqlite3_stricmp(tls, z, ts+1223) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { rc = toLocaltime(tls, p, pCtx) } break } case 'u': { // unixepoch // // Treat the current value of p->s as the number of // seconds since 1970. Convert to a real julian day number. if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { if idx > 1 { return 1 } // IMP: R-49255-55373 *(*float64)(unsafe.Pointer(bp + 48 /* r */)) = (*DateTime)(unsafe.Pointer(p)).Fs*1000.0 + 210866760000000.0 if *(*float64)(unsafe.Pointer(bp + 48)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 48)) < 464269060800000.0 { clearYMD_HMS_TZ(tls, p) (*DateTime)(unsafe.Pointer(p)).FiJD = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48)) + 0.5) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) rc = 0 } } else if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var iOrigJD I64 // Original localtime var iGuess I64 // Guess at the corresponding utc time var cnt int32 = 0 // Safety to prevent infinite loop var iErr int32 // Guess is off by this much computeJD(tls, p) iGuess = libc.AssignInt64(&iOrigJD, (*DateTime)(unsafe.Pointer(p)).FiJD) iErr = 0 for __ccgo := true; __ccgo; __ccgo = iErr != 0 && libc.PostIncInt32(&cnt, 1) < 3 { // var new DateTime at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(DateTime{}))) iGuess = iGuess - I64(iErr) (*DateTime)(unsafe.Pointer(bp /* &new */)).FiJD = iGuess (*DateTime)(unsafe.Pointer(bp /* &new */)).FvalidJD = int8(1) rc = toLocaltime(tls, bp, pCtx) if rc != 0 { return rc } computeJD(tls, bp) iErr = int32((*DateTime)(unsafe.Pointer(bp)).FiJD - iOrigJD) } libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FiJD = iGuess (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) (*DateTime)(unsafe.Pointer(p)).FtzSet = int8(1) } rc = SQLITE_OK } break } case 'w': { // weekday N // // Move the date to the same time on the next occurrence of // weekday N where 0==Sunday, 1==Monday, and so forth. If the // date is already on the appropriate weekday, this is a no-op. if Xsqlite3_strnicmp(tls, z, ts+1247, 8) == 0 && Xsqlite3AtoF(tls, z+8, bp+48, Xsqlite3Strlen30(tls, z+8), uint8(SQLITE_UTF8)) > 0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 48))))) == *(*float64)(unsafe.Pointer(bp + 48)) && n >= 0 && *(*float64)(unsafe.Pointer(bp + 48)) < float64(7) { var Z Sqlite3_int64 computeYMD_HMS(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) computeJD(tls, p) Z = ((*DateTime)(unsafe.Pointer(p)).FiJD + int64(129600000)) / int64(86400000) % int64(7) if Z > Sqlite3_int64(n) { Z = Z - int64(7) } *(*Sqlite3_int64)(unsafe.Pointer(p)) += (Sqlite3_int64(n) - Z) * int64(86400000) clearYMD_HMS_TZ(tls, p) rc = 0 } break } case 's': { // start of TTTTT // // Move the date backwards to the beginning of the current day, // or month or year. if Xsqlite3_strnicmp(tls, z, ts+1256, 9) != 0 { break } if !(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidYMD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidHMS) != 0) { break } z += uintptr(9) computeYMD(tls, p) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) (*DateTime)(unsafe.Pointer(p)).Fh = libc.AssignPtrInt32(p+24, 0) (*DateTime)(unsafe.Pointer(p)).Fs = 0.0 (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) if Xsqlite3_stricmp(tls, z, ts+1266) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 } else if Xsqlite3_stricmp(tls, z, ts+1272) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 rc = 0 } else if Xsqlite3_stricmp(tls, z, ts+1277) == 0 { rc = 0 } break } case '+': fallthrough case '-': fallthrough case '0': fallthrough case '1': fallthrough case '2': fallthrough case '3': fallthrough case '4': fallthrough case '5': fallthrough case '6': fallthrough case '7': fallthrough case '8': fallthrough case '9': { var rRounder float64 var i int32 for n = 1; *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 && int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) != ':' && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(n))))])&0x01 != 0); n++ { } if Xsqlite3AtoF(tls, z, bp+48, n, uint8(SQLITE_UTF8)) <= 0 { rc = 1 break } if int32(*(*int8)(unsafe.Pointer(z + uintptr(n)))) == ':' { // A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the // specified number of hours, minutes, seconds, and fractional seconds // to the time. The ".FFF" may be omitted. The ":SS.FFF" may be // omitted. var z2 uintptr = z // var tx DateTime at bp+56, 48 var day Sqlite3_int64 if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z2)))])&0x04 != 0) { z2++ } libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(DateTime{}))) if parseHhMmSs(tls, z2, bp+56) != 0 { break } computeJD(tls, bp+56) *(*Sqlite3_int64)(unsafe.Pointer(bp + 56)) -= int64(43200000) day = (*DateTime)(unsafe.Pointer(bp+56)).FiJD / int64(86400000) *(*Sqlite3_int64)(unsafe.Pointer(bp + 56)) -= day * int64(86400000) if int32(*(*int8)(unsafe.Pointer(z))) == '-' { (*DateTime)(unsafe.Pointer(bp + 56 /* &tx */)).FiJD = -(*DateTime)(unsafe.Pointer(bp + 56 /* &tx */)).FiJD } computeJD(tls, p) clearYMD_HMS_TZ(tls, p) *(*Sqlite3_int64)(unsafe.Pointer(p)) += (*DateTime)(unsafe.Pointer(bp + 56)).FiJD rc = 0 break } // If control reaches this point, it means the transformation is // one of the forms like "+NNN days". z += uintptr(n) for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x01 != 0 { z++ } n = Xsqlite3Strlen30(tls, z) if n > 10 || n < 3 { break } if int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(z + uintptr(n-1))))]) == 's' { n-- } computeJD(tls, p) rc = 1 if *(*float64)(unsafe.Pointer(bp + 48)) < float64(0) { rRounder = -0.5 } else { rRounder = +0.5 } for i = 0; i < int32(uint64(unsafe.Sizeof(aXformType))/uint64(unsafe.Sizeof(struct { FnName U8 FzName [7]int8 FrLimit float32 FrXform float32 }{}))); i++ { if int32(aXformType[i].FnName) == n && Xsqlite3_strnicmp(tls, uintptr(unsafe.Pointer(&aXformType))+uintptr(i)*16+1, z, n) == 0 && *(*float64)(unsafe.Pointer(bp + 48)) > float64(-aXformType[i].FrLimit) && *(*float64)(unsafe.Pointer(bp + 48)) < float64(aXformType[i].FrLimit) { switch i { case 4: { // Special processing to add months var x int32 computeYMD_HMS(tls, p) *(*int32)(unsafe.Pointer(p + 12)) += int32(*(*float64)(unsafe.Pointer(bp + 48))) if (*DateTime)(unsafe.Pointer(p)).FM > 0 { x = ((*DateTime)(unsafe.Pointer(p)).FM - 1) / 12 } else { x = ((*DateTime)(unsafe.Pointer(p)).FM - 12) / 12 } *(*int32)(unsafe.Pointer(p + 8)) += x *(*int32)(unsafe.Pointer(p + 12)) -= x * 12 (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) *(*float64)(unsafe.Pointer(bp + 48 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */)))) break } fallthrough case 5: { // Special processing to add years var y int32 = int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */))) computeYMD_HMS(tls, p) *(*int32)(unsafe.Pointer(p + 8)) += y (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) *(*float64)(unsafe.Pointer(bp + 48 /* r */)) -= float64(int32(*(*float64)(unsafe.Pointer(bp + 48 /* r */)))) break } } computeJD(tls, p) *(*Sqlite3_int64)(unsafe.Pointer(p)) += libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 48))*1000.0*float64(aXformType[i].FrXform) + rRounder) rc = 0 break } } clearYMD_HMS_TZ(tls, p) break } default: { break } } return rc } // Process time function arguments. argv[0] is a date-time stamp. // argv[1] and following are modifiers. Parse them all and write // the resulting time into the DateTime structure p. Return 0 // on success and 1 if there are any errors. // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:23999:12: */ var i int32 var n int32 var z uintptr var eType int32 libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DateTime{}))) if argc == 0 { if !(Xsqlite3NotPureFunc(tls, context) != 0) { return 1 } return setDateTimeToCurrent(tls, context, p) } if libc.AssignInt32(&eType, Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) == SQLITE_FLOAT || eType == SQLITE_INTEGER { setRawDateNumber(tls, p, Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv)))) } else { z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if !(z != 0) || parseDateOrTime(tls, context, z, p) != 0 { return 1 } } for i = 1; i < argc; i++ { z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if z == uintptr(0) || parseModifier(tls, context, z, n, p, i) != 0 { return 1 } } computeJD(tls, p) if (*DateTime)(unsafe.Pointer(p)).FisError != 0 || !(validJulianDay(tls, (*DateTime)(unsafe.Pointer(p)).FiJD) != 0) { return 1 } return 0 } // The following routines implement the various date and time functions // of SQLite. // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24043:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { computeJD(tls, bp) Xsqlite3_result_double(tls, context, float64((*DateTime)(unsafe.Pointer(bp)).FiJD)/86400000.0) } } // unixepoch( TIMESTRING, MOD, MOD, ...) // // Return the number of seconds (including fractional seconds) since // the unix epoch of 1970-01-01 00:00:00 GMT. func unixepochFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24061:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { computeJD(tls, bp) Xsqlite3_result_int64(tls, context, (*DateTime)(unsafe.Pointer(bp)).FiJD/int64(1000)-int64(21086676)*int64(10000)) } } // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24078:13: */ bp := tls.Alloc(72) defer tls.Free(72) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { var Y int32 var s int32 // var zBuf [24]int8 at bp+48, 24 computeYMD_HMS(tls, bp) Y = (*DateTime)(unsafe.Pointer(bp /* &x */)).FY if Y < 0 { Y = -Y } *(*int8)(unsafe.Pointer(bp + 48 + 1)) = int8('0' + Y/1000%10) *(*int8)(unsafe.Pointer(bp + 48 + 2)) = int8('0' + Y/100%10) *(*int8)(unsafe.Pointer(bp + 48 + 3)) = int8('0' + Y/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 4)) = int8('0' + Y%10) *(*int8)(unsafe.Pointer(bp + 48 + 5)) = int8('-') *(*int8)(unsafe.Pointer(bp + 48 + 6)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FM/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 7)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FM%10) *(*int8)(unsafe.Pointer(bp + 48 + 8)) = int8('-') *(*int8)(unsafe.Pointer(bp + 48 + 9)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FD/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 10)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FD%10) *(*int8)(unsafe.Pointer(bp + 48 + 11)) = int8(' ') *(*int8)(unsafe.Pointer(bp + 48 + 12)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 13)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh%10) *(*int8)(unsafe.Pointer(bp + 48 + 14)) = int8(':') *(*int8)(unsafe.Pointer(bp + 48 + 15)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 16)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm%10) *(*int8)(unsafe.Pointer(bp + 48 + 17)) = int8(':') s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp /* &x */)).Fs) *(*int8)(unsafe.Pointer(bp + 48 + 18)) = int8('0' + s/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 19)) = int8('0' + s%10) *(*int8)(unsafe.Pointer(bp + 48 + 20)) = int8(0) if (*DateTime)(unsafe.Pointer(bp)).FY < 0 { *(*int8)(unsafe.Pointer(bp + 48)) = int8('-') Xsqlite3_result_text(tls, context, bp+48, 20, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_text(tls, context, bp+48+1, 19, libc.UintptrFromInt32(-1)) } } } // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24125:13: */ bp := tls.Alloc(64) defer tls.Free(64) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { var s int32 // var zBuf [16]int8 at bp+48, 16 computeHMS(tls, bp) *(*int8)(unsafe.Pointer(bp + 48)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 1)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fh%10) *(*int8)(unsafe.Pointer(bp + 48 + 2)) = int8(':') *(*int8)(unsafe.Pointer(bp + 48 + 3)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 4)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).Fm%10) *(*int8)(unsafe.Pointer(bp + 48 + 5)) = int8(':') s = libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp /* &x */)).Fs) *(*int8)(unsafe.Pointer(bp + 48 + 6)) = int8('0' + s/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 7)) = int8('0' + s%10) *(*int8)(unsafe.Pointer(bp + 48 + 8)) = int8(0) Xsqlite3_result_text(tls, context, bp+48, 8, libc.UintptrFromInt32(-1)) } } // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24154:13: */ bp := tls.Alloc(64) defer tls.Free(64) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { var Y int32 // var zBuf [16]int8 at bp+48, 16 computeYMD(tls, bp) Y = (*DateTime)(unsafe.Pointer(bp /* &x */)).FY if Y < 0 { Y = -Y } *(*int8)(unsafe.Pointer(bp + 48 + 1)) = int8('0' + Y/1000%10) *(*int8)(unsafe.Pointer(bp + 48 + 2)) = int8('0' + Y/100%10) *(*int8)(unsafe.Pointer(bp + 48 + 3)) = int8('0' + Y/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 4)) = int8('0' + Y%10) *(*int8)(unsafe.Pointer(bp + 48 + 5)) = int8('-') *(*int8)(unsafe.Pointer(bp + 48 + 6)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FM/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 7)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FM%10) *(*int8)(unsafe.Pointer(bp + 48 + 8)) = int8('-') *(*int8)(unsafe.Pointer(bp + 48 + 9)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FD/10%10) *(*int8)(unsafe.Pointer(bp + 48 + 10)) = int8('0' + (*DateTime)(unsafe.Pointer(bp)).FD%10) *(*int8)(unsafe.Pointer(bp + 48 + 11)) = int8(0) if (*DateTime)(unsafe.Pointer(bp)).FY < 0 { *(*int8)(unsafe.Pointer(bp + 48)) = int8('-') Xsqlite3_result_text(tls, context, bp+48, 11, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_text(tls, context, bp+48+1, 10, libc.UintptrFromInt32(-1)) } } } // strftime( FORMAT, TIMESTRING, MOD, MOD, ...) // // Return a string described by FORMAT. Conversions as follows: // // %d day of month // %f ** fractional seconds SS.SSS // %H hour 00-24 // %j day of year 000-366 // %J ** julian day number // %m month 01-12 // %M minute 00-59 // %s seconds since 1970-01-01 // %S seconds 00-59 // %w day of week 0-6 sunday==0 // %W week of year 00-53 // %Y year 0000-9999 // %% % func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24205:13: */ bp := tls.Alloc(216) defer tls.Free(216) // var x DateTime at bp+88, 48 var i Size_t var j Size_t var db uintptr var zFmt uintptr // var sRes Sqlite3_str at bp+136, 32 if argc == 0 { return } zFmt = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zFmt == uintptr(0) || isDate(tls, context, argc-1, argv+uintptr(1)*8, bp+88) != 0 { return } db = Xsqlite3_context_db_handle(tls, context) Xsqlite3StrAccumInit(tls, bp+136, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) computeJD(tls, bp+88) computeYMD_HMS(tls, bp+88) for i = libc.AssignUint64(&j, uint64(0)); *(*int8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' { continue } if j < i { Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) } i++ j = i + uint64(1) switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FD)) break } case 'f': { var s float64 = (*DateTime)(unsafe.Pointer(bp + 88 /* &x */)).Fs if s > 59.999 { s = 59.999 } Xsqlite3_str_appendf(tls, bp+136, ts+1286, libc.VaList(bp+8, s)) break } case 'H': { Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fh)) break } case 'W': fallthrough // Fall thru case 'j': { var nDay int32 // Number of days since 1st day of year *(*DateTime)(unsafe.Pointer(bp + 168 /* y */)) = *(*DateTime)(unsafe.Pointer(bp + 88 /* x */)) (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FM = 1 (*DateTime)(unsafe.Pointer(bp + 168 /* &y */)).FD = 1 computeJD(tls, bp+168) nDay = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD - (*DateTime)(unsafe.Pointer(bp+168)).FiJD + int64(43200000)) / int64(86400000)) if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 // 0=Monday, 1=Tuesday, ... 6=Sunday wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { Xsqlite3_str_appendf(tls, bp+136, ts+1293, libc.VaList(bp+32, nDay+1)) } break } case 'J': { Xsqlite3_str_appendf(tls, bp+136, ts+1298, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FM)) break } case 'M': { Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fm)) break } case 's': { var iS I64 = (*DateTime)(unsafe.Pointer(bp+88)).FiJD/int64(1000) - int64(21086676)*int64(10000) Xsqlite3_str_appendf(tls, bp+136, ts+1304, libc.VaList(bp+64, iS)) break } case 'S': { Xsqlite3_str_appendf(tls, bp+136, ts+1281, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fs))) break } case 'w': { Xsqlite3_str_appendchar(tls, bp+136, 1, int8(int32(int8(((*DateTime)(unsafe.Pointer(bp+88)).FiJD+int64(129600000))/int64(86400000)%int64(7)))+'0')) break } case 'Y': { Xsqlite3_str_appendf(tls, bp+136, ts+1309, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FY)) break } case '%': { Xsqlite3_str_appendchar(tls, bp+136, 1, int8('%')) break } default: { Xsqlite3_str_reset(tls, bp+136) return } } } if j < i { Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) } Xsqlite3ResultStrAccum(tls, context, bp+136) } // current_time() // // This function returns the same value as time('now'). func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24312:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) } // current_date() // // This function returns the same value as date('now'). func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24326:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) } // current_timestamp() // // This function returns the same value as datetime('now'). func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24340:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) } // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24400:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint64(unsafe.Sizeof(aDateTimeFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aDateTimeFuncs = [9]FuncDef{ {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1213}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1233}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1314}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1319}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1324}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1333}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1342}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1355}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1373}} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24401:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* // 2005 November 29 // // 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 OS interface code that is common to all // architectures. // #include "sqliteInt.h" // If we compile with the SQLITE_TEST macro set, then the following block // of code will give us the ability to simulate a disk I/O error. This // is used for testing the I/O recovery logic. // When testing, also keep a count of the number of open files. // The default SQLite sqlite3_vfs implementations do not allocate // memory (actually, os_unix.c allocates a small amount of memory // from within OsOpen()), but some third-party implementations may. // So we test the effects of a malloc() failing and the sqlite3OsXXX() // function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro. // // The following functions are instrumented for malloc() failure // testing: // // sqlite3OsRead() // sqlite3OsWrite() // sqlite3OsSync() // sqlite3OsFileSize() // sqlite3OsLock() // sqlite3OsCheckReservedLock() // sqlite3OsFileControl() // sqlite3OsShmMap() // sqlite3OsOpen() // sqlite3OsDelete() // sqlite3OsAccess() // sqlite3OsFullPathname() // // The following routines are convenience wrappers around methods // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24504:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods)).FxClose})).f(tls, pId) (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = uintptr(0) } } func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24510:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24514:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24518:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24521:20: */ if flags != 0 { return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSync})).f(tls, id, flags) } return SQLITE_OK } func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24525:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24529:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24533:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24536:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxCheckReservedLock})).f(tls, id, pResOut) } // Use sqlite3OsFileControl() when we are doing something that might fail // and we need to know about the failures. Use sqlite3OsFileControlHint() // when simply tossing information over the wall to the VFS and we do not // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24549:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24577:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } } func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24581:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xSectorSize})).f(tls, id) } return SQLITE_DEFAULT_SECTOR_SIZE }() } func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24585:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24590:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24593:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24596:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24599:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmMap})).f(tls, id, iPage, pgsz, bExtend, pp) } // The real implementation of xFetch and xUnfetch func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24613:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24617:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) } // The next group of routines are convenience wrappers around the // VFS methods. func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24635:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed // down into the VFS layer. Some SQLITE_OPEN_ flags (for example, // SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before // reaching the VFS. rc = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen})).f(tls, pVfs, zPath, pFile, flags&0x1087f7f, pFlagsOut) return rc } func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24652:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete})).f(tls, pVfs, zPath, dirSync) } return SQLITE_OK } func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24657:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24666:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24677:21: */ // tag-20210611-1 return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24682:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24685:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24688:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24692:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint64(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { nByte = int32(unsafe.Sizeof(uint32(0))) } libc.Xmemcpy(tls, zBufOut, uintptr(unsafe.Pointer(&Xsqlite3Config))+432, uint64(nByte)) return SQLITE_OK } else { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxRandomness})).f(tls, pVfs, nByte, zBufOut) } return int32(0) } func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24703:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24706:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError})).f(tls, pVfs, 0, uintptr(0)) } return 0 } func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24709:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // IMPLEMENTATION-OF: R-49045-42493 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. if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion >= 2 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64 != 0 { rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64})).f(tls, pVfs, pTimeOut) } else { // var r float64 at bp, 8 rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTime})).f(tls, pVfs, bp /* &r */) *(*Sqlite3_int64)(unsafe.Pointer(pTimeOut)) = libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp)) * 86400000.0) } return rc } func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24727:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) if pFile != 0 { rc = Xsqlite3OsOpen(tls, pVfs, zFile, pFile, flags, pOutFlags) if rc != SQLITE_OK { Xsqlite3_free(tls, pFile) *(*uintptr)(unsafe.Pointer(ppFile)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(ppFile)) = pFile } } else { *(*uintptr)(unsafe.Pointer(ppFile)) = uintptr(0) rc = SQLITE_NOMEM } return rc } func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24752:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) } // This function is a wrapper around the OS specific implementation of // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. func Xsqlite3OsInit(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24764:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM } Xsqlite3_free(tls, p) return Xsqlite3_os_init(tls) } // The list of all registered VFS implementations. var vfsList uintptr = uintptr(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24774:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24781:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return uintptr(0) } mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) for pVfs = vfsList; pVfs != 0; pVfs = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext { if zVfs == uintptr(0) { break } if libc.Xstrcmp(tls, zVfs, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName) == 0 { break } } Xsqlite3_mutex_leave(tls, mutex) return pVfs } // Unlink a VFS from the linked list func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24805:13: */ if pVfs == uintptr(0) { // No-op } else if vfsList == pVfs { vfsList = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext } else if vfsList != 0 { var p uintptr = vfsList for (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext != 0 && (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext != pVfs { p = (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext } if (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext == pVfs { (*Sqlite3_vfs)(unsafe.Pointer(p)).FpNext = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext } } } // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24827:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return rc } mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) vfsUnlink(tls, pVfs) if makeDflt != 0 || vfsList == uintptr(0) { (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext = vfsList vfsList = pVfs } else { (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext = (*Sqlite3_vfs)(unsafe.Pointer(vfsList)).FpNext (*Sqlite3_vfs)(unsafe.Pointer(vfsList)).FpNext = pVfs } Xsqlite3_mutex_leave(tls, mutex) return SQLITE_OK } // Unregister a VFS so that it is no longer accessible. func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24855:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return rc } mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) vfsUnlink(tls, pVfs) Xsqlite3_mutex_leave(tls, mutex) return SQLITE_OK } //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** // 2008 Jan 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 file contains code to support the concept of "benign" // malloc failures (when the xMalloc() or xRealloc() method of the // sqlite3_mem_methods structure fails to allocate a block of memory // and returns 0). // // Most malloc failures are non-benign. After they occur, SQLite // abandons the current operation and returns an error code (usually // SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily // fatal. For example, if a malloc fails while resizing a hash table, this // is completely recoverable simply by not carrying out the resize. The // hash table will continue to function normally. So a malloc failure // during a hash table resize is a benign fault. // #include "sqliteInt.h" // Global variables. type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24903:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** // 2008 Jan 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 file contains code to support the concept of "benign" // malloc failures (when the xMalloc() or xRealloc() method of the // sqlite3_mem_methods structure fails to allocate a block of memory // and returns 0). // // Most malloc failures are non-benign. After they occur, SQLite // abandons the current operation and returns an error code (usually // SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily // fatal. For example, if a malloc fails while resizing a hash table, this // is completely recoverable simply by not carrying out the resize. The // hash table will continue to function normally. So a malloc failure // during a hash table resize is a benign fault. // #include "sqliteInt.h" // Global variables. type BenignMallocHooks = BenignMallocHooks1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24903:34 */ var sqlite3Hooks = BenignMallocHooks1{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24907:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, // we have to locate the state vector at run-time. In the more common // case where writable static data is supported, wsdHooks can refer directly // to the "sqlite3Hooks" state vector declared above. // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24929:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd } // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24943:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:24949:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) } } //************* End of fault.c ********************************************** //************* Begin file mem0.c ******************************************* // 2008 October 28 // // 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 a no-op memory allocation drivers for use when // SQLITE_ZERO_MALLOC is defined. The allocation drivers implemented // here always fail. SQLite will not operate with these drivers. These // are merely placeholders. Real drivers must be substituted using // sqlite3_config() before SQLite will operate. // #include "sqliteInt.h" // This version of the memory allocator is the default. It is // used when no other memory allocator is specified using compile-time // macros. //************* End of mem0.c *********************************************** //************* Begin file mem1.c ******************************************* // 2007 August 14 // // 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 low-level memory allocation drivers for when // SQLite will use the standard C-library malloc/realloc/free interface // to obtain the memory it needs. // // This file contains implementations of the low-level memory allocation // routines specified in the sqlite3_mem_methods object. The content of // this file is only used if SQLITE_SYSTEM_MALLOC is defined. The // SQLITE_SYSTEM_MALLOC macro is defined automatically if neither the // SQLITE_MEMDEBUG nor the SQLITE_WIN32_MALLOC macros are defined. The // default configuration is to use memory allocation routines in this // file. // // C-preprocessor macro summary: // // HAVE_MALLOC_USABLE_SIZE The configure script sets this symbol if // the malloc_usable_size() interface exists // on the target platform. Or, this symbol // can be set manually, if desired. // If an equivalent interface exists by // a different name, using a separate -D // option to rename it. // // SQLITE_WITHOUT_ZONEMALLOC Some older macs lack support for the zone // memory allocator. Set this symbol to enable // building on older macs. // // SQLITE_WITHOUT_MSIZE Set this symbol to disable the use of // _msize() on windows systems. This might // be necessary when compiling for Delphi, // for example. // #include "sqliteInt.h" // This version of the memory allocator is the default. It is // used when no other memory allocator is specified using compile-time // macros. // Use standard C library malloc and free on non-Apple systems. // Also used by Apple systems if SQLITE_WITHOUT_ZONEMALLOC is defined. // The malloc.h header file is needed for malloc_usable_size() function // on some systems (e.g. Linux). // Include the malloc.h header file, if necessary. Also set define macro // SQLITE_MALLOCSIZE to the appropriate function name, which is _msize() // for MSVC and malloc_usable_size() for most other systems (e.g. Linux). // The memory size function can always be overridden manually by defining // the macro SQLITE_MALLOCSIZE to the desired function name. // * // This file has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Like malloc(), but remember the size of the allocation // so that we can find it later using sqlite3MemSize(). // // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25149:13: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr p = libc.Xmalloc(tls, uint64(nByte)) if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_NOMEM, ts+1386, libc.VaList(bp, nByte)) } return p } // Like free() but works for allocations obtained from sqlite3MemMalloc() // or sqlite3MemRealloc(). // // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25183:13: */ libc.Xfree(tls, pPrior) } // Report the allocated size of a prior return from xMalloc() // or xRealloc(). func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25198:12: */ return int32(libc.X_msize(tls, pPrior)) } // Like realloc(). Resize an allocation previously obtained from // sqlite3MemMalloc(). // // For this low-level interface, we know that pPrior!=0. Cases where // pPrior==0 while have been intercepted by higher-level routine and // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25221:13: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = libc.Xrealloc(tls, pPrior, uint64(nByte)) if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_NOMEM, ts+1424, libc.VaList(bp, libc.X_msize(tls, pPrior), nByte)) } return p } // Round up a request size to the next valid allocation size. func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25253:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25260:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25287:13: */ _ = NotUsed return } // This routine is the only routine in this file with external linkage. // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. func Xsqlite3MemSetDefault(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25298:21: */ bp := tls.Alloc(8) defer tls.Free(8) Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods)))) } var defaultMethods = Sqlite3_mem_methods{ FxMalloc: 0, FxFree: 0, FxRealloc: 0, FxSize: 0, FxRoundup: 0, FxInit: 0, FxShutdown: 0, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:25299:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* // 2007 August 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 file contains low-level memory allocation drivers for when // SQLite will use the standard C-library malloc/realloc/free interface // to obtain the memory it needs while adding lots of additional debugging // information to each allocation in order to help detect and fix memory // leaks and memory usage errors. // // This file contains implementations of the low-level memory allocation // routines specified in the sqlite3_mem_methods object. // #include "sqliteInt.h" // This version of the memory allocator is used only if the // SQLITE_MEMDEBUG macro is defined //************* End of mem2.c *********************************************** //************* Begin file mem3.c ******************************************* // 2007 October 14 // // 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 C functions that implement a memory // allocation subsystem for use by SQLite. // // This version of the memory allocation subsystem omits all // use of malloc(). The SQLite user supplies a block of memory // before calling sqlite3_initialize() from which allocations // are made and returned by the xMalloc() and xRealloc() // implementations. Once sqlite3_initialize() has been called, // the amount of memory available to SQLite is fixed and cannot // be changed. // // This version of the memory allocation subsystem is included // in the build only if SQLITE_ENABLE_MEMSYS3 is defined. // #include "sqliteInt.h" // This version of the memory allocator is only built into the library // SQLITE_ENABLE_MEMSYS3 is defined. Defining this symbol does not // mean that the library will use a memory-pool by default, just that // it is available. The mempool allocator is activated by calling // sqlite3_config(). //************* End of mem3.c *********************************************** //************* Begin file mem5.c ******************************************* // 2007 October 14 // // 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 C functions that implement a memory // allocation subsystem for use by SQLite. // // This version of the memory allocation subsystem omits all // use of malloc(). The application gives SQLite a block of memory // before calling sqlite3_initialize() from which allocations // are made and returned by the xMalloc() and xRealloc() // implementations. Once sqlite3_initialize() has been called, // the amount of memory available to SQLite is fixed and cannot // be changed. // // This version of the memory allocation subsystem is included // in the build only if SQLITE_ENABLE_MEMSYS5 is defined. // // This memory allocator uses the following algorithm: // // 1. All memory allocation sizes are rounded up to a power of 2. // // 2. If two adjacent free blocks are the halves of a larger block, // then the two blocks are coalesced into the single larger block. // // 3. New memory is allocated from the first available free block. // // This algorithm is described in: J. M. Robson. "Bounds for Some Functions // Concerning Dynamic Storage Allocation". Journal of the Association for // Computing Machinery, Volume 21, Number 8, July 1974, pages 491-499. // // Let n be the size of the largest allocation divided by the minimum // allocation size (after rounding all sizes up to a power of 2.) Let M // be the maximum amount of memory ever outstanding at one time. Let // N be the total amount of memory available for allocation. Robson // proved that this memory allocator will never breakdown due to // fragmentation as long as the following constraint holds: // // N >= M*(1 + log2(n)/2) - n + 1 // // The sqlite3_status() logic tracks the maximum values of n and M so // that an application can, at any time, verify this constraint. // #include "sqliteInt.h" // This version of the memory allocator is used only when // SQLITE_ENABLE_MEMSYS5 is defined. //************* End of mem5.c *********************************************** //************* Begin file mutex.c ****************************************** // 2007 August 14 // // 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 C functions that implement mutexes. // // This file contains code that is common across all mutex implementations. // #include "sqliteInt.h" // Initialize the mutex system. func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27334:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not // install a mutex implementation via sqlite3_config() prior to // sqlite3_initialize() being called. This block copies pointers to // the default implementation into the sqlite3GlobalConfig structure. var pFrom uintptr var pTo uintptr = uintptr(unsafe.Pointer(&Xsqlite3Config)) + 96 if Xsqlite3Config.FbCoreMutex != 0 { pFrom = Xsqlite3DefaultMutex(tls) } else { pFrom = Xsqlite3NoopMutex(tls) } (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexInit = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexInit (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexEnd = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexEnd (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexFree = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexFree (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexEnter = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexEnter (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexTry = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexTry (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexLeave = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexLeave (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexHeld = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexHeld (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexNotheld = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexNotheld (*Sqlite3_mutex_methods)(unsafe.Pointer(pTo)).FxMutexAlloc = (*Sqlite3_mutex_methods)(unsafe.Pointer(pFrom)).FxMutexAlloc } rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexInit})).f(tls) return rc } // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27380:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) } return rc } // Retrieve a pointer to a static mutex or allocate a new dynamic one. func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27396:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } if id > SQLITE_MUTEX_RECURSIVE && Xsqlite3MutexInit(tls) != 0 { return uintptr(0) } return (*struct { f func(*libc.TLS, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27405:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } return (*struct { f func(*libc.TLS, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } // Free a dynamic mutex. func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27417:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) } } // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27428:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) } } // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27439:16: */ var rc int32 = SQLITE_OK if p != 0 { return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexTry})).f(tls, p) } return rc } // The sqlite3_mutex_leave() routine exits a mutex that was previously // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27454:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) } } //************* End of mutex.c ********************************************** //************* Begin file mutex_noop.c ************************************* // 2008 October 07 // // 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 C functions that implement mutexes. // // This implementation in this file does not provide any mutual // exclusion and is thus suitable for use only in applications // that use SQLite in a single thread. The routines defined // here are place-holders. Applications can substitute working // mutex routines at start-time using the // // sqlite3_config(SQLITE_CONFIG_MUTEX,...) // // interface. // // If compiled with SQLITE_DEBUG, then additional logic is inserted // that does error checking on mutexes to make sure they are being // called correctly. // #include "sqliteInt.h" // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. func noopMutexInit(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27517:12: */ return SQLITE_OK } func noopMutexEnd(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27518:12: */ return SQLITE_OK } func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27519:22: */ _ = id return uintptr(8) } func noopMutexFree(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27523:13: */ _ = p return } func noopMutexEnter(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27524:13: */ _ = p return } func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27525:12: */ _ = p return SQLITE_OK } func noopMutexLeave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27529:13: */ _ = p return } func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27531:44: */ return uintptr(unsafe.Pointer(&sMutex)) } var sMutex = Sqlite3_mutex_methods{ FxMutexInit: 0, FxMutexEnd: 0, FxMutexAlloc: 0, FxMutexFree: 0, FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27532:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:27690:44: */ return Xsqlite3NoopMutex(tls) } //************* End of mutex_noop.c ***************************************** //************* Begin file mutex_unix.c ************************************* // 2007 August 28 // // 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 C functions that implement mutexes for pthreads // #include "sqliteInt.h" // The code in this file is only used if we are compiling threadsafe // under unix with pthreads. // // Note that this implementation requires a version of pthreads that // supports recursive mutexes. //************* End of mutex_unix.c ***************************************** //************* Begin file mutex_w32.c ************************************** // 2007 August 14 // // 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 C functions that implement mutexes for Win32. // #include "sqliteInt.h" // Include code that is common to all os_*.c files // #include "os_common.h" // Include the header file for the Windows VFS. //************* Include os_win.h in the middle of mutex_w32.c *************** //************* Begin file os_win.h ***************************************** // 2013 November 25 // // 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 code that is specific to Windows. // Include the primary Windows SDK header 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. // * // This file has no copyright assigned and is placed in the Public 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 } /* /usr/x86_64-w64-mingw32/include/excpt.h:17:3 */ type _EXCEPTION_RECORD = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord uintptr FExceptionAddress PVOID FNumberParameters DWORD F__ccgo_pad1 [4]byte FExceptionInformation [15]ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/excpt.h:45:3 */ // CRT stuff type X_PHNDLR = uintptr /* /usr/x86_64-w64-mingw32/include/excpt.h:66:16 */ type _XCPT_ACTION = struct { FXcptNum uint32 FSigNum int32 FXcptAction X_PHNDLR } /* /usr/x86_64-w64-mingw32/include/excpt.h:68:3 */ // The type of function that is expected as an exception handler to be // installed with __try1. type PEXCEPTION_HANDLER = uintptr /* /usr/x86_64-w64-mingw32/include/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 <stdarg.h> // 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-2020 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 // <http://www.gnu.org/licenses/>. // ISO C Standard: 7.15 Variable arguments <stdarg.h> // * // 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. // 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 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 has no copyright assigned and is placed in the Public Domain. // This file is part of the mingw-w64 runtime package. // No warranty is given; refer to the file DISCLAIMER.PD within this package. // Input parameters // Output parameters // Inout parameters // Pointer to pointer parameters // Output reference parameters // Return values // Optional pointer parameters // 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. // * // This file has no copyright assigned and is placed in the Public Domain. // This 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 ULONG = uint32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:24:29 */ type PULONG = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:25:17 */ type USHORT = uint16 /* /usr/x86_64-w64-mingw32/include/minwindef.h:26:26 */ type PUSHORT = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:27:18 */ type UCHAR = uint8 /* /usr/x86_64-w64-mingw32/include/minwindef.h:28:25 */ type PUCHAR = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:29:17 */ type PSZ = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:30:16 */ type WINBOOL = int32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:127:13 */ type BOOL = int32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:131:15 */ type PBOOL = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:134:14 */ type LPBOOL = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:135:14 */ type BYTE = uint8 /* /usr/x86_64-w64-mingw32/include/minwindef.h:139:25 */ type WORD = uint16 /* /usr/x86_64-w64-mingw32/include/minwindef.h:140:26 */ type DWORD = uint32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:141:29 */ type FLOAT = float32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:142:17 */ type PFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:143:17 */ type PBYTE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:144:16 */ type LPBYTE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:145:16 */ type PINT = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:146:15 */ type LPINT = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:147:15 */ type PWORD = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:148:16 */ type LPWORD = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:149:16 */ type LPLONG = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:150:20 */ type PDWORD = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:151:17 */ type LPDWORD = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:152:17 */ type LPVOID = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:153:16 */ type LPCVOID = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:156:22 */ type INT = int32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:158:15 */ type UINT = uint32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:159:24 */ type PUINT = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:160: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. // * // 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 has no copyright assigned and is placed in the Public 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 <intrin.h> // // 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 <psdk_inc/intrin-impl.h> // // 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) // // <prototype goes here> // // __INTRINSICS_USEINLINE // <code goes here> // // #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. // ***************************************************** // ***************************************************** // GCC 8 has already defined _xgetbv, Clang 9 has _xgetbv defined as a macro // redirecting to the __builtin_ia32_xgetbv builtin. // ***************************************************** // * // 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 /* /usr/x86_64-w64-mingw32/include/basetsd.h:11:44 */ type INT8 = int8 /* /usr/x86_64-w64-mingw32/include/basetsd.h:29:23 */ type PINT8 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:29:28 */ type INT16 = int16 /* /usr/x86_64-w64-mingw32/include/basetsd.h:30:24 */ type PINT16 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:30:30 */ type INT32 = int32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:31:22 */ type PINT32 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:31:28 */ type INT64 = int64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:32:44 */ type PINT64 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:32:50 */ type UINT8 = uint8 /* /usr/x86_64-w64-mingw32/include/basetsd.h:33:25 */ type PUINT8 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:33:31 */ type UINT16 = uint16 /* /usr/x86_64-w64-mingw32/include/basetsd.h:34:26 */ type PUINT16 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:34:33 */ type UINT32 = uint32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:35:24 */ type PUINT32 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:35:31 */ type UINT64 = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:36:46 */ type PUINT64 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:36:53 */ type LONG32 = int32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:37:22 */ type PLONG32 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:37:29 */ type ULONG32 = uint32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:38:24 */ type PULONG32 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:38:32 */ type DWORD32 = uint32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:39:24 */ type PDWORD32 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:39:32 */ type INT_PTR = int64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:46:37 */ type PINT_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:46:45 */ type UINT_PTR = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:47:46 */ type PUINT_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:47:55 */ type LONG_PTR = int64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:48:37 */ type PLONG_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:48:46 */ type ULONG_PTR = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:49:46 */ type PULONG_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:49:56 */ type SHANDLE_PTR = int64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:62:37 */ type HANDLE_PTR = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:63:46 */ type UHALF_PTR = uint32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:64:24 */ type PUHALF_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:64:34 */ type HALF_PTR = int32 /* /usr/x86_64-w64-mingw32/include/basetsd.h:65:15 */ type PHALF_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:65:24 */ type SIZE_T = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/basetsd.h:147:39 */ type PSIZE_T = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:147:46 */ type SSIZE_T = LONG_PTR /* /usr/x86_64-w64-mingw32/include/basetsd.h:148:38 */ type PSSIZE_T = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:148:46 */ type DWORD_PTR = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/basetsd.h:191:39 */ type PDWORD_PTR = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:191:49 */ type LONG64 = int64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:192:37 */ type PLONG64 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:192:44 */ type ULONG64 = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:193:46 */ type PULONG64 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:193:54 */ type DWORD64 = uint64 /* /usr/x86_64-w64-mingw32/include/basetsd.h:194:46 */ type PDWORD64 = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:194:54 */ type KAFFINITY = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/basetsd.h:195:39 */ type PKAFFINITY = uintptr /* /usr/x86_64-w64-mingw32/include/basetsd.h:196:39 */ type PVOID = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:257:16 */ type PVOID64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:258:16 */ type CHAR = int8 /* /usr/x86_64-w64-mingw32/include/winnt.h:285:16 */ type SHORT = int16 /* /usr/x86_64-w64-mingw32/include/winnt.h:286:17 */ type LONG = int32 /* /usr/x86_64-w64-mingw32/include/winnt.h:287:20 */ type WCHAR = Wchar_t /* /usr/x86_64-w64-mingw32/include/winnt.h:295:19 */ type PWCHAR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:297:17 */ type LPWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:297:25 */ type PWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:297:32 */ type LPCWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:298:23 */ type PCWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:298:31 */ type NWPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:299:17 */ type LPWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:299:25 */ type PWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:299:33 */ type PZPWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:300:17 */ type PCZPWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:301:23 */ type LPUWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:302:27 */ type PUWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:302:36 */ type LPCWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:303:23 */ type PCWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:303:32 */ type PZPCWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:304:18 */ type LPCUWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:305:33 */ type PCUWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:305:43 */ type PZZWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:306:17 */ type PCZZWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:307:23 */ type PUZZWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:308:27 */ type PCUZZWSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:309:33 */ type PNZWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:310:17 */ type PCNZWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:311:23 */ type PUNZWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:312:27 */ type PCUNZWCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:313:33 */ type PCHAR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:334:16 */ type LPCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:334:23 */ type PCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:334:29 */ type LPCCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:335:22 */ type PCCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:335:29 */ type NPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:336:16 */ type LPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:336:23 */ type PSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:336:30 */ type PZPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:337:16 */ type PCZPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:338:22 */ type LPCSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:339:22 */ type PCSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:339:30 */ type PZPCSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:340:17 */ type PZZSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:341:16 */ type PCZZSTR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:342:22 */ type PNZCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:343:16 */ type PCNZCH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:344:22 */ type TCHAR = int8 /* /usr/x86_64-w64-mingw32/include/winnt.h:373:16 */ type PTCHAR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:373:23 */ type TBYTE = uint8 /* /usr/x86_64-w64-mingw32/include/winnt.h:374:25 */ type PTBYTE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:374:32 */ type LPTCH = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:377:17 */ type PTCH = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:377:23 */ type LPCTCH = LPCCH /* /usr/x86_64-w64-mingw32/include/winnt.h:378:17 */ type PCTCH = LPCCH /* /usr/x86_64-w64-mingw32/include/winnt.h:378:24 */ type PTSTR = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:379:17 */ type LPTSTR = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:379:23 */ type PUTSTR = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:379:30 */ type LPUTSTR = LPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:379:37 */ type PCTSTR = LPCSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:380:18 */ type LPCTSTR = LPCSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:380:25 */ type PCUTSTR = LPCSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:380:33 */ type LPCUTSTR = LPCSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:380:41 */ type PZZTSTR = PZZSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:381:18 */ type PUZZTSTR = PZZSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:381:27 */ type PCZZTSTR = PCZZSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:382:19 */ type PCUZZTSTR = PCZZSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:382:29 */ type PZPTSTR = PZPSTR /* /usr/x86_64-w64-mingw32/include/winnt.h:383:18 */ type PNZTCH = PNZCH /* /usr/x86_64-w64-mingw32/include/winnt.h:384:17 */ type PUNZTCH = PNZCH /* /usr/x86_64-w64-mingw32/include/winnt.h:384:25 */ type PCNZTCH = PCNZCH /* /usr/x86_64-w64-mingw32/include/winnt.h:385:18 */ type PCUNZTCH = PCNZCH /* /usr/x86_64-w64-mingw32/include/winnt.h:385:27 */ type PSHORT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:392:17 */ type PLONG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:393:16 */ type _GROUP_AFFINITY = struct { FMask KAFFINITY FGroup WORD FReserved [3]WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:397:9 */ type GROUP_AFFINITY = _GROUP_AFFINITY /* /usr/x86_64-w64-mingw32/include/winnt.h:401:3 */ type PGROUP_AFFINITY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:401:19 */ type HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:405:16 */ type PHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:412:18 */ type FCHAR = BYTE /* /usr/x86_64-w64-mingw32/include/winnt.h:413:16 */ type FSHORT = WORD /* /usr/x86_64-w64-mingw32/include/winnt.h:414:16 */ type FLONG = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:415:17 */ type HRESULT = LONG /* /usr/x86_64-w64-mingw32/include/winnt.h:419:16 */ // Keep in sync with basetyps.h header. type CCHAR = int8 /* /usr/x86_64-w64-mingw32/include/winnt.h:453:16 */ type LCID = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:456:15 */ type PLCID = PDWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:458:18 */ type LANGID = WORD /* /usr/x86_64-w64-mingw32/include/winnt.h:461:16 */ type COMPARTMENT_ID = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:470:3 */ type PCOMPARTMENT_ID = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:470:18 */ type _FLOAT128 = struct { FLowPart int64 FHighPart int64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:482:13 */ type FLOAT128 = _FLOAT128 /* /usr/x86_64-w64-mingw32/include/winnt.h:485:5 */ type PFLOAT128 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:487:20 */ type LONGLONG = int64 /* /usr/x86_64-w64-mingw32/include/winnt.h:490:37 */ type ULONGLONG = uint64 /* /usr/x86_64-w64-mingw32/include/winnt.h:491:46 */ type PLONGLONG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:495:20 */ type PULONGLONG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:496:21 */ type USN = LONGLONG /* /usr/x86_64-w64-mingw32/include/winnt.h:497:20 */ type _LARGE_INTEGER = struct { F__ccgo_pad1 [0]uint64 Fs struct { FLowPart DWORD FHighPart LONG } } /* /usr/x86_64-w64-mingw32/include/winnt.h:505:11 */ type LARGE_INTEGER = _LARGE_INTEGER /* /usr/x86_64-w64-mingw32/include/winnt.h:516:5 */ type PLARGE_INTEGER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:518:25 */ type _ULARGE_INTEGER = struct { F__ccgo_pad1 [0]uint64 Fs struct { FLowPart DWORD FHighPart DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:523:11 */ type ULARGE_INTEGER = _ULARGE_INTEGER /* /usr/x86_64-w64-mingw32/include/winnt.h:534:5 */ type PULARGE_INTEGER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:536:26 */ type _LUID = struct { FLowPart DWORD FHighPart LONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:538:11 */ type LUID = _LUID /* /usr/x86_64-w64-mingw32/include/winnt.h:541:5 */ type PLUID = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:541:10 */ type DWORDLONG = ULONGLONG /* /usr/x86_64-w64-mingw32/include/winnt.h:546:21 */ type PDWORDLONG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:547:21 */ type BOOLEAN = BYTE /* /usr/x86_64-w64-mingw32/include/winnt.h:605:16 */ type PBOOLEAN = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:607:19 */ type _LIST_ENTRY = struct { FFlink uintptr FBlink uintptr } /* /usr/x86_64-w64-mingw32/include/winnt.h:612:11 */ type LIST_ENTRY = _LIST_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:615:5 */ type PLIST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:615:16 */ type PRLIST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:615:29 */ type _SINGLE_LIST_ENTRY = struct{ FNext uintptr } /* /usr/x86_64-w64-mingw32/include/winnt.h:617:11 */ type SINGLE_LIST_ENTRY = _SINGLE_LIST_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:619:5 */ type PSINGLE_LIST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:619:23 */ type LIST_ENTRY321 = struct { FFlink DWORD FBlink DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:621:11 */ type LIST_ENTRY32 = LIST_ENTRY321 /* /usr/x86_64-w64-mingw32/include/winnt.h:624:5 */ type PLIST_ENTRY32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:625:24 */ type LIST_ENTRY641 = struct { FFlink ULONGLONG FBlink ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:627:11 */ type LIST_ENTRY64 = LIST_ENTRY641 /* /usr/x86_64-w64-mingw32/include/winnt.h:630:5 */ type PLIST_ENTRY64 = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/guiddef.h:24:3 */ // __declspec(selectany) must be applied to initialized objects on GCC 5 hence must not be used here. type LPGUID = uintptr /* /usr/x86_64-w64-mingw32/include/guiddef.h:77:14 */ type LPCGUID = uintptr /* /usr/x86_64-w64-mingw32/include/guiddef.h:82:20 */ type IID = GUID /* /usr/x86_64-w64-mingw32/include/guiddef.h:88:14 */ type LPIID = uintptr /* /usr/x86_64-w64-mingw32/include/guiddef.h:89:13 */ type CLSID = GUID /* /usr/x86_64-w64-mingw32/include/guiddef.h:96:14 */ type LPCLSID = uintptr /* /usr/x86_64-w64-mingw32/include/guiddef.h:99:15 */ type FMTID = GUID /* /usr/x86_64-w64-mingw32/include/guiddef.h:103:14 */ type LPFMTID = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winnt.h:642:5 */ type PEXCEPTION_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:709:31 */ // ??? #define SUBLANG_ROMANIAN_MOLDOVA 0x01 ??? type KSPIN_LOCK = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/winnt.h:1384:21 */ type PKSPIN_LOCK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1385:22 */ type _M128A = struct { FLow ULONGLONG FHigh LONGLONG } /* /usr/x86_64-w64-mingw32/include/excpt.h:17:3 */ type M128A = _M128A /* /usr/x86_64-w64-mingw32/include/winnt.h:1390:7 */ type PM128A = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1390: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:1392:13 */ type XSAVE_FORMAT = _XSAVE_FORMAT /* /usr/x86_64-w64-mingw32/include/winnt.h:1415:7 */ type PXSAVE_FORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1415:20 */ type _XSAVE_AREA_HEADER = struct { FMask DWORD64 FReserved [7]DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:1417:13 */ type XSAVE_AREA_HEADER = _XSAVE_AREA_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:1420:7 */ type PXSAVE_AREA_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1420:25 */ type _XSAVE_AREA = struct { FLegacyState XSAVE_FORMAT FHeader XSAVE_AREA_HEADER } /* /usr/x86_64-w64-mingw32/include/winnt.h:1422:13 */ type XSAVE_AREA = _XSAVE_AREA /* /usr/x86_64-w64-mingw32/include/winnt.h:1425:7 */ type PXSAVE_AREA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1425:18 */ type _XSTATE_CONTEXT = struct { FMask DWORD64 FLength DWORD FReserved1 DWORD FArea PXSAVE_AREA FBuffer PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:1427:13 */ type XSTATE_CONTEXT = _XSTATE_CONTEXT /* /usr/x86_64-w64-mingw32/include/winnt.h:1439:7 */ type PXSTATE_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1439:22 */ type _SCOPE_TABLE_AMD64 = struct { FCount DWORD FScopeRecord [1]struct { FBeginAddress DWORD FEndAddress DWORD FHandlerAddress DWORD FJumpTarget DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:1441:13 */ type SCOPE_TABLE_AMD64 = _SCOPE_TABLE_AMD64 /* /usr/x86_64-w64-mingw32/include/winnt.h:1449:7 */ type PSCOPE_TABLE_AMD64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1449:25 */ // 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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:1679: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:1696:5 */ type PXMM_SAVE_AREA32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1696:21 */ type CONTEXT = _CONTEXT /* /usr/x86_64-w64-mingw32/include/winnt.h:1770:5 */ type PCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1770:13 */ type _RUNTIME_FUNCTION = struct { FBeginAddress DWORD FEndAddress DWORD FUnwindData DWORD } /* /usr/x86_64-w64-mingw32/include/excpt.h:45:3 */ type RUNTIME_FUNCTION = _RUNTIME_FUNCTION /* /usr/x86_64-w64-mingw32/include/winnt.h:1778:5 */ type PRUNTIME_FUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1778:22 */ type PGET_RUNTIME_FUNCTION_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1780:29 */ type POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:1781: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 { F__ccgo_pad1 [0]uint32 FBytes struct { FBaseMid BYTE FFlags1 BYTE FFlags2 BYTE FBaseHi BYTE } } } /* /usr/x86_64-w64-mingw32/include/winnt.h:2416: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:2439:7 */ type PLDT_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2439:17 */ // http://www.nynaeve.net/?p=99 type EXCEPTION_RECORD = _EXCEPTION_RECORD /* /usr/x86_64-w64-mingw32/include/winnt.h:2784:7 */ type PEXCEPTION_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2786:30 */ type _EXCEPTION_RECORD32 = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord DWORD FExceptionAddress DWORD FNumberParameters DWORD FExceptionInformation [15]DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:2788:13 */ type EXCEPTION_RECORD32 = _EXCEPTION_RECORD32 /* /usr/x86_64-w64-mingw32/include/winnt.h:2795:7 */ type PEXCEPTION_RECORD32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2795:26 */ type _EXCEPTION_RECORD64 = struct { FExceptionCode DWORD FExceptionFlags DWORD FExceptionRecord DWORD64 FExceptionAddress DWORD64 FNumberParameters DWORD F__unusedAlignment DWORD FExceptionInformation [15]DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:2797:13 */ type EXCEPTION_RECORD64 = _EXCEPTION_RECORD64 /* /usr/x86_64-w64-mingw32/include/winnt.h:2805:7 */ type PEXCEPTION_RECORD64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2805:26 */ type EXCEPTION_POINTERS = _EXCEPTION_POINTERS /* /usr/x86_64-w64-mingw32/include/winnt.h:2810:7 */ type PEXCEPTION_POINTERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2810:26 */ // http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx type _UNWIND_HISTORY_TABLE_ENTRY = struct { FImageBase ULONG64 FFunctionEntry PRUNTIME_FUNCTION } /* /usr/x86_64-w64-mingw32/include/excpt.h:45:3 */ // http://msdn.microsoft.com/en-us/library/ms680597(VS.85).aspx type UNWIND_HISTORY_TABLE_ENTRY = _UNWIND_HISTORY_TABLE_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:2825:5 */ type PUNWIND_HISTORY_TABLE_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2825: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 } /* /usr/x86_64-w64-mingw32/include/excpt.h:45:3 */ type UNWIND_HISTORY_TABLE = _UNWIND_HISTORY_TABLE /* /usr/x86_64-w64-mingw32/include/winnt.h:2840:5 */ type PUNWIND_HISTORY_TABLE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2840:27 */ type DISPATCHER_CONTEXT = _DISPATCHER_CONTEXT /* /usr/x86_64-w64-mingw32/include/winnt.h:2845:38 */ type PDISPATCHER_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2846:38 */ // http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx type _KNONVOLATILE_CONTEXT_POINTERS = struct { FFloatingContext [16]PM128A FIntegerContext [16]PULONG64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:2865:11 */ // http://msdn.microsoft.com/en-us/library/ms680617(VS.85).aspx type KNONVOLATILE_CONTEXT_POINTERS = _KNONVOLATILE_CONTEXT_POINTERS /* /usr/x86_64-w64-mingw32/include/winnt.h:2869:5 */ type PKNONVOLATILE_CONTEXT_POINTERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2869:36 */ type PACCESS_TOKEN = PVOID /* /usr/x86_64-w64-mingw32/include/winnt.h:2872:19 */ type PSECURITY_DESCRIPTOR = PVOID /* /usr/x86_64-w64-mingw32/include/winnt.h:2873:19 */ type PSID = PVOID /* /usr/x86_64-w64-mingw32/include/winnt.h:2874:19 */ type PCLAIMS_BLOB = PVOID /* /usr/x86_64-w64-mingw32/include/winnt.h:2875:19 */ type ACCESS_MASK = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:2876:19 */ type PACCESS_MASK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2877:25 */ type _GENERIC_MAPPING = struct { FGenericRead ACCESS_MASK FGenericWrite ACCESS_MASK FGenericExecute ACCESS_MASK FGenericAll ACCESS_MASK } /* /usr/x86_64-w64-mingw32/include/winnt.h:2903:13 */ type GENERIC_MAPPING = _GENERIC_MAPPING /* /usr/x86_64-w64-mingw32/include/winnt.h:2908:7 */ type PGENERIC_MAPPING = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2909: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:2912: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:2915:7 */ type PLUID_AND_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2915:27 */ type LUID_AND_ATTRIBUTES_ARRAY = [1]LUID_AND_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/winnt.h:2916:33 */ type PLUID_AND_ATTRIBUTES_ARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2917: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:2922: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:2924:7 */ type PSID_IDENTIFIER_AUTHORITY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2924:32 */ type _SID = struct { FRevision BYTE FSubAuthorityCount BYTE FIdentifierAuthority SID_IDENTIFIER_AUTHORITY FSubAuthority [1]DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:2929:13 */ type SID = _SID /* /usr/x86_64-w64-mingw32/include/winnt.h:2934:7 */ type PISID = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2934:11 */ type SID_NAME_USE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:2948:7 */ type PSID_NAME_USE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2948:20 */ type _SID_AND_ATTRIBUTES = struct { FSid PSID FAttributes DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:2950:13 */ type SID_AND_ATTRIBUTES = _SID_AND_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/winnt.h:2957:7 */ type PSID_AND_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2957:26 */ type SID_AND_ATTRIBUTES_ARRAY = [1]SID_AND_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/winnt.h:2959:32 */ type PSID_AND_ATTRIBUTES_ARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2960:38 */ type SID_HASH_ENTRY = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/winnt.h:2962:23 */ type PSID_HASH_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2962:39 */ type _SID_AND_ATTRIBUTES_HASH = struct { FSidCount DWORD F__ccgo_pad1 [4]byte FSidAttr PSID_AND_ATTRIBUTES FHash [32]SID_HASH_ENTRY } /* /usr/x86_64-w64-mingw32/include/winnt.h:2964:13 */ type SID_AND_ATTRIBUTES_HASH = _SID_AND_ATTRIBUTES_HASH /* /usr/x86_64-w64-mingw32/include/winnt.h:2968:7 */ type PSID_AND_ATTRIBUTES_HASH = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:2968:32 */ type WELL_KNOWN_SID_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3256:3 */ type _ACL = struct { FAclRevision BYTE FSbz1 BYTE FAclSize WORD FAceCount WORD FSbz2 WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3286:13 */ type ACL = _ACL /* /usr/x86_64-w64-mingw32/include/winnt.h:3292:7 */ type PACL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3293:17 */ type _ACE_HEADER = struct { FAceType BYTE FAceFlags BYTE FAceSize WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3295:13 */ type ACE_HEADER = _ACE_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:3299:7 */ type PACE_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3300:24 */ type _ACCESS_ALLOWED_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3346:13 */ type ACCESS_ALLOWED_ACE = _ACCESS_ALLOWED_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3350:7 */ type PACCESS_ALLOWED_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3352:32 */ type _ACCESS_DENIED_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3354:13 */ type ACCESS_DENIED_ACE = _ACCESS_DENIED_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3358:7 */ type PACCESS_DENIED_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3359:31 */ type _SYSTEM_AUDIT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3361:13 */ type SYSTEM_AUDIT_ACE = _SYSTEM_AUDIT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3365:7 */ type PSYSTEM_AUDIT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3366:30 */ type _SYSTEM_ALARM_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3368:13 */ type SYSTEM_ALARM_ACE = _SYSTEM_ALARM_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3372:7 */ type PSYSTEM_ALARM_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3373:30 */ type _SYSTEM_RESOURCE_ATTRIBUTE_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3375:13 */ type SYSTEM_RESOURCE_ATTRIBUTE_ACE = _SYSTEM_RESOURCE_ATTRIBUTE_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3379:7 */ type PSYSTEM_RESOURCE_ATTRIBUTE_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3379:37 */ type _SYSTEM_SCOPED_POLICY_ID_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3381:13 */ type SYSTEM_SCOPED_POLICY_ID_ACE = _SYSTEM_SCOPED_POLICY_ID_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3385:7 */ type PSYSTEM_SCOPED_POLICY_ID_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3385:35 */ type _SYSTEM_MANDATORY_LABEL_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3387:13 */ type SYSTEM_MANDATORY_LABEL_ACE = _SYSTEM_MANDATORY_LABEL_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3391:7 */ type PSYSTEM_MANDATORY_LABEL_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3391:35 */ type _ACCESS_ALLOWED_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3399:13 */ type ACCESS_ALLOWED_OBJECT_ACE = _ACCESS_ALLOWED_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3406:7 */ type PACCESS_ALLOWED_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3406:33 */ type _ACCESS_DENIED_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3408:13 */ type ACCESS_DENIED_OBJECT_ACE = _ACCESS_DENIED_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3415:7 */ type PACCESS_DENIED_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3415:32 */ type _SYSTEM_AUDIT_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3417:13 */ type SYSTEM_AUDIT_OBJECT_ACE = _SYSTEM_AUDIT_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3424:7 */ type PSYSTEM_AUDIT_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3424:31 */ type _SYSTEM_ALARM_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3426:13 */ type SYSTEM_ALARM_OBJECT_ACE = _SYSTEM_ALARM_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3433:7 */ type PSYSTEM_ALARM_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3433:31 */ type _ACCESS_ALLOWED_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3435:13 */ type ACCESS_ALLOWED_CALLBACK_ACE = _ACCESS_ALLOWED_CALLBACK_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3439:7 */ type PACCESS_ALLOWED_CALLBACK_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3439:35 */ type _ACCESS_DENIED_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3441:13 */ type ACCESS_DENIED_CALLBACK_ACE = _ACCESS_DENIED_CALLBACK_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3445:7 */ type PACCESS_DENIED_CALLBACK_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3445:34 */ type _SYSTEM_AUDIT_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3447:13 */ type SYSTEM_AUDIT_CALLBACK_ACE = _SYSTEM_AUDIT_CALLBACK_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3451:7 */ type PSYSTEM_AUDIT_CALLBACK_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3451:33 */ type _SYSTEM_ALARM_CALLBACK_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3453:13 */ type SYSTEM_ALARM_CALLBACK_ACE = _SYSTEM_ALARM_CALLBACK_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3457:7 */ type PSYSTEM_ALARM_CALLBACK_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3457:33 */ type _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3459:13 */ type ACCESS_ALLOWED_CALLBACK_OBJECT_ACE = _ACCESS_ALLOWED_CALLBACK_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3467:7 */ type PACCESS_ALLOWED_CALLBACK_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3467:42 */ type _ACCESS_DENIED_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3469:13 */ type ACCESS_DENIED_CALLBACK_OBJECT_ACE = _ACCESS_DENIED_CALLBACK_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3476:7 */ type PACCESS_DENIED_CALLBACK_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3476:41 */ type _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3478:13 */ type SYSTEM_AUDIT_CALLBACK_OBJECT_ACE = _SYSTEM_AUDIT_CALLBACK_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3485:7 */ type PSYSTEM_AUDIT_CALLBACK_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3485:40 */ type _SYSTEM_ALARM_CALLBACK_OBJECT_ACE = struct { FHeader ACE_HEADER FMask ACCESS_MASK FFlags DWORD FObjectType GUID FInheritedObjectType GUID FSidStart DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3487:13 */ type SYSTEM_ALARM_CALLBACK_OBJECT_ACE = _SYSTEM_ALARM_CALLBACK_OBJECT_ACE /* /usr/x86_64-w64-mingw32/include/winnt.h:3495:7 */ type PSYSTEM_ALARM_CALLBACK_OBJECT_ACE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3495:40 */ type ACL_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3502:7 */ type _ACL_REVISION_INFORMATION = struct{ FAclRevision DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3504:13 */ type ACL_REVISION_INFORMATION = _ACL_REVISION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3506:7 */ type PACL_REVISION_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3507:38 */ type _ACL_SIZE_INFORMATION = struct { FAceCount DWORD FAclBytesInUse DWORD FAclBytesFree DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3509:13 */ type ACL_SIZE_INFORMATION = _ACL_SIZE_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3513:7 */ type PACL_SIZE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3514:34 */ type SECURITY_DESCRIPTOR_CONTROL = WORD /* /usr/x86_64-w64-mingw32/include/winnt.h:3521:18 */ type PSECURITY_DESCRIPTOR_CONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3521:46 */ type _SECURITY_DESCRIPTOR_RELATIVE = struct { FRevision BYTE FSbz1 BYTE FControl SECURITY_DESCRIPTOR_CONTROL FOwner DWORD FGroup DWORD FSacl DWORD FDacl DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3538:13 */ type SECURITY_DESCRIPTOR_RELATIVE = _SECURITY_DESCRIPTOR_RELATIVE /* /usr/x86_64-w64-mingw32/include/winnt.h:3546:7 */ type PISECURITY_DESCRIPTOR_RELATIVE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3546:36 */ type _SECURITY_DESCRIPTOR = struct { FRevision BYTE FSbz1 BYTE FControl SECURITY_DESCRIPTOR_CONTROL F__ccgo_pad1 [4]byte FOwner PSID FGroup PSID FSacl PACL FDacl PACL } /* /usr/x86_64-w64-mingw32/include/winnt.h:3548:13 */ type SECURITY_DESCRIPTOR = _SECURITY_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:3556:7 */ type PISECURITY_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3556:27 */ type _OBJECT_TYPE_LIST = struct { FLevel WORD FSbz WORD F__ccgo_pad1 [4]byte FObjectType uintptr } /* /usr/x86_64-w64-mingw32/include/winnt.h:3558:13 */ type OBJECT_TYPE_LIST = _OBJECT_TYPE_LIST /* /usr/x86_64-w64-mingw32/include/winnt.h:3562:7 */ type POBJECT_TYPE_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3562:24 */ type AUDIT_EVENT_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3572:7 */ type PAUDIT_EVENT_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3572:24 */ type _PRIVILEGE_SET = struct { FPrivilegeCount DWORD FControl DWORD FPrivilege [1]LUID_AND_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/winnt.h:3590:13 */ type PRIVILEGE_SET = _PRIVILEGE_SET /* /usr/x86_64-w64-mingw32/include/winnt.h:3594:7 */ type PPRIVILEGE_SET = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3594:21 */ type ACCESS_REASON_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3619:7 */ type ACCESS_REASON = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:3620:19 */ type _ACCESS_REASONS = struct{ FData [32]ACCESS_REASON } /* /usr/x86_64-w64-mingw32/include/winnt.h:3622:13 */ type ACCESS_REASONS = _ACCESS_REASONS /* /usr/x86_64-w64-mingw32/include/winnt.h:3624:7 */ type PACCESS_REASONS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3624:22 */ type _SE_SECURITY_DESCRIPTOR = struct { FSize DWORD FFlags DWORD FSecurityDescriptor PSECURITY_DESCRIPTOR } /* /usr/x86_64-w64-mingw32/include/winnt.h:3630:13 */ type SE_SECURITY_DESCRIPTOR = _SE_SECURITY_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:3634:7 */ type PSE_SECURITY_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3634:30 */ type _SE_ACCESS_REQUEST = struct { FSize DWORD F__ccgo_pad1 [4]byte FSeSecurityDescriptor PSE_SECURITY_DESCRIPTOR FDesiredAccess ACCESS_MASK FPreviouslyGrantedAccess ACCESS_MASK FPrincipalSelfSid PSID FGenericMapping PGENERIC_MAPPING FObjectTypeListCount DWORD F__ccgo_pad2 [4]byte FObjectTypeList POBJECT_TYPE_LIST } /* /usr/x86_64-w64-mingw32/include/winnt.h:3636:13 */ type SE_ACCESS_REQUEST = _SE_ACCESS_REQUEST /* /usr/x86_64-w64-mingw32/include/winnt.h:3645:7 */ type PSE_ACCESS_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3645:25 */ type _SE_ACCESS_REPLY = struct { FSize DWORD FResultListCount DWORD FGrantedAccess PACCESS_MASK FAccessStatus PDWORD FAccessReason PACCESS_REASONS FPrivileges uintptr } /* /usr/x86_64-w64-mingw32/include/winnt.h:3647:13 */ type SE_ACCESS_REPLY = _SE_ACCESS_REPLY /* /usr/x86_64-w64-mingw32/include/winnt.h:3654:7 */ type PSE_ACCESS_REPLY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3654:23 */ type SECURITY_IMPERSONATION_LEVEL = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3694:7 */ type PSECURITY_IMPERSONATION_LEVEL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3694:36 */ type TOKEN_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3721:7 */ type PTOKEN_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3722:24 */ type TOKEN_ELEVATION_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3728:7 */ type PTOKEN_ELEVATION_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3728:29 */ type TOKEN_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3772:7 */ type PTOKEN_INFORMATION_CLASS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3772:31 */ type _TOKEN_USER = struct{ FUser SID_AND_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/winnt.h:3774:13 */ type TOKEN_USER = _TOKEN_USER /* /usr/x86_64-w64-mingw32/include/winnt.h:3776:7 */ type PTOKEN_USER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3776:18 */ type _TOKEN_GROUPS = struct { FGroupCount DWORD F__ccgo_pad1 [4]byte FGroups [1]SID_AND_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/winnt.h:3778:13 */ type TOKEN_GROUPS = _TOKEN_GROUPS /* /usr/x86_64-w64-mingw32/include/winnt.h:3785:7 */ type PTOKEN_GROUPS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3785:20 */ type _TOKEN_PRIVILEGES = struct { FPrivilegeCount DWORD FPrivileges [1]LUID_AND_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/winnt.h:3787:13 */ type TOKEN_PRIVILEGES = _TOKEN_PRIVILEGES /* /usr/x86_64-w64-mingw32/include/winnt.h:3790:7 */ type PTOKEN_PRIVILEGES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3790:24 */ type _TOKEN_OWNER = struct{ FOwner PSID } /* /usr/x86_64-w64-mingw32/include/winnt.h:3792:13 */ type TOKEN_OWNER = _TOKEN_OWNER /* /usr/x86_64-w64-mingw32/include/winnt.h:3794:7 */ type PTOKEN_OWNER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3794:19 */ type _TOKEN_PRIMARY_GROUP = struct{ FPrimaryGroup PSID } /* /usr/x86_64-w64-mingw32/include/winnt.h:3796:13 */ type TOKEN_PRIMARY_GROUP = _TOKEN_PRIMARY_GROUP /* /usr/x86_64-w64-mingw32/include/winnt.h:3798:7 */ type PTOKEN_PRIMARY_GROUP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3798:27 */ type _TOKEN_DEFAULT_DACL = struct{ FDefaultDacl PACL } /* /usr/x86_64-w64-mingw32/include/winnt.h:3800:13 */ type TOKEN_DEFAULT_DACL = _TOKEN_DEFAULT_DACL /* /usr/x86_64-w64-mingw32/include/winnt.h:3802:7 */ type PTOKEN_DEFAULT_DACL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3802:26 */ type _TOKEN_USER_CLAIMS = struct{ FUserClaims PCLAIMS_BLOB } /* /usr/x86_64-w64-mingw32/include/winnt.h:3804:13 */ type TOKEN_USER_CLAIMS = _TOKEN_USER_CLAIMS /* /usr/x86_64-w64-mingw32/include/winnt.h:3806:7 */ type PTOKEN_USER_CLAIMS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3806:25 */ type _TOKEN_DEVICE_CLAIMS = struct{ FDeviceClaims PCLAIMS_BLOB } /* /usr/x86_64-w64-mingw32/include/winnt.h:3808:13 */ type TOKEN_DEVICE_CLAIMS = _TOKEN_DEVICE_CLAIMS /* /usr/x86_64-w64-mingw32/include/winnt.h:3810:7 */ type PTOKEN_DEVICE_CLAIMS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3810: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:3812:13 */ type TOKEN_GROUPS_AND_PRIVILEGES = _TOKEN_GROUPS_AND_PRIVILEGES /* /usr/x86_64-w64-mingw32/include/winnt.h:3823:7 */ type PTOKEN_GROUPS_AND_PRIVILEGES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3823:35 */ type _TOKEN_LINKED_TOKEN = struct{ FLinkedToken HANDLE } /* /usr/x86_64-w64-mingw32/include/winnt.h:3825:13 */ type TOKEN_LINKED_TOKEN = _TOKEN_LINKED_TOKEN /* /usr/x86_64-w64-mingw32/include/winnt.h:3827:7 */ type PTOKEN_LINKED_TOKEN = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3827:26 */ type _TOKEN_ELEVATION = struct{ FTokenIsElevated DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3829:13 */ type TOKEN_ELEVATION = _TOKEN_ELEVATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3831:7 */ type PTOKEN_ELEVATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3831:23 */ type _TOKEN_MANDATORY_LABEL = struct{ FLabel SID_AND_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/winnt.h:3833:13 */ type TOKEN_MANDATORY_LABEL = _TOKEN_MANDATORY_LABEL /* /usr/x86_64-w64-mingw32/include/winnt.h:3835:7 */ type PTOKEN_MANDATORY_LABEL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3835:29 */ type _TOKEN_MANDATORY_POLICY = struct{ FPolicy DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:3843:13 */ type TOKEN_MANDATORY_POLICY = _TOKEN_MANDATORY_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:3845:7 */ type PTOKEN_MANDATORY_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3845: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 F__ccgo_pad1 [4]byte FPackageSid PSID FCapabilitiesHash PSID_AND_ATTRIBUTES_HASH } /* /usr/x86_64-w64-mingw32/include/winnt.h:3847:13 */ type TOKEN_ACCESS_INFORMATION = _TOKEN_ACCESS_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3859:7 */ type PTOKEN_ACCESS_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3859:32 */ type _TOKEN_AUDIT_POLICY = struct{ FPerUserPolicy [29]UCHAR } /* /usr/x86_64-w64-mingw32/include/winnt.h:3863:13 */ type TOKEN_AUDIT_POLICY = _TOKEN_AUDIT_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:3865:7 */ type PTOKEN_AUDIT_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3865:27 */ type _TOKEN_SOURCE = struct { FSourceName [8]CHAR FSourceIdentifier LUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:3869:13 */ type TOKEN_SOURCE = _TOKEN_SOURCE /* /usr/x86_64-w64-mingw32/include/winnt.h:3872:7 */ type PTOKEN_SOURCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3872: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:3874:13 */ type TOKEN_STATISTICS = _TOKEN_STATISTICS /* /usr/x86_64-w64-mingw32/include/winnt.h:3885:7 */ type PTOKEN_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3885:24 */ type _TOKEN_CONTROL = struct { FTokenId LUID FAuthenticationId LUID FModifiedId LUID FTokenSource TOKEN_SOURCE } /* /usr/x86_64-w64-mingw32/include/winnt.h:3887:13 */ type TOKEN_CONTROL = _TOKEN_CONTROL /* /usr/x86_64-w64-mingw32/include/winnt.h:3892:7 */ type PTOKEN_CONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3892:21 */ type _TOKEN_ORIGIN = struct{ FOriginatingLogonSession LUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:3894:13 */ type TOKEN_ORIGIN = _TOKEN_ORIGIN /* /usr/x86_64-w64-mingw32/include/winnt.h:3896:7 */ type PTOKEN_ORIGIN = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3896:20 */ type MANDATORY_LEVEL = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:3906:7 */ type PMANDATORY_LEVEL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3906:23 */ type _TOKEN_APPCONTAINER_INFORMATION = struct{ FTokenAppContainer PSID } /* /usr/x86_64-w64-mingw32/include/winnt.h:3908:13 */ type TOKEN_APPCONTAINER_INFORMATION = _TOKEN_APPCONTAINER_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3910:7 */ type PTOKEN_APPCONTAINER_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3910:38 */ type _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = struct { FVersion DWORD64 FName PWSTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:3920:13 */ type CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = _CLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE /* /usr/x86_64-w64-mingw32/include/winnt.h:3923:7 */ type PCLAIM_SECURITY_ATTRIBUTE_FQBN_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3923:43 */ type _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = struct { FpValue PVOID FValueLength DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:3925:13 */ type CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = _CLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE /* /usr/x86_64-w64-mingw32/include/winnt.h:3928:7 */ type PCLAIM_SECURITY_ATTRIBUTE_OCTET_STRING_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3928:52 */ type _CLAIM_SECURITY_ATTRIBUTE_V1 = struct { FName PWSTR FValueType WORD FReserved WORD FFlags DWORD FValueCount DWORD F__ccgo_pad1 [4]byte FValues struct{ FpInt64 PLONG64 } } /* /usr/x86_64-w64-mingw32/include/winnt.h:3941:13 */ type CLAIM_SECURITY_ATTRIBUTE_V1 = _CLAIM_SECURITY_ATTRIBUTE_V1 /* /usr/x86_64-w64-mingw32/include/winnt.h:3954:7 */ type PCLAIM_SECURITY_ATTRIBUTE_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3954:35 */ type _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = struct { FName DWORD FValueType WORD FReserved WORD FFlags DWORD FValueCount DWORD FValues struct{ FpInt64 [1]DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:3956:13 */ type CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = _CLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 /* /usr/x86_64-w64-mingw32/include/winnt.h:3969:7 */ type PCLAIM_SECURITY_ATTRIBUTE_RELATIVE_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3969:44 */ type _CLAIM_SECURITY_ATTRIBUTES_INFORMATION = struct { FVersion WORD FReserved WORD FAttributeCount DWORD FAttribute struct{ FpAttributeV1 PCLAIM_SECURITY_ATTRIBUTE_V1 } } /* /usr/x86_64-w64-mingw32/include/winnt.h:3975:13 */ type CLAIM_SECURITY_ATTRIBUTES_INFORMATION = _CLAIM_SECURITY_ATTRIBUTES_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:3982:7 */ type PCLAIM_SECURITY_ATTRIBUTES_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3982:45 */ type SECURITY_CONTEXT_TRACKING_MODE = BOOLEAN /* /usr/x86_64-w64-mingw32/include/winnt.h:3987:21 */ type PSECURITY_CONTEXT_TRACKING_MODE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3987:52 */ type _SECURITY_QUALITY_OF_SERVICE = struct { FLength DWORD FImpersonationLevel SECURITY_IMPERSONATION_LEVEL FContextTrackingMode SECURITY_CONTEXT_TRACKING_MODE FEffectiveOnly BOOLEAN F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:3989:13 */ type SECURITY_QUALITY_OF_SERVICE = _SECURITY_QUALITY_OF_SERVICE /* /usr/x86_64-w64-mingw32/include/winnt.h:3994:7 */ type PSECURITY_QUALITY_OF_SERVICE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:3994:35 */ type _SE_IMPERSONATION_STATE = struct { FToken PACCESS_TOKEN FCopyOnOpen BOOLEAN FEffectiveOnly BOOLEAN F__ccgo_pad1 [2]byte FLevel SECURITY_IMPERSONATION_LEVEL } /* /usr/x86_64-w64-mingw32/include/winnt.h:3996:13 */ type SE_IMPERSONATION_STATE = _SE_IMPERSONATION_STATE /* /usr/x86_64-w64-mingw32/include/winnt.h:4001:7 */ type PSE_IMPERSONATION_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4001:30 */ type SECURITY_INFORMATION = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:4008:19 */ type PSECURITY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4008:40 */ type SE_LEARNING_MODE_DATA_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4028:7 */ type _SECURITY_CAPABILITIES = struct { FAppContainerSid PSID FCapabilities PSID_AND_ATTRIBUTES FCapabilityCount DWORD FReserved DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4032:13 */ type SECURITY_CAPABILITIES = _SECURITY_CAPABILITIES /* /usr/x86_64-w64-mingw32/include/winnt.h:4037:7 */ type PSECURITY_CAPABILITIES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4037:29 */ type LPSECURITY_CAPABILITIES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4037:53 */ type _JOB_SET_ARRAY = struct { FJobHandle HANDLE FMemberLevel DWORD FFlags DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4092:13 */ type JOB_SET_ARRAY = _JOB_SET_ARRAY /* /usr/x86_64-w64-mingw32/include/winnt.h:4096:7 */ type PJOB_SET_ARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4096:21 */ type _EXCEPTION_REGISTRATION_RECORD = struct { F__0 struct{ FNext uintptr } F__8 struct{ FHandler PEXCEPTION_ROUTINE } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4102:13 */ type EXCEPTION_REGISTRATION_RECORD = _EXCEPTION_REGISTRATION_RECORD /* /usr/x86_64-w64-mingw32/include/winnt.h:4111:7 */ type PEXCEPTION_REGISTRATION_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4113:43 */ type EXCEPTION_REGISTRATION = EXCEPTION_REGISTRATION_RECORD /* /usr/x86_64-w64-mingw32/include/winnt.h:4115:43 */ type PEXCEPTION_REGISTRATION = PEXCEPTION_REGISTRATION_RECORD /* /usr/x86_64-w64-mingw32/include/winnt.h:4116:44 */ type _NT_TIB = struct { FExceptionList uintptr FStackBase PVOID FStackLimit PVOID FSubSystemTib PVOID F__32 struct{ FFiberData PVOID } FArbitraryUserPointer PVOID FSelf uintptr } /* /usr/x86_64-w64-mingw32/include/winnt.h:4121:28 */ type NT_TIB = _NT_TIB /* /usr/x86_64-w64-mingw32/include/winnt.h:4132:7 */ type PNT_TIB = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4133:20 */ type _NT_TIB32 = struct { FExceptionList DWORD FStackBase DWORD FStackLimit DWORD FSubSystemTib DWORD F__16 struct{ FFiberData DWORD } FArbitraryUserPointer DWORD FSelf DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4136:28 */ type NT_TIB32 = _NT_TIB32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4147:7 */ type PNT_TIB32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4147:16 */ type _NT_TIB64 = struct { FExceptionList DWORD64 FStackBase DWORD64 FStackLimit DWORD64 FSubSystemTib DWORD64 F__32 struct{ FFiberData DWORD64 } FArbitraryUserPointer DWORD64 FSelf DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4149:28 */ type NT_TIB64 = _NT_TIB64 /* /usr/x86_64-w64-mingw32/include/winnt.h:4160:7 */ type PNT_TIB64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4160:16 */ type _UMS_CREATE_THREAD_ATTRIBUTES = struct { FUmsVersion DWORD F__ccgo_pad1 [4]byte FUmsContext PVOID FUmsCompletionList PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:4171:13 */ type UMS_CREATE_THREAD_ATTRIBUTES = _UMS_CREATE_THREAD_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/winnt.h:4175:7 */ type PUMS_CREATE_THREAD_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4175:36 */ type _QUOTA_LIMITS = struct { FPagedPoolLimit SIZE_T FNonPagedPoolLimit SIZE_T FMinimumWorkingSetSize SIZE_T FMaximumWorkingSetSize SIZE_T FPagefileLimit SIZE_T FTimeLimit LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winnt.h:4177:13 */ type QUOTA_LIMITS = _QUOTA_LIMITS /* /usr/x86_64-w64-mingw32/include/winnt.h:4184:7 */ type PQUOTA_LIMITS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4184:20 */ type _RATE_QUOTA_LIMIT = struct{ FRateData DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4192:13 */ type RATE_QUOTA_LIMIT = _RATE_QUOTA_LIMIT /* /usr/x86_64-w64-mingw32/include/winnt.h:4198:7 */ type PRATE_QUOTA_LIMIT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4198: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4200:13 */ type QUOTA_LIMITS_EX = _QUOTA_LIMITS_EX /* /usr/x86_64-w64-mingw32/include/winnt.h:4213:7 */ type PQUOTA_LIMITS_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4213:23 */ type _IO_COUNTERS = struct { FReadOperationCount ULONGLONG FWriteOperationCount ULONGLONG FOtherOperationCount ULONGLONG FReadTransferCount ULONGLONG FWriteTransferCount ULONGLONG FOtherTransferCount ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:4215:13 */ type IO_COUNTERS = _IO_COUNTERS /* /usr/x86_64-w64-mingw32/include/winnt.h:4222:7 */ type PIO_COUNTERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4223:25 */ type HARDWARE_COUNTER_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4231:7 */ type PHARDWARE_COUNTER_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4231:30 */ type PROCESS_MITIGATION_POLICY = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4246:7 */ type PPROCESS_MITIGATION_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4246:33 */ type _PROCESS_MITIGATION_ASLR_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4248:13 */ type PROCESS_MITIGATION_ASLR_POLICY = _PROCESS_MITIGATION_ASLR_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4259:7 */ type PPROCESS_MITIGATION_ASLR_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4259:38 */ type _PROCESS_MITIGATION_DEP_POLICY = struct { F__0 struct{ FFlags DWORD } FPermanent BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:4261:13 */ type PROCESS_MITIGATION_DEP_POLICY = _PROCESS_MITIGATION_DEP_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4271:7 */ type PPROCESS_MITIGATION_DEP_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4271:37 */ type _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4273:13 */ type PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = _PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4282:7 */ type PPROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4282:53 */ type _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4284:13 */ type PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = _PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4292:7 */ type PPROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4292:53 */ type _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4294:13 */ type PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = _PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4302:7 */ type PPROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4302:57 */ type _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4304:13 */ type PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = _PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4314:7 */ type PPROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4314:53 */ type _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4316:13 */ type PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = _PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4326:7 */ type PPROCESS_MITIGATION_BINARY_SIGNATURE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4326:51 */ type _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = struct { F__0 struct { FFlags DWORD F__ccgo_pad1 [4]byte } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4328:13 */ type PROCESS_MITIGATION_DYNAMIC_CODE_POLICY = _PROCESS_MITIGATION_DYNAMIC_CODE_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4338:7 */ type PPROCESS_MITIGATION_DYNAMIC_CODE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4338:47 */ type _PROCESS_MITIGATION_FONT_DISABLE_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4340:13 */ type PROCESS_MITIGATION_FONT_DISABLE_POLICY = _PROCESS_MITIGATION_FONT_DISABLE_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4349:7 */ type PPROCESS_MITIGATION_FONT_DISABLE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4349:47 */ type _PROCESS_MITIGATION_IMAGE_LOAD_POLICY = struct{ F__0 struct{ FFlags DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4351:13 */ type PROCESS_MITIGATION_IMAGE_LOAD_POLICY = _PROCESS_MITIGATION_IMAGE_LOAD_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:4361:7 */ type PPROCESS_MITIGATION_IMAGE_LOAD_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4361: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4363:13 */ type JOBOBJECT_BASIC_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4372:7 */ type PJOBOBJECT_BASIC_ACCOUNTING_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4372:46 */ type _JOBOBJECT_BASIC_LIMIT_INFORMATION = struct { FPerProcessUserTimeLimit LARGE_INTEGER FPerJobUserTimeLimit LARGE_INTEGER FLimitFlags DWORD F__ccgo_pad1 [4]byte FMinimumWorkingSetSize SIZE_T FMaximumWorkingSetSize SIZE_T FActiveProcessLimit DWORD F__ccgo_pad2 [4]byte FAffinity ULONG_PTR FPriorityClass DWORD FSchedulingClass DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4374:13 */ type JOBOBJECT_BASIC_LIMIT_INFORMATION = _JOBOBJECT_BASIC_LIMIT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4384:7 */ type PJOBOBJECT_BASIC_LIMIT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4384: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4386:13 */ type JOBOBJECT_EXTENDED_LIMIT_INFORMATION = _JOBOBJECT_EXTENDED_LIMIT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4393:7 */ type PJOBOBJECT_EXTENDED_LIMIT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4393:44 */ type _JOBOBJECT_BASIC_PROCESS_ID_LIST = struct { FNumberOfAssignedProcesses DWORD FNumberOfProcessIdsInList DWORD FProcessIdList [1]ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:4395:13 */ type JOBOBJECT_BASIC_PROCESS_ID_LIST = _JOBOBJECT_BASIC_PROCESS_ID_LIST /* /usr/x86_64-w64-mingw32/include/winnt.h:4399:7 */ type PJOBOBJECT_BASIC_PROCESS_ID_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4399:39 */ type _JOBOBJECT_BASIC_UI_RESTRICTIONS = struct{ FUIRestrictionsClass DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4401:13 */ type JOBOBJECT_BASIC_UI_RESTRICTIONS = _JOBOBJECT_BASIC_UI_RESTRICTIONS /* /usr/x86_64-w64-mingw32/include/winnt.h:4403:7 */ type PJOBOBJECT_BASIC_UI_RESTRICTIONS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4403:39 */ type _JOBOBJECT_SECURITY_LIMIT_INFORMATION = struct { FSecurityLimitFlags DWORD F__ccgo_pad1 [4]byte FJobToken HANDLE FSidsToDisable PTOKEN_GROUPS FPrivilegesToDelete PTOKEN_PRIVILEGES FRestrictedSids PTOKEN_GROUPS } /* /usr/x86_64-w64-mingw32/include/winnt.h:4405:13 */ type JOBOBJECT_SECURITY_LIMIT_INFORMATION = _JOBOBJECT_SECURITY_LIMIT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4411:7 */ type PJOBOBJECT_SECURITY_LIMIT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4411:44 */ type _JOBOBJECT_END_OF_JOB_TIME_INFORMATION = struct{ FEndOfJobTimeAction DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4413:13 */ type JOBOBJECT_END_OF_JOB_TIME_INFORMATION = _JOBOBJECT_END_OF_JOB_TIME_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4415:7 */ type PJOBOBJECT_END_OF_JOB_TIME_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4415:45 */ type _JOBOBJECT_ASSOCIATE_COMPLETION_PORT = struct { FCompletionKey PVOID FCompletionPort HANDLE } /* /usr/x86_64-w64-mingw32/include/winnt.h:4417:13 */ type JOBOBJECT_ASSOCIATE_COMPLETION_PORT = _JOBOBJECT_ASSOCIATE_COMPLETION_PORT /* /usr/x86_64-w64-mingw32/include/winnt.h:4420:7 */ type PJOBOBJECT_ASSOCIATE_COMPLETION_PORT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4420:43 */ type _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = struct { FBasicInfo JOBOBJECT_BASIC_ACCOUNTING_INFORMATION FIoInfo IO_COUNTERS } /* /usr/x86_64-w64-mingw32/include/winnt.h:4422:13 */ type JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = _JOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4425:7 */ type PJOBOBJECT_BASIC_AND_IO_ACCOUNTING_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4425:53 */ type _JOBOBJECT_JOBSET_INFORMATION = struct{ FMemberLevel DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4427:13 */ type JOBOBJECT_JOBSET_INFORMATION = _JOBOBJECT_JOBSET_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4429:7 */ type PJOBOBJECT_JOBSET_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4429:36 */ type JOBOBJECT_RATE_CONTROL_TOLERANCE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4435:7 */ type JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4441: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:4443:13 */ type JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4451:7 */ type PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4451: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4453:13 */ type JOBOBJECT_LIMIT_VIOLATION_INFORMATION = _JOBOBJECT_LIMIT_VIOLATION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4466:7 */ type PJOBOBJECT_LIMIT_VIOLATION_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4466:45 */ type _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = struct { FControlFlags DWORD F__4 struct{ FCpuRate DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4468:13 */ type JOBOBJECT_CPU_RATE_CONTROL_INFORMATION = _JOBOBJECT_CPU_RATE_CONTROL_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4474:7 */ type PJOBOBJECT_CPU_RATE_CONTROL_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4474:46 */ type JOBOBJECTINFOCLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4578:7 */ type FIRMWARE_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4585:7 */ type PFIRMWARE_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4585:21 */ type LOGICAL_PROCESSOR_RELATIONSHIP = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4608:7 */ type PROCESSOR_CACHE_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4614:7 */ type _CACHE_DESCRIPTOR = struct { FLevel BYTE FAssociativity BYTE FLineSize WORD FSize DWORD FType PROCESSOR_CACHE_TYPE } /* /usr/x86_64-w64-mingw32/include/winnt.h:4618:13 */ type CACHE_DESCRIPTOR = _CACHE_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:4624:7 */ type PCACHE_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4624:24 */ type _SYSTEM_LOGICAL_PROCESSOR_INFORMATION = struct { FProcessorMask ULONG_PTR FRelationship LOGICAL_PROCESSOR_RELATIONSHIP F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FProcessorCore struct{ FFlags BYTE } F__ccgo_pad2 [15]byte } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4626:13 */ type SYSTEM_LOGICAL_PROCESSOR_INFORMATION = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4639:7 */ type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4639:44 */ type _PROCESSOR_RELATIONSHIP = struct { FFlags BYTE FReserved [21]BYTE FGroupCount WORD FGroupMask [1]GROUP_AFFINITY } /* /usr/x86_64-w64-mingw32/include/winnt.h:4641:13 */ type PROCESSOR_RELATIONSHIP = _PROCESSOR_RELATIONSHIP /* /usr/x86_64-w64-mingw32/include/winnt.h:4646:7 */ type PPROCESSOR_RELATIONSHIP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4646:30 */ type _NUMA_NODE_RELATIONSHIP = struct { FNodeNumber DWORD FReserved [20]BYTE FGroupMask GROUP_AFFINITY } /* /usr/x86_64-w64-mingw32/include/winnt.h:4648:13 */ type NUMA_NODE_RELATIONSHIP = _NUMA_NODE_RELATIONSHIP /* /usr/x86_64-w64-mingw32/include/winnt.h:4652:7 */ type PNUMA_NODE_RELATIONSHIP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4652:30 */ type _CACHE_RELATIONSHIP = struct { FLevel BYTE FAssociativity BYTE FLineSize WORD FCacheSize DWORD FType PROCESSOR_CACHE_TYPE FReserved [20]BYTE FGroupMask GROUP_AFFINITY } /* /usr/x86_64-w64-mingw32/include/winnt.h:4654:13 */ type CACHE_RELATIONSHIP = _CACHE_RELATIONSHIP /* /usr/x86_64-w64-mingw32/include/winnt.h:4662:7 */ type PCACHE_RELATIONSHIP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4662:26 */ type _PROCESSOR_GROUP_INFO = struct { FMaximumProcessorCount BYTE FActiveProcessorCount BYTE FReserved [38]BYTE FActiveProcessorMask KAFFINITY } /* /usr/x86_64-w64-mingw32/include/winnt.h:4664:13 */ type PROCESSOR_GROUP_INFO = _PROCESSOR_GROUP_INFO /* /usr/x86_64-w64-mingw32/include/winnt.h:4669:7 */ type PPROCESSOR_GROUP_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4669:28 */ type _GROUP_RELATIONSHIP = struct { FMaximumGroupCount WORD FActiveGroupCount WORD FReserved [20]BYTE FGroupInfo [1]PROCESSOR_GROUP_INFO } /* /usr/x86_64-w64-mingw32/include/winnt.h:4671:13 */ type GROUP_RELATIONSHIP = _GROUP_RELATIONSHIP /* /usr/x86_64-w64-mingw32/include/winnt.h:4676:7 */ type PGROUP_RELATIONSHIP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4676:26 */ type _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = struct { FRelationship LOGICAL_PROCESSOR_RELATIONSHIP FSize DWORD Fu struct { FProcessor PROCESSOR_RELATIONSHIP F__ccgo_pad1 [32]byte } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4678:5 */ type SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = _SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX /* /usr/x86_64-w64-mingw32/include/winnt.h:4689:61 */ type PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4689:101 */ type _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = struct{ FCycleTime DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4691:13 */ type SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = _SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4693:7 */ type PSYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4693:47 */ type _XSTATE_FEATURE = struct { FOffset DWORD FSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4785:13 */ type XSTATE_FEATURE = _XSTATE_FEATURE /* /usr/x86_64-w64-mingw32/include/winnt.h:4788:7 */ type PXSTATE_FEATURE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4788:22 */ type _XSTATE_CONFIGURATION = struct { FEnabledFeatures DWORD64 FEnabledVolatileFeatures DWORD64 FSize DWORD FOptimizedSave uint8 /* DWORD OptimizedSave: 1 */ F__ccgo_pad1 [3]byte FFeatures [64]XSTATE_FEATURE } /* /usr/x86_64-w64-mingw32/include/winnt.h:4790:13 */ type XSTATE_CONFIGURATION = _XSTATE_CONFIGURATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4796:7 */ type PXSTATE_CONFIGURATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4796:28 */ type _MEMORY_BASIC_INFORMATION = struct { FBaseAddress PVOID FAllocationBase PVOID FAllocationProtect DWORD F__ccgo_pad1 [4]byte FRegionSize SIZE_T FState DWORD FProtect DWORD FType DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:4798:13 */ type MEMORY_BASIC_INFORMATION = _MEMORY_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:4806:7 */ type PMEMORY_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4806:32 */ type _MEMORY_BASIC_INFORMATION32 = struct { FBaseAddress DWORD FAllocationBase DWORD FAllocationProtect DWORD FRegionSize DWORD FState DWORD FProtect DWORD FType DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:4808:13 */ type MEMORY_BASIC_INFORMATION32 = _MEMORY_BASIC_INFORMATION32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4816:7 */ type PMEMORY_BASIC_INFORMATION32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4816: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:4818:13 */ type MEMORY_BASIC_INFORMATION64 = _MEMORY_BASIC_INFORMATION64 /* /usr/x86_64-w64-mingw32/include/winnt.h:4828:7 */ type PMEMORY_BASIC_INFORMATION64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4828:34 */ type _CFG_CALL_TARGET_INFO = struct { FOffset ULONG_PTR FFlags ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:4834:11 */ type CFG_CALL_TARGET_INFO = _CFG_CALL_TARGET_INFO /* /usr/x86_64-w64-mingw32/include/winnt.h:4837:5 */ type PCFG_CALL_TARGET_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4837:27 */ type _MEM_ADDRESS_REQUIREMENTS = struct { FLowestStartingAddress PVOID FHighestEndingAddress PVOID FAlignment SIZE_T } /* /usr/x86_64-w64-mingw32/include/winnt.h:4896:11 */ type MEM_ADDRESS_REQUIREMENTS = _MEM_ADDRESS_REQUIREMENTS /* /usr/x86_64-w64-mingw32/include/winnt.h:4900:5 */ type PMEM_ADDRESS_REQUIREMENTS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4900:31 */ type MEM_EXTENDED_PARAMETER_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4916:5 */ type PMEM_EXTENDED_PARAMETER_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4916:34 */ type MEM_EXTENDED_PARAMETER1 = struct { F__0 struct { F__ccgo_pad1 [0]uint64 FType uint64 /* DWORD64 Type: 8, DWORD64 Reserved: 56 */ } F__8 struct{ FULong64 DWORD64 } } /* /usr/x86_64-w64-mingw32/include/winnt.h:4920:11 */ type MEM_EXTENDED_PARAMETER = MEM_EXTENDED_PARAMETER1 /* /usr/x86_64-w64-mingw32/include/winnt.h:4932:5 */ type PMEM_EXTENDED_PARAMETER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4932:29 */ type MEM_SECTION_EXTENDED_PARAMETER_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:4951:5 */ type PMEM_SECTION_EXTENDED_PARAMETER_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:4951:42 */ type FILE_ID_1281 = struct{ FIdentifier [16]BYTE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5069:13 */ type FILE_ID_128 = FILE_ID_1281 /* /usr/x86_64-w64-mingw32/include/winnt.h:5071:7 */ type PFILE_ID_128 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5071:20 */ type _FILE_NOTIFY_INFORMATION = struct { FNextEntryOffset DWORD FAction DWORD FFileNameLength DWORD FFileName [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:5073:13 */ type FILE_NOTIFY_INFORMATION = _FILE_NOTIFY_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:5078:7 */ type PFILE_NOTIFY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5078:31 */ type _FILE_SEGMENT_ELEMENT = struct{ FBuffer PVOID64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5080:13 */ type FILE_SEGMENT_ELEMENT = _FILE_SEGMENT_ELEMENT /* /usr/x86_64-w64-mingw32/include/winnt.h:5083:7 */ type PFILE_SEGMENT_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5083:28 */ type _REPARSE_GUID_DATA_BUFFER = struct { FReparseTag DWORD FReparseDataLength WORD FReserved WORD FReparseGuid GUID FGenericReparseBuffer struct{ FDataBuffer [1]BYTE } F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:5085:13 */ type REPARSE_GUID_DATA_BUFFER = _REPARSE_GUID_DATA_BUFFER /* /usr/x86_64-w64-mingw32/include/winnt.h:5093:7 */ type PREPARSE_GUID_DATA_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5093:32 */ type SYSTEM_POWER_STATE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5348:5 */ type PSYSTEM_POWER_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5348:24 */ type POWER_ACTION = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5356:5 */ type PPOWER_ACTION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5356:18 */ type DEVICE_POWER_STATE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5361:5 */ type PDEVICE_POWER_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5361:24 */ type MONITOR_DISPLAY_STATE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5365:5 */ type PMONITOR_DISPLAY_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5365:28 */ type USER_ACTIVITY_PRESENCE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5373:5 */ type PUSER_ACTIVITY_PRESENCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5373:28 */ type EXECUTION_STATE = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:5381:17 */ type PEXECUTION_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5381:34 */ type LATENCY_TIME = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5385:5 */ type POWER_REQUEST_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5403:5 */ type PPOWER_REQUEST_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5403: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5415:13 */ type CM_POWER_DATA = CM_Power_Data_s /* /usr/x86_64-w64-mingw32/include/winnt.h:5424:7 */ type PCM_POWER_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5424:21 */ type POWER_INFORMATION_LEVEL = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5508:7 */ type POWER_USER_PRESENCE_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5514:7 */ type PPOWER_USER_PRESENCE_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5514:32 */ type _POWER_USER_PRESENCE = struct{ FUserPresence POWER_USER_PRESENCE_TYPE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5516:13 */ type POWER_USER_PRESENCE = _POWER_USER_PRESENCE /* /usr/x86_64-w64-mingw32/include/winnt.h:5518:7 */ type PPOWER_USER_PRESENCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5518:27 */ type _POWER_SESSION_CONNECT = struct { FConnected BOOLEAN FConsole BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winnt.h:5520:13 */ type POWER_SESSION_CONNECT = _POWER_SESSION_CONNECT /* /usr/x86_64-w64-mingw32/include/winnt.h:5523:7 */ type PPOWER_SESSION_CONNECT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5523:29 */ type _POWER_SESSION_TIMEOUTS = struct { FInputTimeout DWORD FDisplayTimeout DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5525:13 */ type POWER_SESSION_TIMEOUTS = _POWER_SESSION_TIMEOUTS /* /usr/x86_64-w64-mingw32/include/winnt.h:5528:7 */ type PPOWER_SESSION_TIMEOUTS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5528:30 */ type _POWER_SESSION_RIT_STATE = struct { FActive BOOLEAN F__ccgo_pad1 [3]byte FLastInputTime DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5530:13 */ type POWER_SESSION_RIT_STATE = _POWER_SESSION_RIT_STATE /* /usr/x86_64-w64-mingw32/include/winnt.h:5533:7 */ type PPOWER_SESSION_RIT_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5533:31 */ type _POWER_SESSION_WINLOGON = struct { FSessionId DWORD FConsole BOOLEAN FLocked BOOLEAN F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:5535:13 */ type POWER_SESSION_WINLOGON = _POWER_SESSION_WINLOGON /* /usr/x86_64-w64-mingw32/include/winnt.h:5539:7 */ type PPOWER_SESSION_WINLOGON = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5539:30 */ type _POWER_IDLE_RESILIENCY = struct { FCoalescingTimeout DWORD FIdleResiliencyPeriod DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5541:13 */ type POWER_IDLE_RESILIENCY = _POWER_IDLE_RESILIENCY /* /usr/x86_64-w64-mingw32/include/winnt.h:5544:7 */ type PPOWER_IDLE_RESILIENCY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5544:29 */ type POWER_MONITOR_REQUEST_REASON = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5562:7 */ type _POWER_MONITOR_INVOCATION = struct { FOn BOOLEAN FConsole BOOLEAN F__ccgo_pad1 [2]byte FRequestReason POWER_MONITOR_REQUEST_REASON } /* /usr/x86_64-w64-mingw32/include/winnt.h:5564:13 */ type POWER_MONITOR_INVOCATION = _POWER_MONITOR_INVOCATION /* /usr/x86_64-w64-mingw32/include/winnt.h:5568:7 */ type PPOWER_MONITOR_INVOCATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5568:32 */ type _RESUME_PERFORMANCE = struct { FPostTimeMs DWORD F__ccgo_pad1 [4]byte FTotalResumeTimeMs ULONGLONG FResumeCompleteTimestamp ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:5570:13 */ type RESUME_PERFORMANCE = _RESUME_PERFORMANCE /* /usr/x86_64-w64-mingw32/include/winnt.h:5574:7 */ type PRESUME_PERFORMANCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5574:26 */ type SYSTEM_POWER_CONDITION = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5581:7 */ type SET_POWER_SETTING_VALUE = struct { FVersion DWORD FGuid GUID FPowerCondition SYSTEM_POWER_CONDITION FDataLength DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:5589:7 */ type PSET_POWER_SETTING_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5589:31 */ type NOTIFY_USER_POWER_SETTING = struct{ FGuid GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:5595:7 */ type PNOTIFY_USER_POWER_SETTING = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5595:33 */ type _APPLICATIONLAUNCH_SETTING_VALUE = struct { FActivationTime LARGE_INTEGER FFlags DWORD FButtonInstanceID DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5597:13 */ type APPLICATIONLAUNCH_SETTING_VALUE = _APPLICATIONLAUNCH_SETTING_VALUE /* /usr/x86_64-w64-mingw32/include/winnt.h:5601:7 */ type PAPPLICATIONLAUNCH_SETTING_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5601:39 */ type POWER_PLATFORM_ROLE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:5614:7 */ type PPOWER_PLATFORM_ROLE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5614:27 */ type _POWER_PLATFORM_INFORMATION = struct{ FAoAc BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winnt.h:5616:13 */ type POWER_PLATFORM_INFORMATION = _POWER_PLATFORM_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:5618:7 */ type PPOWER_PLATFORM_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5618:34 */ type BATTERY_REPORTING_SCALE = struct { FGranularity DWORD FCapacity DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5637:7 */ type PBATTERY_REPORTING_SCALE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5637:31 */ type PPM_WMI_LEGACY_PERFSTATE = struct { FFrequency DWORD FFlags DWORD FPercentFrequency DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5643:7 */ type PPPM_WMI_LEGACY_PERFSTATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5643: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5657:7 */ type PPPM_WMI_IDLE_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5657:26 */ type PPM_WMI_IDLE_STATES = struct { FType DWORD FCount DWORD FTargetState DWORD FOldState DWORD FTargetProcessors DWORD64 FState [1]PPM_WMI_IDLE_STATE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5666:7 */ type PPPM_WMI_IDLE_STATES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5666:27 */ type PPM_WMI_IDLE_STATES_EX = struct { FType DWORD FCount DWORD FTargetState DWORD FOldState DWORD FTargetProcessors PVOID FState [1]PPM_WMI_IDLE_STATE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5675:7 */ type PPPM_WMI_IDLE_STATES_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5675:30 */ type PPM_WMI_PERF_STATE = struct { FFrequency DWORD FPower DWORD FPercentFrequency BYTE FIncreaseLevel BYTE FDecreaseLevel BYTE FType BYTE FIncreaseTime DWORD FDecreaseTime DWORD F__ccgo_pad1 [4]byte FControl DWORD64 FStatus DWORD64 FHitCount DWORD FReserved1 DWORD FReserved2 DWORD64 FReserved3 DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5692:7 */ type PPPM_WMI_PERF_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5692: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 F__ccgo_pad1 [4]byte FTargetProcessors DWORD64 FPStateHandler DWORD FPStateContext DWORD FTStateHandler DWORD FTStateContext DWORD FFeedbackHandler DWORD FReserved1 DWORD FReserved2 DWORD64 FState [1]PPM_WMI_PERF_STATE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5716:7 */ type PPPM_WMI_PERF_STATES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5716: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 F__ccgo_pad1 [4]byte FTargetProcessors PVOID FPStateHandler DWORD FPStateContext DWORD FTStateHandler DWORD FTStateContext DWORD FFeedbackHandler DWORD FReserved1 DWORD FReserved2 DWORD64 FState [1]PPM_WMI_PERF_STATE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5740:7 */ type PPPM_WMI_PERF_STATES_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5740:30 */ type PPM_IDLE_STATE_ACCOUNTING = struct { FIdleTransitions DWORD FFailedTransitions DWORD FInvalidBucketIndex DWORD F__ccgo_pad1 [4]byte FTotalTime DWORD64 FIdleTimeBuckets [6]DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5751:7 */ type PPPM_IDLE_STATE_ACCOUNTING = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5751:33 */ type PPM_IDLE_ACCOUNTING = struct { FStateCount DWORD FTotalTransitions DWORD FResetCount DWORD F__ccgo_pad1 [4]byte FStartTime DWORD64 FState [1]PPM_IDLE_STATE_ACCOUNTING } /* /usr/x86_64-w64-mingw32/include/winnt.h:5759:7 */ type PPPM_IDLE_ACCOUNTING = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5759:27 */ type PPM_IDLE_STATE_BUCKET_EX = struct { FTotalTimeUs DWORD64 FMinTimeUs DWORD FMaxTimeUs DWORD FCount DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:5766:7 */ type PPPM_IDLE_STATE_BUCKET_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5766: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5777:7 */ type PPPM_IDLE_STATE_ACCOUNTING_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5777:36 */ type PPM_IDLE_ACCOUNTING_EX = struct { FStateCount DWORD FTotalTransitions DWORD FResetCount DWORD FAbortCount DWORD FStartTime DWORD64 FState [1]PPM_IDLE_STATE_ACCOUNTING_EX } /* /usr/x86_64-w64-mingw32/include/winnt.h:5786:7 */ type PPPM_IDLE_ACCOUNTING_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5786:30 */ type PPM_PERFSTATE_EVENT = struct { FState DWORD FStatus DWORD FLatency DWORD FSpeed DWORD FProcessor DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5830:7 */ type PPPM_PERFSTATE_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5830:27 */ type PPM_PERFSTATE_DOMAIN_EVENT = struct { FState DWORD FLatency DWORD FSpeed DWORD F__ccgo_pad1 [4]byte FProcessors DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5837:7 */ type PPPM_PERFSTATE_DOMAIN_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5837:34 */ type PPM_IDLESTATE_EVENT = struct { FNewState DWORD FOldState DWORD FProcessors DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5843:7 */ type PPPM_IDLESTATE_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5843:27 */ type PPM_THERMALCHANGE_EVENT = struct { FThermalConstraint DWORD F__ccgo_pad1 [4]byte FProcessors DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5848:7 */ type PPPM_THERMALCHANGE_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5848:31 */ type PPM_THERMAL_POLICY_EVENT = struct { FMode BYTE F__ccgo_pad1 [7]byte FProcessors DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:5852:7 */ type PPPM_THERMAL_POLICY_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5852:32 */ type POWER_ACTION_POLICY = struct { FAction POWER_ACTION FFlags DWORD FEventCode DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:5869:7 */ type PPOWER_ACTION_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5869:27 */ type PROCESSOR_IDLESTATE_INFO = struct { FTimeCheck DWORD FDemotePercent BYTE FPromotePercent BYTE FSpare [2]BYTE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5904:7 */ type PPROCESSOR_IDLESTATE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5904:32 */ type SYSTEM_POWER_LEVEL = struct { FEnable BOOLEAN FSpare [3]BYTE FBatteryLevel DWORD FPowerPolicy POWER_ACTION_POLICY FMinSystemState SYSTEM_POWER_STATE } /* /usr/x86_64-w64-mingw32/include/winnt.h:5912:7 */ type PSYSTEM_POWER_LEVEL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5912: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 F__ccgo_pad1 [3]byte FVideoReserved [3]DWORD FSpindownTimeout DWORD FOptimizeForPower BOOLEAN FFanThrottleTolerance BYTE FForcedThrottle BYTE FMinThrottle BYTE FOverThrottled POWER_ACTION_POLICY } /* /usr/x86_64-w64-mingw32/include/winnt.h:5914:13 */ type SYSTEM_POWER_POLICY = _SYSTEM_POWER_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:5943:7 */ type PSYSTEM_POWER_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5943:27 */ type PROCESSOR_IDLESTATE_POLICY = struct { FRevision WORD FFlags struct{ FAsWORD WORD } FPolicyCount DWORD FPolicy [3]PROCESSOR_IDLESTATE_INFO } /* /usr/x86_64-w64-mingw32/include/winnt.h:5963:7 */ type PPROCESSOR_IDLESTATE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5963: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 */ } /* /usr/x86_64-w64-mingw32/include/winnt.h:5965:13 */ type PROCESSOR_POWER_POLICY_INFO = _PROCESSOR_POWER_POLICY_INFO /* /usr/x86_64-w64-mingw32/include/winnt.h:5975:7 */ type PPROCESSOR_POWER_POLICY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5975:35 */ type _PROCESSOR_POWER_POLICY = struct { FRevision DWORD FDynamicThrottle BYTE FSpare [3]BYTE FDisableCStates uint32 /* DWORD DisableCStates: 1, DWORD Reserved: 31 */ F__ccgo_pad1 [4]byte FPolicyCount DWORD FPolicy [3]PROCESSOR_POWER_POLICY_INFO } /* /usr/x86_64-w64-mingw32/include/winnt.h:5977:13 */ type PROCESSOR_POWER_POLICY = _PROCESSOR_POWER_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:5985:7 */ type PPROCESSOR_POWER_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:5985: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6009:7 */ type PPROCESSOR_PERFSTATE_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6009:34 */ type _ADMINISTRATOR_POWER_POLICY = struct { FMinSleep SYSTEM_POWER_STATE FMaxSleep SYSTEM_POWER_STATE FMinVideoTimeout DWORD FMaxVideoTimeout DWORD FMinSpindownTimeout DWORD FMaxSpindownTimeout DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:6011:13 */ type ADMINISTRATOR_POWER_POLICY = _ADMINISTRATOR_POWER_POLICY /* /usr/x86_64-w64-mingw32/include/winnt.h:6018:7 */ type PADMINISTRATOR_POWER_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6018: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6050:7 */ type PSYSTEM_POWER_CAPABILITIES = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6050: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6064:7 */ type PSYSTEM_BATTERY_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6064: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6076: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:6096:7 */ type PIMAGE_DOS_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6096: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6098:13 */ type IMAGE_OS2_HEADER = _IMAGE_OS2_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:6129:7 */ type PIMAGE_OS2_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6129: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6131:13 */ type IMAGE_VXD_HEADER = _IMAGE_VXD_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:6183:7 */ type PIMAGE_VXD_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6183: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6187: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:6195:7 */ type PIMAGE_FILE_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6195:25 */ type _IMAGE_DATA_DIRECTORY = struct { FVirtualAddress DWORD FSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:6248:13 */ type IMAGE_DATA_DIRECTORY = _IMAGE_DATA_DIRECTORY /* /usr/x86_64-w64-mingw32/include/winnt.h:6251:7 */ type PIMAGE_DATA_DIRECTORY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6251: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6255:13 */ type IMAGE_OPTIONAL_HEADER32 = _IMAGE_OPTIONAL_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:6288:7 */ type PIMAGE_OPTIONAL_HEADER32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6288: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6290:13 */ type IMAGE_ROM_OPTIONAL_HEADER = _IMAGE_ROM_OPTIONAL_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:6304:7 */ type PIMAGE_ROM_OPTIONAL_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6304: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6306:13 */ type IMAGE_OPTIONAL_HEADER64 = _IMAGE_OPTIONAL_HEADER64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6337:7 */ type PIMAGE_OPTIONAL_HEADER64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6337:31 */ type IMAGE_OPTIONAL_HEADER = IMAGE_OPTIONAL_HEADER64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6349:37 */ type PIMAGE_OPTIONAL_HEADER = PIMAGE_OPTIONAL_HEADER64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6350:38 */ type _IMAGE_NT_HEADERS64 = struct { FSignature DWORD FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_OPTIONAL_HEADER64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6360:13 */ type IMAGE_NT_HEADERS64 = _IMAGE_NT_HEADERS64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6364:7 */ type PIMAGE_NT_HEADERS64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6364:26 */ type _IMAGE_NT_HEADERS = struct { FSignature DWORD FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_OPTIONAL_HEADER32 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6366:13 */ type IMAGE_NT_HEADERS32 = _IMAGE_NT_HEADERS /* /usr/x86_64-w64-mingw32/include/winnt.h:6370:7 */ type PIMAGE_NT_HEADERS32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6370:26 */ type _IMAGE_ROM_HEADERS = struct { FFileHeader IMAGE_FILE_HEADER FOptionalHeader IMAGE_ROM_OPTIONAL_HEADER } /* /usr/x86_64-w64-mingw32/include/winnt.h:6372:13 */ type IMAGE_ROM_HEADERS = _IMAGE_ROM_HEADERS /* /usr/x86_64-w64-mingw32/include/winnt.h:6375:7 */ type PIMAGE_ROM_HEADERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6375:25 */ type IMAGE_NT_HEADERS = IMAGE_NT_HEADERS64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6378:32 */ type PIMAGE_NT_HEADERS = PIMAGE_NT_HEADERS64 /* /usr/x86_64-w64-mingw32/include/winnt.h:6379:33 */ type ANON_OBJECT_HEADER1 = struct { FSig1 WORD FSig2 WORD FVersion WORD FMachine WORD FTimeDateStamp DWORD FClassID CLSID FSizeOfData DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:6430:13 */ type ANON_OBJECT_HEADER = ANON_OBJECT_HEADER1 /* /usr/x86_64-w64-mingw32/include/winnt.h:6438: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6440:13 */ type ANON_OBJECT_HEADER_V2 = ANON_OBJECT_HEADER_V21 /* /usr/x86_64-w64-mingw32/include/winnt.h:6451: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6453:13 */ type ANON_OBJECT_HEADER_BIGOBJ = ANON_OBJECT_HEADER_BIGOBJ1 /* /usr/x86_64-w64-mingw32/include/winnt.h:6467: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:6471:13 */ type IMAGE_SECTION_HEADER = _IMAGE_SECTION_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:6485:7 */ type PIMAGE_SECTION_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6485: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 { F__ccgo_pad1 [0]uint32 FShortName [8]BYTE } FValue DWORD FSectionNumber SHORT FType WORD FStorageClass BYTE FNumberOfAuxSymbols BYTE F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:6535: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:6549:7 */ type PIMAGE_SYMBOL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6550:36 */ type _IMAGE_SYMBOL_EX = struct { FN struct { F__ccgo_pad1 [0]uint32 FShortName [8]BYTE } FValue DWORD FSectionNumber LONG FType WORD FStorageClass BYTE FNumberOfAuxSymbols BYTE } /* /usr/x86_64-w64-mingw32/include/winnt.h:6554:13 */ type IMAGE_SYMBOL_EX = _IMAGE_SYMBOL_EX /* /usr/x86_64-w64-mingw32/include/winnt.h:6568:7 */ type PIMAGE_SYMBOL_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6568: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 F__ccgo_pad1 [2]byte FSymbolTableIndex DWORD FrgbReserved [12]BYTE } /* /usr/x86_64-w64-mingw32/include/winnt.h:6661: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:6666:7 */ type PIMAGE_AUX_SYMBOL_TOKEN_DEF = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6666: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 { F__ccgo_pad1 [0]uint32 FLnSz struct { FLinenumber WORD FSize WORD } } FFcnAry struct { FFunction struct { FPointerToLinenumber DWORD FPointerToNextFunction DWORD } } FTvIndex WORD F__ccgo_pad1 [2]byte } } /* /usr/x86_64-w64-mingw32/include/winnt.h:6669: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:6706:7 */ type PIMAGE_AUX_SYMBOL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6706:34 */ type _IMAGE_AUX_SYMBOL_EX = struct { FSym struct { FWeakDefaultSymIndex DWORD FWeakSearchType DWORD FrgbReserved [12]BYTE } F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:6708:13 */ type IMAGE_AUX_SYMBOL_EX = _IMAGE_AUX_SYMBOL_EX /* /usr/x86_64-w64-mingw32/include/winnt.h:6736:7 */ type PIMAGE_AUX_SYMBOL_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6736:37 */ type IMAGE_AUX_SYMBOL_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:6742:7 */ type _IMAGE_RELOCATION = struct { Fu struct{ FVirtualAddress DWORD } FSymbolTableIndex DWORD FType WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:6756:13 */ type IMAGE_RELOCATION = _IMAGE_RELOCATION /* /usr/x86_64-w64-mingw32/include/winnt.h:6763:7 */ type PIMAGE_RELOCATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:6764:40 */ type _IMAGE_LINENUMBER = struct { FType struct{ FSymbolTableIndex DWORD } FLinenumber WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:7094:13 */ type IMAGE_LINENUMBER = _IMAGE_LINENUMBER /* /usr/x86_64-w64-mingw32/include/winnt.h:7100:7 */ type PIMAGE_LINENUMBER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7101: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7107: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:7110:7 */ type PIMAGE_BASE_RELOCATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7111: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7134:13 */ type IMAGE_ARCHIVE_MEMBER_HEADER = _IMAGE_ARCHIVE_MEMBER_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:7142:7 */ type PIMAGE_ARCHIVE_MEMBER_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7142: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7146:13 */ type IMAGE_EXPORT_DIRECTORY = _IMAGE_EXPORT_DIRECTORY /* /usr/x86_64-w64-mingw32/include/winnt.h:7158:7 */ type PIMAGE_EXPORT_DIRECTORY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7158:30 */ type _IMAGE_IMPORT_BY_NAME = struct { FHint WORD FName [1]CHAR F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:7160:13 */ type IMAGE_IMPORT_BY_NAME = _IMAGE_IMPORT_BY_NAME /* /usr/x86_64-w64-mingw32/include/winnt.h:7163:7 */ type PIMAGE_IMPORT_BY_NAME = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7163: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 } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7167: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:7174:7 */ type PIMAGE_THUNK_DATA64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7175: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 } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7179: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:7186:7 */ type PIMAGE_THUNK_DATA32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7187:32 */ type PIMAGE_TLS_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7196:18 */ type _IMAGE_TLS_DIRECTORY64 = struct { FStartAddressOfRawData ULONGLONG FEndAddressOfRawData ULONGLONG FAddressOfIndex ULONGLONG FAddressOfCallBacks ULONGLONG FSizeOfZeroFill DWORD FCharacteristics DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7198:13 */ type IMAGE_TLS_DIRECTORY64 = _IMAGE_TLS_DIRECTORY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7205:7 */ type PIMAGE_TLS_DIRECTORY64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7206:35 */ type _IMAGE_TLS_DIRECTORY32 = struct { FStartAddressOfRawData DWORD FEndAddressOfRawData DWORD FAddressOfIndex DWORD FAddressOfCallBacks DWORD FSizeOfZeroFill DWORD FCharacteristics DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7208:13 */ type IMAGE_TLS_DIRECTORY32 = _IMAGE_TLS_DIRECTORY32 /* /usr/x86_64-w64-mingw32/include/winnt.h:7215:7 */ type PIMAGE_TLS_DIRECTORY32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7216:35 */ type IMAGE_THUNK_DATA = IMAGE_THUNK_DATA64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7221:32 */ type PIMAGE_THUNK_DATA = PIMAGE_THUNK_DATA64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7222:33 */ type IMAGE_TLS_DIRECTORY = IMAGE_TLS_DIRECTORY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7224:35 */ type PIMAGE_TLS_DIRECTORY = PIMAGE_TLS_DIRECTORY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7225:36 */ type _IMAGE_IMPORT_DESCRIPTOR = struct { Fu struct{ FCharacteristics DWORD } FTimeDateStamp DWORD FForwarderChain DWORD FName DWORD FFirstThunk DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7236:13 */ type IMAGE_IMPORT_DESCRIPTOR = _IMAGE_IMPORT_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:7246:7 */ type PIMAGE_IMPORT_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7247:47 */ type _IMAGE_BOUND_IMPORT_DESCRIPTOR = struct { FTimeDateStamp DWORD FOffsetModuleName WORD FNumberOfModuleForwarderRefs WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7249:13 */ type IMAGE_BOUND_IMPORT_DESCRIPTOR = _IMAGE_BOUND_IMPORT_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:7253:7 */ type PIMAGE_BOUND_IMPORT_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7253:37 */ type _IMAGE_BOUND_FORWARDER_REF = struct { FTimeDateStamp DWORD FOffsetModuleName WORD FReserved WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7255:13 */ type IMAGE_BOUND_FORWARDER_REF = _IMAGE_BOUND_FORWARDER_REF /* /usr/x86_64-w64-mingw32/include/winnt.h:7259:7 */ type PIMAGE_BOUND_FORWARDER_REF = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7259:33 */ type _IMAGE_DELAYLOAD_DESCRIPTOR = struct { FAttributes struct{ FAllAttributes DWORD } FDllNameRVA DWORD FModuleHandleRVA DWORD FImportAddressTableRVA DWORD FImportNameTableRVA DWORD FBoundImportAddressTableRVA DWORD FUnloadInformationTableRVA DWORD FTimeDateStamp DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7261:13 */ type IMAGE_DELAYLOAD_DESCRIPTOR = _IMAGE_DELAYLOAD_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:7276:7 */ type PIMAGE_DELAYLOAD_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7276:34 */ type PCIMAGE_DELAYLOAD_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7277:46 */ type _IMAGE_RESOURCE_DIRECTORY = struct { FCharacteristics DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FNumberOfNamedEntries WORD FNumberOfIdEntries WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7279:13 */ type IMAGE_RESOURCE_DIRECTORY = _IMAGE_RESOURCE_DIRECTORY /* /usr/x86_64-w64-mingw32/include/winnt.h:7286:7 */ type PIMAGE_RESOURCE_DIRECTORY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7286:32 */ type _IMAGE_RESOURCE_DIRECTORY_ENTRY = struct { Fu struct { Fs struct { F__ccgo_pad1 [0]uint32 FNameOffset uint32 /* DWORD NameOffset: 31, DWORD NameIsString: 1 */ } } Fu2 struct{ FOffsetToData DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7291:13 */ type IMAGE_RESOURCE_DIRECTORY_ENTRY = _IMAGE_RESOURCE_DIRECTORY_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7307:7 */ type PIMAGE_RESOURCE_DIRECTORY_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7307:38 */ type _IMAGE_RESOURCE_DIRECTORY_STRING = struct { FLength WORD FNameString [1]CHAR F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:7309:13 */ type IMAGE_RESOURCE_DIRECTORY_STRING = _IMAGE_RESOURCE_DIRECTORY_STRING /* /usr/x86_64-w64-mingw32/include/winnt.h:7312:7 */ type PIMAGE_RESOURCE_DIRECTORY_STRING = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7312:39 */ type _IMAGE_RESOURCE_DIR_STRING_U = struct { FLength WORD FNameString [1]WCHAR } /* /usr/x86_64-w64-mingw32/include/winnt.h:7314:13 */ type IMAGE_RESOURCE_DIR_STRING_U = _IMAGE_RESOURCE_DIR_STRING_U /* /usr/x86_64-w64-mingw32/include/winnt.h:7317:7 */ type PIMAGE_RESOURCE_DIR_STRING_U = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7317:35 */ type _IMAGE_RESOURCE_DATA_ENTRY = struct { FOffsetToData DWORD FSize DWORD FCodePage DWORD FReserved DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7319:13 */ type IMAGE_RESOURCE_DATA_ENTRY = _IMAGE_RESOURCE_DATA_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7324:7 */ type PIMAGE_RESOURCE_DATA_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7324: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7347:7 */ type PIMAGE_LOAD_CONFIG_DIRECTORY32 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7347: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7370:7 */ type PIMAGE_LOAD_CONFIG_DIRECTORY64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7370:37 */ type IMAGE_LOAD_CONFIG_DIRECTORY = IMAGE_LOAD_CONFIG_DIRECTORY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7373:43 */ type PIMAGE_LOAD_CONFIG_DIRECTORY = PIMAGE_LOAD_CONFIG_DIRECTORY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7374:44 */ type _IMAGE_CE_RUNTIME_FUNCTION_ENTRY = struct { FFuncStart DWORD FPrologLen uint32 /* DWORD PrologLen: 8, DWORD FuncLen: 22, DWORD ThirtyTwoBit: 1, DWORD ExceptionFlag: 1 */ } /* /usr/x86_64-w64-mingw32/include/winnt.h:7380:13 */ type IMAGE_CE_RUNTIME_FUNCTION_ENTRY = _IMAGE_CE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7386:7 */ type PIMAGE_CE_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7386:39 */ type _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress ULONGLONG FEndAddress ULONGLONG FExceptionHandler ULONGLONG FHandlerData ULONGLONG FPrologEndAddress ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:7388:13 */ type IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = _IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7394:7 */ type PIMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7394:44 */ type _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD FEndAddress DWORD FExceptionHandler DWORD FHandlerData DWORD FPrologEndAddress DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7396:13 */ type IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = _IMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7402:7 */ type PIMAGE_ALPHA_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7402:42 */ type _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD Fu struct{ FUnwindData DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7404:13 */ type IMAGE_ARM_RUNTIME_FUNCTION_ENTRY = _IMAGE_ARM_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7420:7 */ type PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7420:40 */ type _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD Fu struct{ FUnwindData DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7422:13 */ type IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7436:7 */ type PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7436:42 */ type _IMAGE_RUNTIME_FUNCTION_ENTRY = struct { FBeginAddress DWORD FEndAddress DWORD Fu struct{ FUnwindInfoAddress DWORD } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7438:13 */ type X_IMAGE_RUNTIME_FUNCTION_ENTRY = _IMAGE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7445:7 */ type X_PIMAGE_RUNTIME_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7445:37 */ type IMAGE_IA64_RUNTIME_FUNCTION_ENTRY = X_IMAGE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7447:43 */ type PIMAGE_IA64_RUNTIME_FUNCTION_ENTRY = X_PIMAGE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7448:44 */ type IMAGE_RUNTIME_FUNCTION_ENTRY = X_IMAGE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7462:43 */ type PIMAGE_RUNTIME_FUNCTION_ENTRY = X_PIMAGE_RUNTIME_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7463:44 */ type _IMAGE_DEBUG_DIRECTORY = struct { FCharacteristics DWORD FTimeDateStamp DWORD FMajorVersion WORD FMinorVersion WORD FType DWORD FSizeOfData DWORD FAddressOfRawData DWORD FPointerToRawData DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7466:13 */ type IMAGE_DEBUG_DIRECTORY = _IMAGE_DEBUG_DIRECTORY /* /usr/x86_64-w64-mingw32/include/winnt.h:7475:7 */ type PIMAGE_DEBUG_DIRECTORY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7475:29 */ type _IMAGE_COFF_SYMBOLS_HEADER = struct { FNumberOfSymbols DWORD FLvaToFirstSymbol DWORD FNumberOfLinenumbers DWORD FLvaToFirstLinenumber DWORD FRvaToFirstByteOfCode DWORD FRvaToLastByteOfCode DWORD FRvaToFirstByteOfData DWORD FRvaToLastByteOfData DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7490:13 */ type IMAGE_COFF_SYMBOLS_HEADER = _IMAGE_COFF_SYMBOLS_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:7499:7 */ type PIMAGE_COFF_SYMBOLS_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7499: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 */ } /* /usr/x86_64-w64-mingw32/include/winnt.h:7506:13 */ type FPO_DATA = _FPO_DATA /* /usr/x86_64-w64-mingw32/include/winnt.h:7517:7 */ type PFPO_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7517:16 */ type _IMAGE_DEBUG_MISC = struct { FDataType DWORD FLength DWORD FUnicode BOOLEAN FReserved [3]BYTE FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:7522:13 */ type IMAGE_DEBUG_MISC = _IMAGE_DEBUG_MISC /* /usr/x86_64-w64-mingw32/include/winnt.h:7528:7 */ type PIMAGE_DEBUG_MISC = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7528:24 */ type _IMAGE_FUNCTION_ENTRY = struct { FStartingAddress DWORD FEndingAddress DWORD FEndOfPrologue DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7530:13 */ type IMAGE_FUNCTION_ENTRY = _IMAGE_FUNCTION_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7534:7 */ type PIMAGE_FUNCTION_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7534:28 */ type _IMAGE_FUNCTION_ENTRY64 = struct { FStartingAddress ULONGLONG FEndingAddress ULONGLONG Fu struct{ FEndOfPrologue ULONGLONG } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7536:13 */ type IMAGE_FUNCTION_ENTRY64 = _IMAGE_FUNCTION_ENTRY64 /* /usr/x86_64-w64-mingw32/include/winnt.h:7543:7 */ type PIMAGE_FUNCTION_ENTRY64 = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7543: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7545:13 */ type IMAGE_SEPARATE_DEBUG_HEADER = _IMAGE_SEPARATE_DEBUG_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:7559:7 */ type PIMAGE_SEPARATE_DEBUG_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7559: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7561:13 */ type NON_PAGED_DEBUG_INFO = _NON_PAGED_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/winnt.h:7571:7 */ type PNON_PAGED_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7571:28 */ type _ImageArchitectureHeader = struct { FAmaskValue uint32 /* unsigned AmaskValue: 1, int Adummy1: 7, unsigned AmaskShift: 8, int Adummy2: 16 */ F__ccgo_pad1 [4]byte FFirstEntryRVA DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7579:13 */ type IMAGE_ARCHITECTURE_HEADER = _ImageArchitectureHeader /* /usr/x86_64-w64-mingw32/include/winnt.h:7585:7 */ type PIMAGE_ARCHITECTURE_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7585:33 */ type _ImageArchitectureEntry = struct { FFixupInstRVA DWORD FNewInst DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7587:13 */ type IMAGE_ARCHITECTURE_ENTRY = _ImageArchitectureEntry /* /usr/x86_64-w64-mingw32/include/winnt.h:7590:7 */ type PIMAGE_ARCHITECTURE_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7590: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 */ } /* /usr/x86_64-w64-mingw32/include/winnt.h:7595: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:7609:7 */ type IMPORT_OBJECT_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:7613:7 */ type IMPORT_OBJECT_NAME_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:7617:7 */ type ReplacesCorHdrNumericDefines = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:7628: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7630:13 */ type IMAGE_COR20_HEADER = IMAGE_COR20_HEADER1 /* /usr/x86_64-w64-mingw32/include/winnt.h:7646:7 */ type PIMAGE_COR20_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7646: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7726: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:7728:7 */ type PSLIST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7728:19 */ type _SLIST_HEADER = struct { Fs struct { FAlignment ULONGLONG FRegion ULONGLONG } } /* /usr/x86_64-w64-mingw32/include/winnt.h:7730:13 */ type SLIST_HEADER = _SLIST_HEADER /* /usr/x86_64-w64-mingw32/include/winnt.h:7751:7 */ type PSLIST_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7751:20 */ type _RTL_RUN_ONCE = struct{ FPtr PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:7780:9 */ type RTL_RUN_ONCE = _RTL_RUN_ONCE /* /usr/x86_64-w64-mingw32/include/winnt.h:7780:45 */ type PRTL_RUN_ONCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7780:59 */ type PRTL_RUN_ONCE_INIT_FN = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7781:15 */ type _RTL_BARRIER = struct { FReserved1 DWORD FReserved2 DWORD FReserved3 [2]ULONG_PTR FReserved4 DWORD FReserved5 DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7790:11 */ type RTL_BARRIER = _RTL_BARRIER /* /usr/x86_64-w64-mingw32/include/winnt.h:7796:5 */ type PRTL_BARRIER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7796:17 */ type _MESSAGE_RESOURCE_ENTRY = struct { FLength WORD FFlags WORD FText [1]BYTE F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:7899:13 */ type MESSAGE_RESOURCE_ENTRY = _MESSAGE_RESOURCE_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:7903:7 */ type PMESSAGE_RESOURCE_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7903:30 */ type _MESSAGE_RESOURCE_BLOCK = struct { FLowId DWORD FHighId DWORD FOffsetToEntries DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:7921:13 */ type MESSAGE_RESOURCE_BLOCK = _MESSAGE_RESOURCE_BLOCK /* /usr/x86_64-w64-mingw32/include/winnt.h:7925:7 */ type PMESSAGE_RESOURCE_BLOCK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7925:30 */ type _MESSAGE_RESOURCE_DATA = struct { FNumberOfBlocks DWORD FBlocks [1]MESSAGE_RESOURCE_BLOCK } /* /usr/x86_64-w64-mingw32/include/winnt.h:7927:13 */ type MESSAGE_RESOURCE_DATA = _MESSAGE_RESOURCE_DATA /* /usr/x86_64-w64-mingw32/include/winnt.h:7930:7 */ type PMESSAGE_RESOURCE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7930:29 */ type _OSVERSIONINFOA = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]CHAR } /* /usr/x86_64-w64-mingw32/include/winnt.h:7932:13 */ type OSVERSIONINFOA = _OSVERSIONINFOA /* /usr/x86_64-w64-mingw32/include/winnt.h:7939:7 */ type POSVERSIONINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7939:22 */ type LPOSVERSIONINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7939:39 */ type _OSVERSIONINFOW = struct { FdwOSVersionInfoSize DWORD FdwMajorVersion DWORD FdwMinorVersion DWORD FdwBuildNumber DWORD FdwPlatformId DWORD FszCSDVersion [128]WCHAR } /* /usr/x86_64-w64-mingw32/include/winnt.h:7941:13 */ type OSVERSIONINFOW = _OSVERSIONINFOW /* /usr/x86_64-w64-mingw32/include/winnt.h:7948:7 */ type POSVERSIONINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7948:22 */ type LPOSVERSIONINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7948:39 */ type RTL_OSVERSIONINFOW = _OSVERSIONINFOW /* /usr/x86_64-w64-mingw32/include/winnt.h:7948:57 */ type PRTL_OSVERSIONINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7948:76 */ type OSVERSIONINFO = OSVERSIONINFOA /* /usr/x86_64-w64-mingw32/include/winnt.h:7950:5 */ type POSVERSIONINFO = POSVERSIONINFOA /* /usr/x86_64-w64-mingw32/include/winnt.h:7951:5 */ type LPOSVERSIONINFO = LPOSVERSIONINFOA /* /usr/x86_64-w64-mingw32/include/winnt.h:7952: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7954:13 */ type OSVERSIONINFOEXA = _OSVERSIONINFOEXA /* /usr/x86_64-w64-mingw32/include/winnt.h:7966:7 */ type POSVERSIONINFOEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7966:24 */ type LPOSVERSIONINFOEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7966: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:7968:13 */ type OSVERSIONINFOEXW = _OSVERSIONINFOEXW /* /usr/x86_64-w64-mingw32/include/winnt.h:7980:7 */ type POSVERSIONINFOEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7980:24 */ type LPOSVERSIONINFOEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7980:43 */ type RTL_OSVERSIONINFOEXW = _OSVERSIONINFOEXW /* /usr/x86_64-w64-mingw32/include/winnt.h:7980:63 */ type PRTL_OSVERSIONINFOEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:7980:84 */ type OSVERSIONINFOEX = OSVERSIONINFOEXA /* /usr/x86_64-w64-mingw32/include/winnt.h:7982:5 */ type POSVERSIONINFOEX = POSVERSIONINFOEXA /* /usr/x86_64-w64-mingw32/include/winnt.h:7983:5 */ type LPOSVERSIONINFOEX = LPOSVERSIONINFOEXA /* /usr/x86_64-w64-mingw32/include/winnt.h:7984:5 */ type RTL_UMS_THREAD_INFO_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8037:7 */ type PRTL_UMS_THREAD_INFO_CLASS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8037:33 */ type RTL_UMS_SCHEDULER_REASON = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8043:7 */ type PRTL_UMS_SCHEDULER_REASON = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8043:32 */ type PRTL_UMS_SCHEDULER_ENTRY_POINT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8046:43 */ type _RTL_CRITICAL_SECTION_DEBUG = struct { FType WORD FCreatorBackTraceIndex WORD F__ccgo_pad1 [4]byte FCriticalSection uintptr FProcessLocksList LIST_ENTRY FEntryCount DWORD FContentionCount DWORD FFlags DWORD FCreatorBackTraceIndexHigh WORD FSpareWORD WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8066:13 */ type _RTL_CRITICAL_SECTION = struct { FDebugInfo PRTL_CRITICAL_SECTION_DEBUG FLockCount LONG FRecursionCount LONG FOwningThread HANDLE FLockSemaphore HANDLE FSpinCount ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:8066:13 */ type RTL_CRITICAL_SECTION_DEBUG = _RTL_CRITICAL_SECTION_DEBUG /* /usr/x86_64-w64-mingw32/include/winnt.h:8076:7 */ type PRTL_CRITICAL_SECTION_DEBUG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8076:34 */ type RTL_RESOURCE_DEBUG = _RTL_CRITICAL_SECTION_DEBUG /* /usr/x86_64-w64-mingw32/include/winnt.h:8076:63 */ type PRTL_RESOURCE_DEBUG = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8076: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:8100:7 */ type PRTL_CRITICAL_SECTION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8100: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8103: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:8103:48 */ type PRTL_SRWLOCK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8103:60 */ type _RTL_CONDITION_VARIABLE = struct{ FPtr PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:8104:13 */ type RTL_CONDITION_VARIABLE = _RTL_CONDITION_VARIABLE /* /usr/x86_64-w64-mingw32/include/winnt.h:8104:59 */ type PRTL_CONDITION_VARIABLE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8104:82 */ type PAPCFUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8111:18 */ type PVECTORED_EXCEPTION_HANDLER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8112:18 */ type HEAP_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8117:7 */ type WORKERCALLBACKFUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8119:18 */ type APC_CALLBACK_FUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8120:18 */ type WAITORTIMERCALLBACKFUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8121:18 */ type WAITORTIMERCALLBACK = WAITORTIMERCALLBACKFUNC /* /usr/x86_64-w64-mingw32/include/winnt.h:8122:37 */ type PFLS_CALLBACK_FUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8123:18 */ type PSECURE_MEMORY_CACHE_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8124:21 */ type ACTIVATION_CONTEXT_INFO_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8153:7 */ type ACTCTX_REQUESTED_RUN_LEVEL = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8161:7 */ type ACTCTX_COMPATIBILITY_ELEMENT_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8167:7 */ type _ACTIVATION_CONTEXT_QUERY_INDEX = struct { FulAssemblyIndex DWORD FulFileIndexInAssembly DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8169:13 */ type ACTIVATION_CONTEXT_QUERY_INDEX = _ACTIVATION_CONTEXT_QUERY_INDEX /* /usr/x86_64-w64-mingw32/include/winnt.h:8172:7 */ type PACTIVATION_CONTEXT_QUERY_INDEX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8172:38 */ type _ASSEMBLY_FILE_DETAILED_INFORMATION = struct { FulFlags DWORD FulFilenameLength DWORD FulPathLength DWORD F__ccgo_pad1 [4]byte FlpFileName PCWSTR FlpFilePath PCWSTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:8174:13 */ type ASSEMBLY_FILE_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8180:7 */ type PASSEMBLY_FILE_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8180: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8182:13 */ type ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8202:7 */ type PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8202:56 */ type _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = struct { FulFlags DWORD FRunLevel ACTCTX_REQUESTED_RUN_LEVEL FUiAccess DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8204:13 */ type ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = _ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8208:7 */ type PACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8208:48 */ type _COMPATIBILITY_CONTEXT_ELEMENT = struct { FId GUID FType ACTCTX_COMPATIBILITY_ELEMENT_TYPE } /* /usr/x86_64-w64-mingw32/include/winnt.h:8210:13 */ type COMPATIBILITY_CONTEXT_ELEMENT = _COMPATIBILITY_CONTEXT_ELEMENT /* /usr/x86_64-w64-mingw32/include/winnt.h:8213:7 */ type PCOMPATIBILITY_CONTEXT_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8213:37 */ //Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0} //Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a} type _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = struct { F__ccgo_pad1 [0]uint32 FElementCount DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8217:13 */ //Vista: {e2011457-1546-43c5-a5fe-008deee3d3f0} //Seven: {35138b9a-5d96-4fbd-8e2d-a2440225f93a} type ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = _ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8220:7 */ type PACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8220:52 */ type _SUPPORTED_OS_INFO = struct { FOsCount WORD FMitigationExist WORD FOsList [4]WORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8224:13 */ type SUPPORTED_OS_INFO = _SUPPORTED_OS_INFO /* /usr/x86_64-w64-mingw32/include/winnt.h:8228:7 */ type PSUPPORTED_OS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8228: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 F__ccgo_pad1 [4]byte FlpRootManifestPath PCWSTR FlpRootConfigurationPath PCWSTR FlpAppDirPath PCWSTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:8230:13 */ type ACTIVATION_CONTEXT_DETAILED_INFORMATION = _ACTIVATION_CONTEXT_DETAILED_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8243:7 */ type PACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8243:47 */ type PCACTIVATION_CONTEXT_QUERY_INDEX = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8245:58 */ type PCASSEMBLY_FILE_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8246:54 */ type PCACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8247:76 */ type PCACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8248:68 */ type PCCOMPATIBILITY_CONTEXT_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8249:57 */ type PCACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8250:72 */ type PCACTIVATION_CONTEXT_DETAILED_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8251:67 */ type RTL_VERIFIER_DLL_LOAD_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8268:18 */ type RTL_VERIFIER_DLL_UNLOAD_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8269:18 */ type RTL_VERIFIER_NTDLLHEAPFREE_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8270:18 */ type _RTL_VERIFIER_THUNK_DESCRIPTOR = struct { FThunkName PCHAR FThunkOldAddress PVOID FThunkNewAddress PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:8272:13 */ type RTL_VERIFIER_THUNK_DESCRIPTOR = _RTL_VERIFIER_THUNK_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:8276:7 */ type PRTL_VERIFIER_THUNK_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8276:37 */ type _RTL_VERIFIER_DLL_DESCRIPTOR = struct { FDllName PWCHAR FDllFlags DWORD F__ccgo_pad1 [4]byte FDllAddress PVOID FDllThunks PRTL_VERIFIER_THUNK_DESCRIPTOR } /* /usr/x86_64-w64-mingw32/include/winnt.h:8278:13 */ type RTL_VERIFIER_DLL_DESCRIPTOR = _RTL_VERIFIER_DLL_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:8283:7 */ type PRTL_VERIFIER_DLL_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8283:35 */ type _RTL_VERIFIER_PROVIDER_DESCRIPTOR = struct { FLength DWORD F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8285:13 */ type RTL_VERIFIER_PROVIDER_DESCRIPTOR = _RTL_VERIFIER_PROVIDER_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winnt.h:8297:7 */ type PRTL_VERIFIER_PROVIDER_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8297:40 */ type _HARDWARE_COUNTER_DATA = struct { FType HARDWARE_COUNTER_TYPE FReserved DWORD FValue DWORD64 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8410:13 */ type HARDWARE_COUNTER_DATA = _HARDWARE_COUNTER_DATA /* /usr/x86_64-w64-mingw32/include/winnt.h:8414:7 */ type PHARDWARE_COUNTER_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8414: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8416:13 */ type PERFORMANCE_DATA = _PERFORMANCE_DATA /* /usr/x86_64-w64-mingw32/include/winnt.h:8426:7 */ type PPERFORMANCE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8426: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8457:13 */ type EVENTLOGRECORD = _EVENTLOGRECORD /* /usr/x86_64-w64-mingw32/include/winnt.h:8474:7 */ type PEVENTLOGRECORD = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8474:22 */ type _EVENTSFORLOGFILE = struct { F__ccgo_pad1 [0]uint32 FulSize DWORD FszLogicalLogFile [256]WCHAR FulNumRecords DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8478:13 */ type EVENTSFORLOGFILE = _EVENTSFORLOGFILE /* /usr/x86_64-w64-mingw32/include/winnt.h:8483:7 */ type PEVENTSFORLOGFILE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8483:24 */ type _PACKEDEVENTINFO = struct { F__ccgo_pad1 [0]uint32 FulSize DWORD FulNumEventsForLogFile DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8485:13 */ type PACKEDEVENTINFO = _PACKEDEVENTINFO /* /usr/x86_64-w64-mingw32/include/winnt.h:8489:7 */ type PPACKEDEVENTINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8489:23 */ type SERVICE_NODE_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8587:7 */ type SERVICE_LOAD_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8592:7 */ type SERVICE_ERROR_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8596:7 */ type _TAPE_ERASE = struct { FType DWORD FImmediate BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8615:13 */ type TAPE_ERASE = _TAPE_ERASE /* /usr/x86_64-w64-mingw32/include/winnt.h:8618:7 */ type PTAPE_ERASE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8618:18 */ type _TAPE_PREPARE = struct { FOperation DWORD FImmediate BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8627:13 */ type TAPE_PREPARE = _TAPE_PREPARE /* /usr/x86_64-w64-mingw32/include/winnt.h:8630:7 */ type PTAPE_PREPARE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8630:20 */ type _TAPE_WRITE_MARKS = struct { FType DWORD FCount DWORD FImmediate BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8637:13 */ type TAPE_WRITE_MARKS = _TAPE_WRITE_MARKS /* /usr/x86_64-w64-mingw32/include/winnt.h:8641:7 */ type PTAPE_WRITE_MARKS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8641:24 */ type _TAPE_GET_POSITION = struct { FType DWORD FPartition DWORD FOffset LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winnt.h:8647:13 */ type TAPE_GET_POSITION = _TAPE_GET_POSITION /* /usr/x86_64-w64-mingw32/include/winnt.h:8651:7 */ type PTAPE_GET_POSITION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8651:25 */ type _TAPE_SET_POSITION = struct { FMethod DWORD FPartition DWORD FOffset LARGE_INTEGER FImmediate BOOLEAN F__ccgo_pad1 [7]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8664:13 */ type TAPE_SET_POSITION = _TAPE_SET_POSITION /* /usr/x86_64-w64-mingw32/include/winnt.h:8669:7 */ type PTAPE_SET_POSITION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8669: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:8738:13 */ type TAPE_GET_DRIVE_PARAMETERS = _TAPE_GET_DRIVE_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winnt.h:8750:7 */ type PTAPE_GET_DRIVE_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8750:33 */ type _TAPE_SET_DRIVE_PARAMETERS = struct { FECC BOOLEAN FCompression BOOLEAN FDataPadding BOOLEAN FReportSetmarks BOOLEAN FEOTWarningZoneSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8752:13 */ type TAPE_SET_DRIVE_PARAMETERS = _TAPE_SET_DRIVE_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winnt.h:8758:7 */ type PTAPE_SET_DRIVE_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8758:33 */ type _TAPE_GET_MEDIA_PARAMETERS = struct { FCapacity LARGE_INTEGER FRemaining LARGE_INTEGER FBlockSize DWORD FPartitionCount DWORD FWriteProtected BOOLEAN F__ccgo_pad1 [7]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8760:13 */ type TAPE_GET_MEDIA_PARAMETERS = _TAPE_GET_MEDIA_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winnt.h:8766:7 */ type PTAPE_GET_MEDIA_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8766:33 */ type _TAPE_SET_MEDIA_PARAMETERS = struct{ FBlockSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8768:13 */ type TAPE_SET_MEDIA_PARAMETERS = _TAPE_SET_MEDIA_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winnt.h:8770:7 */ type PTAPE_SET_MEDIA_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8770:33 */ type _TAPE_CREATE_PARTITION = struct { FMethod DWORD FCount DWORD FSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:8776:13 */ type TAPE_CREATE_PARTITION = _TAPE_CREATE_PARTITION /* /usr/x86_64-w64-mingw32/include/winnt.h:8780:7 */ type PTAPE_CREATE_PARTITION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8780:29 */ type _TAPE_WMI_OPERATIONS = struct { FMethod DWORD FDataBufferSize DWORD FDataBuffer PVOID } /* /usr/x86_64-w64-mingw32/include/winnt.h:8788:13 */ type TAPE_WMI_OPERATIONS = _TAPE_WMI_OPERATIONS /* /usr/x86_64-w64-mingw32/include/winnt.h:8792:7 */ type PTAPE_WMI_OPERATIONS = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8792:27 */ type TAPE_DRIVE_PROBLEM_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8796:7 */ type TP_VERSION = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:8799:17 */ type PTP_VERSION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8799:28 */ type PTP_CALLBACK_INSTANCE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8800:61 */ type PTP_SIMPLE_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8801:16 */ type PTP_POOL = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8802:35 */ type TP_CALLBACK_PRIORITY = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:8810:5 */ type _TP_POOL_STACK_INFORMATION = struct { FStackReserve SIZE_T FStackCommit SIZE_T } /* /usr/x86_64-w64-mingw32/include/winnt.h:8812:11 */ type TP_POOL_STACK_INFORMATION = _TP_POOL_STACK_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:8815:5 */ type PTP_POOL_STACK_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8815:32 */ type PTP_CLEANUP_GROUP = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8817:53 */ type PTP_CLEANUP_GROUP_CANCEL_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8818:16 */ type _TP_CALLBACK_ENVIRON_V1 = struct { FVersion TP_VERSION F__ccgo_pad1 [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 } F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:8842:11 */ type TP_CALLBACK_ENVIRON_V1 = _TP_CALLBACK_ENVIRON_V1 /* /usr/x86_64-w64-mingw32/include/winnt.h:8858:5 */ type TP_CALLBACK_ENVIRON = TP_CALLBACK_ENVIRON_V1 /* /usr/x86_64-w64-mingw32/include/winnt.h:8859:34 */ type PTP_CALLBACK_ENVIRON = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8859:54 */ type PTP_WORK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8862:35 */ type PTP_WORK_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8863:16 */ type PTP_TIMER = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8864:37 */ type PTP_TIMER_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8865:16 */ type TP_WAIT_RESULT = DWORD /* /usr/x86_64-w64-mingw32/include/winnt.h:8866:17 */ type PTP_WAIT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8867:35 */ type PTP_WAIT_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8868:16 */ type PTP_IO = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:8869: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 /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:13:16 */ type PCRM_PROTOCOL_ID = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:13:32 */ type NOTIFICATION_MASK = ULONG /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:38:17 */ type _TRANSACTION_NOTIFICATION = struct { FTransactionKey PVOID FTransactionNotification ULONG F__ccgo_pad1 [4]byte FTmVirtualClock LARGE_INTEGER FArgumentLength ULONG F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:78:11 */ type TRANSACTION_NOTIFICATION = _TRANSACTION_NOTIFICATION /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:83:5 */ type PTRANSACTION_NOTIFICATION = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:83:30 */ type _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = struct { FEnlistmentId GUID FUOW GUID } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:85:11 */ type TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = _TRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:88:5 */ type PTRANSACTION_NOTIFICATION_RECOVERY_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:88:48 */ type _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = struct { FTmIdentity GUID FFlags ULONG } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:92:11 */ type TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = _TRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:95:5 */ type PTRANSACTION_NOTIFICATION_TM_ONLINE_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:95:49 */ type SAVEPOINT_ID = ULONG /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:97:17 */ type PSAVEPOINT_ID = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:97:30 */ type _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = struct{ FSavepointId SAVEPOINT_ID } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:99:11 */ type TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = _TRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:101:5 */ type PTRANSACTION_NOTIFICATION_SAVEPOINT_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:101:49 */ type _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = struct { FPropagationCookie ULONG FUOW GUID FTmIdentity GUID FBufferLength ULONG } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:103:11 */ type TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = _TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:108:5 */ type PTRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:108:49 */ type _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = struct { FMarshalCookie ULONG FUOW GUID } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:110:11 */ type TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = _TRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:113:5 */ type PTRANSACTION_NOTIFICATION_MARSHAL_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:113:47 */ type TRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = TRANSACTION_NOTIFICATION_PROPAGATE_ARGUMENT /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:115:55 */ type PTRANSACTION_NOTIFICATION_PROMOTE_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:115:97 */ type _KCRM_MARSHAL_HEADER = struct { FVersionMajor ULONG FVersionMinor ULONG FNumProtocols ULONG FUnused ULONG } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:123:11 */ type KCRM_MARSHAL_HEADER = _KCRM_MARSHAL_HEADER /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:128:5 */ type PKCRM_MARSHAL_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:128:25 */ type PRKCRM_MARSHAL_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:128:47 */ type _KCRM_TRANSACTION_BLOB = struct { FUOW GUID FTmIdentity GUID FIsolationLevel ULONG FIsolationFlags ULONG FTimeout ULONG FDescription [64]WCHAR } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:130:11 */ type KCRM_TRANSACTION_BLOB = _KCRM_TRANSACTION_BLOB /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:137:5 */ type PKCRM_TRANSACTION_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:137:27 */ type PRKCRM_TRANSACTION_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:137:51 */ type _KCRM_PROTOCOL_BLOB = struct { FProtocolId CRM_PROTOCOL_ID FStaticInfoLength ULONG FTransactionIdInfoLength ULONG FUnused1 ULONG FUnused2 ULONG } /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:139:11 */ type KCRM_PROTOCOL_BLOB = _KCRM_PROTOCOL_BLOB /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:145:5 */ type PKCRM_PROTOCOL_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:145:24 */ type PRKCRM_PROTOCOL_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/ktmtypes.h:145:45 */ type TRANSACTION_OUTCOME = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9001:9 */ type TRANSACTION_STATE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9007:9 */ type _TRANSACTION_BASIC_INFORMATION = struct { FTransactionId GUID FState DWORD FOutcome DWORD } /* /usr/x86_64-w64-mingw32/include/winnt.h:9009:15 */ type TRANSACTION_BASIC_INFORMATION = _TRANSACTION_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9013:9 */ type PTRANSACTION_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9013:39 */ type _TRANSACTIONMANAGER_BASIC_INFORMATION = struct { FTmIdentity GUID FVirtualClock LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winnt.h:9015:15 */ type TRANSACTIONMANAGER_BASIC_INFORMATION = _TRANSACTIONMANAGER_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9018:9 */ type PTRANSACTIONMANAGER_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9018:46 */ type _TRANSACTIONMANAGER_LOG_INFORMATION = struct{ FLogIdentity GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9020:15 */ type TRANSACTIONMANAGER_LOG_INFORMATION = _TRANSACTIONMANAGER_LOG_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9022:9 */ type PTRANSACTIONMANAGER_LOG_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9022:44 */ type _TRANSACTIONMANAGER_LOGPATH_INFORMATION = struct { FLogPathLength DWORD FLogPath [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:9024:15 */ type TRANSACTIONMANAGER_LOGPATH_INFORMATION = _TRANSACTIONMANAGER_LOGPATH_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9027:9 */ type PTRANSACTIONMANAGER_LOGPATH_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9027:48 */ type _TRANSACTIONMANAGER_RECOVERY_INFORMATION = struct{ FLastRecoveredLsn ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winnt.h:9029:15 */ type TRANSACTIONMANAGER_RECOVERY_INFORMATION = _TRANSACTIONMANAGER_RECOVERY_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9031:9 */ type PTRANSACTIONMANAGER_RECOVERY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9031:49 */ type _TRANSACTIONMANAGER_OLDEST_INFORMATION = struct{ FOldestTransactionGuid GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9033:15 */ type TRANSACTIONMANAGER_OLDEST_INFORMATION = _TRANSACTIONMANAGER_OLDEST_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9035:9 */ type PTRANSACTIONMANAGER_OLDEST_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9035:47 */ type _TRANSACTION_PROPERTIES_INFORMATION = struct { FIsolationLevel DWORD FIsolationFlags DWORD FTimeout LARGE_INTEGER FOutcome DWORD FDescriptionLength DWORD FDescription [1]WCHAR F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:9037:15 */ type TRANSACTION_PROPERTIES_INFORMATION = _TRANSACTION_PROPERTIES_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9044:9 */ type PTRANSACTION_PROPERTIES_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9044:44 */ type _TRANSACTION_BIND_INFORMATION = struct{ FTmHandle HANDLE } /* /usr/x86_64-w64-mingw32/include/winnt.h:9046:15 */ type TRANSACTION_BIND_INFORMATION = _TRANSACTION_BIND_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9048:9 */ type PTRANSACTION_BIND_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9048:38 */ type _TRANSACTION_ENLISTMENT_PAIR = struct { FEnlistmentId GUID FResourceManagerId GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9050:15 */ type TRANSACTION_ENLISTMENT_PAIR = _TRANSACTION_ENLISTMENT_PAIR /* /usr/x86_64-w64-mingw32/include/winnt.h:9053:9 */ type PTRANSACTION_ENLISTMENT_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9053:37 */ type _TRANSACTION_ENLISTMENTS_INFORMATION = struct { FNumberOfEnlistments DWORD FEnlistmentPair [1]TRANSACTION_ENLISTMENT_PAIR } /* /usr/x86_64-w64-mingw32/include/winnt.h:9055:15 */ type TRANSACTION_ENLISTMENTS_INFORMATION = _TRANSACTION_ENLISTMENTS_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9058:9 */ type PTRANSACTION_ENLISTMENTS_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9058:45 */ type _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = struct{ FSuperiorEnlistmentPair TRANSACTION_ENLISTMENT_PAIR } /* /usr/x86_64-w64-mingw32/include/winnt.h:9060:15 */ type TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = _TRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9062:9 */ type PTRANSACTION_SUPERIOR_ENLISTMENT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9062:53 */ type _RESOURCEMANAGER_BASIC_INFORMATION = struct { FResourceManagerId GUID FDescriptionLength DWORD FDescription [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnt.h:9064:15 */ type RESOURCEMANAGER_BASIC_INFORMATION = _RESOURCEMANAGER_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9068:9 */ type PRESOURCEMANAGER_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9068:43 */ type _RESOURCEMANAGER_COMPLETION_INFORMATION = struct { FIoCompletionPortHandle HANDLE FCompletionKey ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winnt.h:9070:15 */ type RESOURCEMANAGER_COMPLETION_INFORMATION = _RESOURCEMANAGER_COMPLETION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9073:9 */ type PRESOURCEMANAGER_COMPLETION_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9073:48 */ type TRANSACTION_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9082:9 */ type TRANSACTIONMANAGER_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9091:9 */ type RESOURCEMANAGER_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9096:9 */ type _ENLISTMENT_BASIC_INFORMATION = struct { FEnlistmentId GUID FTransactionId GUID FResourceManagerId GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9098:15 */ type ENLISTMENT_BASIC_INFORMATION = _ENLISTMENT_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9102:9 */ type PENLISTMENT_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9102:38 */ type _ENLISTMENT_CRM_INFORMATION = struct { FCrmTransactionManagerId GUID FCrmResourceManagerId GUID FCrmEnlistmentId GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9104:15 */ type ENLISTMENT_CRM_INFORMATION = _ENLISTMENT_CRM_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9108:9 */ type PENLISTMENT_CRM_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9108:36 */ type ENLISTMENT_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9114:9 */ type _TRANSACTION_LIST_ENTRY = struct{ FUOW GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9116:15 */ type TRANSACTION_LIST_ENTRY = _TRANSACTION_LIST_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:9118:9 */ type PTRANSACTION_LIST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9118:32 */ type _TRANSACTION_LIST_INFORMATION = struct { FNumberOfTransactions DWORD FTransactionInformation [1]TRANSACTION_LIST_ENTRY } /* /usr/x86_64-w64-mingw32/include/winnt.h:9120:15 */ type TRANSACTION_LIST_INFORMATION = _TRANSACTION_LIST_INFORMATION /* /usr/x86_64-w64-mingw32/include/winnt.h:9123:9 */ type PTRANSACTION_LIST_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9123:38 */ type KTMOBJECT_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winnt.h:9131:9 */ type PKTMOBJECT_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9131:24 */ type _KTMOBJECT_CURSOR = struct { FLastQuery GUID FObjectIdCount DWORD FObjectIds [1]GUID } /* /usr/x86_64-w64-mingw32/include/winnt.h:9133:15 */ type KTMOBJECT_CURSOR = _KTMOBJECT_CURSOR /* /usr/x86_64-w64-mingw32/include/winnt.h:9137:9 */ type PKTMOBJECT_CURSOR = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9137: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:9174: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:9184:3 */ type PWOW64_FLOATING_SAVE_AREA = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9184: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 } /* /usr/x86_64-w64-mingw32/include/winnt.h:9187: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:9213:3 */ type PWOW64_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9213: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 { F__ccgo_pad1 [0]uint32 FBytes struct { FBaseMid BYTE FFlags1 BYTE FFlags2 BYTE FBaseHi BYTE } } } /* /usr/x86_64-w64-mingw32/include/winnt.h:9216: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 /* /usr/x86_64-w64-mingw32/include/winnt.h:9239:3 */ type PWOW64_LDT_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9239:20 */ type _WOW64_DESCRIPTOR_TABLE_ENTRY = struct { FSelector DWORD FDescriptor WOW64_LDT_ENTRY } /* /usr/x86_64-w64-mingw32/include/winnt.h:9241:13 */ type WOW64_DESCRIPTOR_TABLE_ENTRY = _WOW64_DESCRIPTOR_TABLE_ENTRY /* /usr/x86_64-w64-mingw32/include/winnt.h:9244:7 */ type PWOW64_DESCRIPTOR_TABLE_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/winnt.h:9244:36 */ type WPARAM = UINT_PTR /* /usr/x86_64-w64-mingw32/include/minwindef.h:166:20 */ type LPARAM = LONG_PTR /* /usr/x86_64-w64-mingw32/include/minwindef.h:167:20 */ type LRESULT = LONG_PTR /* /usr/x86_64-w64-mingw32/include/minwindef.h:168:20 */ type SPHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:189:18 */ type LPHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:190:18 */ type HGLOBAL = HANDLE /* /usr/x86_64-w64-mingw32/include/minwindef.h:191:18 */ type HLOCAL = HANDLE /* /usr/x86_64-w64-mingw32/include/minwindef.h:192:18 */ type GLOBALHANDLE = HANDLE /* /usr/x86_64-w64-mingw32/include/minwindef.h:193:18 */ type LOCALHANDLE = HANDLE /* /usr/x86_64-w64-mingw32/include/minwindef.h:194:18 */ type FARPROC = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:196:19 */ type NEARPROC = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:197:19 */ type PROC = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:198:19 */ type ATOM = WORD /* /usr/x86_64-w64-mingw32/include/minwindef.h:205:16 */ type HFILE = int32 /* /usr/x86_64-w64-mingw32/include/minwindef.h:207:15 */ type HINSTANCE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:208:3 */ type HINSTANCE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:208:3 */ type HKEY__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:209:3 */ type HKEY = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:209:3 */ type PHKEY = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:210:16 */ type HKL__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:211:3 */ type HKL = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:211:3 */ type HLSURF__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:212:3 */ type HLSURF = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:212:3 */ type HMETAFILE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:213:3 */ type HMETAFILE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:213:3 */ type HMODULE = HINSTANCE /* /usr/x86_64-w64-mingw32/include/minwindef.h:214:21 */ type HRGN__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:215:3 */ type HRGN = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:215:3 */ type HRSRC__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:216:3 */ type HRSRC = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:216:3 */ type HSPRITE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:217:3 */ type HSPRITE = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:217:3 */ type HSTR__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:218:3 */ type HSTR = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:218:3 */ type HTASK__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:219:3 */ type HTASK = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:219:3 */ type HWINSTA__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/minwindef.h:220:3 */ type HWINSTA = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:220:3 */ type _FILETIME = struct { FdwLowDateTime DWORD FdwHighDateTime DWORD } /* /usr/x86_64-w64-mingw32/include/minwindef.h:222:11 */ type FILETIME = _FILETIME /* /usr/x86_64-w64-mingw32/include/minwindef.h:225:5 */ type PFILETIME = uintptr /* /usr/x86_64-w64-mingw32/include/minwindef.h:225:14 */ type LPFILETIME = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/windef.h:26:1 */ type HWND = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:26:1 */ type HHOOK__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:27:1 */ type HHOOK = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:27:1 */ type HGDIOBJ = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:38:16 */ type HACCEL__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:43:1 */ type HACCEL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:43:1 */ type HBITMAP__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:44:1 */ type HBITMAP = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:44:1 */ type HBRUSH__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:45:1 */ type HBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:45:1 */ type HCOLORSPACE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:46:1 */ type HCOLORSPACE = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:46:1 */ type HDC__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:47:1 */ type HDC = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:47:1 */ type HGLRC__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:48:1 */ type HGLRC = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:48:1 */ type HDESK__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:49:1 */ type HDESK = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:49:1 */ type HENHMETAFILE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:50:1 */ type HENHMETAFILE = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:50:1 */ type HFONT__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:51:1 */ type HFONT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:51:1 */ type HICON__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:52:1 */ type HICON = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:52:1 */ type HMENU__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:53:1 */ type HMENU = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:53:1 */ type HPALETTE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:54:1 */ type HPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:54:1 */ type HPEN__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:55:1 */ type HPEN = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:55:1 */ type HMONITOR__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:56:1 */ type HMONITOR = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:56:1 */ type HWINEVENTHOOK__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:58:1 */ type HWINEVENTHOOK = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:58:1 */ type HCURSOR = HICON /* /usr/x86_64-w64-mingw32/include/windef.h:60:15 */ type COLORREF = DWORD /* /usr/x86_64-w64-mingw32/include/windef.h:61:15 */ type HUMPD__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:65:1 */ type HUMPD = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:65:1 */ type LPCOLORREF = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:67:15 */ type tagRECT = struct { Fleft LONG Ftop LONG Fright LONG Fbottom LONG } /* /usr/x86_64-w64-mingw32/include/windef.h:73:9 */ type RECT = tagRECT /* /usr/x86_64-w64-mingw32/include/windef.h:78:3 */ type PRECT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:78:8 */ type NPRECT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:78:15 */ type LPRECT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:78:23 */ type LPCRECT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:80:20 */ type _RECTL = struct { Fleft LONG Ftop LONG Fright LONG Fbottom LONG } /* /usr/x86_64-w64-mingw32/include/windef.h:82:9 */ type RECTL = _RECTL /* /usr/x86_64-w64-mingw32/include/windef.h:87:3 */ type PRECTL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:87:9 */ type LPRECTL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:87:17 */ type LPCRECTL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:89:21 */ type tagPOINT = struct { Fx LONG Fy LONG } /* /usr/x86_64-w64-mingw32/include/windef.h:91:9 */ type POINT = tagPOINT /* /usr/x86_64-w64-mingw32/include/windef.h:94:3 */ type PPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:94:9 */ type NPPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:94:17 */ type LPPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:94:26 */ type _POINTL = struct { Fx LONG Fy LONG } /* /usr/x86_64-w64-mingw32/include/windef.h:96:9 */ type POINTL = _POINTL /* /usr/x86_64-w64-mingw32/include/windef.h:99:3 */ type PPOINTL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:99:10 */ type tagSIZE = struct { Fcx LONG Fcy LONG } /* /usr/x86_64-w64-mingw32/include/windef.h:101:9 */ type SIZE = tagSIZE /* /usr/x86_64-w64-mingw32/include/windef.h:104:3 */ type PSIZE = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:104:8 */ type LPSIZE = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:104:15 */ type SIZEL = SIZE /* /usr/x86_64-w64-mingw32/include/windef.h:106:14 */ type PSIZEL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:107:14 */ type LPSIZEL = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:107:22 */ type tagPOINTS = struct { Fx SHORT Fy SHORT } /* /usr/x86_64-w64-mingw32/include/windef.h:109:9 */ type POINTS = tagPOINTS /* /usr/x86_64-w64-mingw32/include/windef.h:112:3 */ type PPOINTS = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:112:10 */ type LPPOINTS = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:112:19 */ type APP_LOCAL_DEVICE_ID1 = struct{ Fvalue [32]BYTE } /* /usr/x86_64-w64-mingw32/include/windef.h:116:9 */ type APP_LOCAL_DEVICE_ID = APP_LOCAL_DEVICE_ID1 /* /usr/x86_64-w64-mingw32/include/windef.h:118:3 */ type DPI_AWARENESS_CONTEXT__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/windef.h:155:1 */ type DPI_AWARENESS_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/windef.h:155:1 */ type DPI_AWARENESS = int32 /* /usr/x86_64-w64-mingw32/include/windef.h:162:3 */ type DPI_HOSTING_BEHAVIOR = int32 /* /usr/x86_64-w64-mingw32/include/windef.h:174: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 has no copyright assigned and is placed in the Public Domain. // This 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 F__ccgo_pad1 [4]byte FlpSecurityDescriptor LPVOID FbInheritHandle WINBOOL F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/minwinbase.h:17:5 */ type PSECURITY_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:17:26 */ type LPSECURITY_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:17:49 */ type _OVERLAPPED = struct { FInternal ULONG_PTR FInternalHigh ULONG_PTR Fu struct { F__ccgo_pad1 [0]uint64 Fs struct { FOffset DWORD FOffsetHigh DWORD } } FhEvent HANDLE } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:19:11 */ type OVERLAPPED = _OVERLAPPED /* /usr/x86_64-w64-mingw32/include/minwinbase.h:30:5 */ type LPOVERLAPPED = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:30:17 */ type _OVERLAPPED_ENTRY = struct { FlpCompletionKey ULONG_PTR FlpOverlapped LPOVERLAPPED FInternal ULONG_PTR FdwNumberOfBytesTransferred DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:32:11 */ type OVERLAPPED_ENTRY = _OVERLAPPED_ENTRY /* /usr/x86_64-w64-mingw32/include/minwinbase.h:37:5 */ type LPOVERLAPPED_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:37:23 */ type _SYSTEMTIME = struct { FwYear WORD FwMonth WORD FwDayOfWeek WORD FwDay WORD FwHour WORD FwMinute WORD FwSecond WORD FwMilliseconds WORD } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:49:11 */ type SYSTEMTIME = _SYSTEMTIME /* /usr/x86_64-w64-mingw32/include/minwinbase.h:58:5 */ type PSYSTEMTIME = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:58:17 */ type LPSYSTEMTIME = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:61:11 */ type WIN32_FIND_DATAA = _WIN32_FIND_DATAA /* /usr/x86_64-w64-mingw32/include/minwinbase.h:77:5 */ type PWIN32_FIND_DATAA = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:77:23 */ type LPWIN32_FIND_DATAA = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:77: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 } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:79:11 */ type WIN32_FIND_DATAW = _WIN32_FIND_DATAW /* /usr/x86_64-w64-mingw32/include/minwinbase.h:95:5 */ type PWIN32_FIND_DATAW = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:95:23 */ type LPWIN32_FIND_DATAW = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:95:43 */ type WIN32_FIND_DATA = WIN32_FIND_DATAA /* /usr/x86_64-w64-mingw32/include/minwinbase.h:97:3 */ type PWIN32_FIND_DATA = PWIN32_FIND_DATAA /* /usr/x86_64-w64-mingw32/include/minwinbase.h:98:3 */ type LPWIN32_FIND_DATA = LPWIN32_FIND_DATAA /* /usr/x86_64-w64-mingw32/include/minwinbase.h:99:3 */ type FINDEX_INFO_LEVELS = uint32 /* /usr/x86_64-w64-mingw32/include/minwinbase.h:106:5 */ type FINDEX_SEARCH_OPS = uint32 /* /usr/x86_64-w64-mingw32/include/minwinbase.h:119:5 */ type GET_FILEEX_INFO_LEVELS = uint32 /* /usr/x86_64-w64-mingw32/include/minwinbase.h:134:5 */ type CRITICAL_SECTION = RTL_CRITICAL_SECTION /* /usr/x86_64-w64-mingw32/include/minwinbase.h:171:32 */ type PCRITICAL_SECTION = PRTL_CRITICAL_SECTION /* /usr/x86_64-w64-mingw32/include/minwinbase.h:172:33 */ type LPCRITICAL_SECTION = PRTL_CRITICAL_SECTION /* /usr/x86_64-w64-mingw32/include/minwinbase.h:173:33 */ type CRITICAL_SECTION_DEBUG = RTL_CRITICAL_SECTION_DEBUG /* /usr/x86_64-w64-mingw32/include/minwinbase.h:174:38 */ type PCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG /* /usr/x86_64-w64-mingw32/include/minwinbase.h:175:39 */ type LPCRITICAL_SECTION_DEBUG = PRTL_CRITICAL_SECTION_DEBUG /* /usr/x86_64-w64-mingw32/include/minwinbase.h:176:39 */ type LPOVERLAPPED_COMPLETION_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:178: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 F__ccgo_pad1 [4]byte } } } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:183:11 */ type PROCESS_HEAP_ENTRY = _PROCESS_HEAP_ENTRY /* /usr/x86_64-w64-mingw32/include/minwinbase.h:201:5 */ type LPPROCESS_HEAP_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:201:24 */ type PPROCESS_HEAP_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:201:46 */ type _REASON_CONTEXT = struct { FVersion ULONG FFlags DWORD FReason struct { FDetailed struct { FLocalizedReasonModule HMODULE FLocalizedReasonId ULONG FReasonStringCount ULONG FReasonStrings uintptr } } } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:210:11 */ type REASON_CONTEXT = _REASON_CONTEXT /* /usr/x86_64-w64-mingw32/include/minwinbase.h:222:5 */ type PREASON_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:222:21 */ type PTHREAD_START_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:234:17 */ type LPTHREAD_START_ROUTINE = PTHREAD_START_ROUTINE /* /usr/x86_64-w64-mingw32/include/minwinbase.h:235:33 */ type PENCLAVE_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:237:18 */ type LPENCLAVE_ROUTINE = PENCLAVE_ROUTINE /* /usr/x86_64-w64-mingw32/include/minwinbase.h:238:28 */ type _EXCEPTION_DEBUG_INFO = struct { FExceptionRecord EXCEPTION_RECORD FdwFirstChance DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:240:11 */ type EXCEPTION_DEBUG_INFO = _EXCEPTION_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:243:5 */ type LPEXCEPTION_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:243:27 */ type _CREATE_THREAD_DEBUG_INFO = struct { FhThread HANDLE FlpThreadLocalBase LPVOID FlpStartAddress LPTHREAD_START_ROUTINE } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:245:11 */ type CREATE_THREAD_DEBUG_INFO = _CREATE_THREAD_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:249:5 */ type LPCREATE_THREAD_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:249: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 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:251:11 */ type CREATE_PROCESS_DEBUG_INFO = _CREATE_PROCESS_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:262:5 */ type LPCREATE_PROCESS_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:262:32 */ type _EXIT_THREAD_DEBUG_INFO = struct{ FdwExitCode DWORD } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:264:11 */ type EXIT_THREAD_DEBUG_INFO = _EXIT_THREAD_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:266:5 */ type LPEXIT_THREAD_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:266:29 */ type _EXIT_PROCESS_DEBUG_INFO = struct{ FdwExitCode DWORD } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:268:11 */ type EXIT_PROCESS_DEBUG_INFO = _EXIT_PROCESS_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:270:5 */ type LPEXIT_PROCESS_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:270:30 */ type _LOAD_DLL_DEBUG_INFO = struct { FhFile HANDLE FlpBaseOfDll LPVOID FdwDebugInfoFileOffset DWORD FnDebugInfoSize DWORD FlpImageName LPVOID FfUnicode WORD F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:272:11 */ type LOAD_DLL_DEBUG_INFO = _LOAD_DLL_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:279:5 */ type LPLOAD_DLL_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:279:26 */ type _UNLOAD_DLL_DEBUG_INFO = struct{ FlpBaseOfDll LPVOID } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:281:11 */ type UNLOAD_DLL_DEBUG_INFO = _UNLOAD_DLL_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:283:5 */ type LPUNLOAD_DLL_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:283:28 */ type _OUTPUT_DEBUG_STRING_INFO = struct { FlpDebugStringData LPSTR FfUnicode WORD FnDebugStringLength WORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:285:11 */ type OUTPUT_DEBUG_STRING_INFO = _OUTPUT_DEBUG_STRING_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:289:5 */ type LPOUTPUT_DEBUG_STRING_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:289:31 */ type _RIP_INFO = struct { FdwError DWORD FdwType DWORD } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:291:11 */ type RIP_INFO = _RIP_INFO /* /usr/x86_64-w64-mingw32/include/minwinbase.h:294:5 */ type LPRIP_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:294:15 */ type _DEBUG_EVENT = struct { FdwDebugEventCode DWORD FdwProcessId DWORD FdwThreadId DWORD F__ccgo_pad1 [4]byte Fu struct{ FException EXCEPTION_DEBUG_INFO } } /* /usr/x86_64-w64-mingw32/include/minwinbase.h:296:11 */ type DEBUG_EVENT = _DEBUG_EVENT /* /usr/x86_64-w64-mingw32/include/minwinbase.h:311:5 */ type LPDEBUG_EVENT = uintptr /* /usr/x86_64-w64-mingw32/include/minwinbase.h:311:18 */ type LPCONTEXT = PCONTEXT /* /usr/x86_64-w64-mingw32/include/minwinbase.h:314:20 */ type BEM_FREE_INTERFACE_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/errhandlingapi.h:17:14 */ type LPTOP_LEVEL_EXCEPTION_FILTER = PTOP_LEVEL_EXCEPTION_FILTER /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/fileapi.h:36:11 */ type BY_HANDLE_FILE_INFORMATION = _BY_HANDLE_FILE_INFORMATION /* /usr/x86_64-w64-mingw32/include/fileapi.h:47:5 */ type PBY_HANDLE_FILE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/fileapi.h:47:33 */ type LPBY_HANDLE_FILE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/fileapi.h:48:5 */ type _WIN32_FILE_ATTRIBUTE_DATA = struct { FdwFileAttributes DWORD FftCreationTime FILETIME FftLastAccessTime FILETIME FftLastWriteTime FILETIME FnFileSizeHigh DWORD FnFileSizeLow DWORD } /* /usr/x86_64-w64-mingw32/include/fileapi.h:142:11 */ type WIN32_FILE_ATTRIBUTE_DATA = _WIN32_FILE_ATTRIBUTE_DATA /* /usr/x86_64-w64-mingw32/include/fileapi.h:149:5 */ type LPWIN32_FILE_ATTRIBUTE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/fileapi.h:149: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 F__ccgo_pad1 [4]byte FcbAllocated SIZE_T FcbCommitted SIZE_T FcbReserved SIZE_T FcbMaxReserve SIZE_T } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/heapapi.h:24:5 */ type PHEAP_SUMMARY = uintptr /* /usr/x86_64-w64-mingw32/include/heapapi.h:24:18 */ type LPHEAP_SUMMARY = PHEAP_SUMMARY /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:22:5 */ type PENUMUILANG = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:22:17 */ type ENUMRESLANGPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:25:19 */ type ENUMRESLANGPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:26:19 */ type ENUMRESNAMEPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:27:19 */ type ENUMRESNAMEPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:28:19 */ type ENUMRESTYPEPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:29:19 */ type ENUMRESTYPEPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:30:19 */ type PGET_MODULE_HANDLE_EXA = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:41:19 */ type PGET_MODULE_HANDLE_EXW = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:42:19 */ type DLL_DIRECTORY_COOKIE = PVOID /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:45:17 */ type PDLL_DIRECTORY_COOKIE = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:45:39 */ type _REDIRECTION_FUNCTION_DESCRIPTOR = struct { FDllName PCSTR FFunctionName PCSTR FRedirectionTarget PVOID } /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:158:9 */ type REDIRECTION_FUNCTION_DESCRIPTOR = _REDIRECTION_FUNCTION_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:162:3 */ type PREDIRECTION_FUNCTION_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:162:36 */ type PCREDIRECTION_FUNCTION_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:164:47 */ type _REDIRECTION_DESCRIPTOR = struct { FVersion ULONG FFunctionCount ULONG FRedirections PCREDIRECTION_FUNCTION_DESCRIPTOR } /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:166:9 */ type REDIRECTION_DESCRIPTOR = _REDIRECTION_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:170:3 */ type PREDIRECTION_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:170:27 */ type PCREDIRECTION_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/libloaderapi.h:172:38 */ // * // 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 /* /usr/x86_64-w64-mingw32/include/memoryapi.h:21:5 */ type _STARTUPINFOA = struct { Fcb DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FlpReserved2 LPBYTE FhStdInput HANDLE FhStdOutput HANDLE FhStdError HANDLE } /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:51:11 */ type STARTUPINFOA = _STARTUPINFOA /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:70:5 */ type LPSTARTUPINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:70:19 */ type _STARTUPINFOW = struct { Fcb DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FlpReserved2 LPBYTE FhStdInput HANDLE FhStdOutput HANDLE FhStdError HANDLE } /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:72:11 */ type STARTUPINFOW = _STARTUPINFOW /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:91:5 */ type LPSTARTUPINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:91:19 */ type STARTUPINFO = STARTUPINFOA /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:93:3 */ type LPSTARTUPINFO = LPSTARTUPINFOA /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:94:3 */ type _PROCESS_INFORMATION = struct { FhProcess HANDLE FhThread HANDLE FdwProcessId DWORD FdwThreadId DWORD } /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:96:11 */ type PROCESS_INFORMATION = _PROCESS_INFORMATION /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:101:5 */ type PPROCESS_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:101:26 */ type LPPROCESS_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:101:49 */ type PPROC_THREAD_ATTRIBUTE_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:106:46 */ type LPPROC_THREAD_ATTRIBUTE_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/processthreadsapi.h:106: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 /* /usr/x86_64-w64-mingw32/include/synchapi.h:34:23 */ type PSRWLOCK = uintptr /* /usr/x86_64-w64-mingw32/include/synchapi.h:34:32 */ type INIT_ONCE = RTL_RUN_ONCE /* /usr/x86_64-w64-mingw32/include/synchapi.h:36:24 */ type PINIT_ONCE = PRTL_RUN_ONCE /* /usr/x86_64-w64-mingw32/include/synchapi.h:37:25 */ type LPINIT_ONCE = PRTL_RUN_ONCE /* /usr/x86_64-w64-mingw32/include/synchapi.h:38:25 */ type PINIT_ONCE_FN = uintptr /* /usr/x86_64-w64-mingw32/include/synchapi.h:40:19 */ type CONDITION_VARIABLE = RTL_CONDITION_VARIABLE /* /usr/x86_64-w64-mingw32/include/synchapi.h:41:34 */ type PCONDITION_VARIABLE = uintptr /* /usr/x86_64-w64-mingw32/include/synchapi.h:41:54 */ type PTIMERAPCROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/synchapi.h:102:16 */ type SYNCHRONIZATION_BARRIER = RTL_BARRIER /* /usr/x86_64-w64-mingw32/include/synchapi.h:104:23 */ type PSYNCHRONIZATION_BARRIER = PRTL_BARRIER /* /usr/x86_64-w64-mingw32/include/synchapi.h:105:24 */ type LPSYNCHRONIZATION_BARRIER = PRTL_BARRIER /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/sysinfoapi.h:35:5 */ type LPSYSTEM_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/sysinfoapi.h:48:11 */ type MEMORYSTATUSEX = _MEMORYSTATUSEX /* /usr/x86_64-w64-mingw32/include/sysinfoapi.h:58:5 */ type LPMEMORYSTATUSEX = uintptr /* /usr/x86_64-w64-mingw32/include/sysinfoapi.h:58:20 */ type COMPUTER_NAME_FORMAT = uint32 /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/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 <intrin.h> // // 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 <psdk_inc/intrin-impl.h> // // 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) // // <prototype goes here> // // __INTRINSICS_USEINLINE // <code goes here> // // #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. // ***************************************************** // ***************************************************** // GCC 8 has already defined _xgetbv, Clang 9 has _xgetbv defined as a macro // redirecting to the __builtin_ia32_xgetbv builtin. // ***************************************************** type PFIBER_START_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:160:16 */ type LPFIBER_START_ROUTINE = PFIBER_START_ROUTINE /* /usr/x86_64-w64-mingw32/include/winbase.h:161:32 */ type LPLDT_ENTRY = LPVOID /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:240:11 */ type COMMPROP = _COMMPROP /* /usr/x86_64-w64-mingw32/include/winbase.h:259:5 */ type LPCOMMPROP = uintptr /* /usr/x86_64-w64-mingw32/include/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 */ F__ccgo_pad1 [4]byte FcbInQue DWORD FcbOutQue DWORD } /* /usr/x86_64-w64-mingw32/include/winbase.h:263:11 */ type COMSTAT = _COMSTAT /* /usr/x86_64-w64-mingw32/include/winbase.h:274:5 */ type LPCOMSTAT = uintptr /* /usr/x86_64-w64-mingw32/include/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 */ F__ccgo_pad1 [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 F__ccgo_pad2 [2]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:285:11 */ type DCB = _DCB /* /usr/x86_64-w64-mingw32/include/winbase.h:314:5 */ type LPDCB = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:314:9 */ type _COMMTIMEOUTS = struct { FReadIntervalTimeout DWORD FReadTotalTimeoutMultiplier DWORD FReadTotalTimeoutConstant DWORD FWriteTotalTimeoutMultiplier DWORD FWriteTotalTimeoutConstant DWORD } /* /usr/x86_64-w64-mingw32/include/winbase.h:316:11 */ type COMMTIMEOUTS = _COMMTIMEOUTS /* /usr/x86_64-w64-mingw32/include/winbase.h:322:5 */ type LPCOMMTIMEOUTS = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:322:18 */ type _COMMCONFIG = struct { FdwSize DWORD FwVersion WORD FwReserved WORD Fdcb DCB FdwProviderSubType DWORD FdwProviderOffset DWORD FdwProviderSize DWORD FwcProviderData [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:324:11 */ type COMMCONFIG = _COMMCONFIG /* /usr/x86_64-w64-mingw32/include/winbase.h:333:5 */ type LPCOMMCONFIG = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winbase.h:364:11 */ type MEMORYSTATUS = _MEMORYSTATUS /* /usr/x86_64-w64-mingw32/include/winbase.h:373:5 */ type LPMEMORYSTATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:373:18 */ type _JIT_DEBUG_INFO = struct { FdwSize DWORD FdwProcessorArchitecture DWORD FdwThreadID DWORD FdwReserved0 DWORD FlpExceptionAddress ULONG64 FlpExceptionRecord ULONG64 FlpContextRecord ULONG64 } /* /usr/x86_64-w64-mingw32/include/winbase.h:431:11 */ type JIT_DEBUG_INFO = _JIT_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/winbase.h:439:5 */ type LPJIT_DEBUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:439:20 */ type JIT_DEBUG_INFO32 = JIT_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/winbase.h:441:26 */ type LPJIT_DEBUG_INFO32 = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:441:44 */ type JIT_DEBUG_INFO64 = JIT_DEBUG_INFO /* /usr/x86_64-w64-mingw32/include/winbase.h:442:26 */ type LPJIT_DEBUG_INFO64 = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:442:44 */ type LPEXCEPTION_RECORD = PEXCEPTION_RECORD /* /usr/x86_64-w64-mingw32/include/winbase.h:445:29 */ type LPEXCEPTION_POINTERS = PEXCEPTION_POINTERS /* /usr/x86_64-w64-mingw32/include/winbase.h:446:31 */ type _OFSTRUCT = struct { FcBytes BYTE FfFixedDisk BYTE FnErrCode WORD FReserved1 WORD FReserved2 WORD FszPathName [128]CHAR } /* /usr/x86_64-w64-mingw32/include/winbase.h:620:11 */ type OFSTRUCT = _OFSTRUCT /* /usr/x86_64-w64-mingw32/include/winbase.h:627:5 */ type LPOFSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:627:15 */ type POFSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:627:27 */ type THREAD_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winbase.h:1188:5 */ type DEP_SYSTEM_POLICY_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winbase.h:1285:5 */ type PFE_EXPORT_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:1378:17 */ type PFE_IMPORT_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:1379:17 */ type _WIN32_STREAM_ID = struct { FdwStreamId DWORD FdwStreamAttributes DWORD FSize LARGE_INTEGER FdwStreamNameSize DWORD FcStreamName [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:1456:11 */ type WIN32_STREAM_ID = _WIN32_STREAM_ID /* /usr/x86_64-w64-mingw32/include/winbase.h:1462:5 */ type LPWIN32_STREAM_ID = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:1462:21 */ type PROCESS_INFORMATION_CLASS = uint32 /* /usr/x86_64-w64-mingw32/include/winbase.h:1573:5 */ type PGET_SYSTEM_WOW64_DIRECTORY_A = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:1887:16 */ type PGET_SYSTEM_WOW64_DIRECTORY_W = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:1888:16 */ type LPPROGRESS_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2005:17 */ type STREAM_INFO_LEVELS = uint32 /* /usr/x86_64-w64-mingw32/include/winbase.h:2219:5 */ type _WIN32_FIND_STREAM_DATA = struct { FStreamSize LARGE_INTEGER FcStreamName [296]WCHAR } /* /usr/x86_64-w64-mingw32/include/winbase.h:2221:11 */ type WIN32_FIND_STREAM_DATA = _WIN32_FIND_STREAM_DATA /* /usr/x86_64-w64-mingw32/include/winbase.h:2224:5 */ type PWIN32_FIND_STREAM_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2224:28 */ type _EVENTLOG_FULL_INFORMATION = struct{ FdwFull DWORD } /* /usr/x86_64-w64-mingw32/include/winbase.h:2282:11 */ type EVENTLOG_FULL_INFORMATION = _EVENTLOG_FULL_INFORMATION /* /usr/x86_64-w64-mingw32/include/winbase.h:2284:5 */ type LPEVENTLOG_FULL_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2284:31 */ type tagHW_PROFILE_INFOA = struct { FdwDockInfo DWORD FszHwProfileGuid [39]CHAR FszHwProfileName [80]CHAR F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:2478:11 */ type HW_PROFILE_INFOA = tagHW_PROFILE_INFOA /* /usr/x86_64-w64-mingw32/include/winbase.h:2482:5 */ type LPHW_PROFILE_INFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2482:22 */ type tagHW_PROFILE_INFOW = struct { FdwDockInfo DWORD FszHwProfileGuid [39]WCHAR FszHwProfileName [80]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:2484:11 */ type HW_PROFILE_INFOW = tagHW_PROFILE_INFOW /* /usr/x86_64-w64-mingw32/include/winbase.h:2488:5 */ type LPHW_PROFILE_INFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2488:22 */ type HW_PROFILE_INFO = HW_PROFILE_INFOA /* /usr/x86_64-w64-mingw32/include/winbase.h:2490:3 */ type LPHW_PROFILE_INFO = LPHW_PROFILE_INFOA /* /usr/x86_64-w64-mingw32/include/winbase.h:2491: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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/timezoneapi.h:29:5 */ type PTIME_ZONE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/timezoneapi.h:29:27 */ type LPTIME_ZONE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/timezoneapi.h:31:11 */ type DYNAMIC_TIME_ZONE_INFORMATION = _TIME_DYNAMIC_ZONE_INFORMATION /* /usr/x86_64-w64-mingw32/include/timezoneapi.h:41:5 */ type PDYNAMIC_TIME_ZONE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/timezoneapi.h:41:35 */ type _SYSTEM_POWER_STATUS = struct { FACLineStatus BYTE FBatteryFlag BYTE FBatteryLifePercent BYTE FReserved1 BYTE FBatteryLifeTime DWORD FBatteryFullLifeTime DWORD } /* /usr/x86_64-w64-mingw32/include/winbase.h:2571:11 */ type SYSTEM_POWER_STATUS = _SYSTEM_POWER_STATUS /* /usr/x86_64-w64-mingw32/include/winbase.h:2578:5 */ type LPSYSTEM_POWER_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2578:25 */ type tagACTCTXA = struct { FcbSize ULONG FdwFlags DWORD FlpSource LPCSTR FwProcessorArchitecture USHORT FwLangId LANGID F__ccgo_pad1 [4]byte FlpAssemblyDirectory LPCSTR FlpResourceName LPCSTR FlpApplicationName LPCSTR FhModule HMODULE } /* /usr/x86_64-w64-mingw32/include/winbase.h:2649:11 */ type ACTCTXA = tagACTCTXA /* /usr/x86_64-w64-mingw32/include/winbase.h:2659:5 */ type PACTCTXA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2659:13 */ type tagACTCTXW = struct { FcbSize ULONG FdwFlags DWORD FlpSource LPCWSTR FwProcessorArchitecture USHORT FwLangId LANGID F__ccgo_pad1 [4]byte FlpAssemblyDirectory LPCWSTR FlpResourceName LPCWSTR FlpApplicationName LPCWSTR FhModule HMODULE } /* /usr/x86_64-w64-mingw32/include/winbase.h:2661:11 */ type ACTCTXW = tagACTCTXW /* /usr/x86_64-w64-mingw32/include/winbase.h:2671:5 */ type PACTCTXW = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2671:13 */ type ACTCTX = ACTCTXA /* /usr/x86_64-w64-mingw32/include/winbase.h:2673:3 */ type PACTCTX = PACTCTXA /* /usr/x86_64-w64-mingw32/include/winbase.h:2674:3 */ type PCACTCTXA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2676:25 */ type PCACTCTXW = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2677:25 */ type PCACTCTX = PCACTCTXA /* /usr/x86_64-w64-mingw32/include/winbase.h:2679:3 */ type tagACTCTX_SECTION_KEYED_DATA_2600 = struct { FcbSize ULONG FulDataFormatVersion ULONG FlpData PVOID FulLength ULONG F__ccgo_pad1 [4]byte FlpSectionGlobalData PVOID FulSectionGlobalDataLength ULONG F__ccgo_pad2 [4]byte FlpSectionBase PVOID FulSectionTotalLength ULONG F__ccgo_pad3 [4]byte FhActCtx HANDLE FulAssemblyRosterIndex ULONG F__ccgo_pad4 [4]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:2693:11 */ type ACTCTX_SECTION_KEYED_DATA_2600 = tagACTCTX_SECTION_KEYED_DATA_2600 /* /usr/x86_64-w64-mingw32/include/winbase.h:2704:5 */ type PACTCTX_SECTION_KEYED_DATA_2600 = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2704:36 */ type PCACTCTX_SECTION_KEYED_DATA_2600 = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2706:48 */ type tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = struct { FlpInformation PVOID FlpSectionBase PVOID FulSectionLength ULONG F__ccgo_pad1 [4]byte FlpSectionGlobalDataBase PVOID FulSectionGlobalDataLength ULONG F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:2708:11 */ type ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = tagACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA /* /usr/x86_64-w64-mingw32/include/winbase.h:2714:5 */ type PACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2714:49 */ type PCACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2716:61 */ type tagACTCTX_SECTION_KEYED_DATA = struct { FcbSize ULONG FulDataFormatVersion ULONG FlpData PVOID FulLength ULONG F__ccgo_pad1 [4]byte FlpSectionGlobalData PVOID FulSectionGlobalDataLength ULONG F__ccgo_pad2 [4]byte FlpSectionBase PVOID FulSectionTotalLength ULONG F__ccgo_pad3 [4]byte FhActCtx HANDLE FulAssemblyRosterIndex ULONG FulFlags ULONG FAssemblyMetadata ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA } /* /usr/x86_64-w64-mingw32/include/winbase.h:2718:11 */ type ACTCTX_SECTION_KEYED_DATA = tagACTCTX_SECTION_KEYED_DATA /* /usr/x86_64-w64-mingw32/include/winbase.h:2731:5 */ type PACTCTX_SECTION_KEYED_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2731:31 */ type PCACTCTX_SECTION_KEYED_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2733:43 */ type _ACTIVATION_CONTEXT_BASIC_INFORMATION = struct { FhActCtx HANDLE FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winbase.h:2746:11 */ type ACTIVATION_CONTEXT_BASIC_INFORMATION = _ACTIVATION_CONTEXT_BASIC_INFORMATION /* /usr/x86_64-w64-mingw32/include/winbase.h:2749:5 */ type PACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2749:42 */ type PCACTIVATION_CONTEXT_BASIC_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2751:62 */ type PQUERYACTCTXW_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2763:19 */ type APPLICATION_RECOVERY_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winbase.h:2783: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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:229:5 */ type PDRAWPATRECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:229:17 */ type _PSINJECTDATA = struct { FDataBytes DWORD FInjectionPoint WORD FPageNumber WORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:335:11 */ type PSINJECTDATA = _PSINJECTDATA /* /usr/x86_64-w64-mingw32/include/wingdi.h:339:5 */ type PPSINJECTDATA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:339:18 */ type _PSFEATURE_OUTPUT = struct { FbPageIndependent WINBOOL FbSetPageDevice WINBOOL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:393:11 */ type PSFEATURE_OUTPUT = _PSFEATURE_OUTPUT /* /usr/x86_64-w64-mingw32/include/wingdi.h:396:5 */ type PPSFEATURE_OUTPUT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:396:22 */ type _PSFEATURE_CUSTPAPER = struct { FlOrientation LONG FlWidth LONG FlHeight LONG FlWidthOffset LONG FlHeightOffset LONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:398:11 */ type PSFEATURE_CUSTPAPER = _PSFEATURE_CUSTPAPER /* /usr/x86_64-w64-mingw32/include/wingdi.h:404:5 */ type PPSFEATURE_CUSTPAPER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:404:25 */ type tagXFORM = struct { FeM11 FLOAT FeM12 FLOAT FeM21 FLOAT FeM22 FLOAT FeDx FLOAT FeDy FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:452:11 */ type XFORM = tagXFORM /* /usr/x86_64-w64-mingw32/include/wingdi.h:459:5 */ type PXFORM = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:459:11 */ type LPXFORM = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:459:19 */ type tagBITMAP = struct { FbmType LONG FbmWidth LONG FbmHeight LONG FbmWidthBytes LONG FbmPlanes WORD FbmBitsPixel WORD F__ccgo_pad1 [4]byte FbmBits LPVOID } /* /usr/x86_64-w64-mingw32/include/wingdi.h:461:11 */ type BITMAP = tagBITMAP /* /usr/x86_64-w64-mingw32/include/wingdi.h:469:5 */ type PBITMAP = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:469:12 */ type NPBITMAP = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:469:21 */ type LPBITMAP = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:469: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:472: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:476:5 */ type PRGBTRIPLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:476:15 */ type NPRGBTRIPLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:476:27 */ type LPRGBTRIPLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:476: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 tagRGBQUAD = struct { FrgbBlue BYTE FrgbGreen BYTE FrgbRed BYTE FrgbReserved BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:479: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:484:5 */ type LPRGBQUAD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:488:19 */ type LCSCSTYPE = LONG /* /usr/x86_64-w64-mingw32/include/wingdi.h:501:16 */ type LCSGAMUTMATCH = LONG /* /usr/x86_64-w64-mingw32/include/wingdi.h:504:16 */ type FXPT16DOT16 = int32 /* /usr/x86_64-w64-mingw32/include/wingdi.h:528:20 */ type LPFXPT16DOT16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:528:32 */ type FXPT2DOT30 = int32 /* /usr/x86_64-w64-mingw32/include/wingdi.h:529:20 */ type LPFXPT2DOT30 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:529:31 */ type tagCIEXYZ = struct { FciexyzX FXPT2DOT30 FciexyzY FXPT2DOT30 FciexyzZ FXPT2DOT30 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:531:11 */ type CIEXYZ = tagCIEXYZ /* /usr/x86_64-w64-mingw32/include/wingdi.h:535:5 */ type LPCIEXYZ = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:538:18 */ type tagICEXYZTRIPLE = struct { FciexyzRed CIEXYZ FciexyzGreen CIEXYZ FciexyzBlue CIEXYZ } /* /usr/x86_64-w64-mingw32/include/wingdi.h:541:11 */ type CIEXYZTRIPLE = tagICEXYZTRIPLE /* /usr/x86_64-w64-mingw32/include/wingdi.h:545:5 */ type LPCIEXYZTRIPLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:548: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:552:11 */ type LOGCOLORSPACEA = tagLOGCOLORSPACEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:563:5 */ type LPLOGCOLORSPACEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:563: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:565:11 */ type LOGCOLORSPACEW = tagLOGCOLORSPACEW /* /usr/x86_64-w64-mingw32/include/wingdi.h:576:5 */ type LPLOGCOLORSPACEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:576:20 */ type LOGCOLORSPACE = LOGCOLORSPACEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:578:3 */ type LPLOGCOLORSPACE = LPLOGCOLORSPACEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:579:3 */ type tagBITMAPCOREHEADER = struct { FbcSize DWORD FbcWidth WORD FbcHeight WORD FbcPlanes WORD FbcBitCount WORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:583:11 */ type BITMAPCOREHEADER = tagBITMAPCOREHEADER /* /usr/x86_64-w64-mingw32/include/wingdi.h:589:5 */ type LPBITMAPCOREHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:589:22 */ type PBITMAPCOREHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:589: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:593:11 */ type BITMAPINFOHEADER = tagBITMAPINFOHEADER /* /usr/x86_64-w64-mingw32/include/wingdi.h:605:5 */ type LPBITMAPINFOHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:605:22 */ type PBITMAPINFOHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:605: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:630:5 */ type LPBITMAPV4HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:630:20 */ type PBITMAPV4HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:630: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:657:5 */ type LPBITMAPV5HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:657:20 */ type PBITMAPV5HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:657:38 */ type tagBITMAPINFO = struct { FbmiHeader BITMAPINFOHEADER FbmiColors [1]RGBQUAD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:671:11 */ type BITMAPINFO = tagBITMAPINFO /* /usr/x86_64-w64-mingw32/include/wingdi.h:674:5 */ type LPBITMAPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:674:16 */ type PBITMAPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:674:30 */ type tagBITMAPCOREINFO = struct { FbmciHeader BITMAPCOREHEADER FbmciColors [1]RGBTRIPLE F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:678:11 */ type BITMAPCOREINFO = tagBITMAPCOREINFO /* /usr/x86_64-w64-mingw32/include/wingdi.h:681:5 */ type LPBITMAPCOREINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:681:20 */ type PBITMAPCOREINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:681: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 F__ccgo_pad1 [2]byte FbfSize DWORD FbfReserved1 WORD FbfReserved2 WORD FbfOffBits DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:684: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:690:5 */ type LPBITMAPFILEHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:690:22 */ type PBITMAPFILEHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:690: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:699: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:702:5 */ type PFONTSIGNATURE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:702:19 */ type LPFONTSIGNATURE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:702:35 */ type tagCHARSETINFO = struct { FciCharset UINT FciACP UINT Ffs FONTSIGNATURE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:704:11 */ type CHARSETINFO = tagCHARSETINFO /* /usr/x86_64-w64-mingw32/include/wingdi.h:708:5 */ type PCHARSETINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:708:17 */ type NPCHARSETINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:708:31 */ type LPCHARSETINFO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:708:46 */ type tagLOCALESIGNATURE = struct { FlsUsb [4]DWORD FlsCsbDefault [2]DWORD FlsCsbSupported [2]DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:717:11 */ type LOCALESIGNATURE = tagLOCALESIGNATURE /* /usr/x86_64-w64-mingw32/include/wingdi.h:721:5 */ type PLOCALESIGNATURE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:721:21 */ type LPLOCALESIGNATURE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:721:39 */ type tagHANDLETABLE = struct{ FobjectHandle [1]HGDIOBJ } /* /usr/x86_64-w64-mingw32/include/wingdi.h:727:11 */ type HANDLETABLE = tagHANDLETABLE /* /usr/x86_64-w64-mingw32/include/wingdi.h:729:5 */ type PHANDLETABLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:729:17 */ type LPHANDLETABLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:729:31 */ type tagMETARECORD = struct { FrdSize DWORD FrdFunction WORD FrdParm [1]WORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:731:11 */ type METARECORD = tagMETARECORD /* /usr/x86_64-w64-mingw32/include/wingdi.h:735:5 */ type PMETARECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:738:42 */ type LPMETARECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:741:42 */ type tagMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG F__ccgo_pad1 [4]byte FhMF HMETAFILE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:743:11 */ type METAFILEPICT = tagMETAFILEPICT /* /usr/x86_64-w64-mingw32/include/wingdi.h:748:5 */ type LPMETAFILEPICT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:748: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 F__ccgo_pad1 [2]byte FmtSize DWORD FmtNoObjects WORD F__ccgo_pad2 [2]byte FmtMaxRecord DWORD FmtNoParameters WORD F__ccgo_pad3 [2]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:753: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:761:5 */ type PMETAHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:762:42 */ type LPMETAHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:763: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:769: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:773:5 */ type PENHMETARECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:773:19 */ type LPENHMETARECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:773: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:775:11 */ type ENHMETAHEADER = tagENHMETAHEADER /* /usr/x86_64-w64-mingw32/include/wingdi.h:795:5 */ type PENHMETAHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:795:19 */ type LPENHMETAHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:795:35 */ type BCHAR = BYTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:809: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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:818: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:839:5 */ type PTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:839:17 */ type NPTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:839:31 */ type LPTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:839: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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:841:11 */ type TEXTMETRICW = tagTEXTMETRICW /* /usr/x86_64-w64-mingw32/include/wingdi.h:862:5 */ type PTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:862:17 */ type NPTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:862:31 */ type LPTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:862:46 */ type TEXTMETRIC = TEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:864:3 */ type PTEXTMETRIC = PTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:865:3 */ type NPTEXTMETRIC = NPTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:866:3 */ type LPTEXTMETRIC = LPTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:867: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 F__ccgo_pad1 [3]byte FntmFlags DWORD FntmSizeEM UINT FntmCellHeight UINT FntmAvgWidth UINT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:885: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:910:5 */ type PNEWTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:910:20 */ type NPNEWTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:910:37 */ type LPNEWTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:910: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 F__ccgo_pad1 [3]byte FntmFlags DWORD FntmSizeEM UINT FntmCellHeight UINT FntmAvgWidth UINT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:912:11 */ type NEWTEXTMETRICW = tagNEWTEXTMETRICW /* /usr/x86_64-w64-mingw32/include/wingdi.h:937:5 */ type PNEWTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:937:20 */ type NPNEWTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:937:37 */ type LPNEWTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:937:55 */ type NEWTEXTMETRIC = NEWTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:939:3 */ type PNEWTEXTMETRIC = PNEWTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:940:3 */ type NPNEWTEXTMETRIC = NPNEWTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:941:3 */ type LPNEWTEXTMETRIC = LPNEWTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:942: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:946: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 /* /usr/x86_64-w64-mingw32/include/wingdi.h:949:5 */ type tagNEWTEXTMETRICEXW = struct { FntmTm NEWTEXTMETRICW FntmFontSig FONTSIGNATURE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:951:11 */ type NEWTEXTMETRICEXW = tagNEWTEXTMETRICEXW /* /usr/x86_64-w64-mingw32/include/wingdi.h:954:5 */ type NEWTEXTMETRICEX = NEWTEXTMETRICEXA /* /usr/x86_64-w64-mingw32/include/wingdi.h:956:3 */ type tagPELARRAY = struct { FpaXCount LONG FpaYCount LONG FpaXExt LONG FpaYExt LONG FpaRGBs BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:961:11 */ type PELARRAY = tagPELARRAY /* /usr/x86_64-w64-mingw32/include/wingdi.h:967:5 */ type PPELARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:967:14 */ type NPPELARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:967:25 */ type LPPELARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:967:37 */ type tagLOGBRUSH = struct { FlbStyle UINT FlbColor COLORREF FlbHatch ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:970:11 */ type LOGBRUSH = tagLOGBRUSH /* /usr/x86_64-w64-mingw32/include/wingdi.h:974:5 */ type PLOGBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:974:14 */ type NPLOGBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:974:25 */ type LPLOGBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:974:37 */ type tagLOGBRUSH32 = struct { FlbStyle UINT FlbColor COLORREF FlbHatch ULONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:976:11 */ type LOGBRUSH32 = tagLOGBRUSH32 /* /usr/x86_64-w64-mingw32/include/wingdi.h:980:5 */ type PLOGBRUSH32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:980:16 */ type NPLOGBRUSH32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:980:29 */ type LPLOGBRUSH32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:980:43 */ type PATTERN = LOGBRUSH /* /usr/x86_64-w64-mingw32/include/wingdi.h:983:20 */ type PPATTERN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:984:19 */ type NPPATTERN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:985:19 */ type LPPATTERN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:986:19 */ type tagLOGPEN = struct { FlopnStyle UINT FlopnWidth POINT FlopnColor COLORREF } /* /usr/x86_64-w64-mingw32/include/wingdi.h:990:11 */ type LOGPEN = tagLOGPEN /* /usr/x86_64-w64-mingw32/include/wingdi.h:994:5 */ type PLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:994:12 */ type NPLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:994:21 */ type LPLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:994:31 */ type tagEXTLOGPEN = struct { FelpPenStyle DWORD FelpWidth DWORD FelpBrushStyle UINT FelpColor COLORREF FelpHatch ULONG_PTR FelpNumEntries DWORD FelpStyleEntry [1]DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:998:11 */ type EXTLOGPEN = tagEXTLOGPEN /* /usr/x86_64-w64-mingw32/include/wingdi.h:1006:5 */ type PEXTLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1006:15 */ type NPEXTLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1006:27 */ type LPEXTLOGPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1006:40 */ type tagEXTLOGPEN32 = struct { FelpPenStyle DWORD FelpWidth DWORD FelpBrushStyle UINT FelpColor COLORREF FelpHatch ULONG FelpNumEntries DWORD FelpStyleEntry [1]DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1010:11 */ type EXTLOGPEN32 = tagEXTLOGPEN32 /* /usr/x86_64-w64-mingw32/include/wingdi.h:1018:5 */ type PEXTLOGPEN32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1018:18 */ type NPEXTLOGPEN32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1018:33 */ type LPEXTLOGPEN32 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1018:49 */ type tagPALETTEENTRY = struct { FpeRed BYTE FpeGreen BYTE FpeBlue BYTE FpeFlags BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1022:11 */ type PALETTEENTRY = tagPALETTEENTRY /* /usr/x86_64-w64-mingw32/include/wingdi.h:1027:5 */ type PPALETTEENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1027:18 */ type LPPALETTEENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1027:33 */ type tagLOGPALETTE = struct { FpalVersion WORD FpalNumEntries WORD FpalPalEntry [1]PALETTEENTRY } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1032:11 */ type LOGPALETTE = tagLOGPALETTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:1036:5 */ type PLOGPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1036:16 */ type NPLOGPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1036:29 */ type LPLOGPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1036: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1043:11 */ type LOGFONTA = tagLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1058:5 */ type PLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1058:14 */ type NPLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1058:25 */ type LPLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1058: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1060:11 */ type LOGFONTW = tagLOGFONTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:1075:5 */ type PLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1075:14 */ type NPLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1075:25 */ type LPLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1075:37 */ type LOGFONT = LOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1077:3 */ type PLOGFONT = PLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1078:3 */ type NPLOGFONT = NPLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1079:3 */ type LPLOGFONT = LPLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1080:3 */ type tagENUMLOGFONTA = struct { FelfLogFont LOGFONTA FelfFullName [64]BYTE FelfStyle [32]BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1086:11 */ type ENUMLOGFONTA = tagENUMLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1090:5 */ type LPENUMLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1090:18 */ type tagENUMLOGFONTW = struct { FelfLogFont LOGFONTW FelfFullName [64]WCHAR FelfStyle [32]WCHAR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1092:11 */ type ENUMLOGFONTW = tagENUMLOGFONTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:1096:5 */ type LPENUMLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1096:18 */ type ENUMLOGFONT = ENUMLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1098:3 */ type LPENUMLOGFONT = LPENUMLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1099:3 */ type tagENUMLOGFONTEXA = struct { FelfLogFont LOGFONTA FelfFullName [64]BYTE FelfStyle [32]BYTE FelfScript [32]BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1101:11 */ type ENUMLOGFONTEXA = tagENUMLOGFONTEXA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1106:5 */ type LPENUMLOGFONTEXA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1106:20 */ type tagENUMLOGFONTEXW = struct { FelfLogFont LOGFONTW FelfFullName [64]WCHAR FelfStyle [32]WCHAR FelfScript [32]WCHAR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1108:11 */ type ENUMLOGFONTEXW = tagENUMLOGFONTEXW /* /usr/x86_64-w64-mingw32/include/wingdi.h:1113:5 */ type LPENUMLOGFONTEXW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1113:20 */ type ENUMLOGFONTEX = ENUMLOGFONTEXA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1115:3 */ type LPENUMLOGFONTEX = LPENUMLOGFONTEXA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1116:3 */ type tagPANOSE = struct { FbFamilyType BYTE FbSerifStyle BYTE FbWeight BYTE FbProportion BYTE FbContrast BYTE FbStrokeVariation BYTE FbArmStyle BYTE FbLetterform BYTE FbMidline BYTE FbXHeight BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1237:11 */ type PANOSE = tagPANOSE /* /usr/x86_64-w64-mingw32/include/wingdi.h:1248:5 */ type LPPANOSE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1248: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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1358:11 */ type EXTLOGFONTA = tagEXTLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1369:5 */ type PEXTLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1369:17 */ type NPEXTLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1369:31 */ type LPEXTLOGFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1369: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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1371:11 */ type EXTLOGFONTW = tagEXTLOGFONTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:1382:5 */ type PEXTLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1382:17 */ type NPEXTLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1382:31 */ type LPEXTLOGFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1382:46 */ type EXTLOGFONT = EXTLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1384:3 */ type PEXTLOGFONT = PEXTLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1385:3 */ type NPEXTLOGFONT = NPEXTLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1386:3 */ type LPEXTLOGFONT = LPEXTLOGFONTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1387:3 */ type _devicemodeA = struct { FdmDeviceName [32]BYTE FdmSpecVersion WORD FdmDriverVersion WORD FdmSize WORD FdmDriverExtra WORD FdmFields DWORD F__44 struct { F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1671:11 */ type DEVMODEA = _devicemodeA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1718:5 */ type PDEVMODEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1718:14 */ type NPDEVMODEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1718:25 */ type LPDEVMODEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1718:37 */ type _devicemodeW = struct { FdmDeviceName [32]WCHAR FdmSpecVersion WORD FdmDriverVersion WORD FdmSize WORD FdmDriverExtra WORD FdmFields DWORD F__76 struct { F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:1720:11 */ type DEVMODEW = _devicemodeW /* /usr/x86_64-w64-mingw32/include/wingdi.h:1767:5 */ type PDEVMODEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1767:14 */ type NPDEVMODEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1767:25 */ type LPDEVMODEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:1767:37 */ type DEVMODE = DEVMODEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1769:3 */ type PDEVMODE = PDEVMODEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1770:3 */ type NPDEVMODE = NPDEVMODEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1771:3 */ type LPDEVMODE = LPDEVMODEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:1772:3 */ type _DISPLAY_DEVICEA = struct { Fcb DWORD FDeviceName [32]CHAR FDeviceString [128]CHAR FStateFlags DWORD FDeviceID [128]CHAR FDeviceKey [128]CHAR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2023:11 */ type DISPLAY_DEVICEA = _DISPLAY_DEVICEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2030:5 */ type PDISPLAY_DEVICEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2030:21 */ type LPDISPLAY_DEVICEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2030:39 */ type _DISPLAY_DEVICEW = struct { Fcb DWORD FDeviceName [32]WCHAR FDeviceString [128]WCHAR FStateFlags DWORD FDeviceID [128]WCHAR FDeviceKey [128]WCHAR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2032:11 */ type DISPLAY_DEVICEW = _DISPLAY_DEVICEW /* /usr/x86_64-w64-mingw32/include/wingdi.h:2039:5 */ type PDISPLAY_DEVICEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2039:21 */ type LPDISPLAY_DEVICEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2039:39 */ type DISPLAY_DEVICE = DISPLAY_DEVICEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2041:3 */ type PDISPLAY_DEVICE = PDISPLAY_DEVICEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2042:3 */ type LPDISPLAY_DEVICE = LPDISPLAY_DEVICEA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2043:3 */ type _RGNDATAHEADER = struct { FdwSize DWORD FiType DWORD FnCount DWORD FnRgnSize DWORD FrcBound RECT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2422:11 */ type RGNDATAHEADER = _RGNDATAHEADER /* /usr/x86_64-w64-mingw32/include/wingdi.h:2428:5 */ type PRGNDATAHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2428:19 */ type _RGNDATA = struct { Frdh RGNDATAHEADER FBuffer [1]int8 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2430:11 */ type RGNDATA = _RGNDATA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2433:5 */ type PRGNDATA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2433:13 */ type NPRGNDATA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2433:23 */ type LPRGNDATA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2433:34 */ type _ABC = struct { FabcA int32 FabcB UINT FabcC int32 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2439:11 */ type ABC = _ABC /* /usr/x86_64-w64-mingw32/include/wingdi.h:2443:5 */ type PABC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2443:9 */ type NPABC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2443:15 */ type LPABC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2443:22 */ type _ABCFLOAT = struct { FabcfA FLOAT FabcfB FLOAT FabcfC FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2445:11 */ type ABCFLOAT = _ABCFLOAT /* /usr/x86_64-w64-mingw32/include/wingdi.h:2449:5 */ type PABCFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2449:14 */ type NPABCFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2449:25 */ type LPABCFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2449:37 */ type _OUTLINETEXTMETRICA = struct { FotmSize UINT FotmTextMetrics TEXTMETRICA FotmFiller BYTE FotmPanoseNumber PANOSE F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FotmpFamilyName PSTR FotmpFaceName PSTR FotmpStyleName PSTR FotmpFullName PSTR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2455:11 */ type OUTLINETEXTMETRICA = _OUTLINETEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2488:5 */ type POUTLINETEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2488:24 */ type NPOUTLINETEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2488:45 */ type LPOUTLINETEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2488:67 */ type _OUTLINETEXTMETRICW = struct { FotmSize UINT FotmTextMetrics TEXTMETRICW FotmFiller BYTE FotmPanoseNumber PANOSE F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2490:11 */ type OUTLINETEXTMETRICW = _OUTLINETEXTMETRICW /* /usr/x86_64-w64-mingw32/include/wingdi.h:2523:5 */ type POUTLINETEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2523:24 */ type NPOUTLINETEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2523:45 */ type LPOUTLINETEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2523:67 */ type OUTLINETEXTMETRIC = OUTLINETEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2525:3 */ type POUTLINETEXTMETRIC = POUTLINETEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2526:3 */ type NPOUTLINETEXTMETRIC = NPOUTLINETEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2527:3 */ type LPOUTLINETEXTMETRIC = LPOUTLINETEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2528:3 */ type tagPOLYTEXTA = struct { Fx int32 Fy int32 Fn UINT F__ccgo_pad1 [4]byte Flpstr LPCSTR FuiFlags UINT Frcl RECT F__ccgo_pad2 [4]byte Fpdx uintptr } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2533:11 */ type POLYTEXTA = tagPOLYTEXTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2541:5 */ type PPOLYTEXTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2541:15 */ type NPPOLYTEXTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2541:27 */ type LPPOLYTEXTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2541:40 */ type tagPOLYTEXTW = struct { Fx int32 Fy int32 Fn UINT F__ccgo_pad1 [4]byte Flpstr LPCWSTR FuiFlags UINT Frcl RECT F__ccgo_pad2 [4]byte Fpdx uintptr } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2543:11 */ type POLYTEXTW = tagPOLYTEXTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:2551:5 */ type PPOLYTEXTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2551:15 */ type NPPOLYTEXTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2551:27 */ type LPPOLYTEXTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2551:40 */ type POLYTEXT = POLYTEXTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2553:3 */ type PPOLYTEXT = PPOLYTEXTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2554:3 */ type NPPOLYTEXT = NPPOLYTEXTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2555:3 */ type LPPOLYTEXT = LPPOLYTEXTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2556:3 */ type _FIXED = struct { Ffract WORD Fvalue int16 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2560:11 */ type FIXED = _FIXED /* /usr/x86_64-w64-mingw32/include/wingdi.h:2563:5 */ type _MAT2 = struct { FeM11 FIXED FeM12 FIXED FeM21 FIXED FeM22 FIXED } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2565:11 */ type MAT2 = _MAT2 /* /usr/x86_64-w64-mingw32/include/wingdi.h:2570:5 */ type LPMAT2 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2570:10 */ type _GLYPHMETRICS = struct { FgmBlackBoxX UINT FgmBlackBoxY UINT FgmptGlyphOrigin POINT FgmCellIncX int16 FgmCellIncY int16 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2572:11 */ type GLYPHMETRICS = _GLYPHMETRICS /* /usr/x86_64-w64-mingw32/include/wingdi.h:2578:5 */ type LPGLYPHMETRICS = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2578:18 */ type tagPOINTFX = struct { Fx FIXED Fy FIXED } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2598:11 */ type POINTFX = tagPOINTFX /* /usr/x86_64-w64-mingw32/include/wingdi.h:2601:5 */ type LPPOINTFX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2601:13 */ type tagTTPOLYCURVE = struct { FwType WORD Fcpfx WORD Fapfx [1]POINTFX } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2603:11 */ type TTPOLYCURVE = tagTTPOLYCURVE /* /usr/x86_64-w64-mingw32/include/wingdi.h:2607:5 */ type LPTTPOLYCURVE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2607:17 */ type tagTTPOLYGONHEADER = struct { Fcb DWORD FdwType DWORD FpfxStart POINTFX } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2609:11 */ type TTPOLYGONHEADER = tagTTPOLYGONHEADER /* /usr/x86_64-w64-mingw32/include/wingdi.h:2613:5 */ type LPTTPOLYGONHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2613:21 */ type tagGCP_RESULTSA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FlpOutString LPSTR FlpOrder uintptr FlpDx uintptr FlpCaretPos uintptr FlpClass LPSTR FlpGlyphs LPWSTR FnGlyphs UINT FnMaxFit int32 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2656:11 */ type GCP_RESULTSA = tagGCP_RESULTSA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2666:5 */ type LPGCP_RESULTSA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2666:18 */ type tagGCP_RESULTSW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FlpOutString LPWSTR FlpOrder uintptr FlpDx uintptr FlpCaretPos uintptr FlpClass LPSTR FlpGlyphs LPWSTR FnGlyphs UINT FnMaxFit int32 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2667:11 */ type GCP_RESULTSW = tagGCP_RESULTSW /* /usr/x86_64-w64-mingw32/include/wingdi.h:2677:5 */ type LPGCP_RESULTSW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2677:18 */ type GCP_RESULTS = GCP_RESULTSA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2679:3 */ type LPGCP_RESULTS = LPGCP_RESULTSA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2680:3 */ type _RASTERIZER_STATUS = struct { FnSize int16 FwFlags int16 FnLanguageID int16 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2682:11 */ type RASTERIZER_STATUS = _RASTERIZER_STATUS /* /usr/x86_64-w64-mingw32/include/wingdi.h:2686:5 */ type LPRASTERIZER_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2686: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:2693:11 */ type PIXELFORMATDESCRIPTOR = tagPIXELFORMATDESCRIPTOR /* /usr/x86_64-w64-mingw32/include/wingdi.h:2720:5 */ type PPIXELFORMATDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2720:27 */ type LPPIXELFORMATDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2720:51 */ type OLDFONTENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2753:15 */ type OLDFONTENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2754:15 */ type FONTENUMPROCA = OLDFONTENUMPROCA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2764:28 */ type FONTENUMPROCW = OLDFONTENUMPROCW /* /usr/x86_64-w64-mingw32/include/wingdi.h:2765:28 */ type FONTENUMPROC = FONTENUMPROCA /* /usr/x86_64-w64-mingw32/include/wingdi.h:2767:3 */ type GOBJENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2769:15 */ type LINEDDAPROC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2770:16 */ type LPFNDEVMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2832:16 */ type LPFNDEVCAPS = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:2833:17 */ type tagWCRANGE = struct { FwcLow WCHAR FcGlyphs USHORT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3013:11 */ type WCRANGE = tagWCRANGE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3016:5 */ type PWCRANGE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3016:13 */ type LPWCRANGE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3016:23 */ type tagGLYPHSET = struct { FcbThis DWORD FflAccel DWORD FcGlyphsSupported DWORD FcRanges DWORD Franges [1]WCRANGE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3018:11 */ type GLYPHSET = tagGLYPHSET /* /usr/x86_64-w64-mingw32/include/wingdi.h:3024:5 */ type PGLYPHSET = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3024:14 */ type LPGLYPHSET = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3024:25 */ type tagDESIGNVECTOR = struct { FdvReserved DWORD FdvNumAxes DWORD FdvValues [16]LONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3046:11 */ type DESIGNVECTOR = tagDESIGNVECTOR /* /usr/x86_64-w64-mingw32/include/wingdi.h:3050:5 */ type PDESIGNVECTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3050:18 */ type LPDESIGNVECTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3050:33 */ type tagAXISINFOA = struct { FaxMinValue LONG FaxMaxValue LONG FaxAxisName [16]BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3067:11 */ type AXISINFOA = tagAXISINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3071:5 */ type PAXISINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3071:15 */ type LPAXISINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3071:27 */ type tagAXISINFOW = struct { FaxMinValue LONG FaxMaxValue LONG FaxAxisName [16]WCHAR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3073:11 */ type AXISINFOW = tagAXISINFOW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3077:5 */ type PAXISINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3077:15 */ type LPAXISINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3077:27 */ type AXISINFO = AXISINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3079:3 */ type PAXISINFO = PAXISINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3080:3 */ type LPAXISINFO = LPAXISINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3081:3 */ type tagAXESLISTA = struct { FaxlReserved DWORD FaxlNumAxes DWORD FaxlAxisInfo [16]AXISINFOA } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3083:11 */ type AXESLISTA = tagAXESLISTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3087:5 */ type PAXESLISTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3087:15 */ type LPAXESLISTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3087:27 */ type tagAXESLISTW = struct { FaxlReserved DWORD FaxlNumAxes DWORD FaxlAxisInfo [16]AXISINFOW } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3089:11 */ type AXESLISTW = tagAXESLISTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3093:5 */ type PAXESLISTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3093:15 */ type LPAXESLISTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3093:27 */ type AXESLIST = AXESLISTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3095:3 */ type PAXESLIST = PAXESLISTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3096:3 */ type LPAXESLIST = LPAXESLISTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3097:3 */ type tagENUMLOGFONTEXDVA = struct { FelfEnumLogfontEx ENUMLOGFONTEXA FelfDesignVector DESIGNVECTOR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3099:11 */ type ENUMLOGFONTEXDVA = tagENUMLOGFONTEXDVA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3102:5 */ type PENUMLOGFONTEXDVA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3102:22 */ type LPENUMLOGFONTEXDVA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3102:41 */ type tagENUMLOGFONTEXDVW = struct { FelfEnumLogfontEx ENUMLOGFONTEXW FelfDesignVector DESIGNVECTOR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3104:11 */ type ENUMLOGFONTEXDVW = tagENUMLOGFONTEXDVW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3107:5 */ type PENUMLOGFONTEXDVW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3107:22 */ type LPENUMLOGFONTEXDVW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3107:41 */ type ENUMLOGFONTEXDV = ENUMLOGFONTEXDVA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3109:3 */ type PENUMLOGFONTEXDV = PENUMLOGFONTEXDVA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3110:3 */ type LPENUMLOGFONTEXDV = LPENUMLOGFONTEXDVA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3111:3 */ type tagENUMTEXTMETRICA = struct { FetmNewTextMetricEx NEWTEXTMETRICEXA FetmAxesList AXESLISTA } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3119:11 */ type ENUMTEXTMETRICA = tagENUMTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3122:5 */ type PENUMTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3122:21 */ type LPENUMTEXTMETRICA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3122:39 */ type tagENUMTEXTMETRICW = struct { FetmNewTextMetricEx NEWTEXTMETRICEXW FetmAxesList AXESLISTW } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3123:11 */ type ENUMTEXTMETRICW = tagENUMTEXTMETRICW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3127:5 */ type PENUMTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3127:21 */ type LPENUMTEXTMETRICW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3127:39 */ type ENUMTEXTMETRIC = ENUMTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3129:3 */ type PENUMTEXTMETRIC = PENUMTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3130:3 */ type LPENUMTEXTMETRIC = LPENUMTEXTMETRICA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3131:3 */ type COLOR16 = USHORT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3233:18 */ type _TRIVERTEX = struct { Fx LONG Fy LONG FRed COLOR16 FGreen COLOR16 FBlue COLOR16 FAlpha COLOR16 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3235:11 */ type TRIVERTEX = _TRIVERTEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3242:5 */ type PTRIVERTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3242:15 */ type LPTRIVERTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3242:27 */ type _GRADIENT_TRIANGLE = struct { FVertex1 ULONG FVertex2 ULONG FVertex3 ULONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3245:11 */ type GRADIENT_TRIANGLE = _GRADIENT_TRIANGLE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3249:5 */ type PGRADIENT_TRIANGLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3249:23 */ type LPGRADIENT_TRIANGLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3249:43 */ type _GRADIENT_RECT = struct { FUpperLeft ULONG FLowerRight ULONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3251:11 */ type GRADIENT_RECT = _GRADIENT_RECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3254:5 */ type PGRADIENT_RECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3254:19 */ type LPGRADIENT_RECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3254:35 */ type _BLENDFUNCTION = struct { FBlendOp BYTE FBlendFlags BYTE FSourceConstantAlpha BYTE FAlphaFormat BYTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3257:11 */ type BLENDFUNCTION = _BLENDFUNCTION /* /usr/x86_64-w64-mingw32/include/wingdi.h:3262:5 */ type PBLENDFUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3262:19 */ type MFENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3290:15 */ type ENHMFENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3294:15 */ type tagDIBSECTION = struct { FdsBm BITMAP FdsBmih BITMAPINFOHEADER FdsBitfields [3]DWORD F__ccgo_pad1 [4]byte FdshSection HANDLE FdsOffset DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3326:11 */ type DIBSECTION = tagDIBSECTION /* /usr/x86_64-w64-mingw32/include/wingdi.h:3332:5 */ type LPDIBSECTION = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3332:16 */ type PDIBSECTION = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3332: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3379:11 */ type COLORADJUSTMENT = tagCOLORADJUSTMENT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3392:5 */ type PCOLORADJUSTMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3392:21 */ type LPCOLORADJUSTMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3392:39 */ type ABORTPROC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3398:19 */ type _DOCINFOA = struct { FcbSize int32 F__ccgo_pad1 [4]byte FlpszDocName LPCSTR FlpszOutput LPCSTR FlpszDatatype LPCSTR FfwType DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3400:11 */ type DOCINFOA = _DOCINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3406:5 */ type LPDOCINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3406:14 */ type _DOCINFOW = struct { FcbSize int32 F__ccgo_pad1 [4]byte FlpszDocName LPCWSTR FlpszOutput LPCWSTR FlpszDatatype LPCWSTR FfwType DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3408:11 */ type DOCINFOW = _DOCINFOW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3414:5 */ type LPDOCINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3414:14 */ type DOCINFO = DOCINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3416:3 */ type LPDOCINFO = LPDOCINFOA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3417:3 */ type tagKERNINGPAIR = struct { FwFirst WORD FwSecond WORD FiKernAmount int32 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3487:11 */ type KERNINGPAIR = tagKERNINGPAIR /* /usr/x86_64-w64-mingw32/include/wingdi.h:3491:5 */ type LPKERNINGPAIR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3491:17 */ type ICMENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3509:15 */ type ICMENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3510:15 */ type tagEMR = struct { FiType DWORD FnSize DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3675:11 */ type EMR = tagEMR /* /usr/x86_64-w64-mingw32/include/wingdi.h:3678:5 */ type PEMR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3678:9 */ type tagEMRTEXT = struct { FptlReference POINTL FnChars DWORD FoffString DWORD FfOptions DWORD Frcl RECTL FoffDx DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3680:11 */ type EMRTEXT = tagEMRTEXT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3687:5 */ type PEMRTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3687:13 */ type tagABORTPATH = struct{ Femr EMR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3689:11 */ type EMRABORTPATH = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:5 */ type PEMRABORTPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:18 */ type EMRBEGINPATH = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:33 */ type PEMRBEGINPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:46 */ type EMRENDPATH = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:61 */ type PEMRENDPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:72 */ type EMRCLOSEFIGURE = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:85 */ type PEMRCLOSEFIGURE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:100 */ type EMRFLATTENPATH = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:117 */ type PEMRFLATTENPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:132 */ type EMRWIDENPATH = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:149 */ type PEMRWIDENPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:162 */ type EMRSETMETARGN = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:177 */ type PEMRSETMETARGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:191 */ type EMRSAVEDC = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:207 */ type PEMRSAVEDC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:217 */ type EMRREALIZEPALETTE = tagABORTPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:229 */ type PEMRREALIZEPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3691:247 */ type tagEMRSELECTCLIPPATH = struct { Femr EMR FiMode DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3693:11 */ type EMRSELECTCLIPPATH = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:5 */ type PEMRSELECTCLIPPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:23 */ type EMRSETBKMODE = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:43 */ type PEMRSETBKMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:56 */ type EMRSETMAPMODE = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:71 */ type PEMRSETMAPMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:85 */ type EMRSETLAYOUT = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:101 */ type PEMRSETLAYOUT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3696:114 */ type EMRSETPOLYFILLMODE = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:5 */ type PEMRSETPOLYFILLMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:24 */ type EMRSETROP2 = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:45 */ type PEMRSETROP2 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:56 */ type EMRSETSTRETCHBLTMODE = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:69 */ type PEMRSETSTRETCHBLTMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:90 */ type EMRSETICMMODE = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3697:113 */ type PEMRSETICMMODE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3698:5 */ type EMRSETTEXTALIGN = tagEMRSELECTCLIPPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3698:21 */ type PEMRSETTEXTALIGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3698:37 */ type tagEMRSETMITERLIMIT = struct { Femr EMR FeMiterLimit FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3700:11 */ type EMRSETMITERLIMIT = tagEMRSETMITERLIMIT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3703:5 */ type PEMRSETMITERLIMIT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3703:22 */ type tagEMRRESTOREDC = struct { Femr EMR FiRelative LONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3705:11 */ type EMRRESTOREDC = tagEMRRESTOREDC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3708:5 */ type PEMRRESTOREDC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3708:18 */ type tagEMRSETARCDIRECTION = struct { Femr EMR FiArcDirection DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3710:11 */ type EMRSETARCDIRECTION = tagEMRSETARCDIRECTION /* /usr/x86_64-w64-mingw32/include/wingdi.h:3714:5 */ type PEMRSETARCDIRECTION = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3714:24 */ type tagEMRSETMAPPERFLAGS = struct { Femr EMR FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3716:11 */ type EMRSETMAPPERFLAGS = tagEMRSETMAPPERFLAGS /* /usr/x86_64-w64-mingw32/include/wingdi.h:3719:5 */ type PEMRSETMAPPERFLAGS = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3719:23 */ type tagEMRSETTEXTCOLOR = struct { Femr EMR FcrColor COLORREF } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3721:11 */ type EMRSETBKCOLOR = tagEMRSETTEXTCOLOR /* /usr/x86_64-w64-mingw32/include/wingdi.h:3724:5 */ type PEMRSETBKCOLOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3724:19 */ type EMRSETTEXTCOLOR = tagEMRSETTEXTCOLOR /* /usr/x86_64-w64-mingw32/include/wingdi.h:3724:35 */ type PEMRSETTEXTCOLOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3724:51 */ type tagEMRSELECTOBJECT = struct { Femr EMR FihObject DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3726:11 */ type EMRSELECTOBJECT = tagEMRSELECTOBJECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3729:5 */ type PEMRSELECTOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3729:21 */ type EMRDELETEOBJECT = tagEMRSELECTOBJECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3729:39 */ type PEMRDELETEOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3729:55 */ type tagEMRSELECTPALETTE = struct { Femr EMR FihPal DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3731:11 */ type EMRSELECTPALETTE = tagEMRSELECTPALETTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3734:5 */ type PEMRSELECTPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3734:22 */ type tagEMRRESIZEPALETTE = struct { Femr EMR FihPal DWORD FcEntries DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3736:11 */ type EMRRESIZEPALETTE = tagEMRRESIZEPALETTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3740:5 */ type PEMRRESIZEPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3740:22 */ type tagEMRSETPALETTEENTRIES = struct { Femr EMR FihPal DWORD FiStart DWORD FcEntries DWORD FaPalEntries [1]PALETTEENTRY } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3742:11 */ type EMRSETPALETTEENTRIES = tagEMRSETPALETTEENTRIES /* /usr/x86_64-w64-mingw32/include/wingdi.h:3748:5 */ type PEMRSETPALETTEENTRIES = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3748:26 */ type tagEMRSETCOLORADJUSTMENT = struct { Femr EMR FColorAdjustment COLORADJUSTMENT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3750:11 */ type EMRSETCOLORADJUSTMENT = tagEMRSETCOLORADJUSTMENT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3753:5 */ type PEMRSETCOLORADJUSTMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3753:27 */ type tagEMRGDICOMMENT = struct { Femr EMR FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3755:11 */ type EMRGDICOMMENT = tagEMRGDICOMMENT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3759:5 */ type PEMRGDICOMMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3759:19 */ type tagEMREOF = struct { Femr EMR FnPalEntries DWORD FoffPalEntries DWORD FnSizeLast DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3761:11 */ type EMREOF = tagEMREOF /* /usr/x86_64-w64-mingw32/include/wingdi.h:3766:5 */ type PEMREOF = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3766:12 */ type tagEMRLINETO = struct { Femr EMR Fptl POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3768:11 */ type EMRLINETO = tagEMRLINETO /* /usr/x86_64-w64-mingw32/include/wingdi.h:3771:5 */ type PEMRLINETO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3771:15 */ type EMRMOVETOEX = tagEMRLINETO /* /usr/x86_64-w64-mingw32/include/wingdi.h:3771:27 */ type PEMRMOVETOEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3771:39 */ type tagEMROFFSETCLIPRGN = struct { Femr EMR FptlOffset POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3773:11 */ type EMROFFSETCLIPRGN = tagEMROFFSETCLIPRGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3776:5 */ type PEMROFFSETCLIPRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3776:22 */ type tagEMRFILLPATH = struct { Femr EMR FrclBounds RECTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3778:11 */ type EMRFILLPATH = tagEMRFILLPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:5 */ type PEMRFILLPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:17 */ type EMRSTROKEANDFILLPATH = tagEMRFILLPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:31 */ type PEMRSTROKEANDFILLPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:52 */ type EMRSTROKEPATH = tagEMRFILLPATH /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:75 */ type PEMRSTROKEPATH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3781:89 */ type tagEMREXCLUDECLIPRECT = struct { Femr EMR FrclClip RECTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3783:11 */ type EMREXCLUDECLIPRECT = tagEMREXCLUDECLIPRECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3786:5 */ type PEMREXCLUDECLIPRECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3786:24 */ type EMRINTERSECTCLIPRECT = tagEMREXCLUDECLIPRECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3786:45 */ type PEMRINTERSECTCLIPRECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3786:66 */ type tagEMRSETVIEWPORTORGEX = struct { Femr EMR FptlOrigin POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3788:11 */ type EMRSETVIEWPORTORGEX = tagEMRSETVIEWPORTORGEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:5 */ type PEMRSETVIEWPORTORGEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:25 */ type EMRSETWINDOWORGEX = tagEMRSETVIEWPORTORGEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:47 */ type PEMRSETWINDOWORGEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:65 */ type EMRSETBRUSHORGEX = tagEMRSETVIEWPORTORGEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:85 */ type PEMRSETBRUSHORGEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3791:102 */ type tagEMRSETVIEWPORTEXTEX = struct { Femr EMR FszlExtent SIZEL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3793:11 */ type EMRSETVIEWPORTEXTEX = tagEMRSETVIEWPORTEXTEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3796:5 */ type PEMRSETVIEWPORTEXTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3796:25 */ type EMRSETWINDOWEXTEX = tagEMRSETVIEWPORTEXTEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3796:47 */ type PEMRSETWINDOWEXTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3796:65 */ type tagEMRSCALEVIEWPORTEXTEX = struct { Femr EMR FxNum LONG FxDenom LONG FyNum LONG FyDenom LONG } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3798:11 */ type EMRSCALEVIEWPORTEXTEX = tagEMRSCALEVIEWPORTEXTEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3804:5 */ type PEMRSCALEVIEWPORTEXTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3804:27 */ type EMRSCALEWINDOWEXTEX = tagEMRSCALEVIEWPORTEXTEX /* /usr/x86_64-w64-mingw32/include/wingdi.h:3804:51 */ type PEMRSCALEWINDOWEXTEX = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3804:71 */ type tagEMRSETWORLDTRANSFORM = struct { Femr EMR Fxform XFORM } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3806:11 */ type EMRSETWORLDTRANSFORM = tagEMRSETWORLDTRANSFORM /* /usr/x86_64-w64-mingw32/include/wingdi.h:3809:5 */ type PEMRSETWORLDTRANSFORM = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3809:26 */ type tagEMRMODIFYWORLDTRANSFORM = struct { Femr EMR Fxform XFORM FiMode DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3811:11 */ type EMRMODIFYWORLDTRANSFORM = tagEMRMODIFYWORLDTRANSFORM /* /usr/x86_64-w64-mingw32/include/wingdi.h:3815:5 */ type PEMRMODIFYWORLDTRANSFORM = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3815:29 */ type tagEMRSETPIXELV = struct { Femr EMR FptlPixel POINTL FcrColor COLORREF } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3817:11 */ type EMRSETPIXELV = tagEMRSETPIXELV /* /usr/x86_64-w64-mingw32/include/wingdi.h:3821:5 */ type PEMRSETPIXELV = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3821:18 */ type tagEMREXTFLOODFILL = struct { Femr EMR FptlStart POINTL FcrColor COLORREF FiMode DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3823:11 */ type EMREXTFLOODFILL = tagEMREXTFLOODFILL /* /usr/x86_64-w64-mingw32/include/wingdi.h:3828:5 */ type PEMREXTFLOODFILL = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3828:21 */ type tagEMRELLIPSE = struct { Femr EMR FrclBox RECTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3830:11 */ type EMRELLIPSE = tagEMRELLIPSE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3833:5 */ type PEMRELLIPSE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3833:16 */ type EMRRECTANGLE = tagEMRELLIPSE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3833:29 */ type PEMRRECTANGLE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3833:42 */ type tagEMRROUNDRECT = struct { Femr EMR FrclBox RECTL FszlCorner SIZEL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3835:11 */ type EMRROUNDRECT = tagEMRROUNDRECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3839:5 */ type PEMRROUNDRECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3839:18 */ type tagEMRARC = struct { Femr EMR FrclBox RECTL FptlStart POINTL FptlEnd POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3841:11 */ type EMRARC = tagEMRARC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:5 */ type PEMRARC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:12 */ type EMRARCTO = tagEMRARC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:21 */ type PEMRARCTO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:30 */ type EMRCHORD = tagEMRARC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:41 */ type PEMRCHORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:50 */ type EMRPIE = tagEMRARC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:61 */ type PEMRPIE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3846:68 */ type tagEMRANGLEARC = struct { Femr EMR FptlCenter POINTL FnRadius DWORD FeStartAngle FLOAT FeSweepAngle FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3848:11 */ type EMRANGLEARC = tagEMRANGLEARC /* /usr/x86_64-w64-mingw32/include/wingdi.h:3854:5 */ type PEMRANGLEARC = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3854:17 */ type tagEMRPOLYLINE = struct { Femr EMR FrclBounds RECTL Fcptl DWORD Faptl [1]POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3856:11 */ type EMRPOLYLINE = tagEMRPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:5 */ type PEMRPOLYLINE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:17 */ type EMRPOLYBEZIER = tagEMRPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:31 */ type PEMRPOLYBEZIER = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:45 */ type EMRPOLYGON = tagEMRPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:61 */ type PEMRPOLYGON = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:72 */ type EMRPOLYBEZIERTO = tagEMRPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:85 */ type PEMRPOLYBEZIERTO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:101 */ type EMRPOLYLINETO = tagEMRPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:119 */ type PEMRPOLYLINETO = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3861:133 */ type tagEMRPOLYLINE16 = struct { Femr EMR FrclBounds RECTL Fcpts DWORD Fapts [1]POINTS } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3863:11 */ type EMRPOLYLINE16 = tagEMRPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:5 */ type PEMRPOLYLINE16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:19 */ type EMRPOLYBEZIER16 = tagEMRPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:35 */ type PEMRPOLYBEZIER16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:51 */ type EMRPOLYGON16 = tagEMRPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:69 */ type PEMRPOLYGON16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:82 */ type EMRPOLYBEZIERTO16 = tagEMRPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:97 */ type PEMRPOLYBEZIERTO16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:115 */ type EMRPOLYLINETO16 = tagEMRPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:135 */ type PEMRPOLYLINETO16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3868:151 */ type tagEMRPOLYDRAW = struct { Femr EMR FrclBounds RECTL Fcptl DWORD Faptl [1]POINTL FabTypes [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3870:11 */ type EMRPOLYDRAW = tagEMRPOLYDRAW /* /usr/x86_64-w64-mingw32/include/wingdi.h:3876:5 */ type PEMRPOLYDRAW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3876:17 */ type tagEMRPOLYDRAW16 = struct { Femr EMR FrclBounds RECTL Fcpts DWORD Fapts [1]POINTS FabTypes [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3878:11 */ type EMRPOLYDRAW16 = tagEMRPOLYDRAW16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3884:5 */ type PEMRPOLYDRAW16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3884:19 */ type tagEMRPOLYPOLYLINE = struct { Femr EMR FrclBounds RECTL FnPolys DWORD Fcptl DWORD FaPolyCounts [1]DWORD Faptl [1]POINTL } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3886:11 */ type EMRPOLYPOLYLINE = tagEMRPOLYPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3893:5 */ type PEMRPOLYPOLYLINE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3893:21 */ type EMRPOLYPOLYGON = tagEMRPOLYPOLYLINE /* /usr/x86_64-w64-mingw32/include/wingdi.h:3893:39 */ type PEMRPOLYPOLYGON = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3893:54 */ type tagEMRPOLYPOLYLINE16 = struct { Femr EMR FrclBounds RECTL FnPolys DWORD Fcpts DWORD FaPolyCounts [1]DWORD Fapts [1]POINTS } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3895:11 */ type EMRPOLYPOLYLINE16 = tagEMRPOLYPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3902:5 */ type PEMRPOLYPOLYLINE16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3902:23 */ type EMRPOLYPOLYGON16 = tagEMRPOLYPOLYLINE16 /* /usr/x86_64-w64-mingw32/include/wingdi.h:3902:43 */ type PEMRPOLYPOLYGON16 = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3902:60 */ type tagEMRINVERTRGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FRgnData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3904:11 */ type EMRINVERTRGN = tagEMRINVERTRGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3909:5 */ type PEMRINVERTRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3909:18 */ type EMRPAINTRGN = tagEMRINVERTRGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3909:33 */ type PEMRPAINTRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3909:45 */ type tagEMRFILLRGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FihBrush DWORD FRgnData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3911:11 */ type EMRFILLRGN = tagEMRFILLRGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3917:5 */ type PEMRFILLRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3917:16 */ type tagEMRFRAMERGN = struct { Femr EMR FrclBounds RECTL FcbRgnData DWORD FihBrush DWORD FszlStroke SIZEL FRgnData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3919:11 */ type EMRFRAMERGN = tagEMRFRAMERGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3926:5 */ type PEMRFRAMERGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3926:17 */ type tagEMREXTSELECTCLIPRGN = struct { Femr EMR FcbRgnData DWORD FiMode DWORD FRgnData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3928:11 */ type EMREXTSELECTCLIPRGN = tagEMREXTSELECTCLIPRGN /* /usr/x86_64-w64-mingw32/include/wingdi.h:3933:5 */ type PEMREXTSELECTCLIPRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3933:25 */ type tagEMREXTTEXTOUTA = struct { Femr EMR FrclBounds RECTL FiGraphicsMode DWORD FexScale FLOAT FeyScale FLOAT Femrtext EMRTEXT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3935:11 */ type EMREXTTEXTOUTA = tagEMREXTTEXTOUTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3942:5 */ type PEMREXTTEXTOUTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3942:20 */ type EMREXTTEXTOUTW = tagEMREXTTEXTOUTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3942:37 */ type PEMREXTTEXTOUTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3942:52 */ type tagEMRPOLYTEXTOUTA = struct { Femr EMR FrclBounds RECTL FiGraphicsMode DWORD FexScale FLOAT FeyScale FLOAT FcStrings LONG Faemrtext [1]EMRTEXT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3944:11 */ type EMRPOLYTEXTOUTA = tagEMRPOLYTEXTOUTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3952:5 */ type PEMRPOLYTEXTOUTA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3952:21 */ type EMRPOLYTEXTOUTW = tagEMRPOLYTEXTOUTA /* /usr/x86_64-w64-mingw32/include/wingdi.h:3952:39 */ type PEMRPOLYTEXTOUTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3952: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3954:11 */ type EMRBITBLT = tagEMRBITBLT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3971:5 */ type PEMRBITBLT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3971: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3973:11 */ type EMRSTRETCHBLT = tagEMRSTRETCHBLT /* /usr/x86_64-w64-mingw32/include/wingdi.h:3992:5 */ type PEMRSTRETCHBLT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:3992: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:3994:11 */ type EMRMASKBLT = tagEMRMASKBLT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4018:5 */ type PEMRMASKBLT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4018: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4020:11 */ type EMRPLGBLT = tagEMRPLGBLT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4042:5 */ type PEMRPLGBLT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4042: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4044:11 */ type EMRSETDIBITSTODEVICE = tagEMRSETDIBITSTODEVICE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4060:5 */ type PEMRSETDIBITSTODEVICE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4060: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4062:11 */ type EMRSTRETCHDIBITS = tagEMRSTRETCHDIBITS /* /usr/x86_64-w64-mingw32/include/wingdi.h:4079:5 */ type PEMRSTRETCHDIBITS = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4079:22 */ type tagEMREXTCREATEFONTINDIRECTW = struct { Femr EMR FihFont DWORD Felfw EXTLOGFONTW } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4081:11 */ type EMREXTCREATEFONTINDIRECTW = tagEMREXTCREATEFONTINDIRECTW /* /usr/x86_64-w64-mingw32/include/wingdi.h:4085:5 */ type PEMREXTCREATEFONTINDIRECTW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4085:31 */ type tagEMRCREATEPALETTE = struct { Femr EMR FihPal DWORD Flgpl LOGPALETTE } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4087:11 */ type EMRCREATEPALETTE = tagEMRCREATEPALETTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4091:5 */ type PEMRCREATEPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4091:22 */ type tagEMRCREATEPEN = struct { Femr EMR FihPen DWORD Flopn LOGPEN } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4093:11 */ type EMRCREATEPEN = tagEMRCREATEPEN /* /usr/x86_64-w64-mingw32/include/wingdi.h:4097:5 */ type PEMRCREATEPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4097:18 */ type tagEMREXTCREATEPEN = struct { Femr EMR FihPen DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD F__ccgo_pad1 [4]byte Felp EXTLOGPEN } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4099:11 */ type EMREXTCREATEPEN = tagEMREXTCREATEPEN /* /usr/x86_64-w64-mingw32/include/wingdi.h:4107:5 */ type PEMREXTCREATEPEN = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4107:21 */ type tagEMRCREATEBRUSHINDIRECT = struct { Femr EMR FihBrush DWORD Flb LOGBRUSH32 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4109:11 */ type EMRCREATEBRUSHINDIRECT = tagEMRCREATEBRUSHINDIRECT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4113:5 */ type PEMRCREATEBRUSHINDIRECT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4113:28 */ type tagEMRCREATEMONOBRUSH = struct { Femr EMR FihBrush DWORD FiUsage DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4115:11 */ type EMRCREATEMONOBRUSH = tagEMRCREATEMONOBRUSH /* /usr/x86_64-w64-mingw32/include/wingdi.h:4123:5 */ type PEMRCREATEMONOBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4123:24 */ type tagEMRCREATEDIBPATTERNBRUSHPT = struct { Femr EMR FihBrush DWORD FiUsage DWORD FoffBmi DWORD FcbBmi DWORD FoffBits DWORD FcbBits DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4125:11 */ type EMRCREATEDIBPATTERNBRUSHPT = tagEMRCREATEDIBPATTERNBRUSHPT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4133:5 */ type PEMRCREATEDIBPATTERNBRUSHPT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4133:32 */ type tagEMRFORMAT = struct { FdSignature DWORD FnVersion DWORD FcbData DWORD FoffData DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4135:11 */ type EMRFORMAT = tagEMRFORMAT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4140:5 */ type PEMRFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4140:15 */ type tagEMRGLSRECORD = struct { Femr EMR FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4142:11 */ type EMRGLSRECORD = tagEMRGLSRECORD /* /usr/x86_64-w64-mingw32/include/wingdi.h:4146:5 */ type PEMRGLSRECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4146:18 */ type tagEMRGLSBOUNDEDRECORD = struct { Femr EMR FrclBounds RECTL FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4148:11 */ type EMRGLSBOUNDEDRECORD = tagEMRGLSBOUNDEDRECORD /* /usr/x86_64-w64-mingw32/include/wingdi.h:4153:5 */ type PEMRGLSBOUNDEDRECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4153:25 */ type tagEMRPIXELFORMAT = struct { Femr EMR Fpfd PIXELFORMATDESCRIPTOR } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4155:11 */ type EMRPIXELFORMAT = tagEMRPIXELFORMAT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4158:5 */ type PEMRPIXELFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4158:20 */ type tagEMRCREATECOLORSPACE = struct { Femr EMR FihCS DWORD Flcs LOGCOLORSPACEA } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4160:11 */ type EMRCREATECOLORSPACE = tagEMRCREATECOLORSPACE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4164:5 */ type PEMRCREATECOLORSPACE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4164:25 */ type tagEMRSETCOLORSPACE = struct { Femr EMR FihCS DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4166:11 */ type EMRSETCOLORSPACE = tagEMRSETCOLORSPACE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:5 */ type PEMRSETCOLORSPACE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:22 */ type EMRSELECTCOLORSPACE = tagEMRSETCOLORSPACE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:41 */ type PEMRSELECTCOLORSPACE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:61 */ type EMRDELETECOLORSPACE = tagEMRSETCOLORSPACE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:83 */ type PEMRDELETECOLORSPACE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4169:103 */ type tagEMREXTESCAPE = struct { Femr EMR FiEscape INT FcbEscData INT FEscData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4171:11 */ type EMREXTESCAPE = tagEMREXTESCAPE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4176:5 */ type PEMREXTESCAPE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4176:18 */ type EMRDRAWESCAPE = tagEMREXTESCAPE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4176:33 */ type PEMRDRAWESCAPE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4176:47 */ type tagEMRNAMEDESCAPE = struct { Femr EMR FiEscape INT FcbDriver INT FcbEscData INT FEscData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4178:11 */ type EMRNAMEDESCAPE = tagEMRNAMEDESCAPE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4184:5 */ type PEMRNAMEDESCAPE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4184:20 */ type tagEMRSETICMPROFILE = struct { Femr EMR FdwFlags DWORD FcbName DWORD FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4188:11 */ type EMRSETICMPROFILE = tagEMRSETICMPROFILE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:5 */ type PEMRSETICMPROFILE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:22 */ type EMRSETICMPROFILEA = tagEMRSETICMPROFILE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:41 */ type PEMRSETICMPROFILEA = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:59 */ type EMRSETICMPROFILEW = tagEMRSETICMPROFILE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:79 */ type PEMRSETICMPROFILEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4194:97 */ type tagEMRCREATECOLORSPACEW = struct { Femr EMR FihCS DWORD Flcs LOGCOLORSPACEW FdwFlags DWORD FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4198:11 */ type EMRCREATECOLORSPACEW = tagEMRCREATECOLORSPACEW /* /usr/x86_64-w64-mingw32/include/wingdi.h:4205:5 */ type PEMRCREATECOLORSPACEW = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4205:26 */ type tagCOLORMATCHTOTARGET = struct { Femr EMR FdwAction DWORD FdwFlags DWORD FcbName DWORD FcbData DWORD FData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4209:11 */ type EMRCOLORMATCHTOTARGET = tagCOLORMATCHTOTARGET /* /usr/x86_64-w64-mingw32/include/wingdi.h:4216:5 */ type PEMRCOLORMATCHTOTARGET = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4216:27 */ type tagCOLORCORRECTPALETTE = struct { Femr EMR FihPalette DWORD FnFirstEntry DWORD FnPalEntries DWORD FnReserved DWORD } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4218:11 */ type EMRCOLORCORRECTPALETTE = tagCOLORCORRECTPALETTE /* /usr/x86_64-w64-mingw32/include/wingdi.h:4224:5 */ type PEMRCOLORCORRECTPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4224: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4226:11 */ type EMRALPHABLEND = tagEMRALPHABLEND /* /usr/x86_64-w64-mingw32/include/wingdi.h:4245:5 */ type PEMRALPHABLEND = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4245:19 */ type tagEMRGRADIENTFILL = struct { Femr EMR FrclBounds RECTL FnVer DWORD FnTri DWORD FulMode ULONG FVer [1]TRIVERTEX } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4247:11 */ type EMRGRADIENTFILL = tagEMRGRADIENTFILL /* /usr/x86_64-w64-mingw32/include/wingdi.h:4254:5 */ type PEMRGRADIENTFILL = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4254: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4256:11 */ type EMRTRANSPARENTBLT = tagEMRTRANSPARENTBLT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4275:5 */ type PEMRTRANSPARENTBLT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4275:23 */ type _POINTFLOAT = struct { Fx FLOAT Fy FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4302:11 */ type POINTFLOAT = _POINTFLOAT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4305:5 */ type PPOINTFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4305:16 */ type _GLYPHMETRICSFLOAT = struct { FgmfBlackBoxX FLOAT FgmfBlackBoxY FLOAT FgmfptGlyphOrigin POINTFLOAT FgmfCellIncX FLOAT FgmfCellIncY FLOAT } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4307:11 */ type GLYPHMETRICSFLOAT = _GLYPHMETRICSFLOAT /* /usr/x86_64-w64-mingw32/include/wingdi.h:4313:5 */ type PGLYPHMETRICSFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4313:23 */ type LPGLYPHMETRICSFLOAT = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4313: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 } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4323:11 */ type LAYERPLANEDESCRIPTOR = tagLAYERPLANEDESCRIPTOR /* /usr/x86_64-w64-mingw32/include/wingdi.h:4348:5 */ type PLAYERPLANEDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4348:26 */ type LPLAYERPLANEDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4348:49 */ type _WGLSWAP = struct { Fhdc HDC FuiFlags UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wingdi.h:4402:11 */ type WGLSWAP = _WGLSWAP /* /usr/x86_64-w64-mingw32/include/wingdi.h:4405:5 */ type PWGLSWAP = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4405:13 */ type LPWGLSWAP = uintptr /* /usr/x86_64-w64-mingw32/include/wingdi.h:4405: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 <stdarg.h> // 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-2020 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 // <http://www.gnu.org/licenses/>. // ISO C Standard: 7.15 Variable arguments <stdarg.h> // * // 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 /* /usr/x86_64-w64-mingw32/include/winuser.h:32:18 */ type LPMENUTEMPLATEA = PVOID /* /usr/x86_64-w64-mingw32/include/winuser.h:35:17 */ type LPMENUTEMPLATEW = PVOID /* /usr/x86_64-w64-mingw32/include/winuser.h:36:17 */ type LPMENUTEMPLATE = LPMENUTEMPLATEA /* /usr/x86_64-w64-mingw32/include/winuser.h:39:3 */ type WNDPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:41:19 */ type DLGPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:46:19 */ type TIMERPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:50:16 */ type GRAYSTRINGPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:51:19 */ type WNDENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:52:19 */ type HOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:53:19 */ type SENDASYNCPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:54:16 */ type PROPENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:56:19 */ type PROPENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:57:19 */ type PROPENUMPROCEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:59:19 */ type PROPENUMPROCEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:60:19 */ type EDITWORDBREAKPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:62:15 */ type EDITWORDBREAKPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:63:15 */ type DRAWSTATEPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:65:19 */ type PROPENUMPROC = PROPENUMPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:93:3 */ type PROPENUMPROCEX = PROPENUMPROCEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:94:3 */ type EDITWORDBREAKPROC = EDITWORDBREAKPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:95:3 */ type NAMEENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:98:19 */ type NAMEENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:99:19 */ type WINSTAENUMPROCA = NAMEENUMPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:100:25 */ type WINSTAENUMPROCW = NAMEENUMPROCW /* /usr/x86_64-w64-mingw32/include/winuser.h:101:25 */ type DESKTOPENUMPROCA = NAMEENUMPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:102:25 */ type DESKTOPENUMPROCW = NAMEENUMPROCW /* /usr/x86_64-w64-mingw32/include/winuser.h:103:25 */ type WINSTAENUMPROC = WINSTAENUMPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:113:3 */ type DESKTOPENUMPROC = DESKTOPENUMPROCA /* /usr/x86_64-w64-mingw32/include/winuser.h:114:3 */ type tagCBT_CREATEWNDA = struct { Flpcs uintptr FhwndInsertAfter HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:494:11 */ type tagCREATESTRUCTA = struct { FlpCreateParams LPVOID FhInstance HINSTANCE FhMenu HMENU FhwndParent HWND Fcy int32 Fcx int32 Fy int32 Fx int32 Fstyle LONG F__ccgo_pad1 [4]byte FlpszName LPCSTR FlpszClass LPCSTR FdwExStyle DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:494:11 */ type CBT_CREATEWNDA = tagCBT_CREATEWNDA /* /usr/x86_64-w64-mingw32/include/winuser.h:497:5 */ type LPCBT_CREATEWNDA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:497:20 */ type tagCBT_CREATEWNDW = struct { Flpcs uintptr FhwndInsertAfter HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:499:11 */ type tagCREATESTRUCTW = struct { FlpCreateParams LPVOID FhInstance HINSTANCE FhMenu HMENU FhwndParent HWND Fcy int32 Fcx int32 Fy int32 Fx int32 Fstyle LONG F__ccgo_pad1 [4]byte FlpszName LPCWSTR FlpszClass LPCWSTR FdwExStyle DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:499:11 */ type CBT_CREATEWNDW = tagCBT_CREATEWNDW /* /usr/x86_64-w64-mingw32/include/winuser.h:502:5 */ type LPCBT_CREATEWNDW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:502:20 */ type CBT_CREATEWND = CBT_CREATEWNDA /* /usr/x86_64-w64-mingw32/include/winuser.h:504:3 */ type LPCBT_CREATEWND = LPCBT_CREATEWNDA /* /usr/x86_64-w64-mingw32/include/winuser.h:505:3 */ type tagCBTACTIVATESTRUCT = struct { FfMouse WINBOOL F__ccgo_pad1 [4]byte FhWndActive HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:507:11 */ type CBTACTIVATESTRUCT = tagCBTACTIVATESTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:510:5 */ type LPCBTACTIVATESTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:510:23 */ type tagWTSSESSION_NOTIFICATION = struct { FcbSize DWORD FdwSessionId DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:514:11 */ type WTSSESSION_NOTIFICATION = tagWTSSESSION_NOTIFICATION /* /usr/x86_64-w64-mingw32/include/winuser.h:517:5 */ type PWTSSESSION_NOTIFICATION = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:517:29 */ type SHELLHOOKINFO = struct { Fhwnd HWND Frc RECT } /* /usr/x86_64-w64-mingw32/include/winuser.h:638:5 */ type LPSHELLHOOKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:638:19 */ type tagEVENTMSG = struct { Fmessage UINT FparamL UINT FparamH UINT Ftime DWORD Fhwnd HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:640:11 */ type EVENTMSG = tagEVENTMSG /* /usr/x86_64-w64-mingw32/include/winuser.h:646:5 */ type PEVENTMSGMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:646:14 */ type NPEVENTMSGMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:646:28 */ type LPEVENTMSGMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:646:43 */ type PEVENTMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:648:30 */ type NPEVENTMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:648:41 */ type LPEVENTMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:648:53 */ type tagCWPSTRUCT = struct { FlParam LPARAM FwParam WPARAM Fmessage UINT F__ccgo_pad1 [4]byte Fhwnd HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:650:11 */ type CWPSTRUCT = tagCWPSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:655:5 */ type PCWPSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:655:15 */ type NPCWPSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:655:27 */ type LPCWPSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:655:40 */ type tagCWPRETSTRUCT = struct { FlResult LRESULT FlParam LPARAM FwParam WPARAM Fmessage UINT F__ccgo_pad1 [4]byte Fhwnd HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:657:11 */ type CWPRETSTRUCT = tagCWPRETSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:663:5 */ type PCWPRETSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:663:18 */ type NPCWPRETSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:663:33 */ type LPCWPRETSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:663:49 */ type tagKBDLLHOOKSTRUCT = struct { FvkCode DWORD FscanCode DWORD Fflags DWORD Ftime DWORD FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:676:11 */ type KBDLLHOOKSTRUCT = tagKBDLLHOOKSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:682:5 */ type LPKBDLLHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:682:21 */ type PKBDLLHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:682:40 */ type tagMSLLHOOKSTRUCT = struct { Fpt POINT FmouseData DWORD Fflags DWORD Ftime DWORD F__ccgo_pad1 [4]byte FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:684:11 */ type MSLLHOOKSTRUCT = tagMSLLHOOKSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:690:5 */ type LPMSLLHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:690:20 */ type PMSLLHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:690:38 */ type tagDEBUGHOOKINFO = struct { FidThread DWORD FidThreadInstaller DWORD FlParam LPARAM FwParam WPARAM Fcode int32 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:692:11 */ type DEBUGHOOKINFO = tagDEBUGHOOKINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:698:5 */ type PDEBUGHOOKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:698:19 */ type NPDEBUGHOOKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:698:35 */ type LPDEBUGHOOKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:698:52 */ type tagMOUSEHOOKSTRUCT = struct { Fpt POINT Fhwnd HWND FwHitTestCode UINT F__ccgo_pad1 [4]byte FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:700:11 */ type MOUSEHOOKSTRUCT = tagMOUSEHOOKSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:705:5 */ type LPMOUSEHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:705:21 */ type PMOUSEHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:705:40 */ type tagMOUSEHOOKSTRUCTEX = struct { F__unnamed MOUSEHOOKSTRUCT FmouseData DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:712:11 */ type MOUSEHOOKSTRUCTEX = tagMOUSEHOOKSTRUCTEX /* /usr/x86_64-w64-mingw32/include/winuser.h:715:5 */ type LPMOUSEHOOKSTRUCTEX = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:715:23 */ type PMOUSEHOOKSTRUCTEX = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:715:44 */ type tagHARDWAREHOOKSTRUCT = struct { Fhwnd HWND Fmessage UINT F__ccgo_pad1 [4]byte FwParam WPARAM FlParam LPARAM } /* /usr/x86_64-w64-mingw32/include/winuser.h:718:11 */ type HARDWAREHOOKSTRUCT = tagHARDWAREHOOKSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:723:5 */ type LPHARDWAREHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:723:24 */ type PHARDWAREHOOKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:723:46 */ type tagMOUSEMOVEPOINT = struct { Fx int32 Fy int32 Ftime DWORD F__ccgo_pad1 [4]byte FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:759:11 */ type MOUSEMOVEPOINT = tagMOUSEMOVEPOINT /* /usr/x86_64-w64-mingw32/include/winuser.h:764:5 */ type PMOUSEMOVEPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:764:20 */ type LPMOUSEMOVEPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:764:37 */ type tagUSEROBJECTFLAGS = struct { FfInherit WINBOOL FfReserved WINBOOL FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:866:11 */ type USEROBJECTFLAGS = tagUSEROBJECTFLAGS /* /usr/x86_64-w64-mingw32/include/winuser.h:870:5 */ type PUSEROBJECTFLAGS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:870: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 } /* /usr/x86_64-w64-mingw32/include/winuser.h:883:11 */ type WNDCLASSEXA = tagWNDCLASSEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:896:5 */ type PWNDCLASSEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:896:17 */ type NPWNDCLASSEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:896:31 */ type LPWNDCLASSEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:896: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 } /* /usr/x86_64-w64-mingw32/include/winuser.h:898:11 */ type WNDCLASSEXW = tagWNDCLASSEXW /* /usr/x86_64-w64-mingw32/include/winuser.h:911:5 */ type PWNDCLASSEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:911:17 */ type NPWNDCLASSEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:911:31 */ type LPWNDCLASSEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:911:46 */ type WNDCLASSEX = WNDCLASSEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:913:3 */ type PWNDCLASSEX = PWNDCLASSEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:914:3 */ type NPWNDCLASSEX = NPWNDCLASSEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:915:3 */ type LPWNDCLASSEX = LPWNDCLASSEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:916:3 */ type tagWNDCLASSA = struct { Fstyle UINT F__ccgo_pad1 [4]byte FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCSTR FlpszClassName LPCSTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:918:11 */ type WNDCLASSA = tagWNDCLASSA /* /usr/x86_64-w64-mingw32/include/winuser.h:929:5 */ type PWNDCLASSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:929:15 */ type NPWNDCLASSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:929:27 */ type LPWNDCLASSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:929:40 */ type tagWNDCLASSW = struct { Fstyle UINT F__ccgo_pad1 [4]byte FlpfnWndProc WNDPROC FcbClsExtra int32 FcbWndExtra int32 FhInstance HINSTANCE FhIcon HICON FhCursor HCURSOR FhbrBackground HBRUSH FlpszMenuName LPCWSTR FlpszClassName LPCWSTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:931:11 */ type WNDCLASSW = tagWNDCLASSW /* /usr/x86_64-w64-mingw32/include/winuser.h:942:5 */ type PWNDCLASSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:942:15 */ type NPWNDCLASSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:942:27 */ type LPWNDCLASSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:942:40 */ type WNDCLASS = WNDCLASSA /* /usr/x86_64-w64-mingw32/include/winuser.h:944:3 */ type PWNDCLASS = PWNDCLASSA /* /usr/x86_64-w64-mingw32/include/winuser.h:945:3 */ type NPWNDCLASS = NPWNDCLASSA /* /usr/x86_64-w64-mingw32/include/winuser.h:946:3 */ type LPWNDCLASS = LPWNDCLASSA /* /usr/x86_64-w64-mingw32/include/winuser.h:947:3 */ type tagMSG = struct { Fhwnd HWND Fmessage UINT F__ccgo_pad1 [4]byte FwParam WPARAM FlParam LPARAM Ftime DWORD Fpt POINT F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:955:11 */ type MSG = tagMSG /* /usr/x86_64-w64-mingw32/include/winuser.h:962:5 */ type PMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:962:9 */ type NPMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:962:15 */ type LPMSG = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:962:22 */ type tagMINMAXINFO = struct { FptReserved POINT FptMaxSize POINT FptMaxPosition POINT FptMinTrackSize POINT FptMaxTrackSize POINT } /* /usr/x86_64-w64-mingw32/include/winuser.h:1072:11 */ type MINMAXINFO = tagMINMAXINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:1078:5 */ type PMINMAXINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1078:16 */ type LPMINMAXINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1078:29 */ type tagCOPYDATASTRUCT = struct { FdwData ULONG_PTR FcbData DWORD F__ccgo_pad1 [4]byte FlpData PVOID } /* /usr/x86_64-w64-mingw32/include/winuser.h:1115:11 */ type COPYDATASTRUCT = tagCOPYDATASTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1119:5 */ type PCOPYDATASTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1119:20 */ type tagMDINEXTMENU = struct { FhmenuIn HMENU FhmenuNext HMENU FhwndNext HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:1121:11 */ type MDINEXTMENU = tagMDINEXTMENU /* /usr/x86_64-w64-mingw32/include/winuser.h:1125:5 */ type PMDINEXTMENU = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1125:17 */ type LPMDINEXTMENU = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1125:31 */ type POWERBROADCAST_SETTING = struct { FPowerSetting GUID FDataLength DWORD FData [1]UCHAR F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1317:5 */ type PPOWERBROADCAST_SETTING = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1317:28 */ type tagWINDOWPOS = struct { Fhwnd HWND FhwndInsertAfter HWND Fx int32 Fy int32 Fcx int32 Fcy int32 Fflags UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1520:11 */ type WINDOWPOS = tagWINDOWPOS /* /usr/x86_64-w64-mingw32/include/winuser.h:1528:5 */ type LPWINDOWPOS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1528:15 */ type PWINDOWPOS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1528:28 */ type tagNCCALCSIZE_PARAMS = struct { Frgrc [3]RECT Flppos PWINDOWPOS } /* /usr/x86_64-w64-mingw32/include/winuser.h:1530:11 */ type NCCALCSIZE_PARAMS = tagNCCALCSIZE_PARAMS /* /usr/x86_64-w64-mingw32/include/winuser.h:1533:5 */ type LPNCCALCSIZE_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1533:23 */ type tagTRACKMOUSEEVENT = struct { FcbSize DWORD FdwFlags DWORD FhwndTrack HWND FdwHoverTime DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1567:11 */ type TRACKMOUSEEVENT = tagTRACKMOUSEEVENT /* /usr/x86_64-w64-mingw32/include/winuser.h:1572:5 */ type LPTRACKMOUSEEVENT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1572:21 */ type tagACCEL = struct { FfVirt BYTE F__ccgo_pad1 [1]byte Fkey WORD Fcmd WORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:1817:11 */ type ACCEL = tagACCEL /* /usr/x86_64-w64-mingw32/include/winuser.h:1821:5 */ type LPACCEL = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1821:11 */ type tagPAINTSTRUCT = struct { Fhdc HDC FfErase WINBOOL FrcPaint RECT FfRestore WINBOOL FfIncUpdate WINBOOL FrgbReserved [32]BYTE F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1823:11 */ type PAINTSTRUCT = tagPAINTSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1830:5 */ type PPAINTSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1830:17 */ type NPPAINTSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1830:31 */ type LPPAINTSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1830:46 */ type CREATESTRUCTA = tagCREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:1845:5 */ type LPCREATESTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1845:19 */ type CREATESTRUCTW = tagCREATESTRUCTW /* /usr/x86_64-w64-mingw32/include/winuser.h:1860:5 */ type LPCREATESTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1860:19 */ type CREATESTRUCT = CREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:1862:3 */ type LPCREATESTRUCT = LPCREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:1863:3 */ type tagWINDOWPLACEMENT = struct { Flength UINT Fflags UINT FshowCmd UINT FptMinPosition POINT FptMaxPosition POINT FrcNormalPosition RECT } /* /usr/x86_64-w64-mingw32/include/winuser.h:1865:11 */ type WINDOWPLACEMENT = tagWINDOWPLACEMENT /* /usr/x86_64-w64-mingw32/include/winuser.h:1872:5 */ type PWINDOWPLACEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1873:27 */ type LPWINDOWPLACEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1873:45 */ type tagNMHDR = struct { FhwndFrom HWND FidFrom UINT_PTR Fcode UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1881:11 */ type NMHDR = tagNMHDR /* /usr/x86_64-w64-mingw32/include/winuser.h:1885:5 */ type LPNMHDR = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1889:17 */ type tagSTYLESTRUCT = struct { FstyleOld DWORD FstyleNew DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:1891:11 */ type STYLESTRUCT = tagSTYLESTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1894:5 */ type LPSTYLESTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1894:17 */ type tagMEASUREITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT FitemWidth UINT FitemHeight UINT F__ccgo_pad1 [4]byte FitemData ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:1920:11 */ type MEASUREITEMSTRUCT = tagMEASUREITEMSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1927:5 */ type PMEASUREITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1927:23 */ type LPMEASUREITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1927:43 */ type tagDRAWITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT FitemAction UINT FitemState UINT F__ccgo_pad1 [4]byte FhwndItem HWND FhDC HDC FrcItem RECT FitemData ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:1929:11 */ type DRAWITEMSTRUCT = tagDRAWITEMSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1939:5 */ type PDRAWITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1939:20 */ type LPDRAWITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1939:37 */ type tagDELETEITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FitemID UINT F__ccgo_pad1 [4]byte FhwndItem HWND FitemData ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:1941:11 */ type DELETEITEMSTRUCT = tagDELETEITEMSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1947:5 */ type PDELETEITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1947:22 */ type LPDELETEITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1947:41 */ type tagCOMPAREITEMSTRUCT = struct { FCtlType UINT FCtlID UINT FhwndItem HWND FitemID1 UINT F__ccgo_pad1 [4]byte FitemData1 ULONG_PTR FitemID2 UINT F__ccgo_pad2 [4]byte FitemData2 ULONG_PTR FdwLocaleId DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:1949:11 */ type COMPAREITEMSTRUCT = tagCOMPAREITEMSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:1958:5 */ type PCOMPAREITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1958:23 */ type LPCOMPAREITEMSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:1958:43 */ type BSMINFO = struct { FcbSize UINT F__ccgo_pad1 [4]byte Fhdesk HDESK Fhwnd HWND Fluid LUID } /* /usr/x86_64-w64-mingw32/include/winuser.h:2063:5 */ type PBSMINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2063:13 */ type HDEVNOTIFY = PVOID /* /usr/x86_64-w64-mingw32/include/winuser.h:2096:17 */ type PHDEVNOTIFY = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2097:22 */ type HPOWERNOTIFY = HANDLE /* /usr/x86_64-w64-mingw32/include/winuser.h:2120:18 */ type PHPOWERNOTIFY = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2121:24 */ type PREGISTERCLASSNAMEW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2198:19 */ type tagUPDATELAYEREDWINDOWINFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhdcDst HDC FpptDst uintptr Fpsize uintptr FhdcSrc HDC FpptSrc uintptr FcrKey COLORREF F__ccgo_pad2 [4]byte Fpblend uintptr FdwFlags DWORD F__ccgo_pad3 [4]byte FprcDirty uintptr } /* /usr/x86_64-w64-mingw32/include/winuser.h:2221:11 */ type UPDATELAYEREDWINDOWINFO = tagUPDATELAYEREDWINDOWINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:2232:5 */ type PUPDATELAYEREDWINDOWINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2232:29 */ type FLASHWINFO = struct { FcbSize UINT F__ccgo_pad1 [4]byte Fhwnd HWND FdwFlags DWORD FuCount UINT FdwTimeout DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:2272:5 */ type PFLASHWINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2272: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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:2346:5 */ type LPDLGTEMPLATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2350:23 */ type LPDLGTEMPLATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2351:23 */ type LPDLGTEMPLATE = LPDLGTEMPLATEA /* /usr/x86_64-w64-mingw32/include/winuser.h:2353:3 */ type LPCDLGTEMPLATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2357:29 */ type LPCDLGTEMPLATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2358:29 */ type LPCDLGTEMPLATE = LPCDLGTEMPLATEA /* /usr/x86_64-w64-mingw32/include/winuser.h:2360:3 */ type DLGITEMTEMPLATE = struct { Fstyle DWORD FdwExtendedStyle DWORD Fx int16 Fy int16 Fcx int16 Fcy int16 Fid WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:2372:5 */ type PDLGITEMTEMPLATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2374:27 */ type PDLGITEMTEMPLATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2375:27 */ type PDLGITEMTEMPLATE = PDLGITEMTEMPLATEA /* /usr/x86_64-w64-mingw32/include/winuser.h:2377:3 */ type LPDLGITEMTEMPLATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2379:27 */ type LPDLGITEMTEMPLATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2380:27 */ type LPDLGITEMTEMPLATE = LPDLGITEMTEMPLATEA /* /usr/x86_64-w64-mingw32/include/winuser.h:2382:3 */ type DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = uint32 /* /usr/x86_64-w64-mingw32/include/winuser.h:2444:5 */ type DIALOG_DPI_CHANGE_BEHAVIORS = uint32 /* /usr/x86_64-w64-mingw32/include/winuser.h:2454:5 */ type tagMOUSEINPUT = struct { Fdx LONG Fdy LONG FmouseData DWORD FdwFlags DWORD Ftime DWORD F__ccgo_pad1 [4]byte FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:2733:11 */ type MOUSEINPUT = tagMOUSEINPUT /* /usr/x86_64-w64-mingw32/include/winuser.h:2740:5 */ type PMOUSEINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2740:16 */ type LPMOUSEINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2740:29 */ type tagKEYBDINPUT = struct { FwVk WORD FwScan WORD FdwFlags DWORD Ftime DWORD F__ccgo_pad1 [4]byte FdwExtraInfo ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:2742:11 */ type KEYBDINPUT = tagKEYBDINPUT /* /usr/x86_64-w64-mingw32/include/winuser.h:2748:5 */ type PKEYBDINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2748:16 */ type LPKEYBDINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2748:29 */ type tagHARDWAREINPUT = struct { FuMsg DWORD FwParamL WORD FwParamH WORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:2750:11 */ type HARDWAREINPUT = tagHARDWAREINPUT /* /usr/x86_64-w64-mingw32/include/winuser.h:2754:5 */ type PHARDWAREINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2754:19 */ type LPHARDWAREINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2754:35 */ type tagINPUT = struct { Ftype DWORD F__ccgo_pad1 [4]byte Fu struct{ Fmi MOUSEINPUT } } /* /usr/x86_64-w64-mingw32/include/winuser.h:2756:11 */ type INPUT = tagINPUT /* /usr/x86_64-w64-mingw32/include/winuser.h:2763:5 */ type PINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2763:11 */ type LPINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2763:19 */ type tagLASTINPUTINFO = struct { FcbSize UINT FdwTime DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:2967:11 */ type LASTINPUTINFO = tagLASTINPUTINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:2970:5 */ type PLASTINPUTINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:2970:19 */ type tagTPMPARAMS = struct { FcbSize UINT FrcExclude RECT } /* /usr/x86_64-w64-mingw32/include/winuser.h:3293:11 */ type TPMPARAMS = tagTPMPARAMS /* /usr/x86_64-w64-mingw32/include/winuser.h:3296:5 */ type tagMENUINFO = struct { FcbSize DWORD FfMask DWORD FdwStyle DWORD FcyMax UINT FhbrBack HBRUSH FdwContextHelpID DWORD F__ccgo_pad1 [4]byte FdwMenuData ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:3298:11 */ type MENUINFO = tagMENUINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:3306:5 */ type LPMENUINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3306:14 */ type LPTPMPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3308:21 */ type LPCMENUINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3309:26 */ type tagMENUGETOBJECTINFO = struct { FdwFlags DWORD FuPos UINT Fhmenu HMENU Friid PVOID FpvObj PVOID } /* /usr/x86_64-w64-mingw32/include/winuser.h:3319:11 */ type MENUGETOBJECTINFO = tagMENUGETOBJECTINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:3325:5 */ type PMENUGETOBJECTINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3325:23 */ type tagMENUITEMINFOA = struct { FcbSize UINT FfMask UINT FfType UINT FfState UINT FwID UINT F__ccgo_pad1 [4]byte FhSubMenu HMENU FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData ULONG_PTR FdwTypeData LPSTR Fcch UINT F__ccgo_pad2 [4]byte FhbmpItem HBITMAP } /* /usr/x86_64-w64-mingw32/include/winuser.h:3327:11 */ type MENUITEMINFOA = tagMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:3340:5 */ type LPMENUITEMINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3340:19 */ type tagMENUITEMINFOW = struct { FcbSize UINT FfMask UINT FfType UINT FfState UINT FwID UINT F__ccgo_pad1 [4]byte FhSubMenu HMENU FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData ULONG_PTR FdwTypeData LPWSTR Fcch UINT F__ccgo_pad2 [4]byte FhbmpItem HBITMAP } /* /usr/x86_64-w64-mingw32/include/winuser.h:3342:11 */ type MENUITEMINFOW = tagMENUITEMINFOW /* /usr/x86_64-w64-mingw32/include/winuser.h:3355:5 */ type LPMENUITEMINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3355:19 */ type MENUITEMINFO = MENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:3357:3 */ type LPMENUITEMINFO = LPMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:3358:3 */ type LPCMENUITEMINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3360:31 */ type LPCMENUITEMINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3361:31 */ type LPCMENUITEMINFO = LPCMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:3363:3 */ type tagDROPSTRUCT = struct { FhwndSource HWND FhwndSink HWND FwFmt DWORD F__ccgo_pad1 [4]byte FdwData ULONG_PTR FptDrop POINT FdwControlData DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:3411:11 */ type DROPSTRUCT = tagDROPSTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:3418:5 */ type PDROPSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3418:16 */ type LPDROPSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3418:29 */ type tagDRAWTEXTPARAMS = struct { FcbSize UINT FiTabLength int32 FiLeftMargin int32 FiRightMargin int32 FuiLengthDrawn UINT } /* /usr/x86_64-w64-mingw32/include/winuser.h:3465:11 */ type DRAWTEXTPARAMS = tagDRAWTEXTPARAMS /* /usr/x86_64-w64-mingw32/include/winuser.h:3471:5 */ type LPDRAWTEXTPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3471:20 */ type tagHELPINFO = struct { FcbSize UINT FiContextType int32 FiCtrlId int32 F__ccgo_pad1 [4]byte FhItemHandle HANDLE FdwContextId DWORD_PTR FMousePos POINT } /* /usr/x86_64-w64-mingw32/include/winuser.h:3652:11 */ type HELPINFO = tagHELPINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:3659:5 */ type LPHELPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3659:14 */ type MSGBOXCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3716:16 */ type tagMSGBOXPARAMSA = struct { FcbSize UINT F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpszText LPCSTR FlpszCaption LPCSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FlpszIcon LPCSTR FdwContextHelpId DWORD_PTR FlpfnMsgBoxCallback MSGBOXCALLBACK FdwLanguageId DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:3718:11 */ type MSGBOXPARAMSA = tagMSGBOXPARAMSA /* /usr/x86_64-w64-mingw32/include/winuser.h:3729:5 */ type PMSGBOXPARAMSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3729:19 */ type LPMSGBOXPARAMSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3729:35 */ type tagMSGBOXPARAMSW = struct { FcbSize UINT F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpszText LPCWSTR FlpszCaption LPCWSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FlpszIcon LPCWSTR FdwContextHelpId DWORD_PTR FlpfnMsgBoxCallback MSGBOXCALLBACK FdwLanguageId DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:3731:11 */ type MSGBOXPARAMSW = tagMSGBOXPARAMSW /* /usr/x86_64-w64-mingw32/include/winuser.h:3742:5 */ type PMSGBOXPARAMSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3742:19 */ type LPMSGBOXPARAMSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:3742:35 */ type MSGBOXPARAMS = MSGBOXPARAMSA /* /usr/x86_64-w64-mingw32/include/winuser.h:3744:3 */ type PMSGBOXPARAMS = PMSGBOXPARAMSA /* /usr/x86_64-w64-mingw32/include/winuser.h:3745:3 */ type LPMSGBOXPARAMS = LPMSGBOXPARAMSA /* /usr/x86_64-w64-mingw32/include/winuser.h:3746:3 */ type MENUITEMTEMPLATEHEADER = struct { FversionNumber WORD Foffset WORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:4059:5 */ type PMENUITEMTEMPLATEHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4059:28 */ type MENUITEMTEMPLATE = struct { FmtOption WORD FmtID WORD FmtString [1]WCHAR } /* /usr/x86_64-w64-mingw32/include/winuser.h:4065:5 */ type PMENUITEMTEMPLATE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4065:22 */ type _ICONINFO = struct { FfIcon WINBOOL FxHotspot DWORD FyHotspot DWORD F__ccgo_pad1 [4]byte FhbmMask HBITMAP FhbmColor HBITMAP } /* /usr/x86_64-w64-mingw32/include/winuser.h:4142:11 */ type ICONINFO = _ICONINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:4148:5 */ type PICONINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4149:20 */ type tagCURSORSHAPE = struct { FxHotSpot int32 FyHotSpot int32 Fcx int32 Fcy int32 FcbWidth int32 FPlanes BYTE FBitsPixel BYTE F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:4166:11 */ type CURSORSHAPE = tagCURSORSHAPE /* /usr/x86_64-w64-mingw32/include/winuser.h:4174:5 */ type LPCURSORSHAPE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4174:17 */ type tagSCROLLINFO = struct { FcbSize UINT FfMask UINT FnMin int32 FnMax int32 FnPage UINT FnPos int32 FnTrackPos int32 } /* /usr/x86_64-w64-mingw32/include/winuser.h:4882:11 */ type SCROLLINFO = tagSCROLLINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:4890:5 */ type LPSCROLLINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4890:16 */ type LPCSCROLLINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4891:28 */ type tagMDICREATESTRUCTA = struct { FszClass LPCSTR FszTitle LPCSTR FhOwner HANDLE Fx int32 Fy int32 Fcx int32 Fcy int32 Fstyle DWORD F__ccgo_pad1 [4]byte FlParam LPARAM } /* /usr/x86_64-w64-mingw32/include/winuser.h:4909:11 */ type MDICREATESTRUCTA = tagMDICREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:4919:5 */ type LPMDICREATESTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4919:22 */ type tagMDICREATESTRUCTW = struct { FszClass LPCWSTR FszTitle LPCWSTR FhOwner HANDLE Fx int32 Fy int32 Fcx int32 Fcy int32 Fstyle DWORD F__ccgo_pad1 [4]byte FlParam LPARAM } /* /usr/x86_64-w64-mingw32/include/winuser.h:4921:11 */ type MDICREATESTRUCTW = tagMDICREATESTRUCTW /* /usr/x86_64-w64-mingw32/include/winuser.h:4931:5 */ type LPMDICREATESTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4931:22 */ type MDICREATESTRUCT = MDICREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:4933:3 */ type LPMDICREATESTRUCT = LPMDICREATESTRUCTA /* /usr/x86_64-w64-mingw32/include/winuser.h:4934:3 */ type tagCLIENTCREATESTRUCT = struct { FhWindowMenu HANDLE FidFirstChild UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:4936:11 */ type CLIENTCREATESTRUCT = tagCLIENTCREATESTRUCT /* /usr/x86_64-w64-mingw32/include/winuser.h:4939:5 */ type LPCLIENTCREATESTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4939:24 */ type HELPPOLY = DWORD /* /usr/x86_64-w64-mingw32/include/winuser.h:4965:17 */ type tagMULTIKEYHELPA = struct { FmkSize DWORD FmkKeylist CHAR FszKeyphrase [1]CHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:4967:11 */ type MULTIKEYHELPA = tagMULTIKEYHELPA /* /usr/x86_64-w64-mingw32/include/winuser.h:4971:5 */ type PMULTIKEYHELPA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4971:19 */ type LPMULTIKEYHELPA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4971:35 */ type tagMULTIKEYHELPW = struct { FmkSize DWORD FmkKeylist WCHAR FszKeyphrase [1]WCHAR } /* /usr/x86_64-w64-mingw32/include/winuser.h:4973:11 */ type MULTIKEYHELPW = tagMULTIKEYHELPW /* /usr/x86_64-w64-mingw32/include/winuser.h:4977:5 */ type PMULTIKEYHELPW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4977:19 */ type LPMULTIKEYHELPW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4977:35 */ type MULTIKEYHELP = MULTIKEYHELPA /* /usr/x86_64-w64-mingw32/include/winuser.h:4979:3 */ type PMULTIKEYHELP = PMULTIKEYHELPA /* /usr/x86_64-w64-mingw32/include/winuser.h:4980:3 */ type LPMULTIKEYHELP = LPMULTIKEYHELPA /* /usr/x86_64-w64-mingw32/include/winuser.h:4981:3 */ type tagHELPWININFOA = struct { FwStructSize int32 Fx int32 Fy int32 Fdx int32 Fdy int32 FwMax int32 FrgchMember [2]CHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:4983:11 */ type HELPWININFOA = tagHELPWININFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:4991:5 */ type PHELPWININFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4991:18 */ type LPHELPWININFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:4991:33 */ type tagHELPWININFOW = struct { FwStructSize int32 Fx int32 Fy int32 Fdx int32 Fdy int32 FwMax int32 FrgchMember [2]WCHAR } /* /usr/x86_64-w64-mingw32/include/winuser.h:4993:11 */ type HELPWININFOW = tagHELPWININFOW /* /usr/x86_64-w64-mingw32/include/winuser.h:5001:5 */ type PHELPWININFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5001:18 */ type LPHELPWININFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5001:33 */ type HELPWININFO = HELPWININFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:5003:3 */ type PHELPWININFO = PHELPWININFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:5004:3 */ type LPHELPWININFO = LPHELPWININFOA /* /usr/x86_64-w64-mingw32/include/winuser.h:5005: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 } /* /usr/x86_64-w64-mingw32/include/winuser.h:5408:11 */ type NONCLIENTMETRICSA = tagNONCLIENTMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5427:5 */ type PNONCLIENTMETRICSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5427:23 */ type LPNONCLIENTMETRICSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5427: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 } /* /usr/x86_64-w64-mingw32/include/winuser.h:5429:11 */ type NONCLIENTMETRICSW = tagNONCLIENTMETRICSW /* /usr/x86_64-w64-mingw32/include/winuser.h:5448:5 */ type PNONCLIENTMETRICSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5448:23 */ type LPNONCLIENTMETRICSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5448:43 */ type NONCLIENTMETRICS = NONCLIENTMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5450:3 */ type PNONCLIENTMETRICS = PNONCLIENTMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5451:3 */ type LPNONCLIENTMETRICS = LPNONCLIENTMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5452:3 */ type tagMINIMIZEDMETRICS = struct { FcbSize UINT FiWidth int32 FiHorzGap int32 FiVertGap int32 FiArrange int32 } /* /usr/x86_64-w64-mingw32/include/winuser.h:5472:11 */ type MINIMIZEDMETRICS = tagMINIMIZEDMETRICS /* /usr/x86_64-w64-mingw32/include/winuser.h:5478:5 */ type PMINIMIZEDMETRICS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5478:22 */ type LPMINIMIZEDMETRICS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5478:41 */ type tagICONMETRICSA = struct { FcbSize UINT FiHorzSpacing int32 FiVertSpacing int32 FiTitleWrap int32 FlfFont LOGFONTA } /* /usr/x86_64-w64-mingw32/include/winuser.h:5482:11 */ type ICONMETRICSA = tagICONMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5488:5 */ type PICONMETRICSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5488:18 */ type LPICONMETRICSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5488:33 */ type tagICONMETRICSW = struct { FcbSize UINT FiHorzSpacing int32 FiVertSpacing int32 FiTitleWrap int32 FlfFont LOGFONTW } /* /usr/x86_64-w64-mingw32/include/winuser.h:5490:11 */ type ICONMETRICSW = tagICONMETRICSW /* /usr/x86_64-w64-mingw32/include/winuser.h:5496:5 */ type PICONMETRICSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5496:18 */ type LPICONMETRICSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5496:33 */ type ICONMETRICS = ICONMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5498:3 */ type PICONMETRICS = PICONMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5499:3 */ type LPICONMETRICS = LPICONMETRICSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5500:3 */ type tagANIMATIONINFO = struct { FcbSize UINT FiMinAnimate int32 } /* /usr/x86_64-w64-mingw32/include/winuser.h:5504:11 */ type ANIMATIONINFO = tagANIMATIONINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:5507:5 */ type LPANIMATIONINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5507:19 */ type tagSERIALKEYSA = struct { FcbSize UINT FdwFlags DWORD FlpszActivePort LPSTR FlpszPort LPSTR FiBaudRate UINT FiPortState UINT FiActive UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:5509:11 */ type SERIALKEYSA = tagSERIALKEYSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5517:5 */ type LPSERIALKEYSA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5517:17 */ type tagSERIALKEYSW = struct { FcbSize UINT FdwFlags DWORD FlpszActivePort LPWSTR FlpszPort LPWSTR FiBaudRate UINT FiPortState UINT FiActive UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:5519:11 */ type SERIALKEYSW = tagSERIALKEYSW /* /usr/x86_64-w64-mingw32/include/winuser.h:5527:5 */ type LPSERIALKEYSW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5527:17 */ type SERIALKEYS = SERIALKEYSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5529:3 */ type LPSERIALKEYS = LPSERIALKEYSA /* /usr/x86_64-w64-mingw32/include/winuser.h:5530:3 */ type tagHIGHCONTRASTA = struct { FcbSize UINT FdwFlags DWORD FlpszDefaultScheme LPSTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:5532:11 */ type HIGHCONTRASTA = tagHIGHCONTRASTA /* /usr/x86_64-w64-mingw32/include/winuser.h:5536:5 */ type LPHIGHCONTRASTA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5536:19 */ type tagHIGHCONTRASTW = struct { FcbSize UINT FdwFlags DWORD FlpszDefaultScheme LPWSTR } /* /usr/x86_64-w64-mingw32/include/winuser.h:5538:11 */ type HIGHCONTRASTW = tagHIGHCONTRASTW /* /usr/x86_64-w64-mingw32/include/winuser.h:5542:5 */ type LPHIGHCONTRASTW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5542:19 */ type HIGHCONTRAST = HIGHCONTRASTA /* /usr/x86_64-w64-mingw32/include/winuser.h:5544:3 */ type LPHIGHCONTRAST = LPHIGHCONTRASTA /* /usr/x86_64-w64-mingw32/include/winuser.h:5545: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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/tvout.h:35:3 */ type PVIDEOPARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/tvout.h:35:19 */ type LPVIDEOPARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/tvout.h:35:37 */ type tagFILTERKEYS = struct { FcbSize UINT FdwFlags DWORD FiWaitMSec DWORD FiDelayMSec DWORD FiRepeatMSec DWORD FiBounceMSec DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5641:11 */ type FILTERKEYS = tagFILTERKEYS /* /usr/x86_64-w64-mingw32/include/winuser.h:5648:5 */ type LPFILTERKEYS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5648:16 */ type tagSTICKYKEYS = struct { FcbSize UINT FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5660:11 */ type STICKYKEYS = tagSTICKYKEYS /* /usr/x86_64-w64-mingw32/include/winuser.h:5663:5 */ type LPSTICKYKEYS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5663:16 */ type tagMOUSEKEYS = struct { FcbSize UINT FdwFlags DWORD FiMaxSpeed DWORD FiTimeToMaxSpeed DWORD FiCtrlSpeed DWORD FdwReserved1 DWORD FdwReserved2 DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5693:11 */ type MOUSEKEYS = tagMOUSEKEYS /* /usr/x86_64-w64-mingw32/include/winuser.h:5701:5 */ type LPMOUSEKEYS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5701:15 */ type tagACCESSTIMEOUT = struct { FcbSize UINT FdwFlags DWORD FiTimeOutMSec DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5719:11 */ type ACCESSTIMEOUT = tagACCESSTIMEOUT /* /usr/x86_64-w64-mingw32/include/winuser.h:5723:5 */ type LPACCESSTIMEOUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5723: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:5744:11 */ type SOUNDSENTRYA = tagSOUNDSENTRYA /* /usr/x86_64-w64-mingw32/include/winuser.h:5757:5 */ type LPSOUNDSENTRYA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5757: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:5759:11 */ type SOUNDSENTRYW = tagSOUNDSENTRYW /* /usr/x86_64-w64-mingw32/include/winuser.h:5772:5 */ type LPSOUNDSENTRYW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5772:18 */ type SOUNDSENTRY = SOUNDSENTRYA /* /usr/x86_64-w64-mingw32/include/winuser.h:5774:3 */ type LPSOUNDSENTRY = LPSOUNDSENTRYA /* /usr/x86_64-w64-mingw32/include/winuser.h:5775:3 */ type tagTOGGLEKEYS = struct { FcbSize UINT FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5787:11 */ type TOGGLEKEYS = tagTOGGLEKEYS /* /usr/x86_64-w64-mingw32/include/winuser.h:5790:5 */ type LPTOGGLEKEYS = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5790:16 */ type tagMONITORINFO = struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:5792:11 */ type MONITORINFO = tagMONITORINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:5797:5 */ type LPMONITORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5797:17 */ type tagMONITORINFOEXA = struct { F__0 struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } FszDevice [32]CHAR } /* /usr/x86_64-w64-mingw32/include/winuser.h:5819:11 */ type MONITORINFOEXA = tagMONITORINFOEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:5827:5 */ type LPMONITORINFOEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5827:20 */ type tagMONITORINFOEXW = struct { F__0 struct { FcbSize DWORD FrcMonitor RECT FrcWork RECT FdwFlags DWORD } FszDevice [32]WCHAR } /* /usr/x86_64-w64-mingw32/include/winuser.h:5829:11 */ type MONITORINFOEXW = tagMONITORINFOEXW /* /usr/x86_64-w64-mingw32/include/winuser.h:5837:5 */ type LPMONITORINFOEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5837:20 */ type MONITORINFOEX = MONITORINFOEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:5839:3 */ type LPMONITORINFOEX = LPMONITORINFOEXA /* /usr/x86_64-w64-mingw32/include/winuser.h:5840:3 */ type MONITORENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5843:19 */ type WINEVENTPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:5885:16 */ type tagGUITHREADINFO = struct { FcbSize DWORD Fflags DWORD FhwndActive HWND FhwndFocus HWND FhwndCapture HWND FhwndMenuOwner HWND FhwndMoveSize HWND FhwndCaret HWND FrcCaret RECT } /* /usr/x86_64-w64-mingw32/include/winuser.h:6062:11 */ type GUITHREADINFO = tagGUITHREADINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6072:5 */ type PGUITHREADINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6072:19 */ type LPGUITHREADINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6072:35 */ type tagCURSORINFO = struct { FcbSize DWORD Fflags DWORD FhCursor HCURSOR FptScreenPos POINT } /* /usr/x86_64-w64-mingw32/include/winuser.h:6167:11 */ type CURSORINFO = tagCURSORINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6172:5 */ type PCURSORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6172:16 */ type LPCURSORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6172:29 */ type tagWINDOWINFO = struct { FcbSize DWORD FrcWindow RECT FrcClient RECT FdwStyle DWORD FdwExStyle DWORD FdwWindowStatus DWORD FcxWindowBorders UINT FcyWindowBorders UINT FatomWindowType ATOM FwCreatorVersion WORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:6181:11 */ type WINDOWINFO = tagWINDOWINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6192:5 */ type PWINDOWINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6192:16 */ type LPWINDOWINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6192:29 */ type tagTITLEBARINFO = struct { FcbSize DWORD FrcTitleBar RECT Frgstate [6]DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:6198:11 */ type TITLEBARINFO = tagTITLEBARINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6202:5 */ type PTITLEBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6202:18 */ type LPTITLEBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6202:33 */ type tagMENUBARINFO = struct { FcbSize DWORD FrcBar RECT F__ccgo_pad1 [4]byte FhMenu HMENU FhwndMenu HWND FfBarFocused uint8 /* WINBOOL fBarFocused: 1, WINBOOL fFocused: 1 */ F__ccgo_pad2 [7]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:6215:11 */ type MENUBARINFO = tagMENUBARINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6222:5 */ type PMENUBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6222:17 */ type LPMENUBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6222:31 */ type tagSCROLLBARINFO = struct { FcbSize DWORD FrcScrollBar RECT FdxyLineButton int32 FxyThumbTop int32 FxyThumbBottom int32 Freserved int32 Frgstate [6]DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:6226:11 */ type SCROLLBARINFO = tagSCROLLBARINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6234:5 */ type PSCROLLBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6234:19 */ type LPSCROLLBARINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6234:35 */ type tagCOMBOBOXINFO = struct { FcbSize DWORD FrcItem RECT FrcButton RECT FstateButton DWORD FhwndCombo HWND FhwndItem HWND FhwndList HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:6238:11 */ type COMBOBOXINFO = tagCOMBOBOXINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6246:5 */ type PCOMBOBOXINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6246:18 */ type LPCOMBOBOXINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6246:33 */ type tagALTTABINFO = struct { FcbSize DWORD FcItems int32 FcColumns int32 FcRows int32 FiColFocus int32 FiRowFocus int32 FcxItem int32 FcyItem int32 FptStart POINT } /* /usr/x86_64-w64-mingw32/include/winuser.h:6263:11 */ type ALTTABINFO = tagALTTABINFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6273:5 */ type PALTTABINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6273:16 */ type LPALTTABINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6273:29 */ type HRAWINPUT__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/winuser.h:6287:3 */ type HRAWINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6287:3 */ type tagRAWINPUTHEADER = struct { FdwType DWORD FdwSize DWORD FhDevice HANDLE FwParam WPARAM } /* /usr/x86_64-w64-mingw32/include/winuser.h:6296:11 */ type RAWINPUTHEADER = tagRAWINPUTHEADER /* /usr/x86_64-w64-mingw32/include/winuser.h:6301:5 */ type PRAWINPUTHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6301:20 */ type LPRAWINPUTHEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6301:37 */ type tagRAWMOUSE = struct { FusFlags USHORT F__ccgo_pad1 [2]byte F__4 struct{ FulButtons ULONG } FulRawButtons ULONG FlLastX LONG FlLastY LONG FulExtraInformation ULONG } /* /usr/x86_64-w64-mingw32/include/winuser.h:6310:11 */ type RAWMOUSE = tagRAWMOUSE /* /usr/x86_64-w64-mingw32/include/winuser.h:6323:5 */ type PRAWMOUSE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6323:14 */ type LPRAWMOUSE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6323:25 */ type tagRAWKEYBOARD = struct { FMakeCode USHORT FFlags USHORT FReserved USHORT FVKey USHORT FMessage UINT FExtraInformation ULONG } /* /usr/x86_64-w64-mingw32/include/winuser.h:6357:11 */ type RAWKEYBOARD = tagRAWKEYBOARD /* /usr/x86_64-w64-mingw32/include/winuser.h:6364:5 */ type PRAWKEYBOARD = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6364:17 */ type LPRAWKEYBOARD = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6364:31 */ type tagRAWHID = struct { FdwSizeHid DWORD FdwCount DWORD FbRawData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:6377:11 */ type RAWHID = tagRAWHID /* /usr/x86_64-w64-mingw32/include/winuser.h:6381:5 */ type PRAWHID = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6381:12 */ type LPRAWHID = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6381:21 */ type tagRAWINPUT = struct { Fheader RAWINPUTHEADER Fdata struct{ Fmouse RAWMOUSE } } /* /usr/x86_64-w64-mingw32/include/winuser.h:6383:11 */ type RAWINPUT = tagRAWINPUT /* /usr/x86_64-w64-mingw32/include/winuser.h:6390:5 */ type PRAWINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6390:14 */ type LPRAWINPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6390:25 */ type tagRID_DEVICE_INFO_MOUSE = struct { FdwId DWORD FdwNumberOfButtons DWORD FdwSampleRate DWORD FfHasHorizontalWheel WINBOOL } /* /usr/x86_64-w64-mingw32/include/winuser.h:6413:11 */ type RID_DEVICE_INFO_MOUSE = tagRID_DEVICE_INFO_MOUSE /* /usr/x86_64-w64-mingw32/include/winuser.h:6418:5 */ type PRID_DEVICE_INFO_MOUSE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6418:27 */ type tagRID_DEVICE_INFO_KEYBOARD = struct { FdwType DWORD FdwSubType DWORD FdwKeyboardMode DWORD FdwNumberOfFunctionKeys DWORD FdwNumberOfIndicators DWORD FdwNumberOfKeysTotal DWORD } /* /usr/x86_64-w64-mingw32/include/winuser.h:6420:11 */ type RID_DEVICE_INFO_KEYBOARD = tagRID_DEVICE_INFO_KEYBOARD /* /usr/x86_64-w64-mingw32/include/winuser.h:6427:5 */ type PRID_DEVICE_INFO_KEYBOARD = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6427:30 */ type tagRID_DEVICE_INFO_HID = struct { FdwVendorId DWORD FdwProductId DWORD FdwVersionNumber DWORD FusUsagePage USHORT FusUsage USHORT } /* /usr/x86_64-w64-mingw32/include/winuser.h:6429:11 */ type RID_DEVICE_INFO_HID = tagRID_DEVICE_INFO_HID /* /usr/x86_64-w64-mingw32/include/winuser.h:6435:5 */ type PRID_DEVICE_INFO_HID = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6435:25 */ type tagRID_DEVICE_INFO = struct { FcbSize DWORD FdwType DWORD Fu struct { Fmouse RID_DEVICE_INFO_MOUSE F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/winuser.h:6437:11 */ type RID_DEVICE_INFO = tagRID_DEVICE_INFO /* /usr/x86_64-w64-mingw32/include/winuser.h:6445:5 */ type PRID_DEVICE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6445:21 */ type LPRID_DEVICE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6445:39 */ type tagRAWINPUTDEVICE = struct { FusUsagePage USHORT FusUsage USHORT FdwFlags DWORD FhwndTarget HWND } /* /usr/x86_64-w64-mingw32/include/winuser.h:6453:11 */ type RAWINPUTDEVICE = tagRAWINPUTDEVICE /* /usr/x86_64-w64-mingw32/include/winuser.h:6458:5 */ type PRAWINPUTDEVICE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6458:20 */ type LPRAWINPUTDEVICE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6458:37 */ type PCRAWINPUTDEVICE = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6460:32 */ type tagRAWINPUTDEVICELIST = struct { FhDevice HANDLE FdwType DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winuser.h:6487:11 */ type RAWINPUTDEVICELIST = tagRAWINPUTDEVICELIST /* /usr/x86_64-w64-mingw32/include/winuser.h:6490:5 */ type PRAWINPUTDEVICELIST = uintptr /* /usr/x86_64-w64-mingw32/include/winuser.h:6490: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 /* /usr/x86_64-w64-mingw32/include/winnls.h:644:17 */ type LCTYPE = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:645:17 */ type CALTYPE = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:646:17 */ type CALID = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:647:17 */ type _cpinfo = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winnls.h:649:11 */ type CPINFO = _cpinfo /* /usr/x86_64-w64-mingw32/include/winnls.h:653:5 */ type LPCPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:653:12 */ type _cpinfoexA = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE FUnicodeDefaultChar WCHAR FCodePage UINT FCodePageName [260]CHAR } /* /usr/x86_64-w64-mingw32/include/winnls.h:654:11 */ type CPINFOEXA = _cpinfoexA /* /usr/x86_64-w64-mingw32/include/winnls.h:661:5 */ type LPCPINFOEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:661:15 */ type _cpinfoexW = struct { FMaxCharSize UINT FDefaultChar [2]BYTE FLeadByte [12]BYTE FUnicodeDefaultChar WCHAR FCodePage UINT FCodePageName [260]WCHAR } /* /usr/x86_64-w64-mingw32/include/winnls.h:663:11 */ type CPINFOEXW = _cpinfoexW /* /usr/x86_64-w64-mingw32/include/winnls.h:670:5 */ type LPCPINFOEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:670:15 */ type CPINFOEX = CPINFOEXA /* /usr/x86_64-w64-mingw32/include/winnls.h:672:3 */ type LPCPINFOEX = LPCPINFOEXA /* /usr/x86_64-w64-mingw32/include/winnls.h:673:3 */ type _numberfmtA = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT F__ccgo_pad1 [4]byte FlpDecimalSep LPSTR FlpThousandSep LPSTR FNegativeOrder UINT F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnls.h:675:11 */ type NUMBERFMTA = _numberfmtA /* /usr/x86_64-w64-mingw32/include/winnls.h:682:5 */ type LPNUMBERFMTA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:682:16 */ type _numberfmtW = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT F__ccgo_pad1 [4]byte FlpDecimalSep LPWSTR FlpThousandSep LPWSTR FNegativeOrder UINT F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnls.h:683:11 */ type NUMBERFMTW = _numberfmtW /* /usr/x86_64-w64-mingw32/include/winnls.h:690:5 */ type LPNUMBERFMTW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:690:16 */ type NUMBERFMT = NUMBERFMTA /* /usr/x86_64-w64-mingw32/include/winnls.h:692:3 */ type LPNUMBERFMT = LPNUMBERFMTA /* /usr/x86_64-w64-mingw32/include/winnls.h:693:3 */ type _currencyfmtA = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT F__ccgo_pad1 [4]byte FlpDecimalSep LPSTR FlpThousandSep LPSTR FNegativeOrder UINT FPositiveOrder UINT FlpCurrencySymbol LPSTR } /* /usr/x86_64-w64-mingw32/include/winnls.h:695:11 */ type CURRENCYFMTA = _currencyfmtA /* /usr/x86_64-w64-mingw32/include/winnls.h:704:5 */ type LPCURRENCYFMTA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:704:18 */ type _currencyfmtW = struct { FNumDigits UINT FLeadingZero UINT FGrouping UINT F__ccgo_pad1 [4]byte FlpDecimalSep LPWSTR FlpThousandSep LPWSTR FNegativeOrder UINT FPositiveOrder UINT FlpCurrencySymbol LPWSTR } /* /usr/x86_64-w64-mingw32/include/winnls.h:706:11 */ type CURRENCYFMTW = _currencyfmtW /* /usr/x86_64-w64-mingw32/include/winnls.h:715:5 */ type LPCURRENCYFMTW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:715:18 */ type CURRENCYFMT = CURRENCYFMTA /* /usr/x86_64-w64-mingw32/include/winnls.h:717:3 */ type LPCURRENCYFMT = LPCURRENCYFMTA /* /usr/x86_64-w64-mingw32/include/winnls.h:718:3 */ type NLS_FUNCTION = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:724:17 */ type _nlsversioninfo = struct { FdwNLSVersionInfoSize DWORD FdwNLSVersion DWORD FdwDefinedVersion DWORD } /* /usr/x86_64-w64-mingw32/include/winnls.h:735:11 */ type NLSVERSIONINFO = _nlsversioninfo /* /usr/x86_64-w64-mingw32/include/winnls.h:739:5 */ type LPNLSVERSIONINFO = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:739:20 */ type _nlsversioninfoex = struct { FdwNLSVersionInfoSize DWORD FdwNLSVersion DWORD FdwDefinedVersion DWORD FdwEffectiveId DWORD FguidCustomVersion GUID } /* /usr/x86_64-w64-mingw32/include/winnls.h:742:11 */ type NLSVERSIONINFOEX = _nlsversioninfoex /* /usr/x86_64-w64-mingw32/include/winnls.h:748:5 */ type LPNLSVERSIONINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:748:22 */ type GEOID = LONG /* /usr/x86_64-w64-mingw32/include/winnls.h:750:16 */ type GEOTYPE = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:751:17 */ type GEOCLASS = DWORD /* /usr/x86_64-w64-mingw32/include/winnls.h:752:17 */ type LANGUAGEGROUP_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:798:19 */ type LANGGROUPLOCALE_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:799:19 */ type UILANGUAGE_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:800:19 */ type CODEPAGE_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:801:19 */ type DATEFMT_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:802:19 */ type DATEFMT_ENUMPROCEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:803:19 */ type TIMEFMT_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:804:19 */ type CALINFO_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:805:19 */ type CALINFO_ENUMPROCEXA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:806:19 */ type LOCALE_ENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:807:19 */ type LOCALE_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:808:19 */ type LANGUAGEGROUP_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:809:19 */ type LANGGROUPLOCALE_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:810:19 */ type UILANGUAGE_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:811:19 */ type CODEPAGE_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:812:19 */ type DATEFMT_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:813:19 */ type DATEFMT_ENUMPROCEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:814:19 */ type TIMEFMT_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:815:19 */ type CALINFO_ENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:816:19 */ type CALINFO_ENUMPROCEXW = uintptr /* /usr/x86_64-w64-mingw32/include/winnls.h:817:19 */ type GEO_ENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winnls.h:869:11 */ type FILEMUIINFO = _FILEMUIINFO /* /usr/x86_64-w64-mingw32/include/winnls.h:883:5 */ type PFILEMUIINFO = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/wincon.h:20: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 /* /usr/x86_64-w64-mingw32/include/wincon.h:23:5 */ type PCOORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:23:11 */ type _SMALL_RECT = struct { FLeft SHORT FTop SHORT FRight SHORT FBottom SHORT } /* /usr/x86_64-w64-mingw32/include/wincon.h:25:11 */ type SMALL_RECT = _SMALL_RECT /* /usr/x86_64-w64-mingw32/include/wincon.h:30:5 */ type PSMALL_RECT = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:30:16 */ type _KEY_EVENT_RECORD = struct { FbKeyDown WINBOOL FwRepeatCount WORD FwVirtualKeyCode WORD FwVirtualScanCode WORD FuChar struct{ FUnicodeChar WCHAR } FdwControlKeyState DWORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:32:11 */ type KEY_EVENT_RECORD = _KEY_EVENT_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:42:5 */ type PKEY_EVENT_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:42:22 */ type _MOUSE_EVENT_RECORD = struct { FdwMousePosition COORD FdwButtonState DWORD FdwControlKeyState DWORD FdwEventFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:62:11 */ type MOUSE_EVENT_RECORD = _MOUSE_EVENT_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:67:5 */ type PMOUSE_EVENT_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:67:24 */ type _WINDOW_BUFFER_SIZE_RECORD = struct{ FdwSize COORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:82:11 */ type WINDOW_BUFFER_SIZE_RECORD = _WINDOW_BUFFER_SIZE_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:84:5 */ type PWINDOW_BUFFER_SIZE_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:84:31 */ type _MENU_EVENT_RECORD = struct{ FdwCommandId UINT } /* /usr/x86_64-w64-mingw32/include/wincon.h:86:11 */ type MENU_EVENT_RECORD = _MENU_EVENT_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:88:5 */ type PMENU_EVENT_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:88:23 */ type _FOCUS_EVENT_RECORD = struct{ FbSetFocus WINBOOL } /* /usr/x86_64-w64-mingw32/include/wincon.h:90:11 */ type FOCUS_EVENT_RECORD = _FOCUS_EVENT_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:92:5 */ type PFOCUS_EVENT_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:92:24 */ type _INPUT_RECORD = struct { FEventType WORD F__ccgo_pad1 [2]byte FEvent struct{ FKeyEvent KEY_EVENT_RECORD } } /* /usr/x86_64-w64-mingw32/include/wincon.h:94:11 */ type INPUT_RECORD = _INPUT_RECORD /* /usr/x86_64-w64-mingw32/include/wincon.h:103:5 */ type PINPUT_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:103:18 */ type _CHAR_INFO = struct { FChar struct{ FUnicodeChar WCHAR } FAttributes WORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:111:11 */ type CHAR_INFO = _CHAR_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:117:5 */ type PCHAR_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:117:15 */ type _CONSOLE_SCREEN_BUFFER_INFO = struct { FdwSize COORD FdwCursorPosition COORD FwAttributes WORD FsrWindow SMALL_RECT FdwMaximumWindowSize COORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:137:11 */ type CONSOLE_SCREEN_BUFFER_INFO = _CONSOLE_SCREEN_BUFFER_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:143:5 */ type PCONSOLE_SCREEN_BUFFER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:143:32 */ type _CONSOLE_CURSOR_INFO = struct { FdwSize DWORD FbVisible WINBOOL } /* /usr/x86_64-w64-mingw32/include/wincon.h:145:11 */ type CONSOLE_CURSOR_INFO = _CONSOLE_CURSOR_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:148:5 */ type PCONSOLE_CURSOR_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:148:25 */ type _CONSOLE_FONT_INFO = struct { FnFont DWORD FdwFontSize COORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:150:11 */ type CONSOLE_FONT_INFO = _CONSOLE_FONT_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:153:5 */ type PCONSOLE_FONT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:153:23 */ type _CONSOLE_SELECTION_INFO = struct { FdwFlags DWORD FdwSelectionAnchor COORD FsrSelection SMALL_RECT } /* /usr/x86_64-w64-mingw32/include/wincon.h:155:11 */ type CONSOLE_SELECTION_INFO = _CONSOLE_SELECTION_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:159:5 */ type PCONSOLE_SELECTION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:159:28 */ type PHANDLER_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:167:19 */ type _CONSOLE_FONT_INFOEX = struct { FcbSize ULONG FnFont DWORD FdwFontSize COORD FFontFamily UINT FFontWeight UINT FFaceName [32]WCHAR } /* /usr/x86_64-w64-mingw32/include/wincon.h:321:9 */ type CONSOLE_FONT_INFOEX = _CONSOLE_FONT_INFOEX /* /usr/x86_64-w64-mingw32/include/wincon.h:328:3 */ type PCONSOLE_FONT_INFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:328:24 */ type _CONSOLE_HISTORY_INFO = struct { FcbSize UINT FHistoryBufferSize UINT FNumberOfHistoryBuffers UINT FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wincon.h:332:9 */ type CONSOLE_HISTORY_INFO = _CONSOLE_HISTORY_INFO /* /usr/x86_64-w64-mingw32/include/wincon.h:337:3 */ type PCONSOLE_HISTORY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:337:25 */ type _CONSOLE_READCONSOLE_CONTROL = struct { FnLength ULONG FnInitialChars ULONG FdwCtrlWakeupMask ULONG FdwControlKeyState ULONG } /* /usr/x86_64-w64-mingw32/include/wincon.h:339:9 */ type CONSOLE_READCONSOLE_CONTROL = _CONSOLE_READCONSOLE_CONTROL /* /usr/x86_64-w64-mingw32/include/wincon.h:344:3 */ type PCONSOLE_READCONSOLE_CONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:344: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 } /* /usr/x86_64-w64-mingw32/include/wincon.h:346:9 */ type CONSOLE_SCREEN_BUFFER_INFOEX = _CONSOLE_SCREEN_BUFFER_INFOEX /* /usr/x86_64-w64-mingw32/include/wincon.h:356:3 */ type PCONSOLE_SCREEN_BUFFER_INFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/wincon.h:356: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. // defines from verrsrc.h file 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 } /* /usr/x86_64-w64-mingw32/include/winver.h:118: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. // defines from verrsrc.h file type VS_FIXEDFILEINFO = tagVS_FIXEDFILEINFO /* /usr/x86_64-w64-mingw32/include/winver.h:133: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 /* /usr/x86_64-w64-mingw32/include/winreg.h:43:23 */ type LSTATUS = LONG /* /usr/x86_64-w64-mingw32/include/winreg.h:44:16 */ type val_context = struct { Fvaluelen int32 F__ccgo_pad1 [4]byte Fvalue_context LPVOID Fval_buff_ptr LPVOID } /* /usr/x86_64-w64-mingw32/include/winreg.h:62:3 */ type PVALCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:68:30 */ type pvalueA = struct { Fpv_valuename LPSTR Fpv_valuelen int32 F__ccgo_pad1 [4]byte Fpv_value_context LPVOID Fpv_type DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winreg.h:70:11 */ type PVALUEA = pvalueA /* /usr/x86_64-w64-mingw32/include/winreg.h:75:4 */ type PPVALUEA = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:75:12 */ type pvalueW = struct { Fpv_valuename LPWSTR Fpv_valuelen int32 F__ccgo_pad1 [4]byte Fpv_value_context LPVOID Fpv_type DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winreg.h:77:11 */ type PVALUEW = pvalueW /* /usr/x86_64-w64-mingw32/include/winreg.h:82:4 */ type PPVALUEW = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:82:12 */ type PVALUE = PVALUEA /* /usr/x86_64-w64-mingw32/include/winreg.h:84:3 */ type PPVALUE = PPVALUEA /* /usr/x86_64-w64-mingw32/include/winreg.h:85:3 */ type PQUERYHANDLER = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:89:24 */ type provider_info = struct { Fpi_R0_1val PQUERYHANDLER Fpi_R0_allvals PQUERYHANDLER Fpi_R3_1val PQUERYHANDLER Fpi_R3_allvals PQUERYHANDLER Fpi_flags DWORD F__ccgo_pad1 [4]byte Fpi_key_context LPVOID } /* /usr/x86_64-w64-mingw32/include/winreg.h:91:11 */ type REG_PROVIDER = provider_info /* /usr/x86_64-w64-mingw32/include/winreg.h:98:5 */ type PPROVIDER = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:100:32 */ type value_entA = struct { Fve_valuename LPSTR Fve_valuelen DWORD F__ccgo_pad1 [4]byte Fve_valueptr DWORD_PTR Fve_type DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winreg.h:102:11 */ type VALENTA = value_entA /* /usr/x86_64-w64-mingw32/include/winreg.h:107:5 */ type PVALENTA = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:107:13 */ type value_entW = struct { Fve_valuename LPWSTR Fve_valuelen DWORD F__ccgo_pad1 [4]byte Fve_valueptr DWORD_PTR Fve_type DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winreg.h:109:11 */ type VALENTW = value_entW /* /usr/x86_64-w64-mingw32/include/winreg.h:114:5 */ type PVALENTW = uintptr /* /usr/x86_64-w64-mingw32/include/winreg.h:114:13 */ type VALENT = VALENTA /* /usr/x86_64-w64-mingw32/include/winreg.h:116:3 */ type PVALENT = PVALENTA /* /usr/x86_64-w64-mingw32/include/winreg.h:117: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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winnetwk.h:62:5 */ type LPNETRESOURCEA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:62:18 */ type _NETRESOURCEW = struct { FdwScope DWORD FdwType DWORD FdwDisplayType DWORD FdwUsage DWORD FlpLocalName LPWSTR FlpRemoteName LPWSTR FlpComment LPWSTR FlpProvider LPWSTR } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:63:11 */ type NETRESOURCEW = _NETRESOURCEW /* /usr/x86_64-w64-mingw32/include/winnetwk.h:72:5 */ type LPNETRESOURCEW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:72:18 */ type NETRESOURCE = NETRESOURCEA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:74:3 */ type LPNETRESOURCE = LPNETRESOURCEA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:75:3 */ type _CONNECTDLGSTRUCTA = struct { FcbStructure DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FlpConnRes LPNETRESOURCEA FdwFlags DWORD FdwDevNum DWORD } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:129:11 */ type CONNECTDLGSTRUCTA = _CONNECTDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:135:5 */ type LPCONNECTDLGSTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:135:23 */ type _CONNECTDLGSTRUCTW = struct { FcbStructure DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FlpConnRes LPNETRESOURCEW FdwFlags DWORD FdwDevNum DWORD } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:137:11 */ type CONNECTDLGSTRUCTW = _CONNECTDLGSTRUCTW /* /usr/x86_64-w64-mingw32/include/winnetwk.h:143:5 */ type LPCONNECTDLGSTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:143:23 */ type CONNECTDLGSTRUCT = CONNECTDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:145:3 */ type LPCONNECTDLGSTRUCT = LPCONNECTDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:146:3 */ type _DISCDLGSTRUCTA = struct { FcbStructure DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FlpLocalName LPSTR FlpRemoteName LPSTR FdwFlags DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:161:11 */ type DISCDLGSTRUCTA = _DISCDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:167:5 */ type LPDISCDLGSTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:167:20 */ type _DISCDLGSTRUCTW = struct { FcbStructure DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FlpLocalName LPWSTR FlpRemoteName LPWSTR FdwFlags DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:169:11 */ type DISCDLGSTRUCTW = _DISCDLGSTRUCTW /* /usr/x86_64-w64-mingw32/include/winnetwk.h:175:5 */ type LPDISCDLGSTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:175:20 */ type DISCDLGSTRUCT = DISCDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:177:3 */ type LPDISCDLGSTRUCT = LPDISCDLGSTRUCTA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:178:3 */ type _UNIVERSAL_NAME_INFOA = struct{ FlpUniversalName LPSTR } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:204:11 */ type UNIVERSAL_NAME_INFOA = _UNIVERSAL_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:206:5 */ type LPUNIVERSAL_NAME_INFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:206:26 */ type _UNIVERSAL_NAME_INFOW = struct{ FlpUniversalName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:208:11 */ type UNIVERSAL_NAME_INFOW = _UNIVERSAL_NAME_INFOW /* /usr/x86_64-w64-mingw32/include/winnetwk.h:210:5 */ type LPUNIVERSAL_NAME_INFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:210:26 */ type UNIVERSAL_NAME_INFO = UNIVERSAL_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:212:3 */ type LPUNIVERSAL_NAME_INFO = LPUNIVERSAL_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:213:3 */ type _REMOTE_NAME_INFOA = struct { FlpUniversalName LPSTR FlpConnectionName LPSTR FlpRemainingPath LPSTR } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:215:11 */ type REMOTE_NAME_INFOA = _REMOTE_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:219:5 */ type LPREMOTE_NAME_INFOA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:219:23 */ type _REMOTE_NAME_INFOW = struct { FlpUniversalName LPWSTR FlpConnectionName LPWSTR FlpRemainingPath LPWSTR } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:221:11 */ type REMOTE_NAME_INFOW = _REMOTE_NAME_INFOW /* /usr/x86_64-w64-mingw32/include/winnetwk.h:225:5 */ type LPREMOTE_NAME_INFOW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:225:23 */ type REMOTE_NAME_INFO = REMOTE_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:227:3 */ type LPREMOTE_NAME_INFO = LPREMOTE_NAME_INFOA /* /usr/x86_64-w64-mingw32/include/winnetwk.h:228:3 */ type _NETINFOSTRUCT = struct { FcbStructure DWORD FdwProviderVersion DWORD FdwStatus DWORD FdwCharacteristics DWORD FdwHandle ULONG_PTR FwNetType WORD F__ccgo_pad1 [2]byte FdwPrinters DWORD FdwDrives DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:247:11 */ type NETINFOSTRUCT = _NETINFOSTRUCT /* /usr/x86_64-w64-mingw32/include/winnetwk.h:256:5 */ type LPNETINFOSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:256:19 */ type PFNGETPROFILEPATHA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:267:16 */ type PFNGETPROFILEPATHW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:268:16 */ type PFNRECONCILEPROFILEA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:272:16 */ type PFNRECONCILEPROFILEW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:273:16 */ type PFNPROCESSPOLICIESA = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:280:19 */ type PFNPROCESSPOLICIESW = uintptr /* /usr/x86_64-w64-mingw32/include/winnetwk.h:281:19 */ type _NETCONNECTINFOSTRUCT = struct { FcbStructure DWORD FdwFlags DWORD FdwSpeed DWORD FdwDelay DWORD FdwOptDataSize DWORD } /* /usr/x86_64-w64-mingw32/include/winnetwk.h:335:11 */ type NETCONNECTINFOSTRUCT = _NETCONNECTINFOSTRUCT /* /usr/x86_64-w64-mingw32/include/winnetwk.h:341:5 */ type LPNETCONNECTINFOSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/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 { F__ccgo_pad1 [0]uint16 FbAppReturnCode uint16 /* unsigned short bAppReturnCode: 8, unsigned short reserved: 6, unsigned short fBusy: 1, unsigned short fAck: 1 */ } /* /usr/x86_64-w64-mingw32/include/dde.h:29:5 */ type DDEADVISE = struct { Freserved uint16 /* unsigned short reserved: 14, unsigned short fDeferUpd: 1, unsigned short fAckReq: 1 */ F__ccgo_pad1 [2]byte FcfFormat int16 } /* /usr/x86_64-w64-mingw32/include/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 */ F__ccgo_pad1 [2]byte FcfFormat int16 FValue [1]BYTE F__ccgo_pad2 [1]byte } /* /usr/x86_64-w64-mingw32/include/dde.h:40:5 */ type DDEPOKE = struct { Funused uint16 /* unsigned short unused: 13, unsigned short fRelease: 1, unsigned short fReserved: 2 */ F__ccgo_pad1 [2]byte FcfFormat int16 FValue [1]BYTE F__ccgo_pad2 [1]byte } /* /usr/x86_64-w64-mingw32/include/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 */ F__ccgo_pad1 [2]byte FcfFormat int16 } /* /usr/x86_64-w64-mingw32/include/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 */ F__ccgo_pad1 [2]byte FcfFormat int16 Frgb [1]BYTE F__ccgo_pad2 [1]byte } /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/ddeml.h:15:3 */ type HCONVLIST = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:15:3 */ type HCONV__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/ddeml.h:16:3 */ type HCONV = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:16:3 */ type HSZ__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/ddeml.h:17:3 */ type HSZ = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:17:3 */ type HDDEDATA__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/ddeml.h:18:3 */ type HDDEDATA = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:18:3 */ type tagHSZPAIR = struct { FhszSvc HSZ FhszTopic HSZ } /* /usr/x86_64-w64-mingw32/include/ddeml.h:21:11 */ type HSZPAIR = tagHSZPAIR /* /usr/x86_64-w64-mingw32/include/ddeml.h:24:5 */ type PHSZPAIR = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:24:14 */ type tagCONVCONTEXT = struct { Fcb UINT FwFlags UINT FwCountryID UINT FiCodePage int32 FdwLangID DWORD FdwSecurity DWORD Fqos SECURITY_QUALITY_OF_SERVICE } /* /usr/x86_64-w64-mingw32/include/ddeml.h:26:11 */ type CONVCONTEXT = tagCONVCONTEXT /* /usr/x86_64-w64-mingw32/include/ddeml.h:34:5 */ type PCONVCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:34:18 */ type tagCONVINFO = struct { Fcb DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FhConvList HCONVLIST FConvCtxt CONVCONTEXT F__ccgo_pad3 [4]byte Fhwnd HWND FhwndPartner HWND } /* /usr/x86_64-w64-mingw32/include/ddeml.h:36:11 */ type CONVINFO = tagCONVINFO /* /usr/x86_64-w64-mingw32/include/ddeml.h:53:5 */ type PCONVINFO = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:53:15 */ type PFNCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:155:20 */ type tagDDEML_MSG_HOOK_DATA = struct { FuiLo UINT_PTR FuiHi UINT_PTR FcbData DWORD FData [8]DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/ddeml.h:256:11 */ type DDEML_MSG_HOOK_DATA = tagDDEML_MSG_HOOK_DATA /* /usr/x86_64-w64-mingw32/include/ddeml.h:261:5 */ type PDDEML_MSG_HOOK_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:261:25 */ type tagMONMSGSTRUCT = struct { Fcb UINT F__ccgo_pad1 [4]byte FhwndTo HWND FdwTime DWORD F__ccgo_pad2 [4]byte FhTask HANDLE FwMsg UINT F__ccgo_pad3 [4]byte FwParam WPARAM FlParam LPARAM Fdmhd DDEML_MSG_HOOK_DATA } /* /usr/x86_64-w64-mingw32/include/ddeml.h:263:11 */ type MONMSGSTRUCT = tagMONMSGSTRUCT /* /usr/x86_64-w64-mingw32/include/ddeml.h:272:5 */ type PMONMSGSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:272:18 */ type tagMONCBSTRUCT = struct { Fcb UINT FdwTime DWORD FhTask HANDLE FdwRet DWORD FwType UINT FwFmt UINT F__ccgo_pad1 [4]byte FhConv HCONV Fhsz1 HSZ Fhsz2 HSZ FhData HDDEDATA FdwData1 ULONG_PTR FdwData2 ULONG_PTR Fcc CONVCONTEXT FcbData DWORD FData [8]DWORD } /* /usr/x86_64-w64-mingw32/include/ddeml.h:274:11 */ type MONCBSTRUCT = tagMONCBSTRUCT /* /usr/x86_64-w64-mingw32/include/ddeml.h:290:5 */ type PMONCBSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:290:17 */ type tagMONHSZSTRUCTA = struct { Fcb UINT FfsAction WINBOOL FdwTime DWORD F__ccgo_pad1 [4]byte Fhsz HSZ FhTask HANDLE Fstr [1]CHAR F__ccgo_pad2 [7]byte } /* /usr/x86_64-w64-mingw32/include/ddeml.h:292:11 */ type MONHSZSTRUCTA = tagMONHSZSTRUCTA /* /usr/x86_64-w64-mingw32/include/ddeml.h:299:5 */ type PMONHSZSTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:299:19 */ type tagMONHSZSTRUCTW = struct { Fcb UINT FfsAction WINBOOL FdwTime DWORD F__ccgo_pad1 [4]byte Fhsz HSZ FhTask HANDLE Fstr [1]WCHAR F__ccgo_pad2 [6]byte } /* /usr/x86_64-w64-mingw32/include/ddeml.h:301:11 */ type MONHSZSTRUCTW = tagMONHSZSTRUCTW /* /usr/x86_64-w64-mingw32/include/ddeml.h:308:5 */ type PMONHSZSTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:308:19 */ type MONHSZSTRUCT = MONHSZSTRUCTA /* /usr/x86_64-w64-mingw32/include/ddeml.h:310:3 */ type PMONHSZSTRUCT = PMONHSZSTRUCTA /* /usr/x86_64-w64-mingw32/include/ddeml.h:311:3 */ type tagMONERRSTRUCT = struct { Fcb UINT FwLastError UINT FdwTime DWORD F__ccgo_pad1 [4]byte FhTask HANDLE } /* /usr/x86_64-w64-mingw32/include/ddeml.h:318:11 */ type MONERRSTRUCT = tagMONERRSTRUCT /* /usr/x86_64-w64-mingw32/include/ddeml.h:323:5 */ type PMONERRSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/ddeml.h:325:11 */ type MONLINKSTRUCT = tagMONLINKSTRUCT /* /usr/x86_64-w64-mingw32/include/ddeml.h:338:5 */ type PMONLINKSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/ddeml.h:338:19 */ type tagMONCONVSTRUCT = struct { Fcb UINT FfConnect WINBOOL FdwTime DWORD F__ccgo_pad1 [4]byte FhTask HANDLE FhszSvc HSZ FhszTopic HSZ FhConvClient HCONV FhConvServer HCONV } /* /usr/x86_64-w64-mingw32/include/ddeml.h:340:11 */ type MONCONVSTRUCT = tagMONCONVSTRUCT /* /usr/x86_64-w64-mingw32/include/ddeml.h:349:5 */ type PMONCONVSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/mmsystem.h:28:16 */ type MMRESULT = UINT /* /usr/x86_64-w64-mingw32/include/mmsystem.h:29:16 */ type LPUINT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:35:16 */ type mmtime_tag = struct { FwType UINT Fu struct { Fms DWORD F__ccgo_pad1 [4]byte } } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:38:11 */ type MMTIME = mmtime_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:58:5 */ type PMMTIME = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:58:12 */ type NPMMTIME = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:58:26 */ type LPMMTIME = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:58:36 */ type HDRVR__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:165:3 */ type HDRVR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:165:3 */ type DRVCONFIGINFOEX1 = struct { FdwDCISize DWORD F__ccgo_pad1 [4]byte FlpszDCISectionName LPCWSTR FlpszDCIAliasName LPCWSTR FdnDevNode DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:169:11 */ type DRVCONFIGINFOEX = DRVCONFIGINFOEX1 /* /usr/x86_64-w64-mingw32/include/mmsystem.h:174:5 */ type PDRVCONFIGINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:174:21 */ type NPDRVCONFIGINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:174:44 */ type LPDRVCONFIGINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:174:63 */ type tagDRVCONFIGINFO = struct { FdwDCISize DWORD F__ccgo_pad1 [4]byte FlpszDCISectionName LPCWSTR FlpszDCIAliasName LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:192:11 */ type DRVCONFIGINFO = tagDRVCONFIGINFO /* /usr/x86_64-w64-mingw32/include/mmsystem.h:196:5 */ type PDRVCONFIGINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:196:19 */ type NPDRVCONFIGINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:196:40 */ type LPDRVCONFIGINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:196:57 */ type DRIVERPROC = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:202:19 */ type LPDRVCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:228:23 */ type PDRVCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:229:23 */ type HWAVE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:283:3 */ type HWAVE = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:283:3 */ type HWAVEIN__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:284:3 */ type HWAVEIN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:284:3 */ type HWAVEOUT__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:285:3 */ type HWAVEOUT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:285:3 */ type LPHWAVEIN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:286:19 */ type LPHWAVEOUT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:287:20 */ type LPWAVECALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:306:11 */ type WAVEHDR = wavehdr_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:315:5 */ type PWAVEHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:315:13 */ type NPWAVEHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:315:28 */ type LPWAVEHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:315:39 */ type tagWAVEOUTCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:323:11 */ type WAVEOUTCAPSA = tagWAVEOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:332:5 */ type PWAVEOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:332:18 */ type NPWAVEOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:332:33 */ type LPWAVEOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:332:49 */ type tagWAVEOUTCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:334:11 */ type WAVEOUTCAPSW = tagWAVEOUTCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:343:5 */ type PWAVEOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:343:18 */ type NPWAVEOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:343:33 */ type LPWAVEOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:343:49 */ type WAVEOUTCAPS = WAVEOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:345:3 */ type PWAVEOUTCAPS = PWAVEOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:346:3 */ type NPWAVEOUTCAPS = NPWAVEOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:347:3 */ type LPWAVEOUTCAPS = LPWAVEOUTCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:350:11 */ type WAVEOUTCAPS2A = tagWAVEOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:362:5 */ type PWAVEOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:362:19 */ type NPWAVEOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:362:35 */ type LPWAVEOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:364:11 */ type WAVEOUTCAPS2W = tagWAVEOUTCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:376:5 */ type PWAVEOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:376:19 */ type NPWAVEOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:376:35 */ type LPWAVEOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:376:52 */ type WAVEOUTCAPS2 = WAVEOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:378:3 */ type PWAVEOUTCAPS2 = PWAVEOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:379:3 */ type NPWAVEOUTCAPS2 = NPWAVEOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:380:3 */ type LPWAVEOUTCAPS2 = LPWAVEOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:381:3 */ type tagWAVEINCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:390:11 */ type WAVEINCAPSA = tagWAVEINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:398:5 */ type PWAVEINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:398:17 */ type NPWAVEINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:398:31 */ type LPWAVEINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:398:46 */ type tagWAVEINCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwFormats DWORD FwChannels WORD FwReserved1 WORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:400:11 */ type WAVEINCAPSW = tagWAVEINCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:408:5 */ type PWAVEINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:408:17 */ type NPWAVEINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:408:31 */ type LPWAVEINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:408:46 */ type WAVEINCAPS = WAVEINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:410:3 */ type PWAVEINCAPS = PWAVEINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:411:3 */ type NPWAVEINCAPS = NPWAVEINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:412:3 */ type LPWAVEINCAPS = LPWAVEINCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:415:11 */ type WAVEINCAPS2A = tagWAVEINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:426:5 */ type PWAVEINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:426:18 */ type NPWAVEINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:426:33 */ type LPWAVEINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:428:11 */ type WAVEINCAPS2W = tagWAVEINCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:439:5 */ type PWAVEINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:439:18 */ type NPWAVEINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:439:33 */ type LPWAVEINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:439:49 */ type WAVEINCAPS2 = WAVEINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:441:3 */ type PWAVEINCAPS2 = PWAVEINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:442:3 */ type NPWAVEINCAPS2 = NPWAVEINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:443:3 */ type LPWAVEINCAPS2 = LPWAVEINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:444:3 */ type waveformat_tag = struct { FwFormatTag WORD FnChannels WORD FnSamplesPerSec DWORD FnAvgBytesPerSec DWORD FnBlockAlign WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:474:11 */ type WAVEFORMAT = waveformat_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:480:5 */ type PWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:480:16 */ type NPWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:480:34 */ type LPWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:480:48 */ type pcmwaveformat_tag = struct { Fwf WAVEFORMAT FwBitsPerSample WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:484:11 */ type PCMWAVEFORMAT = pcmwaveformat_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:487:5 */ type PPCMWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:487:19 */ type NPPCMWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:487:40 */ type LPPCMWAVEFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:487:57 */ type tWAVEFORMATEX = struct { FwFormatTag WORD FnChannels WORD FnSamplesPerSec DWORD FnAvgBytesPerSec DWORD FnBlockAlign WORD FwBitsPerSample WORD FcbSize WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:493:11 */ type WAVEFORMATEX = tWAVEFORMATEX /* /usr/x86_64-w64-mingw32/include/mmsystem.h:501:5 */ type PWAVEFORMATEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:501:18 */ type NPWAVEFORMATEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:501:38 */ type LPWAVEFORMATEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:501:54 */ type LPCWAVEFORMATEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:503:30 */ type HMIDI__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:570:3 */ type HMIDI = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:570:3 */ type HMIDIIN__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:571:3 */ type HMIDIIN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:571:3 */ type HMIDIOUT__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:572:3 */ type HMIDIOUT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:572:3 */ type HMIDISTRM__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:573:3 */ type HMIDISTRM = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:573:3 */ type LPHMIDI = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:574:17 */ type LPHMIDIIN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:575:19 */ type LPHMIDIOUT = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:576:20 */ type LPHMIDISTRM = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:577:21 */ type LPMIDICALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:579:24 */ type PATCHARRAY = [128]WORD /* /usr/x86_64-w64-mingw32/include/mmsystem.h:581:16 */ type LPPATCHARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:582:16 */ type KEYARRAY = [128]WORD /* /usr/x86_64-w64-mingw32/include/mmsystem.h:583:16 */ type LPKEYARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:609:11 */ type MIDIOUTCAPSA = tagMIDIOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:619:5 */ type PMIDIOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:619:18 */ type NPMIDIOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:619:33 */ type LPMIDIOUTCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:621:11 */ type MIDIOUTCAPSW = tagMIDIOUTCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:631:5 */ type PMIDIOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:631:18 */ type NPMIDIOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:631:33 */ type LPMIDIOUTCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:631:49 */ type MIDIOUTCAPS = MIDIOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:633:3 */ type PMIDIOUTCAPS = PMIDIOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:634:3 */ type NPMIDIOUTCAPS = NPMIDIOUTCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:635:3 */ type LPMIDIOUTCAPS = LPMIDIOUTCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:638:11 */ type MIDIOUTCAPS2A = tagMIDIOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:651:5 */ type PMIDIOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:651:19 */ type NPMIDIOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:651:35 */ type LPMIDIOUTCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:653:11 */ type MIDIOUTCAPS2W = tagMIDIOUTCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:666:5 */ type PMIDIOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:666:19 */ type NPMIDIOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:666:35 */ type LPMIDIOUTCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:666:52 */ type MIDIOUTCAPS2 = MIDIOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:668:3 */ type PMIDIOUTCAPS2 = PMIDIOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:669:3 */ type NPMIDIOUTCAPS2 = NPMIDIOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:670:3 */ type LPMIDIOUTCAPS2 = LPMIDIOUTCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:671:3 */ type tagMIDIINCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:686:11 */ type MIDIINCAPSA = tagMIDIINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:692:5 */ type PMIDIINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:692:17 */ type NPMIDIINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:692:31 */ type LPMIDIINCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:692:46 */ type tagMIDIINCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:694:11 */ type MIDIINCAPSW = tagMIDIINCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:700:5 */ type PMIDIINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:700:17 */ type NPMIDIINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:700:31 */ type LPMIDIINCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:700:46 */ type MIDIINCAPS = MIDIINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:702:3 */ type PMIDIINCAPS = PMIDIINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:703:3 */ type NPMIDIINCAPS = NPMIDIINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:704:3 */ type LPMIDIINCAPS = LPMIDIINCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:705:3 */ type tagMIDIINCAPS2A = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:707:11 */ type MIDIINCAPS2A = tagMIDIINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:716:5 */ type PMIDIINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:716:18 */ type NPMIDIINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:716:33 */ type LPMIDIINCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:716:49 */ type tagMIDIINCAPS2W = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FdwSupport DWORD FManufacturerGuid GUID FProductGuid GUID FNameGuid GUID } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:718:11 */ type MIDIINCAPS2W = tagMIDIINCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:727:5 */ type PMIDIINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:727:18 */ type NPMIDIINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:727:33 */ type LPMIDIINCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:727:49 */ type MIDIINCAPS2 = MIDIINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:729:3 */ type PMIDIINCAPS2 = PMIDIINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:730:3 */ type NPMIDIINCAPS2 = NPMIDIINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:731:3 */ type LPMIDIINCAPS2 = LPMIDIINCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:732:3 */ type midihdr_tag = struct { FlpData LPSTR FdwBufferLength DWORD FdwBytesRecorded DWORD FdwUser DWORD_PTR FdwFlags DWORD F__ccgo_pad1 [4]byte FlpNext uintptr Freserved DWORD_PTR FdwOffset DWORD F__ccgo_pad2 [4]byte FdwReserved [8]DWORD_PTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:734:11 */ type MIDIHDR = midihdr_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:744:5 */ type PMIDIHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:744:13 */ type NPMIDIHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:744:28 */ type LPMIDIHDR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:744:39 */ type midievent_tag = struct { FdwDeltaTime DWORD FdwStreamID DWORD FdwEvent DWORD FdwParms [1]DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:746:11 */ type MIDIEVENT = midievent_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:751:5 */ type midistrmbuffver_tag = struct { FdwVersion DWORD FdwMid DWORD FdwOEMVersion DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:753:11 */ type MIDISTRMBUFFVER = midistrmbuffver_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:757:5 */ type midiproptimediv_tag = struct { FcbStruct DWORD FdwTimeDiv DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:787:11 */ type MIDIPROPTIMEDIV = midiproptimediv_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:790:5 */ type LPMIDIPROPTIMEDIV = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:790:21 */ type midiproptempo_tag = struct { FcbStruct DWORD FdwTempo DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:792:11 */ type MIDIPROPTEMPO = midiproptempo_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:795:5 */ type LPMIDIPROPTEMPO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:795:19 */ type tagAUXCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:858:11 */ type AUXCAPSA = tagAUXCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:866:5 */ type PAUXCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:866:14 */ type NPAUXCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:866:25 */ type LPAUXCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:866:37 */ type tagAUXCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FwTechnology WORD FwReserved1 WORD FdwSupport DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:868:11 */ type AUXCAPSW = tagAUXCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:876:5 */ type PAUXCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:876:14 */ type NPAUXCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:876:25 */ type LPAUXCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:876:37 */ type AUXCAPS = AUXCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:878:3 */ type PAUXCAPS = PAUXCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:879:3 */ type NPAUXCAPS = NPAUXCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:880:3 */ type LPAUXCAPS = LPAUXCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:883:11 */ type AUXCAPS2A = tagAUXCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:894:5 */ type PAUXCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:894:15 */ type NPAUXCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:894:27 */ type LPAUXCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:896:11 */ type AUXCAPS2W = tagAUXCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:907:5 */ type PAUXCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:907:15 */ type NPAUXCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:907:27 */ type LPAUXCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:907:40 */ type AUXCAPS2 = AUXCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:909:3 */ type PAUXCAPS2 = PAUXCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:910:3 */ type NPAUXCAPS2 = NPAUXCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:911:3 */ type LPAUXCAPS2 = LPAUXCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:912:3 */ type HMIXEROBJ__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:933:3 */ type HMIXEROBJ = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:933:3 */ type LPHMIXEROBJ = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:934:21 */ type HMIXER__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:936:3 */ type HMIXER = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:936:3 */ type LPHMIXER = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:937:18 */ type tagMIXERCAPSA = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]CHAR FfdwSupport DWORD FcDestinations DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:962:11 */ type MIXERCAPSA = tagMIXERCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:969:5 */ type PMIXERCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:969:16 */ type LPMIXERCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:969:29 */ type tagMIXERCAPSW = struct { FwMid WORD FwPid WORD FvDriverVersion MMVERSION FszPname [32]WCHAR FfdwSupport DWORD FcDestinations DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:971:11 */ type MIXERCAPSW = tagMIXERCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:978:5 */ type PMIXERCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:978:16 */ type LPMIXERCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:978:29 */ type MIXERCAPS = MIXERCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:980:3 */ type PMIXERCAPS = PMIXERCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:981:3 */ type LPMIXERCAPS = LPMIXERCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:984:11 */ type MIXERCAPS2A = tagMIXERCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:994:5 */ type PMIXERCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:994:17 */ type LPMIXERCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:996:11 */ type MIXERCAPS2W = tagMIXERCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1006:5 */ type PMIXERCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1006:17 */ type LPMIXERCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1006:31 */ type MIXERCAPS2 = MIXERCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1008:3 */ type PMIXERCAPS2 = PMIXERCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1009:3 */ type LPMIXERCAPS2 = LPMIXERCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1010:3 */ type tagMIXERLINEA = struct { FcbStruct DWORD FdwDestination DWORD FdwSource DWORD FdwLineID DWORD FfdwLine DWORD F__ccgo_pad1 [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 } } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1021:11 */ type MIXERLINEA = tagMIXERLINEA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1042:5 */ type PMIXERLINEA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1042:16 */ type LPMIXERLINEA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1042:29 */ type tagMIXERLINEW = struct { FcbStruct DWORD FdwDestination DWORD FdwSource DWORD FdwLineID DWORD FfdwLine DWORD F__ccgo_pad1 [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 } } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1044:11 */ type MIXERLINEW = tagMIXERLINEW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1065:5 */ type PMIXERLINEW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1065:16 */ type LPMIXERLINEW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1065:29 */ type MIXERLINE = MIXERLINEA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1067:3 */ type PMIXERLINE = PMIXERLINEA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1068:3 */ type LPMIXERLINE = LPMIXERLINEA /* /usr/x86_64-w64-mingw32/include/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 } F__ccgo_pad1 [16]byte } FMetrics struct { FcSteps DWORD F__ccgo_pad1 [20]byte } } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1122:11 */ type MIXERCONTROLA = tagMIXERCONTROLA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1146:5 */ type PMIXERCONTROLA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1146:19 */ type LPMIXERCONTROLA = uintptr /* /usr/x86_64-w64-mingw32/include/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 } F__ccgo_pad1 [16]byte } FMetrics struct { FcSteps DWORD F__ccgo_pad1 [20]byte } } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1148:11 */ type MIXERCONTROLW = tagMIXERCONTROLW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1172:5 */ type PMIXERCONTROLW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1172:19 */ type LPMIXERCONTROLW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1172:35 */ type MIXERCONTROL = MIXERCONTROLA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1174:3 */ type PMIXERCONTROL = PMIXERCONTROLA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1175:3 */ type LPMIXERCONTROL = LPMIXERCONTROLA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1176:3 */ type tagMIXERLINECONTROLSA = struct { FcbStruct DWORD FdwLineID DWORD Fu struct{ FdwControlID DWORD } FcControls DWORD Fcbmxctrl DWORD F__ccgo_pad1 [4]byte Fpamxctrl LPMIXERCONTROLA } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1245:11 */ type MIXERLINECONTROLSA = tagMIXERLINECONTROLSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1255:5 */ type PMIXERLINECONTROLSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1255:24 */ type LPMIXERLINECONTROLSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1255:45 */ type tagMIXERLINECONTROLSW = struct { FcbStruct DWORD FdwLineID DWORD Fu struct{ FdwControlID DWORD } FcControls DWORD Fcbmxctrl DWORD F__ccgo_pad1 [4]byte Fpamxctrl LPMIXERCONTROLW } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1257:11 */ type MIXERLINECONTROLSW = tagMIXERLINECONTROLSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1267:5 */ type PMIXERLINECONTROLSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1267:24 */ type LPMIXERLINECONTROLSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1267:45 */ type MIXERLINECONTROLS = MIXERLINECONTROLSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1269:3 */ type PMIXERLINECONTROLS = PMIXERLINECONTROLSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1270:3 */ type LPMIXERLINECONTROLS = LPMIXERLINECONTROLSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1271:3 */ type tMIXERCONTROLDETAILS = struct { FcbStruct DWORD FdwControlID DWORD FcChannels DWORD F__ccgo_pad1 [4]byte Fu struct{ FhwndOwner HWND } FcbDetails DWORD F__ccgo_pad2 [4]byte FpaDetails LPVOID } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1284:11 */ type MIXERCONTROLDETAILS = tMIXERCONTROLDETAILS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1294:5 */ type PMIXERCONTROLDETAILS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1294:25 */ type LPMIXERCONTROLDETAILS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1294:47 */ type tagMIXERCONTROLDETAILS_LISTTEXTA = struct { FdwParam1 DWORD FdwParam2 DWORD FszName [64]CHAR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1296:11 */ type MIXERCONTROLDETAILS_LISTTEXTA = tagMIXERCONTROLDETAILS_LISTTEXTA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1300:5 */ type PMIXERCONTROLDETAILS_LISTTEXTA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1300:35 */ type LPMIXERCONTROLDETAILS_LISTTEXTA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1300:67 */ type tagMIXERCONTROLDETAILS_LISTTEXTW = struct { FdwParam1 DWORD FdwParam2 DWORD FszName [64]WCHAR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1301:11 */ type MIXERCONTROLDETAILS_LISTTEXTW = tagMIXERCONTROLDETAILS_LISTTEXTW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1305:5 */ type PMIXERCONTROLDETAILS_LISTTEXTW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1305:35 */ type LPMIXERCONTROLDETAILS_LISTTEXTW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1305:67 */ type MIXERCONTROLDETAILS_LISTTEXT = MIXERCONTROLDETAILS_LISTTEXTA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1307:3 */ type PMIXERCONTROLDETAILS_LISTTEXT = PMIXERCONTROLDETAILS_LISTTEXTA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1308:3 */ type LPMIXERCONTROLDETAILS_LISTTEXT = LPMIXERCONTROLDETAILS_LISTTEXTA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1309:3 */ type tMIXERCONTROLDETAILS_BOOLEAN = struct{ FfValue LONG } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1311:11 */ type MIXERCONTROLDETAILS_BOOLEAN = tMIXERCONTROLDETAILS_BOOLEAN /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1313:5 */ type PMIXERCONTROLDETAILS_BOOLEAN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1313:33 */ type LPMIXERCONTROLDETAILS_BOOLEAN = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1313:63 */ type tMIXERCONTROLDETAILS_SIGNED = struct{ FlValue LONG } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1315:11 */ type MIXERCONTROLDETAILS_SIGNED = tMIXERCONTROLDETAILS_SIGNED /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1317:5 */ type PMIXERCONTROLDETAILS_SIGNED = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1317:32 */ type LPMIXERCONTROLDETAILS_SIGNED = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1317:61 */ type tMIXERCONTROLDETAILS_UNSIGNED = struct{ FdwValue DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1319:11 */ type MIXERCONTROLDETAILS_UNSIGNED = tMIXERCONTROLDETAILS_UNSIGNED /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1321:5 */ type PMIXERCONTROLDETAILS_UNSIGNED = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1321:34 */ type LPMIXERCONTROLDETAILS_UNSIGNED = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1321:65 */ type LPTIMECALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1348:24 */ type timecaps_tag = struct { FwPeriodMin UINT FwPeriodMax UINT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1358:11 */ type TIMECAPS = timecaps_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1361:5 */ type PTIMECAPS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1361:14 */ type NPTIMECAPS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1361:30 */ type LPTIMECAPS = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1460:11 */ type JOYCAPSA = tagJOYCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1485:5 */ type PJOYCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1485:14 */ type NPJOYCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1485:25 */ type LPJOYCAPSA = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1487:11 */ type JOYCAPSW = tagJOYCAPSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1512:5 */ type PJOYCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1512:14 */ type NPJOYCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1512:25 */ type LPJOYCAPSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1512:37 */ type JOYCAPS = JOYCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1514:3 */ type PJOYCAPS = PJOYCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1515:3 */ type NPJOYCAPS = NPJOYCAPSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1516:3 */ type LPJOYCAPS = LPJOYCAPSA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1519:11 */ type JOYCAPS2A = tagJOYCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1547:5 */ type PJOYCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1547:15 */ type NPJOYCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1547:27 */ type LPJOYCAPS2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1549:11 */ type JOYCAPS2W = tagJOYCAPS2W /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1577:5 */ type PJOYCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1577:15 */ type NPJOYCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1577:27 */ type LPJOYCAPS2W = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1577:40 */ type JOYCAPS2 = JOYCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1579:3 */ type PJOYCAPS2 = PJOYCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1580:3 */ type NPJOYCAPS2 = NPJOYCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1581:3 */ type LPJOYCAPS2 = LPJOYCAPS2A /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1582:3 */ type joyinfo_tag = struct { FwXpos UINT FwYpos UINT FwZpos UINT FwButtons UINT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1584:11 */ type JOYINFO = joyinfo_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1589:5 */ type PJOYINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1589:13 */ type NPJOYINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1589:28 */ type LPJOYINFO = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1591:11 */ type JOYINFOEX = joyinfoex_tag /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1605:5 */ type PJOYINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1605:15 */ type NPJOYINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1605:32 */ type LPJOYINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1605:45 */ type FOURCC = DWORD /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1643:17 */ type HPSTR = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1644:22 */ type HMMIO__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1645:3 */ type HMMIO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1645:3 */ type LPMMIOPROC = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1647:20 */ type _MMIOINFO = struct { FdwFlags DWORD FfccIOProc FOURCC FpIOProc LPMMIOPROC FwErrorRet UINT F__ccgo_pad1 [4]byte Fhtask HTASK FcchBuffer LONG F__ccgo_pad2 [4]byte FpchBuffer HPSTR FpchNext HPSTR FpchEndRead HPSTR FpchEndWrite HPSTR FlBufOffset LONG FlDiskOffset LONG FadwInfo [3]DWORD FdwReserved1 DWORD FdwReserved2 DWORD F__ccgo_pad3 [4]byte Fhmmio HMMIO } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1649:11 */ type MMIOINFO = _MMIOINFO /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1666:5 */ type PMMIOINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1666:14 */ type NPMMIOINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1666:30 */ type LPMMIOINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1666:42 */ type LPCMMIOINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1668:26 */ type _MMCKINFO = struct { Fckid FOURCC Fcksize DWORD FfccType FOURCC FdwDataOffset DWORD FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1670:11 */ type MMCKINFO = _MMCKINFO /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1676:5 */ type PMMCKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1676:14 */ type NPMMCKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1676:30 */ type LPMMCKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1676:42 */ type LPCMMCKINFO = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1678:26 */ type MCIERROR = DWORD /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1781:17 */ type MCIDEVICEID = UINT /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1786:16 */ type YIELDPROC = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:1789:16 */ type tagMCI_GENERIC_PARMS = struct{ FdwCallback DWORD_PTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2072:11 */ type MCI_GENERIC_PARMS = tagMCI_GENERIC_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2074:5 */ type PMCI_GENERIC_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2074:23 */ type LPMCI_GENERIC_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2074:43 */ type tagMCI_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2076:11 */ type MCI_OPEN_PARMSA = tagMCI_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2082:5 */ type PMCI_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2082:21 */ type LPMCI_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2082:39 */ type tagMCI_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2084:11 */ type MCI_OPEN_PARMSW = tagMCI_OPEN_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2090:5 */ type PMCI_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2090:21 */ type LPMCI_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2090:39 */ type MCI_OPEN_PARMS = MCI_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2092:3 */ type PMCI_OPEN_PARMS = PMCI_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2093:3 */ type LPMCI_OPEN_PARMS = LPMCI_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2094:3 */ type tagMCI_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2096:11 */ type MCI_PLAY_PARMS = tagMCI_PLAY_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2100:5 */ type PMCI_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2100:20 */ type LPMCI_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2100:37 */ type tagMCI_SEEK_PARMS = struct { FdwCallback DWORD_PTR FdwTo DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2102:11 */ type MCI_SEEK_PARMS = tagMCI_SEEK_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2105:5 */ type PMCI_SEEK_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2105:20 */ type LPMCI_SEEK_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2105:37 */ type tagMCI_STATUS_PARMS = struct { FdwCallback DWORD_PTR FdwReturn DWORD_PTR FdwItem DWORD FdwTrack DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2107:11 */ type MCI_STATUS_PARMS = tagMCI_STATUS_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2112:5 */ type PMCI_STATUS_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2112:22 */ type LPMCI_STATUS_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2112:41 */ type tagMCI_INFO_PARMSA = struct { FdwCallback DWORD_PTR FlpstrReturn LPSTR FdwRetSize DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2114:11 */ type MCI_INFO_PARMSA = tagMCI_INFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2118:5 */ type LPMCI_INFO_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2118:21 */ type tagMCI_INFO_PARMSW = struct { FdwCallback DWORD_PTR FlpstrReturn LPWSTR FdwRetSize DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2119:11 */ type MCI_INFO_PARMSW = tagMCI_INFO_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2123:5 */ type LPMCI_INFO_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2123:21 */ type MCI_INFO_PARMS = MCI_INFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2125:3 */ type LPMCI_INFO_PARMS = LPMCI_INFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2126:3 */ type tagMCI_GETDEVCAPS_PARMS = struct { FdwCallback DWORD_PTR FdwReturn DWORD FdwItem DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2128:11 */ type MCI_GETDEVCAPS_PARMS = tagMCI_GETDEVCAPS_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2132:5 */ type PMCI_GETDEVCAPS_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2132:26 */ type LPMCI_GETDEVCAPS_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2132:49 */ type tagMCI_SYSINFO_PARMSA = struct { FdwCallback DWORD_PTR FlpstrReturn LPSTR FdwRetSize DWORD FdwNumber DWORD FwDeviceType UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2134:11 */ type MCI_SYSINFO_PARMSA = tagMCI_SYSINFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2140:5 */ type PMCI_SYSINFO_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2140:24 */ type LPMCI_SYSINFO_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2140:45 */ type tagMCI_SYSINFO_PARMSW = struct { FdwCallback DWORD_PTR FlpstrReturn LPWSTR FdwRetSize DWORD FdwNumber DWORD FwDeviceType UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2142:11 */ type MCI_SYSINFO_PARMSW = tagMCI_SYSINFO_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2148:5 */ type PMCI_SYSINFO_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2148:24 */ type LPMCI_SYSINFO_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2148:45 */ type MCI_SYSINFO_PARMS = MCI_SYSINFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2150:3 */ type PMCI_SYSINFO_PARMS = PMCI_SYSINFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2151:3 */ type LPMCI_SYSINFO_PARMS = LPMCI_SYSINFO_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2152:3 */ type tagMCI_SET_PARMS = struct { FdwCallback DWORD_PTR FdwTimeFormat DWORD FdwAudio DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2154:11 */ type MCI_SET_PARMS = tagMCI_SET_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2158:5 */ type PMCI_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2158:19 */ type LPMCI_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2158:35 */ type tagMCI_BREAK_PARMS = struct { FdwCallback DWORD_PTR FnVirtKey int32 F__ccgo_pad1 [4]byte FhwndBreak HWND } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2160:11 */ type MCI_BREAK_PARMS = tagMCI_BREAK_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2164:5 */ type PMCI_BREAK_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2164:21 */ type LPMCI_BREAK_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2164:39 */ type tagMCI_SAVE_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2166:11 */ type MCI_SAVE_PARMSA = tagMCI_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2169:5 */ type PMCI_SAVE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2169:21 */ type LPMCI_SAVE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2169:39 */ type tagMCI_SAVE_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2171:11 */ type MCI_SAVE_PARMSW = tagMCI_SAVE_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2174:5 */ type PMCI_SAVE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2174:21 */ type LPMCI_SAVE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2174:39 */ type MCI_SAVE_PARMS = MCI_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2176:3 */ type PMCI_SAVE_PARMS = PMCI_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2177:3 */ type LPMCI_SAVE_PARMS = LPMCI_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2178:3 */ type tagMCI_LOAD_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2180:11 */ type MCI_LOAD_PARMSA = tagMCI_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2183:5 */ type PMCI_LOAD_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2183:21 */ type LPMCI_LOAD_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2183:39 */ type tagMCI_LOAD_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2185:11 */ type MCI_LOAD_PARMSW = tagMCI_LOAD_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2188:5 */ type PMCI_LOAD_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2188:21 */ type LPMCI_LOAD_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2188:39 */ type MCI_LOAD_PARMS = MCI_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2190:3 */ type PMCI_LOAD_PARMS = PMCI_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2191:3 */ type LPMCI_LOAD_PARMS = LPMCI_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2192:3 */ type tagMCI_RECORD_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2194:11 */ type MCI_RECORD_PARMS = tagMCI_RECORD_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2198:5 */ type LPMCI_RECORD_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2198:22 */ type tagMCI_VD_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD FdwSpeed DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2238:11 */ type MCI_VD_PLAY_PARMS = tagMCI_VD_PLAY_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2243:5 */ type PMCI_VD_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2243:23 */ type LPMCI_VD_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2243:43 */ type tagMCI_VD_STEP_PARMS = struct { FdwCallback DWORD_PTR FdwFrames DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2245:11 */ type MCI_VD_STEP_PARMS = tagMCI_VD_STEP_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2248:5 */ type PMCI_VD_STEP_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2248:23 */ type LPMCI_VD_STEP_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2248:43 */ type tagMCI_VD_ESCAPE_PARMSA = struct { FdwCallback DWORD_PTR FlpstrCommand LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2250:11 */ type MCI_VD_ESCAPE_PARMSA = tagMCI_VD_ESCAPE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2253:5 */ type PMCI_VD_ESCAPE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2253:26 */ type LPMCI_VD_ESCAPE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2253:49 */ type tagMCI_VD_ESCAPE_PARMSW = struct { FdwCallback DWORD_PTR FlpstrCommand LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2255:11 */ type MCI_VD_ESCAPE_PARMSW = tagMCI_VD_ESCAPE_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2258:5 */ type PMCI_VD_ESCAPE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2258:26 */ type LPMCI_VD_ESCAPE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2258:49 */ type MCI_VD_ESCAPE_PARMS = MCI_VD_ESCAPE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2260:3 */ type PMCI_VD_ESCAPE_PARMS = PMCI_VD_ESCAPE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2261:3 */ type LPMCI_VD_ESCAPE_PARMS = LPMCI_VD_ESCAPE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2262:3 */ type tagMCI_WAVE_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwBufferSeconds DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2297:11 */ type MCI_WAVE_OPEN_PARMSA = tagMCI_WAVE_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2304:5 */ type PMCI_WAVE_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2304:26 */ type LPMCI_WAVE_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2304:49 */ type tagMCI_WAVE_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwBufferSeconds DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2306:11 */ type MCI_WAVE_OPEN_PARMSW = tagMCI_WAVE_OPEN_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2313:5 */ type PMCI_WAVE_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2313:26 */ type LPMCI_WAVE_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2313:49 */ type MCI_WAVE_OPEN_PARMS = MCI_WAVE_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2315:3 */ type PMCI_WAVE_OPEN_PARMS = PMCI_WAVE_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2316:3 */ type LPMCI_WAVE_OPEN_PARMS = LPMCI_WAVE_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2317:3 */ type tagMCI_WAVE_DELETE_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2319:11 */ type MCI_WAVE_DELETE_PARMS = tagMCI_WAVE_DELETE_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2323:5 */ type PMCI_WAVE_DELETE_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2323:27 */ type LPMCI_WAVE_DELETE_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2325:11 */ type MCI_WAVE_SET_PARMS = tagMCI_WAVE_SET_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2341:5 */ type PMCI_WAVE_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2341:24 */ type LPMCI_WAVE_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2371:11 */ type MCI_SEQ_SET_PARMS = tagMCI_SEQ_SET_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2380:5 */ type PMCI_SEQ_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2380:23 */ type LPMCI_SEQ_SET_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2380:43 */ type tagMCI_ANIM_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FhWndParent HWND } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2431:11 */ type MCI_ANIM_OPEN_PARMSA = tagMCI_ANIM_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2439:5 */ type PMCI_ANIM_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2439:26 */ type LPMCI_ANIM_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2439:49 */ type tagMCI_ANIM_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FhWndParent HWND } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2441:11 */ type MCI_ANIM_OPEN_PARMSW = tagMCI_ANIM_OPEN_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2449:5 */ type PMCI_ANIM_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2449:26 */ type LPMCI_ANIM_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2449:49 */ type MCI_ANIM_OPEN_PARMS = MCI_ANIM_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2451:3 */ type PMCI_ANIM_OPEN_PARMS = PMCI_ANIM_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2452:3 */ type LPMCI_ANIM_OPEN_PARMS = LPMCI_ANIM_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2453:3 */ type tagMCI_ANIM_PLAY_PARMS = struct { FdwCallback DWORD_PTR FdwFrom DWORD FdwTo DWORD FdwSpeed DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2455:11 */ type MCI_ANIM_PLAY_PARMS = tagMCI_ANIM_PLAY_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2460:5 */ type PMCI_ANIM_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2460:25 */ type LPMCI_ANIM_PLAY_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2460:47 */ type tagMCI_ANIM_STEP_PARMS = struct { FdwCallback DWORD_PTR FdwFrames DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2462:11 */ type MCI_ANIM_STEP_PARMS = tagMCI_ANIM_STEP_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2465:5 */ type PMCI_ANIM_STEP_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2465:25 */ type LPMCI_ANIM_STEP_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2465:47 */ type tagMCI_ANIM_WINDOW_PARMSA = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT F__ccgo_pad1 [4]byte FlpstrText LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2467:11 */ type MCI_ANIM_WINDOW_PARMSA = tagMCI_ANIM_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2472:5 */ type PMCI_ANIM_WINDOW_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2472:28 */ type LPMCI_ANIM_WINDOW_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2472:53 */ type tagMCI_ANIM_WINDOW_PARMSW = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT F__ccgo_pad1 [4]byte FlpstrText LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2474:11 */ type MCI_ANIM_WINDOW_PARMSW = tagMCI_ANIM_WINDOW_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2479:5 */ type PMCI_ANIM_WINDOW_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2479:28 */ type LPMCI_ANIM_WINDOW_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2479:53 */ type MCI_ANIM_WINDOW_PARMS = MCI_ANIM_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2481:3 */ type PMCI_ANIM_WINDOW_PARMS = PMCI_ANIM_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2482:3 */ type LPMCI_ANIM_WINDOW_PARMS = LPMCI_ANIM_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2483:3 */ type tagMCI_ANIM_RECT_PARMS = struct { FdwCallback DWORD_PTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2485:11 */ type MCI_ANIM_RECT_PARMS = tagMCI_ANIM_RECT_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2493:5 */ type PMCI_ANIM_RECT_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2495:31 */ type LPMCI_ANIM_RECT_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2496:31 */ type tagMCI_ANIM_UPDATE_PARMS = struct { FdwCallback DWORD_PTR Frc RECT FhDC HDC } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2498:11 */ type MCI_ANIM_UPDATE_PARMS = tagMCI_ANIM_UPDATE_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2502:5 */ type PMCI_ANIM_UPDATE_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2502:27 */ type LPMCI_ANIM_UPDATE_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2502:51 */ type tagMCI_OVLY_OPEN_PARMSA = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCSTR FlpstrElementName LPCSTR FlpstrAlias LPCSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FhWndParent HWND } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2535:11 */ type MCI_OVLY_OPEN_PARMSA = tagMCI_OVLY_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2543:5 */ type PMCI_OVLY_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2543:26 */ type LPMCI_OVLY_OPEN_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2543:49 */ type tagMCI_OVLY_OPEN_PARMSW = struct { FdwCallback DWORD_PTR FwDeviceID MCIDEVICEID F__ccgo_pad1 [4]byte FlpstrDeviceType LPCWSTR FlpstrElementName LPCWSTR FlpstrAlias LPCWSTR FdwStyle DWORD F__ccgo_pad2 [4]byte FhWndParent HWND } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2545:11 */ type MCI_OVLY_OPEN_PARMSW = tagMCI_OVLY_OPEN_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2553:5 */ type PMCI_OVLY_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2553:26 */ type LPMCI_OVLY_OPEN_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2553:49 */ type MCI_OVLY_OPEN_PARMS = MCI_OVLY_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2555:3 */ type PMCI_OVLY_OPEN_PARMS = PMCI_OVLY_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2556:3 */ type LPMCI_OVLY_OPEN_PARMS = LPMCI_OVLY_OPEN_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2557:3 */ type tagMCI_OVLY_WINDOW_PARMSA = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT F__ccgo_pad1 [4]byte FlpstrText LPCSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2559:11 */ type MCI_OVLY_WINDOW_PARMSA = tagMCI_OVLY_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2564:5 */ type PMCI_OVLY_WINDOW_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2564:28 */ type LPMCI_OVLY_WINDOW_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2564:53 */ type tagMCI_OVLY_WINDOW_PARMSW = struct { FdwCallback DWORD_PTR FhWnd HWND FnCmdShow UINT F__ccgo_pad1 [4]byte FlpstrText LPCWSTR } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2566:11 */ type MCI_OVLY_WINDOW_PARMSW = tagMCI_OVLY_WINDOW_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2571:5 */ type PMCI_OVLY_WINDOW_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2571:28 */ type LPMCI_OVLY_WINDOW_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2571:53 */ type MCI_OVLY_WINDOW_PARMS = MCI_OVLY_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2573:3 */ type PMCI_OVLY_WINDOW_PARMS = PMCI_OVLY_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2574:3 */ type LPMCI_OVLY_WINDOW_PARMS = LPMCI_OVLY_WINDOW_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2575:3 */ type tagMCI_OVLY_RECT_PARMS = struct { FdwCallback DWORD_PTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2577:11 */ type MCI_OVLY_RECT_PARMS = tagMCI_OVLY_RECT_PARMS /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2585:5 */ type PMCI_OVLY_RECT_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2585:25 */ type LPMCI_OVLY_RECT_PARMS = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2585:47 */ type tagMCI_OVLY_SAVE_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2587:11 */ type MCI_OVLY_SAVE_PARMSA = tagMCI_OVLY_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2591:5 */ type PMCI_OVLY_SAVE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2591:26 */ type LPMCI_OVLY_SAVE_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2591:49 */ type tagMCI_OVLY_SAVE_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2593:11 */ type MCI_OVLY_SAVE_PARMSW = tagMCI_OVLY_SAVE_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2597:5 */ type PMCI_OVLY_SAVE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2597:26 */ type LPMCI_OVLY_SAVE_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2597:49 */ type MCI_OVLY_SAVE_PARMS = MCI_OVLY_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2599:3 */ type PMCI_OVLY_SAVE_PARMS = PMCI_OVLY_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2600:3 */ type LPMCI_OVLY_SAVE_PARMS = LPMCI_OVLY_SAVE_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2601:3 */ type tagMCI_OVLY_LOAD_PARMSA = struct { FdwCallback DWORD_PTR Flpfilename LPCSTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2603:11 */ type MCI_OVLY_LOAD_PARMSA = tagMCI_OVLY_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2607:5 */ type PMCI_OVLY_LOAD_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2607:26 */ type LPMCI_OVLY_LOAD_PARMSA = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2607:49 */ type tagMCI_OVLY_LOAD_PARMSW = struct { FdwCallback DWORD_PTR Flpfilename LPCWSTR Frc RECT } /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2609:11 */ type MCI_OVLY_LOAD_PARMSW = tagMCI_OVLY_LOAD_PARMSW /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2613:5 */ type PMCI_OVLY_LOAD_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2613:26 */ type LPMCI_OVLY_LOAD_PARMSW = uintptr /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2613:49 */ type MCI_OVLY_LOAD_PARMS = MCI_OVLY_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2615:3 */ type PMCI_OVLY_LOAD_PARMS = PMCI_OVLY_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/mmsystem.h:2616:3 */ type LPMCI_OVLY_LOAD_PARMS = LPMCI_OVLY_LOAD_PARMSA /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [4]byte Fncb_buffer PUCHAR Fncb_length WORD Fncb_callname [16]UCHAR Fncb_name [16]UCHAR Fncb_rto UCHAR Fncb_sto UCHAR F__ccgo_pad2 [4]byte Fncb_post uintptr Fncb_lana_num UCHAR Fncb_cmd_cplt UCHAR Fncb_reserve [18]UCHAR F__ccgo_pad3 [4]byte Fncb_event HANDLE } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/nb30.h:37:5 */ type PNCB = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/nb30.h:39:11 */ type ADAPTER_STATUS = _ADAPTER_STATUS /* /usr/x86_64-w64-mingw32/include/nb30.h:67:5 */ type PADAPTER_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/nb30.h:67:20 */ type _NAME_BUFFER = struct { Fname [16]UCHAR Fname_num UCHAR Fname_flags UCHAR } /* /usr/x86_64-w64-mingw32/include/nb30.h:69:11 */ type NAME_BUFFER = _NAME_BUFFER /* /usr/x86_64-w64-mingw32/include/nb30.h:73:5 */ type PNAME_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/nb30.h:73:17 */ type _SESSION_HEADER = struct { Fsess_name UCHAR Fnum_sess UCHAR Frcv_dg_outstanding UCHAR Frcv_any_outstanding UCHAR } /* /usr/x86_64-w64-mingw32/include/nb30.h:86:11 */ type SESSION_HEADER = _SESSION_HEADER /* /usr/x86_64-w64-mingw32/include/nb30.h:91:5 */ type PSESSION_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/nb30.h:93:11 */ type SESSION_BUFFER = _SESSION_BUFFER /* /usr/x86_64-w64-mingw32/include/nb30.h:100:5 */ type PSESSION_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/nb30.h:100:20 */ type _LANA_ENUM = struct { Flength UCHAR Flana [255]UCHAR } /* /usr/x86_64-w64-mingw32/include/nb30.h:109:11 */ type LANA_ENUM = _LANA_ENUM /* /usr/x86_64-w64-mingw32/include/nb30.h:112:5 */ type PLANA_ENUM = uintptr /* /usr/x86_64-w64-mingw32/include/nb30.h:112:15 */ type _FIND_NAME_HEADER = struct { Fnode_count WORD Freserved UCHAR Funique_group UCHAR } /* /usr/x86_64-w64-mingw32/include/nb30.h:114:11 */ type FIND_NAME_HEADER = _FIND_NAME_HEADER /* /usr/x86_64-w64-mingw32/include/nb30.h:118:5 */ type PFIND_NAME_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/nb30.h:120:11 */ type FIND_NAME_BUFFER = _FIND_NAME_BUFFER /* /usr/x86_64-w64-mingw32/include/nb30.h:127:5 */ type PFIND_NAME_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/nb30.h:127:22 */ type _ACTION_HEADER = struct { Ftransport_id ULONG Faction_code USHORT Freserved USHORT } /* /usr/x86_64-w64-mingw32/include/nb30.h:129:11 */ type ACTION_HEADER = _ACTION_HEADER /* /usr/x86_64-w64-mingw32/include/nb30.h:133:5 */ type PACTION_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpc.h:48:16 */ type RPC_STATUS = int32 /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpcdce.h:33:25 */ type RPC_WSTR = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:34:26 */ type RPC_BINDING_HANDLE = I_RPC_HANDLE /* /usr/x86_64-w64-mingw32/include/rpcdce.h:35:24 */ type Handle_t = RPC_BINDING_HANDLE /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpcdce.h:44:16 */ type _RPC_BINDING_VECTOR = struct { FCount uint32 F__ccgo_pad1 [4]byte FBindingH [1]RPC_BINDING_HANDLE } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:50:11 */ type RPC_BINDING_VECTOR = _RPC_BINDING_VECTOR /* /usr/x86_64-w64-mingw32/include/rpcdce.h:53:5 */ type _UUID_VECTOR = struct { FCount uint32 F__ccgo_pad1 [4]byte FUuid [1]uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:58:11 */ type UUID_VECTOR = _UUID_VECTOR /* /usr/x86_64-w64-mingw32/include/rpcdce.h:61:5 */ type RPC_IF_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:66:16 */ type _RPC_IF_ID = struct { FUuid UUID FVersMajor uint16 FVersMinor uint16 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:70:11 */ type RPC_IF_ID = _RPC_IF_ID /* /usr/x86_64-w64-mingw32/include/rpcdce.h:74:5 */ type _RPC_PROTSEQ_VECTORA = struct { FCount uint32 F__ccgo_pad1 [4]byte FProtseq [1]uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:124:11 */ type RPC_PROTSEQ_VECTORA = _RPC_PROTSEQ_VECTORA /* /usr/x86_64-w64-mingw32/include/rpcdce.h:127:5 */ type _RPC_PROTSEQ_VECTORW = struct { FCount uint32 F__ccgo_pad1 [4]byte FProtseq [1]uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:129:11 */ type RPC_PROTSEQ_VECTORW = _RPC_PROTSEQ_VECTORW /* /usr/x86_64-w64-mingw32/include/rpcdce.h:132:5 */ type _RPC_POLICY = struct { FLength uint32 FEndpointFlags uint32 FNICFlags uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:136:11 */ type RPC_POLICY = _RPC_POLICY /* /usr/x86_64-w64-mingw32/include/rpcdce.h:140:5 */ type PRPC_POLICY = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:140:16 */ type RPC_STATS_VECTOR = struct { FCount uint32 FStats [1]uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:151:5 */ type RPC_IF_ID_VECTOR = struct { FCount uint32 F__ccgo_pad1 [4]byte FIfId [1]uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:161:5 */ type RPC_AUTH_IDENTITY_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:257:16 */ type RPC_AUTHZ_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:258:16 */ type _RPC_SECURITY_QOS = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:311:11 */ type RPC_SECURITY_QOS = _RPC_SECURITY_QOS /* /usr/x86_64-w64-mingw32/include/rpcdce.h:316:5 */ type PRPC_SECURITY_QOS = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:316:22 */ type _SEC_WINNT_AUTH_IDENTITY_W = struct { FUser uintptr FUserLength uint32 F__ccgo_pad1 [4]byte FDomain uintptr FDomainLength uint32 F__ccgo_pad2 [4]byte FPassword uintptr FPasswordLength uint32 FFlags uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:324:11 */ type SEC_WINNT_AUTH_IDENTITY_W = _SEC_WINNT_AUTH_IDENTITY_W /* /usr/x86_64-w64-mingw32/include/rpcdce.h:332:5 */ type PSEC_WINNT_AUTH_IDENTITY_W = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:332:31 */ type _SEC_WINNT_AUTH_IDENTITY_A = struct { FUser uintptr FUserLength uint32 F__ccgo_pad1 [4]byte FDomain uintptr FDomainLength uint32 F__ccgo_pad2 [4]byte FPassword uintptr FPasswordLength uint32 FFlags uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:334:11 */ type SEC_WINNT_AUTH_IDENTITY_A = _SEC_WINNT_AUTH_IDENTITY_A /* /usr/x86_64-w64-mingw32/include/rpcdce.h:342:5 */ type PSEC_WINNT_AUTH_IDENTITY_A = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:342:31 */ type _RPC_HTTP_TRANSPORT_CREDENTIALS_W = struct { FTransportCredentials uintptr FFlags uint32 FAuthenticationTarget uint32 FNumberOfAuthnSchemes uint32 F__ccgo_pad1 [4]byte FAuthnSchemes uintptr FServerCertificateSubject uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:366:11 */ type RPC_HTTP_TRANSPORT_CREDENTIALS_W = _RPC_HTTP_TRANSPORT_CREDENTIALS_W /* /usr/x86_64-w64-mingw32/include/rpcdce.h:373:5 */ type PRPC_HTTP_TRANSPORT_CREDENTIALS_W = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:373:38 */ type _RPC_HTTP_TRANSPORT_CREDENTIALS_A = struct { FTransportCredentials uintptr FFlags uint32 FAuthenticationTarget uint32 FNumberOfAuthnSchemes uint32 F__ccgo_pad1 [4]byte FAuthnSchemes uintptr FServerCertificateSubject uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:375:11 */ type RPC_HTTP_TRANSPORT_CREDENTIALS_A = _RPC_HTTP_TRANSPORT_CREDENTIALS_A /* /usr/x86_64-w64-mingw32/include/rpcdce.h:382:5 */ type PRPC_HTTP_TRANSPORT_CREDENTIALS_A = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:382:38 */ type _RPC_SECURITY_QOS_V2_W = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 F__ccgo_pad1 [4]byte Fu struct{ FHttpCredentials uintptr } } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:384:11 */ type RPC_SECURITY_QOS_V2_W = _RPC_SECURITY_QOS_V2_W /* /usr/x86_64-w64-mingw32/include/rpcdce.h:393:5 */ type PRPC_SECURITY_QOS_V2_W = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:393:27 */ type _RPC_SECURITY_QOS_V2_A = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 F__ccgo_pad1 [4]byte Fu struct{ FHttpCredentials uintptr } } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:395:11 */ type RPC_SECURITY_QOS_V2_A = _RPC_SECURITY_QOS_V2_A /* /usr/x86_64-w64-mingw32/include/rpcdce.h:404:5 */ type PRPC_SECURITY_QOS_V2_A = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:404:27 */ type _RPC_SECURITY_QOS_V3_W = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 F__ccgo_pad1 [4]byte Fu struct{ FHttpCredentials uintptr } FSid uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:408:11 */ type RPC_SECURITY_QOS_V3_W = _RPC_SECURITY_QOS_V3_W /* /usr/x86_64-w64-mingw32/include/rpcdce.h:418:5 */ type PRPC_SECURITY_QOS_V3_W = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:418:27 */ type _RPC_SECURITY_QOS_V3_A = struct { FVersion uint32 FCapabilities uint32 FIdentityTracking uint32 FImpersonationType uint32 FAdditionalSecurityInfoType uint32 F__ccgo_pad1 [4]byte Fu struct{ FHttpCredentials uintptr } FSid uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:420:11 */ type RPC_SECURITY_QOS_V3_A = _RPC_SECURITY_QOS_V3_A /* /usr/x86_64-w64-mingw32/include/rpcdce.h:430:5 */ type PRPC_SECURITY_QOS_V3_A = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:430:27 */ type RPC_HTTP_REDIRECTOR_STAGE = uint32 /* /usr/x86_64-w64-mingw32/include/rpcdce.h:445:5 */ type RPC_NEW_HTTP_PROXY_CHANNEL = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:447:22 */ type RPC_HTTP_PROXY_FREE_STRING = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:448:16 */ type RPC_AUTH_KEY_RETRIEVAL_FN = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:471:16 */ type RPC_CLIENT_INFORMATION1 = struct { FUserName uintptr FComputerName uintptr FPrivilege uint16 F__ccgo_pad1 [2]byte FAuthFlags uint32 } /* /usr/x86_64-w64-mingw32/include/rpcdce.h:490:5 */ type PRPC_CLIENT_INFORMATION1 = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:490:29 */ type RPC_EP_INQ_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdce.h:526:24 */ type RPC_MGMT_AUTHORIZATION_FN = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:18:5 */ type _RPC_SYNTAX_IDENTIFIER = struct { FSyntaxGUID GUID FSyntaxVersion RPC_VERSION } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:20:11 */ type RPC_SYNTAX_IDENTIFIER = _RPC_SYNTAX_IDENTIFIER /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:23:5 */ type PRPC_SYNTAX_IDENTIFIER = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:23:27 */ type _RPC_MESSAGE = struct { FHandle RPC_BINDING_HANDLE FDataRepresentation uint32 F__ccgo_pad1 [4]byte FBuffer uintptr FBufferLength uint32 FProcNum uint32 FTransferSyntax PRPC_SYNTAX_IDENTIFIER FRpcInterfaceInformation uintptr FReservedForRuntime uintptr FManagerEpv uintptr FImportContext uintptr FRpcFlags uint32 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:25:11 */ type RPC_MESSAGE = _RPC_MESSAGE /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:37:5 */ type PRPC_MESSAGE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:37:17 */ type RPC_DISPATCH_FUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:77:16 */ type RPC_DISPATCH_TABLE = struct { FDispatchTableCount uint32 F__ccgo_pad1 [4]byte FDispatchTable uintptr FReserved LONG_PTR } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:83:5 */ type PRPC_DISPATCH_TABLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:83:24 */ type _RPC_PROTSEQ_ENDPOINT = struct { FRpcProtocolSequence uintptr FEndpoint uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:85:11 */ type RPC_PROTSEQ_ENDPOINT = _RPC_PROTSEQ_ENDPOINT /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:88:5 */ type PRPC_PROTSEQ_ENDPOINT = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:88:26 */ type _RPC_SERVER_INTERFACE = struct { FLength uint32 FInterfaceId RPC_SYNTAX_IDENTIFIER FTransferSyntax RPC_SYNTAX_IDENTIFIER F__ccgo_pad1 [4]byte FDispatchTable PRPC_DISPATCH_TABLE FRpcProtseqEndpointCount uint32 F__ccgo_pad2 [4]byte FRpcProtseqEndpoint PRPC_PROTSEQ_ENDPOINT FDefaultManagerEpv uintptr FInterpreterInfo uintptr FFlags uint32 F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:93:11 */ type RPC_SERVER_INTERFACE = _RPC_SERVER_INTERFACE /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:103:5 */ type PRPC_SERVER_INTERFACE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:103:26 */ type _RPC_CLIENT_INTERFACE = struct { FLength uint32 FInterfaceId RPC_SYNTAX_IDENTIFIER FTransferSyntax RPC_SYNTAX_IDENTIFIER F__ccgo_pad1 [4]byte FDispatchTable PRPC_DISPATCH_TABLE FRpcProtseqEndpointCount uint32 F__ccgo_pad2 [4]byte FRpcProtseqEndpoint PRPC_PROTSEQ_ENDPOINT FReserved ULONG_PTR FInterpreterInfo uintptr FFlags uint32 F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:105:11 */ type RPC_CLIENT_INTERFACE = _RPC_CLIENT_INTERFACE /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:115:5 */ type PRPC_CLIENT_INTERFACE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:115:26 */ type I_RPC_MUTEX = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:127:16 */ type PRPC_RUNDOWN = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:142:16 */ type _RPC_TRANSFER_SYNTAX = struct { FUuid UUID FVersMajor uint16 FVersMinor uint16 } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:175:11 */ type RPC_TRANSFER_SYNTAX = _RPC_TRANSFER_SYNTAX /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:179:5 */ type RPCLT_PDU_FILTER_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:201:16 */ type RPC_SETFILTER_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:202:16 */ type _RPC_C_OPT_METADATA_DESCRIPTOR = struct { FBufferSize uint32 F__ccgo_pad1 [4]byte FBuffer uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:222:11 */ type RPC_C_OPT_METADATA_DESCRIPTOR = _RPC_C_OPT_METADATA_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:225:5 */ type _RDR_CALLOUT_STATE = struct { FLastError RPC_STATUS F__ccgo_pad1 [4]byte FLastEEInfo uintptr FLastCalledStage RPC_HTTP_REDIRECTOR_STAGE F__ccgo_pad2 [4]byte FServerName uintptr FServerPort uintptr FRemoteUser uintptr FAuthType uintptr FResourceTypePresent uint8 FMetadataPresent uint8 FSessionIdPresent uint8 FInterfacePresent uint8 FResourceType UUID F__ccgo_pad3 [4]byte FMetadata RPC_C_OPT_METADATA_DESCRIPTOR FSessionId UUID FInterface RPC_SYNTAX_IDENTIFIER F__ccgo_pad4 [4]byte FCertContext uintptr } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:227:11 */ type RDR_CALLOUT_STATE = _RDR_CALLOUT_STATE /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:244:5 */ type I_RpcProxyIsValidMachineFn = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:246:22 */ type I_RpcProxyGetClientAddressFn = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:247:22 */ type I_RpcProxyGetConnectionTimeoutFn = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:248:22 */ type I_RpcPerformCalloutFn = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:249:22 */ type I_RpcFreeCalloutStateFn = uintptr /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:250:16 */ type tagI_RpcProxyCallbackInterface = struct { FIsValidMachineFn I_RpcProxyIsValidMachineFn FGetClientAddressFn I_RpcProxyGetClientAddressFn FGetConnectionTimeoutFn I_RpcProxyGetConnectionTimeoutFn FPerformCalloutFn I_RpcPerformCalloutFn FFreeCalloutStateFn I_RpcFreeCalloutStateFn } /* /usr/x86_64-w64-mingw32/include/rpcdcep.h:252:11 */ type I_RpcProxyCallbackInterface = tagI_RpcProxyCallbackInterface /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpcasync.h:23:5 */ type RPC_ASYNC_EVENT = uint32 /* /usr/x86_64-w64-mingw32/include/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 } F__ccgo_pad1 [16]byte } FReserved [4]LONG_PTR } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:29:3 */ type PFN_RPCNOTIFICATION_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcasync.h:32:35 */ type RPC_ASYNC_STATE = _RPC_ASYNC_STATE /* /usr/x86_64-w64-mingw32/include/rpcasync.h:63:5 */ type PRPC_ASYNC_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcasync.h:63:21 */ type ExtendedErrorParamTypes = uint32 /* /usr/x86_64-w64-mingw32/include/rpcasync.h:80:5 */ type tagBinaryParam = struct { FBuffer uintptr FSize int16 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:85:11 */ type BinaryParam = tagBinaryParam /* /usr/x86_64-w64-mingw32/include/rpcasync.h:88:5 */ type tagRPC_EE_INFO_PARAM = struct { FParameterType ExtendedErrorParamTypes F__ccgo_pad1 [4]byte Fu struct { FAnsiString LPSTR F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:90:11 */ type RPC_EE_INFO_PARAM = tagRPC_EE_INFO_PARAM /* /usr/x86_64-w64-mingw32/include/rpcasync.h:100:5 */ type tagRPC_EXTENDED_ERROR_INFO = struct { FVersion ULONG F__ccgo_pad1 [4]byte FComputerName LPWSTR FProcessID ULONG Fu struct { F__ccgo_pad1 [0]uint32 FSystemTime SYSTEMTIME } FGeneratingComponent ULONG FStatus ULONG FDetectionLocation USHORT FFlags USHORT FNumberOfParameters int32 F__ccgo_pad2 [4]byte FParameters [4]RPC_EE_INFO_PARAM } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:109:11 */ type RPC_EXTENDED_ERROR_INFO = tagRPC_EXTENDED_ERROR_INFO /* /usr/x86_64-w64-mingw32/include/rpcasync.h:123:5 */ type tagRPC_ERROR_ENUM_HANDLE = struct { FSignature ULONG F__ccgo_pad1 [4]byte FCurrentPos uintptr FHead uintptr } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:125:11 */ type RPC_ERROR_ENUM_HANDLE = tagRPC_ERROR_ENUM_HANDLE /* /usr/x86_64-w64-mingw32/include/rpcasync.h:129:5 */ type tagRPC_CALL_ATTRIBUTES_V1_W = struct { FVersion uint32 FFlags uint32 FServerPrincipalNameBufferLength uint32 F__ccgo_pad1 [4]byte FServerPrincipalName uintptr FClientPrincipalNameBufferLength uint32 F__ccgo_pad2 [4]byte FClientPrincipalName uintptr FAuthenticationLevel uint32 FAuthenticationService uint32 FNullSession WINBOOL F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:149:11 */ type RPC_CALL_ATTRIBUTES_V1_W = tagRPC_CALL_ATTRIBUTES_V1_W /* /usr/x86_64-w64-mingw32/include/rpcasync.h:159:5 */ type tagRPC_CALL_ATTRIBUTES_V1_A = struct { FVersion uint32 FFlags uint32 FServerPrincipalNameBufferLength uint32 F__ccgo_pad1 [4]byte FServerPrincipalName uintptr FClientPrincipalNameBufferLength uint32 F__ccgo_pad2 [4]byte FClientPrincipalName uintptr FAuthenticationLevel uint32 FAuthenticationService uint32 FNullSession WINBOOL F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:161:11 */ type RPC_CALL_ATTRIBUTES_V1_A = tagRPC_CALL_ATTRIBUTES_V1_A /* /usr/x86_64-w64-mingw32/include/rpcasync.h:171:5 */ type RPC_CALL_ATTRIBUTES = RPC_CALL_ATTRIBUTES_V1_A /* /usr/x86_64-w64-mingw32/include/rpcasync.h:179:34 */ type _RPC_ASYNC_NOTIFICATION_INFO = struct { FAPC struct { FNotificationRoutine PFN_RPCNOTIFICATION_ROUTINE FhThread HANDLE } F__ccgo_pad1 [16]byte } /* /usr/x86_64-w64-mingw32/include/rpcasync.h:185:9 */ type RPC_ASYNC_NOTIFICATION_INFO = _RPC_ASYNC_NOTIFICATION_INFO /* /usr/x86_64-w64-mingw32/include/rpcasync.h:202:3 */ type PRPC_ASYNC_NOTIFICATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcasync.h:202:32 */ type RpcCallType = uint32 /* /usr/x86_64-w64-mingw32/include/rpcasync.h:219:3 */ type RpcLocalAddressFormat = uint32 /* /usr/x86_64-w64-mingw32/include/rpcasync.h:225:3 */ type RPC_NOTIFICATIONS = uint32 /* /usr/x86_64-w64-mingw32/include/rpcasync.h:231:3 */ type RpcCallClientLocality = uint32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:60:3 */ type HDROP = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:60:3 */ type _DRAGINFOA = struct { FuSize UINT Fpt POINT FfNC WINBOOL FlpFileList LPSTR FgrfKeyState DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/shellapi.h:89:11 */ type DRAGINFOA = _DRAGINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:95:5 */ type LPDRAGINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:95:15 */ type _DRAGINFOW = struct { FuSize UINT Fpt POINT FfNC WINBOOL FlpFileList LPWSTR FgrfKeyState DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/shellapi.h:97:11 */ type DRAGINFOW = _DRAGINFOW /* /usr/x86_64-w64-mingw32/include/shellapi.h:103:5 */ type LPDRAGINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:103:15 */ type DRAGINFO = DRAGINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:105:3 */ type LPDRAGINFO = LPDRAGINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:106:3 */ type _AppBarData = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhWnd HWND FuCallbackMessage UINT FuEdge UINT Frc RECT FlParam LPARAM } /* /usr/x86_64-w64-mingw32/include/shellapi.h:138:11 */ type APPBARDATA = _AppBarData /* /usr/x86_64-w64-mingw32/include/shellapi.h:145:5 */ type PAPPBARDATA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:145:16 */ type FILEOP_FLAGS = WORD /* /usr/x86_64-w64-mingw32/include/shellapi.h:182:16 */ type PRINTEROP_FLAGS = WORD /* /usr/x86_64-w64-mingw32/include/shellapi.h:190:16 */ type _SHFILEOPSTRUCTA = struct { Fhwnd HWND FwFunc UINT F__ccgo_pad1 [4]byte FpFrom LPCSTR FpTo LPCSTR FfFlags FILEOP_FLAGS F__ccgo_pad2 [2]byte FfAnyOperationsAborted WINBOOL FhNameMappings LPVOID FlpszProgressTitle PCSTR } /* /usr/x86_64-w64-mingw32/include/shellapi.h:192:11 */ type SHFILEOPSTRUCTA = _SHFILEOPSTRUCTA /* /usr/x86_64-w64-mingw32/include/shellapi.h:201:5 */ type LPSHFILEOPSTRUCTA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:201:21 */ type _SHFILEOPSTRUCTW = struct { Fhwnd HWND FwFunc UINT F__ccgo_pad1 [4]byte FpFrom LPCWSTR FpTo LPCWSTR FfFlags FILEOP_FLAGS F__ccgo_pad2 [2]byte FfAnyOperationsAborted WINBOOL FhNameMappings LPVOID FlpszProgressTitle PCWSTR } /* /usr/x86_64-w64-mingw32/include/shellapi.h:203:11 */ type SHFILEOPSTRUCTW = _SHFILEOPSTRUCTW /* /usr/x86_64-w64-mingw32/include/shellapi.h:212:5 */ type LPSHFILEOPSTRUCTW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:212:21 */ type SHFILEOPSTRUCT = SHFILEOPSTRUCTA /* /usr/x86_64-w64-mingw32/include/shellapi.h:214:3 */ type LPSHFILEOPSTRUCT = LPSHFILEOPSTRUCTA /* /usr/x86_64-w64-mingw32/include/shellapi.h:215:3 */ type _SHNAMEMAPPINGA = struct { FpszOldPath LPSTR FpszNewPath LPSTR FcchOldPath int32 FcchNewPath int32 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:224:11 */ type SHNAMEMAPPINGA = _SHNAMEMAPPINGA /* /usr/x86_64-w64-mingw32/include/shellapi.h:229:5 */ type LPSHNAMEMAPPINGA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:229:20 */ type _SHNAMEMAPPINGW = struct { FpszOldPath LPWSTR FpszNewPath LPWSTR FcchOldPath int32 FcchNewPath int32 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:231:11 */ type SHNAMEMAPPINGW = _SHNAMEMAPPINGW /* /usr/x86_64-w64-mingw32/include/shellapi.h:236:5 */ type LPSHNAMEMAPPINGW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:236:20 */ type SHNAMEMAPPING = SHNAMEMAPPINGA /* /usr/x86_64-w64-mingw32/include/shellapi.h:239:3 */ type LPSHNAMEMAPPING = LPSHNAMEMAPPINGA /* /usr/x86_64-w64-mingw32/include/shellapi.h:240:3 */ type _SHELLEXECUTEINFOA = struct { FcbSize DWORD FfMask ULONG Fhwnd HWND FlpVerb LPCSTR FlpFile LPCSTR FlpParameters LPCSTR FlpDirectory LPCSTR FnShow int32 F__ccgo_pad1 [4]byte FhInstApp HINSTANCE FlpIDList uintptr FlpClass LPCSTR FhkeyClass HKEY FdwHotKey DWORD F__ccgo_pad2 [4]byte Fu struct{ FhIcon HANDLE } FhProcess HANDLE } /* /usr/x86_64-w64-mingw32/include/shellapi.h:301:11 */ type SHELLEXECUTEINFOA = _SHELLEXECUTEINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:320:5 */ type LPSHELLEXECUTEINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:320:23 */ type _SHELLEXECUTEINFOW = struct { FcbSize DWORD FfMask ULONG Fhwnd HWND FlpVerb LPCWSTR FlpFile LPCWSTR FlpParameters LPCWSTR FlpDirectory LPCWSTR FnShow int32 F__ccgo_pad1 [4]byte FhInstApp HINSTANCE FlpIDList uintptr FlpClass LPCWSTR FhkeyClass HKEY FdwHotKey DWORD F__ccgo_pad2 [4]byte Fu struct{ FhIcon HANDLE } FhProcess HANDLE } /* /usr/x86_64-w64-mingw32/include/shellapi.h:322:11 */ type SHELLEXECUTEINFOW = _SHELLEXECUTEINFOW /* /usr/x86_64-w64-mingw32/include/shellapi.h:341:5 */ type LPSHELLEXECUTEINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:341:23 */ type SHELLEXECUTEINFO = SHELLEXECUTEINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:343:3 */ type LPSHELLEXECUTEINFO = LPSHELLEXECUTEINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:344: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 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:351:11 */ type SHCREATEPROCESSINFOW = _SHCREATEPROCESSINFOW /* /usr/x86_64-w64-mingw32/include/shellapi.h:365:5 */ type PSHCREATEPROCESSINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:365:26 */ type _SHQUERYRBINFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte Fi64Size int64 Fi64NumItems int64 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:398:11 */ type SHQUERYRBINFO = _SHQUERYRBINFO /* /usr/x86_64-w64-mingw32/include/shellapi.h:402:5 */ type LPSHQUERYRBINFO = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:402:19 */ type _NOTIFYICONDATAA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhWnd HWND FuID UINT FuFlags UINT FuCallbackMessage UINT F__ccgo_pad2 [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 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:442:11 */ type NOTIFYICONDATAA = _NOTIFYICONDATAA /* /usr/x86_64-w64-mingw32/include/shellapi.h:463:5 */ type PNOTIFYICONDATAA = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:463:21 */ type _NOTIFYICONDATAW = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhWnd HWND FuID UINT FuFlags UINT FuCallbackMessage UINT F__ccgo_pad2 [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 } /* /usr/x86_64-w64-mingw32/include/shellapi.h:465:11 */ type NOTIFYICONDATAW = _NOTIFYICONDATAW /* /usr/x86_64-w64-mingw32/include/shellapi.h:486:5 */ type PNOTIFYICONDATAW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:486:21 */ type NOTIFYICONDATA = NOTIFYICONDATAA /* /usr/x86_64-w64-mingw32/include/shellapi.h:488:3 */ type PNOTIFYICONDATA = PNOTIFYICONDATAA /* /usr/x86_64-w64-mingw32/include/shellapi.h:489:3 */ type _NOTIFYICONIDENTIFIER = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhWnd HWND FuID UINT FguidItem GUID F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/shellapi.h:556:11 */ type NOTIFYICONIDENTIFIER = _NOTIFYICONIDENTIFIER /* /usr/x86_64-w64-mingw32/include/shellapi.h:561:5 */ type PNOTIFYICONIDENTIFIER = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:561:26 */ type _SHFILEINFOA = struct { FhIcon HICON FiIcon int32 FdwAttributes DWORD FszDisplayName [260]CHAR FszTypeName [80]CHAR F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/shellapi.h:575:11 */ type SHFILEINFOA = _SHFILEINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:581:5 */ type _SHFILEINFOW = struct { FhIcon HICON FiIcon int32 FdwAttributes DWORD FszDisplayName [260]WCHAR FszTypeName [80]WCHAR } /* /usr/x86_64-w64-mingw32/include/shellapi.h:583:11 */ type SHFILEINFOW = _SHFILEINFOW /* /usr/x86_64-w64-mingw32/include/shellapi.h:589:5 */ type SHFILEINFO = SHFILEINFOA /* /usr/x86_64-w64-mingw32/include/shellapi.h:591:3 */ type PFNCANSHAREFOLDERW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:860:19 */ type PFNSHOWSHAREFOLDERUIW = uintptr /* /usr/x86_64-w64-mingw32/include/shellapi.h:861: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 F__ccgo_pad1 [4]byte FPerfTime LARGE_INTEGER FPerfFreq LARGE_INTEGER FPerfTime100nSec LARGE_INTEGER FSystemNameLength DWORD FSystemNameOffset DWORD } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winperf.h:29:3 */ type PPERF_DATA_BLOCK = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winperf.h:31:9 */ type PERF_OBJECT_TYPE = _PERF_OBJECT_TYPE /* /usr/x86_64-w64-mingw32/include/winperf.h:54:3 */ type PPERF_OBJECT_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winperf.h:139:9 */ type PERF_COUNTER_DEFINITION = _PERF_COUNTER_DEFINITION /* /usr/x86_64-w64-mingw32/include/winperf.h:158:3 */ type PPERF_COUNTER_DEFINITION = uintptr /* /usr/x86_64-w64-mingw32/include/winperf.h:158:27 */ type _PERF_INSTANCE_DEFINITION = struct { FByteLength DWORD FParentObjectTitleIndex DWORD FParentObjectInstance DWORD FUniqueID LONG FNameOffset DWORD FNameLength DWORD } /* /usr/x86_64-w64-mingw32/include/winperf.h:162:9 */ type PERF_INSTANCE_DEFINITION = _PERF_INSTANCE_DEFINITION /* /usr/x86_64-w64-mingw32/include/winperf.h:169:3 */ type PPERF_INSTANCE_DEFINITION = uintptr /* /usr/x86_64-w64-mingw32/include/winperf.h:169:28 */ type _PERF_COUNTER_BLOCK = struct{ FByteLength DWORD } /* /usr/x86_64-w64-mingw32/include/winperf.h:171:9 */ type PERF_COUNTER_BLOCK = _PERF_COUNTER_BLOCK /* /usr/x86_64-w64-mingw32/include/winperf.h:174:3 */ type PPERF_COUNTER_BLOCK = uintptr /* /usr/x86_64-w64-mingw32/include/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. // * // This file has no copyright assigned and is placed in the Public 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 /* /usr/x86_64-w64-mingw32/include/_bsd_types.h:13:23 */ type U_short = uint16 /* /usr/x86_64-w64-mingw32/include/_bsd_types.h:14:24 */ type U_int = uint32 /* /usr/x86_64-w64-mingw32/include/_bsd_types.h:15:22 */ type U_long = uint32 /* /usr/x86_64-w64-mingw32/include/_bsd_types.h:18:23 */ type U_int64 = uint64 /* /usr/x86_64-w64-mingw32/include/_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 { F__ccgo_pad1 [0]uint32 FS_un_b struct { Fs_b1 U_char Fs_b2 U_char Fs_b3 U_char Fs_b4 U_char } } } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/inaddr.h:23:3 */ type PIN_ADDR = uintptr /* /usr/x86_64-w64-mingw32/include/inaddr.h:23:12 */ type LPIN_ADDR = uintptr /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 <sys/types.h> // if __USE_W32_SOCKETS not defined. type fd_set = struct { Ffd_count U_int F__ccgo_pad1 [4]byte Ffd_array [64]SOCKET } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 <sys/types.h> // if __USE_W32_SOCKETS not defined. type Fd_set = fd_set /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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_set /* /usr/x86_64-w64-mingw32/include/psdk_inc/_fd_types.h:104:23 */ type PFD_SET = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_fd_types.h:105:23 */ type LPFD_SET = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 F__ccgo_pad1 [4]byte Fh_addr_list uintptr } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:25:1 */ type netent = struct { Fn_name uintptr Fn_aliases uintptr Fn_addrtype int16 F__ccgo_pad1 [2]byte Fn_net U_long } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:33:1 */ type servent = struct { Fs_name uintptr Fs_aliases uintptr Fs_proto uintptr Fs_port int16 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:40:1 */ type protoent = struct { Fp_name uintptr Fp_aliases uintptr Fp_proto int16 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:52:1 */ type sockproto = struct { Fsp_family U_short Fsp_protocol U_short } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:58:1 */ type linger = struct { Fl_onoff U_short Fl_linger U_short } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:63:1 */ type sockaddr = struct { Fsa_family U_short Fsa_data [14]int8 } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:70:1 */ type sockaddr_in = struct { Fsin_family int16 Fsin_port U_short Fsin_addr struct { FS_un struct { F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:75:1 */ type HOSTENT = hostent /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:82:25 */ type PHOSTENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:83:25 */ type LPHOSTENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:84:25 */ type SERVENT = servent /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:86:25 */ type PSERVENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:87:25 */ type LPSERVENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:88:25 */ type PROTOENT = protoent /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:90:26 */ type PPROTOENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:91:26 */ type LPPROTOENT = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:92:26 */ type SOCKADDR = sockaddr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:94:26 */ type PSOCKADDR = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:95:26 */ type LPSOCKADDR = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:96:26 */ type SOCKADDR_IN = sockaddr_in /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:98:28 */ type PSOCKADDR_IN = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:99:28 */ type LPSOCKADDR_IN = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:100:28 */ type LINGER = linger /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:102:24 */ type PLINGER = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:103:24 */ type LPLINGER = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:104:24 */ type TIMEVAL = timeval /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:115:25 */ type PTIMEVAL = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_ip_types.h:116:25 */ type LPTIMEVAL = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 { F__ccgo_pad1 [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 { F__ccgo_pad1 [0]uint32 FS_un_b struct { Fs_b1 U_char Fs_b2 U_char Fs_b3 U_char Fs_b4 U_char } } } } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 /* /usr/x86_64-w64-mingw32/include/psdk_inc/_wsadata.h:29:3 */ type LPWSADATA = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 F__ccgo_pad1 [4]byte FTail LPVOID FTailLength DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 /* /usr/x86_64-w64-mingw32/include/psdk_inc/_xmitfile.h:15:3 */ type PTRANSMIT_FILE_BUFFERS = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_xmitfile.h:15:26 */ type LPTRANSMIT_FILE_BUFFERS = uintptr /* /usr/x86_64-w64-mingw32/include/psdk_inc/_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 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:199:24 */ // In ncrypt.h too type HCRYPTHASH = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:283:21 */ type HCRYPTKEY = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:284:21 */ type HCRYPTPROV = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:285:21 */ type _CMS_KEY_INFO = struct { FdwVersion DWORD FAlgid ALG_ID FpbOID uintptr FcbOID DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:627:11 */ type CMS_KEY_INFO = _CMS_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:632:5 */ type PCMS_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:632:18 */ type _HMAC_Info = struct { FHashAlgid ALG_ID F__ccgo_pad1 [4]byte FpbInnerString uintptr FcbInnerString DWORD F__ccgo_pad2 [4]byte FpbOuterString uintptr FcbOuterString DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:634:11 */ type HMAC_INFO = _HMAC_Info /* /usr/x86_64-w64-mingw32/include/wincrypt.h:640:5 */ type PHMAC_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:640:15 */ type _SCHANNEL_ALG = struct { FdwUse DWORD FAlgid ALG_ID FcBits DWORD FdwFlags DWORD FdwReserved DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:642:11 */ type SCHANNEL_ALG = _SCHANNEL_ALG /* /usr/x86_64-w64-mingw32/include/wincrypt.h:648:5 */ type PSCHANNEL_ALG = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:648:18 */ type _PROV_ENUMALGS = struct { FaiAlgid ALG_ID FdwBitLen DWORD FdwNameLen DWORD FszName [20]CHAR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:654:11 */ type PROV_ENUMALGS = _PROV_ENUMALGS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:659: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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:661:11 */ type PROV_ENUMALGS_EX = _PROV_ENUMALGS_EX /* /usr/x86_64-w64-mingw32/include/wincrypt.h:671:5 */ type _PUBLICKEYSTRUC = struct { FbType BYTE FbVersion BYTE Freserved WORD FaiKeyAlg ALG_ID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:673:11 */ type BLOBHEADER = _PUBLICKEYSTRUC /* /usr/x86_64-w64-mingw32/include/wincrypt.h:678:5 */ type PUBLICKEYSTRUC = _PUBLICKEYSTRUC /* /usr/x86_64-w64-mingw32/include/wincrypt.h:678:16 */ type _RSAPUBKEY = struct { Fmagic DWORD Fbitlen DWORD Fpubexp DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:680:11 */ type RSAPUBKEY = _RSAPUBKEY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:684:5 */ type _PUBKEY = struct { Fmagic DWORD Fbitlen DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:686:11 */ type DHPUBKEY = _PUBKEY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:689:5 */ type DSSPUBKEY = _PUBKEY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:689:14 */ type KEAPUBKEY = _PUBKEY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:689:24 */ type TEKPUBKEY = _PUBKEY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:689:34 */ type _DSSSEED = struct { Fcounter DWORD Fseed [20]BYTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:691:11 */ type DSSSEED = _DSSSEED /* /usr/x86_64-w64-mingw32/include/wincrypt.h:694:5 */ type _PUBKEYVER3 = struct { Fmagic DWORD FbitlenP DWORD FbitlenQ DWORD FbitlenJ DWORD FDSSSeed DSSSEED } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:696:11 */ type DHPUBKEY_VER3 = _PUBKEYVER3 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:702:5 */ type DSSPUBKEY_VER3 = _PUBKEYVER3 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:702:20 */ type _PRIVKEYVER3 = struct { Fmagic DWORD FbitlenP DWORD FbitlenQ DWORD FbitlenJ DWORD FbitlenX DWORD FDSSSeed DSSSEED } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:704:11 */ type DHPRIVKEY_VER3 = _PRIVKEYVER3 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:711:5 */ type DSSPRIVKEY_VER3 = _PRIVKEYVER3 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:711:20 */ type _KEY_TYPE_SUBTYPE = struct { FdwKeySpec DWORD FType GUID FSubtype GUID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:713:11 */ type KEY_TYPE_SUBTYPE = _KEY_TYPE_SUBTYPE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:717:5 */ type PKEY_TYPE_SUBTYPE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:717:22 */ type _CERT_FORTEZZA_DATA_PROP = struct { FSerialNumber [8]uint8 FCertIndex int32 FCertLabel [36]uint8 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:719:11 */ type CERT_FORTEZZA_DATA_PROP = _CERT_FORTEZZA_DATA_PROP /* /usr/x86_64-w64-mingw32/include/wincrypt.h:723:5 */ type _CRYPT_RC4_KEY_STATE = struct { FKey [16]uint8 FSBox [256]uint8 Fi uint8 Fj uint8 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:726:11 */ type CRYPT_RC4_KEY_STATE = _CRYPT_RC4_KEY_STATE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:731:5 */ type PCRYPT_RC4_KEY_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:731:25 */ type _CRYPT_DES_KEY_STATE = struct { FKey [8]uint8 FIV [8]uint8 FFeedback [8]uint8 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:733:11 */ type CRYPT_DES_KEY_STATE = _CRYPT_DES_KEY_STATE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:737:5 */ type PCRYPT_DES_KEY_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:737:25 */ type _CRYPT_3DES_KEY_STATE = struct { FKey [24]uint8 FIV [8]uint8 FFeedback [8]uint8 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:739:11 */ type CRYPT_3DES_KEY_STATE = _CRYPT_3DES_KEY_STATE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:743:5 */ type PCRYPT_3DES_KEY_STATE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:743:26 */ type _CRYPTOAPI_BLOB = struct { FcbData DWORD F__ccgo_pad1 [4]byte FpbData uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:769:11 */ type CRYPT_INTEGER_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:5 */ type PCRYPT_INTEGER_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:24 */ type CRYPT_UINT_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:45 */ type PCRYPT_UINT_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:61 */ type CRYPT_OBJID_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:79 */ type PCRYPT_OBJID_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:96 */ type CERT_NAME_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:115 */ type PCERT_NAME_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:130 */ type CERT_RDN_VALUE_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:147 */ type PCERT_RDN_VALUE_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:167 */ type CERT_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:189 */ type PCERT_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:199 */ type CRL_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:211 */ type PCRL_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:220 */ type DATA_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:231 */ type PDATA_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:241 */ type CRYPT_DATA_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:253 */ type PCRYPT_DATA_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:269 */ type CRYPT_HASH_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:287 */ type PCRYPT_HASH_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:303 */ type CRYPT_DIGEST_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:321 */ type PCRYPT_DIGEST_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:339 */ type CRYPT_DER_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:359 */ type PCRYPT_DER_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:374 */ type CRYPT_ATTR_BLOB = _CRYPTOAPI_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:391 */ type PCRYPT_ATTR_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:772:407 */ type _CMS_DH_KEY_INFO = struct { FdwVersion DWORD FAlgid ALG_ID FpszContentEncObjId LPSTR FPubInfo CRYPT_DATA_BLOB FpReserved uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:786:11 */ type CMS_DH_KEY_INFO = _CMS_DH_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:792:5 */ type PCMS_DH_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:792:21 */ type HCRYPTPROV_OR_NCRYPT_KEY_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:843:21 */ type HCRYPTPROV_LEGACY = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:844: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 /* /usr/x86_64-w64-mingw32/include/bcrypt.h:27:16 */ type PNTSTATUS = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:27:25 */ type __BCRYPT_KEY_LENGTHS_STRUCT = struct { FdwMinLength ULONG FdwMaxLength ULONG FdwIncrement ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:142:11 */ type BCRYPT_KEY_LENGTHS_STRUCT = __BCRYPT_KEY_LENGTHS_STRUCT /* /usr/x86_64-w64-mingw32/include/bcrypt.h:146:5 */ type BCRYPT_AUTH_TAG_LENGTHS_STRUCT = BCRYPT_KEY_LENGTHS_STRUCT /* /usr/x86_64-w64-mingw32/include/bcrypt.h:148:37 */ type _BCRYPT_OID = struct { FcbOID ULONG F__ccgo_pad1 [4]byte FpbOID PUCHAR } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:150:11 */ type BCRYPT_OID = _BCRYPT_OID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:153:5 */ type _BCRYPT_OID_LIST = struct { FdwOIDCount ULONG F__ccgo_pad1 [4]byte FpOIDs uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:155:11 */ type BCRYPT_OID_LIST = _BCRYPT_OID_LIST /* /usr/x86_64-w64-mingw32/include/bcrypt.h:158:5 */ type _BCRYPT_PKCS1_PADDING_INFO = struct{ FpszAlgId LPCWSTR } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:160:11 */ type BCRYPT_PKCS1_PADDING_INFO = _BCRYPT_PKCS1_PADDING_INFO /* /usr/x86_64-w64-mingw32/include/bcrypt.h:162:5 */ type _BCRYPT_PSS_PADDING_INFO = struct { FpszAlgId LPCWSTR FcbSalt ULONG F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:164:11 */ type BCRYPT_PSS_PADDING_INFO = _BCRYPT_PSS_PADDING_INFO /* /usr/x86_64-w64-mingw32/include/bcrypt.h:167:5 */ type _BCRYPT_OAEP_PADDING_INFO = struct { FpszAlgId LPCWSTR FpbLabel PUCHAR FcbLabel ULONG F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:169:11 */ type BCRYPT_OAEP_PADDING_INFO = _BCRYPT_OAEP_PADDING_INFO /* /usr/x86_64-w64-mingw32/include/bcrypt.h:173:5 */ type _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = struct { FcbSize ULONG FdwInfoVersion ULONG FpbNonce PUCHAR FcbNonce ULONG F__ccgo_pad1 [4]byte FpbAuthData PUCHAR FcbAuthData ULONG F__ccgo_pad2 [4]byte FpbTag PUCHAR FcbTag ULONG F__ccgo_pad3 [4]byte FpbMacContext PUCHAR FcbMacContext ULONG FcbAAD ULONG FcbData ULONGLONG FdwFlags ULONG F__ccgo_pad4 [4]byte } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:175:11 */ type BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = _BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO /* /usr/x86_64-w64-mingw32/include/bcrypt.h:189:5 */ type PBCRYPT_AUTHENTICATED_CIPHER_MODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:189:43 */ type _BCryptBuffer = struct { FcbBuffer ULONG FBufferType ULONG FpvBuffer PVOID } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:193:11 */ type BCryptBuffer = _BCryptBuffer /* /usr/x86_64-w64-mingw32/include/bcrypt.h:197:5 */ type PBCryptBuffer = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:197:18 */ type _BCryptBufferDesc = struct { FulVersion ULONG FcBuffers ULONG FpBuffers PBCryptBuffer } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:199:11 */ type BCryptBufferDesc = _BCryptBufferDesc /* /usr/x86_64-w64-mingw32/include/bcrypt.h:203:5 */ type PBCryptBufferDesc = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:203:22 */ type BCRYPT_HANDLE = PVOID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:374:15 */ type BCRYPT_ALG_HANDLE = PVOID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:375:17 */ type BCRYPT_KEY_HANDLE = PVOID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:376:17 */ type BCRYPT_HASH_HANDLE = PVOID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:377:17 */ type BCRYPT_SECRET_HANDLE = PVOID /* /usr/x86_64-w64-mingw32/include/bcrypt.h:378:17 */ type _BCRYPT_KEY_BLOB = struct{ FMagic ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:380:11 */ type BCRYPT_KEY_BLOB = _BCRYPT_KEY_BLOB /* /usr/x86_64-w64-mingw32/include/bcrypt.h:382:5 */ type _BCRYPT_RSAKEY_BLOB = struct { FMagic ULONG FBitLength ULONG FcbPublicExp ULONG FcbModulus ULONG FcbPrime1 ULONG FcbPrime2 ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:384:11 */ type BCRYPT_RSAKEY_BLOB = _BCRYPT_RSAKEY_BLOB /* /usr/x86_64-w64-mingw32/include/bcrypt.h:391:5 */ type _BCRYPT_ECCKEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:393:11 */ type BCRYPT_ECCKEY_BLOB = _BCRYPT_ECCKEY_BLOB /* /usr/x86_64-w64-mingw32/include/bcrypt.h:396:5 */ type PBCRYPT_ECCKEY_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:396:24 */ type _BCRYPT_DH_KEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:398:11 */ type BCRYPT_DH_KEY_BLOB = _BCRYPT_DH_KEY_BLOB /* /usr/x86_64-w64-mingw32/include/bcrypt.h:401:5 */ type PBCRYPT_DH_KEY_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:401:24 */ type _BCRYPT_DH_PARAMETER_HEADER = struct { FcbLength ULONG FdwMagic ULONG FcbKeyLength ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:403:11 */ type BCRYPT_DH_PARAMETER_HEADER = _BCRYPT_DH_PARAMETER_HEADER /* /usr/x86_64-w64-mingw32/include/bcrypt.h:407:5 */ type _BCRYPT_DSA_KEY_BLOB = struct { FdwMagic ULONG FcbKey ULONG FCount [4]UCHAR FSeed [20]UCHAR Fq [20]UCHAR } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:409:11 */ type BCRYPT_DSA_KEY_BLOB = _BCRYPT_DSA_KEY_BLOB /* /usr/x86_64-w64-mingw32/include/bcrypt.h:415:5 */ type PBCRYPT_DSA_KEY_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:415:25 */ type HASHALGORITHM_ENUM = uint32 /* /usr/x86_64-w64-mingw32/include/bcrypt.h:421:5 */ type DSAFIPSVERSION_ENUM = uint32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:427:11 */ type BCRYPT_DSA_KEY_BLOB_V2 = _BCRYPT_DSA_KEY_BLOB_V2 /* /usr/x86_64-w64-mingw32/include/bcrypt.h:435:5 */ type PBCRYPT_DSA_KEY_BLOB_V2 = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:435:28 */ type _BCRYPT_KEY_DATA_BLOB_HEADER = struct { FdwMagic ULONG FdwVersion ULONG FcbKeyData ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:437:11 */ type BCRYPT_KEY_DATA_BLOB_HEADER = _BCRYPT_KEY_DATA_BLOB_HEADER /* /usr/x86_64-w64-mingw32/include/bcrypt.h:441:5 */ type PBCRYPT_KEY_DATA_BLOB_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:443:11 */ type BCRYPT_DSA_PARAMETER_HEADER = _BCRYPT_DSA_PARAMETER_HEADER /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:452:11 */ type BCRYPT_DSA_PARAMETER_HEADER_V2 = _BCRYPT_DSA_PARAMETER_HEADER_V2 /* /usr/x86_64-w64-mingw32/include/bcrypt.h:461:5 */ type _BCRYPT_ALGORITHM_IDENTIFIER = struct { FpszName LPWSTR FdwClass ULONG FdwFlags ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:463:11 */ type BCRYPT_ALGORITHM_IDENTIFIER = _BCRYPT_ALGORITHM_IDENTIFIER /* /usr/x86_64-w64-mingw32/include/bcrypt.h:467:5 */ type _BCRYPT_PROVIDER_NAME = struct{ FpszProviderName LPWSTR } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:469:11 */ type BCRYPT_PROVIDER_NAME = _BCRYPT_PROVIDER_NAME /* /usr/x86_64-w64-mingw32/include/bcrypt.h:471:5 */ type _BCRYPT_INTERFACE_VERSION = struct { FMajorVersion USHORT FMinorVersion USHORT } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:473:11 */ type BCRYPT_INTERFACE_VERSION = _BCRYPT_INTERFACE_VERSION /* /usr/x86_64-w64-mingw32/include/bcrypt.h:476:5 */ type PBCRYPT_INTERFACE_VERSION = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:476:30 */ type _CRYPT_INTERFACE_REG = struct { FdwInterface ULONG FdwFlags ULONG FcFunctions ULONG F__ccgo_pad1 [4]byte FrgpszFunctions uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:478:11 */ type CRYPT_INTERFACE_REG = _CRYPT_INTERFACE_REG /* /usr/x86_64-w64-mingw32/include/bcrypt.h:483:5 */ type PCRYPT_INTERFACE_REG = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:483:25 */ type _CRYPT_IMAGE_REG = struct { FpszImage PWSTR FcInterfaces ULONG F__ccgo_pad1 [4]byte FrgpInterfaces uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:485:11 */ type CRYPT_IMAGE_REG = _CRYPT_IMAGE_REG /* /usr/x86_64-w64-mingw32/include/bcrypt.h:489:5 */ type PCRYPT_IMAGE_REG = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:489:21 */ type _CRYPT_PROVIDER_REG = struct { FcAliases ULONG F__ccgo_pad1 [4]byte FrgpszAliases uintptr FpUM PCRYPT_IMAGE_REG FpKM PCRYPT_IMAGE_REG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:491:11 */ type CRYPT_PROVIDER_REG = _CRYPT_PROVIDER_REG /* /usr/x86_64-w64-mingw32/include/bcrypt.h:496:5 */ type PCRYPT_PROVIDER_REG = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:496:24 */ type _CRYPT_PROVIDERS = struct { FcProviders ULONG F__ccgo_pad1 [4]byte FrgpszProviders uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:498:11 */ type CRYPT_PROVIDERS = _CRYPT_PROVIDERS /* /usr/x86_64-w64-mingw32/include/bcrypt.h:501:5 */ type PCRYPT_PROVIDERS = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:501:21 */ type _CRYPT_CONTEXT_CONFIG = struct { FdwFlags ULONG FdwReserved ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:503:11 */ type CRYPT_CONTEXT_CONFIG = _CRYPT_CONTEXT_CONFIG /* /usr/x86_64-w64-mingw32/include/bcrypt.h:506:5 */ type PCRYPT_CONTEXT_CONFIG = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:506:26 */ type _CRYPT_CONTEXT_FUNCTION_CONFIG = struct { FdwFlags ULONG FdwReserved ULONG } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:508:11 */ type CRYPT_CONTEXT_FUNCTION_CONFIG = _CRYPT_CONTEXT_FUNCTION_CONFIG /* /usr/x86_64-w64-mingw32/include/bcrypt.h:511:5 */ type PCRYPT_CONTEXT_FUNCTION_CONFIG = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:511:35 */ type _CRYPT_CONTEXTS = struct { FcContexts ULONG F__ccgo_pad1 [4]byte FrgpszContexts uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:513:11 */ type CRYPT_CONTEXTS = _CRYPT_CONTEXTS /* /usr/x86_64-w64-mingw32/include/bcrypt.h:516:5 */ type PCRYPT_CONTEXTS = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:516:20 */ type _CRYPT_CONTEXT_FUNCTIONS = struct { FcFunctions ULONG F__ccgo_pad1 [4]byte FrgpszFunctions uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:518:11 */ type CRYPT_CONTEXT_FUNCTIONS = _CRYPT_CONTEXT_FUNCTIONS /* /usr/x86_64-w64-mingw32/include/bcrypt.h:521:5 */ type PCRYPT_CONTEXT_FUNCTIONS = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:521:29 */ type _CRYPT_CONTEXT_FUNCTION_PROVIDERS = struct { FcProviders ULONG F__ccgo_pad1 [4]byte FrgpszProviders uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:523:11 */ type CRYPT_CONTEXT_FUNCTION_PROVIDERS = _CRYPT_CONTEXT_FUNCTION_PROVIDERS /* /usr/x86_64-w64-mingw32/include/bcrypt.h:526:5 */ type PCRYPT_CONTEXT_FUNCTION_PROVIDERS = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:526:38 */ type _CRYPT_PROPERTY_REF = struct { FpszProperty PWSTR FcbValue ULONG F__ccgo_pad1 [4]byte FpbValue PUCHAR } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:528:11 */ type CRYPT_PROPERTY_REF = _CRYPT_PROPERTY_REF /* /usr/x86_64-w64-mingw32/include/bcrypt.h:532:5 */ type PCRYPT_PROPERTY_REF = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:532:24 */ type _CRYPT_IMAGE_REF = struct { FpszImage PWSTR FdwFlags ULONG F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:534:11 */ type CRYPT_IMAGE_REF = _CRYPT_IMAGE_REF /* /usr/x86_64-w64-mingw32/include/bcrypt.h:537:5 */ type PCRYPT_IMAGE_REF = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:537:21 */ type _CRYPT_PROVIDER_REF = struct { FdwInterface ULONG F__ccgo_pad1 [4]byte FpszFunction PWSTR FpszProvider PWSTR FcProperties ULONG F__ccgo_pad2 [4]byte FrgpProperties uintptr FpUM PCRYPT_IMAGE_REF FpKM PCRYPT_IMAGE_REF } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:539:11 */ type CRYPT_PROVIDER_REF = _CRYPT_PROVIDER_REF /* /usr/x86_64-w64-mingw32/include/bcrypt.h:547:5 */ type PCRYPT_PROVIDER_REF = uintptr /* /usr/x86_64-w64-mingw32/include/bcrypt.h:547:24 */ type _CRYPT_PROVIDER_REFS = struct { FcProviders ULONG F__ccgo_pad1 [4]byte FrgpProviders uintptr } /* /usr/x86_64-w64-mingw32/include/bcrypt.h:549:11 */ type CRYPT_PROVIDER_REFS = _CRYPT_PROVIDER_REFS /* /usr/x86_64-w64-mingw32/include/bcrypt.h:552:5 */ type PCRYPT_PROVIDER_REFS = uintptr /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/ncrypt.h:138:18 */ type PFN_NCRYPT_FREE = uintptr /* /usr/x86_64-w64-mingw32/include/ncrypt.h:139:16 */ type NCRYPT_ALLOC_PARA1 = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpfnAlloc PFN_NCRYPT_ALLOC FpfnFree PFN_NCRYPT_FREE } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:141:11 */ type NCRYPT_ALLOC_PARA = NCRYPT_ALLOC_PARA1 /* /usr/x86_64-w64-mingw32/include/ncrypt.h:145:5 */ type NCryptBuffer = BCryptBuffer /* /usr/x86_64-w64-mingw32/include/ncrypt.h:147:24 */ type PNCryptBuffer = uintptr /* /usr/x86_64-w64-mingw32/include/ncrypt.h:148:24 */ type NCryptBufferDesc = BCryptBufferDesc /* /usr/x86_64-w64-mingw32/include/ncrypt.h:149:28 */ type PNCryptBufferDesc = uintptr /* /usr/x86_64-w64-mingw32/include/ncrypt.h:150:28 */ type NCRYPT_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/ncrypt.h:152:21 */ type NCRYPT_PROV_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/ncrypt.h:153:21 */ type NCRYPT_KEY_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/ncrypt.h:154:21 */ type NCRYPT_HASH_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/ncrypt.h:155:21 */ type NCRYPT_SECRET_HANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/ncrypt.h:156:21 */ type _NCryptAlgorithmName = struct { FpszName LPWSTR FdwClass DWORD FdwAlgOperations DWORD FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:202:11 */ type NCryptAlgorithmName = _NCryptAlgorithmName /* /usr/x86_64-w64-mingw32/include/ncrypt.h:207:5 */ type NCryptKeyName1 = struct { FpszName LPWSTR FpszAlgid LPWSTR FdwLegacyKeySpec DWORD FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:209:11 */ type NCryptKeyName = NCryptKeyName1 /* /usr/x86_64-w64-mingw32/include/ncrypt.h:214:5 */ type NCryptProviderName1 = struct { FpszName LPWSTR FpszComment LPWSTR } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:216:11 */ type NCryptProviderName = NCryptProviderName1 /* /usr/x86_64-w64-mingw32/include/ncrypt.h:219:5 */ type __NCRYPT_UI_POLICY = struct { FdwVersion DWORD FdwFlags DWORD FpszCreationTitle LPCWSTR FpszFriendlyName LPCWSTR FpszDescription LPCWSTR } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:335:9 */ type NCRYPT_UI_POLICY = __NCRYPT_UI_POLICY /* /usr/x86_64-w64-mingw32/include/ncrypt.h:341:5 */ type __NCRYPT_SUPPORTED_LENGTHS = struct { FdwMinLength DWORD FdwMaxLength DWORD FdwIncrement DWORD FdwDefaultLength DWORD } /* /usr/x86_64-w64-mingw32/include/ncrypt.h:343:11 */ type NCRYPT_SUPPORTED_LENGTHS = __NCRYPT_SUPPORTED_LENGTHS /* /usr/x86_64-w64-mingw32/include/ncrypt.h:348:5 */ type _CRYPT_BIT_BLOB = struct { FcbData DWORD F__ccgo_pad1 [4]byte FpbData uintptr FcUnusedBits DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:851:11 */ type CRYPT_BIT_BLOB = _CRYPT_BIT_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:855:5 */ type PCRYPT_BIT_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:855:20 */ type _CRYPT_ALGORITHM_IDENTIFIER = struct { FpszObjId LPSTR FParameters CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:857:11 */ type CRYPT_ALGORITHM_IDENTIFIER = _CRYPT_ALGORITHM_IDENTIFIER /* /usr/x86_64-w64-mingw32/include/wincrypt.h:860:5 */ type PCRYPT_ALGORITHM_IDENTIFIER = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:860:32 */ type _CRYPT_OBJID_TABLE = struct { FdwAlgId DWORD F__ccgo_pad1 [4]byte FpszObjId LPCSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1086:11 */ type CRYPT_OBJID_TABLE = _CRYPT_OBJID_TABLE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1089:5 */ type PCRYPT_OBJID_TABLE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1089:23 */ type _CRYPT_HASH_INFO = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHash CRYPT_HASH_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1091:11 */ type CRYPT_HASH_INFO = _CRYPT_HASH_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1094:5 */ type PCRYPT_HASH_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1094:21 */ type _CERT_EXTENSION = struct { FpszObjId LPSTR FfCritical WINBOOL F__ccgo_pad1 [4]byte FValue CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1098:11 */ type CERT_EXTENSION = _CERT_EXTENSION /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1102:5 */ type PCERT_EXTENSION = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1102:20 */ type PCCERT_EXTENSION = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1104:32 */ type _CRYPT_ATTRIBUTE_TYPE_VALUE = struct { FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1107:11 */ type CRYPT_ATTRIBUTE_TYPE_VALUE = _CRYPT_ATTRIBUTE_TYPE_VALUE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1110:5 */ type PCRYPT_ATTRIBUTE_TYPE_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1110:32 */ type _CRYPT_ATTRIBUTE = struct { FpszObjId LPSTR FcValue DWORD F__ccgo_pad1 [4]byte FrgValue PCRYPT_ATTR_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1112:11 */ type CRYPT_ATTRIBUTE = _CRYPT_ATTRIBUTE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1116:5 */ type PCRYPT_ATTRIBUTE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1116:21 */ type _CRYPT_ATTRIBUTES = struct { FcAttr DWORD F__ccgo_pad1 [4]byte FrgAttr PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1118:11 */ type CRYPT_ATTRIBUTES = _CRYPT_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1121:5 */ type PCRYPT_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1121:22 */ type _CERT_RDN_ATTR = struct { FpszObjId LPSTR FdwValueType DWORD F__ccgo_pad1 [4]byte FValue CERT_RDN_VALUE_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1123:11 */ type CERT_RDN_ATTR = _CERT_RDN_ATTR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1127:5 */ type PCERT_RDN_ATTR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1127:19 */ type _CERT_RDN = struct { FcRDNAttr DWORD F__ccgo_pad1 [4]byte FrgRDNAttr PCERT_RDN_ATTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1217:11 */ type CERT_RDN = _CERT_RDN /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1220:5 */ type PCERT_RDN = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1220:14 */ type _CERT_NAME_INFO = struct { FcRDN DWORD F__ccgo_pad1 [4]byte FrgRDN PCERT_RDN } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1222:11 */ type CERT_NAME_INFO = _CERT_NAME_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1225:5 */ type PCERT_NAME_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1225:20 */ type _CERT_NAME_VALUE = struct { FdwValueType DWORD F__ccgo_pad1 [4]byte FValue CERT_RDN_VALUE_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1227:11 */ type CERT_NAME_VALUE = _CERT_NAME_VALUE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1230:5 */ type PCERT_NAME_VALUE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1230:21 */ type _CERT_PUBLIC_KEY_INFO = struct { FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FPublicKey CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1233:11 */ type CERT_PUBLIC_KEY_INFO = _CERT_PUBLIC_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1236:5 */ type PCERT_PUBLIC_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1236:26 */ type _CRYPT_ECC_PRIVATE_KEY_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FPrivateKey CRYPT_DER_BLOB FszCurveOid LPSTR FPublicKey CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1244:11 */ type CRYPT_ECC_PRIVATE_KEY_INFO = _CRYPT_ECC_PRIVATE_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1249:5 */ type PCRYPT_ECC_PRIVATE_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1249:32 */ type _CRYPT_PRIVATE_KEY_INFO = struct { FVersion DWORD F__ccgo_pad1 [4]byte FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FPrivateKey CRYPT_DER_BLOB FpAttributes PCRYPT_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1253:11 */ type CRYPT_PRIVATE_KEY_INFO = _CRYPT_PRIVATE_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1258:5 */ type PCRYPT_PRIVATE_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1258:28 */ type _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = struct { FEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedPrivateKey CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1260:11 */ type CRYPT_ENCRYPTED_PRIVATE_KEY_INFO = _CRYPT_ENCRYPTED_PRIVATE_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1263:5 */ type PCRYPT_ENCRYPTED_PRIVATE_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1263:38 */ type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1265:19 */ type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1266:19 */ type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1267: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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1269:11 */ type CRYPT_PKCS8_IMPORT_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1275:5 */ type PCRYPT_PKCS8_IMPORT_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1275:31 */ type CRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = _CRYPT_PKCS8_IMPORT_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1275:60 */ type PCRYPT_PRIVATE_KEY_BLOB_AND_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1275:94 */ type _CRYPT_PKCS8_EXPORT_PARAMS = struct { FhCryptProv HCRYPTPROV FdwKeySpec DWORD F__ccgo_pad1 [4]byte FpszPrivateKeyObjId LPSTR FpEncryptPrivateKeyFunc PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC FpVoidEncryptFunc LPVOID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1277:11 */ type CRYPT_PKCS8_EXPORT_PARAMS = _CRYPT_PKCS8_EXPORT_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1283:5 */ type PCRYPT_PKCS8_EXPORT_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1283:31 */ type _CERT_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1287:11 */ type CERT_INFO = _CERT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1300:5 */ type PCERT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1300:15 */ type _CRL_ENTRY = struct { FSerialNumber CRYPT_INTEGER_BLOB FRevocationDate FILETIME FcExtension DWORD F__ccgo_pad1 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1319:11 */ type CRL_ENTRY = _CRL_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1324:5 */ type PCRL_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1324:15 */ type _CRL_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIssuer CERT_NAME_BLOB FThisUpdate FILETIME FNextUpdate FILETIME FcCRLEntry DWORD F__ccgo_pad2 [4]byte FrgCRLEntry PCRL_ENTRY FcExtension DWORD F__ccgo_pad3 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1326:11 */ type CRL_INFO = _CRL_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1336:5 */ type PCRL_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1336:14 */ type _CERT_OR_CRL_BLOB = struct { FdwChoice DWORD FcbEncoded DWORD FpbEncoded uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1344:11 */ type CERT_OR_CRL_BLOB = _CERT_OR_CRL_BLOB /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1348:5 */ type PCERT_OR_CRL_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1348:22 */ type _CERT_OR_CRL_BUNDLE = struct { FcItem DWORD F__ccgo_pad1 [4]byte FrgItem PCERT_OR_CRL_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1350:11 */ type CERT_OR_CRL_BUNDLE = _CERT_OR_CRL_BUNDLE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1353:5 */ type PCERT_OR_CRL_BUNDLE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1353:24 */ type _CERT_REQUEST_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FSubject CERT_NAME_BLOB FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO FcAttribute DWORD F__ccgo_pad2 [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1355:11 */ type CERT_REQUEST_INFO = _CERT_REQUEST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1361:5 */ type PCERT_REQUEST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1361:23 */ type _CERT_KEYGEN_REQUEST_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FSubjectPublicKeyInfo CERT_PUBLIC_KEY_INFO FpwszChallengeString LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1365:11 */ type CERT_KEYGEN_REQUEST_INFO = _CERT_KEYGEN_REQUEST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1369:5 */ type PCERT_KEYGEN_REQUEST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1369:30 */ type _CERT_SIGNED_CONTENT_INFO = struct { FToBeSigned CRYPT_DER_BLOB FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSignature CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1373:11 */ type CERT_SIGNED_CONTENT_INFO = _CERT_SIGNED_CONTENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1377:5 */ type PCERT_SIGNED_CONTENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1377:30 */ type _CTL_USAGE = struct { FcUsageIdentifier DWORD F__ccgo_pad1 [4]byte FrgpszUsageIdentifier uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1379:11 */ type CTL_USAGE = _CTL_USAGE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1382:5 */ type PCTL_USAGE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1382:15 */ type CERT_ENHKEY_USAGE = _CTL_USAGE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1382:27 */ type PCERT_ENHKEY_USAGE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1382:45 */ type PCCTL_USAGE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1384:27 */ type PCCERT_ENHKEY_USAGE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1385:35 */ type _CTL_ENTRY = struct { FSubjectIdentifier CRYPT_DATA_BLOB FcAttribute DWORD F__ccgo_pad1 [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1387:11 */ type CTL_ENTRY = _CTL_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1391:5 */ type PCTL_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1391:15 */ type _CTL_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FSubjectUsage CTL_USAGE FListIdentifier CRYPT_DATA_BLOB FSequenceNumber CRYPT_INTEGER_BLOB FThisUpdate FILETIME FNextUpdate FILETIME FSubjectAlgorithm CRYPT_ALGORITHM_IDENTIFIER FcCTLEntry DWORD F__ccgo_pad2 [4]byte FrgCTLEntry PCTL_ENTRY FcExtension DWORD F__ccgo_pad3 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1393:11 */ type CTL_INFO = _CTL_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1405:5 */ type PCTL_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1405:14 */ type _CRYPT_TIME_STAMP_REQUEST_INFO = struct { FpszTimeStampAlgorithm LPSTR FpszContentType LPSTR FContent CRYPT_OBJID_BLOB FcAttribute DWORD F__ccgo_pad1 [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1409:11 */ type CRYPT_TIME_STAMP_REQUEST_INFO = _CRYPT_TIME_STAMP_REQUEST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1415:5 */ type PCRYPT_TIME_STAMP_REQUEST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1415:35 */ type _CRYPT_ENROLLMENT_NAME_VALUE_PAIR = struct { FpwszName LPWSTR FpwszValue LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1417:11 */ type CRYPT_ENROLLMENT_NAME_VALUE_PAIR = _CRYPT_ENROLLMENT_NAME_VALUE_PAIR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1420:5 */ type PCRYPT_ENROLLMENT_NAME_VALUE_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1420:38 */ type _CRYPT_CSP_PROVIDER = struct { FdwKeySpec DWORD F__ccgo_pad1 [4]byte FpwszProviderName LPWSTR FSignature CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1422:11 */ type CRYPT_CSP_PROVIDER = _CRYPT_CSP_PROVIDER /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1426:5 */ type PCRYPT_CSP_PROVIDER = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1426:24 */ type PFN_CRYPT_ALLOC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1456:18 */ type PFN_CRYPT_FREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1457:16 */ type _CRYPT_ENCODE_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpfnAlloc PFN_CRYPT_ALLOC FpfnFree PFN_CRYPT_FREE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1459:11 */ type CRYPT_ENCODE_PARA = _CRYPT_ENCODE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1463:5 */ type PCRYPT_ENCODE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1463:23 */ type _CRYPT_DECODE_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpfnAlloc PFN_CRYPT_ALLOC FpfnFree PFN_CRYPT_FREE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1479:11 */ type CRYPT_DECODE_PARA = _CRYPT_DECODE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1483:5 */ type PCRYPT_DECODE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1483: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 F__ccgo_pad1 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1876: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 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1879:5 */ type PCERT_EXTENSIONS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1879:21 */ type _CERT_AUTHORITY_KEY_ID_INFO = struct { FKeyId CRYPT_DATA_BLOB FCertIssuer CERT_NAME_BLOB FCertSerialNumber CRYPT_INTEGER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1892:11 */ type CERT_AUTHORITY_KEY_ID_INFO = _CERT_AUTHORITY_KEY_ID_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1896:5 */ type PCERT_AUTHORITY_KEY_ID_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1896:32 */ type _CERT_PRIVATE_KEY_VALIDITY = struct { FNotBefore FILETIME FNotAfter FILETIME } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1898:11 */ type CERT_PRIVATE_KEY_VALIDITY = _CERT_PRIVATE_KEY_VALIDITY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1901:5 */ type PCERT_PRIVATE_KEY_VALIDITY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1901:31 */ type _CERT_KEY_ATTRIBUTES_INFO = struct { FKeyId CRYPT_DATA_BLOB FIntendedKeyUsage CRYPT_BIT_BLOB FpPrivateKeyUsagePeriod PCERT_PRIVATE_KEY_VALIDITY } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1903:11 */ type CERT_KEY_ATTRIBUTES_INFO = _CERT_KEY_ATTRIBUTES_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1907:5 */ type PCERT_KEY_ATTRIBUTES_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1907:30 */ type _CERT_POLICY_ID = struct { FcCertPolicyElementId DWORD F__ccgo_pad1 [4]byte FrgpszCertPolicyElementId uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1921:11 */ type CERT_POLICY_ID = _CERT_POLICY_ID /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1924:5 */ type PCERT_POLICY_ID = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1924:20 */ type _CERT_KEY_USAGE_RESTRICTION_INFO = struct { FcCertPolicyId DWORD F__ccgo_pad1 [4]byte FrgCertPolicyId PCERT_POLICY_ID FRestrictedKeyUsage CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1926:11 */ type CERT_KEY_USAGE_RESTRICTION_INFO = _CERT_KEY_USAGE_RESTRICTION_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1930:5 */ type PCERT_KEY_USAGE_RESTRICTION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1930:37 */ type _CERT_OTHER_NAME = struct { FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1932:11 */ type CERT_OTHER_NAME = _CERT_OTHER_NAME /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1935:5 */ type PCERT_OTHER_NAME = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1935:21 */ type _CERT_ALT_NAME_ENTRY = struct { FdwAltNameChoice DWORD F__ccgo_pad1 [4]byte F__8 struct { FpOtherName PCERT_OTHER_NAME F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1937:11 */ type CERT_ALT_NAME_ENTRY = _CERT_ALT_NAME_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1959:5 */ type PCERT_ALT_NAME_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1959:25 */ type _CERT_ALT_NAME_INFO = struct { FcAltEntry DWORD F__ccgo_pad1 [4]byte FrgAltEntry PCERT_ALT_NAME_ENTRY } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1971:11 */ type CERT_ALT_NAME_INFO = _CERT_ALT_NAME_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1974:5 */ type PCERT_ALT_NAME_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1974:24 */ type _CERT_BASIC_CONSTRAINTS_INFO = struct { FSubjectType CRYPT_BIT_BLOB FfPathLenConstraint WINBOOL FdwPathLenConstraint DWORD FcSubtreesConstraint DWORD F__ccgo_pad1 [4]byte FrgSubtreesConstraint uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1983:11 */ type CERT_BASIC_CONSTRAINTS_INFO = _CERT_BASIC_CONSTRAINTS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1989:5 */ type PCERT_BASIC_CONSTRAINTS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1989:34 */ type _CERT_BASIC_CONSTRAINTS2_INFO = struct { FfCA WINBOOL FfPathLenConstraint WINBOOL FdwPathLenConstraint DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1994:11 */ type CERT_BASIC_CONSTRAINTS2_INFO = _CERT_BASIC_CONSTRAINTS2_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1998:5 */ type PCERT_BASIC_CONSTRAINTS2_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:1998:34 */ type _CERT_POLICY_QUALIFIER_INFO = struct { FpszPolicyQualifierId LPSTR FQualifier CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2000:11 */ type CERT_POLICY_QUALIFIER_INFO = _CERT_POLICY_QUALIFIER_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2003:5 */ type PCERT_POLICY_QUALIFIER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2003:32 */ type _CERT_POLICY_INFO = struct { FpszPolicyIdentifier LPSTR FcPolicyQualifier DWORD F__ccgo_pad1 [4]byte FrgPolicyQualifier uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2005:11 */ type CERT_POLICY_INFO = _CERT_POLICY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2009:5 */ type PCERT_POLICY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2009:22 */ type _CERT_POLICIES_INFO = struct { FcPolicyInfo DWORD F__ccgo_pad1 [4]byte FrgPolicyInfo uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2011:11 */ type CERT_POLICIES_INFO = _CERT_POLICIES_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2014:5 */ type PCERT_POLICIES_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2014:24 */ type _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = struct { FpszOrganization LPSTR FcNoticeNumbers DWORD F__ccgo_pad1 [4]byte FrgNoticeNumbers uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2016:11 */ type CERT_POLICY_QUALIFIER_NOTICE_REFERENCE = _CERT_POLICY_QUALIFIER_NOTICE_REFERENCE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2020:5 */ type PCERT_POLICY_QUALIFIER_NOTICE_REFERENCE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2020:44 */ type _CERT_POLICY_QUALIFIER_USER_NOTICE = struct { FpNoticeReference uintptr FpszDisplayText LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2022:11 */ type CERT_POLICY_QUALIFIER_USER_NOTICE = _CERT_POLICY_QUALIFIER_USER_NOTICE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2025:5 */ type PCERT_POLICY_QUALIFIER_USER_NOTICE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2025:39 */ type _CPS_URLS = struct { FpszURL LPWSTR FpAlgorithm uintptr FpDigest uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2027:11 */ type CPS_URLS = _CPS_URLS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2031:5 */ type PCPS_URLS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2031:14 */ type _CERT_POLICY95_QUALIFIER1 = struct { FpszPracticesReference LPWSTR FpszNoticeIdentifier LPSTR FpszNSINoticeIdentifier LPSTR FcCPSURLs DWORD F__ccgo_pad1 [4]byte FrgCPSURLs uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2033:11 */ type CERT_POLICY95_QUALIFIER1 = _CERT_POLICY95_QUALIFIER1 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2039:5 */ type PCERT_POLICY95_QUALIFIER1 = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2039:30 */ type _CERT_POLICY_MAPPING = struct { FpszIssuerDomainPolicy LPSTR FpszSubjectDomainPolicy LPSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2041:11 */ type CERT_POLICY_MAPPING = _CERT_POLICY_MAPPING /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2044:5 */ type PCERT_POLICY_MAPPING = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2044:25 */ type _CERT_POLICY_MAPPINGS_INFO = struct { FcPolicyMapping DWORD F__ccgo_pad1 [4]byte FrgPolicyMapping PCERT_POLICY_MAPPING } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2046:11 */ type CERT_POLICY_MAPPINGS_INFO = _CERT_POLICY_MAPPINGS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2049:5 */ type PCERT_POLICY_MAPPINGS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2049:31 */ type _CERT_POLICY_CONSTRAINTS_INFO = struct { FfRequireExplicitPolicy WINBOOL FdwRequireExplicitPolicySkipCerts DWORD FfInhibitPolicyMapping WINBOOL FdwInhibitPolicyMappingSkipCerts DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2051:11 */ type CERT_POLICY_CONSTRAINTS_INFO = _CERT_POLICY_CONSTRAINTS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2056:5 */ type PCERT_POLICY_CONSTRAINTS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2056:34 */ type _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = struct { FpszObjId LPSTR FcValue DWORD F__ccgo_pad1 [4]byte FrgValue PCRYPT_DER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2058:11 */ type CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = _CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2062:5 */ type PCRYPT_CONTENT_INFO_SEQUENCE_OF_ANY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2062:40 */ type _CRYPT_CONTENT_INFO = struct { FpszObjId LPSTR FContent CRYPT_DER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2064:11 */ type CRYPT_CONTENT_INFO = _CRYPT_CONTENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2067:5 */ type PCRYPT_CONTENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2067:24 */ type _CRYPT_SEQUENCE_OF_ANY = struct { FcValue DWORD F__ccgo_pad1 [4]byte FrgValue PCRYPT_DER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2069:11 */ type CRYPT_SEQUENCE_OF_ANY = _CRYPT_SEQUENCE_OF_ANY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2072:5 */ type PCRYPT_SEQUENCE_OF_ANY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2072:27 */ type _CERT_AUTHORITY_KEY_ID2_INFO = struct { FKeyId CRYPT_DATA_BLOB FAuthorityCertIssuer CERT_ALT_NAME_INFO FAuthorityCertSerialNumber CRYPT_INTEGER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2074:11 */ type CERT_AUTHORITY_KEY_ID2_INFO = _CERT_AUTHORITY_KEY_ID2_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2078:5 */ type PCERT_AUTHORITY_KEY_ID2_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2078:33 */ type _CERT_ACCESS_DESCRIPTION = struct { FpszAccessMethod LPSTR FAccessLocation CERT_ALT_NAME_ENTRY } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2080:11 */ type CERT_ACCESS_DESCRIPTION = _CERT_ACCESS_DESCRIPTION /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2083:5 */ type PCERT_ACCESS_DESCRIPTION = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2083:29 */ type _CERT_AUTHORITY_INFO_ACCESS = struct { FcAccDescr DWORD F__ccgo_pad1 [4]byte FrgAccDescr PCERT_ACCESS_DESCRIPTION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2085:11 */ type CERT_AUTHORITY_INFO_ACCESS = _CERT_AUTHORITY_INFO_ACCESS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2088:5 */ type PCERT_AUTHORITY_INFO_ACCESS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2088:32 */ type CERT_SUBJECT_INFO_ACCESS = CERT_AUTHORITY_INFO_ACCESS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2090:38 */ type PCERT_SUBJECT_INFO_ACCESS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2090:63 */ type _CRL_DIST_POINT_NAME = struct { FdwDistPointNameChoice DWORD F__ccgo_pad1 [4]byte F__8 struct{ FFullName CERT_ALT_NAME_INFO } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2109:11 */ type CRL_DIST_POINT_NAME = _CRL_DIST_POINT_NAME /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2114:5 */ type PCRL_DIST_POINT_NAME = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2114:25 */ type _CRL_DIST_POINT = struct { FDistPointName CRL_DIST_POINT_NAME FReasonFlags CRYPT_BIT_BLOB FCRLIssuer CERT_ALT_NAME_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2120:11 */ type CRL_DIST_POINT = _CRL_DIST_POINT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2124:5 */ type PCRL_DIST_POINT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2124:20 */ type _CRL_DIST_POINTS_INFO = struct { FcDistPoint DWORD F__ccgo_pad1 [4]byte FrgDistPoint PCRL_DIST_POINT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2136:11 */ type CRL_DIST_POINTS_INFO = _CRL_DIST_POINTS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2139:5 */ type PCRL_DIST_POINTS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2139:26 */ type _CROSS_CERT_DIST_POINTS_INFO = struct { FdwSyncDeltaTime DWORD FcDistPoint DWORD FrgDistPoint PCERT_ALT_NAME_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2148:11 */ type CROSS_CERT_DIST_POINTS_INFO = _CROSS_CERT_DIST_POINTS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2152:5 */ type PCROSS_CERT_DIST_POINTS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2152:33 */ type _CERT_PAIR = struct { FForward CERT_BLOB FReverse CERT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2158:11 */ type CERT_PAIR = _CERT_PAIR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2161:5 */ type PCERT_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2161:15 */ type _CRL_ISSUING_DIST_POINT = struct { FDistPointName CRL_DIST_POINT_NAME FfOnlyContainsUserCerts WINBOOL FfOnlyContainsCACerts WINBOOL FOnlySomeReasonFlags CRYPT_BIT_BLOB FfIndirectCRL WINBOOL F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2163:11 */ type CRL_ISSUING_DIST_POINT = _CRL_ISSUING_DIST_POINT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2169:5 */ type PCRL_ISSUING_DIST_POINT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2169:28 */ type _CERT_GENERAL_SUBTREE = struct { FBase CERT_ALT_NAME_ENTRY FdwMinimum DWORD FfMaximum WINBOOL FdwMaximum DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2171:11 */ type CERT_GENERAL_SUBTREE = _CERT_GENERAL_SUBTREE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2176:5 */ type PCERT_GENERAL_SUBTREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2176:26 */ type _CERT_NAME_CONSTRAINTS_INFO = struct { FcPermittedSubtree DWORD F__ccgo_pad1 [4]byte FrgPermittedSubtree PCERT_GENERAL_SUBTREE FcExcludedSubtree DWORD F__ccgo_pad2 [4]byte FrgExcludedSubtree PCERT_GENERAL_SUBTREE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2178:11 */ type CERT_NAME_CONSTRAINTS_INFO = _CERT_NAME_CONSTRAINTS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2183:5 */ type PCERT_NAME_CONSTRAINTS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2183:32 */ type _CERT_DSS_PARAMETERS = struct { Fp CRYPT_UINT_BLOB Fq CRYPT_UINT_BLOB Fg CRYPT_UINT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2195:11 */ type CERT_DSS_PARAMETERS = _CERT_DSS_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2199:5 */ type PCERT_DSS_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2199:25 */ type _CERT_DH_PARAMETERS = struct { Fp CRYPT_UINT_BLOB Fg CRYPT_UINT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2207:11 */ type CERT_DH_PARAMETERS = _CERT_DH_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2210:5 */ type PCERT_DH_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2210:24 */ type _CERT_ECC_SIGNATURE = struct { Fr CRYPT_UINT_BLOB Fs CRYPT_UINT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2212:11 */ type CERT_ECC_SIGNATURE = _CERT_ECC_SIGNATURE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2215:5 */ type PCERT_ECC_SIGNATURE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2215:24 */ type _CERT_X942_DH_VALIDATION_PARAMS = struct { Fseed CRYPT_BIT_BLOB FpgenCounter DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2217:11 */ type CERT_X942_DH_VALIDATION_PARAMS = _CERT_X942_DH_VALIDATION_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2220:5 */ type PCERT_X942_DH_VALIDATION_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2220: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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2222:11 */ type CERT_X942_DH_PARAMETERS = _CERT_X942_DH_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2228:5 */ type PCERT_X942_DH_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2228:29 */ type _CRYPT_X942_OTHER_INFO = struct { FpszContentEncryptionObjId LPSTR FrgbCounter [4]BYTE FrgbKeyLength [4]BYTE FPubInfo CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2234:11 */ type CRYPT_X942_OTHER_INFO = _CRYPT_X942_OTHER_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2239:5 */ type PCRYPT_X942_OTHER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2239:27 */ type _CRYPT_ECC_CMS_SHARED_INFO = struct { FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEntityUInfo CRYPT_DATA_BLOB FrgbSuppPubInfo [4]BYTE F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2243:11 */ type CRYPT_ECC_CMS_SHARED_INFO = _CRYPT_ECC_CMS_SHARED_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2247:5 */ type PCRYPT_ECC_CMS_SHARED_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2247:31 */ type _CRYPT_RC2_CBC_PARAMETERS = struct { FdwVersion DWORD FfIV WINBOOL FrgbIV [8]BYTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2249:11 */ type CRYPT_RC2_CBC_PARAMETERS = _CRYPT_RC2_CBC_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2253:5 */ type PCRYPT_RC2_CBC_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2253:30 */ type _CRYPT_SMIME_CAPABILITY = struct { FpszObjId LPSTR FParameters CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2260:11 */ type CRYPT_SMIME_CAPABILITY = _CRYPT_SMIME_CAPABILITY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2263:5 */ type PCRYPT_SMIME_CAPABILITY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2263:28 */ type _CRYPT_SMIME_CAPABILITIES = struct { FcCapability DWORD F__ccgo_pad1 [4]byte FrgCapability PCRYPT_SMIME_CAPABILITY } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2265:11 */ type CRYPT_SMIME_CAPABILITIES = _CRYPT_SMIME_CAPABILITIES /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2268:5 */ type PCRYPT_SMIME_CAPABILITIES = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2268:30 */ type _CERT_QC_STATEMENT = struct { FpszStatementId LPSTR FStatementInfo CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2270:11 */ type CERT_QC_STATEMENT = _CERT_QC_STATEMENT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2273:5 */ type PCERT_QC_STATEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2273:23 */ type _CERT_QC_STATEMENTS_EXT_INFO = struct { FcStatement DWORD F__ccgo_pad1 [4]byte FrgStatement PCERT_QC_STATEMENT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2275:11 */ type CERT_QC_STATEMENTS_EXT_INFO = _CERT_QC_STATEMENTS_EXT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2278:5 */ type PCERT_QC_STATEMENTS_EXT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2278:33 */ type _CRYPT_MASK_GEN_ALGORITHM = struct { FpszObjId LPSTR FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2283:11 */ type CRYPT_MASK_GEN_ALGORITHM = _CRYPT_MASK_GEN_ALGORITHM /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2286:5 */ type PCRYPT_MASK_GEN_ALGORITHM = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2286:30 */ type _CRYPT_RSA_SSA_PSS_PARAMETERS = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM FdwSaltLength DWORD FdwTrailerField DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2288:11 */ type CRYPT_RSA_SSA_PSS_PARAMETERS = _CRYPT_RSA_SSA_PSS_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2293:5 */ type PCRYPT_RSA_SSA_PSS_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2293:34 */ type _CRYPT_PSOURCE_ALGORITHM = struct { FpszObjId LPSTR FEncodingParameters CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2297:11 */ type CRYPT_PSOURCE_ALGORITHM = _CRYPT_PSOURCE_ALGORITHM /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2300:5 */ type PCRYPT_PSOURCE_ALGORITHM = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2300:29 */ type _CRYPT_RSAES_OAEP_PARAMETERS = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FMaskGenAlgorithm CRYPT_MASK_GEN_ALGORITHM FPSourceAlgorithm CRYPT_PSOURCE_ALGORITHM } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2302:11 */ type CRYPT_RSAES_OAEP_PARAMETERS = _CRYPT_RSAES_OAEP_PARAMETERS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2306:5 */ type PCRYPT_RSAES_OAEP_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2306:33 */ type _CMC_TAGGED_ATTRIBUTE = struct { FdwBodyPartID DWORD F__ccgo_pad1 [4]byte FAttribute CRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2374:11 */ type CMC_TAGGED_ATTRIBUTE = _CMC_TAGGED_ATTRIBUTE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2377:5 */ type PCMC_TAGGED_ATTRIBUTE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2377:26 */ type _CMC_TAGGED_CERT_REQUEST = struct { FdwBodyPartID DWORD F__ccgo_pad1 [4]byte FSignedCertRequest CRYPT_DER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2379:11 */ type CMC_TAGGED_CERT_REQUEST = _CMC_TAGGED_CERT_REQUEST /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2382:5 */ type PCMC_TAGGED_CERT_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2382:29 */ type _CMC_TAGGED_REQUEST = struct { FdwTaggedRequestChoice DWORD F__ccgo_pad1 [4]byte F__8 struct{ FpTaggedCertRequest PCMC_TAGGED_CERT_REQUEST } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2384:11 */ type CMC_TAGGED_REQUEST = _CMC_TAGGED_REQUEST /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2389:5 */ type PCMC_TAGGED_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2389:24 */ type _CMC_TAGGED_CONTENT_INFO = struct { FdwBodyPartID DWORD F__ccgo_pad1 [4]byte FEncodedContentInfo CRYPT_DER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2393:11 */ type CMC_TAGGED_CONTENT_INFO = _CMC_TAGGED_CONTENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2396:5 */ type PCMC_TAGGED_CONTENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2396:29 */ type _CMC_TAGGED_OTHER_MSG = struct { FdwBodyPartID DWORD F__ccgo_pad1 [4]byte FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2398:11 */ type CMC_TAGGED_OTHER_MSG = _CMC_TAGGED_OTHER_MSG /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2402:5 */ type PCMC_TAGGED_OTHER_MSG = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2402:26 */ type _CMC_DATA_INFO = struct { FcTaggedAttribute DWORD F__ccgo_pad1 [4]byte FrgTaggedAttribute PCMC_TAGGED_ATTRIBUTE FcTaggedRequest DWORD F__ccgo_pad2 [4]byte FrgTaggedRequest PCMC_TAGGED_REQUEST FcTaggedContentInfo DWORD F__ccgo_pad3 [4]byte FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO FcTaggedOtherMsg DWORD F__ccgo_pad4 [4]byte FrgTaggedOtherMsg PCMC_TAGGED_OTHER_MSG } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2404:11 */ type CMC_DATA_INFO = _CMC_DATA_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2413:5 */ type PCMC_DATA_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2413:19 */ type _CMC_RESPONSE_INFO = struct { FcTaggedAttribute DWORD F__ccgo_pad1 [4]byte FrgTaggedAttribute PCMC_TAGGED_ATTRIBUTE FcTaggedContentInfo DWORD F__ccgo_pad2 [4]byte FrgTaggedContentInfo PCMC_TAGGED_CONTENT_INFO FcTaggedOtherMsg DWORD F__ccgo_pad3 [4]byte FrgTaggedOtherMsg PCMC_TAGGED_OTHER_MSG } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2415:11 */ type CMC_RESPONSE_INFO = _CMC_RESPONSE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2422:5 */ type PCMC_RESPONSE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2422:23 */ type _CMC_PEND_INFO = struct { FPendToken CRYPT_DATA_BLOB FPendTime FILETIME } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2424:11 */ type CMC_PEND_INFO = _CMC_PEND_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2427:5 */ type PCMC_PEND_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2427:19 */ type _CMC_STATUS_INFO = struct { FdwStatus DWORD FcBodyList DWORD FrgdwBodyList uintptr FpwszStatusString LPWSTR FdwOtherInfoChoice DWORD F__ccgo_pad1 [4]byte F__32 struct { F__ccgo_pad1 [0]uint64 FdwFailInfo DWORD F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2429:11 */ type CMC_STATUS_INFO = _CMC_STATUS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2439:5 */ type PCMC_STATUS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2439:21 */ type _CMC_ADD_EXTENSIONS_INFO = struct { FdwCmcDataReference DWORD FcCertReference DWORD FrgdwCertReference uintptr FcExtension DWORD F__ccgo_pad1 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2465:11 */ type CMC_ADD_EXTENSIONS_INFO = _CMC_ADD_EXTENSIONS_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2471:5 */ type PCMC_ADD_EXTENSIONS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2471:29 */ type _CMC_ADD_ATTRIBUTES_INFO = struct { FdwCmcDataReference DWORD FcCertReference DWORD FrgdwCertReference uintptr FcAttribute DWORD F__ccgo_pad1 [4]byte FrgAttribute PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2473:11 */ type CMC_ADD_ATTRIBUTES_INFO = _CMC_ADD_ATTRIBUTES_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2479:5 */ type PCMC_ADD_ATTRIBUTES_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2479:29 */ type _CERT_TEMPLATE_EXT = struct { FpszObjId LPSTR FdwMajorVersion DWORD FfMinorVersion WINBOOL FdwMinorVersion DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2481:11 */ type CERT_TEMPLATE_EXT = _CERT_TEMPLATE_EXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2486:5 */ type PCERT_TEMPLATE_EXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2486:23 */ type _CERT_HASHED_URL = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHash CRYPT_HASH_BLOB FpwszUrl LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2488:11 */ type CERT_HASHED_URL = _CERT_HASHED_URL /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2492:5 */ type PCERT_HASHED_URL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2492:21 */ type _CERT_LOGOTYPE_DETAILS = struct { FpwszMimeType LPWSTR FcHashedUrl DWORD F__ccgo_pad1 [4]byte FrgHashedUrl PCERT_HASHED_URL } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2494:11 */ type CERT_LOGOTYPE_DETAILS = _CERT_LOGOTYPE_DETAILS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2498:5 */ type PCERT_LOGOTYPE_DETAILS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2498:27 */ type _CERT_LOGOTYPE_REFERENCE = struct { FcHashedUrl DWORD F__ccgo_pad1 [4]byte FrgHashedUrl PCERT_HASHED_URL } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2500:11 */ type CERT_LOGOTYPE_REFERENCE = _CERT_LOGOTYPE_REFERENCE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2503:5 */ type PCERT_LOGOTYPE_REFERENCE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2503:29 */ type _CERT_LOGOTYPE_IMAGE_INFO = struct { FdwLogotypeImageInfoChoice DWORD FdwFileSize DWORD FdwXSize DWORD FdwYSize DWORD FdwLogotypeImageResolutionChoice DWORD F__20 struct{ FdwNumBits DWORD } FpwszLanguage LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2505:11 */ type CERT_LOGOTYPE_IMAGE_INFO = _CERT_LOGOTYPE_IMAGE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2516:5 */ type PCERT_LOGOTYPE_IMAGE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2516:30 */ type _CERT_LOGOTYPE_IMAGE = struct { FLogotypeDetails CERT_LOGOTYPE_DETAILS FpLogotypeImageInfo PCERT_LOGOTYPE_IMAGE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2525:11 */ type CERT_LOGOTYPE_IMAGE = _CERT_LOGOTYPE_IMAGE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2528:5 */ type PCERT_LOGOTYPE_IMAGE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2528:25 */ type _CERT_LOGOTYPE_AUDIO_INFO = struct { FdwFileSize DWORD FdwPlayTime DWORD FdwChannels DWORD FdwSampleRate DWORD FpwszLanguage LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2530:11 */ type CERT_LOGOTYPE_AUDIO_INFO = _CERT_LOGOTYPE_AUDIO_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2536:5 */ type PCERT_LOGOTYPE_AUDIO_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2536:30 */ type _CERT_LOGOTYPE_AUDIO = struct { FLogotypeDetails CERT_LOGOTYPE_DETAILS FpLogotypeAudioInfo PCERT_LOGOTYPE_AUDIO_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2538:11 */ type CERT_LOGOTYPE_AUDIO = _CERT_LOGOTYPE_AUDIO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2541:5 */ type PCERT_LOGOTYPE_AUDIO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2541:25 */ type _CERT_LOGOTYPE_DATA = struct { FcLogotypeImage DWORD F__ccgo_pad1 [4]byte FrgLogotypeImage PCERT_LOGOTYPE_IMAGE FcLogotypeAudio DWORD F__ccgo_pad2 [4]byte FrgLogotypeAudio PCERT_LOGOTYPE_AUDIO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2543:11 */ type CERT_LOGOTYPE_DATA = _CERT_LOGOTYPE_DATA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2548:5 */ type PCERT_LOGOTYPE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2548:24 */ type _CERT_LOGOTYPE_INFO = struct { FdwLogotypeInfoChoice DWORD F__ccgo_pad1 [4]byte F__8 struct{ FpLogotypeDirectInfo PCERT_LOGOTYPE_DATA } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2550:11 */ type CERT_LOGOTYPE_INFO = _CERT_LOGOTYPE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2556:5 */ type PCERT_LOGOTYPE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2556:24 */ type _CERT_OTHER_LOGOTYPE_INFO = struct { FpszObjId LPSTR FLogotypeInfo CERT_LOGOTYPE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2561:11 */ type CERT_OTHER_LOGOTYPE_INFO = _CERT_OTHER_LOGOTYPE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2564:5 */ type PCERT_OTHER_LOGOTYPE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2564:30 */ type _CERT_LOGOTYPE_EXT_INFO = struct { FcCommunityLogo DWORD F__ccgo_pad1 [4]byte FrgCommunityLogo PCERT_LOGOTYPE_INFO FpIssuerLogo PCERT_LOGOTYPE_INFO FpSubjectLogo PCERT_LOGOTYPE_INFO FcOtherLogo DWORD F__ccgo_pad2 [4]byte FrgOtherLogo PCERT_OTHER_LOGOTYPE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2569:11 */ type CERT_LOGOTYPE_EXT_INFO = _CERT_LOGOTYPE_EXT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2576:5 */ type PCERT_LOGOTYPE_EXT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2576:28 */ type _CERT_BIOMETRIC_DATA = struct { FdwTypeOfBiometricDataChoice DWORD F__ccgo_pad1 [4]byte F__8 struct { F__ccgo_pad1 [0]uint64 FdwPredefined DWORD F__ccgo_pad2 [4]byte } FHashedUrl CERT_HASHED_URL } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2578:11 */ type CERT_BIOMETRIC_DATA = _CERT_BIOMETRIC_DATA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2585:5 */ type PCERT_BIOMETRIC_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2585:25 */ type _CERT_BIOMETRIC_EXT_INFO = struct { FcBiometricData DWORD F__ccgo_pad1 [4]byte FrgBiometricData PCERT_BIOMETRIC_DATA } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2593:11 */ type CERT_BIOMETRIC_EXT_INFO = _CERT_BIOMETRIC_EXT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2596:5 */ type PCERT_BIOMETRIC_EXT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2596:29 */ type _OCSP_SIGNATURE_INFO = struct { FSignatureAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSignature CRYPT_BIT_BLOB FcCertEncoded DWORD F__ccgo_pad1 [4]byte FrgCertEncoded PCERT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2598:11 */ type OCSP_SIGNATURE_INFO = _OCSP_SIGNATURE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2603:5 */ type POCSP_SIGNATURE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2603:25 */ type _OCSP_SIGNED_REQUEST_INFO = struct { FToBeSigned CRYPT_DER_BLOB FpOptionalSignatureInfo POCSP_SIGNATURE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2605:11 */ type OCSP_SIGNED_REQUEST_INFO = _OCSP_SIGNED_REQUEST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2608:5 */ type POCSP_SIGNED_REQUEST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2608:30 */ type _OCSP_CERT_ID = struct { FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIssuerNameHash CRYPT_HASH_BLOB FIssuerKeyHash CRYPT_HASH_BLOB FSerialNumber CRYPT_INTEGER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2610:11 */ type OCSP_CERT_ID = _OCSP_CERT_ID /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2615:5 */ type POCSP_CERT_ID = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2615:18 */ type _OCSP_REQUEST_ENTRY = struct { FCertId OCSP_CERT_ID FcExtension DWORD F__ccgo_pad1 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2617:11 */ type OCSP_REQUEST_ENTRY = _OCSP_REQUEST_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2621:5 */ type POCSP_REQUEST_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2621:24 */ type _OCSP_REQUEST_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FpRequestorName PCERT_ALT_NAME_ENTRY FcRequestEntry DWORD F__ccgo_pad2 [4]byte FrgRequestEntry POCSP_REQUEST_ENTRY FcExtension DWORD F__ccgo_pad3 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2623:11 */ type OCSP_REQUEST_INFO = _OCSP_REQUEST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2630:5 */ type POCSP_REQUEST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2630:23 */ type _OCSP_RESPONSE_INFO = struct { FdwStatus DWORD F__ccgo_pad1 [4]byte FpszObjId LPSTR FValue CRYPT_OBJID_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2634:11 */ type OCSP_RESPONSE_INFO = _OCSP_RESPONSE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2638:5 */ type POCSP_RESPONSE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2638:24 */ type _OCSP_BASIC_SIGNED_RESPONSE_INFO = struct { FToBeSigned CRYPT_DER_BLOB FSignatureInfo OCSP_SIGNATURE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2649:11 */ type OCSP_BASIC_SIGNED_RESPONSE_INFO = _OCSP_BASIC_SIGNED_RESPONSE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2652:5 */ type POCSP_BASIC_SIGNED_RESPONSE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2652:37 */ type _OCSP_BASIC_REVOKED_INFO = struct { FRevocationDate FILETIME FdwCrlReasonCode DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2654:11 */ type OCSP_BASIC_REVOKED_INFO = _OCSP_BASIC_REVOKED_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2657:5 */ type POCSP_BASIC_REVOKED_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2657:29 */ type _OCSP_BASIC_RESPONSE_ENTRY = struct { FCertId OCSP_CERT_ID FdwCertStatus DWORD F__ccgo_pad1 [4]byte F__80 struct{ FpRevokedInfo POCSP_BASIC_REVOKED_INFO } FThisUpdate FILETIME FNextUpdate FILETIME FcExtension DWORD F__ccgo_pad2 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2659:11 */ type OCSP_BASIC_RESPONSE_ENTRY = _OCSP_BASIC_RESPONSE_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2669:5 */ type POCSP_BASIC_RESPONSE_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2669:31 */ type _OCSP_BASIC_RESPONSE_INFO = struct { FdwVersion DWORD FdwResponderIdChoice DWORD F__8 struct{ FByNameResponderId CERT_NAME_BLOB } FProducedAt FILETIME FcResponseEntry DWORD F__ccgo_pad1 [4]byte FrgResponseEntry POCSP_BASIC_RESPONSE_ENTRY FcExtension DWORD F__ccgo_pad2 [4]byte FrgExtension PCERT_EXTENSION } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2675:11 */ type OCSP_BASIC_RESPONSE_INFO = _OCSP_BASIC_RESPONSE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2687:5 */ type POCSP_BASIC_RESPONSE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2687:30 */ type _CERT_SUPPORTED_ALGORITHM_INFO = struct { FAlgorithm CRYPT_ALGORITHM_IDENTIFIER FIntendedKeyUsage CRYPT_BIT_BLOB FIntendedCertPolicies CERT_POLICIES_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2693:11 */ type CERT_SUPPORTED_ALGORITHM_INFO = _CERT_SUPPORTED_ALGORITHM_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2697:5 */ type PCERT_SUPPORTED_ALGORITHM_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2697:36 */ type _CERT_TPM_SPECIFICATION_INFO = struct { FpwszFamily LPWSTR FdwLevel DWORD FdwRevision DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2699:11 */ type CERT_TPM_SPECIFICATION_INFO = _CERT_TPM_SPECIFICATION_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2703:5 */ type PCERT_TPM_SPECIFICATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2703:34 */ type HCRYPTOIDFUNCSET = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2705:16 */ type HCRYPTOIDFUNCADDR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2706:16 */ type _CRYPT_OID_FUNC_ENTRY = struct { FpszOID LPCSTR FpvFuncAddr uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2729:11 */ type CRYPT_OID_FUNC_ENTRY = _CRYPT_OID_FUNC_ENTRY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2732:5 */ type PCRYPT_OID_FUNC_ENTRY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2732:26 */ type PFN_CRYPT_ENUM_OID_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2753:19 */ type _CRYPT_OID_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszOID LPCSTR FpwszName LPCWSTR FdwGroupId DWORD F__28 struct{ FdwValue DWORD } FExtraInfo CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2770:11 */ type CRYPT_OID_INFO = _CRYPT_OID_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2785:5 */ type PCRYPT_OID_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2785:20 */ type CCRYPT_OID_INFO = CRYPT_OID_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2787:32 */ type PCCRYPT_OID_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2787:48 */ type PFN_CRYPT_ENUM_OID_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2837:19 */ type _CERT_STRONG_SIGN_SERIALIZED_INFO = struct { FdwFlags DWORD F__ccgo_pad1 [4]byte FpwszCNGSignHashAlgids LPWSTR FpwszCNGPubKeyMinBitLengths LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2849:11 */ type CERT_STRONG_SIGN_SERIALIZED_INFO = _CERT_STRONG_SIGN_SERIALIZED_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2853:5 */ type PCERT_STRONG_SIGN_SERIALIZED_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2853:38 */ type _CERT_STRONG_SIGN_PARA = struct { FcbSize DWORD FdwInfoChoice DWORD F__8 struct{ FpvInfo uintptr } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2855:11 */ type CERT_STRONG_SIGN_PARA = _CERT_STRONG_SIGN_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2863:5 */ type PCERT_STRONG_SIGN_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2863:27 */ type PCCERT_STRONG_SIGN_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2865:39 */ type HCRYPTMSG = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2888:16 */ type _CERT_ISSUER_SERIAL_NUMBER = struct { FIssuer CERT_NAME_BLOB FSerialNumber CRYPT_INTEGER_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2915:11 */ type CERT_ISSUER_SERIAL_NUMBER = _CERT_ISSUER_SERIAL_NUMBER /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2918:5 */ type PCERT_ISSUER_SERIAL_NUMBER = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2918:31 */ type _CERT_ID = struct { FdwIdChoice DWORD F__ccgo_pad1 [4]byte F__8 struct{ FIssuerSerialNumber CERT_ISSUER_SERIAL_NUMBER } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2920:11 */ type CERT_ID = _CERT_ID /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2927:5 */ type PCERT_ID = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2927:13 */ type _CMSG_SIGNER_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpCertInfo PCERT_INFO F__16 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD F__ccgo_pad2 [4]byte FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FcAuthAttr DWORD F__ccgo_pad3 [4]byte FrgAuthAttr PCRYPT_ATTRIBUTE FcUnauthAttr DWORD F__ccgo_pad4 [4]byte FrgUnauthAttr PCRYPT_ATTRIBUTE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2933:11 */ type CMSG_SIGNER_ENCODE_INFO = _CMSG_SIGNER_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2952:5 */ type PCMSG_SIGNER_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2952:29 */ type _CMSG_SIGNED_ENCODE_INFO = struct { FcbSize DWORD FcSigners DWORD FrgSigners PCMSG_SIGNER_ENCODE_INFO FcCertEncoded DWORD F__ccgo_pad1 [4]byte FrgCertEncoded PCERT_BLOB FcCrlEncoded DWORD F__ccgo_pad2 [4]byte FrgCrlEncoded PCRL_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2954:11 */ type CMSG_SIGNED_ENCODE_INFO = _CMSG_SIGNED_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2966:5 */ type PCMSG_SIGNED_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2966:29 */ type _CMSG_RECIPIENT_ENCODE_INFO = struct { FdwRecipientChoice DWORD F__ccgo_pad1 [4]byte F__8 struct { FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2968:11 */ type CMSG_RECIPIENT_ENCODE_INFO = _CMSG_RECIPIENT_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2968:46 */ type PCMSG_RECIPIENT_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2968:73 */ type _CMSG_ENVELOPED_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FcRecipients DWORD F__ccgo_pad2 [4]byte FrgpRecipients uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2970:11 */ type CMSG_ENVELOPED_ENCODE_INFO = _CMSG_ENVELOPED_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2988:5 */ type PCMSG_ENVELOPED_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2988:32 */ type _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyEncryptionAuxInfo uintptr FhCryptProv HCRYPTPROV_LEGACY FRecipientPublicKey CRYPT_BIT_BLOB FRecipientId CERT_ID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2990:11 */ type CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2997:5 */ type PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2997:42 */ type _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FRecipientPublicKey CRYPT_BIT_BLOB FRecipientId CERT_ID FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:2999:11 */ type CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3005:5 */ type PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3005:46 */ type _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte FrgpRecipientEncryptedKeys uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3007:11 */ type CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3023:5 */ type PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3023:42 */ type _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvKeyEncryptionAuxInfo uintptr FhCryptProv HCRYPTPROV FdwKeyChoice DWORD F__ccgo_pad2 [4]byte F__56 struct{ FhKeyEncryptionKey HCRYPTKEY } FKeyId CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3028:11 */ type CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = _CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3041:5 */ type PCMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3041:42 */ type _CMSG_RC2_AUX_INFO = struct { FcbSize DWORD FdwBitLen DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3061:11 */ type CMSG_RC2_AUX_INFO = _CMSG_RC2_AUX_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3064:5 */ type PCMSG_RC2_AUX_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3064:23 */ type _CMSG_SP3_COMPATIBLE_AUX_INFO = struct { FcbSize DWORD FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3066:11 */ type CMSG_SP3_COMPATIBLE_AUX_INFO = _CMSG_SP3_COMPATIBLE_AUX_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3069:5 */ type PCMSG_SP3_COMPATIBLE_AUX_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3069:34 */ type _CMSG_RC4_AUX_INFO = struct { FcbSize DWORD FdwBitLen DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3071:11 */ type CMSG_RC4_AUX_INFO = _CMSG_RC4_AUX_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3074:5 */ type PCMSG_RC4_AUX_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3074:23 */ type _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FSignedInfo CMSG_SIGNED_ENCODE_INFO FEnvelopedInfo CMSG_ENVELOPED_ENCODE_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3076:11 */ type CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = _CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3080:5 */ type PCMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3080:43 */ type _CMSG_HASHED_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhCryptProv HCRYPTPROV_LEGACY FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3082:11 */ type CMSG_HASHED_ENCODE_INFO = _CMSG_HASHED_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3087:5 */ type PCMSG_HASHED_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3087:29 */ type _CMSG_ENCRYPTED_ENCODE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3089:11 */ type CMSG_ENCRYPTED_ENCODE_INFO = _CMSG_ENCRYPTED_ENCODE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3093:5 */ type PCMSG_ENCRYPTED_ENCODE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3093:32 */ type PFN_CMSG_STREAM_OUTPUT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3095:19 */ type _CMSG_STREAM_INFO = struct { FcbContent DWORD F__ccgo_pad1 [4]byte FpfnStreamOutput PFN_CMSG_STREAM_OUTPUT FpvArg uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3099:11 */ type CMSG_STREAM_INFO = _CMSG_STREAM_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3103:5 */ type PCMSG_STREAM_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3103:22 */ type _CMSG_SIGNER_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3159:11 */ type CMSG_SIGNER_INFO = _CMSG_SIGNER_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3168:5 */ type PCMSG_SIGNER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3168:22 */ type _CMSG_CMS_SIGNER_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FSignerId CERT_ID FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FHashEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedHash CRYPT_DATA_BLOB FAuthAttrs CRYPT_ATTRIBUTES FUnauthAttrs CRYPT_ATTRIBUTES } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3170:11 */ type CMSG_CMS_SIGNER_INFO = _CMSG_CMS_SIGNER_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3178:5 */ type PCMSG_CMS_SIGNER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3178:26 */ type CMSG_ATTR = CRYPT_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3180:28 */ type PCMSG_ATTR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3181:28 */ type _CMSG_KEY_TRANS_RECIPIENT_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FRecipientId CERT_ID FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3203:11 */ type CMSG_KEY_TRANS_RECIPIENT_INFO = _CMSG_KEY_TRANS_RECIPIENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3208:5 */ type PCMSG_KEY_TRANS_RECIPIENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3208:35 */ type _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = struct { FRecipientId CERT_ID FEncryptedKey CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3210:11 */ type CMSG_RECIPIENT_ENCRYPTED_KEY_INFO = _CMSG_RECIPIENT_ENCRYPTED_KEY_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3215:5 */ type PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3215:39 */ type _CMSG_KEY_AGREE_RECIPIENT_INFO = struct { FdwVersion DWORD FdwOriginatorChoice DWORD F__8 struct { FOriginatorCertId CERT_ID F__ccgo_pad1 [8]byte } FUserKeyingMaterial CRYPT_DATA_BLOB FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FcRecipientEncryptedKeys DWORD F__ccgo_pad1 [4]byte FrgpRecipientEncryptedKeys uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3217:11 */ type CMSG_KEY_AGREE_RECIPIENT_INFO = _CMSG_KEY_AGREE_RECIPIENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3228:5 */ type PCMSG_KEY_AGREE_RECIPIENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3228:35 */ type _CMSG_MAIL_LIST_RECIPIENT_INFO = struct { FdwVersion DWORD F__ccgo_pad1 [4]byte FKeyId CRYPT_DATA_BLOB FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FDate FILETIME FpOtherAttr PCRYPT_ATTRIBUTE_TYPE_VALUE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3233:11 */ type CMSG_MAIL_LIST_RECIPIENT_INFO = _CMSG_MAIL_LIST_RECIPIENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3240:5 */ type PCMSG_MAIL_LIST_RECIPIENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3240:35 */ type _CMSG_CMS_RECIPIENT_INFO = struct { FdwRecipientChoice DWORD F__ccgo_pad1 [4]byte F__8 struct { FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_INFO } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3242:11 */ type CMSG_CMS_RECIPIENT_INFO = _CMSG_CMS_RECIPIENT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3249:5 */ type PCMSG_CMS_RECIPIENT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3249:29 */ type _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhCryptProv HCRYPTPROV_LEGACY FdwSignerIndex DWORD FdwSignerType DWORD FpvSigner uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3282:11 */ type CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = _CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3288:5 */ type PCMSG_CTRL_VERIFY_SIGNATURE_EX_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3288:40 */ type _CMSG_CTRL_DECRYPT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD FdwRecipientIndex DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3295:11 */ type CMSG_CTRL_DECRYPT_PARA = _CMSG_CTRL_DECRYPT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3303:5 */ type PCMSG_CTRL_DECRYPT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3303:28 */ type _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD F__ccgo_pad2 [4]byte FpKeyTrans PCMSG_KEY_TRANS_RECIPIENT_INFO FdwRecipientIndex DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3305:11 */ type CMSG_CTRL_KEY_TRANS_DECRYPT_PARA = _CMSG_CTRL_KEY_TRANS_DECRYPT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3314:5 */ type PCMSG_CTRL_KEY_TRANS_DECRYPT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3314:38 */ type _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD F__ccgo_pad2 [4]byte FpKeyAgree PCMSG_KEY_AGREE_RECIPIENT_INFO FdwRecipientIndex DWORD FdwRecipientEncryptedKeyIndex DWORD FOriginatorPublicKey CRYPT_BIT_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3316:11 */ type CMSG_CTRL_KEY_AGREE_DECRYPT_PARA = _CMSG_CTRL_KEY_AGREE_DECRYPT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3327:5 */ type PCMSG_CTRL_KEY_AGREE_DECRYPT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3327:38 */ type _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhCryptProv HCRYPTPROV FpMailList PCMSG_MAIL_LIST_RECIPIENT_INFO FdwRecipientIndex DWORD FdwKeyChoice DWORD F__32 struct{ FhKeyEncryptionKey HCRYPTKEY } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3329:11 */ type CMSG_CTRL_MAIL_LIST_DECRYPT_PARA = _CMSG_CTRL_MAIL_LIST_DECRYPT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3339:5 */ type PCMSG_CTRL_MAIL_LIST_DECRYPT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3339:38 */ type _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = struct { FcbSize DWORD FdwSignerIndex DWORD Fblob CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3341:11 */ type CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3345:5 */ type PCMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3345:43 */ type _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = struct { FcbSize DWORD FdwSignerIndex DWORD FdwUnauthAttrIndex DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3347:11 */ type CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = _CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3351:5 */ type PCMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3351:43 */ type PFN_CMSG_ALLOC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3360:16 */ type PFN_CMSG_FREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3361:16 */ type PFN_CMSG_GEN_ENCRYPT_KEY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3367:19 */ type PFN_CMSG_EXPORT_ENCRYPT_KEY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3368:19 */ type PFN_CMSG_IMPORT_ENCRYPT_KEY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3369:19 */ type _CMSG_CONTENT_ENCRYPT_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FcRecipients DWORD F__ccgo_pad2 [4]byte FrgCmsRecipients PCMSG_RECIPIENT_ENCODE_INFO FpfnAlloc PFN_CMSG_ALLOC FpfnFree PFN_CMSG_FREE FdwEncryptFlags DWORD F__ccgo_pad3 [4]byte F__88 struct{ FhContentEncryptKey HCRYPTKEY } FdwFlags DWORD FfCNG WINBOOL FpbCNGContentEncryptKeyObject uintptr FpbContentEncryptKey uintptr FcbContentEncryptKey DWORD F__ccgo_pad4 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3375:11 */ type CMSG_CONTENT_ENCRYPT_INFO = _CMSG_CONTENT_ENCRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3394:5 */ type PCMSG_CONTENT_ENCRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3394:31 */ type PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3406:19 */ type _CMSG_KEY_TRANS_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3408:11 */ type CMSG_KEY_TRANS_ENCRYPT_INFO = _CMSG_KEY_TRANS_ENCRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3414:5 */ type PCMSG_KEY_TRANS_ENCRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3414:33 */ type PFN_CMSG_EXPORT_KEY_TRANS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3423:19 */ type _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FEncryptedKey CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3425:11 */ type CMSG_KEY_AGREE_KEY_ENCRYPT_INFO = _CMSG_KEY_AGREE_KEY_ENCRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3428:5 */ type PCMSG_KEY_AGREE_KEY_ENCRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3428:37 */ type _CMSG_KEY_AGREE_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FUserKeyingMaterial CRYPT_DATA_BLOB FdwOriginatorChoice DWORD F__ccgo_pad1 [4]byte F__56 struct { FOriginatorCertId CERT_ID F__ccgo_pad1 [8]byte } FcKeyAgreeKeyEncryptInfo DWORD F__ccgo_pad2 [4]byte FrgpKeyAgreeKeyEncryptInfo uintptr FdwFlags DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3430:11 */ type CMSG_KEY_AGREE_ENCRYPT_INFO = _CMSG_KEY_AGREE_ENCRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3443:5 */ type PCMSG_KEY_AGREE_ENCRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3443:33 */ type PFN_CMSG_EXPORT_KEY_AGREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3456:19 */ type _CMSG_MAIL_LIST_ENCRYPT_INFO = struct { FcbSize DWORD FdwRecipientIndex DWORD FKeyEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FEncryptedKey CRYPT_DATA_BLOB FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3458:11 */ type CMSG_MAIL_LIST_ENCRYPT_INFO = _CMSG_MAIL_LIST_ENCRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3464:5 */ type PCMSG_MAIL_LIST_ENCRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3464:33 */ type PFN_CMSG_EXPORT_MAIL_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3478:19 */ type PFN_CMSG_IMPORT_KEY_TRANS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3479:19 */ type PFN_CMSG_IMPORT_KEY_AGREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3480:19 */ type PFN_CMSG_IMPORT_MAIL_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3481:19 */ type _CMSG_CNG_CONTENT_DECRYPT_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpfnAlloc PFN_CMSG_ALLOC FpfnFree PFN_CMSG_FREE FhNCryptKey NCRYPT_KEY_HANDLE FpbContentEncryptKey uintptr FcbContentEncryptKey DWORD F__ccgo_pad2 [4]byte FhCNGContentEncryptKey BCRYPT_KEY_HANDLE FpbCNGContentEncryptKeyObject uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3483:11 */ type CMSG_CNG_CONTENT_DECRYPT_INFO = _CMSG_CNG_CONTENT_DECRYPT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3493:5 */ type PCMSG_CNG_CONTENT_DECRYPT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3493:35 */ type PFN_CMSG_CNG_IMPORT_KEY_TRANS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3499:19 */ type PFN_CMSG_CNG_IMPORT_KEY_AGREE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3500:19 */ type PFN_CMSG_CNG_IMPORT_CONTENT_ENCRYPT_KEY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3501:19 */ type HCERTSTORE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3505:16 */ type _CERT_CONTEXT = struct { FdwCertEncodingType DWORD F__ccgo_pad1 [4]byte FpbCertEncoded uintptr FcbCertEncoded DWORD F__ccgo_pad2 [4]byte FpCertInfo PCERT_INFO FhCertStore HCERTSTORE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3507:11 */ type CERT_CONTEXT = _CERT_CONTEXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3513:5 */ type PCERT_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3513:18 */ type PCCERT_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3515:30 */ type _CRL_CONTEXT = struct { FdwCertEncodingType DWORD F__ccgo_pad1 [4]byte FpbCrlEncoded uintptr FcbCrlEncoded DWORD F__ccgo_pad2 [4]byte FpCrlInfo PCRL_INFO FhCertStore HCERTSTORE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3518:11 */ type CRL_CONTEXT = _CRL_CONTEXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3524:5 */ type PCRL_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3524:17 */ type PCCRL_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3526:29 */ type _CTL_CONTEXT = struct { FdwMsgAndCertEncodingType DWORD F__ccgo_pad1 [4]byte FpbCtlEncoded uintptr FcbCtlEncoded DWORD F__ccgo_pad2 [4]byte FpCtlInfo PCTL_INFO FhCertStore HCERTSTORE FhCryptMsg HCRYPTMSG FpbCtlContent uintptr FcbCtlContent DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3528:11 */ type CTL_CONTEXT = _CTL_CONTEXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3537:5 */ type PCTL_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3537:17 */ type PCCTL_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3539:29 */ type CertKeyType = uint32 /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3666:5 */ type _CRYPT_KEY_PROV_PARAM = struct { FdwParam DWORD F__ccgo_pad1 [4]byte FpbData uintptr FcbData DWORD FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3699:11 */ type CRYPT_KEY_PROV_PARAM = _CRYPT_KEY_PROV_PARAM /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3704:5 */ type PCRYPT_KEY_PROV_PARAM = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3704:26 */ type _CRYPT_KEY_PROV_INFO = struct { FpwszContainerName LPWSTR FpwszProvName LPWSTR FdwProvType DWORD FdwFlags DWORD FcProvParam DWORD F__ccgo_pad1 [4]byte FrgProvParam PCRYPT_KEY_PROV_PARAM FdwKeySpec DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3706:11 */ type CRYPT_KEY_PROV_INFO = _CRYPT_KEY_PROV_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3714:5 */ type PCRYPT_KEY_PROV_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3714:25 */ type _CERT_KEY_CONTEXT = struct { FcbSize DWORD F__ccgo_pad1 [4]byte F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3721:11 */ type CERT_KEY_CONTEXT = _CERT_KEY_CONTEXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3728:5 */ type PCERT_KEY_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3728:22 */ type _ROOT_INFO_LUID = struct { FLowPart DWORD FHighPart LONG } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3730:11 */ type ROOT_INFO_LUID = _ROOT_INFO_LUID /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3733:5 */ type PROOT_INFO_LUID = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3733:20 */ type _CRYPT_SMART_CARD_ROOT_INFO = struct { FrgbCardID [16]BYTE Fluid ROOT_INFO_LUID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3735:11 */ type CRYPT_SMART_CARD_ROOT_INFO = _CRYPT_SMART_CARD_ROOT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3738:5 */ type PCRYPT_SMART_CARD_ROOT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3738:32 */ type _CERT_SYSTEM_STORE_RELOCATE_PARA = struct { F__0 struct{ FhKeyBase HKEY } F__8 struct{ FpvSystemStore uintptr } } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3814:11 */ type CERT_SYSTEM_STORE_RELOCATE_PARA = _CERT_SYSTEM_STORE_RELOCATE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3824:5 */ type PCERT_SYSTEM_STORE_RELOCATE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3824:37 */ type _CERT_REGISTRY_STORE_CLIENT_GPT_PARA = struct { FhKeyBase HKEY FpwszRegPath LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3937:11 */ type CERT_REGISTRY_STORE_CLIENT_GPT_PARA = _CERT_REGISTRY_STORE_CLIENT_GPT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3940:5 */ type PCERT_REGISTRY_STORE_CLIENT_GPT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3940:41 */ type _CERT_REGISTRY_STORE_ROAMING_PARA = struct { FhKey HKEY FpwszStoreDirectory LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3944:11 */ type CERT_REGISTRY_STORE_ROAMING_PARA = _CERT_REGISTRY_STORE_ROAMING_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3947:5 */ type PCERT_REGISTRY_STORE_ROAMING_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3947:38 */ type _CERT_LDAP_STORE_OPENED_PARA = struct { FpvLdapSessionHandle uintptr FpwszLdapUrl LPCWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3959:11 */ type CERT_LDAP_STORE_OPENED_PARA = _CERT_LDAP_STORE_OPENED_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3962:5 */ type PCERT_LDAP_STORE_OPENED_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3962:33 */ type HCERTSTOREPROV = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3968:16 */ type _CERT_STORE_PROV_INFO = struct { FcbSize DWORD FcStoreProvFunc DWORD FrgpvStoreProvFunc uintptr FhStoreProv HCERTSTOREPROV FdwStoreProvFlags DWORD F__ccgo_pad1 [4]byte FhStoreProvFuncAddr2 HCRYPTOIDFUNCADDR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3972:11 */ type CERT_STORE_PROV_INFO = _CERT_STORE_PROV_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3979:5 */ type PCERT_STORE_PROV_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3979:26 */ type PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:3981:19 */ type PFN_CERT_STORE_PROV_CLOSE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4017:16 */ type PFN_CERT_STORE_PROV_READ_CERT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4018:19 */ type PFN_CERT_STORE_PROV_WRITE_CERT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4019:19 */ type PFN_CERT_STORE_PROV_DELETE_CERT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4020:19 */ type PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4021:19 */ type PFN_CERT_STORE_PROV_READ_CRL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4022:19 */ type PFN_CERT_STORE_PROV_WRITE_CRL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4023:19 */ type PFN_CERT_STORE_PROV_DELETE_CRL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4024:19 */ type PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4025:19 */ type PFN_CERT_STORE_PROV_READ_CTL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4026:19 */ type PFN_CERT_STORE_PROV_WRITE_CTL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4027:19 */ type PFN_CERT_STORE_PROV_DELETE_CTL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4028:19 */ type PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4029:19 */ type PFN_CERT_STORE_PROV_CONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4030:19 */ type _CERT_STORE_PROV_FIND_INFO = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FdwFindFlags DWORD FdwFindType DWORD FpvFindPara uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4032:11 */ type CERT_STORE_PROV_FIND_INFO = _CERT_STORE_PROV_FIND_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4038:5 */ type PCERT_STORE_PROV_FIND_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4038:31 */ type CCERT_STORE_PROV_FIND_INFO = CERT_STORE_PROV_FIND_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4040:43 */ type PCCERT_STORE_PROV_FIND_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4040:70 */ type PFN_CERT_STORE_PROV_FIND_CERT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4042:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CERT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4043:19 */ type PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4044:19 */ type PFN_CERT_STORE_PROV_FIND_CRL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4045:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CRL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4046:19 */ type PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4047:19 */ type PFN_CERT_STORE_PROV_FIND_CTL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4048:19 */ type PFN_CERT_STORE_PROV_FREE_FIND_CTL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4049:19 */ type PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4050:19 */ type _CRL_FIND_ISSUED_FOR_PARA = struct { FpSubjectCert PCCERT_CONTEXT FpIssuerCert PCCERT_CONTEXT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4152:11 */ type CRL_FIND_ISSUED_FOR_PARA = _CRL_FIND_ISSUED_FOR_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4155:5 */ type PCRL_FIND_ISSUED_FOR_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4155:30 */ type _CTL_ANY_SUBJECT_INFO = struct { FSubjectAlgorithm CRYPT_ALGORITHM_IDENTIFIER FSubjectIdentifier CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4157:11 */ type CTL_ANY_SUBJECT_INFO = _CTL_ANY_SUBJECT_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4160:5 */ type PCTL_ANY_SUBJECT_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4160:26 */ type _CTL_FIND_USAGE_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FSubjectUsage CTL_USAGE FListIdentifier CRYPT_DATA_BLOB FpSigner PCERT_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4272:11 */ type CTL_FIND_USAGE_PARA = _CTL_FIND_USAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4277:5 */ type PCTL_FIND_USAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4277:25 */ type _CTL_FIND_SUBJECT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpUsagePara PCTL_FIND_USAGE_PARA FdwSubjectType DWORD F__ccgo_pad2 [4]byte FpvSubject uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4279:11 */ type CTL_FIND_SUBJECT_PARA = _CTL_FIND_SUBJECT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4284:5 */ type PCTL_FIND_SUBJECT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4284:27 */ type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4286:19 */ type _CERT_CREATE_CONTEXT_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpfnFree PFN_CRYPT_FREE FpvFree uintptr FpfnSort PFN_CERT_CREATE_CONTEXT_SORT_FUNC FpvSort uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4288:11 */ type CERT_CREATE_CONTEXT_PARA = _CERT_CREATE_CONTEXT_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4294:5 */ type PCERT_CREATE_CONTEXT_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4294:30 */ type _CERT_SYSTEM_STORE_INFO = struct{ FcbSize DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4296:11 */ type CERT_SYSTEM_STORE_INFO = _CERT_SYSTEM_STORE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4298:5 */ type PCERT_SYSTEM_STORE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4298:28 */ type _CERT_PHYSICAL_STORE_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszOpenStoreProvider LPSTR FdwOpenEncodingType DWORD FdwOpenFlags DWORD FOpenParameters CRYPT_DATA_BLOB FdwFlags DWORD FdwPriority DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4300:11 */ type CERT_PHYSICAL_STORE_INFO = _CERT_PHYSICAL_STORE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4308:5 */ type PCERT_PHYSICAL_STORE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4308:30 */ type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4328:19 */ type PFN_CERT_ENUM_SYSTEM_STORE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4329:19 */ type PFN_CERT_ENUM_PHYSICAL_STORE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4330:19 */ type _CTL_VERIFY_USAGE_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FListIdentifier CRYPT_DATA_BLOB FcCtlStore DWORD F__ccgo_pad2 [4]byte FrghCtlStore uintptr FcSignerStore DWORD F__ccgo_pad3 [4]byte FrghSignerStore uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4375:11 */ type CTL_VERIFY_USAGE_PARA = _CTL_VERIFY_USAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4382:5 */ type PCTL_VERIFY_USAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4382:27 */ type _CTL_VERIFY_USAGE_STATUS = struct { FcbSize DWORD FdwError DWORD FdwFlags DWORD F__ccgo_pad1 [4]byte FppCtl uintptr FdwCtlEntryIndex DWORD F__ccgo_pad2 [4]byte FppSigner uintptr FdwSignerIndex DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4384:11 */ type CTL_VERIFY_USAGE_STATUS = _CTL_VERIFY_USAGE_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4392:5 */ type PCTL_VERIFY_USAGE_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4392:29 */ type _CERT_REVOCATION_CRL_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpBaseCrlContext PCCRL_CONTEXT FpDeltaCrlContext PCCRL_CONTEXT FpCrlEntry PCRL_ENTRY FfDeltaCrlEntry WINBOOL F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4403:11 */ type CERT_REVOCATION_CRL_INFO = _CERT_REVOCATION_CRL_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4409:5 */ type PCERT_REVOCATION_CRL_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4409:30 */ type _CERT_REVOCATION_CHAIN_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhChainEngine HCERTCHAINENGINE FhAdditionalStore HCERTSTORE FdwChainFlags DWORD FdwUrlRetrievalTimeout DWORD FpftCurrentTime LPFILETIME FpftCacheResync LPFILETIME FcbMaxUrlRetrievalByteCount DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4411:11 */ type CERT_REVOCATION_CHAIN_PARA = _CERT_REVOCATION_CHAIN_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4411:46 */ type PCERT_REVOCATION_CHAIN_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4411:73 */ type _CERT_REVOCATION_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpIssuerCert PCCERT_CONTEXT FcCertStore DWORD F__ccgo_pad2 [4]byte FrgCertStore uintptr FhCrlStore HCERTSTORE FpftTimeToUse LPFILETIME } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4413:11 */ type CERT_REVOCATION_PARA = _CERT_REVOCATION_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4429:5 */ type PCERT_REVOCATION_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4429:26 */ type _CERT_REVOCATION_STATUS = struct { FcbSize DWORD FdwIndex DWORD FdwError DWORD FdwReason DWORD FfHasFreshnessTime WINBOOL FdwFreshnessTime DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4431:11 */ type CERT_REVOCATION_STATUS = _CERT_REVOCATION_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4438:5 */ type PCERT_REVOCATION_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4438:28 */ type _CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = struct { FCertSignHashCNGAlgPropData CRYPT_DATA_BLOB FCertIssuerPubKeyBitLengthPropData CRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4475:11 */ type CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = _CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4478:5 */ type PCRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4478:52 */ type PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4480:19 */ type PFN_CRYPT_SIGN_AND_ENCODE_HASH_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4481:19 */ type PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4482:19 */ type HCRYPTDEFAULTCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4484:16 */ type _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = struct { FcOID DWORD F__ccgo_pad1 [4]byte FrgpszOID uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4486:11 */ type CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = _CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4489:5 */ type PCRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4489:42 */ type PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4526:19 */ type PFN_IMPORT_PRIV_KEY_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4558:19 */ type PFN_EXPORT_PRIV_KEY_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4559:19 */ type PFN_CRYPT_GET_SIGNER_CERTIFICATE = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4627:26 */ type _CRYPT_SIGN_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FpSigningCert PCCERT_CONTEXT FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FcMsgCert DWORD F__ccgo_pad1 [4]byte FrgpMsgCert uintptr FcMsgCrl DWORD F__ccgo_pad2 [4]byte FrgpMsgCrl uintptr FcAuthAttr DWORD F__ccgo_pad3 [4]byte FrgAuthAttr PCRYPT_ATTRIBUTE FcUnauthAttr DWORD F__ccgo_pad4 [4]byte FrgUnauthAttr PCRYPT_ATTRIBUTE FdwFlags DWORD FdwInnerContentType DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4629:11 */ type CRYPT_SIGN_MESSAGE_PARA = _CRYPT_SIGN_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4649:5 */ type PCRYPT_SIGN_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4649:29 */ type _CRYPT_VERIFY_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FpfnGetSignerCertificate PFN_CRYPT_GET_SIGNER_CERTIFICATE FpvGetArg uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4656:11 */ type CRYPT_VERIFY_MESSAGE_PARA = _CRYPT_VERIFY_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4665:5 */ type PCRYPT_VERIFY_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4665:31 */ type _CRYPT_ENCRYPT_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FContentEncryptionAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvEncryptionAuxInfo uintptr FdwFlags DWORD FdwInnerContentType DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4667:11 */ type CRYPT_ENCRYPT_MESSAGE_PARA = _CRYPT_ENCRYPT_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4675:5 */ type PCRYPT_ENCRYPT_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4675:32 */ type _CRYPT_DECRYPT_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD FcCertStore DWORD F__ccgo_pad1 [4]byte FrghCertStore uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4679:11 */ type CRYPT_DECRYPT_MESSAGE_PARA = _CRYPT_DECRYPT_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4687:5 */ type PCRYPT_DECRYPT_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4687:32 */ type _CRYPT_HASH_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4689:11 */ type CRYPT_HASH_MESSAGE_PARA = _CRYPT_HASH_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4695:5 */ type PCRYPT_HASH_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4695:29 */ type _CRYPT_KEY_SIGN_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgAndCertEncodingType DWORD F__8 struct{ FhCryptProv HCRYPTPROV } FdwKeySpec DWORD F__ccgo_pad1 [4]byte FHashAlgorithm CRYPT_ALGORITHM_IDENTIFIER FpvHashAuxInfo uintptr FPubKeyAlgorithm CRYPT_ALGORITHM_IDENTIFIER } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4697:11 */ type CRYPT_KEY_SIGN_MESSAGE_PARA = _CRYPT_KEY_SIGN_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4708:5 */ type PCRYPT_KEY_SIGN_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4708:33 */ type _CRYPT_KEY_VERIFY_MESSAGE_PARA = struct { FcbSize DWORD FdwMsgEncodingType DWORD FhCryptProv HCRYPTPROV_LEGACY } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4710:11 */ type CRYPT_KEY_VERIFY_MESSAGE_PARA = _CRYPT_KEY_VERIFY_MESSAGE_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4714:5 */ type PCRYPT_KEY_VERIFY_MESSAGE_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4714:35 */ type _CERT_CHAIN = struct { FcCerts DWORD F__ccgo_pad1 [4]byte Fcerts PCERT_BLOB FkeyLocatorInfo CRYPT_KEY_PROV_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4716:11 */ type CERT_CHAIN = _CERT_CHAIN /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4720:5 */ type PCERT_CHAIN = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4720:16 */ type HCRYPTASYNC = HANDLE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4793:18 */ type PHCRYPTASYNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4793:30 */ type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4794:16 */ type _CRYPT_BLOB_ARRAY = struct { FcBlob DWORD F__ccgo_pad1 [4]byte FrgBlob PCRYPT_DATA_BLOB } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4804:11 */ type CRYPT_BLOB_ARRAY = _CRYPT_BLOB_ARRAY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4807:5 */ type PCRYPT_BLOB_ARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4807:22 */ type _CRYPT_CREDENTIALS = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszCredentialsOid LPCSTR FpvCredentials LPVOID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4809:11 */ type CRYPT_CREDENTIALS = _CRYPT_CREDENTIALS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4813:5 */ type PCRYPT_CREDENTIALS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4813:23 */ type _CRYPT_PASSWORD_CREDENTIALSA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszUsername LPSTR FpszPassword LPSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4820:11 */ type CRYPT_PASSWORD_CREDENTIALSA = _CRYPT_PASSWORD_CREDENTIALSA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4824:5 */ type PCRYPT_PASSWORD_CREDENTIALSA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4824:33 */ type _CRYPT_PASSWORD_CREDENTIALSW = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszUsername LPWSTR FpszPassword LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4826:11 */ type CRYPT_PASSWORD_CREDENTIALSW = _CRYPT_PASSWORD_CREDENTIALSW /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4830:5 */ type PCRYPT_PASSWORD_CREDENTIALSW = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4830:33 */ type CRYPT_PASSWORD_CREDENTIALS = CRYPT_PASSWORD_CREDENTIALSA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4832:55 */ type PCRYPT_PASSWORD_CREDENTIALS = PCRYPT_PASSWORD_CREDENTIALSA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4833:56 */ type PFN_FREE_ENCODED_OBJECT_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4839:16 */ type _CRYPTNET_URL_CACHE_PRE_FETCH_INFO = struct { FcbSize DWORD FdwObjectType DWORD FdwError DWORD FdwReserved DWORD FThisUpdateTime FILETIME FNextUpdateTime FILETIME FPublishTime FILETIME } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4878:11 */ type CRYPTNET_URL_CACHE_PRE_FETCH_INFO = _CRYPTNET_URL_CACHE_PRE_FETCH_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4886:5 */ type PCRYPTNET_URL_CACHE_PRE_FETCH_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4886:39 */ type _CRYPTNET_URL_CACHE_FLUSH_INFO = struct { FcbSize DWORD FdwExemptSeconds DWORD FExpireTime FILETIME } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4896:11 */ type CRYPTNET_URL_CACHE_FLUSH_INFO = _CRYPTNET_URL_CACHE_FLUSH_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4900:5 */ type PCRYPTNET_URL_CACHE_FLUSH_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4900:35 */ type _CRYPTNET_URL_CACHE_RESPONSE_INFO = struct { FcbSize DWORD FwResponseType WORD FwResponseFlags WORD FLastModifiedTime FILETIME FdwMaxAge DWORD F__ccgo_pad1 [4]byte FpwszETag LPCWSTR FdwProxyId DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4905:11 */ type CRYPTNET_URL_CACHE_RESPONSE_INFO = _CRYPTNET_URL_CACHE_RESPONSE_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4913:5 */ type PCRYPTNET_URL_CACHE_RESPONSE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4913:38 */ type _CRYPT_RETRIEVE_AUX_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpLastSyncTime uintptr FdwMaxUrlRetrievalByteCount DWORD F__ccgo_pad2 [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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4920:11 */ type CRYPT_RETRIEVE_AUX_INFO = _CRYPT_RETRIEVE_AUX_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4931:5 */ type PCRYPT_RETRIEVE_AUX_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4931:29 */ type PFN_CRYPT_CANCEL_RETRIEVAL = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4940:19 */ type PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4948:16 */ type _CRYPT_ASYNC_RETRIEVAL_COMPLETION = struct { FpfnCompletion PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC FpvCompletion LPVOID } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4950:11 */ type CRYPT_ASYNC_RETRIEVAL_COMPLETION = _CRYPT_ASYNC_RETRIEVAL_COMPLETION /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4953:5 */ type PCRYPT_ASYNC_RETRIEVAL_COMPLETION = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4953:38 */ type PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4957:19 */ type _CRYPT_URL_ARRAY = struct { FcUrl DWORD F__ccgo_pad1 [4]byte FrgwszUrl uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4964:11 */ type CRYPT_URL_ARRAY = _CRYPT_URL_ARRAY /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4967:5 */ type PCRYPT_URL_ARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4967:21 */ type _CRYPT_URL_INFO = struct { FcbSize DWORD FdwSyncDeltaTime DWORD FcGroup DWORD F__ccgo_pad1 [4]byte FrgcGroupEntry uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4969:11 */ type CRYPT_URL_INFO = _CRYPT_URL_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4974:5 */ type PCRYPT_URL_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4974:20 */ type _CERT_CRL_CONTEXT_PAIR = struct { FpCertContext PCCERT_CONTEXT FpCrlContext PCCRL_CONTEXT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4994:11 */ type CERT_CRL_CONTEXT_PAIR = _CERT_CRL_CONTEXT_PAIR /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4997:5 */ type PCERT_CRL_CONTEXT_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4997:27 */ type PCCERT_CRL_CONTEXT_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:4999: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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5001:11 */ type CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = _CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5009:5 */ type PCRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5009:45 */ type PFN_CRYPT_ENUM_KEYID_PROP = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5011:19 */ type HCERTCHAINENGINE = HANDLE /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5243:18 */ type _CERT_CHAIN_ENGINE_CONFIG = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FhRestrictedRoot HCERTSTORE FhRestrictedTrust HCERTSTORE FhRestrictedOther HCERTSTORE FcAdditionalStore DWORD F__ccgo_pad2 [4]byte FrghAdditionalStore uintptr FdwFlags DWORD FdwUrlRetrievalTimeout DWORD FMaximumCachedCertificates DWORD FCycleDetectionModulus DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5245:11 */ type CERT_CHAIN_ENGINE_CONFIG = _CERT_CHAIN_ENGINE_CONFIG /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5263:5 */ type PCERT_CHAIN_ENGINE_CONFIG = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5263:30 */ type _CERT_TRUST_STATUS = struct { FdwErrorStatus DWORD FdwInfoStatus DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5273:11 */ type CERT_TRUST_STATUS = _CERT_TRUST_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5276:5 */ type PCERT_TRUST_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5276:23 */ type _CERT_REVOCATION_INFO = struct { FcbSize DWORD FdwRevocationResult DWORD FpszRevocationOid LPCSTR FpvOidSpecificInfo LPVOID FfHasFreshnessTime WINBOOL FdwFreshnessTime DWORD FpCrlInfo PCERT_REVOCATION_CRL_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5332:11 */ type CERT_REVOCATION_INFO = _CERT_REVOCATION_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5340:5 */ type PCERT_REVOCATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5340:26 */ type _CERT_TRUST_LIST_INFO = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpCtlEntry PCTL_ENTRY FpCtlContext PCCTL_CONTEXT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5342:11 */ type CERT_TRUST_LIST_INFO = _CERT_TRUST_LIST_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5346:5 */ type PCERT_TRUST_LIST_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5346:26 */ type _CERT_CHAIN_ELEMENT = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpCertContext PCCERT_CONTEXT FTrustStatus CERT_TRUST_STATUS FpRevocationInfo PCERT_REVOCATION_INFO FpIssuanceUsage PCERT_ENHKEY_USAGE FpApplicationUsage PCERT_ENHKEY_USAGE FpwszExtendedErrorInfo LPCWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5348:11 */ type CERT_CHAIN_ELEMENT = _CERT_CHAIN_ELEMENT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5356:5 */ type PCERT_CHAIN_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5356:24 */ type PCCERT_CHAIN_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5358: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 } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5360:11 */ type CERT_SIMPLE_CHAIN = _CERT_SIMPLE_CHAIN /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5368:5 */ type PCERT_SIMPLE_CHAIN = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5368:23 */ type PCCERT_SIMPLE_CHAIN = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5370:35 */ type _CERT_CHAIN_CONTEXT = struct { FcbSize DWORD FTrustStatus CERT_TRUST_STATUS FcChain DWORD FrgpChain uintptr FcLowerQualityChainContext DWORD F__ccgo_pad1 [4]byte FrgpLowerQualityChainContext uintptr FfHasRevocationFreshnessTime WINBOOL FdwRevocationFreshnessTime DWORD FdwCreateFlags DWORD FChainId GUID F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5372:11 */ type CERT_CHAIN_CONTEXT = _CERT_CHAIN_CONTEXT /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5372:38 */ type PCERT_CHAIN_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5372:57 */ type PCCERT_CHAIN_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5373:36 */ type _CERT_USAGE_MATCH = struct { FdwType DWORD F__ccgo_pad1 [4]byte FUsage CERT_ENHKEY_USAGE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5391:11 */ type CERT_USAGE_MATCH = _CERT_USAGE_MATCH /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5394:5 */ type PCERT_USAGE_MATCH = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5394:22 */ type _CTL_USAGE_MATCH = struct { FdwType DWORD F__ccgo_pad1 [4]byte FUsage CTL_USAGE } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5396:11 */ type CTL_USAGE_MATCH = _CTL_USAGE_MATCH /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5399:5 */ type PCTL_USAGE_MATCH = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5399:21 */ type _CERT_CHAIN_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FRequestedUsage CERT_USAGE_MATCH } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5401:11 */ type CERT_CHAIN_PARA = _CERT_CHAIN_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5413:5 */ type PCERT_CHAIN_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5413:21 */ type _CRL_REVOCATION_INFO = struct { FpCrlEntry PCRL_ENTRY FpCrlContext PCCRL_CONTEXT FpCrlIssuerChain PCCERT_CHAIN_CONTEXT } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5451:11 */ type CRL_REVOCATION_INFO = _CRL_REVOCATION_INFO /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5455:5 */ type PCRL_REVOCATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5455:25 */ type PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5461:19 */ type _CERT_CHAIN_FIND_BY_ISSUER_PARA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpszUsageIdentifier LPCSTR FdwKeySpec DWORD FdwAcquirePrivateKeyFlags DWORD FcIssuer DWORD F__ccgo_pad2 [4]byte FrgIssuer uintptr FpfnFindCallback PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK FpvFindArg uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5463:11 */ type CERT_CHAIN_FIND_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5476:5 */ type PCERT_CHAIN_FIND_ISSUER_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5476:33 */ type CERT_CHAIN_FIND_BY_ISSUER_PARA = _CERT_CHAIN_FIND_BY_ISSUER_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5476:63 */ type PCERT_CHAIN_FIND_BY_ISSUER_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5476:94 */ type _CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwFlags DWORD FpvExtraPolicyPara uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5485:11 */ type CERT_CHAIN_POLICY_PARA = _CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5489:5 */ type PCERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5489:28 */ type _CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FdwError DWORD FlChainIndex LONG FlElementIndex LONG FpvExtraPolicyStatus uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5491:11 */ type CERT_CHAIN_POLICY_STATUS = _CERT_CHAIN_POLICY_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5497:5 */ type PCERT_CHAIN_POLICY_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5497:30 */ type _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRegPolicySettings DWORD FpSignerInfo PCMSG_SIGNER_INFO } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5540:11 */ type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5544:5 */ type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5544:48 */ type _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FfCommercial WINBOOL } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5546:11 */ type AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = _AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5549:5 */ type PAUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5549:50 */ type _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRegPolicySettings DWORD FfCommercial WINBOOL } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5551:11 */ type AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = _AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5555:5 */ type PAUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5555:50 */ type _HTTPSPolicyCallbackData = struct { F__0 struct{ FcbStruct DWORD } FdwAuthType DWORD FfdwChecks DWORD F__ccgo_pad1 [4]byte FpwszServerName uintptr } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5560:11 */ type HTTPSPolicyCallbackData = _HTTPSPolicyCallbackData /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5568:5 */ type PHTTPSPolicyCallbackData = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5568:29 */ type SSL_EXTRA_CERT_CHAIN_POLICY_PARA = _HTTPSPolicyCallbackData /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5568:55 */ type PSSL_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5568:88 */ type _EV_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwRootProgramQualifierFlags DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5576:11 */ type EV_EXTRA_CERT_CHAIN_POLICY_PARA = _EV_EXTRA_CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5579:5 */ type PEV_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5579:37 */ type _EV_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FdwQualifiers DWORD FdwIssuanceUsageIndex DWORD } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5581:11 */ type EV_EXTRA_CERT_CHAIN_POLICY_STATUS = _EV_EXTRA_CERT_CHAIN_POLICY_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5585:5 */ type PEV_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5585:39 */ type _SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FdwErrorLevel DWORD FdwErrorCategory DWORD FdwReserved DWORD FwszErrorText [256]WCHAR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5588:11 */ type SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = _SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5594:5 */ type PSSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5594:45 */ type _SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwReserved DWORD FpwszServerName LPWSTR FrgpszHpkpValue [2]LPSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5608:11 */ type SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = _SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5613:5 */ type PSSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5613:51 */ type _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = struct { FcbSize DWORD FdwReserved DWORD FpwszServerName PCWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5615:11 */ type SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5619:5 */ type PSSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5619:47 */ type _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = struct { FcbSize DWORD FlError LONG FwszErrorText [512]WCHAR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5622:11 */ type SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = _SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5626:5 */ type PSSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5626:49 */ type _CRYPT_PKCS12_PBE_PARAMS = struct { FiIterations int32 FcbSalt ULONG } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5677:11 */ type CRYPT_PKCS12_PBE_PARAMS = _CRYPT_PKCS12_PBE_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5680:5 */ type _PKCS12_PBES2_EXPORT_PARAMS = struct { FdwSize DWORD F__ccgo_pad1 [4]byte FhNcryptDescriptor PVOID FpwszPbes2Alg LPWSTR } /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5729:11 */ type PKCS12_PBES2_EXPORT_PARAMS = _PKCS12_PBES2_EXPORT_PARAMS /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5733:5 */ type PPKCS12_PBES2_EXPORT_PARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/wincrypt.h:5733:33 */ // * // 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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/dpapi.h:70:5 */ type PCRYPTPROTECT_PROMPTSTRUCT = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winefs.h:22:5 */ type PEFS_CERTIFICATE_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:22:26 */ type _EFS_HASH_BLOB = struct { FcbData DWORD F__ccgo_pad1 [4]byte FpbData PBYTE } /* /usr/x86_64-w64-mingw32/include/winefs.h:24:11 */ type EFS_HASH_BLOB = _EFS_HASH_BLOB /* /usr/x86_64-w64-mingw32/include/winefs.h:27:5 */ type PEFS_HASH_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:27:19 */ type _EFS_RPC_BLOB = struct { FcbData DWORD F__ccgo_pad1 [4]byte FpbData PBYTE } /* /usr/x86_64-w64-mingw32/include/winefs.h:29:11 */ type EFS_RPC_BLOB = _EFS_RPC_BLOB /* /usr/x86_64-w64-mingw32/include/winefs.h:32:5 */ type PEFS_RPC_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:32:18 */ type _EFS_KEY_INFO = struct { FdwVersion DWORD FEntropy ULONG FAlgorithm ALG_ID FKeyLength ULONG } /* /usr/x86_64-w64-mingw32/include/winefs.h:34:11 */ type EFS_KEY_INFO = _EFS_KEY_INFO /* /usr/x86_64-w64-mingw32/include/winefs.h:39:5 */ type PEFS_KEY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:39:18 */ type _ENCRYPTION_CERTIFICATE = struct { FcbTotalLength DWORD F__ccgo_pad1 [4]byte FpUserSid uintptr FpCertBlob PEFS_CERTIFICATE_BLOB } /* /usr/x86_64-w64-mingw32/include/winefs.h:41:11 */ type ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE /* /usr/x86_64-w64-mingw32/include/winefs.h:45:5 */ type PENCRYPTION_CERTIFICATE = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:45:28 */ type _ENCRYPTION_CERTIFICATE_HASH = struct { FcbTotalLength DWORD F__ccgo_pad1 [4]byte FpUserSid uintptr FpHash PEFS_HASH_BLOB FlpDisplayInformation LPWSTR } /* /usr/x86_64-w64-mingw32/include/winefs.h:49:11 */ type ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH /* /usr/x86_64-w64-mingw32/include/winefs.h:54:5 */ type PENCRYPTION_CERTIFICATE_HASH = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:54:33 */ type _ENCRYPTION_CERTIFICATE_HASH_LIST = struct { FnCert_Hash DWORD F__ccgo_pad1 [4]byte FpUsers uintptr } /* /usr/x86_64-w64-mingw32/include/winefs.h:56:11 */ type ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST /* /usr/x86_64-w64-mingw32/include/winefs.h:59:5 */ type PENCRYPTION_CERTIFICATE_HASH_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/winefs.h:59:38 */ type _ENCRYPTION_CERTIFICATE_LIST = struct { FnUsers DWORD F__ccgo_pad1 [4]byte FpUsers uintptr } /* /usr/x86_64-w64-mingw32/include/winefs.h:61:11 */ type ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST /* /usr/x86_64-w64-mingw32/include/winefs.h:64:5 */ type PENCRYPTION_CERTIFICATE_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/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 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/rpcnsip.h:17:5 */ type PRPC_IMPORT_CONTEXT_P = uintptr /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:63:25 */ type Cs_byte = Byte /* /usr/x86_64-w64-mingw32/include/rpcndr.h:64:16 */ type Boolean = uint8 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:65:25 */ type NDR_CCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:128:16 */ type _NDR_SCONTEXT = struct { Fpad [2]uintptr FuserContext uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:130:11 */ type NDR_SCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:133:5 */ type NDR_RUNDOWN = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:139:16 */ type NDR_NOTIFY_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:140:16 */ type NDR_NOTIFY2_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:141:16 */ type _SCONTEXT_QUEUE = struct { FNumberOfObjects uint32 F__ccgo_pad1 [4]byte FArrayOfObjects uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:143:11 */ type SCONTEXT_QUEUE = _SCONTEXT_QUEUE /* /usr/x86_64-w64-mingw32/include/rpcndr.h:146:5 */ type PSCONTEXT_QUEUE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:146:20 */ type Error_status_t = uint32 /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [4]byte FPointerBufferMark uintptr FfBufferValid uint8 FuFlags uint8 FUniquePtrCount uint16 F__ccgo_pad2 [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 */ F__ccgo_pad3 [4]byte FdwDestContext uint32 F__ccgo_pad4 [4]byte FpvDestContext uintptr FSavedContextHandles uintptr FParamNumber int32 F__ccgo_pad5 [4]byte FpRpcChannelBuffer uintptr FpArrayInfo PARRAY_INFO FSizePtrCountArray uintptr FSizePtrOffsetArray uintptr FSizePtrLengthArray uintptr FpArgQueue uintptr FdwStubPhase uint32 F__ccgo_pad6 [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 } /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [4]byte FCommFaultOffsets uintptr FaUserMarshalQuadruple uintptr FNotifyRoutineTable uintptr FmFlags ULONG_PTR FCsRoutineTables uintptr FReserved4 uintptr FReserved5 ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type _FULL_PTR_XLAT_TABLES = struct { FRefIdToPointer struct { FXlatTable uintptr FStateTable uintptr FNumberOfEntries uint32 F__ccgo_pad1 [4]byte } FPointerToRefId struct { FXlatTable uintptr FNumberOfBuckets uint32 FHashMask uint32 } FNextRefId uint32 FXlatSide XLAT_SIDE } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type RPC_BUFPTR = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:215:25 */ type RPC_LENGTH = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:216:29 */ type EXPR_EVAL = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:217:16 */ type PFORMAT_STRING = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:218:31 */ type ARRAY_INFO = struct { FDimension int32 F__ccgo_pad1 [4]byte FBufferConformanceMark uintptr FBufferVarianceMark uintptr FMaxCountArray uintptr FOffsetArray uintptr FActualCountArray uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:227:5 */ type PARRAY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:227:16 */ type PNDR_ASYNC_MESSAGE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:229:37 */ type PNDR_CORRELATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:230:40 */ type CS_STUB_INFO = struct { FWireCodeset uint32 FDesiredReceivingCodeset uint32 FCSArrayInfo uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:236:5 */ type _MIDL_SYNTAX_INFO = struct { FTransferSyntax RPC_SYNTAX_IDENTIFIER F__ccgo_pad1 [4]byte FDispatchTable uintptr FProcString PFORMAT_STRING FFmtStringOffset uintptr FTypeString PFORMAT_STRING FaUserMarshalQuadruple uintptr FpReserved1 ULONG_PTR FpReserved2 ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:238:3 */ type MIDL_SYNTAX_INFO = _MIDL_SYNTAX_INFO /* /usr/x86_64-w64-mingw32/include/rpcndr.h:239:36 */ type PMIDL_SYNTAX_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:239:53 */ type IRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type MIDL_STUB_MESSAGE = _MIDL_STUB_MESSAGE /* /usr/x86_64-w64-mingw32/include/rpcndr.h:318:5 */ type PMIDL_STUB_MESSAGE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:318:23 */ type GENERIC_BINDING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:320:16 */ type GENERIC_UNBIND_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:321:16 */ type _GENERIC_BINDING_ROUTINE_PAIR = struct { FpfnBind GENERIC_BINDING_ROUTINE FpfnUnbind GENERIC_UNBIND_ROUTINE } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type GENERIC_BINDING_ROUTINE_PAIR = _GENERIC_BINDING_ROUTINE_PAIR /* /usr/x86_64-w64-mingw32/include/rpcndr.h:326:5 */ type PGENERIC_BINDING_ROUTINE_PAIR = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:326:34 */ type __GENERIC_BINDING_INFO = struct { FpObj uintptr FSize uint32 F__ccgo_pad1 [4]byte FpfnBind GENERIC_BINDING_ROUTINE FpfnUnbind GENERIC_UNBIND_ROUTINE } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:328:11 */ type GENERIC_BINDING_INFO = __GENERIC_BINDING_INFO /* /usr/x86_64-w64-mingw32/include/rpcndr.h:333:5 */ type PGENERIC_BINDING_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:333:26 */ type XMIT_HELPER_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type XMIT_ROUTINE_QUINTUPLE = _XMIT_ROUTINE_QUINTUPLE /* /usr/x86_64-w64-mingw32/include/rpcndr.h:344:5 */ type PXMIT_ROUTINE_QUINTUPLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:344:28 */ type USER_MARSHAL_SIZING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:346:17 */ type USER_MARSHAL_MARSHALLING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:347:25 */ type USER_MARSHAL_UNMARSHALLING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:348:25 */ type USER_MARSHAL_FREEING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type USER_MARSHAL_ROUTINE_QUADRUPLE = _USER_MARSHAL_ROUTINE_QUADRUPLE /* /usr/x86_64-w64-mingw32/include/rpcndr.h:356:5 */ type USER_MARSHAL_CB_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:362:5 */ type _USER_MARSHAL_CB = struct { FFlags uint32 F__ccgo_pad1 [4]byte FpStubMsg PMIDL_STUB_MESSAGE FpReserve PFORMAT_STRING FSignature uint32 FCBType USER_MARSHAL_CB_TYPE FpFormat PFORMAT_STRING FpTypeFormat PFORMAT_STRING } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:364:11 */ type USER_MARSHAL_CB = _USER_MARSHAL_CB /* /usr/x86_64-w64-mingw32/include/rpcndr.h:372:5 */ type _MALLOC_FREE_STRUCT = struct { FpfnAllocate uintptr FpfnFree uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type MALLOC_FREE_STRUCT = _MALLOC_FREE_STRUCT /* /usr/x86_64-w64-mingw32/include/rpcndr.h:384:5 */ type _COMM_FAULT_OFFSETS = struct { FCommOffset int16 FFaultOffset int16 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type COMM_FAULT_OFFSETS = _COMM_FAULT_OFFSETS /* /usr/x86_64-w64-mingw32/include/rpcndr.h:389:5 */ type IDL_CS_CONVERT = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:393:5 */ type CS_TYPE_NET_SIZE_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:395:16 */ type CS_TYPE_LOCAL_SIZE_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:396:16 */ type CS_TYPE_TO_NETCS_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:397:16 */ type CS_TYPE_FROM_NETCS_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:398:16 */ type CS_TAG_GETTING_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type NDR_CS_SIZE_CONVERT_ROUTINES = _NDR_CS_SIZE_CONVERT_ROUTINES /* /usr/x86_64-w64-mingw32/include/rpcndr.h:408:5 */ type _NDR_CS_ROUTINES = struct { FpSizeConvertRoutines uintptr FpTagGettingRoutines uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type NDR_CS_ROUTINES = _NDR_CS_ROUTINES /* /usr/x86_64-w64-mingw32/include/rpcndr.h:413:5 */ type MIDL_STUB_DESC = _MIDL_STUB_DESC /* /usr/x86_64-w64-mingw32/include/rpcndr.h:440:5 */ type PMIDL_STUB_DESC = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:442:32 */ type PMIDL_XMIT_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:443:16 */ type _MIDL_FORMAT_STRING = struct { F__ccgo_pad1 [0]uint16 FPad int16 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:445:11 */ type MIDL_FORMAT_STRING = _MIDL_FORMAT_STRING /* /usr/x86_64-w64-mingw32/include/rpcndr.h:448:5 */ type STUB_THUNK = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:450:16 */ type SERVER_ROUTINE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:453:11 */ type MIDL_SERVER_INFO = _MIDL_SERVER_INFO_ /* /usr/x86_64-w64-mingw32/include/rpcndr.h:462:5 */ type PMIDL_SERVER_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:466:11 */ type MIDL_STUBLESS_PROXY_INFO = _MIDL_STUBLESS_PROXY_INFO /* /usr/x86_64-w64-mingw32/include/rpcndr.h:473:5 */ type PMIDL_STUBLESS_PROXY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:475:36 */ type PARAM_OFFSETTABLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:488:26 */ type PPARAM_OFFSETTABLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:488:45 */ type _CLIENT_CALL_RETURN = struct{ FPointer uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:490:11 */ type CLIENT_CALL_RETURN = _CLIENT_CALL_RETURN /* /usr/x86_64-w64-mingw32/include/rpcndr.h:493:5 */ type XLAT_SIDE = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:497:5 */ type _FULL_PTR_TO_REFID_ELEMENT = struct { FNext uintptr FPointer uintptr FRefId uint32 FState uint8 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:499:11 */ type FULL_PTR_TO_REFID_ELEMENT = _FULL_PTR_TO_REFID_ELEMENT /* /usr/x86_64-w64-mingw32/include/rpcndr.h:504:5 */ type PFULL_PTR_TO_REFID_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:504:31 */ type FULL_PTR_XLAT_TABLES = _FULL_PTR_XLAT_TABLES /* /usr/x86_64-w64-mingw32/include/rpcndr.h:520:5 */ type PFULL_PTR_XLAT_TABLES = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:520:26 */ type STUB_PHASE = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:674:5 */ type PROXY_PHASE = uint32 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:678:5 */ type IRpcStubBuffer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:680:3 */ type RPC_SS_THREAD_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/rpcndr.h:705:16 */ type _NDR_USER_MARSHAL_INFO_LEVEL1 = struct { FBuffer uintptr FBufferSize uint32 F__ccgo_pad1 [4]byte FpfnAllocate uintptr FpfnFree uintptr FpRpcChannelBuffer uintptr FReserved [5]ULONG_PTR } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:763:11 */ type NDR_USER_MARSHAL_INFO_LEVEL1 = _NDR_USER_MARSHAL_INFO_LEVEL1 /* /usr/x86_64-w64-mingw32/include/rpcndr.h:770:5 */ type _NDR_USER_MARSHAL_INFO = struct { FInformationLevel uint32 F__ccgo_pad1 [4]byte F__8 struct{ FLevel1 NDR_USER_MARSHAL_INFO_LEVEL1 } } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:772:11 */ type NDR_USER_MARSHAL_INFO = _NDR_USER_MARSHAL_INFO /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:144:3 */ type IRpcStubBuffer = IRpcStubBuffer1 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:146:34 */ type IRpcChannelBuffer = IRpcChannelBuffer1 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:147:37 */ type COINITBASE = uint32 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:151:3 */ type OLECHAR = WCHAR /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:69:15 */ type LPOLESTR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:70:17 */ type LPCOLESTR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:71:23 */ type DOUBLE = float64 /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:94:16 */ type _COAUTHIDENTITY = struct { FUser uintptr FUserLength ULONG F__ccgo_pad1 [4]byte FDomain uintptr FDomainLength ULONG F__ccgo_pad2 [4]byte FPassword uintptr FPasswordLength ULONG FFlags ULONG } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:185:9 */ type COAUTHIDENTITY = _COAUTHIDENTITY /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:193:3 */ type _COAUTHINFO = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpwszServerPrincName LPWSTR FdwAuthnLevel DWORD FdwImpersonationLevel DWORD FpAuthIdentityData uintptr FdwCapabilities DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:195:9 */ type COAUTHINFO = _COAUTHINFO /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:203:3 */ type SCODE = LONG /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:205:14 */ type PSCODE = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:206:15 */ type MEMCTX = int32 /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:239:3 */ type CLSCTX = int32 /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:294:3 */ type MSHLFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:307:3 */ type MSHCTX = uint32 /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:315:3 */ type _BYTE_BLOB = struct { FclSize ULONG FabData [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:317:9 */ type BYTE_BLOB = _BYTE_BLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:320:3 */ type UP_BYTE_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:322:19 */ type _WORD_BLOB = struct { FclSize ULONG FasData [1]uint16 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:324:9 */ type WORD_BLOB = _WORD_BLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:327:3 */ type UP_WORD_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:329:19 */ type _DWORD_BLOB = struct { FclSize ULONG FalData [1]ULONG } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:331:9 */ type DWORD_BLOB = _DWORD_BLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:334:3 */ type UP_DWORD_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:336:20 */ type _FLAGGED_BYTE_BLOB = struct { FfFlags ULONG FclSize ULONG FabData [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:338:9 */ type FLAGGED_BYTE_BLOB = _FLAGGED_BYTE_BLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:342:3 */ type UP_FLAGGED_BYTE_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:344:27 */ type _FLAGGED_WORD_BLOB = struct { FfFlags ULONG FclSize ULONG FasData [1]uint16 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:346:9 */ type FLAGGED_WORD_BLOB = _FLAGGED_WORD_BLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:350:3 */ type UP_FLAGGED_WORD_BLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:352:27 */ type _BYTE_SIZEDARR = struct { FclSize ULONG F__ccgo_pad1 [4]byte FpData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:354:9 */ type BYTE_SIZEDARR = _BYTE_SIZEDARR /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:357:3 */ type _SHORT_SIZEDARR = struct { FclSize ULONG F__ccgo_pad1 [4]byte FpData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:359:9 */ type WORD_SIZEDARR = _SHORT_SIZEDARR /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:362:3 */ type _LONG_SIZEDARR = struct { FclSize ULONG F__ccgo_pad1 [4]byte FpData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:364:9 */ type DWORD_SIZEDARR = _LONG_SIZEDARR /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:367:3 */ type _HYPER_SIZEDARR = struct { FclSize ULONG F__ccgo_pad1 [4]byte FpData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:369:9 */ type HYPER_SIZEDARR = _HYPER_SIZEDARR /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:372:3 */ type tagBLOB = struct { FcbSize ULONG F__ccgo_pad1 [4]byte FpBlobData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:383:9 */ type BLOB = tagBLOB /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:386:3 */ type LPBLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypesbase.h:387:24 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.14 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 } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:23:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.14 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 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:23:28 */ type AsyncIUnknown1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:31:9 */ type AsyncIUnknown = AsyncIUnknown1 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:31:33 */ type IClassFactory1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:39:9 */ type IClassFactory = IClassFactory1 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:39:33 */ // Headers for imported files //** Autogenerated by WIDL 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:68:18 */ type IUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:23:9 */ type IUnknownVtbl = IUnknownVtbl1 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:138: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 } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:31:9 */ type AsyncIUnknownVtbl = AsyncIUnknownVtbl1 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:244:3 */ // **************************************************************************** // // IClassFactory interface type LPCLASSFACTORY = uintptr /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:310:23 */ type IClassFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateInstance uintptr FLockServer uintptr } /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:39:9 */ type IClassFactoryVtbl = IClassFactoryVtbl1 /* /usr/x86_64-w64-mingw32/include/unknwnbase.h:357:3 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:23:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:23:28 */ type INoMarshal1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:31:9 */ type INoMarshal = INoMarshal1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:31:30 */ type IAgileObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:39:9 */ type IAgileObject = IAgileObject1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:39:32 */ type IAgileReference1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:47:9 */ type IAgileReference = IAgileReference1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:47:35 */ type IMarshal21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:55:9 */ type IMarshal2 = IMarshal21 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:55:29 */ type IMalloc1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:63:9 */ type IMalloc = IMalloc1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:63:27 */ type IStdMarshalInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:71:9 */ type IStdMarshalInfo = IStdMarshalInfo1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:71:35 */ type IExternalConnection1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:79:9 */ type IExternalConnection = IExternalConnection1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:79:39 */ type IMultiQI1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:87:9 */ type IMultiQI = IMultiQI1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:87:28 */ type AsyncIMultiQI1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:95:9 */ type AsyncIMultiQI = AsyncIMultiQI1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:95:33 */ type IInternalUnknown1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:103:9 */ type IInternalUnknown = IInternalUnknown1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:103:36 */ type IEnumUnknown1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:111:9 */ type IEnumUnknown = IEnumUnknown1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:111:32 */ type IEnumString1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:119:9 */ type IEnumString = IEnumString1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:119:31 */ type ISequentialStream1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:127:9 */ type ISequentialStream = ISequentialStream1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:127:37 */ type IStream1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:135:9 */ type IStream = IStream1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:135:27 */ type IRpcChannelBuffer21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:151:9 */ type IRpcChannelBuffer2 = IRpcChannelBuffer21 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:151:38 */ type IAsyncRpcChannelBuffer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:159:9 */ type IAsyncRpcChannelBuffer = IAsyncRpcChannelBuffer1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:159:42 */ type IRpcChannelBuffer31 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:167:9 */ type IRpcChannelBuffer3 = IRpcChannelBuffer31 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:167:38 */ type IRpcSyntaxNegotiate1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:175:9 */ type IRpcSyntaxNegotiate = IRpcSyntaxNegotiate1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:175:39 */ type IRpcProxyBuffer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:183:9 */ type IRpcProxyBuffer = IRpcProxyBuffer1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:183:35 */ type IPSFactoryBuffer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:199:9 */ type IPSFactoryBuffer = IPSFactoryBuffer1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:199:36 */ type IChannelHook1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:207:9 */ type IChannelHook = IChannelHook1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:207:32 */ type IClientSecurity1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:215:9 */ type IClientSecurity = IClientSecurity1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:215:35 */ type IServerSecurity1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:223:9 */ type IServerSecurity = IServerSecurity1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:223:35 */ type IRpcOptions1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:231:9 */ type IRpcOptions = IRpcOptions1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:231:31 */ type IGlobalOptions1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:239:9 */ type IGlobalOptions = IGlobalOptions1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:239:34 */ type ISurrogate1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:247:9 */ type ISurrogate = ISurrogate1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:247:30 */ type IGlobalInterfaceTable1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:255:9 */ type IGlobalInterfaceTable = IGlobalInterfaceTable1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:255:41 */ type ISynchronize1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:263:9 */ type ISynchronize = ISynchronize1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:263:32 */ type ISynchronizeHandle1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:271:9 */ type ISynchronizeHandle = ISynchronizeHandle1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:271:38 */ type ISynchronizeEvent1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:279:9 */ type ISynchronizeEvent = ISynchronizeEvent1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:279:37 */ type ISynchronizeContainer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:287:9 */ type ISynchronizeContainer = ISynchronizeContainer1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:287:41 */ type ISynchronizeMutex1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:295:9 */ type ISynchronizeMutex = ISynchronizeMutex1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:295:37 */ type ICancelMethodCalls1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:303:9 */ type ICancelMethodCalls = ICancelMethodCalls1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:303:38 */ type IAsyncManager1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:311:9 */ type IAsyncManager = IAsyncManager1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:311:33 */ type ICallFactory1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:319:9 */ type ICallFactory = ICallFactory1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:319:32 */ type IRpcHelper1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:327:9 */ type IRpcHelper = IRpcHelper1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:327:30 */ type IReleaseMarshalBuffers1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:335:9 */ type IReleaseMarshalBuffers = IReleaseMarshalBuffers1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:335:42 */ type IWaitMultiple1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:343:9 */ type IWaitMultiple = IWaitMultiple1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:343:33 */ type IAddrTrackingControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:351:9 */ type IAddrTrackingControl = IAddrTrackingControl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:351:40 */ type IAddrExclusionControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:359:9 */ type IAddrExclusionControl = IAddrExclusionControl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:359:41 */ type IPipeByte1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:367:9 */ type IPipeByte = IPipeByte1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:367:29 */ type IPipeLong1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:375:9 */ type IPipeLong = IPipeLong1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:375:29 */ type IPipeDouble1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:383:9 */ type IPipeDouble = IPipeDouble1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:383:31 */ type IComThreadingInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:407:9 */ type IComThreadingInfo = IComThreadingInfo1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:407:37 */ type IProcessInitControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:415:9 */ type IProcessInitControl = IProcessInitControl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:415:39 */ type IFastRundown1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:423:9 */ type IFastRundown = IFastRundown1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:423:32 */ type IMarshalingStream1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:431:9 */ type IMarshalingStream = IMarshalingStream1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:431:37 */ // Headers for imported files //** Autogenerated by WIDL 4.14 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 4.12.1 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 F__ccgo_pad1 [4]byte FpwszName LPWSTR FpAuthInfo uintptr FdwReserved2 DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:522:9 */ // Headers for imported files //** Autogenerated by WIDL 4.14 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 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:527:3 */ // **************************************************************************** // // IMarshal interface type LPMARSHAL = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:535:18 */ type IMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetUnmarshalClass uintptr FGetMarshalSizeMax uintptr FMarshalInterface uintptr FUnmarshalInterface uintptr FReleaseMarshalData uintptr FDisconnectObject uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:23:9 */ type IMarshalVtbl = IMarshalVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:639:3 */ type INoMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:31:9 */ type INoMarshalVtbl = INoMarshalVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:729:3 */ type IAgileObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:39:9 */ type IAgileObjectVtbl = IAgileObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:793:3 */ type IAgileReferenceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FResolve uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:47:9 */ type IAgileReferenceVtbl = IAgileReferenceVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:866:3 */ // **************************************************************************** // // IMarshal2 interface type LPMARSHAL2 = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:912:19 */ type IMarshal2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetUnmarshalClass uintptr FGetMarshalSizeMax uintptr FMarshalInterface uintptr FUnmarshalInterface uintptr FReleaseMarshalData uintptr FDisconnectObject uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:55:9 */ type IMarshal2Vtbl = IMarshal2Vtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:981:3 */ // **************************************************************************** // // IMalloc interface type LPMALLOC = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1045:17 */ type IMallocVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAlloc uintptr FRealloc uintptr FFree uintptr FGetSize uintptr FDidAlloc uintptr FHeapMinimize uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:63:9 */ type IMallocVtbl = IMallocVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1117:3 */ // **************************************************************************** // // IStdMarshalInfo interface type LPSTDMARSHALINFO = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1181:25 */ type IStdMarshalInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassForHandler uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:71:9 */ type IStdMarshalInfoVtbl = IStdMarshalInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1221:3 */ // **************************************************************************** // // IExternalConnection interface type LPEXTERNALCONNECTION = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1265:29 */ type EXTCONN = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1271:3 */ type IExternalConnectionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddConnection uintptr FReleaseConnection uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:79:9 */ type IExternalConnectionVtbl = IExternalConnectionVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1320:3 */ type LPMULTIQI = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1362:18 */ type tagMULTI_QI = struct { FpIID uintptr FpItf uintptr Fhr HRESULT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1366:9 */ type MULTI_QI = tagMULTI_QI /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1370:3 */ type IMultiQIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryMultipleInterfaces uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:87:9 */ type IMultiQIVtbl = IMultiQIVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1414:3 */ type AsyncIMultiQIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBegin_QueryMultipleInterfaces uintptr FFinish_QueryMultipleInterfaces uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:95:9 */ type AsyncIMultiQIVtbl = AsyncIMultiQIVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1500:3 */ type IInternalUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryInternalInterface uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:103:9 */ type IInternalUnknownVtbl = IInternalUnknownVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1586:3 */ // **************************************************************************** // // IEnumUnknown interface type LPENUMUNKNOWN = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1632:22 */ type IEnumUnknownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:111:9 */ type IEnumUnknownVtbl = IEnumUnknownVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1692:3 */ // **************************************************************************** // // IEnumString interface type LPENUMSTRING = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1768:21 */ type IEnumStringVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:119:9 */ type IEnumStringVtbl = IEnumStringVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1828:3 */ type ISequentialStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:127:9 */ type ISequentialStreamVtbl = ISequentialStreamVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:1953:3 */ // **************************************************************************** // // IStream interface type LPSTREAM = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2041:17 */ type tagSTATSTG = struct { FpwcsName LPOLESTR Ftype DWORD F__ccgo_pad1 [4]byte FcbSize ULARGE_INTEGER Fmtime FILETIME Fctime FILETIME Fatime FILETIME FgrfMode DWORD FgrfLocksSupported DWORD Fclsid CLSID FgrfStateBits DWORD Freserved DWORD } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2043:9 */ type STATSTG = tagSTATSTG /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2055:3 */ type STGTY = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2062:3 */ type STREAM_SEEK = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2068:3 */ type LOCKTYPE = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2074: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 } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:135:9 */ type IStreamVtbl = IStreamVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2198:3 */ // **************************************************************************** // // IRpcChannelBuffer interface type RPCOLEDATAREP = ULONG /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2327:15 */ type tagRPCOLEMESSAGE = struct { Freserved1 uintptr FdataRepresentation RPCOLEDATAREP F__ccgo_pad1 [4]byte FBuffer uintptr FcbBuffer ULONG FiMethod ULONG Freserved2 [5]uintptr FrpcFlags ULONG F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2329:9 */ type RPCOLEMESSAGE = tagRPCOLEMESSAGE /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2337:3 */ type PRPCOLEMESSAGE = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2339:23 */ type IRpcChannelBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:211:3 */ type IRpcChannelBufferVtbl = IRpcChannelBufferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2408:3 */ type IRpcChannelBuffer2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBuffer uintptr FSendReceive uintptr FFreeBuffer uintptr FGetDestCtx uintptr FIsConnected uintptr FGetProtocolVersion uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:151:9 */ type IRpcChannelBuffer2Vtbl = IRpcChannelBuffer2Vtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2527: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 } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:159:9 */ type IAsyncRpcChannelBufferVtbl = IAsyncRpcChannelBufferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2679: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 } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:167:9 */ type IRpcChannelBuffer3Vtbl = IRpcChannelBuffer3Vtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:2881:3 */ type IRpcSyntaxNegotiateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNegotiateSyntax uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:175:9 */ type IRpcSyntaxNegotiateVtbl = IRpcSyntaxNegotiateVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3011:3 */ type IRpcProxyBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FConnect uintptr FDisconnect uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:183:9 */ type IRpcProxyBufferVtbl = IRpcProxyBufferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3095:3 */ type IRpcStubBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FConnect uintptr FDisconnect uintptr FInvoke uintptr FIsIIDSupported uintptr FCountRefs uintptr FDebugServerQueryInterface uintptr FDebugServerRelease uintptr } /* /usr/x86_64-w64-mingw32/include/rpcndr.h:680:3 */ type IRpcStubBufferVtbl = IRpcStubBufferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3221:3 */ type IPSFactoryBufferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateProxy uintptr FCreateStub uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:199:9 */ type IPSFactoryBufferVtbl = IPSFactoryBufferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3340:3 */ type SChannelHookCallInfo1 = struct { Fiid IID FcbSize DWORD FuCausality GUID FdwServerPid DWORD FiMethod DWORD F__ccgo_pad1 [4]byte FpObject uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3385:9 */ type SChannelHookCallInfo = SChannelHookCallInfo1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3392:3 */ type IChannelHookVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FClientGetSize uintptr FClientFillBuffer uintptr FClientNotify uintptr FServerNotify uintptr FServerGetSize uintptr FServerFillBuffer uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:207:9 */ type IChannelHookVtbl = IChannelHookVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3511:3 */ // **************************************************************************** // // IClientSecurity interface type tagSOLE_AUTHENTICATION_SERVICE = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpPrincipalName uintptr Fhr HRESULT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3579:9 */ // **************************************************************************** // // IClientSecurity interface type SOLE_AUTHENTICATION_SERVICE = tagSOLE_AUTHENTICATION_SERVICE /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3584:3 */ type PSOLE_AUTHENTICATION_SERVICE = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3586:37 */ type EOLE_AUTHENTICATION_CAPABILITIES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3604:3 */ type tagSOLE_AUTHENTICATION_INFO = struct { FdwAuthnSvc DWORD FdwAuthzSvc DWORD FpAuthInfo uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3611:9 */ type SOLE_AUTHENTICATION_INFO = tagSOLE_AUTHENTICATION_INFO /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3615:3 */ type PSOLE_AUTHENTICATION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3616:44 */ type tagSOLE_AUTHENTICATION_LIST = struct { FcAuthInfo DWORD F__ccgo_pad1 [4]byte FaAuthInfo uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3618:9 */ type SOLE_AUTHENTICATION_LIST = tagSOLE_AUTHENTICATION_LIST /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3621:3 */ type PSOLE_AUTHENTICATION_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3622:44 */ type IClientSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryBlanket uintptr FSetBlanket uintptr FCopyProxy uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:215:9 */ type IClientSecurityVtbl = IClientSecurityVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3702:3 */ type IServerSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryBlanket uintptr FImpersonateClient uintptr FRevertToSelf uintptr FIsImpersonating uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:223:9 */ type IServerSecurityVtbl = IServerSecurityVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3820:3 */ type RPCOPT_PROPERTIES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3874:3 */ type RPCOPT_SERVER_LOCALITY_VALUES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3880:3 */ type IRpcOptionsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSet uintptr FQuery uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:231:9 */ type IRpcOptionsVtbl = IRpcOptionsVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3937:3 */ type GLOBALOPT_PROPERTIES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3987:3 */ type GLOBALOPT_EH_VALUES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3994:3 */ type GLOBALOPT_RPCTP_VALUES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:3999:3 */ type GLOBALOPT_RO_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4010:3 */ type GLOBALOPT_UNMARSHALING_POLICY_VALUES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4016:3 */ type IGlobalOptionsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSet uintptr FQuery uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:239:9 */ type IGlobalOptionsVtbl = IGlobalOptionsVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4069:3 */ // **************************************************************************** // // ISurrogate interface type LPSURROGATE = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4120:20 */ type ISurrogateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLoadDllServer uintptr FFreeSurrogate uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:247:9 */ type ISurrogateVtbl = ISurrogateVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4162:3 */ // **************************************************************************** // // IGlobalInterfaceTable interface type LPGLOBALINTERFACETABLE = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4210:31 */ type IGlobalInterfaceTableVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegisterInterfaceInGlobal uintptr FRevokeInterfaceFromGlobal uintptr FGetInterfaceFromGlobal uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:255:9 */ type IGlobalInterfaceTableVtbl = IGlobalInterfaceTableVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4268:3 */ type ISynchronizeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWait uintptr FSignal uintptr FReset uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:263:9 */ type ISynchronizeVtbl = ISynchronizeVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4370:3 */ type ISynchronizeHandleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetHandle uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:271:9 */ type ISynchronizeHandleVtbl = ISynchronizeHandleVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4456:3 */ type ISynchronizeEventVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetHandle uintptr FSetEventHandle uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:279:9 */ type ISynchronizeEventVtbl = ISynchronizeEventVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4539:3 */ type ISynchronizeContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddSynchronize uintptr FWaitMultiple uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:287:9 */ type ISynchronizeContainerVtbl = ISynchronizeContainerVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4634:3 */ type ISynchronizeMutexVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWait uintptr FSignal uintptr FReset uintptr FReleaseMutex uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:295:9 */ type ISynchronizeMutexVtbl = ISynchronizeMutexVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4727:3 */ // **************************************************************************** // // ICancelMethodCalls interface type LPCANCELMETHODCALLS = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4785:28 */ type ICancelMethodCallsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCancel uintptr FTestCancel uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:303:9 */ type ICancelMethodCallsVtbl = ICancelMethodCallsVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4827:3 */ // **************************************************************************** // // IAsyncManager interface type DCOM_CALL_STATE = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4879:3 */ type IAsyncManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCompleteCall uintptr FGetCallContext uintptr FGetState uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:311:9 */ type IAsyncManagerVtbl = IAsyncManagerVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:4931:3 */ type ICallFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateCall uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:319:9 */ type ICallFactoryVtbl = ICallFactoryVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5023:3 */ type IRpcHelperVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetDCOMProtocolVersion uintptr FGetIIDFromOBJREF uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:327:9 */ type IRpcHelperVtbl = IRpcHelperVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5110:3 */ type IReleaseMarshalBuffersVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FReleaseMarshalBuffer uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:335:9 */ type IReleaseMarshalBuffersVtbl = IReleaseMarshalBuffersVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5196:3 */ type IWaitMultipleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWaitMultiple uintptr FAddSynchronize uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:343:9 */ type IWaitMultipleVtbl = IWaitMultipleVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5283:3 */ // **************************************************************************** // // IAddrTrackingControl interface type LPADDRTRACKINGCONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5331:30 */ type IAddrTrackingControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FEnableCOMDynamicAddrTracking uintptr FDisableCOMDynamicAddrTracking uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:351:9 */ type IAddrTrackingControlVtbl = IAddrTrackingControlVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5371:3 */ // **************************************************************************** // // IAddrExclusionControl interface type LPADDREXCLUSIONCONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5419:31 */ type IAddrExclusionControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentAddrExclusionList uintptr FUpdateAddrExclusionList uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:359:9 */ type IAddrExclusionControlVtbl = IAddrExclusionControlVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5463:3 */ type IPipeByteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:367:9 */ type IPipeByteVtbl = IPipeByteVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5558:3 */ type IPipeLongVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:375:9 */ type IPipeLongVtbl = IPipeLongVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5653:3 */ type IPipeDoubleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPull uintptr FPush uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:383:9 */ type IPipeDoubleVtbl = IPipeDoubleVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:5748:3 */ type APTTYPEQUALIFIER = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6057:3 */ type APTTYPE = int32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6065:3 */ type THDTYPE = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6072:3 */ type APARTMENTID = DWORD /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6074:15 */ type IComThreadingInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentApartmentType uintptr FGetCurrentThreadType uintptr FGetCurrentLogicalThreadId uintptr FSetCurrentLogicalThreadId uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:407:9 */ type IComThreadingInfoVtbl = IComThreadingInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6137:3 */ type IProcessInitControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FResetInitializerTimeout uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:415:9 */ type IProcessInitControlVtbl = IProcessInitControlVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6227:3 */ type IFastRundownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:423:9 */ type IFastRundownVtbl = IFastRundownVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6297:3 */ type CO_MARSHALING_CONTEXT_ATTRIBUTES = uint32 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6331: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 } /* /usr/x86_64-w64-mingw32/include/objidlbase.h:431:9 */ type IMarshalingStreamVtbl = IMarshalingStreamVtbl1 /* /usr/x86_64-w64-mingw32/include/objidlbase.h:6434:3 */ type STDMSHLFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:219:3 */ type tagPROPVARIANT = struct { F__0 struct { F__0 struct { Fvt VARTYPE FwReserved1 PROPVAR_PAD1 FwReserved2 PROPVAR_PAD2 FwReserved3 PROPVAR_PAD3 F__8 struct { F__ccgo_pad1 [0]uint64 FcVal CHAR F__ccgo_pad2 [15]byte } } } } /* /usr/x86_64-w64-mingw32/include/combaseapi.h:308:9 */ type PROPVARIANT = tagPROPVARIANT /* /usr/x86_64-w64-mingw32/include/combaseapi.h:308:31 */ type COWAIT_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/combaseapi.h:331:3 */ type LPFNGETCLASSOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/combaseapi.h:358:17 */ type LPFNCANUNLOADNOW = uintptr /* /usr/x86_64-w64-mingw32/include/combaseapi.h:359: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 /* /usr/x86_64-w64-mingw32/include/objbase.h:21:3 */ type STGFMT = DWORD /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/objidl.h:277:30 */ type IBindCtx1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:282:9 */ type IBindCtx = IBindCtx1 /* /usr/x86_64-w64-mingw32/include/objidl.h:282:28 */ type IEnumMoniker1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:287:9 */ type IEnumMoniker = IEnumMoniker1 /* /usr/x86_64-w64-mingw32/include/objidl.h:287:32 */ type IRunnableObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:292:9 */ type IRunnableObject = IRunnableObject1 /* /usr/x86_64-w64-mingw32/include/objidl.h:292:35 */ type IRunningObjectTable1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:297:9 */ type IRunningObjectTable = IRunningObjectTable1 /* /usr/x86_64-w64-mingw32/include/objidl.h:297:39 */ type IPersist1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:302:9 */ type IPersist = IPersist1 /* /usr/x86_64-w64-mingw32/include/objidl.h:302:28 */ type IPersistStream1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:307:9 */ type IPersistStream = IPersistStream1 /* /usr/x86_64-w64-mingw32/include/objidl.h:307:34 */ type IMoniker1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:312:9 */ type IMoniker = IMoniker1 /* /usr/x86_64-w64-mingw32/include/objidl.h:312:28 */ type IROTData1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:317:9 */ type IROTData = IROTData1 /* /usr/x86_64-w64-mingw32/include/objidl.h:317:28 */ type IEnumSTATSTG1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:322:9 */ type IEnumSTATSTG = IEnumSTATSTG1 /* /usr/x86_64-w64-mingw32/include/objidl.h:322:32 */ type IStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:327:9 */ type IStorage = IStorage1 /* /usr/x86_64-w64-mingw32/include/objidl.h:327:28 */ type IPersistFile1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:332:9 */ type IPersistFile = IPersistFile1 /* /usr/x86_64-w64-mingw32/include/objidl.h:332:32 */ type IPersistStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:337:9 */ type IPersistStorage = IPersistStorage1 /* /usr/x86_64-w64-mingw32/include/objidl.h:337:35 */ type ILockBytes1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:342:9 */ type ILockBytes = ILockBytes1 /* /usr/x86_64-w64-mingw32/include/objidl.h:342:30 */ type IEnumFORMATETC1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:347:9 */ type IEnumFORMATETC = IEnumFORMATETC1 /* /usr/x86_64-w64-mingw32/include/objidl.h:347:34 */ type IEnumSTATDATA1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:352:9 */ type IEnumSTATDATA = IEnumSTATDATA1 /* /usr/x86_64-w64-mingw32/include/objidl.h:352:33 */ type IRootStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:357:9 */ type IRootStorage = IRootStorage1 /* /usr/x86_64-w64-mingw32/include/objidl.h:357:32 */ type IAdviseSink1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:362:9 */ type IAdviseSink = IAdviseSink1 /* /usr/x86_64-w64-mingw32/include/objidl.h:362:31 */ type AsyncIAdviseSink1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:367:9 */ type AsyncIAdviseSink = AsyncIAdviseSink1 /* /usr/x86_64-w64-mingw32/include/objidl.h:367:36 */ type IAdviseSink21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:372:9 */ type IAdviseSink2 = IAdviseSink21 /* /usr/x86_64-w64-mingw32/include/objidl.h:372:32 */ type AsyncIAdviseSink21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:377:9 */ type AsyncIAdviseSink2 = AsyncIAdviseSink21 /* /usr/x86_64-w64-mingw32/include/objidl.h:377:37 */ type IDataObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:382:9 */ type IDataObject = IDataObject1 /* /usr/x86_64-w64-mingw32/include/objidl.h:382:31 */ type IDataAdviseHolder1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:387:9 */ type IDataAdviseHolder = IDataAdviseHolder1 /* /usr/x86_64-w64-mingw32/include/objidl.h:387:37 */ type IMessageFilter1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:392:9 */ type IMessageFilter = IMessageFilter1 /* /usr/x86_64-w64-mingw32/include/objidl.h:392:34 */ type IClassActivator1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:397:9 */ type IClassActivator = IClassActivator1 /* /usr/x86_64-w64-mingw32/include/objidl.h:397:35 */ type IFillLockBytes1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:402:9 */ type IFillLockBytes = IFillLockBytes1 /* /usr/x86_64-w64-mingw32/include/objidl.h:402:34 */ type IProgressNotify1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:407:9 */ type IProgressNotify = IProgressNotify1 /* /usr/x86_64-w64-mingw32/include/objidl.h:407:35 */ type ILayoutStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:412:9 */ type ILayoutStorage = ILayoutStorage1 /* /usr/x86_64-w64-mingw32/include/objidl.h:412:34 */ type IBlockingLock1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:417:9 */ type IBlockingLock = IBlockingLock1 /* /usr/x86_64-w64-mingw32/include/objidl.h:417:33 */ type ITimeAndNoticeControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:422:9 */ type ITimeAndNoticeControl = ITimeAndNoticeControl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:422:41 */ type IOplockStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:427:9 */ type IOplockStorage = IOplockStorage1 /* /usr/x86_64-w64-mingw32/include/objidl.h:427:34 */ type IDirectWriterLock1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:432:9 */ type IDirectWriterLock = IDirectWriterLock1 /* /usr/x86_64-w64-mingw32/include/objidl.h:432:37 */ type IUrlMon1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:437:9 */ type IUrlMon = IUrlMon1 /* /usr/x86_64-w64-mingw32/include/objidl.h:437:27 */ type IForegroundTransfer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:442:9 */ type IForegroundTransfer = IForegroundTransfer1 /* /usr/x86_64-w64-mingw32/include/objidl.h:442:39 */ type IThumbnailExtractor1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:447:9 */ type IThumbnailExtractor = IThumbnailExtractor1 /* /usr/x86_64-w64-mingw32/include/objidl.h:447:39 */ type IDummyHICONIncluder1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:452:9 */ type IDummyHICONIncluder = IDummyHICONIncluder1 /* /usr/x86_64-w64-mingw32/include/objidl.h:452:39 */ type IProcessLock1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:457:9 */ type IProcessLock = IProcessLock1 /* /usr/x86_64-w64-mingw32/include/objidl.h:457:32 */ type ISurrogateService1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:462:9 */ type ISurrogateService = ISurrogateService1 /* /usr/x86_64-w64-mingw32/include/objidl.h:462:37 */ type IInitializeSpy1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:467:9 */ type IInitializeSpy = IInitializeSpy1 /* /usr/x86_64-w64-mingw32/include/objidl.h:467:34 */ type IApartmentShutdown1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:472:9 */ type IApartmentShutdown = IApartmentShutdown1 /* /usr/x86_64-w64-mingw32/include/objidl.h:472:38 */ type tagRemHGLOBAL = struct { FfNullHGlobal LONG FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:43:9 */ type RemHGLOBAL = tagRemHGLOBAL /* /usr/x86_64-w64-mingw32/include/wtypes.h:47:3 */ type tagRemHMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:49:9 */ type RemHMETAFILEPICT = tagRemHMETAFILEPICT /* /usr/x86_64-w64-mingw32/include/wtypes.h:55:3 */ type tagRemHENHMETAFILE = struct { FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:57:9 */ type RemHENHMETAFILE = tagRemHENHMETAFILE /* /usr/x86_64-w64-mingw32/include/wtypes.h:60:3 */ type tagRemHBITMAP = struct { FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:61:9 */ type RemHBITMAP = tagRemHBITMAP /* /usr/x86_64-w64-mingw32/include/wtypes.h:64:3 */ type tagRemHPALETTE = struct { FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:66:9 */ type RemHPALETTE = tagRemHPALETTE /* /usr/x86_64-w64-mingw32/include/wtypes.h:69:3 */ type tagRemBRUSH = struct { FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:71:9 */ type RemHBRUSH = tagRemBRUSH /* /usr/x86_64-w64-mingw32/include/wtypes.h:74:3 */ type DVASPECT = uint32 /* /usr/x86_64-w64-mingw32/include/wtypes.h:187:3 */ type STGC = uint32 /* /usr/x86_64-w64-mingw32/include/wtypes.h:195:3 */ type STGMOVE = uint32 /* /usr/x86_64-w64-mingw32/include/wtypes.h:201:3 */ type STATFLAG = uint32 /* /usr/x86_64-w64-mingw32/include/wtypes.h:207:3 */ type HCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:208:14 */ type _userCLIPFORMAT = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FdwValue DWORD F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:227:9 */ type UserCLIPFORMAT = _userCLIPFORMAT /* /usr/x86_64-w64-mingw32/include/wtypes.h:233:3 */ type WireCLIPFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:235:24 */ type CLIPFORMAT = WORD /* /usr/x86_64-w64-mingw32/include/wtypes.h:236:14 */ type _GDI_NONREMOTE = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:238:9 */ type GDI_NONREMOTE = _GDI_NONREMOTE /* /usr/x86_64-w64-mingw32/include/wtypes.h:244:3 */ type _userHGLOBAL = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:246:9 */ type UserHGLOBAL = _userHGLOBAL /* /usr/x86_64-w64-mingw32/include/wtypes.h:253:3 */ type WireHGLOBAL = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:255:21 */ type _userHMETAFILE = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:257:9 */ type UserHMETAFILE = _userHMETAFILE /* /usr/x86_64-w64-mingw32/include/wtypes.h:264:3 */ type _remoteMETAFILEPICT = struct { Fmm LONG FxExt LONG FyExt LONG F__ccgo_pad1 [4]byte FhMF uintptr } /* /usr/x86_64-w64-mingw32/include/wtypes.h:266:9 */ type RemoteMETAFILEPICT = _remoteMETAFILEPICT /* /usr/x86_64-w64-mingw32/include/wtypes.h:271:3 */ type _userHMETAFILEPICT = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:273:9 */ type UserHMETAFILEPICT = _userHMETAFILEPICT /* /usr/x86_64-w64-mingw32/include/wtypes.h:280:3 */ type _userHENHMETAFILE = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:282:9 */ type UserHENHMETAFILE = _userHENHMETAFILE /* /usr/x86_64-w64-mingw32/include/wtypes.h:289:3 */ type _userBITMAP = struct { FbmType LONG FbmWidth LONG FbmHeight LONG FbmWidthBytes LONG FbmPlanes WORD FbmBitsPixel WORD FcbSize ULONG FpBuffer [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/wtypes.h:291:9 */ type UserBITMAP = _userBITMAP /* /usr/x86_64-w64-mingw32/include/wtypes.h:300:3 */ type _userHBITMAP = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:302:9 */ type UserHBITMAP = _userHBITMAP /* /usr/x86_64-w64-mingw32/include/wtypes.h:309:3 */ type _userHPALETTE = struct { FfContext LONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FhInproc LONG F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:311:9 */ type UserHPALETTE = _userHPALETTE /* /usr/x86_64-w64-mingw32/include/wtypes.h:318:3 */ type _RemotableHandle = struct { FfContext LONG Fu struct{ FhInproc LONG } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:320:9 */ type RemotableHandle = _RemotableHandle /* /usr/x86_64-w64-mingw32/include/wtypes.h:326:3 */ type WireHWND = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:328:25 */ type WireHMENU = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:329:25 */ type WireHACCEL = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:330:25 */ type WireHBRUSH = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:331:25 */ type WireHFONT = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:332:25 */ type WireHDC = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:333:25 */ type WireHICON = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:334:25 */ type WireHRGN = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:335:25 */ type WireHMONITOR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:336:25 */ type WireHBITMAP = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:401:21 */ type WireHPALETTE = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:402:22 */ type WireHENHMETAFILE = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:403:26 */ type WireHMETAFILE = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:404:23 */ type WireHMETAFILEPICT = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:405:27 */ type HMETAFILEPICT = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:416:14 */ type DATE = float64 /* /usr/x86_64-w64-mingw32/include/wtypes.h:421:16 */ type tagCY = struct { F__ccgo_pad1 [0]uint64 Fs struct { FLo uint32 FHi int32 } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:432:9 */ type CY = tagCY /* /usr/x86_64-w64-mingw32/include/wtypes.h:438:3 */ type LPCY = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:442:12 */ type tagDEC = struct { FwReserved USHORT Fu struct { F__ccgo_pad1 [0]uint16 Fs struct { Fscale BYTE Fsign BYTE } } FHi32 ULONG Fu2 struct { F__ccgo_pad1 [0]uint64 Fs2 struct { FLo32 ULONG FMid32 ULONG } } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:453:9 */ type DECIMAL = tagDEC /* /usr/x86_64-w64-mingw32/include/wtypes.h:470:3 */ type LPDECIMAL = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:476:17 */ type WireBSTR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:478:27 */ type BSTR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:479:17 */ type LPBSTR = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:481:14 */ type VARIANT_BOOL = int16 /* /usr/x86_64-w64-mingw32/include/wtypes.h:483:15 */ type tagBSTRBLOB = struct { FcbSize ULONG F__ccgo_pad1 [4]byte FpData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypes.h:493:9 */ type BSTRBLOB = tagBSTRBLOB /* /usr/x86_64-w64-mingw32/include/wtypes.h:496:3 */ type LPBSTRBLOB = uintptr /* /usr/x86_64-w64-mingw32/include/wtypes.h:497:28 */ type tagCLIPDATA = struct { FcbSize ULONG FulClipFmt LONG FpClipData uintptr } /* /usr/x86_64-w64-mingw32/include/wtypes.h:503:9 */ type CLIPDATA = tagCLIPDATA /* /usr/x86_64-w64-mingw32/include/wtypes.h:507:3 */ type VARTYPE = uint16 /* /usr/x86_64-w64-mingw32/include/wtypes.h:511:24 */ type PROPID = ULONG /* /usr/x86_64-w64-mingw32/include/wtypes.h:568:15 */ type _tagpropertykey = struct { Ffmtid GUID Fpid DWORD } /* /usr/x86_64-w64-mingw32/include/wtypes.h:573:9 */ type PROPERTYKEY = _tagpropertykey /* /usr/x86_64-w64-mingw32/include/wtypes.h:576:3 */ type tagCSPLATFORM = struct { FdwPlatformId DWORD FdwVersionHi DWORD FdwVersionLo DWORD FdwProcessorArch DWORD } /* /usr/x86_64-w64-mingw32/include/wtypes.h:579:9 */ type CSPLATFORM = tagCSPLATFORM /* /usr/x86_64-w64-mingw32/include/wtypes.h:584:3 */ type tagQUERYCONTEXT = struct { FdwContext DWORD FPlatform CSPLATFORM FLocale LCID FdwVersionHi DWORD FdwVersionLo DWORD } /* /usr/x86_64-w64-mingw32/include/wtypes.h:586:9 */ type QUERYCONTEXT = tagQUERYCONTEXT /* /usr/x86_64-w64-mingw32/include/wtypes.h:592:3 */ type TYSPEC = uint32 /* /usr/x86_64-w64-mingw32/include/wtypes.h:602:3 */ type __WIDL_wtypes_generated_name_00000001 = struct { Ftyspec DWORD F__ccgo_pad1 [4]byte Ftagged_union struct { F__ccgo_pad1 [0]uint64 Fclsid CLSID F__ccgo_pad2 [16]byte } } /* /usr/x86_64-w64-mingw32/include/wtypes.h:604:9 */ type UCLSSPEC = __WIDL_wtypes_generated_name_00000001 /* /usr/x86_64-w64-mingw32/include/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 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:277:9 */ type IMallocSpyVtbl = IMallocSpyVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:7742:3 */ // **************************************************************************** // // IBindCtx interface type LPBC = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:7934:18 */ type LPBINDCTX = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:7935:18 */ type tagBIND_OPTS = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD } /* /usr/x86_64-w64-mingw32/include/objidl.h:7944:9 */ type BIND_OPTS = tagBIND_OPTS /* /usr/x86_64-w64-mingw32/include/objidl.h:7949:3 */ type LPBIND_OPTS = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:7950:29 */ type tagBIND_OPTS2 = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD FdwTrackFlags DWORD FdwClassContext DWORD Flocale LCID F__ccgo_pad1 [4]byte FpServerInfo uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:7960:9 */ type BIND_OPTS2 = tagBIND_OPTS2 /* /usr/x86_64-w64-mingw32/include/objidl.h:7969:3 */ type LPBIND_OPTS2 = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:7970:30 */ type tagBIND_OPTS3 = struct { FcbStruct DWORD FgrfFlags DWORD FgrfMode DWORD FdwTickCountDeadline DWORD FdwTrackFlags DWORD FdwClassContext DWORD Flocale LCID F__ccgo_pad1 [4]byte FpServerInfo uintptr Fhwnd HWND } /* /usr/x86_64-w64-mingw32/include/objidl.h:7977:9 */ type BIND_OPTS3 = tagBIND_OPTS3 /* /usr/x86_64-w64-mingw32/include/objidl.h:7987:3 */ type LPBIND_OPTS3 = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:7988:30 */ type BIND_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:282:9 */ type IBindCtxVtbl = IBindCtxVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8094:3 */ // **************************************************************************** // // IEnumMoniker interface type LPENUMMONIKER = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:8265:22 */ type IEnumMonikerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:287:9 */ type IEnumMonikerVtbl = IEnumMonikerVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8324:3 */ // **************************************************************************** // // IRunnableObject interface type LPRUNNABLEOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:8423:25 */ type IRunnableObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetRunningClass uintptr FRun uintptr FIsRunning uintptr FLockRunning uintptr FSetContainedObject uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:292:9 */ type IRunnableObjectVtbl = IRunnableObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8487:3 */ // **************************************************************************** // // IRunningObjectTable interface type LPRUNNINGOBJECTTABLE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:297:9 */ type IRunningObjectTableVtbl = IRunningObjectTableVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8678:3 */ // **************************************************************************** // // IPersist interface type LPPERSIST = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:8808:18 */ type IPersistVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:302:9 */ type IPersistVtbl = IPersistVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8843:3 */ // **************************************************************************** // // IPersistStream interface type LPPERSISTSTREAM = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:8893:24 */ type IPersistStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FGetSizeMax uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:307:9 */ type IPersistStreamVtbl = IPersistStreamVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:8955:3 */ // **************************************************************************** // // IMoniker interface type LPMONIKER = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:9047:18 */ type MKSYS = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:9059:3 */ type MKRREDUCE = uint32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:312:9 */ type IMonikerVtbl = IMonikerVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:9268:3 */ type IROTDataVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetComparisonData uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:317:9 */ type IROTDataVtbl = IROTDataVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:9598:3 */ // **************************************************************************** // // IEnumSTATSTG interface type LPENUMSTATSTG = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:9652:22 */ type IEnumSTATSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:322:9 */ type IEnumSTATSTGVtbl = IEnumSTATSTGVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:9711:3 */ // **************************************************************************** // // IStorage interface type LPSTORAGE = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:9808:18 */ type tagRemSNB = struct { FulCntStr ULONG FulCntChar ULONG FrgString [1]OLECHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:9809:9 */ type RemSNB = tagRemSNB /* /usr/x86_64-w64-mingw32/include/objidl.h:9813:3 */ type WireSNB = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:9814:16 */ type SNB = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:327:9 */ type IStorageVtbl = IStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:10011:3 */ // **************************************************************************** // // IPersistFile interface type LPPERSISTFILE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:332:9 */ type IPersistFileVtbl = IPersistFileVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:10375:3 */ // **************************************************************************** // // IPersistStorage interface type LPPERSISTSTORAGE = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:337:9 */ type IPersistStorageVtbl = IPersistStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:10555:3 */ // **************************************************************************** // // ILockBytes interface type LPLOCKBYTES = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:342:9 */ type ILockBytesVtbl = ILockBytesVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:10770:3 */ // **************************************************************************** // // IEnumFORMATETC interface type LPENUMFORMATETC = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:10926:24 */ type tagDVTARGETDEVICE = struct { FtdSize DWORD FtdDriverNameOffset WORD FtdDeviceNameOffset WORD FtdPortNameOffset WORD FtdExtDevmodeOffset WORD FtdData [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:10927:9 */ type DVTARGETDEVICE = tagDVTARGETDEVICE /* /usr/x86_64-w64-mingw32/include/objidl.h:10934:3 */ type LPCLIPFORMAT = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:10935:20 */ type tagFORMATETC = struct { FcfFormat CLIPFORMAT F__ccgo_pad1 [6]byte Fptd uintptr FdwAspect DWORD Flindex LONG Ftymed DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:10936:9 */ type FORMATETC = tagFORMATETC /* /usr/x86_64-w64-mingw32/include/objidl.h:10942:3 */ type LPFORMATETC = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:10943:29 */ type IEnumFORMATETCVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:347:9 */ type IEnumFORMATETCVtbl = IEnumFORMATETCVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:11002:3 */ // **************************************************************************** // // IEnumSTATDATA interface type LPENUMSTATDATA = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11099:23 */ type ADVF = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:11108:3 */ type tagSTATDATA = struct { Fformatetc FORMATETC Fadvf DWORD F__ccgo_pad1 [4]byte FpAdvSink uintptr FdwConnection DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:11109:9 */ type STATDATA = tagSTATDATA /* /usr/x86_64-w64-mingw32/include/objidl.h:11114:3 */ type LPSTATDATA = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11115:18 */ type IEnumSTATDATAVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:352:9 */ type IEnumSTATDATAVtbl = IEnumSTATDATAVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:11174:3 */ // **************************************************************************** // // IRootStorage interface type LPROOTSTORAGE = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11271:22 */ type IRootStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitchToFile uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:357:9 */ type IRootStorageVtbl = IRootStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:11306:3 */ // **************************************************************************** // // IAdviseSink interface type LPADVISESINK = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11356:21 */ type TYMED = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:11366:3 */ type tagRemSTGMEDIUM = struct { Ftymed DWORD FdwHandleType DWORD FpData ULONG FpUnkForRelease ULONG FcbData ULONG Fdata [1]Byte F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:11367:9 */ type RemSTGMEDIUM = tagRemSTGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11374:3 */ type tagSTGMEDIUM = struct { Ftymed DWORD F__ccgo_pad1 [4]byte Fu struct{ FhBitmap HBITMAP } FpUnkForRelease uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:11376:9 */ type USTGMEDIUM = tagSTGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11388:2 */ type _GDI_OBJECT = struct { FObjectType DWORD F__ccgo_pad1 [4]byte Fu struct{ FhBitmap WireHBITMAP } } /* /usr/x86_64-w64-mingw32/include/objidl.h:11404:9 */ type GDI_OBJECT = _GDI_OBJECT /* /usr/x86_64-w64-mingw32/include/objidl.h:11411:3 */ type _userSTGMEDIUM = struct { Fu struct { Ftymed DWORD F__ccgo_pad1 [4]byte Fu struct{ FhMetaFilePict WireHMETAFILEPICT } } FpUnkForRelease uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:11412:9 */ type _STGMEDIUM_UNION = struct { Ftymed DWORD F__ccgo_pad1 [4]byte Fu struct{ FhMetaFilePict WireHMETAFILEPICT } } /* /usr/x86_64-w64-mingw32/include/objidl.h:11412:9 */ type UserSTGMEDIUM = _userSTGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11426:3 */ type WireSTGMEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11427:23 */ type STGMEDIUM = USTGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11428:20 */ type WireASYNC_STGMEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11429:23 */ type ASYNC_STGMEDIUM = STGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11430:19 */ type LPSTGMEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11431:19 */ type _userFLAG_STGMEDIUM = struct { FContextFlags LONG FfPassOwnership LONG FStgmed UserSTGMEDIUM } /* /usr/x86_64-w64-mingw32/include/objidl.h:11432:9 */ type UserFLAG_STGMEDIUM = _userFLAG_STGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11436:3 */ type WireFLAG_STGMEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:11437:28 */ type _FLAG_STGMEDIUM = struct { FContextFlags LONG FfPassOwnership LONG FStgmed STGMEDIUM } /* /usr/x86_64-w64-mingw32/include/objidl.h:11438:9 */ type FLAG_STGMEDIUM = _FLAG_STGMEDIUM /* /usr/x86_64-w64-mingw32/include/objidl.h:11442:3 */ type IAdviseSinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnDataChange uintptr FOnViewChange uintptr FOnRename uintptr FOnSave uintptr FOnClose uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:362:9 */ type IAdviseSinkVtbl = IAdviseSinkVtbl1 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:367:9 */ type AsyncIAdviseSinkVtbl = AsyncIAdviseSinkVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:11729:3 */ // **************************************************************************** // // IAdviseSink2 interface type LPADVISESINK2 = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:372:9 */ type IAdviseSink2Vtbl = IAdviseSink2Vtbl1 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:377:9 */ type AsyncIAdviseSink2Vtbl = AsyncIAdviseSink2Vtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:12154:3 */ // **************************************************************************** // // IDataObject interface type LPDATAOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:12271:21 */ type DATADIR = uint32 /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/objidl.h:382:9 */ type IDataObjectVtbl = IDataObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:12384:3 */ // **************************************************************************** // // IDataAdviseHolder interface type LPDATAADVISEHOLDER = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:12567:27 */ type IDataAdviseHolderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAdvise uintptr FUnadvise uintptr FEnumAdvise uintptr FSendOnDataChange uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:387:9 */ type IDataAdviseHolderVtbl = IDataAdviseHolderVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:12635:3 */ // **************************************************************************** // // IMessageFilter interface type LPMESSAGEFILTER = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:12727:24 */ type CALLTYPE = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:12734:3 */ type SERVERCALL = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:12739:3 */ type PENDINGTYPE = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:12743:3 */ type PENDINGMSG = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:12748:3 */ type tagINTERFACEINFO = struct { FpUnk uintptr Fiid IID FwMethod WORD F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/objidl.h:12749:9 */ type INTERFACEINFO = tagINTERFACEINFO /* /usr/x86_64-w64-mingw32/include/objidl.h:12753:3 */ type LPINTERFACEINFO = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:12754:33 */ type IMessageFilterVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FHandleInComingCall uintptr FRetryRejectedCall uintptr FMessagePending uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:392:9 */ type IMessageFilterVtbl = IMessageFilterVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:12817:3 */ type IClassActivatorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassObject uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:397:9 */ type IClassActivatorVtbl = IClassActivatorVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:12957:3 */ type IFillLockBytesVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFillAppend uintptr FFillAt uintptr FSetFillSize uintptr FTerminate uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:402:9 */ type IFillLockBytesVtbl = IFillLockBytesVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13078:3 */ type IProgressNotifyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnProgress uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:407:9 */ type IProgressNotifyVtbl = IProgressNotifyVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13233:3 */ // **************************************************************************** // // ILayoutStorage interface type tagStorageLayout = struct { FLayoutType DWORD F__ccgo_pad1 [4]byte FpwcsElementName uintptr FcOffset LARGE_INTEGER FcBytes LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/objidl.h:13288:9 */ // **************************************************************************** // // ILayoutStorage interface type StorageLayout = tagStorageLayout /* /usr/x86_64-w64-mingw32/include/objidl.h:13293:3 */ type ILayoutStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLayoutScript uintptr FBeginMonitor uintptr FEndMonitor uintptr FReLayoutDocfile uintptr FReLayoutDocfileOnILockBytes uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:412:9 */ type ILayoutStorageVtbl = ILayoutStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13358:3 */ type IBlockingLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FLock uintptr FUnlock uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:417:9 */ type IBlockingLockVtbl = IBlockingLockVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13498:3 */ type ITimeAndNoticeControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSuppressChanges uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:422:9 */ type ITimeAndNoticeControlVtbl = ITimeAndNoticeControlVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13595:3 */ type IOplockStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateStorageEx uintptr FOpenStorageEx uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:427:9 */ type IOplockStorageVtbl = IOplockStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13707:3 */ type IDirectWriterLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FWaitForWriteAccess uintptr FReleaseWriteAccess uintptr FHaveWriteAccess uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:432:9 */ type IDirectWriterLockVtbl = IDirectWriterLockVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13827:3 */ type IUrlMonVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAsyncGetClassBits uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:437:9 */ type IUrlMonVtbl = IUrlMonVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:13953:3 */ type IForegroundTransferVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAllowForegroundTransfer uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:442:9 */ type IForegroundTransferVtbl = IForegroundTransferVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14046:3 */ type IThumbnailExtractorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FExtractThumbnail uintptr FOnFileUpdated uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:447:9 */ type IThumbnailExtractorVtbl = IThumbnailExtractorVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14147:3 */ type IDummyHICONIncluderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDummy uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:452:9 */ type IDummyHICONIncluderVtbl = IDummyHICONIncluderVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14250:3 */ type ApplicationType = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:14298:3 */ type ShutdownType = uint32 /* /usr/x86_64-w64-mingw32/include/objidl.h:14302:3 */ type IProcessLockVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddRefOnProcess uintptr FReleaseRefOnProcess uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:457:9 */ type IProcessLockVtbl = IProcessLockVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14348:3 */ type ISurrogateServiceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInit uintptr FApplicationLaunch uintptr FApplicationFree uintptr FCatalogRefresh uintptr FProcessShutdown uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:462:9 */ type ISurrogateServiceVtbl = ISurrogateServiceVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14476:3 */ // **************************************************************************** // // IInitializeSpy interface type LPINITIALIZESPY = uintptr /* /usr/x86_64-w64-mingw32/include/objidl.h:14577:24 */ type IInitializeSpyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPreInitialize uintptr FPostInitialize uintptr FPreUninitialize uintptr FPostUninitialize uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:467:9 */ type IInitializeSpyVtbl = IInitializeSpyVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14639:3 */ type IApartmentShutdownVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnUninitialize uintptr } /* /usr/x86_64-w64-mingw32/include/objidl.h:472:9 */ type IApartmentShutdownVtbl = IApartmentShutdownVtbl1 /* /usr/x86_64-w64-mingw32/include/objidl.h:14764:3 */ type COMSD = uint32 /* /usr/x86_64-w64-mingw32/include/objbase.h:92:3 */ type tagSTGOPTIONS = struct { FusVersion USHORT Freserved USHORT FulSectorSize ULONG FpwcsTemplateFile uintptr } /* /usr/x86_64-w64-mingw32/include/objbase.h:130:9 */ type STGOPTIONS = tagSTGOPTIONS /* /usr/x86_64-w64-mingw32/include/objbase.h:137:3 */ //** Autogenerated by WIDL 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:23:9 */ //** Autogenerated by WIDL 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/urlmon.h:23:35 */ type IMonikerProp1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:31:9 */ type IMonikerProp = IMonikerProp1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:31:32 */ type IBindProtocol1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:39:9 */ type IBindProtocol = IBindProtocol1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:39:33 */ type IBinding1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:47:9 */ type IBinding = IBinding1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:47:28 */ type IBindStatusCallback1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:55:9 */ type IBindStatusCallback = IBindStatusCallback1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:55:39 */ type IBindStatusCallbackEx1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:63:9 */ type IBindStatusCallbackEx = IBindStatusCallbackEx1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:63:41 */ type IAuthenticate1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:71:9 */ type IAuthenticate = IAuthenticate1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:71:33 */ type IAuthenticateEx1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:79:9 */ type IAuthenticateEx = IAuthenticateEx1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:79:35 */ type IHttpNegotiate1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:87:9 */ type IHttpNegotiate = IHttpNegotiate1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:87:34 */ type IHttpNegotiate21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:95:9 */ type IHttpNegotiate2 = IHttpNegotiate21 /* /usr/x86_64-w64-mingw32/include/urlmon.h:95:35 */ type IHttpNegotiate31 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:103:9 */ type IHttpNegotiate3 = IHttpNegotiate31 /* /usr/x86_64-w64-mingw32/include/urlmon.h:103:35 */ type IWinInetFileStream1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:111:9 */ type IWinInetFileStream = IWinInetFileStream1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:111:38 */ type IWindowForBindingUI1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:119:9 */ type IWindowForBindingUI = IWindowForBindingUI1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:119:39 */ type ICodeInstall1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:127:9 */ type ICodeInstall = ICodeInstall1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:127:32 */ type IWinInetInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:167:9 */ type IWinInetInfo = IWinInetInfo1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:167:32 */ type IHttpSecurity1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:175:9 */ type IHttpSecurity = IHttpSecurity1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:175:33 */ type IWinInetHttpInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:183:9 */ type IWinInetHttpInfo = IWinInetHttpInfo1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:183:36 */ type IWinInetHttpTimeouts1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:191:9 */ type IWinInetHttpTimeouts = IWinInetHttpTimeouts1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:191:40 */ type IBindHost1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:215:9 */ type IBindHost = IBindHost1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:215:29 */ type IInternet1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:223:9 */ type IInternet = IInternet1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:223:29 */ type IInternetBindInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:231:9 */ type IInternetBindInfo = IInternetBindInfo1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:231:37 */ type IInternetBindInfoEx1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:239:9 */ type IInternetBindInfoEx = IInternetBindInfoEx1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:239:39 */ type IInternetProtocolRoot1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:247:9 */ type IInternetProtocolRoot = IInternetProtocolRoot1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:247:41 */ type IInternetProtocol1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:255:9 */ type IInternetProtocol = IInternetProtocol1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:255:37 */ type IInternetProtocolSink1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:271:9 */ type IInternetProtocolSink = IInternetProtocolSink1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:271:41 */ type IInternetProtocolSinkStackable1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:279:9 */ type IInternetProtocolSinkStackable = IInternetProtocolSinkStackable1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:279:50 */ type IInternetSession1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:287:9 */ type IInternetSession = IInternetSession1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:287:36 */ type IInternetThreadSwitch1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:295:9 */ type IInternetThreadSwitch = IInternetThreadSwitch1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:295:41 */ type IInternetPriority1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:303:9 */ type IInternetPriority = IInternetPriority1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:303:37 */ type IInternetProtocolInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:311:9 */ type IInternetProtocolInfo = IInternetProtocolInfo1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:311:41 */ type IInternetSecurityMgrSite1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:319:9 */ type IInternetSecurityMgrSite = IInternetSecurityMgrSite1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:319:44 */ type IInternetSecurityManager1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:327:9 */ type IInternetSecurityManager = IInternetSecurityManager1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:327:44 */ type IInternetHostSecurityManager1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:359:9 */ type IInternetHostSecurityManager = IInternetHostSecurityManager1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:359:48 */ type IInternetZoneManager1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:367:9 */ type IInternetZoneManager = IInternetZoneManager1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:367:40 */ type ISoftDistExt1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:391:9 */ type ISoftDistExt = ISoftDistExt1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:391:32 */ type ICatalogFileInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:399:9 */ type ICatalogFileInfo = ICatalogFileInfo1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:399:36 */ type IDataFilter1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:407:9 */ type IDataFilter = IDataFilter1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:407:31 */ type IEncodingFilterFactory1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:415:9 */ type IEncodingFilterFactory = IEncodingFilterFactory1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:415:42 */ type IWrappedProtocol1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:423:9 */ type IWrappedProtocol = IWrappedProtocol1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:423:36 */ type IGetBindHandle1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:431:9 */ type IGetBindHandle = IGetBindHandle1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:431:34 */ type IBindCallbackRedirect1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:439:9 */ type IBindCallbackRedirect = IBindCallbackRedirect1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:439: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 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/oleidl.h:23: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 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/oleidl.h:23:36 */ type IOleCache1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:31:9 */ type IOleCache = IOleCache1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:31:29 */ type IOleCache21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:39:9 */ type IOleCache2 = IOleCache21 /* /usr/x86_64-w64-mingw32/include/oleidl.h:39:30 */ type IOleCacheControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:47:9 */ type IOleCacheControl = IOleCacheControl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:47:36 */ type IParseDisplayName1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:55:9 */ type IParseDisplayName = IParseDisplayName1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:55:37 */ type IOleContainer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:63:9 */ type IOleContainer = IOleContainer1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:63:33 */ type IOleClientSite1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:71:9 */ type IOleClientSite = IOleClientSite1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:71:34 */ type IOleObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:79:9 */ type IOleObject = IOleObject1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:79:30 */ type IOleWindow1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:87:9 */ type IOleWindow = IOleWindow1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:87:30 */ type IOleLink1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:95:9 */ type IOleLink = IOleLink1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:95:28 */ type IOleItemContainer1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:103:9 */ type IOleItemContainer = IOleItemContainer1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:103:37 */ type IOleInPlaceUIWindow1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:111:9 */ type IOleInPlaceUIWindow = IOleInPlaceUIWindow1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:111:39 */ type IOleInPlaceActiveObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:119:9 */ type IOleInPlaceActiveObject = IOleInPlaceActiveObject1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:119:43 */ type IOleInPlaceFrame1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:127:9 */ type IOleInPlaceFrame = IOleInPlaceFrame1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:127:36 */ type IOleInPlaceObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:135:9 */ type IOleInPlaceObject = IOleInPlaceObject1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:135:37 */ type IOleInPlaceSite1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:143:9 */ type IOleInPlaceSite = IOleInPlaceSite1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:143:35 */ type IContinue1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:151:9 */ type IContinue = IContinue1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:151:29 */ type IViewObject1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:159:9 */ type IViewObject = IViewObject1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:159:31 */ type IViewObject21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:167:9 */ type IViewObject2 = IViewObject21 /* /usr/x86_64-w64-mingw32/include/oleidl.h:167:32 */ type IDropSource1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:175:9 */ type IDropSource = IDropSource1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:175:31 */ type IDropTarget1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:183:9 */ type IDropTarget = IDropTarget1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:183:31 */ type IDropSourceNotify1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:191:9 */ type IDropSourceNotify = IDropSourceNotify1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:191:37 */ type IEnumOLEVERB1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:199:9 */ type IEnumOLEVERB = IEnumOLEVERB1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:199: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 /* /usr/x86_64-w64-mingw32/include/oleidl.h:245:26 */ type IOleAdviseHolderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAdvise uintptr FUnadvise uintptr FEnumAdvise uintptr FSendOnRename uintptr FSendOnSave uintptr FSendOnClose uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:23:9 */ type IOleAdviseHolderVtbl = IOleAdviseHolderVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:316:3 */ // **************************************************************************** // // IOleCache interface type LPOLECACHE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:382:19 */ type IOleCacheVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCache uintptr FUncache uintptr FEnumCache uintptr FInitCache uintptr FSetData uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:31:9 */ type IOleCacheVtbl = IOleCacheVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:454:3 */ // **************************************************************************** // // IOleCache2 interface type LPOLECACHE2 = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:514:20 */ type DISCARDCACHE = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:538:3 */ type IOleCache2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCache uintptr FUncache uintptr FEnumCache uintptr FInitCache uintptr FSetData uintptr FUpdateCache uintptr FDiscardCache uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:39:9 */ type IOleCache2Vtbl = IOleCache2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:610:3 */ // **************************************************************************** // // IOleCacheControl interface type LPOLECACHECONTROL = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:702:26 */ type IOleCacheControlVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FOnRun uintptr FOnStop uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:47:9 */ type IOleCacheControlVtbl = IOleCacheControlVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:744:3 */ // **************************************************************************** // // IParseDisplayName interface type LPPARSEDISPLAYNAME = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:792:27 */ type IParseDisplayNameVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:55:9 */ type IParseDisplayNameVtbl = IParseDisplayNameVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:834:3 */ // **************************************************************************** // // IOleContainer interface type LPOLECONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:878:23 */ type IOleContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr FEnumObjects uintptr FLockContainer uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:63:9 */ type IOleContainerVtbl = IOleContainerVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:931:3 */ // **************************************************************************** // // IOleClientSite interface type LPOLECLIENTSITE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:985:24 */ type IOleClientSiteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSaveObject uintptr FGetMoniker uintptr FGetContainer uintptr FShowObject uintptr FOnShowWindow uintptr FRequestNewObjectLayout uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:71:9 */ type IOleClientSiteVtbl = IOleClientSiteVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1057:3 */ // **************************************************************************** // // IOleObject interface type LPOLEOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1121:20 */ type OLEGETMONIKER = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1128:3 */ type OLEWHICHMK = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1134:3 */ type USERCLASSTYPE = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1140:3 */ type OLEMISC = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1165:3 */ type OLECLOSE = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1170: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 } /* /usr/x86_64-w64-mingw32/include/oleidl.h:79:9 */ type IOleObjectVtbl = IOleObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1378:3 */ type OLERENDER = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1509:3 */ type LPOLERENDER = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1511:19 */ type tagOBJECTDESCRIPTOR = struct { FcbSize ULONG Fclsid CLSID FdwDrawAspect DWORD Fsizel SIZEL Fpointl POINTL FdwStatus DWORD FdwFullUserTypeName DWORD FdwSrcOfCopy DWORD } /* /usr/x86_64-w64-mingw32/include/oleidl.h:1513:9 */ type OBJECTDESCRIPTOR = tagOBJECTDESCRIPTOR /* /usr/x86_64-w64-mingw32/include/oleidl.h:1522:3 */ type POBJECTDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1523:36 */ type LPOBJECTDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1524:36 */ type LINKSRCDESCRIPTOR = tagOBJECTDESCRIPTOR /* /usr/x86_64-w64-mingw32/include/oleidl.h:1525:36 */ type PLINKSRCDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1526:36 */ type LPLINKSRCDESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1527:36 */ // **************************************************************************** // // IOleWindow interface type LPOLEWINDOW = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1538:20 */ type IOleWindowVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:87:9 */ type IOleWindowVtbl = IOleWindowVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1581:3 */ // **************************************************************************** // // IOleLink interface type LPOLELINK = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1629:18 */ type OLEUPDATE = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1634:3 */ type LPOLEUPDATE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1636:19 */ type POLEUPDATE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1637:19 */ type OLELINKBIND = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1641: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 } /* /usr/x86_64-w64-mingw32/include/oleidl.h:95:9 */ type IOleLinkVtbl = IOleLinkVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1749:3 */ // **************************************************************************** // // IOleItemContainer interface type LPOLEITEMCONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1833:27 */ type BINDSPEED = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1839:3 */ type OLECONTF = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1847:3 */ type IOleItemContainerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseDisplayName uintptr FEnumObjects uintptr FLockContainer uintptr FGetObjectA uintptr FGetObjectStorage uintptr FIsRunning uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:103:9 */ type IOleItemContainerVtbl = IOleItemContainerVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:1929:3 */ // **************************************************************************** // // IOleInPlaceUIWindow interface type LPOLEINPLACEUIWINDOW = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:1997:29 */ type BORDERWIDTHS = RECT /* /usr/x86_64-w64-mingw32/include/oleidl.h:1998:14 */ type LPBORDERWIDTHS = LPRECT /* /usr/x86_64-w64-mingw32/include/oleidl.h:1999:16 */ type LPCBORDERWIDTHS = LPCRECT /* /usr/x86_64-w64-mingw32/include/oleidl.h:2000:17 */ type IOleInPlaceUIWindowVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FGetBorder uintptr FRequestBorderSpace uintptr FSetBorderSpace uintptr FSetActiveObject uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:111:9 */ type IOleInPlaceUIWindowVtbl = IOleInPlaceUIWindowVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2068:3 */ // **************************************************************************** // // IOleInPlaceActiveObject interface type LPOLEINPLACEACTIVEOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2134:33 */ type IOleInPlaceActiveObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FTranslateAcceleratorA uintptr FOnFrameWindowActivate uintptr FOnDocWindowActivate uintptr FResizeBorder uintptr FEnableModeless uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:119:9 */ type IOleInPlaceActiveObjectVtbl = IOleInPlaceActiveObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2211:3 */ // **************************************************************************** // // IOleInPlaceFrame interface type LPOLEINPLACEFRAME = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2315:26 */ type tagOIFI = struct { Fcb UINT FfMDIApp WINBOOL FhwndFrame HWND Fhaccel HACCEL FcAccelEntries UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/oleidl.h:2317:9 */ type OLEINPLACEFRAMEINFO = tagOIFI /* /usr/x86_64-w64-mingw32/include/oleidl.h:2323:3 */ type LPOLEINPLACEFRAMEINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2324:24 */ type tagOleMenuGroupWidths = struct{ Fwidth [6]LONG } /* /usr/x86_64-w64-mingw32/include/oleidl.h:2326:9 */ type OLEMENUGROUPWIDTHS = tagOleMenuGroupWidths /* /usr/x86_64-w64-mingw32/include/oleidl.h:2328:3 */ type LPOLEMENUGROUPWIDTHS = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2329:38 */ type HOLEMENU = HGLOBAL /* /usr/x86_64-w64-mingw32/include/oleidl.h:2331: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 } /* /usr/x86_64-w64-mingw32/include/oleidl.h:127:9 */ type IOleInPlaceFrameVtbl = IOleInPlaceFrameVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2437:3 */ // **************************************************************************** // // IOleInPlaceObject interface type LPOLEINPLACEOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2529:27 */ type IOleInPlaceObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FContextSensitiveHelp uintptr FInPlaceDeactivate uintptr FUIDeactivate uintptr FSetObjectRects uintptr FReactivateAndUndo uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:135:9 */ type IOleInPlaceObjectVtbl = IOleInPlaceObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2594:3 */ // **************************************************************************** // // IOleInPlaceSite interface type LPOLEINPLACESITE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2660: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 } /* /usr/x86_64-w64-mingw32/include/oleidl.h:143:9 */ type IOleInPlaceSiteVtbl = IOleInPlaceSiteVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2770:3 */ type IContinueVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFContinue uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:151:9 */ type IContinueVtbl = IContinueVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:2893:3 */ // **************************************************************************** // // IViewObject interface type LPVIEWOBJECT = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:2937:21 */ type IViewObjectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDraw uintptr FGetColorSet uintptr FFreeze uintptr FUnfreeze uintptr FSetAdvise uintptr FGetAdvise uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:159:9 */ type IViewObjectVtbl = IViewObjectVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3050:3 */ // **************************************************************************** // // IViewObject2 interface type LPVIEWOBJECT2 = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:3225:22 */ type IViewObject2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDraw uintptr FGetColorSet uintptr FFreeze uintptr FUnfreeze uintptr FSetAdvise uintptr FGetAdvise uintptr FGetExtent uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:167:9 */ type IViewObject2Vtbl = IViewObject2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3313:3 */ // **************************************************************************** // // IDropSource interface type LPDROPSOURCE = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:3383:21 */ type IDropSourceVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryContinueDrag uintptr FGiveFeedback uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:175:9 */ type IDropSourceVtbl = IDropSourceVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3428:3 */ // **************************************************************************** // // IDropTarget interface type LPDROPTARGET = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:3476:21 */ type IDropTargetVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDragEnter uintptr FDragOver uintptr FDragLeave uintptr FDrop uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:183:9 */ type IDropTargetVtbl = IDropTargetVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3576:3 */ type IDropSourceNotifyVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDragEnterTarget uintptr FDragLeaveTarget uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:191:9 */ type IDropSourceNotifyVtbl = IDropSourceNotifyVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3672:3 */ // **************************************************************************** // // IEnumOLEVERB interface type LPENUMOLEVERB = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:3722:22 */ type tagOLEVERB = struct { FlVerb LONG F__ccgo_pad1 [4]byte FlpszVerbName LPOLESTR FfuFlags DWORD FgrfAttribs DWORD } /* /usr/x86_64-w64-mingw32/include/oleidl.h:3724:9 */ type OLEVERB = tagOLEVERB /* /usr/x86_64-w64-mingw32/include/oleidl.h:3729:3 */ type LPOLEVERB = uintptr /* /usr/x86_64-w64-mingw32/include/oleidl.h:3730:27 */ type OLEVERBATTRIB = uint32 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3735:3 */ type IEnumOLEVERBVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/oleidl.h:199:9 */ type IEnumOLEVERBVtbl = IEnumOLEVERBVtbl1 /* /usr/x86_64-w64-mingw32/include/oleidl.h:3795:3 */ // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/servprov.h:23:9 */ // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/servprov.h:23: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 /* /usr/x86_64-w64-mingw32/include/servprov.h:62:26 */ type IServiceProviderVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryService uintptr } /* /usr/x86_64-w64-mingw32/include/servprov.h:23:9 */ type IServiceProviderVtbl = IServiceProviderVtbl1 /* /usr/x86_64-w64-mingw32/include/servprov.h:122:3 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:23:9 */ // Begin additional prototypes for all interfaces // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/oaidl.h:23:35 */ type ICreateTypeInfo21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:31:9 */ type ICreateTypeInfo2 = ICreateTypeInfo21 /* /usr/x86_64-w64-mingw32/include/oaidl.h:31:36 */ type ICreateTypeLib1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:39:9 */ type ICreateTypeLib = ICreateTypeLib1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:39:34 */ type ICreateTypeLib21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:47:9 */ type ICreateTypeLib2 = ICreateTypeLib21 /* /usr/x86_64-w64-mingw32/include/oaidl.h:47:35 */ type IDispatch1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:55:9 */ type IDispatch = IDispatch1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:55:29 */ type IEnumVARIANT1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:63:9 */ type IEnumVARIANT = IEnumVARIANT1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:63:32 */ type ITypeComp1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:71:9 */ type ITypeComp = ITypeComp1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:71:29 */ type ITypeInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:79:9 */ type ITypeInfo = ITypeInfo1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:79:29 */ type ITypeInfo21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:87:9 */ type ITypeInfo2 = ITypeInfo21 /* /usr/x86_64-w64-mingw32/include/oaidl.h:87:30 */ type ITypeLib1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:95:9 */ type ITypeLib = ITypeLib1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:95:28 */ type ITypeLib21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:103:9 */ type ITypeLib2 = ITypeLib21 /* /usr/x86_64-w64-mingw32/include/oaidl.h:103:29 */ type ITypeChangeEvents1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:111:9 */ type ITypeChangeEvents = ITypeChangeEvents1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:111:37 */ type IErrorInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:119:9 */ type IErrorInfo = IErrorInfo1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:119:30 */ type ICreateErrorInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:127:9 */ type ICreateErrorInfo = ICreateErrorInfo1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:127:36 */ type ISupportErrorInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:135:9 */ type ISupportErrorInfo = ISupportErrorInfo1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:135:37 */ type ITypeFactory1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:143:9 */ type ITypeFactory = ITypeFactory1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:143:32 */ type ITypeMarshal1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:151:9 */ type ITypeMarshal = ITypeMarshal1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:151:32 */ type IRecordInfo1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:159:9 */ type IRecordInfo = IRecordInfo1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:159:31 */ type IErrorLog1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:167:9 */ type IErrorLog = IErrorLog1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:167:29 */ type IPropertyBag1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:175:9 */ type IPropertyBag = IPropertyBag1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:175:32 */ type CURRENCY = CY /* /usr/x86_64-w64-mingw32/include/oaidl.h:358:12 */ type tagSAFEARRAYBOUND = struct { FcElements ULONG FlLbound LONG } /* /usr/x86_64-w64-mingw32/include/oaidl.h:359:9 */ type SAFEARRAYBOUND = tagSAFEARRAYBOUND /* /usr/x86_64-w64-mingw32/include/oaidl.h:362:3 */ type LPSAFEARRAYBOUND = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:363:34 */ type _wireVARIANT = struct { FclSize DWORD FrpcReserved DWORD Fvt USHORT FwReserved1 USHORT FwReserved2 USHORT FwReserved3 USHORT F__16 struct { FllVal LONGLONG F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/oaidl.h:365:9 */ type WireVARIANT = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:365:29 */ type _wireBRECORD = struct { FfFlags ULONG FclSize ULONG FpRecInfo uintptr FpRecord uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:366:9 */ type WireBRECORD = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:366:29 */ type _wireSAFEARR_BSTR = struct { FSize ULONG F__ccgo_pad1 [4]byte FaBstr uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:368:9 */ type SAFEARR_BSTR = _wireSAFEARR_BSTR /* /usr/x86_64-w64-mingw32/include/oaidl.h:371:3 */ type _wireSAFEARR_UNKNOWN = struct { FSize ULONG F__ccgo_pad1 [4]byte FapUnknown uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:373:9 */ type SAFEARR_UNKNOWN = _wireSAFEARR_UNKNOWN /* /usr/x86_64-w64-mingw32/include/oaidl.h:376:3 */ type _wireSAFEARR_DISPATCH = struct { FSize ULONG F__ccgo_pad1 [4]byte FapDispatch uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:378:9 */ type SAFEARR_DISPATCH = _wireSAFEARR_DISPATCH /* /usr/x86_64-w64-mingw32/include/oaidl.h:381:3 */ type _wireSAFEARR_VARIANT = struct { FSize ULONG F__ccgo_pad1 [4]byte FaVariant uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:383:9 */ type SAFEARR_VARIANT = _wireSAFEARR_VARIANT /* /usr/x86_64-w64-mingw32/include/oaidl.h:386:3 */ type _wireSAFEARR_BRECORD = struct { FSize ULONG F__ccgo_pad1 [4]byte FaRecord uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:388:9 */ type SAFEARR_BRECORD = _wireSAFEARR_BRECORD /* /usr/x86_64-w64-mingw32/include/oaidl.h:391:3 */ type _wireSAFEARR_HAVEIID = struct { FSize ULONG F__ccgo_pad1 [4]byte FapUnknown uintptr Fiid IID } /* /usr/x86_64-w64-mingw32/include/oaidl.h:393:9 */ type SAFEARR_HAVEIID = _wireSAFEARR_HAVEIID /* /usr/x86_64-w64-mingw32/include/oaidl.h:397:3 */ type SF_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:411:3 */ type _wireSAFEARRAY_UNION = struct { FsfType ULONG F__ccgo_pad1 [4]byte Fu struct { FBstrStr SAFEARR_BSTR F__ccgo_pad1 [16]byte } } /* /usr/x86_64-w64-mingw32/include/oaidl.h:413:9 */ type SAFEARRAYUNION = _wireSAFEARRAY_UNION /* /usr/x86_64-w64-mingw32/include/oaidl.h:427:3 */ type _wireSAFEARRAY = struct { FcDims USHORT FfFeatures USHORT FcbElements ULONG FcLocks ULONG F__ccgo_pad1 [4]byte FuArrayStructs SAFEARRAYUNION Frgsabound [1]SAFEARRAYBOUND } /* /usr/x86_64-w64-mingw32/include/oaidl.h:429:9 */ type WireSAFEARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:436:3 */ type WirePSAFEARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:437:23 */ type tagSAFEARRAY = struct { FcDims USHORT FfFeatures USHORT FcbElements ULONG FcLocks ULONG F__ccgo_pad1 [4]byte FpvData PVOID Frgsabound [1]SAFEARRAYBOUND } /* /usr/x86_64-w64-mingw32/include/oaidl.h:439:9 */ type SAFEARRAY = tagSAFEARRAY /* /usr/x86_64-w64-mingw32/include/oaidl.h:446:3 */ type LPSAFEARRAY = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:447: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 F__ccgo_pad1 [8]byte } } } } /* /usr/x86_64-w64-mingw32/include/oaidl.h:495: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 /* /usr/x86_64-w64-mingw32/include/oaidl.h:495:27 */ type __tagVARIANT = struct { Fvt VARTYPE FwReserved1 WORD FwReserved2 WORD FwReserved3 WORD Fn3 struct { FllVal LONGLONG F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/oaidl.h:499:9 */ type __tagBRECORD = struct { FpvRecord PVOID FpRecInfo uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:548:17 */ type LPVARIANT = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:558:17 */ type VARIANTARG = VARIANT /* /usr/x86_64-w64-mingw32/include/oaidl.h:559:17 */ type LPVARIANTARG = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:560:17 */ type DISPID = LONG /* /usr/x86_64-w64-mingw32/include/oaidl.h:637:14 */ type MEMBERID = DISPID /* /usr/x86_64-w64-mingw32/include/oaidl.h:638:16 */ type HREFTYPE = DWORD /* /usr/x86_64-w64-mingw32/include/oaidl.h:639:15 */ type TYPEKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:650:3 */ type tagTYPEDESC = struct { F__0 struct{ Flptdesc uintptr } Fvt VARTYPE F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:652:9 */ type tagARRAYDESC = struct { FtdescElem TYPEDESC FcDims USHORT F__ccgo_pad1 [2]byte Frgbounds [1]SAFEARRAYBOUND F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:655:9 */ type TYPEDESC = tagTYPEDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:659:3 */ type ARRAYDESC = tagARRAYDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:665:3 */ type tagPARAMDESCEX = struct { FcBytes ULONG F__ccgo_pad1 [4]byte FvarDefaultValue VARIANTARG } /* /usr/x86_64-w64-mingw32/include/oaidl.h:667:9 */ type PARAMDESCEX = tagPARAMDESCEX /* /usr/x86_64-w64-mingw32/include/oaidl.h:670:3 */ type LPPARAMDESCEX = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:671:31 */ type tagPARAMDESC = struct { Fpparamdescex LPPARAMDESCEX FwParamFlags USHORT F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:673:9 */ type PARAMDESC = tagPARAMDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:676:3 */ type LPPARAMDESC = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:677:29 */ type tagIDLDESC = struct { FdwReserved ULONG_PTR FwIDLFlags USHORT F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:696:9 */ type IDLDESC = tagIDLDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:699:3 */ type LPIDLDESC = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:700:27 */ type tagELEMDESC = struct { Ftdesc TYPEDESC Fu struct{ Fidldesc IDLDESC } } /* /usr/x86_64-w64-mingw32/include/oaidl.h:720:11 */ type ELEMDESC = tagELEMDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:726:5 */ type LPELEMDESC = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:726: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:729:9 */ type TYPEATTR = tagTYPEATTR /* /usr/x86_64-w64-mingw32/include/oaidl.h:748:3 */ type LPTYPEATTR = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:749:28 */ type tagDISPPARAMS = struct { Frgvarg uintptr FrgdispidNamedArgs uintptr FcArgs UINT FcNamedArgs UINT } /* /usr/x86_64-w64-mingw32/include/oaidl.h:751:9 */ type DISPPARAMS = tagDISPPARAMS /* /usr/x86_64-w64-mingw32/include/oaidl.h:756:3 */ type tagEXCEPINFO = struct { FwCode WORD FwReserved WORD F__ccgo_pad1 [4]byte FbstrSource BSTR FbstrDescription BSTR FbstrHelpFile BSTR FdwHelpContext DWORD F__ccgo_pad2 [4]byte FpvReserved PVOID FpfnDeferredFillIn uintptr Fscode SCODE F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:771:11 */ type EXCEPINFO = tagEXCEPINFO /* /usr/x86_64-w64-mingw32/include/oaidl.h:781:5 */ type LPEXCEPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:781:16 */ type CALLCONV = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:796:3 */ type FUNCKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:804:3 */ type INVOKEKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:811:3 */ type tagFUNCDESC = struct { Fmemid MEMBERID F__ccgo_pad1 [4]byte Flprgscode uintptr FlprgelemdescParam uintptr Ffunckind FUNCKIND Finvkind INVOKEKIND Fcallconv CALLCONV FcParams SHORT FcParamsOpt SHORT FoVft SHORT FcScodes SHORT F__ccgo_pad2 [4]byte FelemdescFunc ELEMDESC FwFuncFlags WORD F__ccgo_pad3 [6]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:813:9 */ type FUNCDESC = tagFUNCDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:826:3 */ type LPFUNCDESC = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:827:28 */ type VARKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:834:3 */ type tagVARDESC = struct { Fmemid MEMBERID F__ccgo_pad1 [4]byte FlpstrSchema LPOLESTR F__16 struct { F__ccgo_pad1 [0]uint64 FoInst ULONG F__ccgo_pad2 [4]byte } FelemdescVar ELEMDESC FwVarFlags WORD F__ccgo_pad2 [2]byte Fvarkind VARKIND } /* /usr/x86_64-w64-mingw32/include/oaidl.h:845:9 */ type VARDESC = tagVARDESC /* /usr/x86_64-w64-mingw32/include/oaidl.h:855:3 */ type LPVARDESC = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:856:27 */ type TYPEFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:874:3 */ type FUNCFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:890:3 */ type VARFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:906:3 */ type tagCLEANLOCALSTORAGE = struct { FpInterface uintptr FpStorage PVOID Fflags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:908:9 */ type CLEANLOCALSTORAGE = tagCLEANLOCALSTORAGE /* /usr/x86_64-w64-mingw32/include/oaidl.h:912:3 */ type tagCUSTDATAITEM = struct { Fguid GUID FvarValue VARIANTARG } /* /usr/x86_64-w64-mingw32/include/oaidl.h:914:9 */ type CUSTDATAITEM = tagCUSTDATAITEM /* /usr/x86_64-w64-mingw32/include/oaidl.h:917:3 */ type LPCUSTDATAITEM = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:918:32 */ type tagCUSTDATA = struct { FcCustData DWORD F__ccgo_pad1 [4]byte FprgCustData LPCUSTDATAITEM } /* /usr/x86_64-w64-mingw32/include/oaidl.h:920:9 */ type CUSTDATA = tagCUSTDATA /* /usr/x86_64-w64-mingw32/include/oaidl.h:923:3 */ type LPCUSTDATA = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:924:28 */ // **************************************************************************** // // ICreateTypeInfo interface type LPCREATETYPEINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:937: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:23:9 */ type ICreateTypeInfoVtbl = ICreateTypeInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:1158:3 */ // **************************************************************************** // // ICreateTypeInfo2 interface type LPCREATETYPEINFO2 = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:1290: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:31:9 */ type ICreateTypeInfo2Vtbl = ICreateTypeInfo2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:1557:3 */ // **************************************************************************** // // ICreateTypeLib interface type LPCREATETYPELIB = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:1751: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:39:9 */ type ICreateTypeLibVtbl = ICreateTypeLibVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:1855:3 */ // **************************************************************************** // // ICreateTypeLib2 interface type LPCREATETYPELIB2 = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:1935: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:47:9 */ type ICreateTypeLib2Vtbl = ICreateTypeLib2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2036:3 */ // **************************************************************************** // // IDispatch interface type LPDISPATCH = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:2136:19 */ type IDispatchVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:55:9 */ type IDispatchVtbl = IDispatchVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2237:3 */ // **************************************************************************** // // IEnumVARIANT interface type LPENUMVARIANT = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:2334:22 */ type IEnumVARIANTVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:63:9 */ type IEnumVARIANTVtbl = IEnumVARIANTVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2394:3 */ // **************************************************************************** // // ITypeComp interface type LPTYPECOMP = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:2470:19 */ type DESCKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2479:3 */ type tagBINDPTR = struct{ Flpfuncdesc uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:2481:9 */ type BINDPTR = tagBINDPTR /* /usr/x86_64-w64-mingw32/include/oaidl.h:2485:3 */ type LPBINDPTR = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:2486:26 */ type ITypeCompVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBind uintptr FBindType uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:71:9 */ type ITypeCompVtbl = ITypeCompVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2545:3 */ // **************************************************************************** // // ITypeInfo interface type LPTYPEINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:2651: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:79:9 */ type ITypeInfoVtbl = ITypeInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:2873:3 */ // **************************************************************************** // // ITypeInfo2 interface type LPTYPEINFO2 = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:3239: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:87:9 */ type ITypeInfo2Vtbl = ITypeInfo2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:3524:3 */ // **************************************************************************** // // ITypeLib interface type SYSKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:3737:3 */ type LIBFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:3744:3 */ type LPTYPELIB = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:3746:18 */ type tagTLIBATTR = struct { Fguid GUID Flcid LCID Fsyskind SYSKIND FwMajorVerNum WORD FwMinorVerNum WORD FwLibFlags WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/oaidl.h:3748:9 */ type TLIBATTR = tagTLIBATTR /* /usr/x86_64-w64-mingw32/include/oaidl.h:3755:3 */ type LPTLIBATTR = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:3756: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:95:9 */ type ITypeLibVtbl = ITypeLibVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:3880:3 */ // **************************************************************************** // // ITypeLib2 interface type LPTYPELIB2 = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:4081: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:103:9 */ type ITypeLib2Vtbl = ITypeLib2Vtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4203:3 */ // **************************************************************************** // // ITypeChangeEvents interface type LPTYPECHANGEEVENTS = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:4346:27 */ type CHANGEKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4357:3 */ type ITypeChangeEventsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRequestTypeChange uintptr FAfterTypeChange uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:111:9 */ type ITypeChangeEventsVtbl = ITypeChangeEventsVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4410:3 */ // **************************************************************************** // // IErrorInfo interface type LPERRORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:4458:20 */ type IErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetGUID uintptr FGetSource uintptr FGetDescription uintptr FGetHelpFile uintptr FGetHelpContext uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:119:9 */ type IErrorInfoVtbl = IErrorInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4522:3 */ // **************************************************************************** // // ICreateErrorInfo interface type LPCREATEERRORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:4582:26 */ type ICreateErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetGUID uintptr FSetSource uintptr FSetDescription uintptr FSetHelpFile uintptr FSetHelpContext uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:127:9 */ type ICreateErrorInfoVtbl = ICreateErrorInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4646:3 */ // **************************************************************************** // // ISupportErrorInfo interface type LPSUPPORTERRORINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:4706:27 */ type ISupportErrorInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInterfaceSupportsErrorInfo uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:135:9 */ type ISupportErrorInfoVtbl = ISupportErrorInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4742:3 */ type ITypeFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateFromTypeInfo uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:143:9 */ type ITypeFactoryVtbl = ITypeFactoryVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4824:3 */ type ITypeMarshalVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSize uintptr FMarshal uintptr FUnmarshal uintptr FFree uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:151:9 */ type ITypeMarshalVtbl = ITypeMarshalVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:4947:3 */ // **************************************************************************** // // IRecordInfo interface type LPRECORDINFO = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:5003: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 } /* /usr/x86_64-w64-mingw32/include/oaidl.h:159:9 */ type IRecordInfoVtbl = IRecordInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:5171:3 */ // **************************************************************************** // // IErrorLog interface type LPERRORLOG = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:5275:19 */ type IErrorLogVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAddError uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:167:9 */ type IErrorLogVtbl = IErrorLogVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:5313:3 */ // **************************************************************************** // // IPropertyBag interface type LPPROPERTYBAG = uintptr /* /usr/x86_64-w64-mingw32/include/oaidl.h:5357:22 */ type IPropertyBagVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRead uintptr FWrite uintptr } /* /usr/x86_64-w64-mingw32/include/oaidl.h:175:9 */ type IPropertyBagVtbl = IPropertyBagVtbl1 /* /usr/x86_64-w64-mingw32/include/oaidl.h:5406:3 */ // End additional prototypes type IXMLDOMImplementation1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:35:9 */ // End additional prototypes type IXMLDOMImplementation = IXMLDOMImplementation1 /* /usr/x86_64-w64-mingw32/include/msxml.h:35:38 */ type IXMLDOMNode1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:40:9 */ type IXMLDOMNode = IXMLDOMNode1 /* /usr/x86_64-w64-mingw32/include/msxml.h:40:28 */ type IXMLDOMDocumentFragment1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:45:9 */ type IXMLDOMDocumentFragment = IXMLDOMDocumentFragment1 /* /usr/x86_64-w64-mingw32/include/msxml.h:45:40 */ type IXMLDOMDocument1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:50:9 */ type IXMLDOMDocument = IXMLDOMDocument1 /* /usr/x86_64-w64-mingw32/include/msxml.h:50:32 */ type IXMLDOMNodeList1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:55:9 */ type IXMLDOMNodeList = IXMLDOMNodeList1 /* /usr/x86_64-w64-mingw32/include/msxml.h:55:32 */ type IXMLDOMNamedNodeMap1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:60:9 */ type IXMLDOMNamedNodeMap = IXMLDOMNamedNodeMap1 /* /usr/x86_64-w64-mingw32/include/msxml.h:60:36 */ type IXMLDOMCharacterData1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:65:9 */ type IXMLDOMCharacterData = IXMLDOMCharacterData1 /* /usr/x86_64-w64-mingw32/include/msxml.h:65:37 */ type IXMLDOMAttribute1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:70:9 */ type IXMLDOMAttribute = IXMLDOMAttribute1 /* /usr/x86_64-w64-mingw32/include/msxml.h:70:33 */ type IXMLDOMElement1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:75:9 */ type IXMLDOMElement = IXMLDOMElement1 /* /usr/x86_64-w64-mingw32/include/msxml.h:75:31 */ type IXMLDOMText1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:80:9 */ type IXMLDOMText = IXMLDOMText1 /* /usr/x86_64-w64-mingw32/include/msxml.h:80:28 */ type IXMLDOMComment1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:85:9 */ type IXMLDOMComment = IXMLDOMComment1 /* /usr/x86_64-w64-mingw32/include/msxml.h:85:31 */ type IXMLDOMProcessingInstruction1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:90:9 */ type IXMLDOMProcessingInstruction = IXMLDOMProcessingInstruction1 /* /usr/x86_64-w64-mingw32/include/msxml.h:90:45 */ type IXMLDOMCDATASection1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:95:9 */ type IXMLDOMCDATASection = IXMLDOMCDATASection1 /* /usr/x86_64-w64-mingw32/include/msxml.h:95:36 */ type IXMLDOMDocumentType1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:100:9 */ type IXMLDOMDocumentType = IXMLDOMDocumentType1 /* /usr/x86_64-w64-mingw32/include/msxml.h:100:36 */ type IXMLDOMNotation1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:105:9 */ type IXMLDOMNotation = IXMLDOMNotation1 /* /usr/x86_64-w64-mingw32/include/msxml.h:105:32 */ type IXMLDOMEntity1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:110:9 */ type IXMLDOMEntity = IXMLDOMEntity1 /* /usr/x86_64-w64-mingw32/include/msxml.h:110:30 */ type IXMLDOMEntityReference1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:115:9 */ type IXMLDOMEntityReference = IXMLDOMEntityReference1 /* /usr/x86_64-w64-mingw32/include/msxml.h:115:39 */ type IXMLDOMParseError1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:120:9 */ type IXMLDOMParseError = IXMLDOMParseError1 /* /usr/x86_64-w64-mingw32/include/msxml.h:120:34 */ type IXTLRuntime1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:125:9 */ type IXTLRuntime = IXTLRuntime1 /* /usr/x86_64-w64-mingw32/include/msxml.h:125:28 */ type XMLDOMDocumentEvents1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:130:9 */ type XMLDOMDocumentEvents = XMLDOMDocumentEvents1 /* /usr/x86_64-w64-mingw32/include/msxml.h:130:37 */ type IXMLHttpRequest1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:153:9 */ type IXMLHttpRequest = IXMLHttpRequest1 /* /usr/x86_64-w64-mingw32/include/msxml.h:153:32 */ type IXMLDSOControl1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:167:9 */ type IXMLDSOControl = IXMLDSOControl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:167:31 */ type IXMLElementCollection1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:181:9 */ type IXMLElementCollection = IXMLElementCollection1 /* /usr/x86_64-w64-mingw32/include/msxml.h:181:38 */ type IXMLDocument1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:186:9 */ type IXMLDocument = IXMLDocument1 /* /usr/x86_64-w64-mingw32/include/msxml.h:186:29 */ type IXMLDocument21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:191:9 */ type IXMLDocument2 = IXMLDocument21 /* /usr/x86_64-w64-mingw32/include/msxml.h:191:30 */ type IXMLElement1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:196:9 */ type IXMLElement = IXMLElement1 /* /usr/x86_64-w64-mingw32/include/msxml.h:196:28 */ type IXMLElement21 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:201:9 */ type IXMLElement2 = IXMLElement21 /* /usr/x86_64-w64-mingw32/include/msxml.h:201:29 */ type IXMLAttribute1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:206:9 */ type IXMLAttribute = IXMLAttribute1 /* /usr/x86_64-w64-mingw32/include/msxml.h:206:30 */ type IXMLError1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:211:9 */ type IXMLError = IXMLError1 /* /usr/x86_64-w64-mingw32/include/msxml.h:211:26 */ type _xml_error = struct { F_nLine uint32 F__ccgo_pad1 [4]byte F_pchBuf BSTR F_cchBuf uint32 F_ich uint32 F_pszFound BSTR F_pszExpected BSTR F_reserved1 DWORD F_reserved2 DWORD } /* /usr/x86_64-w64-mingw32/include/msxml.h:225:11 */ type XML_ERROR = _xml_error /* /usr/x86_64-w64-mingw32/include/msxml.h:234:5 */ type DOMNodeType = uint32 /* /usr/x86_64-w64-mingw32/include/msxml.h:246:5 */ type XMLELEM_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/msxml.h:251:5 */ type IXMLDOMImplementationVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr FhasFeature uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:35:9 */ type IXMLDOMImplementationVtbl = IXMLDOMImplementationVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:275: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:40:9 */ type IXMLDOMNodeVtbl = IXMLDOMNodeVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:384: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:45:9 */ type IXMLDOMDocumentFragmentVtbl = IXMLDOMDocumentFragmentVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:561: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:50:9 */ type IXMLDOMDocumentVtbl = IXMLDOMDocumentVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:733: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:55:9 */ type IXMLDOMNodeListVtbl = IXMLDOMNodeListVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:912: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:60:9 */ type IXMLDOMNamedNodeMapVtbl = IXMLDOMNamedNodeMapVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:981: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:65:9 */ type IXMLDOMCharacterDataVtbl = IXMLDOMCharacterDataVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1097: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:70:9 */ type IXMLDOMAttributeVtbl = IXMLDOMAttributeVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1233: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:75:9 */ type IXMLDOMElementVtbl = IXMLDOMElementVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1366: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:80:9 */ type IXMLDOMTextVtbl = IXMLDOMTextVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1509: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:85:9 */ type IXMLDOMCommentVtbl = IXMLDOMCommentVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1633: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:90:9 */ type IXMLDOMProcessingInstructionVtbl = IXMLDOMProcessingInstructionVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1753: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:95:9 */ type IXMLDOMCDATASectionVtbl = IXMLDOMCDATASectionVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1876: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:100:9 */ type IXMLDOMDocumentTypeVtbl = IXMLDOMDocumentTypeVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:1997: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:105:9 */ type IXMLDOMNotationVtbl = IXMLDOMNotationVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2116: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:110:9 */ type IXMLDOMEntityVtbl = IXMLDOMEntityVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2234: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:115:9 */ type IXMLDOMEntityReferenceVtbl = IXMLDOMEntityReferenceVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2348: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:120:9 */ type IXMLDOMParseErrorVtbl = IXMLDOMParseErrorVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2432: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:125:9 */ type IXTLRuntimeVtbl = IXTLRuntimeVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2541:5 */ type XMLDOMDocumentEventsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:130:9 */ type XMLDOMDocumentEventsVtbl = XMLDOMDocumentEventsVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2637: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:153:9 */ type IXMLHttpRequestVtbl = IXMLHttpRequestVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2708: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:167:9 */ type IXMLDSOControlVtbl = IXMLDSOControlVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2799: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:181:9 */ type IXMLElementCollectionVtbl = IXMLElementCollectionVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2861: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:186:9 */ type IXMLDocumentVtbl = IXMLDocumentVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:2935: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:191:9 */ type IXMLDocument2Vtbl = IXMLDocument2Vtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:3043: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:196:9 */ type IXMLElementVtbl = IXMLElementVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:3149: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 } /* /usr/x86_64-w64-mingw32/include/msxml.h:201:9 */ type IXMLElement2Vtbl = IXMLElement2Vtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:3245:5 */ type IXMLAttributeVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetTypeInfoCount uintptr FGetTypeInfo uintptr FGetIDsOfNames uintptr FInvoke uintptr Fget_name uintptr Fget_value uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:206:9 */ type IXMLAttributeVtbl = IXMLAttributeVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:3322:5 */ type IXMLErrorVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetErrorInfo uintptr } /* /usr/x86_64-w64-mingw32/include/msxml.h:211:9 */ type IXMLErrorVtbl = IXMLErrorVtbl1 /* /usr/x86_64-w64-mingw32/include/msxml.h:3360:5 */ // **************************************************************************** // // IPersistMoniker interface type LPPERSISTMONIKER = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:795:25 */ type IPersistMonikerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetClassID uintptr FIsDirty uintptr FLoad uintptr FSave uintptr FSaveCompleted uintptr FGetCurMoniker uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:23:9 */ type IPersistMonikerVtbl = IPersistMonikerVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:877:3 */ // **************************************************************************** // // IMonikerProp interface type LPMONIKERPROP = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:944:22 */ type MONIKERPROPERTY = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:952:3 */ type IMonikerPropVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPutProperty uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:31:9 */ type IMonikerPropVtbl = IMonikerPropVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:990:3 */ // **************************************************************************** // // IBindProtocol interface type LPBINDPROTOCOL = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1038:23 */ type IBindProtocolVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateBinding uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:39:9 */ type IBindProtocolVtbl = IBindProtocolVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1078:3 */ // **************************************************************************** // // IBinding interface type LPBINDING = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1126:18 */ type IBindingVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAbort uintptr FSuspend uintptr FResume uintptr FSetPriority uintptr FGetPriority uintptr FGetBindResult uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:47:9 */ type IBindingVtbl = IBindingVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1200:3 */ // **************************************************************************** // // IBindStatusCallback interface type LPBINDSTATUSCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1293:29 */ type BINDVERB = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1301:3 */ type BINDINFOF = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1306:3 */ type BINDF = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1340:3 */ type URL_ENCODING = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1346:3 */ type _tagBINDINFO = struct { FcbSize ULONG F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:1348:9 */ type BINDINFO = _tagBINDINFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:1363:3 */ type _REMSECURITY_ATTRIBUTES = struct { FnLength DWORD FlpSecurityDescriptor DWORD FbInheritHandle WINBOOL } /* /usr/x86_64-w64-mingw32/include/urlmon.h:1365:9 */ type REMSECURITY_ATTRIBUTES = _REMSECURITY_ATTRIBUTES /* /usr/x86_64-w64-mingw32/include/urlmon.h:1369:3 */ type PREMSECURITY_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1370:40 */ type LPREMSECURITY_ATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1371:40 */ type _tagRemBINDINFO = struct { FcbSize ULONG F__ccgo_pad1 [4]byte FszExtraInfo LPWSTR FgrfBindInfoF DWORD FdwBindVerb DWORD FszCustomVerb LPWSTR FcbstgmedData DWORD FdwOptions DWORD FdwOptionsFlags DWORD FdwCodePage DWORD FsecurityAttributes REMSECURITY_ATTRIBUTES Fiid IID F__ccgo_pad2 [4]byte FpUnk uintptr FdwReserved DWORD F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:1373:9 */ type RemBINDINFO = _tagRemBINDINFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:1387:3 */ type tagRemFORMATETC = struct { FcfFormat DWORD Fptd DWORD FdwAspect DWORD Flindex LONG Ftymed DWORD } /* /usr/x86_64-w64-mingw32/include/urlmon.h:1389:9 */ type RemFORMATETC = tagRemFORMATETC /* /usr/x86_64-w64-mingw32/include/urlmon.h:1395:3 */ type LPREMFORMATETC = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1396:32 */ type BINDINFO_OPTIONS = int32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1414:3 */ type BSCF = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1424:3 */ type BINDSTATUS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1495: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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:55:9 */ type IBindStatusCallbackVtbl = IBindStatusCallbackVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1600:3 */ // **************************************************************************** // // IBindStatusCallbackEx interface type LPBINDSTATUSCALLBACKEX = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1720:31 */ type BINDF2 = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1746: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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:63:9 */ type IBindStatusCallbackExVtbl = IBindStatusCallbackExVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1831:3 */ // **************************************************************************** // // IAuthenticate interface type LPAUTHENTICATION = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:1938:23 */ type IAuthenticateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAuthenticate uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:71:9 */ type IAuthenticateVtbl = IAuthenticateVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:1978:3 */ // **************************************************************************** // // IAuthenticateEx interface type LPAUTHENTICATIONEX = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2026:25 */ type AUTHENTICATEF = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2032:3 */ type _tagAUTHENTICATEINFO = struct { FdwFlags DWORD FdwReserved DWORD } /* /usr/x86_64-w64-mingw32/include/urlmon.h:2034:9 */ type AUTHENTICATEINFO = _tagAUTHENTICATEINFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:2037:3 */ type IAuthenticateExVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FAuthenticate uintptr FAuthenticateEx uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:79:9 */ type IAuthenticateExVtbl = IAuthenticateExVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2086:3 */ // **************************************************************************** // // IHttpNegotiate interface type LPHTTPNEGOTIATE = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2140:24 */ type IHttpNegotiateVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:87:9 */ type IHttpNegotiateVtbl = IHttpNegotiateVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2195:3 */ // **************************************************************************** // // IHttpNegotiate2 interface type LPHTTPNEGOTIATE2 = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2247:25 */ type IHttpNegotiate2Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr FGetRootSecurityId uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:95:9 */ type IHttpNegotiate2Vtbl = IHttpNegotiate2Vtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2302:3 */ // **************************************************************************** // // IHttpNegotiate3 interface type LPHTTPNEGOTIATE3 = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2360:25 */ type IHttpNegotiate3Vtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FBeginningTransaction uintptr FOnResponse uintptr FGetRootSecurityId uintptr FGetSerializedClientCertContext uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:103:9 */ type IHttpNegotiate3Vtbl = IHttpNegotiate3Vtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2420:3 */ // **************************************************************************** // // IWinInetFileStream interface type LPWININETFILESTREAM = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2484:28 */ type IWinInetFileStreamVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetHandleForUnlock uintptr FSetDeleteFile uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:111:9 */ type IWinInetFileStreamVtbl = IWinInetFileStreamVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2529:3 */ // **************************************************************************** // // IWindowForBindingUI interface type LPWINDOWFORBINDINGUI = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2581:29 */ type IWindowForBindingUIVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:119:9 */ type IWindowForBindingUIVtbl = IWindowForBindingUIVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2619:3 */ // **************************************************************************** // // ICodeInstall interface type LPCODEINSTALL = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:2667:22 */ type CIP_STATUS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2680:3 */ type ICodeInstallVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FOnCodeInstallProblem uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:127:9 */ type ICodeInstallVtbl = ICodeInstallVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:2728:3 */ // **************************************************************************** // // IWinInetInfo interface type LPWININETINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:3783:22 */ type IWinInetInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryOption uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:167:9 */ type IWinInetInfoVtbl = IWinInetInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:3822:3 */ // **************************************************************************** // // IHttpSecurity interface type LPHTTPSECURITY = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:3892:23 */ type IHttpSecurityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FOnSecurityProblem uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:175:9 */ type IHttpSecurityVtbl = IHttpSecurityVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:3934:3 */ // **************************************************************************** // // IWinInetHttpInfo interface type LPWININETHTTPINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:3988:26 */ type IWinInetHttpInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FQueryOption uintptr FQueryInfo uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:183:9 */ type IWinInetHttpInfoVtbl = IWinInetHttpInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4039:3 */ type IWinInetHttpTimeoutsVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetRequestTimeouts uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:191:9 */ type IWinInetHttpTimeoutsVtbl = IWinInetHttpTimeoutsVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4156:3 */ // **************************************************************************** // // IBindHost interface type LPBINDHOST = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:4412:19 */ type IBindHostVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreateMoniker uintptr FMonikerBindToStorage uintptr FMonikerBindToObject uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:215:9 */ type IBindHostVtbl = IBindHostVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4484:3 */ // **************************************************************************** // // IInternet interface type LPIINTERNET = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:4703:19 */ type IInternetVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:223:9 */ type IInternetVtbl = IInternetVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4730:3 */ // **************************************************************************** // // IInternetBindInfo interface type LPIINTERNETBINDINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:4772:27 */ type BINDSTRING = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4798:3 */ type IInternetBindInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindInfo uintptr FGetBindString uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:231:9 */ type IInternetBindInfoVtbl = IInternetBindInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4849:3 */ // **************************************************************************** // // IInternetBindInfoEx interface type LPIINTERNETBINDINFOEX = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:4901:29 */ type IInternetBindInfoExVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindInfo uintptr FGetBindString uintptr FGetBindInfoEx uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:239:9 */ type IInternetBindInfoExVtbl = IInternetBindInfoExVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:4956:3 */ // **************************************************************************** // // IInternetProtocolRoot interface type LPIINTERNETPROTOCOLROOT = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5014:31 */ type PI_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5032:3 */ type _tagPROTOCOLDATA = struct { FgrfFlags DWORD FdwState DWORD FpData LPVOID FcbData ULONG F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:5033:9 */ type PROTOCOLDATA = _tagPROTOCOLDATA /* /usr/x86_64-w64-mingw32/include/urlmon.h:5038:3 */ type _tagStartParam = struct { Fiid IID FpIBindCtx uintptr FpItf uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:5040:9 */ type StartParam = _tagStartParam /* /usr/x86_64-w64-mingw32/include/urlmon.h:5044:3 */ type IInternetProtocolRootVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FStart uintptr FContinue uintptr FAbort uintptr FTerminate uintptr FSuspend uintptr FResume uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:247:9 */ type IInternetProtocolRootVtbl = IInternetProtocolRootVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5123:3 */ // **************************************************************************** // // IInternetProtocol interface type LPIINTERNETPROTOCOL = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5191: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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:255:9 */ type IInternetProtocolVtbl = IInternetProtocolVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5283:3 */ // **************************************************************************** // // IInternetProtocolSink interface type LPIINTERNETPROTOCOLSINK = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5552:31 */ type IInternetProtocolSinkVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitch uintptr FReportProgress uintptr FReportData uintptr FReportResult uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:271:9 */ type IInternetProtocolSinkVtbl = IInternetProtocolSinkVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5619:3 */ // **************************************************************************** // // IInternetProtocolSinkStackable interface type LPIINTERNETPROTOCOLSINKStackable = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5679:40 */ type IInternetProtocolSinkStackableVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSwitchSink uintptr FCommitSwitch uintptr FRollbackSwitch uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:279:9 */ type IInternetProtocolSinkStackableVtbl = IInternetProtocolSinkStackableVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5727:3 */ // **************************************************************************** // // IInternetSession interface type LPIINTERNETSESSION = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5783:26 */ type OIBDG_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5788:3 */ type IInternetSessionVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRegisterNameSpace uintptr FUnregisterNameSpace uintptr FRegisterMimeFilter uintptr FUnregisterMimeFilter uintptr FCreateBinding uintptr FSetSessionOption uintptr FGetSessionOption uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:287:9 */ type IInternetSessionVtbl = IInternetSessionVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:5906:3 */ // **************************************************************************** // // IInternetThreadSwitch interface type LPIINTERNETTHREADSWITCH = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:5978:31 */ type IInternetThreadSwitchVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FPrepare uintptr FContinue uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:295:9 */ type IInternetThreadSwitchVtbl = IInternetThreadSwitchVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6019:3 */ // **************************************************************************** // // IInternetPriority interface type LPIINTERNETPRIORITY = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:6071:27 */ type IInternetPriorityVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FSetPriority uintptr FGetPriority uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:303:9 */ type IInternetPriorityVtbl = IInternetPriorityVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6114:3 */ // **************************************************************************** // // IInternetProtocolInfo interface type LPIINTERNETPROTOCOLINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:6166:31 */ type PARSEACTION = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6188:3 */ type PSUACTION = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6193:3 */ type QUERYOPTION = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6212:3 */ type IInternetProtocolInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FParseUrl uintptr FCombineUrl uintptr FCompareUrl uintptr FQueryInfo uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:311:9 */ type IInternetProtocolInfoVtbl = IInternetProtocolInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6309:3 */ type IInternetSecurityMgrSiteVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWindow uintptr FEnableModeless uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:319:9 */ type IInternetSecurityMgrSiteVtbl = IInternetSecurityMgrSiteVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6585:3 */ // **************************************************************************** // // IInternetSecurityManager interface type PUAF = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6675:3 */ type PUAFOUT = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6679:3 */ type SZM_FLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6685: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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:327:9 */ type IInternetSecurityManagerVtbl = IInternetSecurityManagerVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:6814:3 */ type IInternetHostSecurityManagerVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetSecurityId uintptr FProcessUrlAction uintptr FQueryCustomPolicy uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:359:9 */ type IInternetHostSecurityManagerVtbl = IInternetHostSecurityManagerVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:7521:3 */ // **************************************************************************** // // IInternetZoneManager interface type LPURLZONEMANAGER = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:7780:30 */ type URLZONE = int32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:7793:3 */ type URLTEMPLATE = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:7806:3 */ type ZAFLAGS = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:7826:3 */ type _ZONEATTRIBUTES = struct { FcbSize ULONG FszDisplayName [260]WCHAR FszDescription [200]WCHAR FszIconPath [260]WCHAR FdwTemplateMinLevel DWORD FdwTemplateRecommended DWORD FdwTemplateCurrentLevel DWORD FdwFlags DWORD } /* /usr/x86_64-w64-mingw32/include/urlmon.h:7828:9 */ type ZONEATTRIBUTES = _ZONEATTRIBUTES /* /usr/x86_64-w64-mingw32/include/urlmon.h:7837:3 */ type LPZONEATTRIBUTES = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:7838:32 */ type URLZONEREG = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:7845: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 } /* /usr/x86_64-w64-mingw32/include/urlmon.h:367:9 */ type IInternetZoneManagerVtbl = IInternetZoneManagerVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:8020:3 */ type _tagCODEBASEHOLD = struct { FcbSize ULONG F__ccgo_pad1 [4]byte FszDistUnit LPWSTR FszCodeBase LPWSTR FdwVersionMS DWORD FdwVersionLS DWORD FdwStyle DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:8657:9 */ type CODEBASEHOLD = _tagCODEBASEHOLD /* /usr/x86_64-w64-mingw32/include/urlmon.h:8664:3 */ type LPCODEBASEHOLD = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:8665:33 */ type _tagSOFTDISTINFO = struct { FcbSize ULONG FdwFlags DWORD FdwAdState DWORD F__ccgo_pad1 [4]byte FszTitle LPWSTR FszAbstract LPWSTR FszHREF LPWSTR FdwInstalledVersionMS DWORD FdwInstalledVersionLS DWORD FdwUpdateVersionMS DWORD FdwUpdateVersionLS DWORD FdwAdvertisedVersionMS DWORD FdwAdvertisedVersionLS DWORD FdwReserved DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:8667:9 */ type SOFTDISTINFO = _tagSOFTDISTINFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:8681:3 */ type LPSOFTDISTINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:8682:33 */ type ISoftDistExtVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FProcessSoftDist uintptr FGetFirstCodeBase uintptr FGetNextCodeBase uintptr FAsyncInstallDistributionUnit uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:391:9 */ type ISoftDistExtVtbl = ISoftDistExtVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:8759:3 */ // **************************************************************************** // // ICatalogFileInfo interface type LPCATALOGFILEINFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:8822:26 */ type ICatalogFileInfoVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCatalogFile uintptr FGetJavaTrust uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:399:9 */ type ICatalogFileInfoVtbl = ICatalogFileInfoVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:8865:3 */ // **************************************************************************** // // IDataFilter interface type LPDATAFILTER = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:8917:21 */ type IDataFilterVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FDoEncode uintptr FDoDecode uintptr FSetEncodingLevel uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:407:9 */ type IDataFilterVtbl = IDataFilterVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:8999:3 */ type _tagPROTOCOLFILTERDATA = struct { FcbSize DWORD F__ccgo_pad1 [4]byte FpProtocolSink uintptr FpProtocol uintptr FpUnk uintptr FdwFilterFlags DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:9049:9 */ type PROTOCOLFILTERDATA = _tagPROTOCOLFILTERDATA /* /usr/x86_64-w64-mingw32/include/urlmon.h:9055:3 */ // **************************************************************************** // // IEncodingFilterFactory interface type LPENCODINGFILTERFACTORY = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9063:32 */ type _tagDATAINFO = struct { FulTotalSize ULONG FulavrPacketSize ULONG FulConnectSpeed ULONG FulProcessorSpeed ULONG } /* /usr/x86_64-w64-mingw32/include/urlmon.h:9065:9 */ type DATAINFO = _tagDATAINFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:9070:3 */ type IEncodingFilterFactoryVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FFindBestFilter uintptr FGetDefaultFilter uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:415:9 */ type IEncodingFilterFactoryVtbl = IEncodingFilterFactoryVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:9123:3 */ type _tagHIT_LOGGING_INFO = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FlpszLoggedUrlName LPSTR FStartTime SYSTEMTIME FEndTime SYSTEMTIME FlpszExtendedInfo LPSTR } /* /usr/x86_64-w64-mingw32/include/urlmon.h:9173:9 */ type HIT_LOGGING_INFO = _tagHIT_LOGGING_INFO /* /usr/x86_64-w64-mingw32/include/urlmon.h:9179:3 */ type LPHIT_LOGGING_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9180:37 */ type CONFIRMSAFETY = struct { Fclsid CLSID FpUnk uintptr FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/urlmon.h:9186:1 */ // **************************************************************************** // // IWrappedProtocol interface type LPIWRAPPEDPROTOCOL = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9204:26 */ type IWrappedProtocolVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetWrapperCode uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:423:9 */ type IWrappedProtocolVtbl = IWrappedProtocolVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:9242:3 */ // **************************************************************************** // // IGetBindHandle interface type LPGETBINDHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9290:24 */ type BINDHANDLETYPES = uint32 /* /usr/x86_64-w64-mingw32/include/urlmon.h:9296:3 */ type IGetBindHandleVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetBindHandle uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:431:9 */ type IGetBindHandleVtbl = IGetBindHandleVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:9334:3 */ type _tagPROTOCOL_ARGUMENT = struct { FszMethod LPCWSTR FszTargetUrl LPCWSTR } /* /usr/x86_64-w64-mingw32/include/urlmon.h:9376:9 */ type PROTOCOL_ARGUMENT = _tagPROTOCOL_ARGUMENT /* /usr/x86_64-w64-mingw32/include/urlmon.h:9379:3 */ type LPPROTOCOL_ARGUMENT = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9380:38 */ // **************************************************************************** // // IBindCallbackRedirect interface type LPBINDCALLBACKREDIRECT = uintptr /* /usr/x86_64-w64-mingw32/include/urlmon.h:9392:31 */ type IBindCallbackRedirectVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FRedirect uintptr } /* /usr/x86_64-w64-mingw32/include/urlmon.h:439:9 */ type IBindCallbackRedirectVtbl = IBindCallbackRedirectVtbl1 /* /usr/x86_64-w64-mingw32/include/urlmon.h:9430:3 */ // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/propidl.h:23:9 */ // End additional prototypes //** Autogenerated by WIDL 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/propidl.h:23:36 */ type IPropertySetStorage1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:31:9 */ type IPropertySetStorage = IPropertySetStorage1 /* /usr/x86_64-w64-mingw32/include/propidl.h:31:39 */ type IEnumSTATPROPSTG1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:39:9 */ type IEnumSTATPROPSTG = IEnumSTATPROPSTG1 /* /usr/x86_64-w64-mingw32/include/propidl.h:39:36 */ type IEnumSTATPROPSETSTG1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:47:9 */ type IEnumSTATPROPSETSTG = IEnumSTATPROPSETSTG1 /* /usr/x86_64-w64-mingw32/include/propidl.h:47:39 */ // Headers for imported files //** Autogenerated by WIDL 4.12.1 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 4.12.1 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 } /* /usr/x86_64-w64-mingw32/include/propidl.h:97:9 */ // Headers for imported files //** Autogenerated by WIDL 4.12.1 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 4.12.1 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 /* /usr/x86_64-w64-mingw32/include/propidl.h:100:3 */ type LPVERSIONEDSTREAM = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:101:35 */ type tagCAC = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:123:9 */ type CAC = tagCAC /* /usr/x86_64-w64-mingw32/include/propidl.h:126:3 */ type tagCAUB = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:127:9 */ type CAUB = tagCAUB /* /usr/x86_64-w64-mingw32/include/propidl.h:130:3 */ type tagCAI = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:131:9 */ type CAI = tagCAI /* /usr/x86_64-w64-mingw32/include/propidl.h:134:3 */ type tagCAUI = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:135:9 */ type CAUI = tagCAUI /* /usr/x86_64-w64-mingw32/include/propidl.h:138:3 */ type tagCAL = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:139:9 */ type CAL = tagCAL /* /usr/x86_64-w64-mingw32/include/propidl.h:142:3 */ type tagCAUL = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:143:9 */ type CAUL = tagCAUL /* /usr/x86_64-w64-mingw32/include/propidl.h:146:3 */ type tagCAFLT = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:147:9 */ type CAFLT = tagCAFLT /* /usr/x86_64-w64-mingw32/include/propidl.h:150:3 */ type tagCADBL = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:151:9 */ type CADBL = tagCADBL /* /usr/x86_64-w64-mingw32/include/propidl.h:154:3 */ type tagCACY = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:155:9 */ type CACY = tagCACY /* /usr/x86_64-w64-mingw32/include/propidl.h:158:3 */ type tagCADATE = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:159:9 */ type CADATE = tagCADATE /* /usr/x86_64-w64-mingw32/include/propidl.h:162:3 */ type tagCABSTR = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:163:9 */ type CABSTR = tagCABSTR /* /usr/x86_64-w64-mingw32/include/propidl.h:166:3 */ type tagCABSTRBLOB = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:167:9 */ type CABSTRBLOB = tagCABSTRBLOB /* /usr/x86_64-w64-mingw32/include/propidl.h:170:3 */ type tagCABOOL = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:171:9 */ type CABOOL = tagCABOOL /* /usr/x86_64-w64-mingw32/include/propidl.h:174:3 */ type tagCASCODE = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:175:9 */ type CASCODE = tagCASCODE /* /usr/x86_64-w64-mingw32/include/propidl.h:178:3 */ type tagCAPROPVARIANT = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:179:9 */ type CAPROPVARIANT = tagCAPROPVARIANT /* /usr/x86_64-w64-mingw32/include/propidl.h:182:3 */ type tagCAH = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:183:9 */ type CAH = tagCAH /* /usr/x86_64-w64-mingw32/include/propidl.h:186:3 */ type tagCAUH = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:187:9 */ type CAUH = tagCAUH /* /usr/x86_64-w64-mingw32/include/propidl.h:190:3 */ type tagCALPSTR = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:191:9 */ type CALPSTR = tagCALPSTR /* /usr/x86_64-w64-mingw32/include/propidl.h:194:3 */ type tagCALPWSTR = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:195:9 */ type CALPWSTR = tagCALPWSTR /* /usr/x86_64-w64-mingw32/include/propidl.h:198:3 */ type tagCAFILETIME = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:199:9 */ type CAFILETIME = tagCAFILETIME /* /usr/x86_64-w64-mingw32/include/propidl.h:202:3 */ type tagCACLIPDATA = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:203:9 */ type CACLIPDATA = tagCACLIPDATA /* /usr/x86_64-w64-mingw32/include/propidl.h:206:3 */ type tagCACLSID = struct { FcElems ULONG F__ccgo_pad1 [4]byte FpElems uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:207:9 */ type CACLSID = tagCACLSID /* /usr/x86_64-w64-mingw32/include/propidl.h:210:3 */ type PROPVAR_PAD1 = WORD /* /usr/x86_64-w64-mingw32/include/propidl.h:217:14 */ type PROPVAR_PAD2 = WORD /* /usr/x86_64-w64-mingw32/include/propidl.h:218:14 */ type PROPVAR_PAD3 = WORD /* /usr/x86_64-w64-mingw32/include/propidl.h:219:14 */ type LPPROPVARIANT = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:315:31 */ type tagPROPSPEC = struct { FulKind ULONG F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 Fpropid PROPID F__ccgo_pad2 [4]byte } } /* /usr/x86_64-w64-mingw32/include/propidl.h:424:9 */ type PROPSPEC = tagPROPSPEC /* /usr/x86_64-w64-mingw32/include/propidl.h:430:3 */ type tagSTATPROPSTG = struct { FlpwstrName LPOLESTR Fpropid PROPID Fvt VARTYPE F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/propidl.h:432:9 */ type STATPROPSTG = tagSTATPROPSTG /* /usr/x86_64-w64-mingw32/include/propidl.h:436:3 */ type tagSTATPROPSETSTG = struct { Ffmtid FMTID Fclsid CLSID FgrfFlags DWORD Fmtime FILETIME Fctime FILETIME Fatime FILETIME FdwOSVersion DWORD } /* /usr/x86_64-w64-mingw32/include/propidl.h:443:9 */ type STATPROPSETSTG = tagSTATPROPSETSTG /* /usr/x86_64-w64-mingw32/include/propidl.h:451: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 } /* /usr/x86_64-w64-mingw32/include/propidl.h:23:9 */ type IPropertyStorageVtbl = IPropertyStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/propidl.h:595:3 */ // **************************************************************************** // // IPropertySetStorage interface type LPPROPERTYSETSTORAGE = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:683:29 */ type IPropertySetStorageVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FCreate uintptr FOpen uintptr FDelete uintptr FEnum uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:31:9 */ type IPropertySetStorageVtbl = IPropertySetStorageVtbl1 /* /usr/x86_64-w64-mingw32/include/propidl.h:752:3 */ // **************************************************************************** // // IEnumSTATPROPSTG interface type LPENUMSTATPROPSTG = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:808:26 */ type IEnumSTATPROPSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:39:9 */ type IEnumSTATPROPSTGVtbl = IEnumSTATPROPSTGVtbl1 /* /usr/x86_64-w64-mingw32/include/propidl.h:868:3 */ // **************************************************************************** // // IEnumSTATPROPSETSTG interface type LPENUMSTATPROPSETSTG = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:944:29 */ type IEnumSTATPROPSETSTGVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FNext uintptr FSkip uintptr FReset uintptr FClone uintptr } /* /usr/x86_64-w64-mingw32/include/propidl.h:47:9 */ type IEnumSTATPROPSETSTGVtbl = IEnumSTATPROPSETSTGVtbl1 /* /usr/x86_64-w64-mingw32/include/propidl.h:1004:3 */ type LPPROPERTYSTORAGE = uintptr /* /usr/x86_64-w64-mingw32/include/propidl.h:1074:26 */ type tagSERIALIZEDPROPERTYVALUE = struct { FdwType DWORD Frgb [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/propidl.h:1100:9 */ type SERIALIZEDPROPERTYVALUE = tagSERIALIZEDPROPERTYVALUE /* /usr/x86_64-w64-mingw32/include/propidl.h:1103:3 */ type NUMPARSE = struct { FcDig INT FdwInFlags ULONG FdwOutFlags ULONG FcchUsed INT FnBaseShift INT FnPwr10 INT } /* /usr/x86_64-w64-mingw32/include/oleauto.h:429:3 */ type UDATE = struct { Fst SYSTEMTIME FwDayOfYear USHORT } /* /usr/x86_64-w64-mingw32/include/oleauto.h:530:3 */ type REGKIND = uint32 /* /usr/x86_64-w64-mingw32/include/oleauto.h:592:3 */ type tagPARAMDATA = struct { FszName uintptr Fvt VARTYPE F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/oleauto.h:611:9 */ type PARAMDATA = tagPARAMDATA /* /usr/x86_64-w64-mingw32/include/oleauto.h:614:3 */ type LPPARAMDATA = uintptr /* /usr/x86_64-w64-mingw32/include/oleauto.h:614:13 */ type tagMETHODDATA = struct { FszName uintptr Fppdata uintptr Fdispid DISPID FiMeth UINT Fcc CALLCONV FcArgs UINT FwFlags WORD FvtReturn VARTYPE F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/oleauto.h:616:9 */ type METHODDATA = tagMETHODDATA /* /usr/x86_64-w64-mingw32/include/oleauto.h:625:3 */ type LPMETHODDATA = uintptr /* /usr/x86_64-w64-mingw32/include/oleauto.h:625:14 */ type tagINTERFACEDATA = struct { Fpmethdata uintptr FcMembers UINT F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/oleauto.h:627:9 */ type INTERFACEDATA = tagINTERFACEDATA /* /usr/x86_64-w64-mingw32/include/oleauto.h:630:3 */ type LPINTERFACEDATA = uintptr /* /usr/x86_64-w64-mingw32/include/oleauto.h:630:17 */ type _OLESTREAM = struct{ Flpstbl LPOLESTREAMVTBL } /* /usr/x86_64-w64-mingw32/include/ole2.h:109:9 */ type LPOLESTREAM = uintptr /* /usr/x86_64-w64-mingw32/include/ole2.h:109:27 */ type _OLESTREAMVTBL = struct { FGet uintptr FPut uintptr } /* /usr/x86_64-w64-mingw32/include/ole2.h:109:9 */ type OLESTREAMVTBL = _OLESTREAMVTBL /* /usr/x86_64-w64-mingw32/include/ole2.h:114:3 */ type LPOLESTREAMVTBL = uintptr /* /usr/x86_64-w64-mingw32/include/ole2.h:115:23 */ type OLESTREAM = _OLESTREAM /* /usr/x86_64-w64-mingw32/include/ole2.h:119:3 */ type _STORAGE_READ_CAPACITY = struct { FVersion ULONG FSize ULONG FBlockLength ULONG F__ccgo_pad1 [4]byte FNumberOfBlocks LARGE_INTEGER FDiskLength LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:194:9 */ type STORAGE_READ_CAPACITY = _STORAGE_READ_CAPACITY /* /usr/x86_64-w64-mingw32/include/winioctl.h:200:3 */ type PSTORAGE_READ_CAPACITY = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:200:26 */ type _STORAGE_HOTPLUG_INFO = struct { FSize DWORD FMediaRemovable BOOLEAN FMediaHotplug BOOLEAN FDeviceHotplug BOOLEAN FWriteCacheEnableOverride BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winioctl.h:231:11 */ type STORAGE_HOTPLUG_INFO = _STORAGE_HOTPLUG_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:237:5 */ type PSTORAGE_HOTPLUG_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:237:26 */ type _STORAGE_DEVICE_NUMBER = struct { FDeviceType DWORD FDeviceNumber DWORD FPartitionNumber DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:239:11 */ type STORAGE_DEVICE_NUMBER = _STORAGE_DEVICE_NUMBER /* /usr/x86_64-w64-mingw32/include/winioctl.h:243:5 */ type PSTORAGE_DEVICE_NUMBER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:243:27 */ type _STORAGE_BUS_RESET_REQUEST = struct{ FPathId BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:245:11 */ type STORAGE_BUS_RESET_REQUEST = _STORAGE_BUS_RESET_REQUEST /* /usr/x86_64-w64-mingw32/include/winioctl.h:247:5 */ type PSTORAGE_BUS_RESET_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:247:31 */ type STORAGE_BREAK_RESERVATION_REQUEST1 = struct { FLength DWORD F_unused BYTE FPathId BYTE FTargetId BYTE FLun BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:249:11 */ type STORAGE_BREAK_RESERVATION_REQUEST = STORAGE_BREAK_RESERVATION_REQUEST1 /* /usr/x86_64-w64-mingw32/include/winioctl.h:255:5 */ type PSTORAGE_BREAK_RESERVATION_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:255:39 */ type _PREVENT_MEDIA_REMOVAL = struct{ FPreventMediaRemoval BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winioctl.h:257:11 */ type PREVENT_MEDIA_REMOVAL = _PREVENT_MEDIA_REMOVAL /* /usr/x86_64-w64-mingw32/include/winioctl.h:259:5 */ type PPREVENT_MEDIA_REMOVAL = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:259:27 */ type _CLASS_MEDIA_CHANGE_CONTEXT = struct { FMediaChangeCount DWORD FNewState DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:261:11 */ type CLASS_MEDIA_CHANGE_CONTEXT = _CLASS_MEDIA_CHANGE_CONTEXT /* /usr/x86_64-w64-mingw32/include/winioctl.h:264:5 */ type PCLASS_MEDIA_CHANGE_CONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:264: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 F__ccgo_pad1 [6]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:266:11 */ type TAPE_STATISTICS = _TAPE_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:275:5 */ type PTAPE_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:275:21 */ type _TAPE_GET_STATISTICS = struct{ FOperation DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:284:11 */ type TAPE_GET_STATISTICS = _TAPE_GET_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:286:5 */ type PTAPE_GET_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:286:25 */ type STORAGE_MEDIA_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:356:5 */ type PSTORAGE_MEDIA_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:356:25 */ type STORAGE_BUS_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:389:5 */ type PSTORAGE_BUS_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:389: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 } } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:391:11 */ type DEVICE_MEDIA_INFO = _DEVICE_MEDIA_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:424:5 */ type PDEVICE_MEDIA_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:424:23 */ type _GET_MEDIA_TYPES = struct { FDeviceType DWORD FMediaInfoCount DWORD FMediaInfo [1]DEVICE_MEDIA_INFO } /* /usr/x86_64-w64-mingw32/include/winioctl.h:426:11 */ type GET_MEDIA_TYPES = _GET_MEDIA_TYPES /* /usr/x86_64-w64-mingw32/include/winioctl.h:430:5 */ type PGET_MEDIA_TYPES = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:430:21 */ type _STORAGE_PREDICT_FAILURE = struct { FPredictFailure DWORD FVendorSpecific [512]BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:432:11 */ type STORAGE_PREDICT_FAILURE = _STORAGE_PREDICT_FAILURE /* /usr/x86_64-w64-mingw32/include/winioctl.h:435:5 */ type PSTORAGE_PREDICT_FAILURE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:435:29 */ type MEDIA_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:529:3 */ type PMEDIA_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:529:14 */ type _FORMAT_PARAMETERS = struct { FMediaType MEDIA_TYPE FStartCylinderNumber DWORD FEndCylinderNumber DWORD FStartHeadNumber DWORD FEndHeadNumber DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:531:9 */ type FORMAT_PARAMETERS = _FORMAT_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winioctl.h:537:3 */ type PFORMAT_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:537:21 */ type BAD_TRACK_NUMBER = WORD /* /usr/x86_64-w64-mingw32/include/winioctl.h:539:14 */ type PBAD_TRACK_NUMBER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:540:14 */ type _FORMAT_EX_PARAMETERS = struct { FMediaType MEDIA_TYPE FStartCylinderNumber DWORD FEndCylinderNumber DWORD FStartHeadNumber DWORD FEndHeadNumber DWORD FFormatGapLength WORD FSectorsPerTrack WORD FSectorNumber [1]WORD F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:542:9 */ type FORMAT_EX_PARAMETERS = _FORMAT_EX_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winioctl.h:551:3 */ type PFORMAT_EX_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:551:24 */ type _DISK_GEOMETRY = struct { FCylinders LARGE_INTEGER FMediaType MEDIA_TYPE FTracksPerCylinder DWORD FSectorsPerTrack DWORD FBytesPerSector DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:553:9 */ type DISK_GEOMETRY = _DISK_GEOMETRY /* /usr/x86_64-w64-mingw32/include/winioctl.h:559:3 */ type PDISK_GEOMETRY = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:559:17 */ type _PARTITION_INFORMATION = struct { FStartingOffset LARGE_INTEGER FPartitionLength LARGE_INTEGER FHiddenSectors DWORD FPartitionNumber DWORD FPartitionType BYTE FBootIndicator BOOLEAN FRecognizedPartition BOOLEAN FRewritePartition BOOLEAN F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:563:9 */ type PARTITION_INFORMATION = _PARTITION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:572:3 */ type PPARTITION_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:572:25 */ type _SET_PARTITION_INFORMATION = struct{ FPartitionType BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:574:9 */ type SET_PARTITION_INFORMATION = _SET_PARTITION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:576:3 */ type PSET_PARTITION_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:576:29 */ type _DRIVE_LAYOUT_INFORMATION = struct { FPartitionCount DWORD FSignature DWORD FPartitionEntry [1]PARTITION_INFORMATION } /* /usr/x86_64-w64-mingw32/include/winioctl.h:578:9 */ type DRIVE_LAYOUT_INFORMATION = _DRIVE_LAYOUT_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:582:3 */ type PDRIVE_LAYOUT_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:582:28 */ type _VERIFY_INFORMATION = struct { FStartingOffset LARGE_INTEGER FLength DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:584:9 */ type VERIFY_INFORMATION = _VERIFY_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:587:3 */ type PVERIFY_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:587:22 */ type _REASSIGN_BLOCKS = struct { FReserved WORD FCount WORD FBlockNumber [1]DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:589:9 */ type REASSIGN_BLOCKS = _REASSIGN_BLOCKS /* /usr/x86_64-w64-mingw32/include/winioctl.h:593:3 */ type PREASSIGN_BLOCKS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:593: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 F__ccgo_pad1 [4]byte FBlockNumber [1]LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:596: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:600:3 */ type PREASSIGN_BLOCKS_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:600: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:605:3 */ type _PARTITION_INFORMATION_GPT = struct { FPartitionType GUID FPartitionId GUID FAttributes DWORD64 FName [36]WCHAR } /* /usr/x86_64-w64-mingw32/include/winioctl.h:607:9 */ type PARTITION_INFORMATION_GPT = _PARTITION_INFORMATION_GPT /* /usr/x86_64-w64-mingw32/include/winioctl.h:612:3 */ type PPARTITION_INFORMATION_GPT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:612:29 */ type _PARTITION_INFORMATION_MBR = struct { FPartitionType BYTE FBootIndicator BOOLEAN FRecognizedPartition BOOLEAN F__ccgo_pad1 [1]byte FHiddenSectors DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:621:9 */ type PARTITION_INFORMATION_MBR = _PARTITION_INFORMATION_MBR /* /usr/x86_64-w64-mingw32/include/winioctl.h:626:3 */ type PPARTITION_INFORMATION_MBR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:626:29 */ type SET_PARTITION_INFORMATION_MBR = SET_PARTITION_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:628:35 */ type SET_PARTITION_INFORMATION_GPT = PARTITION_INFORMATION_GPT /* /usr/x86_64-w64-mingw32/include/winioctl.h:629:35 */ type _SET_PARTITION_INFORMATION_EX = struct { FPartitionStyle PARTITION_STYLE F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FMbr SET_PARTITION_INFORMATION_MBR F__ccgo_pad2 [111]byte } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:631:9 */ type SET_PARTITION_INFORMATION_EX = _SET_PARTITION_INFORMATION_EX /* /usr/x86_64-w64-mingw32/include/winioctl.h:637:3 */ type PSET_PARTITION_INFORMATION_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:637:32 */ type _CREATE_DISK_GPT = struct { FDiskId GUID FMaxPartitionCount DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:639:9 */ type CREATE_DISK_GPT = _CREATE_DISK_GPT /* /usr/x86_64-w64-mingw32/include/winioctl.h:642:3 */ type PCREATE_DISK_GPT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:642:19 */ type _CREATE_DISK_MBR = struct{ FSignature DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:644:9 */ type CREATE_DISK_MBR = _CREATE_DISK_MBR /* /usr/x86_64-w64-mingw32/include/winioctl.h:646:3 */ type PCREATE_DISK_MBR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:646:19 */ type _CREATE_DISK = struct { FPartitionStyle PARTITION_STYLE Fu struct { FMbr CREATE_DISK_MBR F__ccgo_pad1 [16]byte } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:648:9 */ type CREATE_DISK = _CREATE_DISK /* /usr/x86_64-w64-mingw32/include/winioctl.h:654:3 */ type PCREATE_DISK = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:654:15 */ type _GET_LENGTH_INFORMATION = struct{ FLength LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:656:9 */ type GET_LENGTH_INFORMATION = _GET_LENGTH_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:658:3 */ type PGET_LENGTH_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:658:26 */ type _PARTITION_INFORMATION_EX = struct { FPartitionStyle PARTITION_STYLE F__ccgo_pad1 [4]byte FStartingOffset LARGE_INTEGER FPartitionLength LARGE_INTEGER FPartitionNumber DWORD FRewritePartition BOOLEAN F__ccgo_pad2 [3]byte Fu struct { F__ccgo_pad1 [0]uint64 FMbr PARTITION_INFORMATION_MBR F__ccgo_pad2 [104]byte } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:660:9 */ type PARTITION_INFORMATION_EX = _PARTITION_INFORMATION_EX /* /usr/x86_64-w64-mingw32/include/winioctl.h:670:3 */ type PPARTITION_INFORMATION_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:670:28 */ type _DRIVE_LAYOUT_INFORMATION_GPT = struct { FDiskId GUID FStartingUsableOffset LARGE_INTEGER FUsableLength LARGE_INTEGER FMaxPartitionCount DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:672:9 */ type DRIVE_LAYOUT_INFORMATION_GPT = _DRIVE_LAYOUT_INFORMATION_GPT /* /usr/x86_64-w64-mingw32/include/winioctl.h:677:3 */ type PDRIVE_LAYOUT_INFORMATION_GPT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:677:32 */ type _DRIVE_LAYOUT_INFORMATION_MBR = struct{ FSignature DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:679:9 */ type DRIVE_LAYOUT_INFORMATION_MBR = _DRIVE_LAYOUT_INFORMATION_MBR /* /usr/x86_64-w64-mingw32/include/winioctl.h:681:3 */ type PDRIVE_LAYOUT_INFORMATION_MBR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:681:32 */ type _DRIVE_LAYOUT_INFORMATION_EX = struct { FPartitionStyle DWORD FPartitionCount DWORD Fu struct { F__ccgo_pad1 [0]uint64 FMbr DRIVE_LAYOUT_INFORMATION_MBR F__ccgo_pad2 [36]byte } FPartitionEntry [1]PARTITION_INFORMATION_EX } /* /usr/x86_64-w64-mingw32/include/winioctl.h:683:9 */ type DRIVE_LAYOUT_INFORMATION_EX = _DRIVE_LAYOUT_INFORMATION_EX /* /usr/x86_64-w64-mingw32/include/winioctl.h:691:3 */ type PDRIVE_LAYOUT_INFORMATION_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:691:31 */ type DETECTION_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:695:3 */ type _DISK_INT13_INFO = struct { FDriveSelect WORD F__ccgo_pad1 [2]byte FMaxCylinders DWORD FSectorsPerTrack WORD FMaxHeads WORD FNumberDrives WORD F__ccgo_pad2 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:697:9 */ type DISK_INT13_INFO = _DISK_INT13_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:703:3 */ type PDISK_INT13_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:703:19 */ type _DISK_EX_INT13_INFO = struct { FExBufferSize WORD FExFlags WORD FExCylinders DWORD FExHeads DWORD FExSectorsPerTrack DWORD FExSectorsPerDrive DWORD64 FExSectorSize WORD FExReserved WORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:705:9 */ type DISK_EX_INT13_INFO = _DISK_EX_INT13_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:714:3 */ type PDISK_EX_INT13_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:714:22 */ type _DISK_DETECTION_INFO = struct { FSizeOfDetectInfo DWORD FDetectionType DETECTION_TYPE Fu struct { Fs struct { FInt13 DISK_INT13_INFO FExInt13 DISK_EX_INT13_INFO } } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:716:9 */ type DISK_DETECTION_INFO = _DISK_DETECTION_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:725:3 */ type PDISK_DETECTION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:725:23 */ type _DISK_PARTITION_INFO = struct { FSizeOfPartitionInfo DWORD FPartitionStyle PARTITION_STYLE Fu struct { FMbr struct { FSignature DWORD FCheckSum DWORD } F__ccgo_pad1 [8]byte } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:727:9 */ type DISK_PARTITION_INFO = _DISK_PARTITION_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:739:3 */ type PDISK_PARTITION_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:739:23 */ type _DISK_GEOMETRY_EX = struct { FGeometry DISK_GEOMETRY FDiskSize LARGE_INTEGER FData [1]BYTE F__ccgo_pad1 [7]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:744:9 */ type DISK_GEOMETRY_EX = _DISK_GEOMETRY_EX /* /usr/x86_64-w64-mingw32/include/winioctl.h:748:3 */ type PDISK_GEOMETRY_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:748:20 */ type _DISK_CONTROLLER_NUMBER = struct { FControllerNumber DWORD FDiskNumber DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:750:9 */ type DISK_CONTROLLER_NUMBER = _DISK_CONTROLLER_NUMBER /* /usr/x86_64-w64-mingw32/include/winioctl.h:753:3 */ type PDISK_CONTROLLER_NUMBER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:753:26 */ type DISK_CACHE_RETENTION_PRIORITY = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:757:3 */ type _DISK_CACHE_INFORMATION = struct { FParametersSavable BOOLEAN FReadCacheEnabled BOOLEAN FWriteCacheEnabled BOOLEAN F__ccgo_pad1 [1]byte FReadRetentionPriority DISK_CACHE_RETENTION_PRIORITY FWriteRetentionPriority DISK_CACHE_RETENTION_PRIORITY FDisablePrefetchTransferLength WORD FPrefetchScalar BOOLEAN F__ccgo_pad2 [1]byte Fu struct { FScalarPrefetch struct { FMinimum WORD FMaximum WORD FMaximumBlocks WORD } } F__ccgo_pad3 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:759:9 */ type DISK_CACHE_INFORMATION = _DISK_CACHE_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:778:3 */ type PDISK_CACHE_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:778:26 */ type _DISK_GROW_PARTITION = struct { FPartitionNumber DWORD F__ccgo_pad1 [4]byte FBytesToGrow LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:780:9 */ type DISK_GROW_PARTITION = _DISK_GROW_PARTITION /* /usr/x86_64-w64-mingw32/include/winioctl.h:783:3 */ type PDISK_GROW_PARTITION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:783:23 */ type _HISTOGRAM_BUCKET = struct { FReads DWORD FWrites DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:787:9 */ type HISTOGRAM_BUCKET = _HISTOGRAM_BUCKET /* /usr/x86_64-w64-mingw32/include/winioctl.h:790:3 */ type PHISTOGRAM_BUCKET = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:790: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:794:9 */ type DISK_HISTOGRAM = _DISK_HISTOGRAM /* /usr/x86_64-w64-mingw32/include/winioctl.h:806:3 */ type PDISK_HISTOGRAM = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:806: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 F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:810:9 */ type DISK_PERFORMANCE = _DISK_PERFORMANCE /* /usr/x86_64-w64-mingw32/include/winioctl.h:823:3 */ type PDISK_PERFORMANCE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:823:20 */ type _DISK_RECORD = struct { FByteOffset LARGE_INTEGER FStartTime LARGE_INTEGER FEndTime LARGE_INTEGER FVirtualAddress PVOID FNumberOfBytes DWORD FDeviceNumber BYTE FReadRequest BOOLEAN F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:825:9 */ type DISK_RECORD = _DISK_RECORD /* /usr/x86_64-w64-mingw32/include/winioctl.h:833:3 */ type PDISK_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:833:15 */ type _DISK_LOGGING = struct { FFunction BYTE F__ccgo_pad1 [7]byte FBufferAddress PVOID FBufferSize DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:835:9 */ type DISK_LOGGING = _DISK_LOGGING /* /usr/x86_64-w64-mingw32/include/winioctl.h:839:3 */ type PDISK_LOGGING = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:839:16 */ type BIN_TYPES = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:848:3 */ type _BIN_RANGE = struct { FStartValue LARGE_INTEGER FLength LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:850:9 */ type BIN_RANGE = _BIN_RANGE /* /usr/x86_64-w64-mingw32/include/winioctl.h:853:3 */ type PBIN_RANGE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:853:13 */ type _PERF_BIN = struct { FNumberOfBins DWORD FTypeOfBin DWORD FBinsRanges [1]BIN_RANGE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:855:9 */ type PERF_BIN = _PERF_BIN /* /usr/x86_64-w64-mingw32/include/winioctl.h:859:3 */ type PPERF_BIN = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:859:12 */ type _BIN_COUNT = struct { FBinRange BIN_RANGE FBinCount DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:861:9 */ type BIN_COUNT = _BIN_COUNT /* /usr/x86_64-w64-mingw32/include/winioctl.h:864:3 */ type PBIN_COUNT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:864:13 */ type _BIN_RESULTS = struct { FNumberOfBins DWORD F__ccgo_pad1 [4]byte FBinCounts [1]BIN_COUNT } /* /usr/x86_64-w64-mingw32/include/winioctl.h:866:9 */ type BIN_RESULTS = _BIN_RESULTS /* /usr/x86_64-w64-mingw32/include/winioctl.h:869:3 */ type PBIN_RESULTS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:869: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:872: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:879:3 */ type PGETVERSIONINPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:879:22 */ type LPGETVERSIONINPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:879: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:887: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:896:3 */ type PIDEREGS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:896:11 */ type LPIDEREGS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:896: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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:907: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:914:3 */ type PSENDCMDINPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:914:19 */ type LPSENDCMDINPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:914: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:918: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:923:3 */ type PDRIVERSTATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:923:16 */ type LPDRIVERSTATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:923: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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:946: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:950:3 */ type PSENDCMDOUTPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:950:20 */ type LPSENDCMDOUTPARAMS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:950: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 /* /usr/x86_64-w64-mingw32/include/winioctl.h:996:3 */ type PELEMENT_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:996:16 */ type _CHANGER_ELEMENT = struct { FElementType ELEMENT_TYPE FElementAddress DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:998:9 */ type CHANGER_ELEMENT = _CHANGER_ELEMENT /* /usr/x86_64-w64-mingw32/include/winioctl.h:1001:3 */ type PCHANGER_ELEMENT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1001:19 */ type _CHANGER_ELEMENT_LIST = struct { FElement CHANGER_ELEMENT FNumberOfElements DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1003:9 */ type CHANGER_ELEMENT_LIST = _CHANGER_ELEMENT_LIST /* /usr/x86_64-w64-mingw32/include/winioctl.h:1006:3 */ type PCHANGER_ELEMENT_LIST = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1006: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1070:9 */ type GET_CHANGER_PARAMETERS = _GET_CHANGER_PARAMETERS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1099:3 */ type PGET_CHANGER_PARAMETERS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1099:26 */ type _CHANGER_PRODUCT_DATA = struct { FVendorId [8]BYTE FProductId [16]BYTE FRevision [4]BYTE FSerialNumber [32]BYTE FDeviceType BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1101:9 */ type CHANGER_PRODUCT_DATA = _CHANGER_PRODUCT_DATA /* /usr/x86_64-w64-mingw32/include/winioctl.h:1107:3 */ type PCHANGER_PRODUCT_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1107:24 */ type _CHANGER_SET_ACCESS = struct { FElement CHANGER_ELEMENT FControl DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1114:9 */ type CHANGER_SET_ACCESS = _CHANGER_SET_ACCESS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1117:3 */ type PCHANGER_SET_ACCESS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1117:22 */ type _CHANGER_READ_ELEMENT_STATUS = struct { FElementList CHANGER_ELEMENT_LIST FVolumeTagInfo BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1119:9 */ type CHANGER_READ_ELEMENT_STATUS = _CHANGER_READ_ELEMENT_STATUS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1122:3 */ type PCHANGER_READ_ELEMENT_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1122: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1124:9 */ type CHANGER_ELEMENT_STATUS = _CHANGER_ELEMENT_STATUS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1134:3 */ type PCHANGER_ELEMENT_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1134: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1136:9 */ type CHANGER_ELEMENT_STATUS_EX = _CHANGER_ELEMENT_STATUS_EX /* /usr/x86_64-w64-mingw32/include/winioctl.h:1149:3 */ type PCHANGER_ELEMENT_STATUS_EX = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1149:29 */ type _CHANGER_INITIALIZE_ELEMENT_STATUS = struct { FElementList CHANGER_ELEMENT_LIST FBarCodeScan BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1177:9 */ type CHANGER_INITIALIZE_ELEMENT_STATUS = _CHANGER_INITIALIZE_ELEMENT_STATUS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1180:3 */ type PCHANGER_INITIALIZE_ELEMENT_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1180:37 */ type _CHANGER_SET_POSITION = struct { FTransport CHANGER_ELEMENT FDestination CHANGER_ELEMENT FFlip BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1182:9 */ type CHANGER_SET_POSITION = _CHANGER_SET_POSITION /* /usr/x86_64-w64-mingw32/include/winioctl.h:1186:3 */ type PCHANGER_SET_POSITION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1186:24 */ type _CHANGER_EXCHANGE_MEDIUM = struct { FTransport CHANGER_ELEMENT FSource CHANGER_ELEMENT FDestination1 CHANGER_ELEMENT FDestination2 CHANGER_ELEMENT FFlip1 BOOLEAN FFlip2 BOOLEAN F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1188:9 */ type CHANGER_EXCHANGE_MEDIUM = _CHANGER_EXCHANGE_MEDIUM /* /usr/x86_64-w64-mingw32/include/winioctl.h:1195:3 */ type PCHANGER_EXCHANGE_MEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1195:27 */ type _CHANGER_MOVE_MEDIUM = struct { FTransport CHANGER_ELEMENT FSource CHANGER_ELEMENT FDestination CHANGER_ELEMENT FFlip BOOLEAN F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1197:9 */ type CHANGER_MOVE_MEDIUM = _CHANGER_MOVE_MEDIUM /* /usr/x86_64-w64-mingw32/include/winioctl.h:1202:3 */ type PCHANGER_MOVE_MEDIUM = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1202:23 */ type _CHANGER_SEND_VOLUME_TAG_INFORMATION = struct { FStartingElement CHANGER_ELEMENT FActionCode DWORD FVolumeIDTemplate [40]BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1204:9 */ type CHANGER_SEND_VOLUME_TAG_INFORMATION = _CHANGER_SEND_VOLUME_TAG_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:1208:3 */ type PCHANGER_SEND_VOLUME_TAG_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1208:39 */ type _READ_ELEMENT_ADDRESS_INFO = struct { FNumberOfElements DWORD FElementStatus [1]CHANGER_ELEMENT_STATUS } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1210:9 */ type READ_ELEMENT_ADDRESS_INFO = _READ_ELEMENT_ADDRESS_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:1213:3 */ type PREAD_ELEMENT_ADDRESS_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1213:29 */ type CHANGER_DEVICE_PROBLEM_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:1235:3 */ type PCHANGER_DEVICE_PROBLEM_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1235:31 */ type _PATHNAME_BUFFER = struct { FPathNameLength DWORD FName [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1335:9 */ type PATHNAME_BUFFER = _PATHNAME_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1338:3 */ type PPATHNAME_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1338:19 */ type _FSCTL_QUERY_FAT_BPB_BUFFER = struct{ FFirst0x24BytesOfBootSector [36]BYTE } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1340:9 */ type FSCTL_QUERY_FAT_BPB_BUFFER = _FSCTL_QUERY_FAT_BPB_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1342:3 */ type PFSCTL_QUERY_FAT_BPB_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1342: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1359:3 */ type PNTFS_VOLUME_DATA_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1359:27 */ type NTFS_EXTENDED_VOLUME_DATA = struct { FByteCount DWORD FMajorVersion WORD FMinorVersion WORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1365:3 */ type PNTFS_EXTENDED_VOLUME_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1365:29 */ type STARTING_LCN_INPUT_BUFFER = struct{ FStartingLcn LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1369:3 */ type PSTARTING_LCN_INPUT_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1369:29 */ type VOLUME_BITMAP_BUFFER = struct { FStartingLcn LARGE_INTEGER FBitmapSize LARGE_INTEGER FBuffer [1]BYTE F__ccgo_pad1 [7]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1375:3 */ type PVOLUME_BITMAP_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1375:24 */ type STARTING_VCN_INPUT_BUFFER = struct{ FStartingVcn LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1379:3 */ type PSTARTING_VCN_INPUT_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1379:29 */ type RETRIEVAL_POINTERS_BUFFER1 = struct { FExtentCount DWORD F__ccgo_pad1 [4]byte FStartingVcn LARGE_INTEGER FExtents [1]struct { FNextVcn LARGE_INTEGER FLcn LARGE_INTEGER } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1381:9 */ type RETRIEVAL_POINTERS_BUFFER = RETRIEVAL_POINTERS_BUFFER1 /* /usr/x86_64-w64-mingw32/include/winioctl.h:1388:3 */ type PRETRIEVAL_POINTERS_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1388:29 */ type NTFS_FILE_RECORD_INPUT_BUFFER = struct{ FFileReferenceNumber LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1392:3 */ type PNTFS_FILE_RECORD_INPUT_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1392:33 */ type NTFS_FILE_RECORD_OUTPUT_BUFFER = struct { FFileReferenceNumber LARGE_INTEGER FFileRecordLength DWORD FFileRecordBuffer [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1398:3 */ type PNTFS_FILE_RECORD_OUTPUT_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1398:34 */ type MOVE_FILE_DATA = struct { FFileHandle HANDLE FStartingVcn LARGE_INTEGER FStartingLcn LARGE_INTEGER FClusterCount DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1405:3 */ type PMOVE_FILE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1405:18 */ type _MOVE_FILE_DATA32 = struct { FFileHandle UINT32 F__ccgo_pad1 [4]byte FStartingVcn LARGE_INTEGER FStartingLcn LARGE_INTEGER FClusterCount DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1408:9 */ type MOVE_FILE_DATA32 = _MOVE_FILE_DATA32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:1413:3 */ type PMOVE_FILE_DATA32 = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1413:20 */ type FIND_BY_SID_DATA = struct { FRestart DWORD FSid SID } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1419:3 */ type PFIND_BY_SID_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1419:20 */ type FIND_BY_SID_OUTPUT = struct { FNextEntryOffset DWORD FFileIndex DWORD FFileNameLength DWORD FFileName [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1426:3 */ type PFIND_BY_SID_OUTPUT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1426:22 */ type MFT_ENUM_DATA = struct { FStartFileReferenceNumber DWORDLONG FLowUsn USN FHighUsn USN } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1432:3 */ type PMFT_ENUM_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1432:17 */ type CREATE_USN_JOURNAL_DATA = struct { FMaximumSize DWORDLONG FAllocationDelta DWORDLONG } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1437:3 */ type PCREATE_USN_JOURNAL_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1437:27 */ type READ_USN_JOURNAL_DATA = struct { FStartUsn USN FReasonMask DWORD FReturnOnlyOnClose DWORD FTimeout DWORDLONG FBytesToWaitFor DWORDLONG FUsnJournalID DWORDLONG } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1446:3 */ type PREAD_USN_JOURNAL_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1446: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 F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1463:3 */ type PUSN_RECORD = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1463:14 */ type USN_JOURNAL_DATA = struct { FUsnJournalID DWORDLONG FFirstUsn USN FNextUsn USN FLowestValidUsn USN FMaxUsn USN FMaximumSize DWORDLONG FAllocationDelta DWORDLONG } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1498:3 */ type PUSN_JOURNAL_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1498:20 */ type DELETE_USN_JOURNAL_DATA = struct { FUsnJournalID DWORDLONG FDeleteFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1503:3 */ type PDELETE_USN_JOURNAL_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1503:27 */ type MARK_HANDLE_INFO = struct { FUsnSourceInfo DWORD F__ccgo_pad1 [4]byte FVolumeHandle HANDLE FHandleInfo DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1514:3 */ type PMARK_HANDLE_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1514:20 */ type MARK_HANDLE_INFO32 = struct { FUsnSourceInfo DWORD FVolumeHandle UINT32 FHandleInfo DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1523:3 */ type PMARK_HANDLE_INFO32 = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1523:22 */ type BULK_SECURITY_TEST_DATA = struct { FDesiredAccess ACCESS_MASK FSecurityIds [1]DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1539:3 */ type PBULK_SECURITY_TEST_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1539:27 */ type _FILE_PREFETCH = struct { FType DWORD FCount DWORD FPrefetch [1]DWORDLONG } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1544:9 */ type FILE_PREFETCH = _FILE_PREFETCH /* /usr/x86_64-w64-mingw32/include/winioctl.h:1548:3 */ type PFILE_PREFETCH = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1548: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1552:9 */ type FILESYSTEM_STATISTICS = _FILESYSTEM_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1568:3 */ type PFILESYSTEM_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1568:25 */ type _FAT_STATISTICS = struct { FCreateHits DWORD FSuccessfulCreates DWORD FFailedCreates DWORD FNonCachedReads DWORD FNonCachedReadBytes DWORD FNonCachedWrites DWORD FNonCachedWriteBytes DWORD FNonCachedDiskReads DWORD FNonCachedDiskWrites DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1573:9 */ type FAT_STATISTICS = _FAT_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1583:3 */ type PFAT_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1583:18 */ type _EXFAT_STATISTICS = struct { FCreateHits DWORD FSuccessfulCreates DWORD FFailedCreates DWORD FNonCachedReads DWORD FNonCachedReadBytes DWORD FNonCachedWrites DWORD FNonCachedWriteBytes DWORD FNonCachedDiskReads DWORD FNonCachedDiskWrites DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1585:9 */ type EXFAT_STATISTICS = _EXFAT_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1595:3 */ type PEXFAT_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1595: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 F__ccgo_pad1 [2]byte FMft2Writes DWORD FMft2WriteBytes DWORD FMft2WritesUserLevel struct { FWrite WORD FCreate WORD FSetInfo WORD FFlush WORD } FMft2WritesFlushForLogFileFull WORD FMft2WritesLazyWriter WORD FMft2WritesUserRequest WORD F__ccgo_pad2 [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 } F__ccgo_pad3 [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 } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1597:9 */ type NTFS_STATISTICS = _NTFS_STATISTICS /* /usr/x86_64-w64-mingw32/include/winioctl.h:1673:3 */ type PNTFS_STATISTICS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1673:19 */ type _FILE_OBJECTID_BUFFER = struct { FObjectId [16]BYTE Fu struct { Fs struct { FBirthVolumeId [16]BYTE FBirthObjectId [16]BYTE FDomainId [16]BYTE } } } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1675:9 */ type FILE_OBJECTID_BUFFER = _FILE_OBJECTID_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1685:3 */ type PFILE_OBJECTID_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1685:24 */ type _FILE_SET_SPARSE_BUFFER = struct{ FSetSparse BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1687:9 */ type FILE_SET_SPARSE_BUFFER = _FILE_SET_SPARSE_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1689:3 */ type PFILE_SET_SPARSE_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1689:26 */ type _FILE_ZERO_DATA_INFORMATION = struct { FFileOffset LARGE_INTEGER FBeyondFinalZero LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1691:9 */ type FILE_ZERO_DATA_INFORMATION = _FILE_ZERO_DATA_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:1694:3 */ type PFILE_ZERO_DATA_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1694:30 */ type _FILE_ALLOCATED_RANGE_BUFFER = struct { FFileOffset LARGE_INTEGER FLength LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1696:9 */ type FILE_ALLOCATED_RANGE_BUFFER = _FILE_ALLOCATED_RANGE_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1699:3 */ type PFILE_ALLOCATED_RANGE_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1699:31 */ type _ENCRYPTION_BUFFER = struct { FEncryptionOperation DWORD FPrivate [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1701:9 */ type ENCRYPTION_BUFFER = _ENCRYPTION_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1704:3 */ type PENCRYPTION_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1704:21 */ type _DECRYPTION_STATUS_BUFFER = struct{ FNoEncryptedStreams BOOLEAN } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1713:9 */ type DECRYPTION_STATUS_BUFFER = _DECRYPTION_STATUS_BUFFER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1715:3 */ type PDECRYPTION_STATUS_BUFFER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1715:28 */ type _REQUEST_RAW_ENCRYPTED_DATA = struct { FFileOffset LONGLONG FLength DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1720:9 */ type REQUEST_RAW_ENCRYPTED_DATA = _REQUEST_RAW_ENCRYPTED_DATA /* /usr/x86_64-w64-mingw32/include/winioctl.h:1723:3 */ type PREQUEST_RAW_ENCRYPTED_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1723: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 } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1725:9 */ type ENCRYPTED_DATA_INFO = _ENCRYPTED_DATA_INFO /* /usr/x86_64-w64-mingw32/include/winioctl.h:1737:3 */ type PENCRYPTED_DATA_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1738:29 */ type _PLEX_READ_DATA_REQUEST = struct { FByteOffset LARGE_INTEGER FByteLength DWORD FPlexNumber DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1740:9 */ type PLEX_READ_DATA_REQUEST = _PLEX_READ_DATA_REQUEST /* /usr/x86_64-w64-mingw32/include/winioctl.h:1744:3 */ type PPLEX_READ_DATA_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1744:26 */ type _SI_COPYFILE = struct { FSourceFileNameLength DWORD FDestinationFileNameLength DWORD FFlags DWORD FFileNameBuffer [1]WCHAR F__ccgo_pad1 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1746:9 */ type SI_COPYFILE = _SI_COPYFILE /* /usr/x86_64-w64-mingw32/include/winioctl.h:1751:3 */ type PSI_COPYFILE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1751:15 */ type _STORAGE_DESCRIPTOR_HEADER = struct { FVersion DWORD FSize DWORD } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1757:9 */ type STORAGE_DESCRIPTOR_HEADER = _STORAGE_DESCRIPTOR_HEADER /* /usr/x86_64-w64-mingw32/include/winioctl.h:1760:3 */ type PSTORAGE_DESCRIPTOR_HEADER = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1760:30 */ type STORAGE_PROPERTY_ID = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:1772:3 */ type PSTORAGE_PROPERTY_ID = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1772:24 */ type STORAGE_QUERY_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winioctl.h:1779:3 */ type PSTORAGE_QUERY_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1779:23 */ type _STORAGE_PROPERTY_QUERY = struct { FPropertyId STORAGE_PROPERTY_ID FQueryType STORAGE_QUERY_TYPE FAdditionalParameters [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1781:9 */ type STORAGE_PROPERTY_QUERY = _STORAGE_PROPERTY_QUERY /* /usr/x86_64-w64-mingw32/include/winioctl.h:1785:3 */ type PSTORAGE_PROPERTY_QUERY = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1785: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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1787:9 */ type STORAGE_DEVICE_DESCRIPTOR = _STORAGE_DEVICE_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winioctl.h:1801:3 */ type PSTORAGE_DEVICE_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1801: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 F__ccgo_pad1 [1]byte FBusMajorVersion WORD FBusMinorVersion WORD F__ccgo_pad2 [2]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1803:9 */ type STORAGE_ADAPTER_DESCRIPTOR = _STORAGE_ADAPTER_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winioctl.h:1816:3 */ type PSTORAGE_ADAPTER_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1816:31 */ type _STORAGE_DEVICE_ID_DESCRIPTOR = struct { FVersion DWORD FSize DWORD FNumberOfIdentifiers DWORD FIdentifiers [1]BYTE F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1818:9 */ type STORAGE_DEVICE_ID_DESCRIPTOR = _STORAGE_DEVICE_ID_DESCRIPTOR /* /usr/x86_64-w64-mingw32/include/winioctl.h:1823:3 */ type PSTORAGE_DEVICE_ID_DESCRIPTOR = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1823:33 */ type _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = struct{ FGptAttributes ULONGLONG } /* /usr/x86_64-w64-mingw32/include/winioctl.h:1825:9 */ type VOLUME_GET_GPT_ATTRIBUTES_INFORMATION = _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION /* /usr/x86_64-w64-mingw32/include/winioctl.h:1827:3 */ type PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:1827:42 */ type _DISK_EXTENT = struct { FDiskNumber DWORD F__ccgo_pad1 [4]byte FStartingOffset LARGE_INTEGER FExtentLength LARGE_INTEGER } /* /usr/x86_64-w64-mingw32/include/winioctl.h:2344:9 */ type DISK_EXTENT = _DISK_EXTENT /* /usr/x86_64-w64-mingw32/include/winioctl.h:2348:3 */ type PDISK_EXTENT = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:2348:15 */ type _VOLUME_DISK_EXTENTS = struct { FNumberOfDiskExtents DWORD F__ccgo_pad1 [4]byte FExtents [1]DISK_EXTENT } /* /usr/x86_64-w64-mingw32/include/winioctl.h:2350:9 */ type VOLUME_DISK_EXTENTS = _VOLUME_DISK_EXTENTS /* /usr/x86_64-w64-mingw32/include/winioctl.h:2353:3 */ type PVOLUME_DISK_EXTENTS = uintptr /* /usr/x86_64-w64-mingw32/include/winioctl.h:2353: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 /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:27:16 */ type _SCARD_IO_REQUEST = struct { FdwProtocol DWORD FcbPciLength DWORD } /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:161:11 */ type SCARD_IO_REQUEST = _SCARD_IO_REQUEST /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:164:5 */ type PSCARD_IO_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:164:22 */ type LPSCARD_IO_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:164:41 */ type LPCSCARD_IO_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:165:34 */ type SCARD_T0_COMMAND = struct { FbCla BYTE FbIns BYTE FbP1 BYTE FbP2 BYTE FbP3 BYTE } /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:170:5 */ type LPSCARD_T0_COMMAND = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:170:22 */ type SCARD_T0_REQUEST = struct { FioRequest SCARD_IO_REQUEST FbSw1 BYTE FbSw2 BYTE F__10 struct{ FCmdBytes SCARD_T0_COMMAND } F__ccgo_pad1 [1]byte } /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:179:5 */ type PSCARD_T0_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:181:28 */ type LPSCARD_T0_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:181:47 */ type SCARD_T1_REQUEST = struct{ FioRequest SCARD_IO_REQUEST } /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:185:5 */ type PSCARD_T1_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:186:28 */ type LPSCARD_T1_REQUEST = uintptr /* /usr/x86_64-w64-mingw32/include/winsmcrd.h:186:47 */ type LPCBYTE = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:23:22 */ var Xg_rgSCardT0Pci SCARD_IO_REQUEST /* /usr/x86_64-w64-mingw32/include/winscard.h:37:46: */ var Xg_rgSCardT1Pci SCARD_IO_REQUEST /* /usr/x86_64-w64-mingw32/include/winscard.h:37:61: */ var Xg_rgSCardRawPci SCARD_IO_REQUEST /* /usr/x86_64-w64-mingw32/include/winscard.h:37:76: */ type SCARDCONTEXT = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/winscard.h:42:21 */ type PSCARDCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:43:24 */ type LPSCARDCONTEXT = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:43:39 */ type SCARDHANDLE = ULONG_PTR /* /usr/x86_64-w64-mingw32/include/winscard.h:45:21 */ type PSCARDHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:46:23 */ type LPSCARDHANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:46:37 */ type SCARD_READERSTATEA = struct { FszReader LPCSTR FpvUserData LPVOID FdwCurrentState DWORD FdwEventState DWORD FcbAtr DWORD FrgbAtr [36]BYTE } /* /usr/x86_64-w64-mingw32/include/winscard.h:126:5 */ type PSCARD_READERSTATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:126:24 */ type LPSCARD_READERSTATEA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:126:45 */ type SCARD_READERSTATEW = struct { FszReader LPCWSTR FpvUserData LPVOID FdwCurrentState DWORD FdwEventState DWORD FcbAtr DWORD FrgbAtr [36]BYTE } /* /usr/x86_64-w64-mingw32/include/winscard.h:135:5 */ type PSCARD_READERSTATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:135:24 */ type LPSCARD_READERSTATEW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:135:45 */ type SCARD_READERSTATE = SCARD_READERSTATEA /* /usr/x86_64-w64-mingw32/include/winscard.h:137:3 */ type PSCARD_READERSTATE = PSCARD_READERSTATEA /* /usr/x86_64-w64-mingw32/include/winscard.h:138:3 */ type LPSCARD_READERSTATE = LPSCARD_READERSTATEA /* /usr/x86_64-w64-mingw32/include/winscard.h:139:3 */ type _SCARD_ATRMASK = struct { FcbAtr DWORD FrgbAtr [36]BYTE FrgbMask [36]BYTE } /* /usr/x86_64-w64-mingw32/include/winscard.h:170:11 */ type SCARD_ATRMASK = _SCARD_ATRMASK /* /usr/x86_64-w64-mingw32/include/winscard.h:174:5 */ type PSCARD_ATRMASK = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:174:19 */ type LPSCARD_ATRMASK = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:174:35 */ type LPOCNCONNPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:220:23 */ type LPOCNCONNPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:221:23 */ type LPOCNCHKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:222:19 */ type LPOCNDSCPROC = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:223:16 */ type OPENCARD_SEARCH_CRITERIAA = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FlpstrGroupNames LPSTR FnMaxGroupNames DWORD F__ccgo_pad2 [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD F__ccgo_pad3 [4]byte FlpstrCardNames LPSTR FnMaxCardNames DWORD F__ccgo_pad4 [4]byte FlpfnCheck LPOCNCHKPROC FlpfnConnect LPOCNCONNPROCA FlpfnDisconnect LPOCNDSCPROC FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD } /* /usr/x86_64-w64-mingw32/include/winscard.h:239:5 */ type POPENCARD_SEARCH_CRITERIAA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:239:31 */ type LPOPENCARD_SEARCH_CRITERIAA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:239:59 */ type OPENCARD_SEARCH_CRITERIAW = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FlpstrGroupNames LPWSTR FnMaxGroupNames DWORD F__ccgo_pad2 [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD F__ccgo_pad3 [4]byte FlpstrCardNames LPWSTR FnMaxCardNames DWORD F__ccgo_pad4 [4]byte FlpfnCheck LPOCNCHKPROC FlpfnConnect LPOCNCONNPROCW FlpfnDisconnect LPOCNDSCPROC FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD } /* /usr/x86_64-w64-mingw32/include/winscard.h:255:5 */ type POPENCARD_SEARCH_CRITERIAW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:255:31 */ type LPOPENCARD_SEARCH_CRITERIAW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:255:59 */ type OPENCARD_SEARCH_CRITERIA = OPENCARD_SEARCH_CRITERIAA /* /usr/x86_64-w64-mingw32/include/winscard.h:257:3 */ type POPENCARD_SEARCH_CRITERIA = POPENCARD_SEARCH_CRITERIAA /* /usr/x86_64-w64-mingw32/include/winscard.h:258:3 */ type LPOPENCARD_SEARCH_CRITERIA = LPOPENCARD_SEARCH_CRITERIAA /* /usr/x86_64-w64-mingw32/include/winscard.h:259:3 */ type OPENCARDNAME_EXA = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FhSCardContext SCARDCONTEXT FhwndOwner HWND FdwFlags DWORD F__ccgo_pad2 [4]byte FlpstrTitle LPCSTR FlpstrSearchDesc LPCSTR FhIcon HICON FpOpenCardSearchCriteria POPENCARD_SEARCH_CRITERIAA FlpfnConnect LPOCNCONNPROCA FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FlpstrRdr LPSTR FnMaxRdr DWORD F__ccgo_pad3 [4]byte FlpstrCard LPSTR FnMaxCard DWORD FdwActiveProtocol DWORD FhCardHandle SCARDHANDLE } /* /usr/x86_64-w64-mingw32/include/winscard.h:280:5 */ type POPENCARDNAME_EXA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:280:22 */ type LPOPENCARDNAME_EXA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:280:41 */ type OPENCARDNAME_EXW = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FhSCardContext SCARDCONTEXT FhwndOwner HWND FdwFlags DWORD F__ccgo_pad2 [4]byte FlpstrTitle LPCWSTR FlpstrSearchDesc LPCWSTR FhIcon HICON FpOpenCardSearchCriteria POPENCARD_SEARCH_CRITERIAW FlpfnConnect LPOCNCONNPROCW FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FlpstrRdr LPWSTR FnMaxRdr DWORD F__ccgo_pad3 [4]byte FlpstrCard LPWSTR FnMaxCard DWORD FdwActiveProtocol DWORD FhCardHandle SCARDHANDLE } /* /usr/x86_64-w64-mingw32/include/winscard.h:301:5 */ type POPENCARDNAME_EXW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:301:22 */ type LPOPENCARDNAME_EXW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:301:41 */ type OPENCARDNAME_EX = OPENCARDNAME_EXA /* /usr/x86_64-w64-mingw32/include/winscard.h:303:3 */ type POPENCARDNAME_EX = POPENCARDNAME_EXA /* /usr/x86_64-w64-mingw32/include/winscard.h:304:3 */ type LPOPENCARDNAME_EX = LPOPENCARDNAME_EXA /* /usr/x86_64-w64-mingw32/include/winscard.h:305:3 */ type OPENCARDNAMEA = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhSCardContext SCARDCONTEXT FlpstrGroupNames LPSTR FnMaxGroupNames DWORD F__ccgo_pad2 [4]byte FlpstrCardNames LPSTR FnMaxCardNames DWORD F__ccgo_pad3 [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD F__ccgo_pad4 [4]byte FlpstrRdr LPSTR FnMaxRdr DWORD F__ccgo_pad5 [4]byte FlpstrCard LPSTR FnMaxCard DWORD F__ccgo_pad6 [4]byte FlpstrTitle LPCSTR FdwFlags DWORD F__ccgo_pad7 [4]byte FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FdwActiveProtocol DWORD F__ccgo_pad8 [4]byte FlpfnConnect LPOCNCONNPROCA FlpfnCheck LPOCNCHKPROC FlpfnDisconnect LPOCNDSCPROC FhCardHandle SCARDHANDLE } /* /usr/x86_64-w64-mingw32/include/winscard.h:343:5 */ type POPENCARDNAMEA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:343:19 */ type LPOPENCARDNAMEA = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:343:35 */ type OPENCARDNAMEW = struct { FdwStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhSCardContext SCARDCONTEXT FlpstrGroupNames LPWSTR FnMaxGroupNames DWORD F__ccgo_pad2 [4]byte FlpstrCardNames LPWSTR FnMaxCardNames DWORD F__ccgo_pad3 [4]byte FrgguidInterfaces LPCGUID FcguidInterfaces DWORD F__ccgo_pad4 [4]byte FlpstrRdr LPWSTR FnMaxRdr DWORD F__ccgo_pad5 [4]byte FlpstrCard LPWSTR FnMaxCard DWORD F__ccgo_pad6 [4]byte FlpstrTitle LPCWSTR FdwFlags DWORD F__ccgo_pad7 [4]byte FpvUserData LPVOID FdwShareMode DWORD FdwPreferredProtocols DWORD FdwActiveProtocol DWORD F__ccgo_pad8 [4]byte FlpfnConnect LPOCNCONNPROCW FlpfnCheck LPOCNCHKPROC FlpfnDisconnect LPOCNDSCPROC FhCardHandle SCARDHANDLE } /* /usr/x86_64-w64-mingw32/include/winscard.h:369:5 */ type POPENCARDNAMEW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:369:19 */ type LPOPENCARDNAMEW = uintptr /* /usr/x86_64-w64-mingw32/include/winscard.h:369:35 */ type OPENCARDNAME = OPENCARDNAMEA /* /usr/x86_64-w64-mingw32/include/winscard.h:371:3 */ type POPENCARDNAME = POPENCARDNAMEA /* /usr/x86_64-w64-mingw32/include/winscard.h:372:3 */ type LPOPENCARDNAME = LPOPENCARDNAMEA /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/prsht.h:51:3 */ type HPROPSHEETPAGE = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:53:23 */ type LPFNPSPCALLBACKA = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:54:16 */ type LPFNPSPCALLBACKW = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:55:16 */ type PROPSHEETPAGE_RESOURCE = LPCDLGTEMPLATE /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/prsht.h:121:11 */ type PROPSHEETPAGEA_V1 = _PROPSHEETPAGEA_V1 /* /usr/x86_64-w64-mingw32/include/prsht.h:123:5 */ type LPPROPSHEETPAGEA_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:123:23 */ type LPCPROPSHEETPAGEA_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/prsht.h:127:11 */ type PROPSHEETPAGEA_V2 = _PROPSHEETPAGEA_V2 /* /usr/x86_64-w64-mingw32/include/prsht.h:132:5 */ type LPPROPSHEETPAGEA_V2 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:132:23 */ type LPCPROPSHEETPAGEA_V2 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:134:35 */ type PROPSHEETPAGEA_V3 = _PROPSHEETPAGEA /* /usr/x86_64-w64-mingw32/include/prsht.h:141:5 */ type LPPROPSHEETPAGEA_V3 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:141:23 */ type LPCPROPSHEETPAGEA_V3 = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/prsht.h:145:11 */ type PROPSHEETPAGEW_V1 = _PROPSHEETPAGEW_V1 /* /usr/x86_64-w64-mingw32/include/prsht.h:147:5 */ type LPPROPSHEETPAGEW_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:147:23 */ type LPCPROPSHEETPAGEW_V1 = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/prsht.h:151:11 */ type PROPSHEETPAGEW_V2 = _PROPSHEETPAGEW_V2 /* /usr/x86_64-w64-mingw32/include/prsht.h:155:5 */ type LPPROPSHEETPAGEW_V2 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:155:23 */ type LPCPROPSHEETPAGEW_V2 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:157:35 */ type PROPSHEETPAGEW_V3 = _PROPSHEETPAGEW /* /usr/x86_64-w64-mingw32/include/prsht.h:164:5 */ type LPPROPSHEETPAGEW_V3 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:164:23 */ type LPCPROPSHEETPAGEW_V3 = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:166:35 */ type PROPSHEETPAGEA_LATEST = PROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:167:29 */ type PROPSHEETPAGEW_LATEST = PROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:168:29 */ type LPPROPSHEETPAGEA_LATEST = LPPROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:169:31 */ type LPPROPSHEETPAGEW_LATEST = LPPROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:170:31 */ type LPCPROPSHEETPAGEA_LATEST = LPCPROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:171:32 */ type LPCPROPSHEETPAGEW_LATEST = LPCPROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:172:32 */ type PROPSHEETPAGEA = PROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:174:29 */ type PROPSHEETPAGEW = PROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:175:29 */ type LPPROPSHEETPAGEA = LPPROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:176:31 */ type LPPROPSHEETPAGEW = LPPROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:177:31 */ type LPCPROPSHEETPAGEA = LPCPROPSHEETPAGEA_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:178:32 */ type LPCPROPSHEETPAGEW = LPCPROPSHEETPAGEW_V3 /* /usr/x86_64-w64-mingw32/include/prsht.h:179:32 */ type PFNPROPSHEETCALLBACK = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:227:15 */ type _PROPSHEETHEADERA = struct { FdwSize DWORD FdwFlags DWORD FhwndParent HWND FhInstance HINSTANCE Fu struct{ FhIcon HICON } FpszCaption LPCSTR FnPages UINT F__ccgo_pad1 [4]byte Fu2 struct { F__ccgo_pad1 [0]uint64 FnStartPage UINT F__ccgo_pad2 [4]byte } Fu3 struct{ Fppsp LPCPROPSHEETPAGEA } FpfnCallback PFNPROPSHEETCALLBACK Fu4 struct{ FhbmWatermark HBITMAP } FhplWatermark HPALETTE Fu5 struct{ FhbmHeader HBITMAP } } /* /usr/x86_64-w64-mingw32/include/prsht.h:235:11 */ type PROPSHEETHEADERA = _PROPSHEETHEADERA /* /usr/x86_64-w64-mingw32/include/prsht.h:264:5 */ type LPPROPSHEETHEADERA = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:264:22 */ type LPCPROPSHEETHEADERA = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:266:34 */ type _PROPSHEETHEADERW = struct { FdwSize DWORD FdwFlags DWORD FhwndParent HWND FhInstance HINSTANCE Fu struct{ FhIcon HICON } FpszCaption LPCWSTR FnPages UINT F__ccgo_pad1 [4]byte Fu2 struct { F__ccgo_pad1 [0]uint64 FnStartPage UINT F__ccgo_pad2 [4]byte } Fu3 struct{ Fppsp LPCPROPSHEETPAGEW } FpfnCallback PFNPROPSHEETCALLBACK Fu4 struct{ FhbmWatermark HBITMAP } FhplWatermark HPALETTE Fu5 struct{ FhbmHeader HBITMAP } } /* /usr/x86_64-w64-mingw32/include/prsht.h:268:11 */ type PROPSHEETHEADERW = _PROPSHEETHEADERW /* /usr/x86_64-w64-mingw32/include/prsht.h:297:5 */ type LPPROPSHEETHEADERW = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:297:22 */ type LPCPROPSHEETHEADERW = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:299:34 */ type LPFNADDPROPSHEETPAGE = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:321:19 */ type LPFNADDPROPSHEETPAGES = uintptr /* /usr/x86_64-w64-mingw32/include/prsht.h:322:19 */ type _PSHNOTIFY = struct { Fhdr NMHDR FlParam LPARAM } /* /usr/x86_64-w64-mingw32/include/prsht.h:324:11 */ type PSHNOTIFY = _PSHNOTIFY /* /usr/x86_64-w64-mingw32/include/prsht.h:327:5 */ type LPPSHNOTIFY = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [4]byte FpDescription LPSTR FpName LPSTR FpComment LPSTR } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winspool.h:24:5 */ type PPRINTER_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:24:21 */ type LPPRINTER_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:24:39 */ type _PRINTER_INFO_1W = struct { FFlags DWORD F__ccgo_pad1 [4]byte FpDescription LPWSTR FpName LPWSTR FpComment LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:26:11 */ type PRINTER_INFO_1W = _PRINTER_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:31:5 */ type PPRINTER_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:31:21 */ type LPPRINTER_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:31:39 */ type PRINTER_INFO_1 = PRINTER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:33:3 */ type PPRINTER_INFO_1 = PPRINTER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:34:3 */ type LPPRINTER_INFO_1 = LPPRINTER_INFO_1A /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winspool.h:37:11 */ type PRINTER_INFO_2A = _PRINTER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:59:5 */ type PPRINTER_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:59:21 */ type LPPRINTER_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winspool.h:61:11 */ type PRINTER_INFO_2W = _PRINTER_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:83:5 */ type PPRINTER_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:83:21 */ type LPPRINTER_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:83:39 */ type PRINTER_INFO_2 = PRINTER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:85:3 */ type PPRINTER_INFO_2 = PPRINTER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:86:3 */ type LPPRINTER_INFO_2 = LPPRINTER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:87:3 */ type _PRINTER_INFO_3 = struct{ FpSecurityDescriptor PSECURITY_DESCRIPTOR } /* /usr/x86_64-w64-mingw32/include/winspool.h:89:11 */ type PRINTER_INFO_3 = _PRINTER_INFO_3 /* /usr/x86_64-w64-mingw32/include/winspool.h:91:5 */ type PPRINTER_INFO_3 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:91:20 */ type LPPRINTER_INFO_3 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:91:37 */ type _PRINTER_INFO_4A = struct { FpPrinterName LPSTR FpServerName LPSTR FAttributes DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:93:11 */ type PRINTER_INFO_4A = _PRINTER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:97:5 */ type PPRINTER_INFO_4A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:97:21 */ type LPPRINTER_INFO_4A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:97:39 */ type _PRINTER_INFO_4W = struct { FpPrinterName LPWSTR FpServerName LPWSTR FAttributes DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:99:11 */ type PRINTER_INFO_4W = _PRINTER_INFO_4W /* /usr/x86_64-w64-mingw32/include/winspool.h:103:5 */ type PPRINTER_INFO_4W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:103:21 */ type LPPRINTER_INFO_4W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:103:39 */ type PRINTER_INFO_4 = PRINTER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:105:3 */ type PPRINTER_INFO_4 = PPRINTER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:106:3 */ type LPPRINTER_INFO_4 = LPPRINTER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:107:3 */ type _PRINTER_INFO_5A = struct { FpPrinterName LPSTR FpPortName LPSTR FAttributes DWORD FDeviceNotSelectedTimeout DWORD FTransmissionRetryTimeout DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:109:11 */ type PRINTER_INFO_5A = _PRINTER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:115:5 */ type PPRINTER_INFO_5A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:115:21 */ type LPPRINTER_INFO_5A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:115:39 */ type _PRINTER_INFO_5W = struct { FpPrinterName LPWSTR FpPortName LPWSTR FAttributes DWORD FDeviceNotSelectedTimeout DWORD FTransmissionRetryTimeout DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:117:11 */ type PRINTER_INFO_5W = _PRINTER_INFO_5W /* /usr/x86_64-w64-mingw32/include/winspool.h:123:5 */ type PPRINTER_INFO_5W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:123:21 */ type LPPRINTER_INFO_5W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:123:39 */ type PRINTER_INFO_5 = PRINTER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:125:3 */ type PPRINTER_INFO_5 = PPRINTER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:126:3 */ type LPPRINTER_INFO_5 = LPPRINTER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:127:3 */ type _PRINTER_INFO_6 = struct{ FdwStatus DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:129:11 */ type PRINTER_INFO_6 = _PRINTER_INFO_6 /* /usr/x86_64-w64-mingw32/include/winspool.h:131:5 */ type PPRINTER_INFO_6 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:131:20 */ type LPPRINTER_INFO_6 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:131:37 */ type _PRINTER_INFO_7A = struct { FpszObjectGUID LPSTR FdwAction DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:133:11 */ type PRINTER_INFO_7A = _PRINTER_INFO_7A /* /usr/x86_64-w64-mingw32/include/winspool.h:136:5 */ type PPRINTER_INFO_7A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:136:21 */ type LPPRINTER_INFO_7A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:136:39 */ type _PRINTER_INFO_7W = struct { FpszObjectGUID LPWSTR FdwAction DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:138:11 */ type PRINTER_INFO_7W = _PRINTER_INFO_7W /* /usr/x86_64-w64-mingw32/include/winspool.h:141:5 */ type PPRINTER_INFO_7W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:141:21 */ type LPPRINTER_INFO_7W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:141:39 */ type PRINTER_INFO_7 = PRINTER_INFO_7A /* /usr/x86_64-w64-mingw32/include/winspool.h:143:3 */ type PPRINTER_INFO_7 = PPRINTER_INFO_7A /* /usr/x86_64-w64-mingw32/include/winspool.h:144:3 */ type LPPRINTER_INFO_7 = LPPRINTER_INFO_7A /* /usr/x86_64-w64-mingw32/include/winspool.h:145:3 */ type _PRINTER_INFO_8A = struct{ FpDevMode LPDEVMODEA } /* /usr/x86_64-w64-mingw32/include/winspool.h:153:11 */ type PRINTER_INFO_8A = _PRINTER_INFO_8A /* /usr/x86_64-w64-mingw32/include/winspool.h:155:5 */ type PPRINTER_INFO_8A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:155:21 */ type LPPRINTER_INFO_8A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:155:39 */ type _PRINTER_INFO_8W = struct{ FpDevMode LPDEVMODEW } /* /usr/x86_64-w64-mingw32/include/winspool.h:157:11 */ type PRINTER_INFO_8W = _PRINTER_INFO_8W /* /usr/x86_64-w64-mingw32/include/winspool.h:159:5 */ type PPRINTER_INFO_8W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:159:21 */ type LPPRINTER_INFO_8W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:159:39 */ type PRINTER_INFO_8 = PRINTER_INFO_8A /* /usr/x86_64-w64-mingw32/include/winspool.h:161:3 */ type PPRINTER_INFO_8 = PPRINTER_INFO_8A /* /usr/x86_64-w64-mingw32/include/winspool.h:162:3 */ type LPPRINTER_INFO_8 = LPPRINTER_INFO_8A /* /usr/x86_64-w64-mingw32/include/winspool.h:163:3 */ type _PRINTER_INFO_9A = struct{ FpDevMode LPDEVMODEA } /* /usr/x86_64-w64-mingw32/include/winspool.h:165:11 */ type PRINTER_INFO_9A = _PRINTER_INFO_9A /* /usr/x86_64-w64-mingw32/include/winspool.h:167:5 */ type PPRINTER_INFO_9A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:167:21 */ type LPPRINTER_INFO_9A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:167:39 */ type _PRINTER_INFO_9W = struct{ FpDevMode LPDEVMODEW } /* /usr/x86_64-w64-mingw32/include/winspool.h:169:11 */ type PRINTER_INFO_9W = _PRINTER_INFO_9W /* /usr/x86_64-w64-mingw32/include/winspool.h:171:5 */ type PPRINTER_INFO_9W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:171:21 */ type LPPRINTER_INFO_9W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:171:39 */ type PRINTER_INFO_9 = PRINTER_INFO_9A /* /usr/x86_64-w64-mingw32/include/winspool.h:173:3 */ type PPRINTER_INFO_9 = PPRINTER_INFO_9A /* /usr/x86_64-w64-mingw32/include/winspool.h:174:3 */ type LPPRINTER_INFO_9 = LPPRINTER_INFO_9A /* /usr/x86_64-w64-mingw32/include/winspool.h:175:3 */ type _JOB_INFO_1A = struct { FJobId DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:232:11 */ type JOB_INFO_1A = _JOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:246:5 */ type PJOB_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:246:17 */ type LPJOB_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:246:31 */ type _JOB_INFO_1W = struct { FJobId DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:248:11 */ type JOB_INFO_1W = _JOB_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:262:5 */ type PJOB_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:262:17 */ type LPJOB_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:262:31 */ type JOB_INFO_1 = JOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:264:3 */ type PJOB_INFO_1 = PJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:265:3 */ type LPJOB_INFO_1 = LPJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:266:3 */ type _JOB_INFO_2A = struct { FJobId DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:268:11 */ type JOB_INFO_2A = _JOB_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:292:5 */ type PJOB_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:292:17 */ type LPJOB_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:292:31 */ type _JOB_INFO_2W = struct { FJobId DWORD F__ccgo_pad1 [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 F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:294:11 */ type JOB_INFO_2W = _JOB_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:318:5 */ type PJOB_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:318:17 */ type LPJOB_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:318:31 */ type JOB_INFO_2 = JOB_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:320:3 */ type PJOB_INFO_2 = PJOB_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:321:3 */ type LPJOB_INFO_2 = LPJOB_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:322:3 */ type _JOB_INFO_3 = struct { FJobId DWORD FNextJobId DWORD FReserved DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:324:11 */ type JOB_INFO_3 = _JOB_INFO_3 /* /usr/x86_64-w64-mingw32/include/winspool.h:328:5 */ type PJOB_INFO_3 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:328:16 */ type LPJOB_INFO_3 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:328:29 */ type _ADDJOB_INFO_1A = struct { FPath LPSTR FJobId DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:354:11 */ type ADDJOB_INFO_1A = _ADDJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:357:5 */ type PADDJOB_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:357:20 */ type LPADDJOB_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:357:37 */ type _ADDJOB_INFO_1W = struct { FPath LPWSTR FJobId DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:359:11 */ type ADDJOB_INFO_1W = _ADDJOB_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:362:5 */ type PADDJOB_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:362:20 */ type LPADDJOB_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:362:37 */ type ADDJOB_INFO_1 = ADDJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:364:3 */ type PADDJOB_INFO_1 = PADDJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:365:3 */ type LPADDJOB_INFO_1 = LPADDJOB_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:366:3 */ type _DRIVER_INFO_1A = struct{ FpName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:368:11 */ type DRIVER_INFO_1A = _DRIVER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:370:5 */ type PDRIVER_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:370:20 */ type LPDRIVER_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:370:37 */ type _DRIVER_INFO_1W = struct{ FpName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:372:11 */ type DRIVER_INFO_1W = _DRIVER_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:374:5 */ type PDRIVER_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:374:20 */ type LPDRIVER_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:374:37 */ type DRIVER_INFO_1 = DRIVER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:376:3 */ type PDRIVER_INFO_1 = PDRIVER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:377:3 */ type LPDRIVER_INFO_1 = LPDRIVER_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:378:3 */ type _DRIVER_INFO_2A = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:380:11 */ type DRIVER_INFO_2A = _DRIVER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:387:5 */ type PDRIVER_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:387:20 */ type LPDRIVER_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:387:37 */ type _DRIVER_INFO_2W = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:389:11 */ type DRIVER_INFO_2W = _DRIVER_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:396:5 */ type PDRIVER_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:396:20 */ type LPDRIVER_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:396:37 */ type DRIVER_INFO_2 = DRIVER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:398:3 */ type PDRIVER_INFO_2 = PDRIVER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:399:3 */ type LPDRIVER_INFO_2 = LPDRIVER_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:400:3 */ type _DRIVER_INFO_3A = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FpHelpFile LPSTR FpDependentFiles LPSTR FpMonitorName LPSTR FpDefaultDataType LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:402:11 */ type DRIVER_INFO_3A = _DRIVER_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:413:5 */ type PDRIVER_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:413:20 */ type LPDRIVER_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:413:37 */ type _DRIVER_INFO_3W = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FpHelpFile LPWSTR FpDependentFiles LPWSTR FpMonitorName LPWSTR FpDefaultDataType LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:415:11 */ type DRIVER_INFO_3W = _DRIVER_INFO_3W /* /usr/x86_64-w64-mingw32/include/winspool.h:426:5 */ type PDRIVER_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:426:20 */ type LPDRIVER_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:426:37 */ type DRIVER_INFO_3 = DRIVER_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:428:3 */ type PDRIVER_INFO_3 = PDRIVER_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:429:3 */ type LPDRIVER_INFO_3 = LPDRIVER_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:430:3 */ type _DRIVER_INFO_4A = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FpHelpFile LPSTR FpDependentFiles LPSTR FpMonitorName LPSTR FpDefaultDataType LPSTR FpszzPreviousNames LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:432:11 */ type DRIVER_INFO_4A = _DRIVER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:444:5 */ type PDRIVER_INFO_4A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:444:20 */ type LPDRIVER_INFO_4A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:444:37 */ type _DRIVER_INFO_4W = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FpHelpFile LPWSTR FpDependentFiles LPWSTR FpMonitorName LPWSTR FpDefaultDataType LPWSTR FpszzPreviousNames LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:446:11 */ type DRIVER_INFO_4W = _DRIVER_INFO_4W /* /usr/x86_64-w64-mingw32/include/winspool.h:458:5 */ type PDRIVER_INFO_4W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:458:20 */ type LPDRIVER_INFO_4W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:458:37 */ type DRIVER_INFO_4 = DRIVER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:460:3 */ type PDRIVER_INFO_4 = PDRIVER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:461:3 */ type LPDRIVER_INFO_4 = LPDRIVER_INFO_4A /* /usr/x86_64-w64-mingw32/include/winspool.h:462:3 */ type _DRIVER_INFO_5A = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPSTR FpEnvironment LPSTR FpDriverPath LPSTR FpDataFile LPSTR FpConfigFile LPSTR FdwDriverAttributes DWORD FdwConfigVersion DWORD FdwDriverVersion DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:464:11 */ type DRIVER_INFO_5A = _DRIVER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:474:5 */ type PDRIVER_INFO_5A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:474:20 */ type LPDRIVER_INFO_5A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:474:37 */ type _DRIVER_INFO_5W = struct { FcVersion DWORD F__ccgo_pad1 [4]byte FpName LPWSTR FpEnvironment LPWSTR FpDriverPath LPWSTR FpDataFile LPWSTR FpConfigFile LPWSTR FdwDriverAttributes DWORD FdwConfigVersion DWORD FdwDriverVersion DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:476:11 */ type DRIVER_INFO_5W = _DRIVER_INFO_5W /* /usr/x86_64-w64-mingw32/include/winspool.h:486:5 */ type PDRIVER_INFO_5W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:486:20 */ type LPDRIVER_INFO_5W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:486:37 */ type DRIVER_INFO_5 = DRIVER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:488:3 */ type PDRIVER_INFO_5 = PDRIVER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:489:3 */ type LPDRIVER_INFO_5 = LPDRIVER_INFO_5A /* /usr/x86_64-w64-mingw32/include/winspool.h:490:3 */ type _DRIVER_INFO_6A = struct { FcVersion DWORD F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/winspool.h:492:11 */ type DRIVER_INFO_6A = _DRIVER_INFO_6A /* /usr/x86_64-w64-mingw32/include/winspool.h:510:5 */ type PDRIVER_INFO_6A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:510:20 */ type LPDRIVER_INFO_6A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:510:37 */ type _DRIVER_INFO_6W = struct { FcVersion DWORD F__ccgo_pad1 [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 } /* /usr/x86_64-w64-mingw32/include/winspool.h:512:11 */ type DRIVER_INFO_6W = _DRIVER_INFO_6W /* /usr/x86_64-w64-mingw32/include/winspool.h:530:5 */ type PDRIVER_INFO_6W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:530:20 */ type LPDRIVER_INFO_6W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:530:37 */ type DRIVER_INFO_6 = DRIVER_INFO_6A /* /usr/x86_64-w64-mingw32/include/winspool.h:532:3 */ type PDRIVER_INFO_6 = PDRIVER_INFO_6A /* /usr/x86_64-w64-mingw32/include/winspool.h:533:3 */ type LPDRIVER_INFO_6 = LPDRIVER_INFO_6A /* /usr/x86_64-w64-mingw32/include/winspool.h:534:3 */ type _DOC_INFO_1A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:549:11 */ type DOC_INFO_1A = _DOC_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:553:5 */ type PDOC_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:553:17 */ type LPDOC_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:553:31 */ type _DOC_INFO_1W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:555:11 */ type DOC_INFO_1W = _DOC_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:559:5 */ type PDOC_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:559:17 */ type LPDOC_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:559:31 */ type DOC_INFO_1 = DOC_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:561:3 */ type PDOC_INFO_1 = PDOC_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:562:3 */ type LPDOC_INFO_1 = LPDOC_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:563:3 */ type _FORM_INFO_1A = struct { FFlags DWORD F__ccgo_pad1 [4]byte FpName LPSTR FSize SIZEL FImageableArea RECTL } /* /usr/x86_64-w64-mingw32/include/winspool.h:565:11 */ type FORM_INFO_1A = _FORM_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:570:5 */ type PFORM_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:570:18 */ type LPFORM_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:570:33 */ type _FORM_INFO_1W = struct { FFlags DWORD F__ccgo_pad1 [4]byte FpName LPWSTR FSize SIZEL FImageableArea RECTL } /* /usr/x86_64-w64-mingw32/include/winspool.h:572:11 */ type FORM_INFO_1W = _FORM_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:577:5 */ type PFORM_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:577:18 */ type LPFORM_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:577:33 */ type FORM_INFO_1 = FORM_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:579:3 */ type PFORM_INFO_1 = PFORM_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:580:3 */ type LPFORM_INFO_1 = LPFORM_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:581:3 */ type _DOC_INFO_2A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR FdwMode DWORD FJobId DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:583:11 */ type DOC_INFO_2A = _DOC_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:589:5 */ type PDOC_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:589:17 */ type LPDOC_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:589:31 */ type _DOC_INFO_2W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR FdwMode DWORD FJobId DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:591:11 */ type DOC_INFO_2W = _DOC_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:597:5 */ type PDOC_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:597:17 */ type LPDOC_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:597:31 */ type DOC_INFO_2 = DOC_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:599:3 */ type PDOC_INFO_2 = PDOC_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:600:3 */ type LPDOC_INFO_2 = LPDOC_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:601:3 */ type _DOC_INFO_3A = struct { FpDocName LPSTR FpOutputFile LPSTR FpDatatype LPSTR FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:606:11 */ type DOC_INFO_3A = _DOC_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:611:5 */ type PDOC_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:611:17 */ type LPDOC_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:611:31 */ type _DOC_INFO_3W = struct { FpDocName LPWSTR FpOutputFile LPWSTR FpDatatype LPWSTR FdwFlags DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:613:11 */ type DOC_INFO_3W = _DOC_INFO_3W /* /usr/x86_64-w64-mingw32/include/winspool.h:618:5 */ type PDOC_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:618:17 */ type LPDOC_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:618:31 */ type DOC_INFO_3 = DOC_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:620:3 */ type PDOC_INFO_3 = PDOC_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:621:3 */ type LPDOC_INFO_3 = LPDOC_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:622:3 */ type _PRINTPROCESSOR_INFO_1A = struct{ FpName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:630:11 */ type PRINTPROCESSOR_INFO_1A = _PRINTPROCESSOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:632:5 */ type PPRINTPROCESSOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:632:28 */ type LPPRINTPROCESSOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:632:53 */ type _PRINTPROCESSOR_INFO_1W = struct{ FpName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:634:11 */ type PRINTPROCESSOR_INFO_1W = _PRINTPROCESSOR_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:636:5 */ type PPRINTPROCESSOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:636:28 */ type LPPRINTPROCESSOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:636:53 */ type PRINTPROCESSOR_INFO_1 = PRINTPROCESSOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:638:3 */ type PPRINTPROCESSOR_INFO_1 = PPRINTPROCESSOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:639:3 */ type LPPRINTPROCESSOR_INFO_1 = LPPRINTPROCESSOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:640:3 */ type _PRINTPROCESSOR_CAPS_1 = struct { FdwLevel DWORD FdwNupOptions DWORD FdwPageOrderFlags DWORD FdwNumberOfCopies DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:642:11 */ type PRINTPROCESSOR_CAPS_1 = _PRINTPROCESSOR_CAPS_1 /* /usr/x86_64-w64-mingw32/include/winspool.h:647:5 */ type PPRINTPROCESSOR_CAPS_1 = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:647:27 */ type _PORT_INFO_1A = struct{ FpName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:652:11 */ type PORT_INFO_1A = _PORT_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:654:5 */ type PPORT_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:654:18 */ type LPPORT_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:654:33 */ type _PORT_INFO_1W = struct{ FpName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:655:11 */ type PORT_INFO_1W = _PORT_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:657:5 */ type PPORT_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:657:18 */ type LPPORT_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:657:33 */ type PORT_INFO_1 = PORT_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:659:3 */ type PPORT_INFO_1 = PPORT_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:660:3 */ type LPPORT_INFO_1 = LPPORT_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:661:3 */ type _PORT_INFO_2A = struct { FpPortName LPSTR FpMonitorName LPSTR FpDescription LPSTR FfPortType DWORD FReserved DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:663:11 */ type PORT_INFO_2A = _PORT_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:669:5 */ type PPORT_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:669:18 */ type LPPORT_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:669:33 */ type _PORT_INFO_2W = struct { FpPortName LPWSTR FpMonitorName LPWSTR FpDescription LPWSTR FfPortType DWORD FReserved DWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:671:11 */ type PORT_INFO_2W = _PORT_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:677:5 */ type PPORT_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:677:18 */ type LPPORT_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:677:33 */ type PORT_INFO_2 = PORT_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:679:3 */ type PPORT_INFO_2 = PPORT_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:680:3 */ type LPPORT_INFO_2 = LPPORT_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:681:3 */ type _PORT_INFO_3A = struct { FdwStatus DWORD F__ccgo_pad1 [4]byte FpszStatus LPSTR FdwSeverity DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:688:11 */ type PORT_INFO_3A = _PORT_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:692:5 */ type PPORT_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:692:18 */ type LPPORT_INFO_3A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:692:33 */ type _PORT_INFO_3W = struct { FdwStatus DWORD F__ccgo_pad1 [4]byte FpszStatus LPWSTR FdwSeverity DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:694:11 */ type PORT_INFO_3W = _PORT_INFO_3W /* /usr/x86_64-w64-mingw32/include/winspool.h:698:5 */ type PPORT_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:698:18 */ type LPPORT_INFO_3W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:698:33 */ type PORT_INFO_3 = PORT_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:700:3 */ type PPORT_INFO_3 = PPORT_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:701:3 */ type LPPORT_INFO_3 = LPPORT_INFO_3A /* /usr/x86_64-w64-mingw32/include/winspool.h:702:3 */ type _MONITOR_INFO_1A = struct{ FpName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:721:11 */ type MONITOR_INFO_1A = _MONITOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:723:5 */ type PMONITOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:723:21 */ type LPMONITOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:723:39 */ type _MONITOR_INFO_1W = struct{ FpName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:725:11 */ type MONITOR_INFO_1W = _MONITOR_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:727:5 */ type PMONITOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:727:21 */ type LPMONITOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:727:39 */ type MONITOR_INFO_1 = MONITOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:729:3 */ type PMONITOR_INFO_1 = PMONITOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:730:3 */ type LPMONITOR_INFO_1 = LPMONITOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:731:3 */ type _MONITOR_INFO_2A = struct { FpName LPSTR FpEnvironment LPSTR FpDLLName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:733:11 */ type MONITOR_INFO_2A = _MONITOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:737:5 */ type PMONITOR_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:737:21 */ type LPMONITOR_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:737:39 */ type _MONITOR_INFO_2W = struct { FpName LPWSTR FpEnvironment LPWSTR FpDLLName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:739:11 */ type MONITOR_INFO_2W = _MONITOR_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:743:5 */ type PMONITOR_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:743:21 */ type LPMONITOR_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:743:39 */ type MONITOR_INFO_2 = MONITOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:745:3 */ type PMONITOR_INFO_2 = PMONITOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:746:3 */ type LPMONITOR_INFO_2 = LPMONITOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:747:3 */ type _DATATYPES_INFO_1A = struct{ FpName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:749:11 */ type DATATYPES_INFO_1A = _DATATYPES_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:751:5 */ type PDATATYPES_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:751:23 */ type LPDATATYPES_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:751:43 */ type _DATATYPES_INFO_1W = struct{ FpName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:753:11 */ type DATATYPES_INFO_1W = _DATATYPES_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:755:5 */ type PDATATYPES_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:755:23 */ type LPDATATYPES_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:755:43 */ type DATATYPES_INFO_1 = DATATYPES_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:757:3 */ type PDATATYPES_INFO_1 = PDATATYPES_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:758:3 */ type LPDATATYPES_INFO_1 = LPDATATYPES_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:759:3 */ type _PRINTER_DEFAULTSA = struct { FpDatatype LPSTR FpDevMode LPDEVMODEA FDesiredAccess ACCESS_MASK F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:761:11 */ type PRINTER_DEFAULTSA = _PRINTER_DEFAULTSA /* /usr/x86_64-w64-mingw32/include/winspool.h:765:5 */ type PPRINTER_DEFAULTSA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:765:23 */ type LPPRINTER_DEFAULTSA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:765:43 */ type _PRINTER_DEFAULTSW = struct { FpDatatype LPWSTR FpDevMode LPDEVMODEW FDesiredAccess ACCESS_MASK F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:767:11 */ type PRINTER_DEFAULTSW = _PRINTER_DEFAULTSW /* /usr/x86_64-w64-mingw32/include/winspool.h:771:5 */ type PPRINTER_DEFAULTSW = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:771:23 */ type LPPRINTER_DEFAULTSW = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:771:43 */ type PRINTER_DEFAULTS = PRINTER_DEFAULTSA /* /usr/x86_64-w64-mingw32/include/winspool.h:773:3 */ type PPRINTER_DEFAULTS = PPRINTER_DEFAULTSA /* /usr/x86_64-w64-mingw32/include/winspool.h:774:3 */ type LPPRINTER_DEFAULTS = LPPRINTER_DEFAULTSA /* /usr/x86_64-w64-mingw32/include/winspool.h:775:3 */ type _PRINTER_ENUM_VALUESA = struct { FpValueName LPSTR FcbValueName DWORD FdwType DWORD FpData LPBYTE FcbData DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:777:11 */ type PRINTER_ENUM_VALUESA = _PRINTER_ENUM_VALUESA /* /usr/x86_64-w64-mingw32/include/winspool.h:783:5 */ type PPRINTER_ENUM_VALUESA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:783:26 */ type LPPRINTER_ENUM_VALUESA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:783:49 */ type _PRINTER_ENUM_VALUESW = struct { FpValueName LPWSTR FcbValueName DWORD FdwType DWORD FpData LPBYTE FcbData DWORD F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winspool.h:785:11 */ type PRINTER_ENUM_VALUESW = _PRINTER_ENUM_VALUESW /* /usr/x86_64-w64-mingw32/include/winspool.h:791:5 */ type PPRINTER_ENUM_VALUESW = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:791:26 */ type LPPRINTER_ENUM_VALUESW = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:791:49 */ type PRINTER_ENUM_VALUES = PRINTER_ENUM_VALUESA /* /usr/x86_64-w64-mingw32/include/winspool.h:793:3 */ type PPRINTER_ENUM_VALUES = PPRINTER_ENUM_VALUESA /* /usr/x86_64-w64-mingw32/include/winspool.h:794:3 */ type LPPRINTER_ENUM_VALUES = LPPRINTER_ENUM_VALUESA /* /usr/x86_64-w64-mingw32/include/winspool.h:795:3 */ type _PRINTER_NOTIFY_OPTIONS_TYPE = struct { FType WORD FReserved0 WORD FReserved1 DWORD FReserved2 DWORD FCount DWORD FpFields PWORD } /* /usr/x86_64-w64-mingw32/include/winspool.h:999:11 */ type PRINTER_NOTIFY_OPTIONS_TYPE = _PRINTER_NOTIFY_OPTIONS_TYPE /* /usr/x86_64-w64-mingw32/include/winspool.h:1006:5 */ type PPRINTER_NOTIFY_OPTIONS_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1006:33 */ type LPPRINTER_NOTIFY_OPTIONS_TYPE = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1006:63 */ type _PRINTER_NOTIFY_OPTIONS = struct { FVersion DWORD FFlags DWORD FCount DWORD F__ccgo_pad1 [4]byte FpTypes PPRINTER_NOTIFY_OPTIONS_TYPE } /* /usr/x86_64-w64-mingw32/include/winspool.h:1010:11 */ type PRINTER_NOTIFY_OPTIONS = _PRINTER_NOTIFY_OPTIONS /* /usr/x86_64-w64-mingw32/include/winspool.h:1015:5 */ type PPRINTER_NOTIFY_OPTIONS = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1015:28 */ type LPPRINTER_NOTIFY_OPTIONS = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1015:53 */ type _PRINTER_NOTIFY_INFO_DATA = struct { FType WORD FField WORD FReserved DWORD FId DWORD F__ccgo_pad1 [4]byte FNotifyData struct { F__ccgo_pad1 [0]uint64 FadwData [2]DWORD F__ccgo_pad2 [8]byte } } /* /usr/x86_64-w64-mingw32/include/winspool.h:1019:11 */ type PRINTER_NOTIFY_INFO_DATA = _PRINTER_NOTIFY_INFO_DATA /* /usr/x86_64-w64-mingw32/include/winspool.h:1031:5 */ type PPRINTER_NOTIFY_INFO_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1031:30 */ type LPPRINTER_NOTIFY_INFO_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1031:57 */ type _PRINTER_NOTIFY_INFO = struct { FVersion DWORD FFlags DWORD FCount DWORD F__ccgo_pad1 [4]byte FaData [1]PRINTER_NOTIFY_INFO_DATA } /* /usr/x86_64-w64-mingw32/include/winspool.h:1033:11 */ type PRINTER_NOTIFY_INFO = _PRINTER_NOTIFY_INFO /* /usr/x86_64-w64-mingw32/include/winspool.h:1038:5 */ type PPRINTER_NOTIFY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1038:25 */ type LPPRINTER_NOTIFY_INFO = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1038:47 */ type _BINARY_CONTAINER = struct { FcbBuf DWORD F__ccgo_pad1 [4]byte FpData LPBYTE } /* /usr/x86_64-w64-mingw32/include/winspool.h:1040:11 */ type BINARY_CONTAINER = _BINARY_CONTAINER /* /usr/x86_64-w64-mingw32/include/winspool.h:1043:5 */ type PBINARY_CONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1043:22 */ type _BIDI_DATA = struct { FdwBidiType DWORD F__ccgo_pad1 [4]byte Fu struct { F__ccgo_pad1 [0]uint64 FbData WINBOOL F__ccgo_pad2 [12]byte } } /* /usr/x86_64-w64-mingw32/include/winspool.h:1045:11 */ type BIDI_DATA = _BIDI_DATA /* /usr/x86_64-w64-mingw32/include/winspool.h:1054:5 */ type PBIDI_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1054:15 */ type LPBIDI_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1054:27 */ type _BIDI_REQUEST_DATA = struct { FdwReqNumber DWORD F__ccgo_pad1 [4]byte FpSchema LPWSTR Fdata BIDI_DATA } /* /usr/x86_64-w64-mingw32/include/winspool.h:1056:11 */ type BIDI_REQUEST_DATA = _BIDI_REQUEST_DATA /* /usr/x86_64-w64-mingw32/include/winspool.h:1060:5 */ type PBIDI_REQUEST_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1060:24 */ type LPBIDI_REQUEST_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1060:45 */ type _BIDI_REQUEST_CONTAINER = struct { FVersion DWORD FFlags DWORD FCount DWORD F__ccgo_pad1 [4]byte FaData [1]BIDI_REQUEST_DATA } /* /usr/x86_64-w64-mingw32/include/winspool.h:1062:11 */ type BIDI_REQUEST_CONTAINER = _BIDI_REQUEST_CONTAINER /* /usr/x86_64-w64-mingw32/include/winspool.h:1067:4 */ type PBIDI_REQUEST_CONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1067:27 */ type LPBIDI_REQUEST_CONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1067:52 */ type _BIDI_RESPONSE_DATA = struct { FdwResult DWORD FdwReqNumber DWORD FpSchema LPWSTR Fdata BIDI_DATA } /* /usr/x86_64-w64-mingw32/include/winspool.h:1069:11 */ type BIDI_RESPONSE_DATA = _BIDI_RESPONSE_DATA /* /usr/x86_64-w64-mingw32/include/winspool.h:1074:5 */ type PBIDI_RESPONSE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1074:24 */ type LPBIDI_RESPONSE_DATA = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1074:45 */ type _BIDI_RESPONSE_CONTAINER = struct { FVersion DWORD FFlags DWORD FCount DWORD F__ccgo_pad1 [4]byte FaData [1]BIDI_RESPONSE_DATA } /* /usr/x86_64-w64-mingw32/include/winspool.h:1076:11 */ type BIDI_RESPONSE_CONTAINER = _BIDI_RESPONSE_CONTAINER /* /usr/x86_64-w64-mingw32/include/winspool.h:1081:5 */ type PBIDI_RESPONSE_CONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1081:29 */ type LPBIDI_RESPONSE_CONTAINER = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1081:55 */ type BIDI_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winspool.h:1090:5 */ type _PROVIDOR_INFO_1A = struct { FpName LPSTR FpEnvironment LPSTR FpDLLName LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:1210:11 */ type PROVIDOR_INFO_1A = _PROVIDOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:1214:5 */ type PPROVIDOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1214:22 */ type LPPROVIDOR_INFO_1A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1214:41 */ type _PROVIDOR_INFO_1W = struct { FpName LPWSTR FpEnvironment LPWSTR FpDLLName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:1216:11 */ type PROVIDOR_INFO_1W = _PROVIDOR_INFO_1W /* /usr/x86_64-w64-mingw32/include/winspool.h:1220:5 */ type PPROVIDOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1220:22 */ type LPPROVIDOR_INFO_1W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1220:41 */ type PROVIDOR_INFO_1 = PROVIDOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:1222:3 */ type PPROVIDOR_INFO_1 = PPROVIDOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:1223:3 */ type LPPROVIDOR_INFO_1 = LPPROVIDOR_INFO_1A /* /usr/x86_64-w64-mingw32/include/winspool.h:1224:3 */ type _PROVIDOR_INFO_2A = struct{ FpOrder LPSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:1226:11 */ type PROVIDOR_INFO_2A = _PROVIDOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:1228:5 */ type PPROVIDOR_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1228:22 */ type LPPROVIDOR_INFO_2A = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1228:41 */ type _PROVIDOR_INFO_2W = struct{ FpOrder LPWSTR } /* /usr/x86_64-w64-mingw32/include/winspool.h:1230:11 */ type PROVIDOR_INFO_2W = _PROVIDOR_INFO_2W /* /usr/x86_64-w64-mingw32/include/winspool.h:1232:5 */ type PPROVIDOR_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1232:22 */ type LPPROVIDOR_INFO_2W = uintptr /* /usr/x86_64-w64-mingw32/include/winspool.h:1232:41 */ type PROVIDOR_INFO_2 = PROVIDOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:1234:3 */ type PPROVIDOR_INFO_2 = PPROVIDOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/winspool.h:1235:3 */ type LPPROVIDOR_INFO_2 = LPPROVIDOR_INFO_2A /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/commdlg.h:46:20 */ type tagOFN_NT4A = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCSTR FlpstrCustomFilter LPSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPSTR FnMaxFile DWORD F__ccgo_pad2 [4]byte FlpstrFileTitle LPSTR FnMaxFileTitle DWORD F__ccgo_pad3 [4]byte FlpstrInitialDir LPCSTR FlpstrTitle LPCSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:52:11 */ type OPENFILENAME_NT4A = tagOFN_NT4A /* /usr/x86_64-w64-mingw32/include/commdlg.h:73:5 */ type LPOPENFILENAME_NT4A = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:73:23 */ type tagOFN_NT4W = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCWSTR FlpstrCustomFilter LPWSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPWSTR FnMaxFile DWORD F__ccgo_pad2 [4]byte FlpstrFileTitle LPWSTR FnMaxFileTitle DWORD F__ccgo_pad3 [4]byte FlpstrInitialDir LPCWSTR FlpstrTitle LPCWSTR FFlags DWORD FnFileOffset WORD FnFileExtension WORD FlpstrDefExt LPCWSTR FlCustData LPARAM FlpfnHook LPOFNHOOKPROC FlpTemplateName LPCWSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:74:11 */ type OPENFILENAME_NT4W = tagOFN_NT4W /* /usr/x86_64-w64-mingw32/include/commdlg.h:95:5 */ type LPOPENFILENAME_NT4W = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:95:23 */ type OPENFILENAME_NT4 = OPENFILENAME_NT4A /* /usr/x86_64-w64-mingw32/include/commdlg.h:97:3 */ type LPOPENFILENAME_NT4 = LPOPENFILENAME_NT4A /* /usr/x86_64-w64-mingw32/include/commdlg.h:98:3 */ type tagOFNA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCSTR FlpstrCustomFilter LPSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPSTR FnMaxFile DWORD F__ccgo_pad2 [4]byte FlpstrFileTitle LPSTR FnMaxFileTitle DWORD F__ccgo_pad3 [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 } /* /usr/x86_64-w64-mingw32/include/commdlg.h:100:11 */ type OPENFILENAMEA = tagOFNA /* /usr/x86_64-w64-mingw32/include/commdlg.h:124:5 */ type LPOPENFILENAMEA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:124:19 */ type tagOFNW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FlpstrFilter LPCWSTR FlpstrCustomFilter LPWSTR FnMaxCustFilter DWORD FnFilterIndex DWORD FlpstrFile LPWSTR FnMaxFile DWORD F__ccgo_pad2 [4]byte FlpstrFileTitle LPWSTR FnMaxFileTitle DWORD F__ccgo_pad3 [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 } /* /usr/x86_64-w64-mingw32/include/commdlg.h:125:11 */ type OPENFILENAMEW = tagOFNW /* /usr/x86_64-w64-mingw32/include/commdlg.h:149:5 */ type LPOPENFILENAMEW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:149:19 */ type OPENFILENAME = OPENFILENAMEA /* /usr/x86_64-w64-mingw32/include/commdlg.h:151:3 */ type LPOPENFILENAME = LPOPENFILENAMEA /* /usr/x86_64-w64-mingw32/include/commdlg.h:152:3 */ type LPCCHOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:205:20 */ type _OFNOTIFYA = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEA FpszFile LPSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:207:11 */ type OFNOTIFYA = _OFNOTIFYA /* /usr/x86_64-w64-mingw32/include/commdlg.h:211:5 */ type LPOFNOTIFYA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:211:15 */ type _OFNOTIFYW = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEW FpszFile LPWSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:213:11 */ type OFNOTIFYW = _OFNOTIFYW /* /usr/x86_64-w64-mingw32/include/commdlg.h:217:5 */ type LPOFNOTIFYW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:217:15 */ type OFNOTIFY = OFNOTIFYA /* /usr/x86_64-w64-mingw32/include/commdlg.h:219:3 */ type LPOFNOTIFY = LPOFNOTIFYA /* /usr/x86_64-w64-mingw32/include/commdlg.h:220:3 */ type _OFNOTIFYEXA = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEA Fpsf LPVOID Fpidl LPVOID } /* /usr/x86_64-w64-mingw32/include/commdlg.h:222:11 */ type OFNOTIFYEXA = _OFNOTIFYEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:227:5 */ type LPOFNOTIFYEXA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:227:17 */ type _OFNOTIFYEXW = struct { Fhdr NMHDR FlpOFN LPOPENFILENAMEW Fpsf LPVOID Fpidl LPVOID } /* /usr/x86_64-w64-mingw32/include/commdlg.h:229:11 */ type OFNOTIFYEXW = _OFNOTIFYEXW /* /usr/x86_64-w64-mingw32/include/commdlg.h:234:5 */ type LPOFNOTIFYEXW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:234:17 */ type OFNOTIFYEX = OFNOTIFYEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:236:3 */ type LPOFNOTIFYEX = LPOFNOTIFYEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:237:3 */ type tagCHOOSECOLORA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HWND FrgbResult COLORREF F__ccgo_pad2 [4]byte FlpCustColors uintptr FFlags DWORD F__ccgo_pad3 [4]byte FlCustData LPARAM FlpfnHook LPCCHOOKPROC FlpTemplateName LPCSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:281:11 */ type CHOOSECOLORA = tagCHOOSECOLORA /* /usr/x86_64-w64-mingw32/include/commdlg.h:291:5 */ type LPCHOOSECOLORA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:291:18 */ type tagCHOOSECOLORW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HWND FrgbResult COLORREF F__ccgo_pad2 [4]byte FlpCustColors uintptr FFlags DWORD F__ccgo_pad3 [4]byte FlCustData LPARAM FlpfnHook LPCCHOOKPROC FlpTemplateName LPCWSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:292:11 */ type CHOOSECOLORW = tagCHOOSECOLORW /* /usr/x86_64-w64-mingw32/include/commdlg.h:302:5 */ type LPCHOOSECOLORW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:302:18 */ type CHOOSECOLOR = CHOOSECOLORA /* /usr/x86_64-w64-mingw32/include/commdlg.h:304:3 */ type LPCHOOSECOLOR = LPCHOOSECOLORA /* /usr/x86_64-w64-mingw32/include/commdlg.h:305:3 */ type LPFRHOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:322:20 */ type tagFINDREPLACEA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FFlags DWORD F__ccgo_pad2 [4]byte FlpstrFindWhat LPSTR FlpstrReplaceWith LPSTR FwFindWhatLen WORD FwReplaceWithLen WORD F__ccgo_pad3 [4]byte FlCustData LPARAM FlpfnHook LPFRHOOKPROC FlpTemplateName LPCSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:324:11 */ type FINDREPLACEA = tagFINDREPLACEA /* /usr/x86_64-w64-mingw32/include/commdlg.h:336:5 */ type LPFINDREPLACEA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:336:18 */ type tagFINDREPLACEW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhInstance HINSTANCE FFlags DWORD F__ccgo_pad2 [4]byte FlpstrFindWhat LPWSTR FlpstrReplaceWith LPWSTR FwFindWhatLen WORD FwReplaceWithLen WORD F__ccgo_pad3 [4]byte FlCustData LPARAM FlpfnHook LPFRHOOKPROC FlpTemplateName LPCWSTR } /* /usr/x86_64-w64-mingw32/include/commdlg.h:338:11 */ type FINDREPLACEW = tagFINDREPLACEW /* /usr/x86_64-w64-mingw32/include/commdlg.h:350:5 */ type LPFINDREPLACEW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:350:18 */ type FINDREPLACE = FINDREPLACEA /* /usr/x86_64-w64-mingw32/include/commdlg.h:352:3 */ type LPFINDREPLACE = LPFINDREPLACEA /* /usr/x86_64-w64-mingw32/include/commdlg.h:353:3 */ type LPCFHOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:387:20 */ type tagCHOOSEFONTA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDC HDC FlpLogFont LPLOGFONTA FiPointSize INT FFlags DWORD FrgbColors COLORREF F__ccgo_pad2 [4]byte FlCustData LPARAM FlpfnHook LPCFHOOKPROC FlpTemplateName LPCSTR FhInstance HINSTANCE FlpszStyle LPSTR FnFontType WORD F___MISSING_ALIGNMENT__ WORD FnSizeMin INT FnSizeMax INT F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/commdlg.h:389:11 */ type CHOOSEFONTA = tagCHOOSEFONTA /* /usr/x86_64-w64-mingw32/include/commdlg.h:406:5 */ type LPCHOOSEFONTA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:406:17 */ type tagCHOOSEFONTW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDC HDC FlpLogFont LPLOGFONTW FiPointSize INT FFlags DWORD FrgbColors COLORREF F__ccgo_pad2 [4]byte FlCustData LPARAM FlpfnHook LPCFHOOKPROC FlpTemplateName LPCWSTR FhInstance HINSTANCE FlpszStyle LPWSTR FnFontType WORD F___MISSING_ALIGNMENT__ WORD FnSizeMin INT FnSizeMax INT F__ccgo_pad3 [4]byte } /* /usr/x86_64-w64-mingw32/include/commdlg.h:408:11 */ type CHOOSEFONTW = tagCHOOSEFONTW /* /usr/x86_64-w64-mingw32/include/commdlg.h:425:5 */ type LPCHOOSEFONTW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:425:17 */ type CHOOSEFONT = CHOOSEFONTA /* /usr/x86_64-w64-mingw32/include/commdlg.h:427:3 */ type LPCHOOSEFONT = LPCHOOSEFONTA /* /usr/x86_64-w64-mingw32/include/commdlg.h:428:3 */ type LPPRINTHOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:516:20 */ type LPSETUPHOOKPROC = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:517:20 */ type tagPDA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FnFromPage WORD FnToPage WORD FnMinPage WORD FnMaxPage WORD FnCopies WORD F__ccgo_pad2 [2]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPrintHook LPPRINTHOOKPROC FlpfnSetupHook LPSETUPHOOKPROC FlpPrintTemplateName LPCSTR FlpSetupTemplateName LPCSTR FhPrintTemplate HGLOBAL FhSetupTemplate HGLOBAL } /* /usr/x86_64-w64-mingw32/include/commdlg.h:519:11 */ type PRINTDLGA = tagPDA /* /usr/x86_64-w64-mingw32/include/commdlg.h:539:5 */ type LPPRINTDLGA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:539:15 */ type tagPDW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FnFromPage WORD FnToPage WORD FnMinPage WORD FnMaxPage WORD FnCopies WORD F__ccgo_pad2 [2]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPrintHook LPPRINTHOOKPROC FlpfnSetupHook LPSETUPHOOKPROC FlpPrintTemplateName LPCWSTR FlpSetupTemplateName LPCWSTR FhPrintTemplate HGLOBAL FhSetupTemplate HGLOBAL } /* /usr/x86_64-w64-mingw32/include/commdlg.h:541:11 */ type PRINTDLGW = tagPDW /* /usr/x86_64-w64-mingw32/include/commdlg.h:561:5 */ type LPPRINTDLGW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:561:15 */ type PRINTDLG = PRINTDLGA /* /usr/x86_64-w64-mingw32/include/commdlg.h:563:3 */ type LPPRINTDLG = LPPRINTDLGA /* /usr/x86_64-w64-mingw32/include/commdlg.h:564:3 */ type IPrintDialogCallback1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/commdlg.h:575:3 */ type IPrintDialogCallbackVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FInitDone uintptr FSelectionChange uintptr FHandleMessage uintptr } /* /usr/x86_64-w64-mingw32/include/commdlg.h:575:3 */ type IPrintDialogCallback = IPrintDialogCallback1 /* /usr/x86_64-w64-mingw32/include/commdlg.h:575:3 */ type IPrintDialogCallbackVtbl = IPrintDialogCallbackVtbl1 /* /usr/x86_64-w64-mingw32/include/commdlg.h:575:3 */ type IPrintDialogServices1 = struct{ FlpVtbl uintptr } /* /usr/x86_64-w64-mingw32/include/commdlg.h:588:3 */ type IPrintDialogServicesVtbl1 = struct { FQueryInterface uintptr FAddRef uintptr FRelease uintptr FGetCurrentDevMode uintptr FGetCurrentPrinterName uintptr FGetCurrentPortName uintptr } /* /usr/x86_64-w64-mingw32/include/commdlg.h:588:3 */ type IPrintDialogServices = IPrintDialogServices1 /* /usr/x86_64-w64-mingw32/include/commdlg.h:588:3 */ type IPrintDialogServicesVtbl = IPrintDialogServicesVtbl1 /* /usr/x86_64-w64-mingw32/include/commdlg.h:588:3 */ type tagPRINTPAGERANGE = struct { FnFromPage DWORD FnToPage DWORD } /* /usr/x86_64-w64-mingw32/include/commdlg.h:599:11 */ type PRINTPAGERANGE = tagPRINTPAGERANGE /* /usr/x86_64-w64-mingw32/include/commdlg.h:602:5 */ type LPPRINTPAGERANGE = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:602:20 */ type tagPDEXA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FFlags2 DWORD FExclusionFlags DWORD FnPageRanges DWORD FnMaxPageRanges DWORD F__ccgo_pad2 [4]byte FlpPageRanges LPPRINTPAGERANGE FnMinPage DWORD FnMaxPage DWORD FnCopies DWORD F__ccgo_pad3 [4]byte FhInstance HINSTANCE FlpPrintTemplateName LPCSTR FlpCallback LPUNKNOWN FnPropertyPages DWORD F__ccgo_pad4 [4]byte FlphPropertyPages uintptr FnStartPage DWORD FdwResultAction DWORD } /* /usr/x86_64-w64-mingw32/include/commdlg.h:604:11 */ type PRINTDLGEXA = tagPDEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:626:5 */ type LPPRINTDLGEXA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:626:17 */ type tagPDEXW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FhDC HDC FFlags DWORD FFlags2 DWORD FExclusionFlags DWORD FnPageRanges DWORD FnMaxPageRanges DWORD F__ccgo_pad2 [4]byte FlpPageRanges LPPRINTPAGERANGE FnMinPage DWORD FnMaxPage DWORD FnCopies DWORD F__ccgo_pad3 [4]byte FhInstance HINSTANCE FlpPrintTemplateName LPCWSTR FlpCallback LPUNKNOWN FnPropertyPages DWORD F__ccgo_pad4 [4]byte FlphPropertyPages uintptr FnStartPage DWORD FdwResultAction DWORD } /* /usr/x86_64-w64-mingw32/include/commdlg.h:628:11 */ type PRINTDLGEXW = tagPDEXW /* /usr/x86_64-w64-mingw32/include/commdlg.h:650:5 */ type LPPRINTDLGEXW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:650:17 */ type PRINTDLGEX = PRINTDLGEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:652:3 */ type LPPRINTDLGEX = LPPRINTDLGEXA /* /usr/x86_64-w64-mingw32/include/commdlg.h:653:3 */ type tagDEVNAMES = struct { FwDriverOffset WORD FwDeviceOffset WORD FwOutputOffset WORD FwDefault WORD } /* /usr/x86_64-w64-mingw32/include/commdlg.h:697:11 */ type DEVNAMES = tagDEVNAMES /* /usr/x86_64-w64-mingw32/include/commdlg.h:702:5 */ type LPDEVNAMES = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:702:14 */ type LPPAGEPAINTHOOK = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:716:20 */ type LPPAGESETUPHOOK = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:717:20 */ type tagPSDA = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FFlags DWORD FptPaperSize POINT FrtMinMargin RECT FrtMargin RECT F__ccgo_pad2 [4]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPageSetupHook LPPAGESETUPHOOK FlpfnPagePaintHook LPPAGEPAINTHOOK FlpPageSetupTemplateName LPCSTR FhPageSetupTemplate HGLOBAL } /* /usr/x86_64-w64-mingw32/include/commdlg.h:719:11 */ type PAGESETUPDLGA = tagPSDA /* /usr/x86_64-w64-mingw32/include/commdlg.h:734:5 */ type LPPAGESETUPDLGA = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:734:19 */ type tagPSDW = struct { FlStructSize DWORD F__ccgo_pad1 [4]byte FhwndOwner HWND FhDevMode HGLOBAL FhDevNames HGLOBAL FFlags DWORD FptPaperSize POINT FrtMinMargin RECT FrtMargin RECT F__ccgo_pad2 [4]byte FhInstance HINSTANCE FlCustData LPARAM FlpfnPageSetupHook LPPAGESETUPHOOK FlpfnPagePaintHook LPPAGEPAINTHOOK FlpPageSetupTemplateName LPCWSTR FhPageSetupTemplate HGLOBAL } /* /usr/x86_64-w64-mingw32/include/commdlg.h:736:11 */ type PAGESETUPDLGW = tagPSDW /* /usr/x86_64-w64-mingw32/include/commdlg.h:751:5 */ type LPPAGESETUPDLGW = uintptr /* /usr/x86_64-w64-mingw32/include/commdlg.h:751:19 */ type PAGESETUPDLG = PAGESETUPDLGA /* /usr/x86_64-w64-mingw32/include/commdlg.h:753:3 */ type LPPAGESETUPDLG = LPPAGESETUPDLGA /* /usr/x86_64-w64-mingw32/include/commdlg.h:754:3 */ type PUWSTR_C = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/winsvc.h:97:5 */ type LPSERVICE_DESCRIPTIONA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:97:26 */ type _SERVICE_DESCRIPTIONW = struct{ FlpDescription LPWSTR } /* /usr/x86_64-w64-mingw32/include/winsvc.h:99:11 */ type SERVICE_DESCRIPTIONW = _SERVICE_DESCRIPTIONW /* /usr/x86_64-w64-mingw32/include/winsvc.h:101:5 */ type LPSERVICE_DESCRIPTIONW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:101:26 */ type SERVICE_DESCRIPTION = SERVICE_DESCRIPTIONA /* /usr/x86_64-w64-mingw32/include/winsvc.h:103:3 */ type LPSERVICE_DESCRIPTION = LPSERVICE_DESCRIPTIONA /* /usr/x86_64-w64-mingw32/include/winsvc.h:104:3 */ type SC_ACTION_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winsvc.h:108:5 */ type _SC_ACTION = struct { FType SC_ACTION_TYPE FDelay DWORD } /* /usr/x86_64-w64-mingw32/include/winsvc.h:110:11 */ type SC_ACTION = _SC_ACTION /* /usr/x86_64-w64-mingw32/include/winsvc.h:113:5 */ type LPSC_ACTION = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:113:15 */ type _SERVICE_FAILURE_ACTIONSA = struct { FdwResetPeriod DWORD F__ccgo_pad1 [4]byte FlpRebootMsg LPSTR FlpCommand LPSTR FcActions DWORD F__ccgo_pad2 [4]byte FlpsaActions uintptr } /* /usr/x86_64-w64-mingw32/include/winsvc.h:115:11 */ type SERVICE_FAILURE_ACTIONSA = _SERVICE_FAILURE_ACTIONSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:121:5 */ type LPSERVICE_FAILURE_ACTIONSA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:121:30 */ type _SERVICE_FAILURE_ACTIONSW = struct { FdwResetPeriod DWORD F__ccgo_pad1 [4]byte FlpRebootMsg LPWSTR FlpCommand LPWSTR FcActions DWORD F__ccgo_pad2 [4]byte FlpsaActions uintptr } /* /usr/x86_64-w64-mingw32/include/winsvc.h:123:11 */ type SERVICE_FAILURE_ACTIONSW = _SERVICE_FAILURE_ACTIONSW /* /usr/x86_64-w64-mingw32/include/winsvc.h:129:5 */ type LPSERVICE_FAILURE_ACTIONSW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:129:30 */ type SERVICE_FAILURE_ACTIONS = SERVICE_FAILURE_ACTIONSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:131:3 */ type LPSERVICE_FAILURE_ACTIONS = LPSERVICE_FAILURE_ACTIONSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:132:3 */ type SC_HANDLE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/winsvc.h:134:3 */ type SC_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:134:3 */ type LPSC_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:135:21 */ type SERVICE_STATUS_HANDLE__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/winsvc.h:137:3 */ type SERVICE_STATUS_HANDLE = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:137:3 */ type SC_STATUS_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winsvc.h:141:5 */ type SC_ENUM_TYPE = uint32 /* /usr/x86_64-w64-mingw32/include/winsvc.h:145:5 */ type _SERVICE_STATUS = struct { FdwServiceType DWORD FdwCurrentState DWORD FdwControlsAccepted DWORD FdwWin32ExitCode DWORD FdwServiceSpecificExitCode DWORD FdwCheckPoint DWORD FdwWaitHint DWORD } /* /usr/x86_64-w64-mingw32/include/winsvc.h:147:11 */ type SERVICE_STATUS = _SERVICE_STATUS /* /usr/x86_64-w64-mingw32/include/winsvc.h:155:5 */ type LPSERVICE_STATUS = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/winsvc.h:157:11 */ type SERVICE_STATUS_PROCESS = _SERVICE_STATUS_PROCESS /* /usr/x86_64-w64-mingw32/include/winsvc.h:167:5 */ type LPSERVICE_STATUS_PROCESS = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:167:28 */ type _ENUM_SERVICE_STATUSA = struct { FlpServiceName LPSTR FlpDisplayName LPSTR FServiceStatus SERVICE_STATUS F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:169:11 */ type ENUM_SERVICE_STATUSA = _ENUM_SERVICE_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:173:5 */ type LPENUM_SERVICE_STATUSA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:173:26 */ type _ENUM_SERVICE_STATUSW = struct { FlpServiceName LPWSTR FlpDisplayName LPWSTR FServiceStatus SERVICE_STATUS F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:175:11 */ type ENUM_SERVICE_STATUSW = _ENUM_SERVICE_STATUSW /* /usr/x86_64-w64-mingw32/include/winsvc.h:179:5 */ type LPENUM_SERVICE_STATUSW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:179:26 */ type ENUM_SERVICE_STATUS = ENUM_SERVICE_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:181:3 */ type LPENUM_SERVICE_STATUS = LPENUM_SERVICE_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:182:3 */ type _ENUM_SERVICE_STATUS_PROCESSA = struct { FlpServiceName LPSTR FlpDisplayName LPSTR FServiceStatusProcess SERVICE_STATUS_PROCESS F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:184:11 */ type ENUM_SERVICE_STATUS_PROCESSA = _ENUM_SERVICE_STATUS_PROCESSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:188:5 */ type LPENUM_SERVICE_STATUS_PROCESSA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:188:34 */ type _ENUM_SERVICE_STATUS_PROCESSW = struct { FlpServiceName LPWSTR FlpDisplayName LPWSTR FServiceStatusProcess SERVICE_STATUS_PROCESS F__ccgo_pad1 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:190:11 */ type ENUM_SERVICE_STATUS_PROCESSW = _ENUM_SERVICE_STATUS_PROCESSW /* /usr/x86_64-w64-mingw32/include/winsvc.h:194:5 */ type LPENUM_SERVICE_STATUS_PROCESSW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:194:34 */ type ENUM_SERVICE_STATUS_PROCESS = ENUM_SERVICE_STATUS_PROCESSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:196:3 */ type LPENUM_SERVICE_STATUS_PROCESS = LPENUM_SERVICE_STATUS_PROCESSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:197:3 */ type SC_LOCK = LPVOID /* /usr/x86_64-w64-mingw32/include/winsvc.h:199:18 */ type _QUERY_SERVICE_LOCK_STATUSA = struct { FfIsLocked DWORD F__ccgo_pad1 [4]byte FlpLockOwner LPSTR FdwLockDuration DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:201:11 */ type QUERY_SERVICE_LOCK_STATUSA = _QUERY_SERVICE_LOCK_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:205:5 */ type LPQUERY_SERVICE_LOCK_STATUSA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:205:32 */ type _QUERY_SERVICE_LOCK_STATUSW = struct { FfIsLocked DWORD F__ccgo_pad1 [4]byte FlpLockOwner LPWSTR FdwLockDuration DWORD F__ccgo_pad2 [4]byte } /* /usr/x86_64-w64-mingw32/include/winsvc.h:207:11 */ type QUERY_SERVICE_LOCK_STATUSW = _QUERY_SERVICE_LOCK_STATUSW /* /usr/x86_64-w64-mingw32/include/winsvc.h:211:5 */ type LPQUERY_SERVICE_LOCK_STATUSW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:211:32 */ type QUERY_SERVICE_LOCK_STATUS = QUERY_SERVICE_LOCK_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:213:3 */ type LPQUERY_SERVICE_LOCK_STATUS = LPQUERY_SERVICE_LOCK_STATUSA /* /usr/x86_64-w64-mingw32/include/winsvc.h:214:3 */ type _QUERY_SERVICE_CONFIGA = struct { FdwServiceType DWORD FdwStartType DWORD FdwErrorControl DWORD F__ccgo_pad1 [4]byte FlpBinaryPathName LPSTR FlpLoadOrderGroup LPSTR FdwTagId DWORD F__ccgo_pad2 [4]byte FlpDependencies LPSTR FlpServiceStartName LPSTR FlpDisplayName LPSTR } /* /usr/x86_64-w64-mingw32/include/winsvc.h:216:11 */ type QUERY_SERVICE_CONFIGA = _QUERY_SERVICE_CONFIGA /* /usr/x86_64-w64-mingw32/include/winsvc.h:226:5 */ type LPQUERY_SERVICE_CONFIGA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:226:27 */ type _QUERY_SERVICE_CONFIGW = struct { FdwServiceType DWORD FdwStartType DWORD FdwErrorControl DWORD F__ccgo_pad1 [4]byte FlpBinaryPathName LPWSTR FlpLoadOrderGroup LPWSTR FdwTagId DWORD F__ccgo_pad2 [4]byte FlpDependencies LPWSTR FlpServiceStartName LPWSTR FlpDisplayName LPWSTR } /* /usr/x86_64-w64-mingw32/include/winsvc.h:228:11 */ type QUERY_SERVICE_CONFIGW = _QUERY_SERVICE_CONFIGW /* /usr/x86_64-w64-mingw32/include/winsvc.h:238:5 */ type LPQUERY_SERVICE_CONFIGW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:238:27 */ type QUERY_SERVICE_CONFIG = QUERY_SERVICE_CONFIGA /* /usr/x86_64-w64-mingw32/include/winsvc.h:240:3 */ type LPQUERY_SERVICE_CONFIG = LPQUERY_SERVICE_CONFIGA /* /usr/x86_64-w64-mingw32/include/winsvc.h:241:3 */ type LPSERVICE_MAIN_FUNCTIONW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:243:16 */ type LPSERVICE_MAIN_FUNCTIONA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:244:16 */ type _SERVICE_TABLE_ENTRYA = struct { FlpServiceName LPSTR FlpServiceProc LPSERVICE_MAIN_FUNCTIONA } /* /usr/x86_64-w64-mingw32/include/winsvc.h:248:11 */ type SERVICE_TABLE_ENTRYA = _SERVICE_TABLE_ENTRYA /* /usr/x86_64-w64-mingw32/include/winsvc.h:251:5 */ type LPSERVICE_TABLE_ENTRYA = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:251:26 */ type _SERVICE_TABLE_ENTRYW = struct { FlpServiceName LPWSTR FlpServiceProc LPSERVICE_MAIN_FUNCTIONW } /* /usr/x86_64-w64-mingw32/include/winsvc.h:253:11 */ type SERVICE_TABLE_ENTRYW = _SERVICE_TABLE_ENTRYW /* /usr/x86_64-w64-mingw32/include/winsvc.h:256:5 */ type LPSERVICE_TABLE_ENTRYW = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:256:26 */ type SERVICE_TABLE_ENTRY = SERVICE_TABLE_ENTRYA /* /usr/x86_64-w64-mingw32/include/winsvc.h:258:3 */ type LPSERVICE_TABLE_ENTRY = LPSERVICE_TABLE_ENTRYA /* /usr/x86_64-w64-mingw32/include/winsvc.h:259:3 */ type LPHANDLER_FUNCTION = uintptr /* /usr/x86_64-w64-mingw32/include/winsvc.h:261:16 */ type LPHANDLER_FUNCTION_EX = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/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 /* /usr/x86_64-w64-mingw32/include/mcx.h:30:3 */ type PMODEMDEVCAPS = uintptr /* /usr/x86_64-w64-mingw32/include/mcx.h:30:16 */ type LPMODEMDEVCAPS = uintptr /* /usr/x86_64-w64-mingw32/include/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 F__ccgo_pad1 [3]byte } /* /usr/x86_64-w64-mingw32/include/mcx.h:32:9 */ type MODEMSETTINGS = _MODEMSETTINGS /* /usr/x86_64-w64-mingw32/include/mcx.h:45:3 */ type PMODEMSETTINGS = uintptr /* /usr/x86_64-w64-mingw32/include/mcx.h:45:17 */ type LPMODEMSETTINGS = uintptr /* /usr/x86_64-w64-mingw32/include/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 } /* /usr/x86_64-w64-mingw32/include/imm.h:18:3 */ type HIMC = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:18:3 */ type HIMCC__ = struct{ Funused int32 } /* /usr/x86_64-w64-mingw32/include/imm.h:19:3 */ type HIMCC = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:19:3 */ type LPHKL = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:21:15 */ type tagCOMPOSITIONFORM = struct { FdwStyle DWORD FptCurrentPos POINT FrcArea RECT } /* /usr/x86_64-w64-mingw32/include/imm.h:27:11 */ type COMPOSITIONFORM = tagCOMPOSITIONFORM /* /usr/x86_64-w64-mingw32/include/imm.h:31:5 */ type PCOMPOSITIONFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:31:21 */ type NPCOMPOSITIONFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:31:39 */ type LPCOMPOSITIONFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:31:58 */ type tagCANDIDATEFORM = struct { FdwIndex DWORD FdwStyle DWORD FptCurrentPos POINT FrcArea RECT } /* /usr/x86_64-w64-mingw32/include/imm.h:33:11 */ type CANDIDATEFORM = tagCANDIDATEFORM /* /usr/x86_64-w64-mingw32/include/imm.h:38:5 */ type PCANDIDATEFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:38:19 */ type NPCANDIDATEFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:38:35 */ type LPCANDIDATEFORM = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:38:52 */ type tagCANDIDATELIST = struct { FdwSize DWORD FdwStyle DWORD FdwCount DWORD FdwSelection DWORD FdwPageStart DWORD FdwPageSize DWORD FdwOffset [1]DWORD } /* /usr/x86_64-w64-mingw32/include/imm.h:40:11 */ type CANDIDATELIST = tagCANDIDATELIST /* /usr/x86_64-w64-mingw32/include/imm.h:48:5 */ type PCANDIDATELIST = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:48:19 */ type NPCANDIDATELIST = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:48:35 */ type LPCANDIDATELIST = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:48:52 */ type tagREGISTERWORDA = struct { FlpReading LPSTR FlpWord LPSTR } /* /usr/x86_64-w64-mingw32/include/imm.h:50:11 */ type REGISTERWORDA = tagREGISTERWORDA /* /usr/x86_64-w64-mingw32/include/imm.h:53:5 */ type PREGISTERWORDA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:53:19 */ type NPREGISTERWORDA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:53:35 */ type LPREGISTERWORDA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:53:52 */ type tagREGISTERWORDW = struct { FlpReading LPWSTR FlpWord LPWSTR } /* /usr/x86_64-w64-mingw32/include/imm.h:55:11 */ type REGISTERWORDW = tagREGISTERWORDW /* /usr/x86_64-w64-mingw32/include/imm.h:58:5 */ type PREGISTERWORDW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:58:19 */ type NPREGISTERWORDW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:58:35 */ type LPREGISTERWORDW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:58:52 */ type REGISTERWORD = REGISTERWORDA /* /usr/x86_64-w64-mingw32/include/imm.h:60:3 */ type PREGISTERWORD = PREGISTERWORDA /* /usr/x86_64-w64-mingw32/include/imm.h:61:3 */ type NPREGISTERWORD = NPREGISTERWORDA /* /usr/x86_64-w64-mingw32/include/imm.h:62:3 */ type LPREGISTERWORD = LPREGISTERWORDA /* /usr/x86_64-w64-mingw32/include/imm.h:63:3 */ type tagRECONVERTSTRING = struct { FdwSize DWORD FdwVersion DWORD FdwStrLen DWORD FdwStrOffset DWORD FdwCompStrLen DWORD FdwCompStrOffset DWORD FdwTargetStrLen DWORD FdwTargetStrOffset DWORD } /* /usr/x86_64-w64-mingw32/include/imm.h:65:11 */ type RECONVERTSTRING = tagRECONVERTSTRING /* /usr/x86_64-w64-mingw32/include/imm.h:74:5 */ type PRECONVERTSTRING = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:74:21 */ type NPRECONVERTSTRING = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:74:39 */ type LPRECONVERTSTRING = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:74:58 */ type tagSTYLEBUFA = struct { FdwStyle DWORD FszDescription [32]CHAR } /* /usr/x86_64-w64-mingw32/include/imm.h:78:11 */ type STYLEBUFA = tagSTYLEBUFA /* /usr/x86_64-w64-mingw32/include/imm.h:81:5 */ type PSTYLEBUFA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:81:15 */ type NPSTYLEBUFA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:81:27 */ type LPSTYLEBUFA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:81:40 */ type tagSTYLEBUFW = struct { FdwStyle DWORD FszDescription [32]WCHAR } /* /usr/x86_64-w64-mingw32/include/imm.h:83:11 */ type STYLEBUFW = tagSTYLEBUFW /* /usr/x86_64-w64-mingw32/include/imm.h:86:5 */ type PSTYLEBUFW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:86:15 */ type NPSTYLEBUFW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:86:27 */ type LPSTYLEBUFW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:86:40 */ type STYLEBUF = STYLEBUFA /* /usr/x86_64-w64-mingw32/include/imm.h:88:3 */ type PSTYLEBUF = PSTYLEBUFA /* /usr/x86_64-w64-mingw32/include/imm.h:89:3 */ type NPSTYLEBUF = NPSTYLEBUFA /* /usr/x86_64-w64-mingw32/include/imm.h:90:3 */ type LPSTYLEBUF = LPSTYLEBUFA /* /usr/x86_64-w64-mingw32/include/imm.h:91:3 */ type tagIMEMENUITEMINFOA = struct { FcbSize UINT FfType UINT FfState UINT FwID UINT FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData DWORD FszString [80]CHAR F__ccgo_pad1 [4]byte FhbmpItem HBITMAP } /* /usr/x86_64-w64-mingw32/include/imm.h:95:11 */ type IMEMENUITEMINFOA = tagIMEMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/imm.h:105:5 */ type PIMEMENUITEMINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:105:22 */ type NPIMEMENUITEMINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:105:41 */ type LPIMEMENUITEMINFOA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:105:61 */ type tagIMEMENUITEMINFOW = struct { FcbSize UINT FfType UINT FfState UINT FwID UINT FhbmpChecked HBITMAP FhbmpUnchecked HBITMAP FdwItemData DWORD FszString [80]WCHAR F__ccgo_pad1 [4]byte FhbmpItem HBITMAP } /* /usr/x86_64-w64-mingw32/include/imm.h:107:11 */ type IMEMENUITEMINFOW = tagIMEMENUITEMINFOW /* /usr/x86_64-w64-mingw32/include/imm.h:117:5 */ type PIMEMENUITEMINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:117:22 */ type NPIMEMENUITEMINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:117:41 */ type LPIMEMENUITEMINFOW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:117:61 */ type IMEMENUITEMINFO = IMEMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/imm.h:119:3 */ type PIMEMENUITEMINFO = PIMEMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/imm.h:120:3 */ type NPIMEMENUITEMINFO = NPIMEMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/imm.h:121:3 */ type LPIMEMENUITEMINFO = LPIMEMENUITEMINFOA /* /usr/x86_64-w64-mingw32/include/imm.h:122:3 */ type tagIMECHARPOSITION = struct { FdwSize DWORD FdwCharPos DWORD Fpt POINT FcLineHeight UINT FrcDocument RECT } /* /usr/x86_64-w64-mingw32/include/imm.h:124:11 */ type IMECHARPOSITION = tagIMECHARPOSITION /* /usr/x86_64-w64-mingw32/include/imm.h:130:5 */ type PIMECHARPOSITION = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:130:21 */ type NPIMECHARPOSITION = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:130:39 */ type LPIMECHARPOSITION = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:130:58 */ type IMCENUMPROC = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:132:19 */ type REGISTERWORDENUMPROCA = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:185:15 */ type REGISTERWORDENUMPROCW = uintptr /* /usr/x86_64-w64-mingw32/include/imm.h:186:15 */ // 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). //************* End of os_win.h ********************************************* //************* Continuing where we left off in mutex_w32.c ***************** // The code in this file is only used if we are compiling multithreaded // on a Win32 system. //************* End of mutex_w32.c ****************************************** //************* Begin file malloc.c ***************************************** // 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. // // // // Memory allocation functions used throughout sqlite. // #include "sqliteInt.h" // #include <stdarg.h> // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28611:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. type Mem0Global = struct { Fmutex uintptr FalarmThreshold Sqlite3_int64 FhardLimit Sqlite3_int64 FnearlyFull int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28633:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. var mem0 = Mem0Global{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28643:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28650:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28660:16: */ _ = xCallback _ = pArg _ = iThreshold return SQLITE_OK } // Set the soft heap-size limit for the library. An argument of // zero disables the limit. A negative argument is a no-op used to // obtain the return value. // // The return value is the value of the heap limit just before this // interface was called. // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28683:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return int64(-1) } Xsqlite3_mutex_enter(tls, mem0.Fmutex) priorLimit = mem0.FalarmThreshold if n < int64(0) { Xsqlite3_mutex_leave(tls, mem0.Fmutex) return priorLimit } if mem0.FhardLimit > int64(0) && (n > mem0.FhardLimit || n == int64(0)) { n = mem0.FhardLimit } mem0.FalarmThreshold = n nUsed = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(libc.Bool32(n > int64(0) && n <= nUsed)), 0) Xsqlite3_mutex_leave(tls, mem0.Fmutex) excess = Xsqlite3_memory_used(tls) - n if excess > int64(0) { Xsqlite3_release_memory(tls, int32(excess&int64(0x7fffffff))) } return priorLimit } func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28708:17: */ if n < 0 { n = 0 } Xsqlite3_soft_heap_limit64(tls, int64(n)) } // Set the hard heap-size limit for the library. An argument of zero // disables the hard heap limit. A negative argument is a no-op used // to obtain the return value without affecting the hard heap limit. // // The return value is the value of the hard heap limit just prior to // calling this interface. // // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28725:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return int64(-1) } Xsqlite3_mutex_enter(tls, mem0.Fmutex) priorLimit = mem0.FhardLimit if n >= int64(0) { mem0.FhardLimit = n if n < mem0.FalarmThreshold || mem0.FalarmThreshold == int64(0) { mem0.FalarmThreshold = n } } Xsqlite3_mutex_leave(tls, mem0.Fmutex) return priorLimit } // Initialize the memory allocation subsystem. func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28747:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) } mem0.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MEM) if Xsqlite3Config.FpPage == uintptr(0) || Xsqlite3Config.FszPage < 512 || Xsqlite3Config.FnPage <= 0 { Xsqlite3Config.FpPage = uintptr(0) Xsqlite3Config.FszPage = 0 } rc = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxInit})).f(tls, Xsqlite3Config.Fm.FpAppData) if rc != SQLITE_OK { libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0))) } return rc } // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28768:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+24, 0) } // Deinitialize the memory allocation subsystem. func Xsqlite3MallocEnd(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28775:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } libc.Xmemset(tls, uintptr(unsafe.Pointer(&mem0)), 0, uint64(unsafe.Sizeof(mem0))) } // Return the amount of memory currently checked out. func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28785:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var res Sqlite3_int64 at bp, 8 // var mx Sqlite3_int64 at bp+8, 8 Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, 0) return *(*Sqlite3_int64)(unsafe.Pointer(bp /* res */)) } // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28796:26: */ bp := tls.Alloc(16) defer tls.Free(16) // var res Sqlite3_int64 at bp, 8 // var mx Sqlite3_int64 at bp+8, 8 Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, resetFlag) return *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* mx */)) } // Trigger the alarm func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28805:13: */ if mem0.FalarmThreshold <= int64(0) { return } Xsqlite3_mutex_leave(tls, mem0.Fmutex) Xsqlite3_release_memory(tls, nByte) Xsqlite3_mutex_enter(tls, mem0.Fmutex) } // Do a memory allocation with statistics and alarms. Assume the // lock is already held. func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28816:13: */ var p uintptr var nFull int32 // In Firefox (circa 2017-02-08), xRoundup() is remapped to an internal // implementation of malloc_good_size(), which must be called in debug // mode and specifically when the DMD "Dark Matter Detector" is enabled // or else a crash results. Hence, do not attempt to optimize out the // following xRoundup() call. nFull = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, n) Xsqlite3StatusHighwater(tls, SQLITE_STATUS_MALLOC_SIZE, n) if mem0.FalarmThreshold > int64(0) { var nUsed Sqlite3_int64 = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) if nUsed >= mem0.FalarmThreshold-Sqlite3_int64(nFull) { libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(1), 0) sqlite3MallocAlarm(tls, nFull) if mem0.FhardLimit != 0 { nUsed = Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED) if nUsed >= mem0.FhardLimit-Sqlite3_int64(nFull) { *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) return } } } else { libc.AtomicStoreNInt32(uintptr(unsafe.Pointer(&mem0))+24, int32(0), 0) } } p = (*struct { f func(*libc.TLS, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull) if p == uintptr(0) && mem0.FalarmThreshold > int64(0) { sqlite3MallocAlarm(tls, nFull) p = (*struct { f func(*libc.TLS, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, nFull) } if p != 0 { nFull = Xsqlite3MallocSize(tls, p) Xsqlite3StatusUp(tls, SQLITE_STATUS_MEMORY_USED, nFull) Xsqlite3StatusUp(tls, SQLITE_STATUS_MALLOC_COUNT, 1) } *(*uintptr)(unsafe.Pointer(pp)) = p } // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28865:21: */ bp := tls.Alloc(8) defer tls.Free(8) // var p uintptr at bp, 8 if n == uint64(0) || n >= uint64(0x7fffff00) { // A memory allocation of a number of bytes which is near the maximum // signed integer value might cause an integer overflow inside of the // xMalloc(). Hence we limit the maximum size to 0x7fffff00, giving // 255 bytes of overhead. SQLite itself will never use anything near // this amount. The only way to reach the limit is with sqlite3_malloc() *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) mallocWithAlarm(tls, int32(n), bp) Xsqlite3_mutex_leave(tls, mem0.Fmutex) } else { *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*struct { f func(*libc.TLS, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxMalloc})).f(tls, int32(n)) } // IMP: R-11148-40995 return *(*uintptr)(unsafe.Pointer(bp /* p */)) } // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28890:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } if n <= 0 { return uintptr(0) } return Xsqlite3Malloc(tls, uint64(n)) } func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28896:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return Xsqlite3Malloc(tls, n) } // TRUE if p is a lookaside memory allocation from db func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28907:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28918:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28922:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28929:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { return LOOKASIDE_SMALL } if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } } } return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28958:27: */ if p != 0 { return uint64((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p)) } return uint64(0) } // Free memory previously obtained from sqlite3Malloc(). func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28967:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) Xsqlite3StatusDown(tls, SQLITE_STATUS_MEMORY_USED, Xsqlite3MallocSize(tls, p)) Xsqlite3StatusDown(tls, SQLITE_STATUS_MALLOC_COUNT, 1) (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p) Xsqlite3_mutex_leave(tls, mem0.Fmutex) } else { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxFree})).f(tls, p) } } // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28986:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:28995:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { measureAllocationSize(tls, db, p) return } if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { var pBuf uintptr = p (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = pBuf return } if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { var pBuf uintptr = p (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = pBuf return } } } Xsqlite3_free(tls, p) } func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29032:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) } } // Change the size of an existing memory allocation func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29040:21: */ var nOld int32 var nNew int32 var nDiff int32 var pNew uintptr if pOld == uintptr(0) { return Xsqlite3Malloc(tls, nBytes) // IMP: R-04300-56712 } if nBytes == uint64(0) { Xsqlite3_free(tls, pOld) // IMP: R-26507-47431 return uintptr(0) } if nBytes >= uint64(0x7fffff00) { // The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() return uintptr(0) } nOld = Xsqlite3MallocSize(tls, pOld) // IMPLEMENTATION-OF: R-46199-30249 SQLite guarantees that the second // argument to xRealloc is always a value returned by a prior call to // xRoundup. nNew = (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRoundup})).f(tls, int32(nBytes)) if nOld == nNew { pNew = pOld } else if Xsqlite3Config.FbMemstat != 0 { var nUsed Sqlite3_int64 Xsqlite3_mutex_enter(tls, mem0.Fmutex) Xsqlite3StatusHighwater(tls, SQLITE_STATUS_MALLOC_SIZE, int32(nBytes)) nDiff = nNew - nOld if nDiff > 0 && libc.AssignInt64(&nUsed, Xsqlite3StatusValue(tls, SQLITE_STATUS_MEMORY_USED)) >= mem0.FalarmThreshold-Sqlite3_int64(nDiff) { sqlite3MallocAlarm(tls, nDiff) if mem0.FhardLimit > int64(0) && nUsed >= mem0.FhardLimit-Sqlite3_int64(nDiff) { Xsqlite3_mutex_leave(tls, mem0.Fmutex) return uintptr(0) } } pNew = (*struct { f func(*libc.TLS, uintptr, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) if pNew == uintptr(0) && mem0.FalarmThreshold > int64(0) { sqlite3MallocAlarm(tls, int32(nBytes)) pNew = (*struct { f func(*libc.TLS, uintptr, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) } if pNew != 0 { nNew = Xsqlite3MallocSize(tls, pNew) Xsqlite3StatusUp(tls, SQLITE_STATUS_MEMORY_USED, nNew-nOld) } Xsqlite3_mutex_leave(tls, mem0.Fmutex) } else { pNew = (*struct { f func(*libc.TLS, uintptr, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxRealloc})).f(tls, pOld, nNew) } // IMP: R-11148-40995 return pNew } // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29099:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } if n < 0 { n = 0 } // IMP: R-26507-47431 return Xsqlite3Realloc(tls, pOld, uint64(n)) } func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29106:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return Xsqlite3Realloc(tls, pOld, n) } // Allocate and zero memory. func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29117:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, n) } return p } // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29129:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) if p != 0 { libc.Xmemset(tls, p, 0, n) } return p } // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29141:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) if !(p != 0) { Xsqlite3OomFault(tls, db) } return p } // Allocate memory, either lookaside (if possible) or heap. // If the allocation fails, set the mallocFailed flag in // the connection pointer. // // If db!=0 and db->mallocFailed is true (indicating a prior malloc // failure on the same database connection) then always return 0. // Hence for a particular database connection, once malloc starts // failing, it fails consistently until mallocFailed is reset. // This is an important assumption. There are many places in the // code that do things like this: // // int *a = (int*)sqlite3DbMallocRaw(db, 100); // int *b = (int*)sqlite3DbMallocRaw(db, 200); // if( b ) a[10] = 9; // // In other words, if a subsequent malloc (ex: "b") worked, it is assumed // that all prior mallocs (ex: "a") worked too. // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29173:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) } p = Xsqlite3Malloc(tls, n) return p } func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29180:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable) != 0) { *(*U32)(unsafe.Pointer(db + 440 + 16 + 1*4))++ } else if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return uintptr(0) } return dbMallocRawFinish(tls, db, n) } if n <= uint64(LOOKASIDE_SMALL) { if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree) != uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallFree = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext *(*U32)(unsafe.Pointer(db + 440 + 16))++ return pBuf } else if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) != uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext *(*U32)(unsafe.Pointer(db + 440 + 16))++ return pBuf } } if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) != uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext *(*U32)(unsafe.Pointer(db + 440 + 16))++ return pBuf } else if libc.AssignUintptr(&pBuf, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) != uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit = (*LookasideSlot)(unsafe.Pointer(pBuf)).FpNext *(*U32)(unsafe.Pointer(db + 440 + 16))++ return pBuf } else { *(*U32)(unsafe.Pointer(db + 440 + 16 + 2*4))++ } return dbMallocRawFinish(tls, db, n) } // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29236:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) } if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle) { if n <= uint64(LOOKASIDE_SMALL) { return p } } else if Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) { if n <= U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) { return p } } } return dbReallocFinish(tls, db, p, n) } func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29252:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { if isLookaside(tls, db, p) != 0 { pNew = Xsqlite3DbMallocRawNN(tls, db, n) if pNew != 0 { libc.Xmemcpy(tls, pNew, p, uint64(lookasideMallocSize(tls, db, p))) Xsqlite3DbFree(tls, db, p) } } else { pNew = Xsqlite3Realloc(tls, p, n) if !(pNew != 0) { Xsqlite3OomFault(tls, db) } } } return pNew } // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29282:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { Xsqlite3DbFree(tls, db, p) } return pNew } // Make a copy of a string in memory obtained from sqliteMalloc(). These // functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29298:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { return uintptr(0) } n = libc.Xstrlen(tls, z) + uint64(1) zNew = Xsqlite3DbMallocRaw(tls, db, n) if zNew != 0 { libc.Xmemcpy(tls, zNew, z, n) } return zNew } func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29311:21: */ var zNew uintptr if z != 0 { zNew = Xsqlite3DbMallocRawNN(tls, db, n+uint64(1)) } else { zNew = uintptr(0) } if zNew != 0 { libc.Xmemcpy(tls, zNew, z, n) *(*int8)(unsafe.Pointer(zNew + uintptr(n))) = int8(0) } return zNew } // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29329:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ } n = int32((int64(zEnd) - int64(zStart)) / 1) for n > 0 && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart + uintptr(n-1))))])&0x01 != 0 { n-- } return Xsqlite3DbStrNDup(tls, db, zStart, uint64(n)) } // Free any prior content in *pz and replace it with a copy of zNew. func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29340:21: */ var z uintptr = Xsqlite3DbStrDup(tls, db, zNew) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = z } // Call this routine to record the fact that an OOM (out-of-memory) error // has happened. This routine will set db->mallocFailed, and also // temporarily disable the lookaside memory allocator and interrupt // any running VDBEs. // // Always return a NULL pointer so that this routine can be invoked using // // return sqlite3OomFault(db); // // and thereby avoid unnecessary stack frame allocations for the overwhelmingly // common case where no OOM occurs. func Xsqlite3OomFault(tls *libc.TLS, db uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29359:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { libc.AtomicStoreNInt32(db+432, int32(1), 0) } (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) if (*Sqlite3)(unsafe.Pointer(db)).FpParse != 0 { Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM } } return uintptr(0) } // This routine reactivates the memory allocator and clears the // db->mallocFailed flag as necessary. // // The memory allocator is not restarted if there are running // VDBEs. func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29381:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+432, int32(0), 0) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { return uint16(0) } return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue }() } } // Take actions at the end of an API call to deal with error codes. func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29393:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) return SQLITE_NOMEM } return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } // This function must be called before exiting any API function (i.e. // returning control to the user) that has called sqlite3_malloc or // sqlite3_realloc. // // The returned value is normally a copy of the second argument to this // function. However, if a malloc() failure has occurred since the previous // invocation SQLITE_NOMEM is returned instead. // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29414:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc != 0 { return apiHandleError(tls, db, rc) } return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } //************* End of malloc.c ********************************************* //************* Begin file printf.c ***************************************** // The "printf" code that follows dates from the 1980's. It is in // the public domain. // // // // This file contains code for a set of "printf"-like routines. These // routines format strings much like the printf() from the standard C // library, though the implementation here has enhancements to support // SQLite. // #include "sqliteInt.h" // Conversion types fall into various categories as defined by the // following enumeration. // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. type EtByte = uint8 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29472:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure type et_info = struct { Ffmttype int8 Fbase EtByte Fflags EtByte Ftype EtByte Fcharset EtByte Fprefix EtByte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29478:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure type Et_info = et_info /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29485:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1474)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29498:19 */ var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1507)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29499:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, {Ffmttype: int8('g'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(30)}, {Ffmttype: int8('z'), Fflags: EtByte(4), Ftype: EtByte(EtDYNSTRING)}, {Ffmttype: int8('q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE)}, {Ffmttype: int8('Q'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE2)}, {Ffmttype: int8('w'), Fflags: EtByte(4), Ftype: EtByte(EtSQLESCAPE3)}, {Ffmttype: int8('c'), Ftype: EtByte(EtCHARX)}, {Ffmttype: int8('o'), Fbase: EtByte(8), Fprefix: EtByte(2)}, {Ffmttype: int8('u'), Fbase: EtByte(10), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('x'), Fbase: EtByte(16), Fcharset: EtByte(16), Fprefix: EtByte(1)}, {Ffmttype: int8('X'), Fbase: EtByte(16), Fprefix: EtByte(4)}, {Ffmttype: int8('f'), Fflags: EtByte(1), Ftype: EtByte(EtFLOAT)}, {Ffmttype: int8('e'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(30)}, {Ffmttype: int8('E'), Fflags: EtByte(1), Ftype: EtByte(EtEXP), Fcharset: EtByte(14)}, {Ffmttype: int8('G'), Fflags: EtByte(1), Ftype: EtByte(EtGENERIC), Fcharset: EtByte(14)}, {Ffmttype: int8('i'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('n'), Ftype: EtByte(EtSIZE)}, {Ffmttype: int8('%'), Ftype: EtByte(EtPERCENT)}, {Ffmttype: int8('p'), Fbase: EtByte(16), Ftype: EtByte(EtPOINTER), Fprefix: EtByte(1)}, // All the rest are undocumented and are for internal use only {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29500:22 */ // Notes: // // %S Takes a pointer to SrcItem. Shows name or database.name // %!S Like %S but prefer the zName over the zAlias // Floating point constants used for rounding var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29537:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. // "*val" is a double such that 0.1 <= *val < 10.0 // Return the ascii code for the leading digit of *val, then // multiply "*val" by 10.0 to renormalize. // // Example: // input: *val = 3.14159 // output: *val = 1.4159 function return = '3' // // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29560:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { return int8('0') } *(*int32)(unsafe.Pointer(cnt))-- digit = int32(*(*float64)(unsafe.Pointer(val))) d = float64(digit) digit = digit + '0' *(*float64)(unsafe.Pointer(val)) = (*(*float64)(unsafe.Pointer(val)) - d) * 10.0 return int8(digit) } // Set the StrAccum object to an error mode. func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29576:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { Xsqlite3_str_reset(tls, p) } if int32(eError) == SQLITE_TOOBIG { Xsqlite3ErrorToParser(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, int32(eError)) } } // Extra argument values from a PrintfArguments object func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29586:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29590:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29594:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } return Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*8))) } // Allocate memory for a temporary buffer needed for printf rendering. // // If the requested size of the temp buffer is larger than the size // of the output buffer in pAccum, then cause an SQLITE_TOOBIG error. // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29608:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) } if n > Sqlite3_int64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnAlloc) && n > Sqlite3_int64((*Sqlite3_str)(unsafe.Pointer(pAccum)).FmxAlloc) { Xsqlite3StrAccumSetError(tls, pAccum, uint8(SQLITE_TOOBIG)) return uintptr(0) } z = Xsqlite3DbMallocRaw(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, uint64(n)) if z == uintptr(0) { Xsqlite3StrAccumSetError(tls, pAccum, uint8(SQLITE_NOMEM)) } return z } // On machines with a small stack size, you can redefine the // SQLITE_PRINT_BUF_SIZE to be something smaller, if desired. // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29641:17: */ bp := tls.Alloc(108) defer tls.Free(108) var c int32 // Next character in the format string var bufpt uintptr // Pointer to the conversion buffer var precision int32 // Precision of the current field var length int32 // Length of the field var idx int32 // A general purpose loop counter var width int32 // Width of the current field var flag_leftjustify EtByte // True if "-" flag is present var flag_prefix EtByte // '+' or ' ' or 0 for prefix var flag_alternateform EtByte // True if "#" flag is present var flag_altform2 EtByte // True if "!" flag is present var flag_zeropad EtByte // True if field width constant starts with zero var flag_long EtByte // 1 for the "l" flag, 2 for "ll", 0 by default var done EtByte // Loop termination flag var cThousand EtByte // Thousands separator for %d and %u var xtype EtByte // Conversion paradigm var bArgList U8 // True for SQLITE_PRINTF_SQLFUNC var prefix int8 // Prefix character. "+" or "-" or " " or '\0'. var longvalue Sqlite_uint64 // Value for integer types // var realvalue float64 at bp+96, 8 // Value for real types var infop uintptr // Pointer to the appropriate info structure var zOut uintptr // Rendering buffer var nOut int32 // Size of the rendering buffer var zExtra uintptr // Malloced memory used by some conversion var exp int32 var e2 int32 // exponent of real numbers // var nsd int32 at bp+104, 4 // Number of significant digits returned var rounder float64 // Used for rounding floating point values var flag_dp EtByte // True if decimal point should be shown var flag_rtz EtByte // True if trailing zeros should be removed var pArgList uintptr // Arguments for SQLITE_PRINTF_SQLFUNC // var buf [70]int8 at bp+8, 70 var wx uint32 var px uint32 var v I64 var n U64 var x int32 var cset uintptr var base U8 var nn int32 // Number of "," to insert var ix int32 // Add "0" or "0x" var pre uintptr var x1 int8 // var rx float64 at bp+88, 8 // var u Sqlite3_uint64 at bp+80, 8 var ex int32 var scale float64 var szBufNeeded I64 var i int32 var nPad int32 var ch uint32 // Set length to the number of bytes needed in order to display // precision characters var z uintptr // Adjust width to account for extra bytes in UTF-8 characters var ii int32 // %w: Escape " characters var i1 int32 var j int32 var k int32 var n1 int32 var isnull int32 var needQuote int32 var ch1 int8 var q int8 // Quote character var escarg uintptr // %#T means an Expr pointer that uses Expr.u.zToken var pExpr uintptr // %T means a Token pointer var pToken uintptr var pItem uintptr xtype = EtByte(EtINVALID) zExtra = uintptr(0) pArgList = uintptr(0) // Conversion buffer // pAccum never starts out with an empty buffer that was obtained from // malloc(). This precondition is required by the mprintf("%z...") // optimization. bufpt = uintptr(0) if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_SQLFUNC != 0) { goto __1 } pArgList = libc.VaUintptr(&ap) bArgList = U8(1) goto __2 __1: bArgList = U8(0) __2: ; __3: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(fmt)))) != 0) { goto __5 } if !(c != '%') { goto __6 } bufpt = fmt __7: fmt++ goto __8 __8: if *(*int8)(unsafe.Pointer(fmt)) != 0 && int32(*(*int8)(unsafe.Pointer(fmt))) != '%' { goto __7 } goto __9 __9: ; Xsqlite3_str_append(tls, pAccum, bufpt, int32((int64(fmt)-int64(bufpt))/1)) if !(int32(*(*int8)(unsafe.Pointer(fmt))) == 0) { goto __10 } goto __5 __10: ; __6: ; if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } Xsqlite3_str_append(tls, pAccum, ts+1514, 1) goto __5 __11: ; // Find out what flags are present flag_leftjustify = libc.AssignUint8(&flag_prefix, libc.AssignUint8(&cThousand, libc.AssignUint8(&flag_alternateform, libc.AssignUint8(&flag_altform2, libc.AssignUint8(&flag_zeropad, EtByte(0)))))) done = EtByte(0) width = 0 flag_long = EtByte(0) precision = -1 __12: switch c { case '-': goto __16 case '+': goto __17 case ' ': goto __18 case '#': goto __19 case '!': goto __20 case '0': goto __21 case ',': goto __22 default: goto __23 case 'l': goto __24 case '1': goto __25 case '2': goto __26 case '3': goto __27 case '4': goto __28 case '5': goto __29 case '6': goto __30 case '7': goto __31 case '8': goto __32 case '9': goto __33 case '*': goto __34 case '.': goto __35 } goto __15 __16: flag_leftjustify = EtByte(1) goto __15 __17: flag_prefix = EtByte('+') goto __15 __18: flag_prefix = EtByte(' ') goto __15 __19: flag_alternateform = EtByte(1) goto __15 __20: flag_altform2 = EtByte(1) goto __15 __21: flag_zeropad = EtByte(1) goto __15 __22: cThousand = EtByte(',') goto __15 __23: done = EtByte(1) goto __15 __24: flag_long = EtByte(1) c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) if !(c == 'l') { goto __36 } c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) flag_long = EtByte(2) __36: ; done = EtByte(1) goto __15 __25: __26: __27: __28: __29: __30: __31: __32: __33: wx = uint32(c - '0') __37: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) >= '0' && c <= '9') { goto __38 } wx = wx*uint32(10) + uint32(c) - uint32('0') goto __37 __38: ; width = int32(wx & uint32(0x7fffffff)) if !(c != '.' && c != 'l') { goto __39 } done = EtByte(1) goto __40 __39: fmt-- __40: ; goto __15 __34: if !(bArgList != 0) { goto __41 } width = int32(getIntArg(tls, pArgList)) goto __42 __41: width = int32(libc.VaInt32(&ap)) __42: ; if !(width < 0) { goto __43 } flag_leftjustify = EtByte(1) if width >= -2147483647 { width = -width } else { width = 0 } __43: ; if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(fmt + 1)))) != '.' && c != 'l') { goto __44 } c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) done = EtByte(1) __44: ; goto __15 __35: c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) if !(c == '*') { goto __45 } if !(bArgList != 0) { goto __47 } precision = int32(getIntArg(tls, pArgList)) goto __48 __47: precision = int32(libc.VaInt32(&ap)) __48: ; if !(precision < 0) { goto __49 } if precision >= -2147483647 { precision = -precision } else { precision = -1 } __49: ; c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) goto __46 __45: px = uint32(0) __50: if !(c >= '0' && c <= '9') { goto __51 } px = px*uint32(10) + uint32(c) - uint32('0') c = int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1)))) goto __50 __51: ; precision = int32(px & uint32(0x7fffffff)) __46: ; if !(c == 'l') { goto __52 } fmt-- goto __53 __52: done = EtByte(1) __53: ; goto __15 __15: ; goto __13 __13: if !(done != 0) && libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) != 0 { goto __12 } goto __14 __14: ; // Fetch the info entry for the field infop = uintptr(unsafe.Pointer(&fmtinfo)) xtype = EtByte(EtINVALID) idx = 0 __54: if !(idx < int32(uint64(unsafe.Sizeof(fmtinfo))/uint64(unsafe.Sizeof(Et_info{})))) { goto __56 } if !(c == int32(fmtinfo[idx].Ffmttype)) { goto __57 } infop = uintptr(unsafe.Pointer(&fmtinfo)) + uintptr(idx)*6 xtype = (*Et_info)(unsafe.Pointer(infop)).Ftype goto __56 __57: ; goto __55 __55: idx++ goto __54 goto __56 __56: ; // At this point, variables are initialized as follows: // // flag_alternateform TRUE if a '#' is present. // flag_altform2 TRUE if a '!' is present. // flag_prefix '+' or ' ' or zero // flag_leftjustify TRUE if a '-' is present or if the // field width was negative. // flag_zeropad TRUE if the width began with 0. // flag_long 1 for "l", 2 for "ll" // width The specified field width. This is // always non-negative. Zero is the default. // precision The specified precision. The default // is -1. // xtype The class of the conversion. // infop Pointer to the appropriate info struct. switch int32(xtype) { case EtPOINTER: goto __59 case EtORDINAL: goto __60 case EtRADIX: goto __61 case EtDECIMAL: goto __62 case EtFLOAT: goto __63 case EtEXP: goto __64 case EtGENERIC: goto __65 case EtSIZE: goto __66 case EtPERCENT: goto __67 case EtCHARX: goto __68 case EtSTRING: goto __69 case EtDYNSTRING: goto __70 case EtSQLESCAPE: goto __71 // %q: Escape ' characters case EtSQLESCAPE2: goto __72 // %Q: Escape ' and enclose in '...' case EtSQLESCAPE3: goto __73 case EtTOKEN: goto __74 case EtSRCITEM: goto __75 default: goto __76 } goto __58 __59: if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(I64(0))) { flag_long = uint8(2) } else { if uint64(unsafe.Sizeof(uintptr(0))) == uint64(unsafe.Sizeof(int32(0))) { flag_long = uint8(1) } else { flag_long = uint8(0) } } __60: __61: cThousand = EtByte(0) __62: if !(int32((*Et_info)(unsafe.Pointer(infop)).Fflags)&FLAG_SIGNED != 0) { goto __77 } if !(bArgList != 0) { goto __79 } v = getIntArg(tls, pArgList) goto __80 __79: if !(flag_long != 0) { goto __81 } if !(int32(flag_long) == 2) { goto __83 } v = I64(libc.VaInt64(&ap)) goto __84 __83: v = I64(libc.VaInt32(&ap)) __84: ; goto __82 __81: v = I64(libc.VaInt32(&ap)) __82: ; __80: ; if !(v < int64(0)) { goto __85 } longvalue = Sqlite_uint64(^v) longvalue++ prefix = int8('-') goto __86 __85: longvalue = Sqlite_uint64(v) prefix = int8(flag_prefix) __86: ; goto __78 __77: if !(bArgList != 0) { goto __87 } longvalue = U64(getIntArg(tls, pArgList)) goto __88 __87: if !(flag_long != 0) { goto __89 } if !(int32(flag_long) == 2) { goto __91 } longvalue = Sqlite_uint64(libc.VaUint64(&ap)) goto __92 __91: longvalue = Sqlite_uint64(libc.VaUint32(&ap)) __92: ; goto __90 __89: longvalue = Sqlite_uint64(libc.VaUint32(&ap)) __90: ; __88: ; prefix = int8(0) __78: ; if !(longvalue == uint64(0)) { goto __93 } flag_alternateform = EtByte(0) __93: ; if !(flag_zeropad != 0 && precision < width-libc.Bool32(int32(prefix) != 0)) { goto __94 } precision = width - libc.Bool32(int32(prefix) != 0) __94: ; if !(precision < SQLITE_PRINT_BUF_SIZE-10-SQLITE_PRINT_BUF_SIZE/3) { goto __95 } nOut = SQLITE_PRINT_BUF_SIZE zOut = bp + 8 /* &buf[0] */ goto __96 __95: n = U64(precision) + uint64(10) if !(cThousand != 0) { goto __97 } n = n + U64(precision/3) __97: ; zOut = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, int64(n))) if !(zOut == uintptr(0)) { goto __98 } return __98: ; nOut = int32(n) __96: ; bufpt = zOut + uintptr(nOut-1) if !(int32(xtype) == EtORDINAL) { goto __99 } x = int32(longvalue % uint64(10)) if !(x >= 4 || longvalue/uint64(10)%uint64(10) == uint64(1)) { goto __100 } x = 0 __100: ; *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[x*2+1] *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = zOrd[x*2] __99: ; cset = uintptr(unsafe.Pointer(&aDigits)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fcharset) base = (*Et_info)(unsafe.Pointer(infop)).Fbase __101: // Convert to ascii *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = *(*int8)(unsafe.Pointer(cset + uintptr(longvalue%Sqlite_uint64(base)))) longvalue = longvalue / Sqlite_uint64(base) goto __102 __102: if longvalue > uint64(0) { goto __101 } goto __103 __103: ; length = int32((int64(zOut+uintptr(nOut-1)) - int64(bufpt)) / 1) __104: if !(precision > length) { goto __105 } *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8('0') // Zero pad length++ goto __104 __105: ; if !(cThousand != 0) { goto __106 } nn = (length - 1) / 3 // Number of "," to insert ix = (length-1)%3 + 1 bufpt -= uintptr(nn) idx = 0 __107: if !(nn > 0) { goto __109 } *(*int8)(unsafe.Pointer(bufpt + uintptr(idx))) = *(*int8)(unsafe.Pointer(bufpt + uintptr(idx+nn))) ix-- if !(ix == 0) { goto __110 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PreIncInt32(&idx, 1)))) = int8(cThousand) nn-- ix = 3 __110: ; goto __108 __108: idx++ goto __107 goto __109 __109: ; __106: ; if !(prefix != 0) { goto __111 } *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = prefix __111: ; // Add sign if !(flag_alternateform != 0 && (*Et_info)(unsafe.Pointer(infop)).Fprefix != 0) { goto __112 } pre = uintptr(unsafe.Pointer(&aPrefix)) + uintptr((*Et_info)(unsafe.Pointer(infop)).Fprefix) __113: if !(int32(libc.AssignInt8(&x1, *(*int8)(unsafe.Pointer(pre)))) != 0) { goto __115 } *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = x1 goto __114 __114: pre++ goto __113 goto __115 __115: ; __112: ; length = int32((int64(zOut+uintptr(nOut-1)) - int64(bufpt)) / 1) goto __58 __63: __64: __65: if !(bArgList != 0) { goto __116 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = getDoubleArg(tls, pArgList) goto __117 __116: *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = float64(libc.VaFloat64(&ap)) __117: ; if !(precision < 0) { goto __118 } precision = 6 __118: ; // Set default precision if !(precision > SQLITE_FP_PRECISION_LIMIT) { goto __119 } precision = SQLITE_FP_PRECISION_LIMIT __119: ; if !(*(*float64)(unsafe.Pointer(bp + 96)) < 0.0) { goto __120 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) prefix = int8('-') goto __121 __120: prefix = int8(flag_prefix) __121: ; if !(int32(xtype) == EtGENERIC && precision > 0) { goto __122 } precision-- __122: ; idx = precision & 0xfff rounder = arRound[idx%10] __123: if !(idx >= 10) { goto __124 } rounder = rounder * 1.0e-10 idx = idx - 10 goto __123 __124: ; if !(int32(xtype) == EtFLOAT) { goto __125 } *(*float64)(unsafe.Pointer(bp + 88 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) libc.Xmemcpy(tls, bp+80, bp+88, uint64(unsafe.Sizeof(Sqlite3_uint64(0)))) ex = -1023 + int32(*(*Sqlite3_uint64)(unsafe.Pointer(bp + 80))>>52&uint64(0x7ff)) if !(precision+ex/3 < 15) { goto __126 } rounder = rounder + *(*float64)(unsafe.Pointer(bp + 96))*3e-16 __126: ; *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder __125: ; // Normalize realvalue to within 10.0 > realvalue >= 1.0 exp = 0 if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 96))) != 0) { goto __127 } bufpt = ts + 1516 /* "NaN" */ length = 3 goto __58 __127: ; if !(*(*float64)(unsafe.Pointer(bp + 96)) > 0.0) { goto __128 } scale = 1.0 __129: if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 1e100*scale && exp <= 350) { goto __130 } scale = scale * 1e100 exp = exp + 100 goto __129 __130: ; __131: if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 1e10*scale && exp <= 350) { goto __132 } scale = scale * 1e10 exp = exp + 10 goto __131 __132: ; __133: if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 10.0*scale && exp <= 350) { goto __134 } scale = scale * 10.0 exp++ goto __133 __134: ; *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) /= scale __135: if !(*(*float64)(unsafe.Pointer(bp + 96)) < 1e-8) { goto __136 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 1e8 exp = exp - 8 goto __135 __136: ; __137: if !(*(*float64)(unsafe.Pointer(bp + 96)) < 1.0) { goto __138 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 10.0 exp-- goto __137 __138: ; if !(exp > 350) { goto __139 } bufpt = bp + 8 /* &buf[0] */ *(*int8)(unsafe.Pointer(bp + 8)) = prefix libc.Xmemcpy(tls, bp+8+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1520, uint64(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: ; __128: ; bufpt = bp + 8 /* &buf[0] */ // If the field type is etGENERIC, then convert to either etEXP // or etFLOAT, as appropriate. if !(int32(xtype) != EtFLOAT) { goto __140 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder if !(*(*float64)(unsafe.Pointer(bp + 96)) >= 10.0) { goto __141 } *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 0.1 exp++ __141: ; __140: ; if !(int32(xtype) == EtGENERIC) { goto __142 } flag_rtz = libc.BoolUint8(!(flag_alternateform != 0)) if !(exp < -4 || exp > precision) { goto __144 } xtype = EtByte(EtEXP) goto __145 __144: precision = precision - exp xtype = EtByte(EtFLOAT) __145: ; goto __143 __142: flag_rtz = flag_altform2 __143: ; if !(int32(xtype) == EtEXP) { goto __146 } e2 = 0 goto __147 __146: e2 = exp __147: ; // Size of a temporary buffer needed szBufNeeded = func() int64 { if e2 > 0 { return int64(e2) } return int64(0) }() + I64(precision) + I64(width) + int64(15) if !(szBufNeeded > int64(SQLITE_PRINT_BUF_SIZE)) { goto __148 } bufpt = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, szBufNeeded)) if !(bufpt == uintptr(0)) { goto __149 } return __149: ; __148: ; zOut = bufpt *(*int32)(unsafe.Pointer(bp + 104 /* nsd */)) = 16 + int32(flag_altform2)*10 flag_dp = EtByte(func() int32 { if precision > 0 { return 1 } return 0 }() | int32(flag_alternateform) | int32(flag_altform2)) // The sign in front of the number if !(prefix != 0) { goto __150 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = prefix __150: ; // Digits prior to the decimal point if !(e2 < 0) { goto __151 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0') goto __152 __151: ; __153: if !(e2 >= 0) { goto __155 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) goto __154 __154: e2-- goto __153 goto __155 __155: ; __152: ; // The decimal point if !(flag_dp != 0) { goto __156 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('.') __156: ; // "0" digits after the decimal point but before the first // significant digit of the number e2++ __157: if !(e2 < 0) { goto __159 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0') goto __158 __158: precision-- e2++ goto __157 goto __159 __159: ; // Significant digits after the decimal point __160: if !(libc.PostDecInt32(&precision, 1) > 0) { goto __161 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) goto __160 __161: ; // Remove trailing zeros and the "." if no digits follow the "." if !(flag_rtz != 0 && flag_dp != 0) { goto __162 } __163: if !(int32(*(*int8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '0') { goto __164 } *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8(0) goto __163 __164: ; if !(int32(*(*int8)(unsafe.Pointer(bufpt + libc.UintptrFromInt32(-1)))) == '.') { goto __165 } if !(flag_altform2 != 0) { goto __166 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('0') goto __167 __166: *(*int8)(unsafe.Pointer(libc.PreDecUintptr(&bufpt, 1))) = int8(0) __167: ; __165: ; __162: ; // Add the "eNNN" suffix if !(int32(xtype) == EtEXP) { goto __168 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = aDigits[(*Et_info)(unsafe.Pointer(infop)).Fcharset] if !(exp < 0) { goto __169 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('-') exp = -exp goto __170 __169: *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8('+') __170: ; if !(exp >= 100) { goto __171 } *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8(exp/100 + '0') // 100's digit exp = exp % 100 __171: ; *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8(exp/10 + '0') // 10's digit *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = int8(exp%10 + '0') // 1's digit __168: ; *(*int8)(unsafe.Pointer(bufpt)) = int8(0) // The converted number is in buf[] and zero terminated. Output it. // Note that the number is in the usual order, not reversed as with // integer conversions. length = int32((int64(bufpt) - int64(zOut)) / 1) bufpt = zOut // Special case: Add leading zeros if the flag_zeropad flag is // set and we are not left justified if !(flag_zeropad != 0 && !(flag_leftjustify != 0) && length < width) { goto __172 } nPad = width - length i = width __173: if !(i >= nPad) { goto __175 } *(*int8)(unsafe.Pointer(bufpt + uintptr(i))) = *(*int8)(unsafe.Pointer(bufpt + uintptr(i-nPad))) goto __174 __174: i-- goto __173 goto __175 __175: ; i = libc.Bool32(int32(prefix) != 0) __176: if !(libc.PostDecInt32(&nPad, 1) != 0) { goto __177 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&i, 1)))) = int8('0') goto __176 __177: ; length = width __172: ; goto __58 __66: if !!(bArgList != 0) { goto __178 } *(*int32)(unsafe.Pointer(libc.VaUintptr(&ap))) = int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar) __178: ; length = libc.AssignInt32(&width, 0) goto __58 __67: *(*int8)(unsafe.Pointer(bp + 8)) = int8('%') bufpt = bp + 8 /* &buf[0] */ length = 1 goto __58 __68: if !(bArgList != 0) { goto __179 } bufpt = getTextArg(tls, pArgList) length = 1 if !(bufpt != 0) { goto __181 } *(*int8)(unsafe.Pointer(bp + 8)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) if !(c&0xc0 == 0xc0) { goto __183 } __184: if !(length < 4 && int32(*(*int8)(unsafe.Pointer(bufpt)))&0xc0 == 0x80) { goto __185 } *(*int8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) goto __184 __185: ; __183: ; goto __182 __181: *(*int8)(unsafe.Pointer(bp + 8)) = int8(0) __182: ; goto __180 __179: ch = uint32(libc.VaUint32(&ap)) if !(ch < uint32(0x00080)) { goto __186 } *(*int8)(unsafe.Pointer(bp + 8)) = int8(ch & uint32(0xff)) length = 1 goto __187 __186: if !(ch < uint32(0x00800)) { goto __188 } *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xc0 + int32(U8(ch>>6&uint32(0x1f)))) *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 2 goto __189 __188: if !(ch < uint32(0x10000)) { goto __190 } *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xe0 + int32(U8(ch>>12&uint32(0x0f)))) *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) *(*int8)(unsafe.Pointer(bp + 8 + 2)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 3 goto __191 __190: *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xf0 + int32(U8(ch>>18&uint32(0x07)))) *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch>>12&uint32(0x3f)))) *(*int8)(unsafe.Pointer(bp + 8 + 2)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) *(*int8)(unsafe.Pointer(bp + 8 + 3)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 4 __191: ; __189: ; __187: ; __180: ; if !(precision > 1) { goto __192 } width = width - (precision - 1) if !(width > 1 && !(flag_leftjustify != 0)) { goto __193 } Xsqlite3_str_appendchar(tls, pAccum, width-1, int8(' ')) width = 0 __193: ; __194: if !(libc.PostDecInt32(&precision, 1) > 1) { goto __195 } Xsqlite3_str_append(tls, pAccum, bp+8, length) goto __194 __195: ; __192: ; bufpt = bp + 8 /* &buf[0] */ flag_altform2 = EtByte(1) goto adjust_width_for_utf8 __69: __70: if !(bArgList != 0) { goto __196 } bufpt = getTextArg(tls, pArgList) xtype = EtByte(EtSTRING) goto __197 __196: bufpt = libc.VaUintptr(&ap) __197: ; if !(bufpt == uintptr(0)) { goto __198 } bufpt = ts + 1524 /* "" */ goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { goto __200 } if !((*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar == U32(0) && (*Sqlite3_str)(unsafe.Pointer(pAccum)).FmxAlloc != 0 && width == 0 && precision < 0 && int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError) == 0) { goto __201 } // Special optimization for sqlite3_mprintf("%z..."): // Extend an existing memory allocation rather than creating // a new one. (*Sqlite3_str)(unsafe.Pointer(pAccum)).FzText = bufpt (*Sqlite3_str)(unsafe.Pointer(pAccum)).FnAlloc = U32(Xsqlite3DbMallocSize(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, bufpt)) (*Sqlite3_str)(unsafe.Pointer(pAccum)).FnChar = U32(0x7fffffff & int32(libc.Xstrlen(tls, bufpt))) *(*U8)(unsafe.Pointer(pAccum + 29)) |= U8(SQLITE_PRINTF_MALLOCED) length = 0 goto __58 __201: ; zExtra = bufpt __200: ; __199: ; if !(precision >= 0) { goto __202 } if !(flag_altform2 != 0) { goto __204 } // Set length to the number of bytes needed in order to display // precision characters z = bufpt __206: if !(libc.PostDecInt32(&precision, 1) > 0 && *(*uint8)(unsafe.Pointer(z)) != 0) { goto __207 } if !(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0) { goto __208 } __209: if !(int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80) { goto __210 } z++ goto __209 __210: ; __208: ; goto __206 __207: ; length = int32((int64(z) - int64(bufpt)) / 1) goto __205 __204: length = 0 __211: if !(length < precision && *(*int8)(unsafe.Pointer(bufpt + uintptr(length))) != 0) { goto __213 } goto __212 __212: length++ goto __211 goto __213 __213: ; __205: ; goto __203 __202: length = 0x7fffffff & int32(libc.Xstrlen(tls, bufpt)) __203: ; adjust_width_for_utf8: if !(flag_altform2 != 0 && width > 0) { goto __214 } // Adjust width to account for extra bytes in UTF-8 characters ii = length - 1 __215: if !(ii >= 0) { goto __216 } if !(int32(*(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostDecInt32(&ii, 1)))))&0xc0 == 0x80) { goto __217 } width++ __217: ; goto __215 __216: ; __214: ; goto __58 __71: // %q: Escape ' characters __72: // %Q: Escape ' and enclose in '...' __73: q = func() int8 { if int32(xtype) == EtSQLESCAPE3 { return int8('"') } return int8('\'') }() if !(bArgList != 0) { goto __218 } escarg = getTextArg(tls, pArgList) goto __219 __218: escarg = libc.VaUintptr(&ap) __219: ; isnull = libc.Bool32(escarg == uintptr(0)) if !(isnull != 0) { goto __220 } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { return ts + 1525 } return ts + 1530 }() __220: ; // For %q, %Q, and %w, the precision is the number of bytes (or // characters if the ! flags is present) to use from the input. // Because of the extra quoting characters inserted, the number // of output characters may be larger than the precision. k = precision i1 = libc.AssignInt32(&n1, 0) __221: if !(k != 0 && int32(libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1))))) != 0) { goto __223 } if !(int32(ch1) == int32(q)) { goto __224 } n1++ __224: ; if !(flag_altform2 != 0 && int32(ch1)&0xc0 == 0xc0) { goto __225 } __226: if !(int32(*(*int8)(unsafe.Pointer(escarg + uintptr(i1+1))))&0xc0 == 0x80) { goto __227 } i1++ goto __226 __227: ; __225: ; goto __222 __222: i1++ k-- goto __221 goto __223 __223: ; needQuote = libc.Bool32(!(isnull != 0) && int32(xtype) == EtSQLESCAPE2) n1 = n1 + (i1 + 3) if !(n1 > SQLITE_PRINT_BUF_SIZE) { goto __228 } bufpt = libc.AssignUintptr(&zExtra, printfTempBuf(tls, pAccum, int64(n1))) if !(bufpt == uintptr(0)) { goto __230 } return __230: ; goto __229 __228: bufpt = bp + 8 /* &buf[0] */ __229: ; j = 0 if !(needQuote != 0) { goto __231 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q __231: ; k = i1 i1 = 0 __232: if !(i1 < k) { goto __234 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = libc.AssignInt8(&ch1, *(*int8)(unsafe.Pointer(escarg + uintptr(i1)))) if !(int32(ch1) == int32(q)) { goto __235 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = ch1 __235: ; goto __233 __233: i1++ goto __232 goto __234 __234: ; if !(needQuote != 0) { goto __236 } *(*int8)(unsafe.Pointer(bufpt + uintptr(libc.PostIncInt32(&j, 1)))) = q __236: ; *(*int8)(unsafe.Pointer(bufpt + uintptr(j))) = int8(0) length = j goto adjust_width_for_utf8 __74: if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { goto __237 } return __237: ; if !(flag_alternateform != 0) { goto __238 } // %#T means an Expr pointer that uses Expr.u.zToken pExpr = libc.VaUintptr(&ap) if !(pExpr != 0 && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0))) { goto __240 } Xsqlite3_str_appendall(tls, pAccum, *(*uintptr)(unsafe.Pointer(pExpr + 8))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, pExpr) __240: ; goto __239 __238: // %T means a Token pointer pToken = libc.VaUintptr(&ap) if !(pToken != 0 && (*Token)(unsafe.Pointer(pToken)).Fn != 0) { goto __241 } Xsqlite3_str_append(tls, pAccum, (*Token)(unsafe.Pointer(pToken)).Fz, int32((*Token)(unsafe.Pointer(pToken)).Fn)) Xsqlite3RecordErrorByteOffset(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, (*Token)(unsafe.Pointer(pToken)).Fz) __241: ; __239: ; length = libc.AssignInt32(&width, 0) goto __58 __75: if !(int32((*Sqlite3_str)(unsafe.Pointer(pAccum)).FprintfFlags)&SQLITE_PRINTF_INTERNAL == 0) { goto __242 } return __242: ; pItem = libc.VaUintptr(&ap) if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 && !(flag_altform2 != 0)) { goto __243 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) goto __244 __243: if !((*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) { goto __245 } if !((*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0) { goto __247 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) Xsqlite3_str_append(tls, pAccum, ts+1537, 1) __247: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) goto __246 __245: if !((*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { goto __248 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) goto __249 __248: if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0) { goto __250 } Xsqlite3_str_appendf(tls, pAccum, ts+1539, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId)) __250: ; __249: ; __246: ; __244: ; length = libc.AssignInt32(&width, 0) goto __58 __76: ; return __58: ; // End switch over the format type // The text of the conversion is pointed to by "bufpt" and is // "length" characters long. The field width is "width". Do // the output. Both length and width are in bytes, not characters, // at this point. If the "!" flag was present on string conversions // indicating that width and precision should be expressed in characters, // then the values have been translated prior to reaching this point. width = width - length if !(width > 0) { goto __251 } if !!(flag_leftjustify != 0) { goto __253 } Xsqlite3_str_appendchar(tls, pAccum, width, int8(' ')) __253: ; Xsqlite3_str_append(tls, pAccum, bufpt, length) if !(flag_leftjustify != 0) { goto __254 } Xsqlite3_str_appendchar(tls, pAccum, width, int8(' ')) __254: ; goto __252 __251: Xsqlite3_str_append(tls, pAccum, bufpt, length) __252: ; if !(zExtra != 0) { goto __255 } Xsqlite3DbFree(tls, (*Sqlite3_str)(unsafe.Pointer(pAccum)).Fdb, zExtra) zExtra = uintptr(0) __255: ; goto __4 __4: fmt++ goto __3 goto __5 __5: // End for loop over the format string } var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1551)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:29904:29 */ // End of function // The z string points to the first character of a token that is // associated with an error. If db does not already have an error // byte offset recorded, try to compute the error byte offset for // z and set the error byte offset in db. func Xsqlite3RecordErrorByteOffset(tls *libc.TLS, db uintptr, z uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30357:21: */ var pParse uintptr var zText uintptr var zEnd uintptr if db == uintptr(0) { return } if (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset != -2 { return } pParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse if pParse == uintptr(0) { return } zText = (*Parse)(unsafe.Pointer(pParse)).FzTail if zText == uintptr(0) { return } zEnd = zText + uintptr(libc.Xstrlen(tls, zText)) if Uptr(z) >= Uptr(zText) && Uptr(z) < Uptr(zEnd) { (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = int32((int64(z) - int64(zText)) / 1) } } // If pExpr has a byte offset for the start of a token, record that as // as the error offset. func Xsqlite3RecordErrorOffsetOfExpr(tls *libc.TLS, db uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30378:21: */ for pExpr != 0 && ((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) || *(*int32)(unsafe.Pointer(pExpr + 52)) <= 0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } if pExpr == uintptr(0) { return } (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = *(*int32)(unsafe.Pointer(pExpr + 52)) } // Enlarge the memory allocation on a StrAccum object so that it is // able to accept at least N more bytes of text. // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. func Xsqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30393:20: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { return 0 } if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc == U32(0) { Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_TOOBIG)) return int32((*StrAccum)(unsafe.Pointer(p)).FnAlloc - (*StrAccum)(unsafe.Pointer(p)).FnChar - U32(1)) } else { var zOld uintptr if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { zOld = (*StrAccum)(unsafe.Pointer(p)).FzText } else { zOld = uintptr(0) } var szNew I64 = I64((*StrAccum)(unsafe.Pointer(p)).FnChar) szNew = szNew + (Sqlite3_int64(N) + int64(1)) if szNew+I64((*StrAccum)(unsafe.Pointer(p)).FnChar) <= I64((*StrAccum)(unsafe.Pointer(p)).FmxAlloc) { // Force exponential buffer size growth as long as it does not overflow, // to avoid having to call this routine too often szNew = szNew + I64((*StrAccum)(unsafe.Pointer(p)).FnChar) } if szNew > I64((*StrAccum)(unsafe.Pointer(p)).FmxAlloc) { Xsqlite3_str_reset(tls, p) Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_TOOBIG)) return 0 } else { (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(int32(szNew)) } if (*StrAccum)(unsafe.Pointer(p)).Fdb != 0 { zNew = Xsqlite3DbRealloc(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, zOld, uint64((*StrAccum)(unsafe.Pointer(p)).FnAlloc)) } else { zNew = Xsqlite3Realloc(tls, zOld, uint64((*StrAccum)(unsafe.Pointer(p)).FnAlloc)) } if zNew != 0 { if !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) && (*StrAccum)(unsafe.Pointer(p)).FnChar > U32(0) { libc.Xmemcpy(tls, zNew, (*StrAccum)(unsafe.Pointer(p)).FzText, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar)) } (*StrAccum)(unsafe.Pointer(p)).FzText = zNew (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(Xsqlite3DbMallocSize(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, zNew)) *(*U8)(unsafe.Pointer(p + 29)) |= U8(SQLITE_PRINTF_MALLOCED) } else { Xsqlite3_str_reset(tls, p) Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_NOMEM)) return 0 } } return N } // Append N copies of character c to the given string buffer. func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30443:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, Xsqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return } for libc.PostDecInt32(&N, 1) > 0 { *(*int8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr(libc.PostIncUint32(&(*Sqlite3_str)(unsafe.Pointer(p)).FnChar, 1)))) = c } } // The StrAccum "p" is not large enough to accept N new bytes of z[]. // So enlarge if first, then do the append. // // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30459:29: */ N = Xsqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint64(N)) *(*U32)(unsafe.Pointer(p + 24)) += U32(N) } } // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30471:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) } else if N != 0 { *(*U32)(unsafe.Pointer(p + 24)) += U32(N) libc.Xmemcpy(tls, (*Sqlite3_str)(unsafe.Pointer(p)).FzText+uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar-U32(N)), z, uint64(N)) } } // Append the complete text of zero-terminated string z[] to the p string. func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30488:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30498:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) if zText != 0 { libc.Xmemcpy(tls, zText, (*StrAccum)(unsafe.Pointer(p)).FzText, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) *(*U8)(unsafe.Pointer(p + 29)) |= U8(SQLITE_PRINTF_MALLOCED) } else { Xsqlite3StrAccumSetError(tls, p, uint8(SQLITE_NOMEM)) } (*StrAccum)(unsafe.Pointer(p)).FzText = zText return zText } func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30511:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { return strAccumFinishRealloc(tls, p) } } return (*StrAccum)(unsafe.Pointer(p)).FzText } // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30525:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) } else if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3_result_text(tls, pCtx, (*StrAccum)(unsafe.Pointer(p)).FzText, int32((*StrAccum)(unsafe.Pointer(p)).FnChar), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) } else { Xsqlite3_result_text(tls, pCtx, ts+1524, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } // This singleton is an sqlite3_str object that is returned if // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30543:20 */ // Finalize a string created using sqlite3_str_new(). func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30549:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) Xsqlite3_free(tls, p) } else { z = uintptr(0) } return z } // Return any error code associated with p func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30561:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } return SQLITE_NOMEM } // Return the current length of p in bytes func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30566:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } return 0 } // Return the current value for p func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30571:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } *(*int8)(unsafe.Pointer((*Sqlite3_str)(unsafe.Pointer(p)).FzText + uintptr((*Sqlite3_str)(unsafe.Pointer(p)).FnChar))) = int8(0) return (*Sqlite3_str)(unsafe.Pointer(p)).FzText } // Reset an StrAccum string. Reclaim all malloced memory. func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30580:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 29)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) } (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(0) (*StrAccum)(unsafe.Pointer(p)).FnChar = U32(0) (*StrAccum)(unsafe.Pointer(p)).FzText = uintptr(0) } // Initialize a string accumulator. // // p: The accumulator to be initialized. // db: Pointer to a database connection. May be NULL. Lookaside // memory is used if not NULL. db->mallocFailed is set appropriately // when not NULL. // zBase: An initial buffer. May be NULL in which case the initial buffer // is malloced. // n: Size of zBase in bytes. If total space requirements never exceed // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30604:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) (*StrAccum)(unsafe.Pointer(p)).FmxAlloc = U32(mx) (*StrAccum)(unsafe.Pointer(p)).FnChar = U32(0) (*StrAccum)(unsafe.Pointer(p)).FaccError = U8(0) (*StrAccum)(unsafe.Pointer(p)).FprintfFlags = U8(0) } // Allocate and initialize a new dynamic string object func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30615:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, func() int32 { if db != 0 { return *(*int32)(unsafe.Pointer(db + 136)) } return SQLITE_MAX_LENGTH }()) } else { p = uintptr(unsafe.Pointer(&sqlite3OomStr)) } return p } // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30630:21: */ bp := tls.Alloc(102) defer tls.Free(102) var z uintptr // var zBase [70]int8 at bp+32, 70 // var acc StrAccum at bp, 32 Xsqlite3StrAccumInit(tls, bp, db, bp+32, int32(unsafe.Sizeof([70]int8{})), *(*int32)(unsafe.Pointer(db + 136))) (*StrAccum)(unsafe.Pointer(bp /* &acc */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) Xsqlite3_str_vappendf(tls, bp, zFormat, ap) z = Xsqlite3StrAccumFinish(tls, bp) if int32((*StrAccum)(unsafe.Pointer(bp)).FaccError) == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } return z } // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30650:21: */ var ap Va_list _ = ap var z uintptr ap = va z = Xsqlite3VMPrintf(tls, db, zFormat, ap) _ = ap return z } // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30663:17: */ bp := tls.Alloc(102) defer tls.Free(102) var z uintptr // var zBase [70]int8 at bp+32, 70 // var acc StrAccum at bp, 32 if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(unsafe.Sizeof([70]int8{})), SQLITE_MAX_LENGTH) Xsqlite3_str_vappendf(tls, bp, zFormat, ap) z = Xsqlite3StrAccumFinish(tls, bp) return z } // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30687:17: */ var ap Va_list _ = ap var z uintptr if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } ap = va z = Xsqlite3_vmprintf(tls, zFormat, ap) _ = ap return z } // sqlite3_snprintf() works like snprintf() except that it ignores the // current locale settings. This is important for SQLite because we // are not able to use a "," as the decimal point in place of "." as // specified by some locales. // // Oops: The first two arguments of sqlite3_snprintf() are backwards // from the snprintf() standard. Unfortunately, it is too late to change // this without breaking compatibility, so we just have to live with the // mistake. // // sqlite3_vsnprintf() is the varargs version. func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30712:17: */ bp := tls.Alloc(32) defer tls.Free(32) // var acc StrAccum at bp, 32 if n <= 0 { return zBuf } Xsqlite3StrAccumInit(tls, bp, uintptr(0), zBuf, n, 0) Xsqlite3_str_vappendf(tls, bp, zFormat, ap) *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30727:17: */ var z uintptr var ap Va_list _ = ap ap = va z = Xsqlite3_vsnprintf(tls, n, zBuf, zFormat, ap) _ = ap return z } // This is the routine that actually formats the sqlite3_log() message. // We house it in a separate routine from sqlite3_log() to avoid using // stack space on small-stack systems when logging is disabled. // // sqlite3_log() must render into a static buffer. It cannot dynamically // allocate memory because it might be called while the memory allocator // mutex is held. // // sqlite3_str_vappendf() might ask for *temporary* memory allocations for // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30750:13: */ bp := tls.Alloc(242) defer tls.Free(242) // var acc StrAccum at bp, 32 // String accumulator // var zMsg [210]int8 at bp+32, 210 // Complete log message Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+32, int32(unsafe.Sizeof([210]int8{})), 0) Xsqlite3_str_vappendf(tls, bp, zFormat, ap) (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxLog})).f(tls, Xsqlite3Config.FpLogArg, iErrCode, Xsqlite3StrAccumFinish(tls, bp /* &acc */)) } // Format and write a message to the log if logging is enabled. func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30763:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { ap = va renderLogMsg(tls, iErrCode, zFormat, ap) _ = ap } } // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:30804:17: */ var ap Va_list _ = ap ap = va Xsqlite3_str_vappendf(tls, p, zFormat, ap) _ = ap } //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** // 2015-06-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 C code to implement the TreeView debugging routines. // These routines print a parse tree to standard output for debugging and // analysis. // // The interfaces in this file is only available when compiling // with SQLITE_DEBUG. // #include "sqliteInt.h" //************* End of treeview.c ******************************************* //************* Begin file random.c ***************************************** // 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 file contains code to implement a pseudo-random number // generator (PRNG) for SQLite. // // Random numbers are used by some of the database backends in order // to generate random integer keys for tables or random filenames. // #include "sqliteInt.h" // All threads share a single random number generator. // This structure is the current state of the generator. type sqlite3PrngType = struct { FisInit uint8 Fi uint8 Fj uint8 Fs [256]uint8 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31656:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** // 2015-06-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 C code to implement the TreeView debugging routines. // These routines print a parse tree to standard output for debugging and // analysis. // // The interfaces in this file is only available when compiling // with SQLITE_DEBUG. // #include "sqliteInt.h" //************* End of treeview.c ******************************************* //************* Begin file random.c ***************************************** // 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 file contains code to implement a pseudo-random number // generator (PRNG) for SQLite. // // Random numbers are used by some of the database backends in order // to generate random integer keys for tables or random filenames. // #include "sqliteInt.h" // All threads share a single random number generator. // This structure is the current state of the generator. var sqlite3Prng sqlite3PrngType /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31660:3: */ // Return N random bytes. func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31665:17: */ bp := tls.Alloc(256) defer tls.Free(256) var t uint8 var zBuf uintptr = pBuf // The "wsdPrng" macro will resolve to the pseudo-random number generator // state vector. If writable static data is unsupported on the target, // we have to locate the state vector at run-time. In the more common // case where writable static data is supported, wsdPrng can refer directly // to the "sqlite3Prng" state vector declared above. var mutex uintptr if Xsqlite3_initialize(tls) != 0 { return } mutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_PRNG) Xsqlite3_mutex_enter(tls, mutex) if N <= 0 || pBuf == uintptr(0) { sqlite3Prng.FisInit = uint8(0) Xsqlite3_mutex_leave(tls, mutex) return } // Initialize the state of the random number generator once, // the first time this routine is called. The seed value does // not need to contain a lot of randomness since we are not // trying to do secure encryption or anything like that... // // Nothing in this file or anywhere else in SQLite does any kind of // encryption. The RC4 algorithm is being used as a PRNG (pseudo-random // number generator) not as an encryption device. if !(int32(sqlite3Prng.FisInit) != 0) { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var i int32 // var k [256]int8 at bp, 256 sqlite3Prng.Fj = uint8(0) sqlite3Prng.Fi = uint8(0) if pVfs == uintptr(0) { libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([256]int8{}))) } else { Xsqlite3OsRandomness(tls, pVfs, 256, bp) } for i = 0; i < 256; i++ { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) } for i = 0; i < 256; i++ { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2)) += uint8(int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i)))) + int32(*(*int8)(unsafe.Pointer(bp + uintptr(i))))) t = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = t } sqlite3Prng.FisInit = uint8(1) } for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&N, 1) != 0 { sqlite3Prng.Fi++ t = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 2)) += uint8(int32(t)) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fj))) = t t = uint8(int32(t) + int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(sqlite3Prng.Fi))))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zBuf, 1))) = *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(t))) } Xsqlite3_mutex_leave(tls, mutex) } // For testing purposes, we sometimes want to preserve the state of // PRNG and restore the PRNG to its saved state at a later time, or // to reset the PRNG to its initial state. These routines accomplish // those tasks. // // The sqlite3_test_control() interface calls these routines to // control the PRNG. var sqlite3SavedPrng sqlite3PrngType /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31756:42: */ func Xsqlite3PrngSaveState(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31757:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint64(unsafe.Sizeof(sqlite3Prng))) } func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31764:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uint64(unsafe.Sizeof(sqlite3Prng))) } type X_PVFV = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt_startup.h:20:14 */ type X_PIFV = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt_startup.h:21:13 */ type X_PVFI = uintptr /* /usr/x86_64-w64-mingw32/include/corecrt_startup.h:22:14 */ type _onexit_table_t = struct { F_first uintptr F_last uintptr F_end uintptr } /* /usr/x86_64-w64-mingw32/include/corecrt_startup.h:24:9 */ type X_onexit_table_t = _onexit_table_t /* /usr/x86_64-w64-mingw32/include/corecrt_startup.h:28:3 */ // Includes a definition of _pid_t and pid_t // * // This file has no copyright assigned and is placed in the Public Domain. // This 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 X_ino_t = uint16 /* /usr/x86_64-w64-mingw32/include/sys/types.h:43:24 */ type Ino_t = uint16 /* /usr/x86_64-w64-mingw32/include/sys/types.h:45:24 */ type X_dev_t = uint32 /* /usr/x86_64-w64-mingw32/include/sys/types.h:51:22 */ type Dev_t = uint32 /* /usr/x86_64-w64-mingw32/include/sys/types.h:53:22 */ type X_pid_t = int64 /* /usr/x86_64-w64-mingw32/include/sys/types.h:63:17 */ type Pid_t = X_pid_t /* /usr/x86_64-w64-mingw32/include/sys/types.h:68:16 */ type X_mode_t = uint16 /* /usr/x86_64-w64-mingw32/include/sys/types.h:74:24 */ type Mode_t = X_mode_t /* /usr/x86_64-w64-mingw32/include/sys/types.h:77:17 */ type Useconds_t = uint32 /* /usr/x86_64-w64-mingw32/include/sys/types.h:84:22 */ type X_sigset_t = uint64 /* /usr/x86_64-w64-mingw32/include/sys/types.h:104:28 */ type X_beginthread_proc_type = uintptr /* /usr/x86_64-w64-mingw32/include/process.h:32:16 */ type X_beginthreadex_proc_type = uintptr /* /usr/x86_64-w64-mingw32/include/process.h:33:20 */ type X_tls_callback_type = uintptr /* /usr/x86_64-w64-mingw32/include/process.h:61:16 */ // Thread procedure Win32 compatibility shim func sqlite3ThreadProc(tls *libc.TLS, pArg uintptr) uint32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31897:27: */ var p uintptr = pArg (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*struct { f func(*libc.TLS, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*SQLiteThread)(unsafe.Pointer(p)).FxTask})).f(tls, (*SQLiteThread)(unsafe.Pointer(p)).FpIn) libc.X_endthreadex(tls, uint32(0)) return uint32(0) // NOT REACHED } // Create a new thread func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31920:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(SQLiteThread{}))) if p == uintptr(0) { return SQLITE_NOMEM } // If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a // function that returns SQLITE_ERROR when passed the argument 200, that // forces worker threads to run sequentially and deterministically // (via the sqlite3FaultSim() term of the conditional) for testing // purposes. if int32(Xsqlite3Config.FbCoreMutex) == 0 || Xsqlite3FaultSim(tls, 200) != 0 { libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(SQLiteThread{}))) } else { (*SQLiteThread)(unsafe.Pointer(p)).FxTask = xTask (*SQLiteThread)(unsafe.Pointer(p)).FpIn = pIn (*SQLiteThread)(unsafe.Pointer(p)).Ftid = uintptr(libc.X_beginthreadex(tls, uintptr(0), uint32(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uint32 }{sqlite3ThreadProc})), p, uint32(0), p+8 /* &.id */)) if (*SQLiteThread)(unsafe.Pointer(p)).Ftid == uintptr(0) { libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(SQLiteThread{}))) } } if (*SQLiteThread)(unsafe.Pointer(p)).FxTask == uintptr(0) { (*SQLiteThread)(unsafe.Pointer(p)).Fid = uint32(libc.XGetCurrentThreadId(tls)) (*SQLiteThread)(unsafe.Pointer(p)).FpResult = (*struct { f func(*libc.TLS, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{xTask})).f(tls, pIn) } *(*uintptr)(unsafe.Pointer(ppThread)) = p return SQLITE_OK } // os_win.c // Get the results of the thread func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:31958:20: */ var rc DWORD var bRc WINBOOL _ = bRc if p == uintptr(0) { return SQLITE_NOMEM } if (*SQLiteThread)(unsafe.Pointer(p)).FxTask == uintptr(0) { // assert( p->id==GetCurrentThreadId() ); rc = DWORD(0x00000000) + DWORD(0) } else { rc = Xsqlite3Win32Wait(tls, (*SQLiteThread)(unsafe.Pointer(p)).Ftid) bRc = libc.XCloseHandle(tls, (*SQLiteThread)(unsafe.Pointer(p)).Ftid) } if rc == DWORD(0x00000000)+DWORD(0) { *(*uintptr)(unsafe.Pointer(ppOut)) = (*SQLiteThread)(unsafe.Pointer(p)).FpResult } Xsqlite3_free(tls, p) if rc == DWORD(0x00000000)+DWORD(0) { return SQLITE_OK } return SQLITE_ERROR } //******************************* End Win32 Threads ************************ //******************************** Single-Threaded ************************* //***************************** End Single-Threaded ************************ //************* End of threads.c ******************************************** //************* Begin file utf.c ******************************************** // 2004 April 13 // // 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 routines used to translate between UTF-8, // UTF-16, UTF-16BE, and UTF-16LE. // // Notes on UTF-8: // // Byte-0 Byte-1 Byte-2 Byte-3 Value // 0xxxxxxx 00000000 00000000 0xxxxxxx // 110yyyyy 10xxxxxx 00000000 00000yyy yyxxxxxx // 1110zzzz 10yyyyyy 10xxxxxx 00000000 zzzzyyyy yyxxxxxx // 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx 000uuuuu zzzzyyyy yyxxxxxx // // // Notes on UTF-16: (with wwww+1==uuuuu) // // Word-0 Word-1 Value // 110110ww wwzzzzyy 110111yy yyxxxxxx 000uuuuu zzzzyyyy yyxxxxxx // zzzzyyyy yyxxxxxx 00000000 zzzzyyyy yyxxxxxx // // // BOM or Byte Order Mark: // 0xff 0xfe little-endian utf-16 follows // 0xfe 0xff big-endian utf-16 follows // // #include "sqliteInt.h" // #include <assert.h> // #include "vdbeInt.h" // 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), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32103:28 */ // Translate a single UTF-8 character. Return the unicode value. // // During translation, assume that the byte that zTerm points // is a 0x00. // // Write a pointer to the next unread byte back into *pzNext. // // Notes On Invalid UTF-8: // // * This routine never allows a 7-bit character (0x00 through 0x7f) to // be encoded as a multi-byte character. Any multi-byte character that // attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd. // // * This routine never allows a UTF16 surrogate value to be encoded. // If a multi-byte character attempts to encode a value between // 0xd800 and 0xe000 then it is rendered as 0xfffd. // // * Bytes in the range of 0x80 through 0xbf which occur as the first // byte of a character are interpreted as single-byte characters // and rendered as themselves even though they are technically // invalid characters. // // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32197:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. // For this routine, we assume the UTF8 string is always zero-terminated. c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(pz)), 1)))) if c >= uint32(0xc0) { c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) for int32(*(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pz)))))&0xc0 == 0x80 { c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(pz)), 1))))) } if c < uint32(0x80) || c&0xFFFFF800 == uint32(0xD800) || c&0xFFFFFFFE == uint32(0xFFFE) { c = uint32(0xFFFD) } } return c } // If the TRANSLATE_TRACE macro is defined, the value of each Mem is // printed on stderr on the way into and out of sqlite3VdbeMemTranslate(). // #define TRANSLATE_TRACE 1 // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32233:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator var zTerm uintptr // End of input var z uintptr // Output iterator var c uint32 var temp U8 var rc int32 var c2 int32 var c21 int32 // If the translation is between UTF-16 little and big endian, then // all that is required is to swap the byte order. This case is handled // differently from the others. if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) != SQLITE_UTF8 && int32(desiredEnc) != SQLITE_UTF8) { goto __1 } rc = Xsqlite3VdbeMemMakeWriteable(tls, pMem) if !(rc != SQLITE_OK) { goto __2 } return SQLITE_NOMEM __2: ; zIn = (*Mem)(unsafe.Pointer(pMem)).Fz zTerm = zIn + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn&libc.CplInt32(1)) __3: if !(zIn < zTerm) { goto __4 } temp = *(*uint8)(unsafe.Pointer(zIn)) *(*uint8)(unsafe.Pointer(zIn)) = *(*uint8)(unsafe.Pointer(zIn + uintptr(1))) zIn++ *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))) = temp goto __3 __4: ; (*Mem)(unsafe.Pointer(pMem)).Fenc = desiredEnc goto translate_out __1: ; // Set len to the maximum number of bytes required in the output buffer. if !(int32(desiredEnc) == SQLITE_UTF8) { goto __5 } // When converting from UTF-16, the maximum growth results from // translating a 2-byte character to a 4-byte UTF-8 character. // A single byte is required for the output string // nul-terminator. *(*int32)(unsafe.Pointer(pMem + 12)) &= libc.CplInt32(1) len = int64(2)*Sqlite3_int64((*Mem)(unsafe.Pointer(pMem)).Fn) + int64(1) goto __6 __5: // When converting from UTF-8 to UTF-16 the maximum growth is caused // when a 1-byte UTF-8 character is translated into a 2-byte UTF-16 // character. Two bytes are required in the output buffer for the // nul-terminator. len = int64(2)*Sqlite3_int64((*Mem)(unsafe.Pointer(pMem)).Fn) + int64(2) __6: ; // Set zIn to point at the start of the input buffer and zTerm to point 1 // byte past the end. // // Variable zOut is set to point at the output buffer, space obtained // from sqlite3_malloc(). zIn = (*Mem)(unsafe.Pointer(pMem)).Fz zTerm = zIn + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn) zOut = Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(len)) if !!(zOut != 0) { goto __7 } return SQLITE_NOMEM __7: ; z = zOut if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == SQLITE_UTF8) { goto __8 } if !(int32(desiredEnc) == SQLITE_UTF16LE) { goto __10 } // UTF-8 -> UTF-16 Little-endian __12: if !(zIn < zTerm) { goto __13 } c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) if !(c >= uint32(0xc0)) { goto __14 } c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) __15: if !(zIn != zTerm && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80) { goto __16 } c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) goto __15 __16: ; if !(c < uint32(0x80) || c&0xFFFFF800 == uint32(0xD800) || c&0xFFFFFFFE == uint32(0xFFFE)) { goto __17 } c = uint32(0xFFFD) __17: ; __14: ; if !(c <= uint32(0xFFFF)) { goto __18 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c >> 8 & uint32(0x00FF)) goto __19 __18: *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c>>10&uint32(0x003F) + (c-uint32(0x10000))>>10&uint32(0x00C0)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00D8) + (c-uint32(0x10000))>>18&uint32(0x03)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00DC) + c>>8&uint32(0x03)) __19: ; goto __12 __13: ; goto __11 __10: ; // UTF-8 -> UTF-16 Big-endian __20: if !(zIn < zTerm) { goto __21 } c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) if !(c >= uint32(0xc0)) { goto __22 } c = uint32(sqlite3Utf8Trans1[c-uint32(0xc0)]) __23: if !(zIn != zTerm && int32(*(*uint8)(unsafe.Pointer(zIn)))&0xc0 == 0x80) { goto __24 } c = c<<6 + uint32(0x3f&int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))) goto __23 __24: ; if !(c < uint32(0x80) || c&0xFFFFF800 == uint32(0xD800) || c&0xFFFFFFFE == uint32(0xFFFE)) { goto __25 } c = uint32(0xFFFD) __25: ; __22: ; if !(c <= uint32(0xFFFF)) { goto __26 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c >> 8 & uint32(0x00FF)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) goto __27 __26: *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00D8) + (c-uint32(0x10000))>>18&uint32(0x03)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c>>10&uint32(0x003F) + (c-uint32(0x10000))>>10&uint32(0x00C0)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(uint32(0x00DC) + c>>8&uint32(0x03)) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0x00FF)) __27: ; goto __20 __21: ; __11: ; (*Mem)(unsafe.Pointer(pMem)).Fn = int32((int64(z) - int64(zOut)) / 1) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0) goto __9 __8: ; if !(int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == SQLITE_UTF16LE) { goto __28 } // UTF-16 Little-endian -> UTF-8 __30: if !(zIn < zTerm) { goto __31 } c = uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) c = c + uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))<<8) if !(c >= uint32(0xd800) && c < uint32(0xe000)) { goto __32 } if !(zIn < zTerm) { goto __33 } c2 = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) c2 = c2 + int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1))))<<8 c = uint32(c2&0x03FF) + c&uint32(0x003F)<<10 + (c&uint32(0x03C0)+uint32(0x0040))<<10 __33: ; __32: ; if !(c < uint32(0x00080)) { goto __34 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0xFF)) goto __35 __34: if !(c < uint32(0x00800)) { goto __36 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) goto __37 __36: if !(c < uint32(0x10000)) { goto __38 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) goto __39 __38: *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) __39: ; __37: ; __35: ; goto __30 __31: ; goto __29 __28: // UTF-16 Big-endian -> UTF-8 __40: if !(zIn < zTerm) { goto __41 } c = uint32(int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) << 8) c = c + uint32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) if !(c >= uint32(0xd800) && c < uint32(0xe000)) { goto __42 } if !(zIn < zTerm) { goto __43 } c21 = int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) << 8 c21 = c21 + int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zIn, 1)))) c = uint32(c21&0x03FF) + c&uint32(0x003F)<<10 + (c&uint32(0x03C0)+uint32(0x0040))<<10 __43: ; __42: ; if !(c < uint32(0x00080)) { goto __44 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = U8(c & uint32(0xFF)) goto __45 __44: if !(c < uint32(0x00800)) { goto __46 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) goto __47 __46: if !(c < uint32(0x10000)) { goto __48 } *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) goto __49 __48: *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) __49: ; __47: ; __45: ; goto __40 __41: ; __29: ; (*Mem)(unsafe.Pointer(pMem)).Fn = int32((int64(z) - int64(zOut)) / 1) __9: ; *(*uint8)(unsafe.Pointer(z)) = uint8(0) c = uint32(MEM_Str | MEM_Term | int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_AffMask|MEM_Subtype)) Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(c) (*Mem)(unsafe.Pointer(pMem)).Fenc = desiredEnc (*Mem)(unsafe.Pointer(pMem)).Fz = zOut (*Mem)(unsafe.Pointer(pMem)).FzMalloc = (*Mem)(unsafe.Pointer(pMem)).Fz (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).Fz) translate_out: return SQLITE_OK } // This routine checks for a byte-order mark at the beginning of the // UTF-16 string stored in *pMem. If one is present, it is removed and // the encoding of the Mem adjusted. This routine does not do any // byte-swapping, it just sets Mem.enc appropriately. // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32428:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) if (*Mem)(unsafe.Pointer(pMem)).Fn > 1 { var b1 U8 = *(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz)) var b2 U8 = *(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(1))) if int32(b1) == 0xFE && int32(b2) == 0xFF { bom = U8(SQLITE_UTF16BE) } if int32(b1) == 0xFF && int32(b2) == 0xFE { bom = U8(SQLITE_UTF16LE) } } if bom != 0 { rc = Xsqlite3VdbeMemMakeWriteable(tls, pMem) if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(pMem + 12)) -= 2 libc.Xmemmove(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, (*Mem)(unsafe.Pointer(pMem)).Fz+2, uint64((*Mem)(unsafe.Pointer(pMem)).Fn)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+1))) = int8(0) *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Term) (*Mem)(unsafe.Pointer(pMem)).Fenc = bom } } return rc } // pZ is a UTF-8 encoded unicode string. If nByte is less than zero, // return the number of unicode characters in pZ up to (but not including) // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32466:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr if nByte >= 0 { zTerm = z + uintptr(nByte) } else { zTerm = libc.UintptrFromInt32(-1) } for int32(*(*U8)(unsafe.Pointer(z))) != 0 && z < zTerm { { if int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { for int32(*(*U8)(unsafe.Pointer(z)))&0xc0 == 0x80 { z++ } } } r++ } return r } // This test function is not currently used by the automated test-suite. // Hence it is only available in debug builds. // Convert a UTF-16 string in the native encoding into a UTF-8 string. // Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must // be freed by the calling function. // // NULL is returned if there is an allocation error. func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32520:21: */ bp := tls.Alloc(56) defer tls.Free(56) // var m Mem at bp, 56 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp /* &m */)).Fdb = db Xsqlite3VdbeMemSetStr(tls, bp, z, int64(nByte), enc, uintptr(0)) Xsqlite3VdbeChangeEncoding(tls, bp, SQLITE_UTF8) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3VdbeMemRelease(tls, bp) (*Mem)(unsafe.Pointer(bp /* &m */)).Fz = uintptr(0) } return (*Mem)(unsafe.Pointer(bp /* &m */)).Fz } // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32541:20: */ var c int32 var z uintptr = zIn var n int32 = 0 if SQLITE_UTF16LE == SQLITE_UTF16LE { z++ } for n < nChar { c = int32(*(*uint8)(unsafe.Pointer(z))) z += uintptr(2) if c >= 0xd8 && c < 0xdc && int32(*(*uint8)(unsafe.Pointer(z))) >= 0xdc && int32(*(*uint8)(unsafe.Pointer(z))) < 0xe0 { z += uintptr(2) } n++ } return int32((int64(z)-int64(zIn))/1) - libc.Bool32(SQLITE_UTF16LE == SQLITE_UTF16LE) } //************* End of utf.c ************************************************ //************* Begin file util.c ******************************************* // 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. // // // Utility functions used throughout sqlite. // // This file contains functions for allocating memory, comparing // strings, and stuff like that. // // #include "sqliteInt.h" // #include <stdarg.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. type _exception = struct { Ftype int32 F__ccgo_pad1 [4]byte Fname uintptr Farg1 float64 Farg2 float64 Fretval float64 } /* /usr/x86_64-w64-mingw32/include/math.h:15:1 */ // See also float.h // IEEE 754 classication // IEEE float/double type shapes. type __mingw_dbl_type_t = struct{ Fx float64 } /* /usr/x86_64-w64-mingw32/include/math.h:119:11 */ // See also float.h // IEEE 754 classication // IEEE float/double type shapes. type X__mingw_dbl_type_t = __mingw_dbl_type_t /* /usr/x86_64-w64-mingw32/include/math.h:125:5 */ type __mingw_flt_type_t = struct{ Fx float32 } /* /usr/x86_64-w64-mingw32/include/math.h:127:11 */ type X__mingw_flt_type_t = __mingw_flt_type_t /* /usr/x86_64-w64-mingw32/include/math.h:130:5 */ type __mingw_ldbl_type_t = struct { Fx float64 F__ccgo_pad1 [8]byte } /* /usr/x86_64-w64-mingw32/include/math.h:132:11 */ type X__mingw_ldbl_type_t = __mingw_ldbl_type_t /* /usr/x86_64-w64-mingw32/include/math.h:141:5 */ type _complex = struct { Fx float64 Fy float64 } /* /usr/x86_64-w64-mingw32/include/math.h:260:3 */ // Use the compiler's builtin define for FLT_EVAL_METHOD to // set float_t and double_t. type Float_t = float32 /* /usr/x86_64-w64-mingw32/include/math.h:362:15 */ type Double_t = float64 /* /usr/x86_64-w64-mingw32/include/math.h:363:16 */ // Documentation on decimal float math // http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=8cf166fedd1aa110VgnVCM100000a360ea10RCRD // // Calls to sqlite3FaultSim() are used to simulate a failure during testing, // or to bypass normal error detection during testing in order to let // execute proceed futher downstream. // // In deployment, sqlite3FaultSim() *always* return SQLITE_OK (0). The // sqlite3FaultSim() function only returns non-zero during testing. // // During testing, if the test harness has set a fault-sim callback using // a call to sqlite3_test_control(SQLITE_TESTCTRL_FAULT_INSTALL), then // each call to sqlite3FaultSim() is relayed to that application-supplied // callback and the integer return value form the application-supplied // callback is returned by sqlite3FaultSim(). // // The integer argument to sqlite3FaultSim() is a code to identify which // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32633:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) } return SQLITE_OK } // Return true if the floating point value is Not a Number (NaN). // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32646:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x var rc int32 // The value return // var y U64 at bp, 8 libc.Xmemcpy(tls, bp, bp+8, uint64(unsafe.Sizeof(U64(0)))) rc = libc.Bool32(*(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0)) return rc } // 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 Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32668:20: */ if z == uintptr(0) { return 0 } return 0x3fffffff & int32(libc.Xstrlen(tls, z)) } // Return the declared type of a column. Or return zDflt if the column // has no declared type. // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32680:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)) != 0 { return Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4)-1)&0xf<<28>>28] } else { return zDflt } return uintptr(0) } // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32696:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } Xsqlite3SystemError(tls, db, err_code) } // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32706:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { sqlite3ErrorFinish(tls, db, err_code) } else { (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 } } // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32720:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } } // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32731:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } rc = rc & 0xff if rc == SQLITE_CANTOPEN || rc == SQLITE_IOERR { (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno = Xsqlite3OsGetLastError(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs) } } // Set the most recent error code and error string for the sqlite // handle "db". The error code is set to "err_code". // // If it is not NULL, string zFormat specifies the format of the // error string. zFormat and any string tokens that follow it are // assumed to be encoded in UTF-8. // // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32751:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) if zFormat == uintptr(0) { Xsqlite3Error(tls, db, err_code) } else if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 || libc.AssignPtrUintptr(db+424, Xsqlite3ValueNew(tls, db)) != uintptr(0) { var z uintptr var ap Va_list _ = ap ap = va z = Xsqlite3VMPrintf(tls, db, zFormat, ap) _ = ap Xsqlite3ValueSetStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr, -1, z, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) } } // Add an error message to pParse->zErrMsg and increment pParse->nErr. // // This function should be used to report any error that occurs while // compiling an SQL statement (i.e. within sqlite3_prepare()). The // last thing the sqlite3_prepare() function does is copy the error // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32777:21: */ var zMsg uintptr var ap Va_list _ = ap var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -2 ap = va zMsg = Xsqlite3VMPrintf(tls, db, zFormat, ap) _ = ap if (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset < -1 { (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 } if (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr != 0 { Xsqlite3DbFree(tls, db, zMsg) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Parse)(unsafe.Pointer(pParse)).FnErr++ (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM } } else { (*Parse)(unsafe.Pointer(pParse)).FnErr++ Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = zMsg (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR (*Parse)(unsafe.Pointer(pParse)).FpWith = uintptr(0) } } // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32808:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode } (*Parse)(unsafe.Pointer(pParse)).Frc = errCode (*Parse)(unsafe.Pointer(pParse)).FnErr++ return errCode } // 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. // // The input string must be zero-terminated. A new zero-terminator // is added to the dequoted string. // // The return value is -1 if no dequoting occurs or the length of the // dequoted string, exclusive of the zero terminator, if dequoting does // occur. // // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32833:21: */ var quote int8 var i int32 var j int32 if z == uintptr(0) { return } quote = *(*int8)(unsafe.Pointer(z)) if !(int32(Xsqlite3CtypeMap[uint8(quote)])&0x80 != 0) { return } if int32(quote) == '[' { quote = int8(']') } i = 1 j = 0 for ; ; i++ { if int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32(quote) { if int32(*(*int8)(unsafe.Pointer(z + uintptr(i+1)))) == int32(quote) { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = quote i++ } else { break } } else { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&j, 1)))) = *(*int8)(unsafe.Pointer(z + uintptr(i))) } } *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32855:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { return uint32(EP_Quoted | EP_DblQuoted) } return uint32(EP_Quoted) }() Xsqlite3Dequote(tls, *(*uintptr)(unsafe.Pointer(p + 8))) } // If the input token p is quoted, try to adjust the token to remove // the quotes. This is not always possible: // // "abc" -> abc // "ab""cd" -> (not possible because of the interior "") // // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32873:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return } if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(p)).Fz)))])&0x80 != 0) { return } for i = uint32(1); i < (*Token)(unsafe.Pointer(p)).Fn-uint32(1); i++ { if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(p)).Fz + uintptr(i))))])&0x80 != 0 { return } } *(*uint32)(unsafe.Pointer(p + 8)) -= uint32(2) (*Token)(unsafe.Pointer(p)).Fz++ } // Generate a Token object from a string func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32887:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } // Convenient short-hand // Some systems have stricmp(). Others have strcasecmp(). Because // there is no consistency, we will define our own. // // IMPLEMENTATION-OF: R-30243-02494 The sqlite3_stricmp() and // sqlite3_strnicmp() APIs allow applications and extensions to compare // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32905:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 } return 0 } else if zRight == uintptr(0) { return 1 } return Xsqlite3StrICmp(tls, zLeft, zRight) } func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32913:20: */ var a uintptr var b uintptr var c int32 var x int32 a = zLeft b = zRight for { c = int32(*(*uint8)(unsafe.Pointer(a))) x = int32(*(*uint8)(unsafe.Pointer(b))) if c == x { if c == 0 { break } } else { c = int32(Xsqlite3UpperToLower[c]) - int32(Xsqlite3UpperToLower[x]) if c != 0 { break } } a++ b++ } return c } func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32932:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { if zRight != 0 { return -1 } return 0 } else if zRight == uintptr(0) { return 1 } a = zLeft b = zRight for libc.PostDecInt32(&N, 1) > 0 && int32(*(*uint8)(unsafe.Pointer(a))) != 0 && int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(a))]) == int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(b))]) { a++ b++ } if N < 0 { return 0 } return int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(a))]) - int32(Xsqlite3UpperToLower[*(*uint8)(unsafe.Pointer(b))]) } // Compute an 8-bit hash on a string that is insensitive to case differences func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32948:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) } for *(*int8)(unsafe.Pointer(z)) != 0 { h = U8(int32(h) + int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z)))])) z++ } return h } // Compute 10 to the E-th power. Examples: E==1 results in 10. // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32964:24: */ var r float64 = 1.0 var i int32 i = 0 __1: if !(E != 0) { goto __3 } { if E&1 != 0 { r = r * x[i] } } goto __2 __2: i++ E >>= 1 goto __1 goto __3 __3: ; return r } var x = [9]float64{ 1.0e+001, 1.0e+002, 1.0e+004, 1.0e+008, 1.0e+016, 1.0e+032, 1.0e+064, 1.0e+128, 1.0e+256, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:32966:32 */ // The string z[] is an text representation of a real number. // Convert this string to a double and write it into *pResult. // // The string z[] is length bytes in length (bytes, not characters) and // uses the encoding enc. 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. More specifically // return // 1 => The input string is a pure integer // 2 or more => The input has a decimal point or eNNN clause // 0 or less => The input string is not a valid number // -1 => Not a valid number, but has a valid prefix which // includes a decimal point and/or an eNNN clause // // 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 Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33029:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) var sign int32 // sign of significand var s I64 // 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 nDigit int32 // Number of digits processed var eType int32 var i int32 //OPTIMIZATION-IF-TRUE var scale float64 var scale1 float64 sign = 1 s = int64(0) d = 0 esign = 1 e = 0 eValid = 1 nDigit = 0 eType = 1 // 1: pure integer, 2+: fractional -1 or less: bad UTF16 *(*float64)(unsafe.Pointer(pResult)) = 0.0 // Default return value, in case of an error if !(length == 0) { goto __1 } return 0 __1: ; if !(int32(enc) == SQLITE_UTF8) { goto __2 } incr = 1 zEnd = z + uintptr(length) goto __3 __2: incr = 2 length = length & libc.CplInt32(1) i = 3 - int32(enc) __4: if !(i < length && int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == 0) { goto __6 } goto __5 __5: i = i + 2 goto __4 goto __6 __6: ; if !(i < length) { goto __7 } eType = -100 __7: ; zEnd = z + uintptr(i^1) z += uintptr(int32(enc) & 1) __3: ; // skip leading spaces __8: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x01 != 0) { goto __9 } z += uintptr(incr) goto __8 __9: ; if !(z >= zEnd) { goto __10 } return 0 __10: ; // get sign of significand if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') { goto __11 } sign = -1 z += uintptr(incr) goto __12 __11: if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') { goto __13 } z += uintptr(incr) __13: ; __12: ; // copy max significant digits to significand __14: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x04 != 0) { goto __15 } s = s*int64(10) + I64(int32(*(*int8)(unsafe.Pointer(z)))-'0') z += uintptr(incr) nDigit++ if !(s >= (int64(0xffffffff)|I64(int64(0x7fffffff))<<32-int64(9))/int64(10)) { goto __16 } // skip non-significant significand digits // (increase exponent by d to shift decimal left) __17: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x04 != 0) { goto __18 } z += uintptr(incr) d++ goto __17 __18: ; __16: ; goto __14 __15: ; if !(z >= zEnd) { goto __19 } goto do_atof_calc __19: ; // if decimal point is present if !(int32(*(*int8)(unsafe.Pointer(z))) == '.') { goto __20 } z += uintptr(incr) eType++ // copy digits from after decimal to significand // (decrease exponent by d to shift decimal right) __21: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x04 != 0) { goto __22 } if !(s < (int64(0xffffffff)|I64(int64(0x7fffffff))<<32-int64(9))/int64(10)) { goto __23 } s = s*int64(10) + I64(int32(*(*int8)(unsafe.Pointer(z)))-'0') d-- nDigit++ __23: ; z += uintptr(incr) goto __21 __22: ; __20: ; if !(z >= zEnd) { goto __24 } goto do_atof_calc __24: ; // if exponent is present if !(int32(*(*int8)(unsafe.Pointer(z))) == 'e' || int32(*(*int8)(unsafe.Pointer(z))) == 'E') { goto __25 } z += uintptr(incr) eValid = 0 eType++ // This branch is needed to avoid a (harmless) buffer overread. The // special comment alerts the mutation tester that the correct answer // is obtained even if the branch is omitted if !(z >= zEnd) { goto __26 } goto do_atof_calc __26: ; //PREVENTS-HARMLESS-OVERREAD // get sign of exponent if !(int32(*(*int8)(unsafe.Pointer(z))) == '-') { goto __27 } esign = -1 z += uintptr(incr) goto __28 __27: if !(int32(*(*int8)(unsafe.Pointer(z))) == '+') { goto __29 } z += uintptr(incr) __29: ; __28: ; // copy digits to exponent __30: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x04 != 0) { goto __31 } if e < 10000 { e = e*10 + (int32(*(*int8)(unsafe.Pointer(z))) - '0') } else { e = 10000 } z += uintptr(incr) eValid = 1 goto __30 __31: ; __25: ; // skip trailing spaces __32: if !(z < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x01 != 0) { goto __33 } z += uintptr(incr) goto __32 __33: ; do_atof_calc: // adjust exponent by d, and update sign e = e*esign + d if !(e < 0) { goto __34 } esign = -1 e = e * -1 goto __35 __34: esign = 1 __35: ; if !(s == int64(0)) { goto __36 } // In the IEEE 754 standard, zero is signed. if sign < 0 { result = -libc.Float64FromFloat64(float64(0)) } else { result = float64(0) } goto __37 __36: // Attempt to reduce exponent. // // Branches that are not required for the correct answer but which only // help to obtain the correct answer faster are marked with special // comments, as a hint to the mutation tester. __38: if !(e > 0) { goto __39 } //OPTIMIZATION-IF-TRUE if !(esign > 0) { goto __40 } if !(s >= (int64(0xffffffff)|I64(int64(0x7fffffff))<<32)/int64(10)) { goto __42 } goto __39 __42: ; //OPTIMIZATION-IF-FALSE s = s * int64(10) goto __41 __40: if !(s%int64(10) != int64(0)) { goto __43 } goto __39 __43: ; //OPTIMIZATION-IF-FALSE s = s / int64(10) __41: ; e-- goto __38 __39: ; // adjust the sign of significand if sign < 0 { s = -s } else { s = s } if !(e == 0) { goto __44 } //OPTIMIZATION-IF-TRUE result = float64(s) goto __45 __44: // attempt to handle extremely small/large numbers better if !(e > 307) { goto __46 } //OPTIMIZATION-IF-TRUE if !(e < 342) { goto __48 } //OPTIMIZATION-IF-TRUE scale = sqlite3Pow10(tls, e-308) if !(esign < 0) { goto __50 } result = float64(s) / scale result = result / 1.0e+308 goto __51 __50: result = float64(s) * scale result = result * 1.0e+308 __51: ; goto __49 __48: ; if !(esign < 0) { goto __52 } result = 0.0 * float64(s) goto __53 __52: result = float64(libc.X__builtin_inff(tls) * float32(s)) __53: ; __49: ; goto __47 __46: scale1 = sqlite3Pow10(tls, e) if !(esign < 0) { goto __54 } result = float64(s) / scale1 goto __55 __54: result = float64(s) * scale1 __55: ; __47: ; __45: ; __37: ; // store the result *(*float64)(unsafe.Pointer(pResult)) = result // return true if number and no extra non-whitespace chracters after if !(z == zEnd && nDigit > 0 && eValid != 0 && eType > 0) { goto __56 } return eType goto __57 __56: if !(eType >= 2 && (eType == 3 || eValid != 0) && nDigit > 0) { goto __58 } return -1 goto __59 __58: return 0 __59: ; __57: ; return int32(0) } // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33228:21: */ bp := tls.Alloc(22) defer tls.Free(22) var i int32 var x U64 // var zTemp [22]int8 at bp, 22 if v < int64(0) { if v == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { x = U64(uint64(1)) << 63 } else { x = U64(-v) } } else { x = U64(v) } i = int32(uint64(unsafe.Sizeof([22]int8{})) - uint64(2)) *(*int8)(unsafe.Pointer(bp + 21)) = int8(0) for __ccgo := true; __ccgo; __ccgo = x != 0 { *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = int8(x%uint64(10) + uint64('0')) x = x / uint64(10) } if v < int64(0) { *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-') } libc.Xmemcpy(tls, zOut, bp+uintptr(i+1), uint64(unsafe.Sizeof([22]int8{}))-uint64(1)-uint64(i)) } // 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, // // compare2pow63("9223372036854775800", 1) // // will return -8. func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33261:12: */ var c int32 = 0 var i int32 // 012345678901234567 var pow63 uintptr = ts + 1560 /* "9223372036854775..." */ for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } if c == 0 { c = int32(*(*int8)(unsafe.Pointer(zNum + uintptr(18*incr)))) - '8' } return c } // Convert zNum to a 64-bit signed integer. zNum must be decimal. This // routine does *not* accept hexadecimal notation. // // Returns: // // -1 Not even a prefix of the input text looks like an integer // 0 Successful transformation. Fits in a 64-bit signed integer. // 1 Excess non-space text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 // // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33294:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive var i int32 var c int32 = 0 var nonNum int32 = 0 // True if input contains UTF16 with high byte non-zero var rc int32 // Baseline return code var zStart uintptr var zEnd uintptr = zNum + uintptr(length) if int32(enc) == SQLITE_UTF8 { incr = 1 } else { incr = 2 length = length & libc.CplInt32(1) for i = 3 - int32(enc); i < length && int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))) == 0; i = i + 2 { } nonNum = libc.Bool32(i < length) zEnd = zNum + uintptr(i^1) zNum += uintptr(int32(enc) & 1) } for zNum < zEnd && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum)))])&0x01 != 0 { zNum += uintptr(incr) } if zNum < zEnd { if int32(*(*int8)(unsafe.Pointer(zNum))) == '-' { neg = 1 zNum += uintptr(incr) } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '+' { zNum += uintptr(incr) } } zStart = zNum for zNum < zEnd && int32(*(*int8)(unsafe.Pointer(zNum))) == '0' { zNum += uintptr(incr) } // Skip leading zeros. for i = 0; zNum+uintptr(i) < zEnd && libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))) >= '0' && c <= '9'; i = i + incr { u = u*uint64(10) + U64(c) - uint64('0') } if u > uint64(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { // This test and assignment is needed only to suppress UB warnings // from clang and -fsanitize=undefined. This test and assignment make // the code a little larger and slower, and no harm comes from omitting // them, but we must appaise the undefined-behavior pharisees. *(*I64)(unsafe.Pointer(pNum)) = func() int64 { if neg != 0 { return int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) } return int64(0xffffffff) | I64(int64(0x7fffffff))<<32 }() } else if neg != 0 { *(*I64)(unsafe.Pointer(pNum)) = -I64(u) } else { *(*I64)(unsafe.Pointer(pNum)) = I64(u) } rc = 0 if i == 0 && zStart == zNum { // No digits rc = -1 } else if nonNum != 0 { // UTF16 with high-order bytes non-zero rc = 1 } else if zNum+uintptr(i) < zEnd { // Extra bytes at the end var jj int32 = i for __ccgo := true; __ccgo; __ccgo = zNum+uintptr(jj) < zEnd { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(jj))))])&0x01 != 0) { rc = 1 // Extra non-space text after the integer break } jj = jj + incr } } if i < 19*incr { // Less than 19 digits, so we know that it fits in 64 bits return rc } else { // zNum is a 19-digit numbers. Compare it against 9223372036854775808. if i > 19*incr { c = 1 } else { c = compare2pow63(tls, zNum, incr) } if c < 0 { // zNum is less than 9223372036854775808 so it fits return rc } else { *(*I64)(unsafe.Pointer(pNum)) = func() int64 { if neg != 0 { return int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) } return int64(0xffffffff) | I64(int64(0x7fffffff))<<32 }() if c > 0 { // zNum is greater than 9223372036854775808 so it overflows return 2 } else { // zNum is exactly 9223372036854775808. Fits if negative. The // special case 2 overflow if positive if neg != 0 { return rc } return 3 } } } return int32(0) } // Transform a UTF-8 integer literal, in either decimal or hexadecimal, // into a 64-bit signed integer. This routine accepts hexadecimal literals, // whereas sqlite3Atoi64() does not. // // Returns: // // 0 Successful transformation. Fits in a 64-bit signed integer. // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33397:20: */ bp := tls.Alloc(8) defer tls.Free(8) if int32(*(*int8)(unsafe.Pointer(z))) == '0' && (int32(*(*int8)(unsafe.Pointer(z + 1))) == 'x' || int32(*(*int8)(unsafe.Pointer(z + 1))) == 'X') { *(*U64)(unsafe.Pointer(bp /* u */)) = uint64(0) var i int32 var k int32 for i = 2; int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == '0'; i++ { } for k = i; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(k))))])&0x08 != 0; k++ { *(*U64)(unsafe.Pointer(bp /* u */)) = *(*U64)(unsafe.Pointer(bp))*uint64(16) + U64(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))))) } libc.Xmemcpy(tls, pOut, bp, uint64(8)) if int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))) == 0 && k-i <= 16 { return 0 } return 2 } else { return Xsqlite3Atoi64(tls, z, pOut, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) } return int32(0) } // If zNum represents an integer that will fit in 32-bits, then set // *pValue to that integer and return true. Otherwise return false. // // This routine accepts both decimal and hexadecimal notation for integers. // // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33427:20: */ bp := tls.Alloc(4) defer tls.Free(4) var v Sqlite_int64 = int64(0) var i int32 var c int32 var neg int32 = 0 if int32(*(*int8)(unsafe.Pointer(zNum))) == '-' { neg = 1 zNum++ } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '+' { zNum++ } else if int32(*(*int8)(unsafe.Pointer(zNum))) == '0' && (int32(*(*int8)(unsafe.Pointer(zNum + 1))) == 'x' || int32(*(*int8)(unsafe.Pointer(zNum + 1))) == 'X') && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + 2)))])&0x08 != 0 { *(*U32)(unsafe.Pointer(bp /* u */)) = U32(0) zNum += uintptr(2) for int32(*(*int8)(unsafe.Pointer(zNum))) == '0' { zNum++ } for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))])&0x08 != 0 && i < 8; i++ { *(*U32)(unsafe.Pointer(bp /* u */)) = *(*U32)(unsafe.Pointer(bp))*U32(16) + U32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))))) } if *(*U32)(unsafe.Pointer(bp))&0x80000000 == U32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))])&0x08 == 0 { libc.Xmemcpy(tls, pValue, bp, uint64(4)) return 1 } else { return 0 } } if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum)))])&0x04 != 0) { return 0 } for int32(*(*int8)(unsafe.Pointer(zNum))) == '0' { zNum++ } for i = 0; i < 11 && libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))-'0') >= 0 && c <= 9; i++ { v = v*int64(10) + Sqlite_int64(c) } // The longest decimal representation of a 32 bit integer is 10 digits: // // 1234567890 // 2^31 -> 2147483648 if i > 10 { return 0 } if v-Sqlite_int64(neg) > int64(2147483647) { return 0 } if neg != 0 { v = -v } *(*int32)(unsafe.Pointer(pValue)) = int32(v) return 1 } // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33486:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* x */)) = 0 Xsqlite3GetInt32(tls, z, bp) return *(*int32)(unsafe.Pointer(bp /* x */)) } // Try to convert z into an unsigned 32-bit integer. Return true on // success and false if there is an error. // // Only decimal notation is accepted. func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33498:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { v = v*uint64(10) + U64(*(*int8)(unsafe.Pointer(z + uintptr(i)))) - uint64('0') if v > uint64(4294967296) { *(*U32)(unsafe.Pointer(pI)) = U32(0) return 0 } } if i == 0 || int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != 0 { *(*U32)(unsafe.Pointer(pI)) = U32(0) return 0 } *(*U32)(unsafe.Pointer(pI)) = U32(v) return 1 } // The variable-length integer encoding is as follows: // // KEY: // A = 0xxxxxxx 7 bits of data and one flag bit // B = 1xxxxxxx 7 bits of data and one flag bit // C = xxxxxxxx 8 bits of data // // 7 bits - A // 14 bits - BA // 21 bits - BBA // 28 bits - BBBA // 35 bits - BBBBA // 42 bits - BBBBBA // 49 bits - BBBBBBA // 56 bits - BBBBBBBA // 64 bits - BBBBBBBBC // Write a 64-bit variable-length integer to memory starting at p[0]. // The length of data write will be between 1 and 9 bytes. The number // of bytes written is returned. // // A variable-length integer consists of the lower 7 bits of each byte // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33539:28: */ bp := tls.Alloc(10) defer tls.Free(10) var i int32 var j int32 var n int32 // var buf [10]U8 at bp, 10 if v&(U64(uint64(0xff000000))<<32) != 0 { *(*uint8)(unsafe.Pointer(p + 8)) = U8(v) v >>= 8 for i = 7; i >= 0; i-- { *(*uint8)(unsafe.Pointer(p + uintptr(i))) = U8(v&uint64(0x7f) | uint64(0x80)) v >>= 7 } return 9 } n = 0 for __ccgo := true; __ccgo; __ccgo = v != uint64(0) { *(*U8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) v >>= 7 } *(*U8)(unsafe.Pointer(bp)) &= U8(0x7f) i = 0 j = n - 1 __1: if !(j >= 0) { goto __3 } { *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp + uintptr(j))) } goto __2 __2: j-- i++ goto __1 goto __3 __3: ; return n } func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33563:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 } if v <= uint64(0x3fff) { *(*uint8)(unsafe.Pointer(p)) = uint8(v>>7&uint64(0x7f) | uint64(0x80)) *(*uint8)(unsafe.Pointer(p + 1)) = uint8(v & uint64(0x7f)) return 2 } return putVarint64(tls, p, v) } // Bitmasks used by sqlite3GetVarint(). These precomputed constants // are defined here rather than simply putting the constant expressions // inline in order to work around bugs in the RVT compiler. // // SLOT_2_0 A mask for (0x7f<<14) | 0x7f // // SLOT_4_2_0 A mask for (0x7f<<28) | SLOT_2_0 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33593:19: */ var a U32 var b U32 var s U32 if int32(*(*int8)(unsafe.Pointer(p))) >= 0 { *(*U64)(unsafe.Pointer(v)) = U64(*(*uint8)(unsafe.Pointer(p))) return U8(1) } if int32(*(*int8)(unsafe.Pointer(p + 1))) >= 0 { *(*U64)(unsafe.Pointer(v)) = U64(U32(int32(*(*uint8)(unsafe.Pointer(p)))&0x7f)<<7 | U32(*(*uint8)(unsafe.Pointer(p + 1)))) return U8(2) } // Verify that constants are precomputed correctly a = U32(*(*uint8)(unsafe.Pointer(p))) << 14 b = U32(*(*uint8)(unsafe.Pointer(p + 1))) p += uintptr(2) a = a | U32(*(*uint8)(unsafe.Pointer(p))) // a: p0<<14 | p2 (unmasked) if !(a&U32(0x80) != 0) { a = a & U32(SLOT_2_0) b = b & U32(0x7f) b = b << 7 a = a | b *(*U64)(unsafe.Pointer(v)) = U64(a) return U8(3) } // CSE1 from below a = a & U32(SLOT_2_0) p++ b = b << 14 b = b | U32(*(*uint8)(unsafe.Pointer(p))) // b: p1<<14 | p3 (unmasked) if !(b&U32(0x80) != 0) { b = b & U32(SLOT_2_0) // moved CSE1 up // a &= (0x7f<<14)|(0x7f); a = a << 7 a = a | b *(*U64)(unsafe.Pointer(v)) = U64(a) return U8(4) } // a: p0<<14 | p2 (masked) // b: p1<<14 | p3 (unmasked) // 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) // moved CSE1 up // a &= (0x7f<<14)|(0x7f); b = b & U32(SLOT_2_0) s = a // s: p0<<14 | p2 (masked) p++ a = a << 14 a = a | U32(*(*uint8)(unsafe.Pointer(p))) // a: p0<<28 | p2<<14 | p4 (unmasked) if !(a&U32(0x80) != 0) { // we can skip these cause they were (effectively) done above // while calculating s // a &= (0x7f<<28)|(0x7f<<14)|(0x7f); // b &= (0x7f<<14)|(0x7f); b = b << 7 a = a | b s = s >> 18 *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) return U8(5) } // 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) s = s << 7 s = s | b // s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) p++ b = b << 14 b = b | U32(*(*uint8)(unsafe.Pointer(p))) // b: p1<<28 | p3<<14 | p5 (unmasked) if !(b&U32(0x80) != 0) { // we can skip this cause it was (effectively) done above in calc'ing s // b &= (0x7f<<28)|(0x7f<<14)|(0x7f); a = a & U32(SLOT_2_0) a = a << 7 a = a | b s = s >> 18 *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) return U8(6) } p++ a = a << 14 a = a | U32(*(*uint8)(unsafe.Pointer(p))) // a: p2<<28 | p4<<14 | p6 (unmasked) if !(a&U32(0x80) != 0) { a = a & SLOT_4_2_0 b = b & U32(SLOT_2_0) b = b << 7 a = a | b s = s >> 11 *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) return U8(7) } // CSE2 from below a = a & U32(SLOT_2_0) p++ b = b << 14 b = b | U32(*(*uint8)(unsafe.Pointer(p))) // b: p3<<28 | p5<<14 | p7 (unmasked) if !(b&U32(0x80) != 0) { b = b & SLOT_4_2_0 // moved CSE2 up // a &= (0x7f<<14)|(0x7f); a = a << 7 a = a | b s = s >> 4 *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) return U8(8) } p++ a = a << 15 a = a | U32(*(*uint8)(unsafe.Pointer(p))) // a: p4<<29 | p6<<15 | p8 (unmasked) // moved CSE2 up // a &= (0x7f<<29)|(0x7f<<15)|(0xff); b = b & U32(SLOT_2_0) b = b << 8 a = a | b s = s << 4 b = U32(*(*uint8)(unsafe.Pointer(p + libc.UintptrFromInt32(-4)))) b = b & U32(0x7f) b = b >> 3 s = s | b *(*U64)(unsafe.Pointer(v)) = U64(s)<<32 | U64(a) return U8(9) } // Read a 32-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. // // If the varint stored in p[0] is larger than can fit in a 32-bit unsigned // integer, then set *v to 0xffffffff. // // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33754:19: */ bp := tls.Alloc(8) defer tls.Free(8) var a U32 var b U32 // The 1-byte case. Overwhelmingly the most common. Handled inline // by the getVarin32() macro a = U32(*(*uint8)(unsafe.Pointer(p))) // a: p0 (unmasked) // The 2-byte case p++ b = U32(*(*uint8)(unsafe.Pointer(p))) // b: p1 (unmasked) if !(b&U32(0x80) != 0) { // Values between 128 and 16383 a = a & U32(0x7f) a = a << 7 *(*U32)(unsafe.Pointer(v)) = a | b return U8(2) } // The 3-byte case p++ a = a << 14 a = a | U32(*(*uint8)(unsafe.Pointer(p))) // a: p0<<14 | p2 (unmasked) if !(a&U32(0x80) != 0) { // Values between 16384 and 2097151 a = a & U32(int32(0x7f)<<14|0x7f) b = b & U32(0x7f) b = b << 7 *(*U32)(unsafe.Pointer(v)) = a | b return U8(3) } /* A 32-bit varint is used to store size information in btrees. ** Objects are rarely larger than 2MiB limit of a 3-byte varint. ** A 3-byte varint is sufficient, for example, to record the size ** of a 1048569-byte BLOB or string. ** ** We only unroll the first 1-, 2-, and 3- byte cases. The very ** rare larger cases can be handled by the slower 64-bit varint ** routine. */ { // var v64 U64 at bp, 8 var n U8 n = Xsqlite3GetVarint(tls, p-uintptr(2), bp) if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<32-uint64(1)) != *(*U64)(unsafe.Pointer(bp)) { *(*U32)(unsafe.Pointer(v)) = 0xffffffff } else { *(*U32)(unsafe.Pointer(v)) = U32(*(*U64)(unsafe.Pointer(bp /* v64 */))) } return n } return U8(0) } // Return the number of bytes that will be needed to store the given // 64-bit integer. func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33876:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } return i } // Read or write a four-byte big-endian integer value. func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33886:20: */ bp := tls.Alloc(4) defer tls.Free(4) // var x U32 at bp, 4 libc.Xmemcpy(tls, bp, p, uint64(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33904:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp /* x */)) = libc.X__builtin_bswap32(tls, v) libc.Xmemcpy(tls, p, bp, uint64(4)) } // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33928:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a BLOB literal of the form "x'hhhhhh'" into its binary // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33946:21: */ var zBlob uintptr var i int32 zBlob = Xsqlite3DbMallocRawNN(tls, db, uint64(n/2+1)) n-- if zBlob != 0 { for i = 0; i < n; i = i + 2 { *(*int8)(unsafe.Pointer(zBlob + uintptr(i/2))) = int8(int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(i))))))<<4 | int32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(i+1))))))) } *(*int8)(unsafe.Pointer(zBlob + uintptr(i/2))) = int8(0) } return zBlob } // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". func logBadConnection(tls *libc.TLS, zType uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33967:13: */ bp := tls.Alloc(8) defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, ts+1579, libc.VaList(bp, zType)) } // Check to make sure we have a valid db pointer. This test is not // foolproof but it does provide some measure of protection against // misuse of the interface such as passing in db pointers that are // NULL or which have been previously closed. If this routine returns // 1 it means that the db pointer is valid and 0 if it should not be // dereferenced for any reason. The calling function should invoke // SQLITE_MISUSE immediately. // // sqlite3SafetyCheckOk() requires that the db pointer be valid for // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:33988:20: */ var eOpenState U8 if db == uintptr(0) { logBadConnection(tls, ts+1525) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { logBadConnection(tls, ts+1624) } return 0 } else { return 1 } return int32(0) } func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34005:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { logBadConnection(tls, ts+1633) return 0 } else { return 1 } return int32(0) } // Attempt to add, substract, or multiply the 64-bit signed value iB against // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34025:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34045:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34060:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34086:20: */ if x >= 0 { return x } if x == libc.Int32FromUint32(0x80000000) { return 0x7fffffff } return -x } // Find (an approximate) sum of two LogEst values. This computation is // not a simple "+" operator because LogEst is stored as a logarithmic // value. // func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34129:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a } if int32(a) > int32(b)+31 { return LogEst(int32(a) + 1) } return LogEst(int32(a) + int32(x1[int32(a)-int32(b)])) } else { if int32(b) > int32(a)+49 { return b } if int32(b) > int32(a)+31 { return LogEst(int32(b) + 1) } return LogEst(int32(b) + int32(x1[int32(b)-int32(a)])) } return LogEst(0) } var x1 = [32]uint8{ uint8(10), uint8(10), // 0,1 uint8(9), uint8(9), // 2,3 uint8(8), uint8(8), // 4,5 uint8(7), uint8(7), uint8(7), // 6,7,8 uint8(6), uint8(6), uint8(6), // 9,10,11 uint8(5), uint8(5), uint8(5), // 12-14 uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34130:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34156:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { return int16(0) } for x < uint64(8) { y = int16(int32(y) - 10) x <<= 1 } } else { var i int32 = 60 - libc.X__builtin_clzll(tls, x) y = LogEst(int32(y) + i*10) x >>= i } return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34157:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34179:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x // var a U64 at bp, 8 var e LogEst if *(*float64)(unsafe.Pointer(bp + 8)) <= float64(1) { return int16(0) } if *(*float64)(unsafe.Pointer(bp + 8)) <= float64(2000000000) { return Xsqlite3LogEst(tls, U64(*(*float64)(unsafe.Pointer(bp + 8 /* x */)))) } libc.Xmemcpy(tls, bp, bp+8, uint64(8)) e = LogEst(*(*U64)(unsafe.Pointer(bp))>>52 - uint64(1022)) return LogEst(int32(e) * 10) } // Convert a LogEst into an integer. func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34193:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) if n >= uint64(5) { n = n - uint64(2) } else if n >= uint64(1) { n = n - uint64(1) } if int32(x) > 60 { return uint64(int64(0xffffffff) | I64(int64(0x7fffffff))<<32) } if int32(x) >= 3 { return (n + uint64(8)) << (int32(x) - 3) } return (n + uint64(8)) >> (3 - int32(x)) } // Add a new name/number pair to a VList. This might require that the // VList object be reallocated, so return the new VList. If an OOM // error occurs, the original VList returned and the // db->mallocFailed flag is set. // // A VList is really just an array of integers. To destroy a VList, // simply pass it to sqlite3DbFree(). // // The first integer is the number of integers allocated for the whole // VList. The second integer is the number of integers actually used. // Each name/number pair is encoded by subsequent groups of 3 or more // integers. // // Each name/number pair starts with two integers which are the numeric // value for the pair and the size of the name/number pair, respectively. // The text name overlays one or more following integers. The text name // is always zero-terminated. // // Conceptually: // // struct VList { // int nAlloc; // Number of allocated slots // int nUsed; // Number of used slots // struct VListEntry { // int iValue; // Value for this entry // int nSlot; // Slots used by this entry // // ... variable name goes here // } a[0]; // } // // During code generation, pointers to the variable names within the // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34239:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored nInt = nName/4 + 3 // Verify ok to add new elements if pIn == uintptr(0) || *(*VList)(unsafe.Pointer(pIn + 1*4))+nInt > *(*VList)(unsafe.Pointer(pIn)) { // Enlarge the allocation var nAlloc Sqlite3_int64 = func() int64 { if pIn != 0 { return int64(2) * Sqlite3_int64(*(*VList)(unsafe.Pointer(pIn))) } return int64(10) }() + Sqlite3_int64(nInt) var pOut uintptr = Xsqlite3DbRealloc(tls, db, pIn, uint64(nAlloc)*uint64(unsafe.Sizeof(int32(0)))) if pOut == uintptr(0) { return pIn } if pIn == uintptr(0) { *(*VList)(unsafe.Pointer(pOut + 1*4)) = 2 } pIn = pOut *(*VList)(unsafe.Pointer(pIn)) = VList(nAlloc) } i = *(*VList)(unsafe.Pointer(pIn + 1*4)) *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) = iVal *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) = nInt z = pIn + uintptr(i+2)*4 *(*VList)(unsafe.Pointer(pIn + 1*4)) = i + nInt libc.Xmemcpy(tls, z, zName, uint64(nName)) *(*int8)(unsafe.Pointer(z + uintptr(nName))) = int8(0) return pIn } // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34277:27: */ var i int32 var mx int32 if pIn == uintptr(0) { return uintptr(0) } mx = *(*VList)(unsafe.Pointer(pIn + 1*4)) i = 2 for __ccgo := true; __ccgo; __ccgo = i < mx { if *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) == iVal { return pIn + uintptr(i+2)*4 } i = i + *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) } return uintptr(0) } // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34293:20: */ var i int32 var mx int32 if pIn == uintptr(0) { return 0 } mx = *(*VList)(unsafe.Pointer(pIn + 1*4)) i = 2 for __ccgo := true; __ccgo; __ccgo = i < mx { var z uintptr = pIn + uintptr(i+2)*4 if libc.Xstrncmp(tls, z, zName, uint64(nName)) == 0 && int32(*(*int8)(unsafe.Pointer(z + uintptr(nName)))) == 0 { return *(*VList)(unsafe.Pointer(pIn + uintptr(i)*4)) } i = i + *(*VList)(unsafe.Pointer(pIn + uintptr(i+1)*4)) } return 0 } //************* End of util.c *********************************************** //************* Begin file hash.c ******************************************* // 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 implementation of generic hash-tables // used in SQLite. // #include "sqliteInt.h" // #include <assert.h> // Turn bulk memory into a hash table object by initializing the // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34330:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) (*Hash)(unsafe.Pointer(pNew)).Fhtsize = uint32(0) (*Hash)(unsafe.Pointer(pNew)).Fht = uintptr(0) } // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34342:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst (*Hash)(unsafe.Pointer(pH)).Ffirst = uintptr(0) Xsqlite3_free(tls, (*Hash)(unsafe.Pointer(pH)).Fht) (*Hash)(unsafe.Pointer(pH)).Fht = uintptr(0) (*Hash)(unsafe.Pointer(pH)).Fhtsize = uint32(0) for elem != 0 { var next_elem uintptr = (*HashElem)(unsafe.Pointer(elem)).Fnext Xsqlite3_free(tls, elem) elem = next_elem } (*Hash)(unsafe.Pointer(pH)).Fcount = uint32(0) } // The hashing function. func strHash(tls *libc.TLS, z uintptr) uint32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34362:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE // Knuth multiplicative hashing. (Sorting & Searching, p. 510). // 0x9e3779b1 is 2654435761 which is the closest prime number to // (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. h = h + uint32(Xsqlite3UpperToLower[c]) h = h * 0x9e3779b1 } return h } // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34379:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { pHead = (*_ht)(unsafe.Pointer(pEntry)).Fchain } else { pHead = uintptr(0) } (*_ht)(unsafe.Pointer(pEntry)).Fcount++ (*_ht)(unsafe.Pointer(pEntry)).Fchain = pNew } else { pHead = uintptr(0) } if pHead != 0 { (*HashElem)(unsafe.Pointer(pNew)).Fnext = pHead (*HashElem)(unsafe.Pointer(pNew)).Fprev = (*HashElem)(unsafe.Pointer(pHead)).Fprev if (*HashElem)(unsafe.Pointer(pHead)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(pHead)).Fprev)).Fnext = pNew } else { (*Hash)(unsafe.Pointer(pH)).Ffirst = pNew } (*HashElem)(unsafe.Pointer(pHead)).Fprev = pNew } else { (*HashElem)(unsafe.Pointer(pNew)).Fnext = (*Hash)(unsafe.Pointer(pH)).Ffirst if (*Hash)(unsafe.Pointer(pH)).Ffirst != 0 { (*HashElem)(unsafe.Pointer((*Hash)(unsafe.Pointer(pH)).Ffirst)).Fprev = pNew } (*HashElem)(unsafe.Pointer(pNew)).Fprev = uintptr(0) (*Hash)(unsafe.Pointer(pH)).Ffirst = pNew } } // Resize the hash table so that it cantains "new_size" buckets. // // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34413:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements if uint64(new_size)*uint64(unsafe.Sizeof(_ht{})) > uint64(SQLITE_MALLOC_SOFT_LIMIT) { new_size = uint32(uint64(SQLITE_MALLOC_SOFT_LIMIT) / uint64(unsafe.Sizeof(_ht{}))) } if new_size == (*Hash)(unsafe.Pointer(pH)).Fhtsize { return 0 } // The inability to allocates space for a larger hash table is // a performance hit but it is not a fatal error. So mark the // allocation as a benign. Use sqlite3Malloc()/memset(0) instead of // sqlite3MallocZero() to make the allocation, as sqlite3MallocZero() // only zeroes the requested number of bytes whereas this module will // use the actual amount of space allocated for the hash table (which // may be larger than the requested amount). Xsqlite3BeginBenignMalloc(tls) new_ht = Xsqlite3Malloc(tls, uint64(new_size)*uint64(unsafe.Sizeof(_ht{}))) Xsqlite3EndBenignMalloc(tls) if new_ht == uintptr(0) { return 0 } Xsqlite3_free(tls, (*Hash)(unsafe.Pointer(pH)).Fht) (*Hash)(unsafe.Pointer(pH)).Fht = new_ht (*Hash)(unsafe.Pointer(pH)).Fhtsize = libc.AssignUint32(&new_size, uint32(uint64(Xsqlite3MallocSize(tls, new_ht))/uint64(unsafe.Sizeof(_ht{})))) libc.Xmemset(tls, new_ht, 0, uint64(new_size)*uint64(unsafe.Sizeof(_ht{}))) elem = (*Hash)(unsafe.Pointer(pH)).Ffirst (*Hash)(unsafe.Pointer(pH)).Ffirst = uintptr(0) for ; elem != 0; elem = next_elem { var h uint32 = strHash(tls, (*HashElem)(unsafe.Pointer(elem)).FpKey) % new_size next_elem = (*HashElem)(unsafe.Pointer(elem)).Fnext insertElement(tls, pH, new_ht+uintptr(h)*16, elem) } return 1 } // This function (for internal use only) locates an element in an // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34454:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { //OPTIMIZATION-IF-TRUE var pEntry uintptr h = strHash(tls, pKey) % (*Hash)(unsafe.Pointer(pH)).Fhtsize pEntry = (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 elem = (*_ht)(unsafe.Pointer(pEntry)).Fchain count = (*_ht)(unsafe.Pointer(pEntry)).Fcount } else { h = uint32(0) elem = (*Hash)(unsafe.Pointer(pH)).Ffirst count = (*Hash)(unsafe.Pointer(pH)).Fcount } if pHash != 0 { *(*uint32)(unsafe.Pointer(pHash)) = h } for libc.PostDecUint32(&count, 1) != 0 { if Xsqlite3StrICmp(tls, (*HashElem)(unsafe.Pointer(elem)).FpKey, pKey) == 0 { return elem } elem = (*HashElem)(unsafe.Pointer(elem)).Fnext } return uintptr(unsafe.Pointer(&nullElement)) } var nullElement = HashElem{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34462:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34489:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext } else { (*Hash)(unsafe.Pointer(pH)).Ffirst = (*HashElem)(unsafe.Pointer(elem)).Fnext } if (*HashElem)(unsafe.Pointer(elem)).Fnext != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fnext)).Fprev = (*HashElem)(unsafe.Pointer(elem)).Fprev } if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { pEntry = (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(h)*16 if (*_ht)(unsafe.Pointer(pEntry)).Fchain == elem { (*_ht)(unsafe.Pointer(pEntry)).Fchain = (*HashElem)(unsafe.Pointer(elem)).Fnext } (*_ht)(unsafe.Pointer(pEntry)).Fcount-- } Xsqlite3_free(tls, elem) (*Hash)(unsafe.Pointer(pH)).Fcount-- if (*Hash)(unsafe.Pointer(pH)).Fcount == uint32(0) { Xsqlite3HashClear(tls, pH) } } // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34524:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } // Insert an element into the hash table pH. The key is pKey // and the data is "data". // // If no element exists with a matching key, then a new // element is created and NULL is returned. // // If another element already exists with the same key, then the // new data replaces the old data and the old data is returned. // The key is not copied in this instance. If a malloc fails, then // the new data is returned and the hash table is unchanged. // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34544:21: */ bp := tls.Alloc(4) defer tls.Free(4) // var h uint32 at bp, 4 // the hash of the key modulo hash table size var elem uintptr // Used to loop thru the element list var new_elem uintptr // New element added to the pH elem = findElementWithHash(tls, pH, pKey, bp) if (*HashElem)(unsafe.Pointer(elem)).Fdata != 0 { var old_data uintptr = (*HashElem)(unsafe.Pointer(elem)).Fdata if data == uintptr(0) { removeElementGivenHash(tls, pH, elem, *(*uint32)(unsafe.Pointer(bp /* h */))) } else { (*HashElem)(unsafe.Pointer(elem)).Fdata = data (*HashElem)(unsafe.Pointer(elem)).FpKey = pKey } return old_data } if data == uintptr(0) { return uintptr(0) } new_elem = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(HashElem{}))) if new_elem == uintptr(0) { return data } (*HashElem)(unsafe.Pointer(new_elem)).FpKey = pKey (*HashElem)(unsafe.Pointer(new_elem)).Fdata = data (*Hash)(unsafe.Pointer(pH)).Fcount++ if (*Hash)(unsafe.Pointer(pH)).Fcount >= uint32(10) && (*Hash)(unsafe.Pointer(pH)).Fcount > uint32(2)*(*Hash)(unsafe.Pointer(pH)).Fhtsize { if rehash(tls, pH, (*Hash)(unsafe.Pointer(pH)).Fcount*uint32(2)) != 0 { *(*uint32)(unsafe.Pointer(bp /* h */)) = strHash(tls, pKey) % (*Hash)(unsafe.Pointer(pH)).Fhtsize } } insertElement(tls, pH, func() uintptr { if (*Hash)(unsafe.Pointer(pH)).Fht != 0 { return (*Hash)(unsafe.Pointer(pH)).Fht + uintptr(*(*uint32)(unsafe.Pointer(bp)))*16 } return uintptr(0) }(), new_elem) return uintptr(0) } //************* End of hash.c *********************************************** //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34590:27: */ return azName[i] } var azName = [185]uintptr{ ts + 1641, ts + 1651, ts + 1662, ts + 1674, ts + 1685, ts + 1690, ts + 1695, ts + 1706, ts + 1718, ts + 1725, ts + 1733, ts + 1741, ts + 1746, ts + 1752, ts + 1766, ts + 1772, ts + 1782, ts + 1787, ts + 1792, ts + 1795, ts + 1799, ts + 1805, ts + 1818, ts + 1828, ts + 1835, ts + 1842, ts + 1849, ts + 1856, ts + 1866, ts + 1875, ts + 1886, ts + 1895, ts + 1901, ts + 1911, ts + 1921, ts + 1926, ts + 1936, ts + 1947, ts + 1952, ts + 1959, ts + 1965, ts + 1971, ts + 1977, ts + 1983, ts + 1986, ts + 1990, ts + 2001, ts + 2012, ts + 2020, ts + 2029, ts + 2035, ts + 2042, ts + 2050, ts + 2053, ts + 2056, ts + 2059, ts + 2062, ts + 2065, ts + 2068, ts + 2075, ts + 2085, ts + 2098, ts + 2109, ts + 2115, ts + 2122, ts + 2127, ts + 2136, ts + 2145, ts + 2152, ts + 2165, ts + 2176, ts + 2181, ts + 2189, ts + 2195, ts + 2202, ts + 2207, ts + 2216, ts + 2221, ts + 2230, ts + 2235, ts + 2240, ts + 2246, ts + 2254, ts + 2262, ts + 2272, ts + 2280, ts + 2287, ts + 2300, ts + 2305, ts + 2317, ts + 2325, ts + 2332, ts + 2343, ts + 2350, ts + 2357, ts + 2367, ts + 2376, ts + 2387, ts + 2393, ts + 2404, ts + 2414, ts + 2424, ts + 2433, ts + 2440, ts + 2446, ts + 2456, ts + 2467, ts + 2471, ts + 2480, ts + 2489, ts + 2496, ts + 2506, ts + 2513, ts + 2523, ts + 2531, ts + 2538, ts + 2552, ts + 2566, ts + 2574, ts + 2585, ts + 2598, ts + 2609, ts + 2615, ts + 2627, ts + 2636, ts + 2644, ts + 2653, ts + 2662, ts + 2669, ts + 2677, ts + 2684, ts + 2695, ts + 2709, ts + 2720, ts + 2728, ts + 2734, ts + 2742, ts + 2750, ts + 2760, ts + 2773, ts + 2783, ts + 2796, ts + 2805, ts + 2816, ts + 2824, ts + 2830, ts + 2842, ts + 2854, ts + 2862, ts + 2874, ts + 2887, ts + 2897, ts + 2907, ts + 2919, ts + 2924, ts + 2936, ts + 2946, ts + 2952, ts + 2962, ts + 2969, ts + 2981, ts + 2992, ts + 3000, ts + 3009, ts + 3018, ts + 3027, ts + 3034, ts + 3045, ts + 3058, ts + 3068, ts + 3075, ts + 3083, ts + 3092, ts + 3098, ts + 3106, ts + 3114, ts + 3122, ts + 3132, ts + 3141, ts + 3151, ts + 3157, ts + 3168, ts + 3179, ts + 3184, ts + 3192, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:34591:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** // 2004 May 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 file contains the VFS implementation for unix-like operating systems // include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others. // // There are actually several different VFS implementations in this file. // The differences are in the way that file locking is done. The default // implementation uses Posix Advisory Locks. Alternative implementations // use flock(), dot-files, various proprietary locking schemas, or simply // skip locking all together. // // This source file is organized into divisions where the logic for various // subfunctions is contained within the appropriate division. PLEASE // KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed // in the correct division and should be clearly labeled. // // The layout of divisions is as follows: // // * General-purpose declarations and utility functions. // * Unique file ID logic used by VxWorks. // * Various locking primitive implementations (all except proxy locking): // + for Posix Advisory Locks // + for no-op locks // + for dot-file locks // + for flock() locking // + for named semaphore locks (VxWorks only) // + for AFP filesystem locks (MacOSX only) // * sqlite3_file methods not associated with locking. // * Definitions of sqlite3_io_methods objects for all locking // methods plus "finder" functions for each locking method. // * sqlite3_vfs method implementations. // * Locking primitives for the proxy uber-locking-method. (MacOSX only) // * Definitions of sqlite3_vfs objects for all locking methods // plus implementations of sqlite3_os_init() and sqlite3_os_end(). // #include "sqliteInt.h" //************* End of os_unix.c ******************************************** //************* Begin file os_win.c ***************************************** // 2004 May 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 file contains code that is specific to Windows. // #include "sqliteInt.h" // Include code that is common to all os_*.c files // #include "os_common.h" // Include the header file for the Windows VFS. // #include "os_win.h" // Compiling and using WAL mode requires several APIs that are only // available in Windows platforms based on the NT kernel. // Are most of the Win32 ANSI APIs available (i.e. with certain exceptions // based on the sub-platform)? // Are most of the Win32 Unicode APIs available (i.e. with certain exceptions // based on the sub-platform)? // Make sure at least one set of Win32 APIs is available. // Define the required Windows SDK version constants if they are not // already available. // Check to see if the GetVersionEx[AW] functions are deprecated on the // target system. GetVersionEx was first deprecated in Win8.1. // Check to see if the CreateFileMappingA function is supported on the // target system. It is unavailable when using "mincore.lib" on Win10. // When compiling for Windows 10, always assume "mincore.lib" is in use. // This constant should already be defined (in the "WinDef.h" SDK file). // Maximum pathname length (in chars) for Win32. This should normally be // MAX_PATH. // This constant should already be defined (in the "WinNT.h" SDK file). // Maximum pathname length (in chars) for WinNT. This should normally be // UNICODE_STRING_MAX_CHARS. // Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in // characters, so we allocate 4 bytes per character assuming worst-case of // 4-bytes-per-character for UTF8. // Maximum pathname length (in bytes) for WinNT. This should normally be // UNICODE_STRING_MAX_CHARS * sizeof(WCHAR). // Maximum error message length (in chars) for WinRT. // Returns non-zero if the character should be treated as a directory // separator. // This macro is used when a local variable is set to a value that is // [sometimes] not used by the code (e.g. via conditional compilation). // Returns the character that should be used as the directory separator. // Do we need to manually define the Win32 file mapping APIs for use with WAL // mode or memory mapped files (e.g. these APIs are available in the Windows // CE SDK; however, they are not present in the header file)? // Some Microsoft compilers lack this definition. // Forward references to structures used for WAL type winShm = struct { FpShmNode uintptr FpNext uintptr FhasMutex U8 F__ccgo_pad1 [1]byte FsharedMask U16 FexclMask U16 F__ccgo_pad2 [2]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43162:9 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** // 2004 May 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 file contains the VFS implementation for unix-like operating systems // include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others. // // There are actually several different VFS implementations in this file. // The differences are in the way that file locking is done. The default // implementation uses Posix Advisory Locks. Alternative implementations // use flock(), dot-files, various proprietary locking schemas, or simply // skip locking all together. // // This source file is organized into divisions where the logic for various // subfunctions is contained within the appropriate division. PLEASE // KEEP THE STRUCTURE OF THIS FILE INTACT. New code should be placed // in the correct division and should be clearly labeled. // // The layout of divisions is as follows: // // * General-purpose declarations and utility functions. // * Unique file ID logic used by VxWorks. // * Various locking primitive implementations (all except proxy locking): // + for Posix Advisory Locks // + for no-op locks // + for dot-file locks // + for flock() locking // + for named semaphore locks (VxWorks only) // + for AFP filesystem locks (MacOSX only) // * sqlite3_file methods not associated with locking. // * Definitions of sqlite3_io_methods objects for all locking // methods plus "finder" functions for each locking method. // * sqlite3_vfs method implementations. // * Locking primitives for the proxy uber-locking-method. (MacOSX only) // * Definitions of sqlite3_vfs objects for all locking methods // plus implementations of sqlite3_os_init() and sqlite3_os_end(). // #include "sqliteInt.h" //************* End of os_unix.c ******************************************** //************* Begin file os_win.c ***************************************** // 2004 May 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 file contains code that is specific to Windows. // #include "sqliteInt.h" // Include code that is common to all os_*.c files // #include "os_common.h" // Include the header file for the Windows VFS. // #include "os_win.h" // Compiling and using WAL mode requires several APIs that are only // available in Windows platforms based on the NT kernel. // Are most of the Win32 ANSI APIs available (i.e. with certain exceptions // based on the sub-platform)? // Are most of the Win32 Unicode APIs available (i.e. with certain exceptions // based on the sub-platform)? // Make sure at least one set of Win32 APIs is available. // Define the required Windows SDK version constants if they are not // already available. // Check to see if the GetVersionEx[AW] functions are deprecated on the // target system. GetVersionEx was first deprecated in Win8.1. // Check to see if the CreateFileMappingA function is supported on the // target system. It is unavailable when using "mincore.lib" on Win10. // When compiling for Windows 10, always assume "mincore.lib" is in use. // This constant should already be defined (in the "WinDef.h" SDK file). // Maximum pathname length (in chars) for Win32. This should normally be // MAX_PATH. // This constant should already be defined (in the "WinNT.h" SDK file). // Maximum pathname length (in chars) for WinNT. This should normally be // UNICODE_STRING_MAX_CHARS. // Maximum pathname length (in bytes) for Win32. The MAX_PATH macro is in // characters, so we allocate 4 bytes per character assuming worst-case of // 4-bytes-per-character for UTF8. // Maximum pathname length (in bytes) for WinNT. This should normally be // UNICODE_STRING_MAX_CHARS * sizeof(WCHAR). // Maximum error message length (in chars) for WinRT. // Returns non-zero if the character should be treated as a directory // separator. // This macro is used when a local variable is set to a value that is // [sometimes] not used by the code (e.g. via conditional compilation). // Returns the character that should be used as the directory separator. // Do we need to manually define the Win32 file mapping APIs for use with WAL // mode or memory mapped files (e.g. these APIs are available in the Windows // CE SDK; however, they are not present in the header file)? // Some Microsoft compilers lack this definition. // Forward references to structures used for WAL type WinShm = winShm /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43162:23 */ // A connection to shared-memory type winShmNode = struct { Fmutex uintptr FzFilename uintptr FhFile WinFile FszRegion int32 FnRegion int32 FisReadonly U8 FisUnlocked U8 F__ccgo_pad1 [6]byte FaRegion uintptr FlastErrno DWORD FnRef int32 FpFirst uintptr FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43162:9 */ // A connection to shared-memory type WinShmNode = winShmNode /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43163:27 */ // A region of shared-memory // WinCE lacks native support for file locking so we have to fake it // with some code of our own. // The winFile structure is a subclass of sqlite3_file* specific to the win32 // portability layer. type winFile = struct { FpMethod uintptr FpVfs uintptr Fh HANDLE Flocktype U8 F__ccgo_pad1 [1]byte FsharedLockByte int16 FctrlFlags U8 F__ccgo_pad2 [3]byte FlastErrno DWORD F__ccgo_pad3 [4]byte FpShm uintptr FzPath uintptr FszChunk int32 FnFetchOut int32 FhMap HANDLE FpMapRegion uintptr FmmapSize Sqlite3_int64 FmmapSizeMax Sqlite3_int64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43162:9 */ // A region of shared-memory // WinCE lacks native support for file locking so we have to fake it // with some code of our own. // The winFile structure is a subclass of sqlite3_file* specific to the win32 // portability layer. type WinFile = winFile /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43183:24 */ // The winVfsAppData structure is used for the pAppData member for all of the // Win32 VFS variants. type winVfsAppData = struct { FpMethod uintptr FpAppData uintptr FbNoLock WINBOOL F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43217:9 */ // The winVfsAppData structure is used for the pAppData member for all of the // Win32 VFS variants. type WinVfsAppData = winVfsAppData /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43217:30 */ // Allowed values for winFile.ctrlFlags // The size of the buffer used by sqlite3_win32_write_debug(). // If compiled with SQLITE_WIN32_MALLOC on Windows, we will use the // various Win32 API heap functions instead of our own. // The following variable is (normally) set once and never changes // thereafter. It records whether the operating system is Win9x // or WinNT. // // 0: Operating system unknown. // 1: Operating system is Win9x. // 2: Operating system is WinNT. // // In order to facilitate testing on a WinNT system, the test fixture // can manually set this value to 1 to emulate Win98 behavior. var sqlite3_os_type LONG = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43405:35 */ // This function is not available on Windows CE or WinRT. // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during // testing and sandboxing. The following array holds the names and pointers // to all overrideable system calls. type win_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43426:8 */ // This function is not available on Windows CE or WinRT. // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during // testing and sandboxing. The following array holds the names and pointers // to all overrideable system calls. var aSyscall = [80]win_syscall{ {FzName: ts + 3202, FpCurrent: 0}, {FzName: ts + 3218}, {FzName: ts + 3229}, {FzName: ts + 3240, FpCurrent: 0}, {FzName: ts + 3252, FpCurrent: 0}, {FzName: ts + 3264, FpCurrent: 0}, {FzName: ts + 3276, FpCurrent: 0}, {FzName: ts + 3295, FpCurrent: 0}, {FzName: ts + 3314, FpCurrent: 0}, {FzName: ts + 3327, FpCurrent: 0}, {FzName: ts + 3339, FpCurrent: 0}, {FzName: ts + 3351}, {FzName: ts + 3375}, {FzName: ts + 3396, FpCurrent: 0}, {FzName: ts + 3413, FpCurrent: 0}, {FzName: ts + 3428, FpCurrent: 0}, {FzName: ts + 3443, FpCurrent: 0}, {FzName: ts + 3455, FpCurrent: 0}, {FzName: ts + 3475, FpCurrent: 0}, {FzName: ts + 3493, FpCurrent: 0}, {FzName: ts + 3511, FpCurrent: 0}, {FzName: ts + 3530, FpCurrent: 0}, {FzName: ts + 3549, FpCurrent: 0}, {FzName: ts + 3570, FpCurrent: 0}, {FzName: ts + 3582, FpCurrent: 0}, {FzName: ts + 3599, FpCurrent: 0}, {FzName: ts + 3616, FpCurrent: 0}, // All other Windows platforms expect GetProcAddress() to take // an ANSI string regardless of the _UNICODE setting {FzName: ts + 3629, FpCurrent: 0}, {FzName: ts + 3645, FpCurrent: 0}, {FzName: ts + 3659, FpCurrent: 0}, {FzName: ts + 3673, FpCurrent: 0}, {FzName: ts + 3697, FpCurrent: 0}, {FzName: ts + 3710, FpCurrent: 0}, {FzName: ts + 3723, FpCurrent: 0}, {FzName: ts + 3736, FpCurrent: 0}, {FzName: ts + 3750, FpCurrent: 0}, {FzName: ts + 3764, FpCurrent: 0}, {FzName: ts + 3774, FpCurrent: 0}, {FzName: ts + 3785, FpCurrent: 0}, {FzName: ts + 3797, FpCurrent: 0}, {FzName: ts + 3806, FpCurrent: 0}, {FzName: ts + 3818, FpCurrent: 0}, {FzName: ts + 3827, FpCurrent: 0}, {FzName: ts + 3840, FpCurrent: 0}, {FzName: ts + 3852, FpCurrent: 0}, {FzName: ts + 3865, FpCurrent: 0}, {FzName: ts + 3878, FpCurrent: 0}, {FzName: ts + 3888, FpCurrent: 0}, {FzName: ts + 3897, FpCurrent: 0}, {FzName: ts + 3908, FpCurrent: 0}, {FzName: ts + 3922, FpCurrent: 0}, {FzName: ts + 3942, FpCurrent: 0}, {FzName: ts + 3966, FpCurrent: 0}, {FzName: ts + 3975, FpCurrent: 0}, {FzName: ts + 3988, FpCurrent: 0}, {FzName: ts + 4003, FpCurrent: 0}, {FzName: ts + 4009, FpCurrent: 0}, {FzName: ts + 4030, FpCurrent: 0}, {FzName: ts + 4041, FpCurrent: 0}, {FzName: ts + 4054, FpCurrent: 0}, {FzName: ts + 4070, FpCurrent: 0}, {FzName: ts + 4090, FpCurrent: 0}, {FzName: ts + 4100}, {FzName: ts + 4115, FpCurrent: 0}, {FzName: ts + 4135, FpCurrent: 0}, {FzName: ts + 4157}, {FzName: ts + 4174}, {FzName: ts + 4203}, {FzName: ts + 4224}, {FzName: ts + 4236}, {FzName: ts + 4256}, {FzName: ts + 4271}, {FzName: ts + 4291, FpCurrent: 0}, {FzName: ts + 4310, FpCurrent: 0}, {FzName: ts + 4329, FpCurrent: 0}, {FzName: ts + 4344}, // NOTE: On some sub-platforms, the InterlockedCompareExchange "function" // is really just a macro that uses a compiler intrinsic (e.g. x64). // So do not try to make this is into a redefinable interface. {FzName: ts + 4369}, {FzName: ts + 4396}, {FzName: ts + 4407}, {FzName: ts + 4428, FpCurrent: 0}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43430:3 */ // End of the overrideable system calls // This is the xSetSystemCall() method of sqlite3_vfs for all of the // "win32" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. func winSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44087:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND _ = pNotUsed if zName == uintptr(0) { // If no zName is given, restore all system calls to their default // settings and return NULL rc = SQLITE_OK for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(win_syscall{})); i++ { if aSyscall[i].FpDefault != 0 { aSyscall[i].FpCurrent = aSyscall[i].FpDefault } } } else { // If zName is specified, operate on only the one system call // specified. for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(win_syscall{})); i++ { if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { if aSyscall[i].FpDefault == uintptr(0) { aSyscall[i].FpDefault = aSyscall[i].FpCurrent } rc = SQLITE_OK if pNewFunc == uintptr(0) { pNewFunc = aSyscall[i].FpDefault } aSyscall[i].FpCurrent = pNewFunc break } } } return rc } // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. func winGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44130:28: */ var i uint32 _ = pNotUsed for i = uint32(0); uint64(i) < uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(win_syscall{})); i++ { if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { return aSyscall[i].FpCurrent } } return uintptr(0) } // Return the name of the first system call after zName. If zName==NULL // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. func winNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44149:19: */ var i int32 = -1 _ = p if zName != 0 { for i = 0; i < int32(uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(win_syscall{})))-1; i++ { if libc.Xstrcmp(tls, zName, aSyscall[i].FzName) == 0 { break } } } for i++; i < int32(uint64(unsafe.Sizeof(aSyscall))/uint64(unsafe.Sizeof(win_syscall{}))); i++ { if aSyscall[i].FpCurrent != uintptr(0) { return aSyscall[i].FzName } } return uintptr(0) } // This function outputs the specified (ANSI) string to the Win32 debugger // (if available). func Xsqlite3_win32_write_debug(tls *libc.TLS, zBuf uintptr, nBuf int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44257:17: */ bp := tls.Alloc(4092) defer tls.Free(4092) // var zDbgBuf [4092]int8 at bp, 4092 var nMin int32 = func() int32 { if nBuf < int32(uint64(4096)-uint64(unsafe.Sizeof(DWORD(0))))-1 { return nBuf } return int32(uint64(4096)-uint64(unsafe.Sizeof(DWORD(0)))) - 1 }() // may be negative. if nMin < -1 { nMin = -1 } // all negative values become -1. if nMin > 0 { libc.Xmemset(tls, bp, 0, uint64(int32(uint64(4096)-uint64(unsafe.Sizeof(DWORD(0)))))) libc.Xmemcpy(tls, bp, zBuf, uint64(nMin)) (*(*func(*libc.TLS, LPCSTR))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 72*24 + 8)))(tls, bp) } else { (*(*func(*libc.TLS, LPCSTR))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 72*24 + 8)))(tls, zBuf) } } // The following routine suspends the current thread for at least ms // milliseconds. This is equivalent to the Win32 Sleep() interface. func Xsqlite3_win32_sleep(tls *libc.TLS, milliseconds DWORD) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44303:17: */ (*(*func(*libc.TLS, DWORD))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 55*24 + 8)))(tls, milliseconds) } func Xsqlite3Win32Wait(tls *libc.TLS, hObject HANDLE) DWORD { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44318:22: */ var rc DWORD for libc.AssignUint32(&rc, (*(*func(*libc.TLS, HANDLE, DWORD, WINBOOL) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64*24 + 8)))(tls, hObject, INFINITE, TRUE)) == DWORD(0x000000C0) { } return rc } // Return true (non-zero) if we are running under WinNT, Win2K, WinXP, // or WinCE. Return false (zero) for Win95, Win98, or WinME. // // Here is an interesting observation: Win95, Win98, and WinME lack // the LockFileEx() API. But we can still statically link against that // API as long as we don't call it when running Win95/98/ME. A call to // this routine is used to determine if the host is Win95/98/ME or // WinNT/2K/XP so that we will know whether or not we can safely call // the LockFileEx() API. // This function determines if the machine is running a version of Windows // based on the NT kernel. func Xsqlite3_win32_is_nt(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44352:16: */ bp := tls.Alloc(148) defer tls.Free(148) if libc.X_InterlockedCompareExchange(tls, uintptr(unsafe.Pointer(&sqlite3_os_type)), 0, 0) == 0 { // var sInfo OSVERSIONINFOA at bp, 148 (*OSVERSIONINFOA)(unsafe.Pointer(bp /* &sInfo */)).FdwOSVersionInfoSize = DWORD(unsafe.Sizeof(OSVERSIONINFOA{})) (*(*func(*libc.TLS, LPOSVERSIONINFOA) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 34*24 + 8)))(tls, bp) libc.X_InterlockedCompareExchange(tls, uintptr(unsafe.Pointer(&sqlite3_os_type)), func() int32 { if (*OSVERSIONINFOA)(unsafe.Pointer(bp)).FdwPlatformId == DWORD(VER_PLATFORM_WIN32_NT) { return 2 } return 1 }(), 0) } return libc.Bool32(libc.X_InterlockedCompareExchange(tls, uintptr(unsafe.Pointer(&sqlite3_os_type)), 2, 2) == 2) } // Convert a UTF-8 string to Microsoft Unicode. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winUtf8ToUnicode(tls *libc.TLS, zText uintptr) LPWSTR { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44597:15: */ var nChar int32 var zWideText LPWSTR nChar = (*(*func(*libc.TLS, UINT, DWORD, LPCSTR, int32, LPWSTR, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 50*24 + 8)))(tls, uint32(CP_UTF8), uint32(0), zText, -1, uintptr(0), 0) if nChar == 0 { return uintptr(0) } zWideText = Xsqlite3MallocZero(tls, uint64(nChar)*uint64(unsafe.Sizeof(WCHAR(0)))) if zWideText == uintptr(0) { return uintptr(0) } nChar = (*(*func(*libc.TLS, UINT, DWORD, LPCSTR, int32, LPWSTR, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 50*24 + 8)))(tls, uint32(CP_UTF8), uint32(0), zText, -1, zWideText, nChar) if nChar == 0 { Xsqlite3_free(tls, zWideText) zWideText = uintptr(0) } return zWideText } // Convert a Microsoft Unicode string to UTF-8. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winUnicodeToUtf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44623:13: */ var nByte int32 var zText uintptr nByte = (*(*func(*libc.TLS, UINT, DWORD, LPCWSTR, int32, LPSTR, int32, LPCSTR, LPBOOL) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 60*24 + 8)))(tls, uint32(CP_UTF8), uint32(0), zWideText, -1, uintptr(0), 0, uintptr(0), uintptr(0)) if nByte == 0 { return uintptr(0) } zText = Xsqlite3MallocZero(tls, uint64(nByte)) if zText == uintptr(0) { return uintptr(0) } nByte = (*(*func(*libc.TLS, UINT, DWORD, LPCWSTR, int32, LPSTR, int32, LPCSTR, LPBOOL) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 60*24 + 8)))(tls, uint32(CP_UTF8), uint32(0), zWideText, -1, zText, nByte, uintptr(0), uintptr(0)) if nByte == 0 { Xsqlite3_free(tls, zText) zText = uintptr(0) } return zText } // Convert an ANSI string to Microsoft Unicode, using the ANSI or OEM // code page. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winMbcsToUnicode(tls *libc.TLS, zText uintptr, useAnsi int32) LPWSTR { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44650:15: */ var nByte int32 var zMbcsText LPWSTR var codepage int32 if useAnsi != 0 { codepage = CP_ACP } else { codepage = CP_OEMCP } nByte = int32(uint64((*(*func(*libc.TLS, UINT, DWORD, LPCSTR, int32, LPWSTR, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 50*24 + 8)))(tls, uint32(codepage), uint32(0), zText, -1, uintptr(0), 0)) * uint64(unsafe.Sizeof(WCHAR(0)))) if nByte == 0 { return uintptr(0) } zMbcsText = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(WCHAR(0)))) if zMbcsText == uintptr(0) { return uintptr(0) } nByte = (*(*func(*libc.TLS, UINT, DWORD, LPCSTR, int32, LPWSTR, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 50*24 + 8)))(tls, uint32(codepage), uint32(0), zText, -1, zMbcsText, nByte) if nByte == 0 { Xsqlite3_free(tls, zMbcsText) zMbcsText = uintptr(0) } return zMbcsText } // Convert a Microsoft Unicode string to a multi-byte character string, // using the ANSI or OEM code page. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winUnicodeToMbcs(tls *libc.TLS, zWideText LPCWSTR, useAnsi int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44679:13: */ var nByte int32 var zText uintptr var codepage int32 if useAnsi != 0 { codepage = CP_ACP } else { codepage = CP_OEMCP } nByte = (*(*func(*libc.TLS, UINT, DWORD, LPCWSTR, int32, LPSTR, int32, LPCSTR, LPBOOL) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 60*24 + 8)))(tls, uint32(codepage), uint32(0), zWideText, -1, uintptr(0), 0, uintptr(0), uintptr(0)) if nByte == 0 { return uintptr(0) } zText = Xsqlite3MallocZero(tls, uint64(nByte)) if zText == uintptr(0) { return uintptr(0) } nByte = (*(*func(*libc.TLS, UINT, DWORD, LPCWSTR, int32, LPSTR, int32, LPCSTR, LPBOOL) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 60*24 + 8)))(tls, uint32(codepage), uint32(0), zWideText, -1, zText, nByte, uintptr(0), uintptr(0)) if nByte == 0 { Xsqlite3_free(tls, zText) zText = uintptr(0) } return zText } // Convert a multi-byte character string to UTF-8. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winMbcsToUtf8(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44706:13: */ var zTextUtf8 uintptr var zTmpWide LPWSTR zTmpWide = winMbcsToUnicode(tls, zText, useAnsi) if zTmpWide == uintptr(0) { return uintptr(0) } zTextUtf8 = winUnicodeToUtf8(tls, zTmpWide) Xsqlite3_free(tls, zTmpWide) return zTextUtf8 } // Convert a UTF-8 string to a multi-byte character string. // // Space to hold the returned string is obtained from sqlite3_malloc(). func winUtf8ToMbcs(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44724:13: */ var zTextMbcs uintptr var zTmpWide LPWSTR zTmpWide = winUtf8ToUnicode(tls, zText) if zTmpWide == uintptr(0) { return uintptr(0) } zTextMbcs = winUnicodeToMbcs(tls, zTmpWide, useAnsi) Xsqlite3_free(tls, zTmpWide) return zTextMbcs } // This is a public wrapper for the winUtf8ToUnicode() function. func Xsqlite3_win32_utf8_to_unicode(tls *libc.TLS, zText uintptr) LPWSTR { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44740:19: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winUtf8ToUnicode(tls, zText) } // This is a public wrapper for the winUnicodeToUtf8() function. func Xsqlite3_win32_unicode_to_utf8(tls *libc.TLS, zWideText LPCWSTR) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44756:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winUnicodeToUtf8(tls, zWideText) } // This is a public wrapper for the winMbcsToUtf8() function. func Xsqlite3_win32_mbcs_to_utf8(tls *libc.TLS, zText uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44772:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winMbcsToUtf8(tls, zText, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) } // This is a public wrapper for the winMbcsToUtf8() function. func Xsqlite3_win32_mbcs_to_utf8_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44788:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winMbcsToUtf8(tls, zText, useAnsi) } // This is a public wrapper for the winUtf8ToMbcs() function. func Xsqlite3_win32_utf8_to_mbcs(tls *libc.TLS, zText uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44804:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winUtf8ToMbcs(tls, zText, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) } // This is a public wrapper for the winUtf8ToMbcs() function. func Xsqlite3_win32_utf8_to_mbcs_v2(tls *libc.TLS, zText uintptr, useAnsi int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44820:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } return winUtf8ToMbcs(tls, zText, useAnsi) } // This function is the same as sqlite3_win32_set_directory (below); however, // it accepts a UTF-8 string. func Xsqlite3_win32_set_directory8(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44837:16: */ bp := tls.Alloc(8) defer tls.Free(8) var ppDirectory uintptr = uintptr(0) var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { return rc } if type1 == uint32(SQLITE_WIN32_DATA_DIRECTORY_TYPE) { ppDirectory = uintptr(unsafe.Pointer(&Xsqlite3_data_directory)) } else if type1 == uint32(SQLITE_WIN32_TEMP_DIRECTORY_TYPE) { ppDirectory = uintptr(unsafe.Pointer(&Xsqlite3_temp_directory)) } if ppDirectory != 0 { var zCopy uintptr = uintptr(0) if zValue != 0 && *(*int8)(unsafe.Pointer(zValue)) != 0 { zCopy = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp, zValue)) if zCopy == uintptr(0) { return SQLITE_NOMEM } } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(ppDirectory))) *(*uintptr)(unsafe.Pointer(ppDirectory)) = zCopy return SQLITE_OK } return SQLITE_ERROR } // This function is the same as sqlite3_win32_set_directory (below); however, // it accepts a UTF-16 string. func Xsqlite3_win32_set_directory16(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44874:16: */ var rc int32 var zUtf8 uintptr = uintptr(0) if zValue != 0 { zUtf8 = Xsqlite3_win32_unicode_to_utf8(tls, zValue) if zUtf8 == uintptr(0) { return SQLITE_NOMEM } } rc = Xsqlite3_win32_set_directory8(tls, type1, zUtf8) if zUtf8 != 0 { Xsqlite3_free(tls, zUtf8) } return rc } // This function sets the data directory or the temporary directory based on // the provided arguments. The type argument must be 1 in order to set the // data directory or 2 in order to set the temporary directory. The zValue // argument is the name of the directory to use. The return value will be // SQLITE_OK if successful. func Xsqlite3_win32_set_directory(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44896:16: */ return Xsqlite3_win32_set_directory16(tls, type1, zValue) } // The return value of winGetLastErrorMsg // is zero if the error message fits in the buffer, or non-zero // otherwise (if the message was truncated). func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44908:12: */ bp := tls.Alloc(40) defer tls.Free(40) // FormatMessage returns 0 on failure. Otherwise it // returns the number of TCHARs written to the output // buffer, excluding the terminating null char. var dwLen DWORD = DWORD(0) var zOut uintptr = uintptr(0) if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { *(*LPWSTR)(unsafe.Pointer(bp + 24 /* zTempWide */)) = uintptr(0) dwLen = (*(*func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPWSTR, DWORD, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 15*24 + 8)))(tls, uint32(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS), uintptr(0), lastErrno, uint32(0), bp+24, uint32(0), uintptr(0)) if dwLen > DWORD(0) { // allocate a buffer and convert to UTF8 Xsqlite3BeginBenignMalloc(tls) zOut = winUnicodeToUtf8(tls, *(*LPWSTR)(unsafe.Pointer(bp + 24 /* zTempWide */))) Xsqlite3EndBenignMalloc(tls) // free the system buffer allocated by FormatMessage (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8)))(tls, *(*LPWSTR)(unsafe.Pointer(bp + 24))) } } else { *(*uintptr)(unsafe.Pointer(bp + 32 /* zTemp */)) = uintptr(0) dwLen = (*(*func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPSTR, DWORD, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 14*24 + 8)))(tls, uint32(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS), uintptr(0), lastErrno, uint32(0), bp+32, uint32(0), uintptr(0)) if dwLen > DWORD(0) { // allocate a buffer and convert to UTF8 Xsqlite3BeginBenignMalloc(tls) zOut = winMbcsToUtf8(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zTemp */)), (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) Xsqlite3EndBenignMalloc(tls) // free the system buffer allocated by FormatMessage (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8)))(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) } } if DWORD(0) == dwLen { Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4447, libc.VaList(bp, lastErrno, lastErrno)) } else { // copy a maximum of nBuf chars to output buffer Xsqlite3_snprintf(tls, nBuf, zBuf, ts+4444, libc.VaList(bp+16, zOut)) // free the UTF8 buffer Xsqlite3_free(tls, zOut) } return 0 } // // This function - winLogErrorAtLine() - is only ever called via the macro // winLogError(). // // This routine is invoked after an error occurs in an OS function. // It logs a message using sqlite3_log() containing the current value of // error code and, if possible, the human-readable equivalent from // FormatMessage. // // The first argument passed to the macro should be the error code that // will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). // The two subsequent arguments should be the name of the OS function that // failed and the associated file-system path, if any. func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:44999:12: */ bp := tls.Alloc(540) defer tls.Free(540) // var zMsg [500]int8 at bp+40, 500 // Human readable error text var i int32 // Loop counter *(*int8)(unsafe.Pointer(bp + 40)) = int8(0) winGetLastErrorMsg(tls, lastErrno, int32(unsafe.Sizeof([500]int8{})), bp+40) if zPath == uintptr(0) { zPath = ts + 1524 /* "" */ } for i = 0; *(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i))) != 0 && int32(*(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i)))) != '\r' && int32(*(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i)))) != '\n'; i++ { } *(*int8)(unsafe.Pointer(bp + 40 + uintptr(i))) = int8(0) Xsqlite3_log(tls, errcode, ts+4467, libc.VaList(bp, iLine, lastErrno, zFunc, zPath, bp+40)) return errcode } // The number of times that a ReadFile(), WriteFile(), and DeleteFile() // will be retried following a locking error - probably caused by // antivirus software. Also the initial delay before the first retry. // The delay increases linearly with each retry. var winIoerrRetry int32 = SQLITE_WIN32_IOERR_RETRY /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45035:12 */ var winIoerrRetryDelay int32 = SQLITE_WIN32_IOERR_RETRY_DELAY /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45036:12 */ // The "winIoerrCanRetry1" macro is used to determine if a particular I/O // error code obtained via GetLastError() is eligible to be retried. It // must accept the error code DWORD as its only argument and should return // non-zero if the error code is transient in nature and the operation // responsible for generating the original error might succeed upon being // retried. The argument to this macro should be a variable. // // Additionally, a macro named "winIoerrCanRetry2" may be defined. If it // is defined, it will be consulted only when the macro "winIoerrCanRetry1" // returns zero. The "winIoerrCanRetry2" macro is completely optional and // may be used to include additional error codes in the set that should // result in the failing I/O operation being retried by the caller. If // defined, the "winIoerrCanRetry2" macro must exhibit external semantics // identical to those of the "winIoerrCanRetry1" macro. // If a ReadFile() or WriteFile() error occurs, invoke this routine // to see if it should be retried. Return TRUE to retry. Return FALSE // to give up with an error. func winRetryIoerr(tls *libc.TLS, pnRetry uintptr, pError uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45069:12: */ var e DWORD = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) if *(*int32)(unsafe.Pointer(pnRetry)) >= winIoerrRetry { if pError != 0 { *(*DWORD)(unsafe.Pointer(pError)) = e } return 0 } if e == DWORD(5) || e == DWORD(32) || e == DWORD(33) || e == DWORD(55) || e == DWORD(64) || e == DWORD(121) || e == DWORD(1231) { Xsqlite3_win32_sleep(tls, uint32(winIoerrRetryDelay*(1+*(*int32)(unsafe.Pointer(pnRetry))))) *(*int32)(unsafe.Pointer(pnRetry))++ return 1 } if pError != 0 { *(*DWORD)(unsafe.Pointer(pError)) = e } return 0 } // Log a I/O error retry episode. func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45098:13: */ bp := tls.Alloc(16) defer tls.Free(16) if nRetry != 0 { Xsqlite3_log(tls, SQLITE_NOTICE, ts+4498, libc.VaList(bp, winIoerrRetryDelay*nRetry*(nRetry+1)/2, lineno)) } } // This #if does not rely on the SQLITE_OS_WINCE define because the // corresponding section in "date.c" cannot use it. // Lock a file region. func winLockFile(tls *libc.TLS, phFile LPHANDLE, flags DWORD, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45428:13: */ bp := tls.Alloc(32) defer tls.Free(32) if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { // var ovlp OVERLAPPED at bp, 32 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(OVERLAPPED{}))) *(*DWORD)(unsafe.Pointer(bp + 16 /* &.Offset */)) = offsetLow *(*DWORD)(unsafe.Pointer(bp + 20 /* &.OffsetHigh */)) = offsetHigh return (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD, LPOVERLAPPED) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 48*24 + 8)))(tls, *(*HANDLE)(unsafe.Pointer(phFile)), flags, uint32(0), numBytesLow, numBytesHigh, bp) } else { return (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 47*24 + 8)))(tls, *(*HANDLE)(unsafe.Pointer(phFile)), offsetLow, offsetHigh, numBytesLow, numBytesHigh) } return WINBOOL(0) } // Unlock a file region. func winUnlockFile(tls *libc.TLS, phFile LPHANDLE, offsetLow DWORD, offsetHigh DWORD, numBytesLow DWORD, numBytesHigh DWORD) WINBOOL { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45460:13: */ bp := tls.Alloc(32) defer tls.Free(32) if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { // var ovlp OVERLAPPED at bp, 32 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(OVERLAPPED{}))) *(*DWORD)(unsafe.Pointer(bp + 16 /* &.Offset */)) = offsetLow *(*DWORD)(unsafe.Pointer(bp + 20 /* &.OffsetHigh */)) = offsetHigh return (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, LPOVERLAPPED) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 58*24 + 8)))(tls, *(*HANDLE)(unsafe.Pointer(phFile)), uint32(0), numBytesLow, numBytesHigh, bp) } else { return (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, DWORD) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 57*24 + 8)))(tls, *(*HANDLE)(unsafe.Pointer(phFile)), offsetLow, offsetHigh, numBytesLow, numBytesHigh) } return WINBOOL(0) } // **************************************************************************** // // The next group of routines implement the I/O methods specified // by the sqlite3_io_methods object. // // Some Microsoft compilers lack this definition. // Move the current position of the file handle passed as the first // argument to offset iOffset within the file. If successful, return 0. // Otherwise, set pFile->lastErrno and return non-zero. func winSeekFile(tls *libc.TLS, pFile uintptr, iOffset Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45505:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var upperBits LONG at bp, 4 // Most sig. 32 bits of new offset var lowerBits LONG // Least sig. 32 bits of new offset var dwRet DWORD // Value returned by SetFilePointer() var lastErrno DWORD // Value returned by GetLastError() *(*LONG)(unsafe.Pointer(bp /* upperBits */)) = LONG(iOffset >> 32 & int64(0x7fffffff)) lowerBits = LONG(iOffset & int64(0xffffffff)) // API oddity: If successful, SetFilePointer() returns a dword // containing the lower 32-bits of the new file-offset. Or, if it fails, // it returns INVALID_SET_FILE_POINTER. However according to MSDN, // INVALID_SET_FILE_POINTER may also be a valid new offset. So to determine // whether an error has actually occurred, it is also necessary to call // GetLastError(). dwRet = (*(*func(*libc.TLS, HANDLE, LONG, PLONG, DWORD) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 54*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh, lowerBits, bp, uint32(FILE_BEGIN)) if dwRet == libc.Uint32(libc.Uint32FromInt32(-1)) && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno winLogErrorAtLine(tls, SQLITE_IOERR|int32(22)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4548, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45529) return 1 } return 0 } // Close a file. // // It is reported that an attempt to close a handle might sometimes // fail. This is a very unreasonable result, but Windows is notorious // for being unreasonable so I do not doubt that it might happen. If // the close fails, we pause for 100 milliseconds and try again. As // many as MX_CLOSE_ATTEMPT attempts to close the handle are made before // giving up and returning an error. func winClose(tls *libc.TLS, id uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45578:12: */ var rc int32 var cnt int32 = 0 var pFile uintptr = id winUnmapfile(tls, pFile) for __ccgo := true; __ccgo; __ccgo = rc == 0 && libc.PreIncInt32(&cnt, 1) < MX_CLOSE_ATTEMPT && func() bool { Xsqlite3_win32_sleep(tls, uint32(100)); return 1 != 0 }() { rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) // SimulateIOError( rc=0; cnt=MX_CLOSE_ATTEMPT; ); } if rc != 0 { (*WinFile)(unsafe.Pointer(pFile)).Fh = uintptr(0) } if rc != 0 { return SQLITE_OK } return winLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4560, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45625) } // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. func winRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45634:12: */ bp := tls.Alloc(44) defer tls.Free(44) // var overlapped OVERLAPPED at bp, 32 // The offset for ReadFile. var pFile uintptr = id // file handle // var nRead DWORD at bp+32, 4 // Number of bytes actually read from file *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)) = 0 // Number of retrys // Deal with as much of this read request as possible by transfering // data from the memory mapping using memcpy(). if offset < (*WinFile)(unsafe.Pointer(pFile)).FmmapSize { if offset+Sqlite3_int64(amt) <= (*WinFile)(unsafe.Pointer(pFile)).FmmapSize { libc.Xmemcpy(tls, pBuf, (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion+uintptr(offset), uint64(amt)) return SQLITE_OK } else { var nCopy int32 = int32((*WinFile)(unsafe.Pointer(pFile)).FmmapSize - offset) libc.Xmemcpy(tls, pBuf, (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion+uintptr(offset), uint64(nCopy)) pBuf = pBuf + uintptr(nCopy) amt = amt - nCopy offset = offset + Sqlite3_int64(nCopy) } } libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(OVERLAPPED{}))) *(*DWORD)(unsafe.Pointer(bp + 16 /* &.Offset */)) = DWORD(LONG(offset & int64(0xffffffff))) *(*DWORD)(unsafe.Pointer(bp + 20 /* &.OffsetHigh */)) = DWORD(LONG(offset >> 32 & int64(0x7fffffff))) for !((*(*func(*libc.TLS, HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 52*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh, pBuf, uint32(amt), bp+32, bp) != 0) && (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) != DWORD(38) { if winRetryIoerr(tls, bp+36, bp+40) != 0 { continue } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(1)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4569, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45693) } winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45696) if *(*DWORD)(unsafe.Pointer(bp + 32)) < DWORD(amt) { // Unread parts of the buffer must be zero-filled libc.Xmemset(tls, pBuf+uintptr(*(*DWORD)(unsafe.Pointer(bp + 32))), 0, uint64(DWORD(amt)-*(*DWORD)(unsafe.Pointer(bp + 32)))) return SQLITE_IOERR | int32(2)<<8 } return SQLITE_OK } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. func winWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45714:12: */ bp := tls.Alloc(44) defer tls.Free(44) var rc int32 = 0 // True if error has occurred, else false var pFile uintptr = id // File handle *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)) = 0 // Number of retries { // var overlapped OVERLAPPED at bp, 32 // The offset for WriteFile. var aRem uintptr = pBuf // Data yet to be written var nRem int32 = amt // Number of bytes yet to be written // var nWrite DWORD at bp+32, 4 // Bytes written by each WriteFile() call *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) = DWORD(0) // Value returned by GetLastError() libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(OVERLAPPED{}))) *(*DWORD)(unsafe.Pointer(bp + 16 /* &.Offset */)) = DWORD(LONG(offset & int64(0xffffffff))) *(*DWORD)(unsafe.Pointer(bp + 20 /* &.OffsetHigh */)) = DWORD(LONG(offset >> 32 & int64(0x7fffffff))) for nRem > 0 { if !((*(*func(*libc.TLS, HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 61*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh, aRem, uint32(nRem), bp+32, bp) != 0) { if winRetryIoerr(tls, bp+36, bp+40) != 0 { continue } break } if *(*DWORD)(unsafe.Pointer(bp + 32)) == DWORD(0) || *(*DWORD)(unsafe.Pointer(bp + 32)) > DWORD(nRem) { *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) break } offset = offset + Sqlite3_int64(*(*DWORD)(unsafe.Pointer(bp + 32))) *(*DWORD)(unsafe.Pointer(bp + 16 /* &.Offset */)) = DWORD(LONG(offset & int64(0xffffffff))) *(*DWORD)(unsafe.Pointer(bp + 20 /* &.OffsetHigh */)) = DWORD(LONG(offset >> 32 & int64(0x7fffffff))) aRem += uintptr(*(*DWORD)(unsafe.Pointer(bp + 32 /* nWrite */))) nRem = int32(DWORD(nRem) - *(*DWORD)(unsafe.Pointer(bp + 32))) } if nRem > 0 { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) rc = 1 } } if rc != 0 { if (*WinFile)(unsafe.Pointer(pFile)).FlastErrno == DWORD(39) || (*WinFile)(unsafe.Pointer(pFile)).FlastErrno == DWORD(112) { return winLogErrorAtLine(tls, SQLITE_FULL, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4577, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45805) } return winLogErrorAtLine(tls, SQLITE_IOERR|int32(3)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4587, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45810) } else { winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* nRetry */)), 45813) } return SQLITE_OK } // Truncate an open file to a specified size func winTruncate(tls *libc.TLS, id uintptr, nByte Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45823:12: */ var pFile uintptr = id // File handle object var rc int32 = SQLITE_OK // Return code for this function var lastErrno DWORD var oldMmapSize Sqlite3_int64 if (*WinFile)(unsafe.Pointer(pFile)).FnFetchOut > 0 { // File truncation is a no-op if there are outstanding memory mapped // pages. This is because truncating the file means temporarily unmapping // the file, and that might delete memory out from under existing cursors. // // This can result in incremental vacuum not truncating the file, // if there is an active read cursor when the incremental vacuum occurs. // No real harm comes of this - the database file is not corrupted, // though some folks might complain that the file is bigger than it // needs to be. // // The only feasible work-around is to defer the truncation until after // all references to memory-mapped content are closed. That is doable, // but involves adding a few branches in the common write code path which // could slow down normal operations slightly. Hence, we have decided for // now to simply make trancations a no-op if there are pending reads. We // can maybe revisit this decision in the future. return SQLITE_OK } // If the user has configured a chunk-size for this file, truncate the // file so that it consists of an integer number of chunks (i.e. the // actual file size after the operation may be larger than the requested // size). if (*WinFile)(unsafe.Pointer(pFile)).FszChunk > 0 { nByte = (nByte + Sqlite3_int64((*WinFile)(unsafe.Pointer(pFile)).FszChunk) - int64(1)) / Sqlite3_int64((*WinFile)(unsafe.Pointer(pFile)).FszChunk) * Sqlite3_int64((*WinFile)(unsafe.Pointer(pFile)).FszChunk) } if (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion != 0 { oldMmapSize = (*WinFile)(unsafe.Pointer(pFile)).FmmapSize } else { oldMmapSize = int64(0) } winUnmapfile(tls, pFile) // SetEndOfFile() returns non-zero when successful, or zero when it fails. if winSeekFile(tls, pFile, nByte) != 0 { rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4597, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45876) } else if 0 == (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 53*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(1224) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4610, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45881) } if rc == SQLITE_OK && oldMmapSize > int64(0) { if oldMmapSize > nByte { winMapfile(tls, pFile, int64(-1)) } else { winMapfile(tls, pFile, oldMmapSize) } } return rc } // Make sure all writes to a particular file are committed to disk. func winSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45912:12: */ // Used only when SQLITE_NO_SYNC is not defined. var rc WINBOOL // Used when SQLITE_NO_SYNC is not defined and by the assert() and/or // OSTRACE() macros. var pFile uintptr = id // Check that one of SQLITE_SYNC_NORMAL or FULL was passed // Unix cannot, but some systems may return SQLITE_FULL from here. This // line is to test that doing so does not cause any problems. _ = flags // If we compiled with the SQLITE_NO_SYNC flag, then syncing is a // no-op if (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion != 0 { if (*(*func(*libc.TLS, LPCVOID, SIZE_T) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 79*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion, uint64(0)) != 0 { } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4623, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45973) } } rc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 13*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh) if rc != 0 { return SQLITE_OK } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4632, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 45988) } return int32(0) } // Determine the current size of a file in bytes func winFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:45997:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pFile uintptr = id var rc int32 = SQLITE_OK { // var upperBits DWORD at bp, 4 var lowerBits DWORD var lastErrno DWORD lowerBits = (*(*func(*libc.TLS, HANDLE, LPDWORD) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).Fh, bp) *(*Sqlite3_int64)(unsafe.Pointer(pSize)) = Sqlite3_int64(*(*DWORD)(unsafe.Pointer(bp)))<<32 + Sqlite3_int64(lowerBits) if lowerBits == 0xffffffff && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(7)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4641, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46029) } } return rc } // LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems. // Historically, SQLite has used both the LockFile and LockFileEx functions. // When the LockFile function was used, it was always expected to fail // immediately if the lock could not be obtained. Also, it always expected to // obtain an exclusive lock. These flags are used with the LockFileEx function // and reflect those expectations; therefore, they should not be changed. // Currently, SQLite never calls the LockFileEx function without wanting the // call to fail immediately if the lock cannot be obtained. // Acquire a reader lock. // Different API routines are called depending on whether or not this // is Win9x or WinNT. func winGetReadLock(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46075:12: */ bp := tls.Alloc(4) defer tls.Free(4) var res int32 if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { res = winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY), uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) } else { // var lk int32 at bp, 4 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp) (*WinFile)(unsafe.Pointer(pFile)).FsharedLockByte = int16(*(*int32)(unsafe.Pointer(bp)) & 0x7fffffff % (SHARED_SIZE - 1)) res = winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY|LOCKFILE_EXCLUSIVE_LOCK), uint32(Xsqlite3PendingByte+2+int32((*WinFile)(unsafe.Pointer(pFile)).FsharedLockByte)), uint32(0), uint32(1), uint32(0)) } if res == 0 { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) // No need to log a failure to lock } return res } // Undo a readlock func winUnlockReadLock(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46110:12: */ var res int32 var lastErrno DWORD if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { res = winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) } else { res = winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+2+int32((*WinFile)(unsafe.Pointer(pFile)).FsharedLockByte)), uint32(0), uint32(1), uint32(0)) } if res == 0 && libc.AssignUint32(&lastErrno, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls)) != DWORD(158) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4653, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46124) } return res } // Lock the file with the lock specified by parameter locktype - one // of the following: // // (1) SHARED_LOCK // (2) RESERVED_LOCK // (3) PENDING_LOCK // (4) EXCLUSIVE_LOCK // // Sometimes when requesting one lock state, additional lock states // are inserted in between. The locking might fail on one of the later // transitions leaving the lock state different from what it started but // still short of its goal. The following chart shows the allowed // transitions and the inserted intermediate states: // // UNLOCKED -> SHARED // SHARED -> RESERVED // SHARED -> (PENDING) -> EXCLUSIVE // RESERVED -> (PENDING) -> EXCLUSIVE // PENDING -> EXCLUSIVE // // This routine will only increase a lock. The winUnlock() routine // erases all locks at once and returns us immediately to locking level 0. // It is not possible to lower the locking level one step at a time. You // must go straight to locking level 0. func winLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46157:12: */ var rc int32 = SQLITE_OK // Return code from subroutines var res int32 = 1 // Result of a Windows lock call var newLocktype int32 // Set pFile->locktype to this value before exiting var gotPendingLock int32 = 0 // True if we acquired a PENDING lock this time var pFile uintptr = id var lastErrno DWORD = DWORD(0) // If there is already a lock of this type or more restrictive on the // OsFile, do nothing. Don't use the end_lock: exit path, as // sqlite3OsEnterMutex() hasn't been called yet. if int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) >= locktype { return SQLITE_OK } // Do not allow any kind of write-lock on a read-only database if int32((*WinFile)(unsafe.Pointer(pFile)).FctrlFlags)&WINFILE_RDONLY != 0 && locktype >= RESERVED_LOCK { return SQLITE_IOERR | int32(15)<<8 } // Make sure the locking sequence is correct // Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or // a SHARED lock. If we are acquiring a SHARED lock, the acquisition of // the PENDING_LOCK byte is temporary. newLocktype = int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) if int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) == NO_LOCK || locktype == EXCLUSIVE_LOCK && int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) <= RESERVED_LOCK { var cnt int32 = 3 for libc.PostDecInt32(&cnt, 1) > 0 && libc.AssignInt32(&res, winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY|LOCKFILE_EXCLUSIVE_LOCK), uint32(Xsqlite3PendingByte), uint32(0), uint32(1), uint32(0))) == 0 { // Try 3 times to get the pending lock. This is needed to work // around problems caused by indexing and/or anti-virus software on // Windows systems. // If you are using this code as a model for alternative VFSes, do not // copy this retry logic. It is a hack intended for Windows only. lastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) if lastErrno == DWORD(6) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno rc = SQLITE_IOERR | int32(15)<<8 return rc } if cnt != 0 { Xsqlite3_win32_sleep(tls, uint32(1)) } } gotPendingLock = res if !(res != 0) { lastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) } } // Acquire a shared lock if locktype == SHARED_LOCK && res != 0 { res = winGetReadLock(tls, pFile) if res != 0 { newLocktype = SHARED_LOCK } else { lastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) } } // Acquire a RESERVED lock if locktype == RESERVED_LOCK && res != 0 { res = winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY|LOCKFILE_EXCLUSIVE_LOCK), uint32(Xsqlite3PendingByte+1), uint32(0), uint32(1), uint32(0)) if res != 0 { newLocktype = RESERVED_LOCK } else { lastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) } } // Acquire a PENDING lock if locktype == EXCLUSIVE_LOCK && res != 0 { newLocktype = PENDING_LOCK gotPendingLock = 0 } // Acquire an EXCLUSIVE lock if locktype == EXCLUSIVE_LOCK && res != 0 { res = winUnlockReadLock(tls, pFile) res = winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY|LOCKFILE_EXCLUSIVE_LOCK), uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) if res != 0 { newLocktype = EXCLUSIVE_LOCK } else { lastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) winGetReadLock(tls, pFile) } } // If we are holding a PENDING lock that ought to be released, then // release it now. if gotPendingLock != 0 && locktype == SHARED_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte), uint32(0), uint32(1), uint32(0)) } // Update the state of the lock has held in the file descriptor then // return the appropriate result code. if res != 0 { rc = SQLITE_OK } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = lastErrno rc = SQLITE_BUSY } (*WinFile)(unsafe.Pointer(pFile)).Flocktype = U8(newLocktype) return rc } // This routine checks if there is a RESERVED lock held on the specified // file by this or any other process. If such a lock is held, return // non-zero, otherwise zero. func winCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46300:12: */ var res int32 var pFile uintptr = id if int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) >= RESERVED_LOCK { res = 1 } else { res = winLockFile(tls, pFile+16, uint32(LOCKFILE_FAIL_IMMEDIATELY), uint32(Xsqlite3PendingByte+1), uint32(0), uint32(1), uint32(0)) if res != 0 { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+1), uint32(0), uint32(1), uint32(0)) } res = libc.BoolInt32(!(res != 0)) } *(*int32)(unsafe.Pointer(pResOut)) = res return SQLITE_OK } // Lower the locking level on file descriptor id to locktype. locktype // must be either NO_LOCK or SHARED_LOCK. // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. // // It is not possible for this routine to fail if the second argument // is NO_LOCK. If the second argument is SHARED_LOCK then this routine // might return SQLITE_IOERR; func winUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46336:12: */ var type1 int32 var pFile uintptr = id var rc int32 = SQLITE_OK type1 = int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) if type1 >= EXCLUSIVE_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+2), uint32(0), uint32(SHARED_SIZE), uint32(0)) if locktype == SHARED_LOCK && !(winGetReadLock(tls, pFile) != 0) { // This should never happen. We should always be able to // reacquire the read lock rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(8)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4671, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 46350) } } if type1 >= RESERVED_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte+1), uint32(0), uint32(1), uint32(0)) } if locktype == NO_LOCK && type1 >= SHARED_LOCK { winUnlockReadLock(tls, pFile) } if type1 >= PENDING_LOCK { winUnlockFile(tls, pFile+16, uint32(Xsqlite3PendingByte), uint32(0), uint32(1), uint32(0)) } (*WinFile)(unsafe.Pointer(pFile)).Flocktype = U8(locktype) return rc } // ***************************************************************************** // // No-op Locking ********************************** // // Of the various locking implementations available, this is by far the // simplest: locking is ignored. No attempt is made to lock the database // file for reading or writing. // // This locking mode is appropriate for use on read-only databases // (ex: databases that are burned into CD-ROM, for example.) It can // also be used if the application employs some external mechanism to // prevent simultaneous access of the same database by two or more // database connections. But there is a serious risk of database // corruption if this locking mode is used in situations where multiple // database connections are accessing the same database file at the same // time and one or more of those connections are writing. func winNolockLock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46386:12: */ _ = id _ = locktype return SQLITE_OK } func winNolockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46392:12: */ _ = id _ = pResOut return SQLITE_OK } func winNolockUnlock(tls *libc.TLS, id uintptr, locktype int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46398:12: */ _ = id _ = locktype return SQLITE_OK } // ****************** End of the no-op lock implementation ********************* // // // If *pArg is initially negative then this is a query. Set *pArg to // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. func winModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46413:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*WinFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { *(*U8)(unsafe.Pointer(pFile + 28)) &= U8(^int32(mask)) } else { *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(int32(mask)) } } // Control and query of the open file handle. func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46432:12: */ bp := tls.Alloc(24) defer tls.Free(24) var pFile uintptr = id switch op { case SQLITE_FCNTL_LOCKSTATE: { *(*int32)(unsafe.Pointer(pArg)) = int32((*WinFile)(unsafe.Pointer(pFile)).Flocktype) return SQLITE_OK } case SQLITE_FCNTL_LAST_ERRNO: { *(*int32)(unsafe.Pointer(pArg)) = int32((*WinFile)(unsafe.Pointer(pFile)).FlastErrno) return SQLITE_OK } case SQLITE_FCNTL_CHUNK_SIZE: { (*WinFile)(unsafe.Pointer(pFile)).FszChunk = *(*int32)(unsafe.Pointer(pArg)) return SQLITE_OK } case SQLITE_FCNTL_SIZE_HINT: { if (*WinFile)(unsafe.Pointer(pFile)).FszChunk > 0 { // var oldSz Sqlite3_int64 at bp+8, 8 var rc int32 = winFileSize(tls, id, bp+8) if rc == SQLITE_OK { var newSz Sqlite3_int64 = *(*Sqlite3_int64)(unsafe.Pointer(pArg)) if newSz > *(*Sqlite3_int64)(unsafe.Pointer(bp + 8)) { rc = winTruncate(tls, id, newSz) } } return rc } return SQLITE_OK } case SQLITE_FCNTL_PERSIST_WAL: { winModeBit(tls, pFile, uint8(WINFILE_PERSIST_WAL), pArg) return SQLITE_OK } case SQLITE_FCNTL_POWERSAFE_OVERWRITE: { winModeBit(tls, pFile, uint8(WINFILE_PSOW), pArg) return SQLITE_OK } case SQLITE_FCNTL_VFSNAME: { *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*WinFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } case SQLITE_FCNTL_WIN32_AV_RETRY: { var a uintptr = pArg if *(*int32)(unsafe.Pointer(a)) > 0 { winIoerrRetry = *(*int32)(unsafe.Pointer(a)) } else { *(*int32)(unsafe.Pointer(a)) = winIoerrRetry } if *(*int32)(unsafe.Pointer(a + 1*4)) > 0 { winIoerrRetryDelay = *(*int32)(unsafe.Pointer(a + 1*4)) } else { *(*int32)(unsafe.Pointer(a + 1*4)) = winIoerrRetryDelay } return SQLITE_OK } case SQLITE_FCNTL_WIN32_GET_HANDLE: { var phFile LPHANDLE = pArg *(*HANDLE)(unsafe.Pointer(phFile)) = (*WinFile)(unsafe.Pointer(pFile)).Fh return SQLITE_OK } case SQLITE_FCNTL_TEMPFILENAME: { *(*uintptr)(unsafe.Pointer(bp + 16 /* zTFile */)) = uintptr(0) var rc int32 = winGetTempname(tls, (*WinFile)(unsafe.Pointer(pFile)).FpVfs, bp+16) if rc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(pArg)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* zTFile */)) } return rc } case SQLITE_FCNTL_MMAP_SIZE: { var newLimit I64 = *(*I64)(unsafe.Pointer(pArg)) var rc int32 = SQLITE_OK if newLimit > Xsqlite3Config.FmxMmap { newLimit = Xsqlite3Config.FmxMmap } // The value of newLimit may be eventually cast to (SIZE_T) and passed // to MapViewOfFile(). Restrict its value to 2GB if (SIZE_T) is not at // least a 64-bit type. if newLimit > int64(0) && uint64(unsafe.Sizeof(SIZE_T(0))) < uint64(8) { newLimit = newLimit & int64(0x7FFFFFFF) } *(*I64)(unsafe.Pointer(pArg)) = (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax if newLimit >= int64(0) && newLimit != (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax && (*WinFile)(unsafe.Pointer(pFile)).FnFetchOut == 0 { (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax = newLimit if (*WinFile)(unsafe.Pointer(pFile)).FmmapSize > int64(0) { winUnmapfile(tls, pFile) rc = winMapfile(tls, pFile, int64(-1)) } } return rc } } return SQLITE_NOTFOUND } // Return the sector size in bytes of the underlying block device for // the specified file. This is almost always 512 bytes, but may be // larger for some devices. // // SQLite code assumes this function cannot fail. It also assumes that // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. func winSectorSize(tls *libc.TLS, id uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46567:12: */ _ = id return SQLITE_DEFAULT_SECTOR_SIZE } // Return a vector of device characteristics. func winDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46575:12: */ var p uintptr = id return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN | func() int32 { if int32((*WinFile)(unsafe.Pointer(p)).FctrlFlags)&WINFILE_PSOW != 0 { return SQLITE_IOCAP_POWERSAFE_OVERWRITE } return 0 }() } // Windows will only let you create file view mappings // on allocation size granularity boundaries. // During sqlite3_os_init() we do a GetSystemInfo() // to get the granularity size. var winSysInfo SYSTEM_INFO /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46587:20: */ // Helper functions to obtain and relinquish the global mutex. The // global mutex is used to protect the winLockInfo objects used by // this file, all of which may be shared by multiple threads. // // Function winShmMutexHeld() is used to assert() that the global mutex // is held when required. This function is only used as part of assert() // statements. e.g. // // winShmEnterMutex() // assert( winShmMutexHeld() ); // winShmLeaveMutex() var winBigLock uintptr = uintptr(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46604:22 */ func winShmEnterMutex(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46605:13: */ Xsqlite3_mutex_enter(tls, winBigLock) } func winShmLeaveMutex(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46608:13: */ Xsqlite3_mutex_leave(tls, winBigLock) } // Object used to represent a single file opened and mmapped to provide // shared memory. When multiple threads all reference the same // log-summary, each thread has its own winFile object, but they all // point to a single instance of this object. In other words, each // log-summary is opened only once per process. // // winShmMutexHeld() must be true when creating or destroying // this object or while reading or writing the following fields: // // nRef // pNext // // The following fields are read-only after the object is created: // // fid // zFilename // // Either winShmNode.mutex must be held or winShmNode.nRef==0 and // winShmMutexHeld() is true when reading or writing any other field // in this structure. // type ShmRegion = struct { FhMap HANDLE FpMap uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:43162:9 */ // A global array of all winShmNode objects. // // The winShmMutexHeld() must be true while reading or writing this list. var winShmNodeList uintptr = uintptr(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46669:19 */ // Constants used for locking // Apply advisory locks for all n bytes beginning at ofst. func winShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, nByte int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46707:12: */ var rc int32 = 0 // Result code form Lock/UnlockFileEx() // Access to the winShmNode object is serialized by the caller // Release/Acquire the system-level lock if lockType == WINSHM_UNLCK { rc = winUnlockFile(tls, pFile+16+16, uint32(ofst), uint32(0), uint32(nByte), uint32(0)) } else { // Initialize the locking parameters var dwFlags DWORD = DWORD(LOCKFILE_FAIL_IMMEDIATELY) if lockType == WINSHM_WRLCK { dwFlags = dwFlags | DWORD(LOCKFILE_EXCLUSIVE_LOCK) } rc = winLockFile(tls, pFile+16+16, dwFlags, uint32(ofst), uint32(0), uint32(nByte), uint32(0)) } if rc != 0 { rc = SQLITE_OK } else { (*WinShmNode)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) rc = SQLITE_BUSY } return rc } // Purge the winShmNodeList list of all entries with winShmNode.nRef==0. // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. func winShmPurge(tls *libc.TLS, pVfs uintptr, deleteFlag int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46755:13: */ var pp uintptr var p uintptr pp = uintptr(unsafe.Pointer(&winShmNodeList)) for libc.AssignUintptr(&p, *(*uintptr)(unsafe.Pointer(pp))) != uintptr(0) { if (*WinShmNode)(unsafe.Pointer(p)).FnRef == 0 { var i int32 if (*WinShmNode)(unsafe.Pointer(p)).Fmutex != 0 { Xsqlite3_mutex_free(tls, (*WinShmNode)(unsafe.Pointer(p)).Fmutex) } for i = 0; i < (*WinShmNode)(unsafe.Pointer(p)).FnRegion; i++ { var bRc WINBOOL = (*(*func(*libc.TLS, LPCVOID) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 59*24 + 8)))(tls, (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(p)).FaRegion+uintptr(i)*16)).FpMap) _ = bRc _ = bRc bRc = (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(p)).FaRegion+uintptr(i)*16)).FhMap) _ = bRc } if (*WinShmNode)(unsafe.Pointer(p)).FhFile.Fh != uintptr(0) && (*WinShmNode)(unsafe.Pointer(p)).FhFile.Fh != libc.UintptrFromInt64(int64(-1)) { winClose(tls, p+16) } if deleteFlag != 0 { Xsqlite3BeginBenignMalloc(tls) winDelete(tls, pVfs, (*WinShmNode)(unsafe.Pointer(p)).FzFilename, 0) Xsqlite3EndBenignMalloc(tls) } *(*uintptr)(unsafe.Pointer(pp)) = (*WinShmNode)(unsafe.Pointer(p)).FpNext Xsqlite3_free(tls, (*WinShmNode)(unsafe.Pointer(p)).FaRegion) Xsqlite3_free(tls, p) } else { pp = p + 152 } } } // The DMS lock has not yet been taken on shm file pShmNode. Attempt to // take it now. Return SQLITE_OK if successful, or an SQLite error // code otherwise. // // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46806:12: */ var rc int32 = winShmSystemLock(tls, pShmNode, WINSHM_WRLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) if rc == SQLITE_OK { if (*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0 { (*WinShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked = U8(1) winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) return SQLITE_READONLY | int32(5)<<8 } else if winTruncate(tls, pShmNode+16, int64(0)) != 0 { winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4681, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46816) } } if rc == SQLITE_OK { winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) } return winShmSystemLock(tls, pShmNode, WINSHM_RDLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) } // Open the shared-memory area associated with database file pDbFd. // // When opening a new shared-memory file, if no other instances of that // file are currently open, in this process or in other processes, then // the file must be truncated to zero length or have its header cleared. func winOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46835:12: */ bp := tls.Alloc(12) defer tls.Free(12) var p uintptr // The connection to be opened var pShmNode uintptr // The underlying mmapped file var rc int32 // Result code var pNew uintptr // Newly allocated winShmNode var nName int32 var inFlags int32 // var outFlags int32 at bp+8, 4 pShmNode = uintptr(0) rc = SQLITE_OK // Size of zName in bytes // Not previously opened // Allocate space for the new sqlite3_shm object. Also speculatively // allocate space for a new winShmNode and filename. p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(winShm{}))) if !(p == uintptr(0)) { goto __1 } return SQLITE_IOERR | int32(12)<<8 __1: ; nName = Xsqlite3Strlen30(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath) pNew = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(WinShmNode{}))+uint64(nName)+uint64(17)) if !(pNew == uintptr(0)) { goto __2 } Xsqlite3_free(tls, p) return SQLITE_IOERR | int32(12)<<8 __2: ; (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename = pNew + 1*160 Xsqlite3_snprintf(tls, nName+15, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename, ts+4701, libc.VaList(bp, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath)) // Look to see if there is an existing winShmNode that can be used. // If no matching winShmNode currently exists, create a new one. winShmEnterMutex(tls) pShmNode = winShmNodeList __3: if !(pShmNode != 0) { goto __5 } // TBD need to come up with better match here. Perhaps // use FILE_ID_BOTH_DIR_INFO Structure. if !(Xsqlite3StrICmp(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, (*WinShmNode)(unsafe.Pointer(pNew)).FzFilename) == 0) { goto __6 } goto __5 __6: ; goto __4 __4: pShmNode = (*WinShmNode)(unsafe.Pointer(pShmNode)).FpNext goto __3 goto __5 __5: ; if !(pShmNode != 0) { goto __7 } Xsqlite3_free(tls, pNew) goto __8 __7: inFlags = SQLITE_OPEN_WAL *(*int32)(unsafe.Pointer(bp + 8 /* outFlags */)) = 0 pShmNode = pNew pNew = uintptr(0) (*WinFile)(unsafe.Pointer(pShmNode + 16)).Fh = libc.UintptrFromInt64(int64(-1)) (*WinShmNode)(unsafe.Pointer(pShmNode)).FpNext = winShmNodeList winShmNodeList = pShmNode if !(Xsqlite3Config.FbCoreMutex != 0) { goto __9 } (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) if !((*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex == uintptr(0)) { goto __10 } rc = SQLITE_IOERR | int32(12)<<8 goto shm_open_err __10: ; __9: ; if !(0 == Xsqlite3_uri_boolean(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, ts+4708, 0)) { goto __11 } inFlags = inFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) goto __12 __11: inFlags = inFlags | SQLITE_OPEN_READONLY __12: ; rc = winOpen(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FpVfs, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, pShmNode+16, inFlags, bp+8) if !(rc != SQLITE_OK) { goto __13 } rc = winLogErrorAtLine(tls, rc, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4721, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 46898) goto shm_open_err __13: ; if !(*(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OPEN_READONLY) { goto __14 } (*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly = U8(1) __14: ; rc = winLockSharedMemory(tls, pShmNode) if !(rc != SQLITE_OK && rc != SQLITE_READONLY|int32(5)<<8) { goto __15 } goto shm_open_err __15: ; __8: ; // Make the new connection a child of the winShmNode (*winShm)(unsafe.Pointer(p)).FpShmNode = pShmNode (*WinShmNode)(unsafe.Pointer(pShmNode)).FnRef++ (*WinFile)(unsafe.Pointer(pDbFd)).FpShm = p winShmLeaveMutex(tls) // The reference count on pShmNode has already been incremented under // the cover of the winShmEnterMutex() mutex and the pointer from the // new (struct winShm) object to the pShmNode has been set. All that is // left to do is to link the new object into the linked list starting // at pShmNode->pFirst. This must be done while holding the pShmNode->mutex // mutex. Xsqlite3_mutex_enter(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) (*winShm)(unsafe.Pointer(p)).FpNext = (*WinShmNode)(unsafe.Pointer(pShmNode)).FpFirst (*WinShmNode)(unsafe.Pointer(pShmNode)).FpFirst = p Xsqlite3_mutex_leave(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) return rc // Jump here on any error shm_open_err: winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, (22+SQLITE_SHM_NLOCK)*4+SQLITE_SHM_NLOCK, 1) winShmPurge(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FpVfs, 0) // This call frees pShmNode if required Xsqlite3_free(tls, p) Xsqlite3_free(tls, pNew) winShmLeaveMutex(tls) return rc } // Close a connection to shared-memory. Delete the underlying // storage if deleteFlag is true. func winShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46944:12: */ var pDbFd uintptr // Database holding shared-memory var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections pDbFd = fd p = (*WinFile)(unsafe.Pointer(pDbFd)).FpShm if p == uintptr(0) { return SQLITE_OK } pShmNode = (*WinShm)(unsafe.Pointer(p)).FpShmNode // Remove connection p from the set of connections associated // with pShmNode Xsqlite3_mutex_enter(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) for pp = pShmNode + 144; *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 8 { } *(*uintptr)(unsafe.Pointer(pp)) = (*WinShm)(unsafe.Pointer(p)).FpNext // Free the connection p Xsqlite3_free(tls, p) (*WinFile)(unsafe.Pointer(pDbFd)).FpShm = uintptr(0) Xsqlite3_mutex_leave(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) // If pShmNode->nRef has reached 0, then close the underlying // shared-memory file, too winShmEnterMutex(tls) (*WinShmNode)(unsafe.Pointer(pShmNode)).FnRef-- if (*WinShmNode)(unsafe.Pointer(pShmNode)).FnRef == 0 { winShmPurge(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FpVfs, deleteFlag) } winShmLeaveMutex(tls) return SQLITE_OK } // Change the lock state for a shared-memory segment. func winShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:46985:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*WinFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pX uintptr // For looping over all siblings var pShmNode uintptr var rc int32 = SQLITE_OK // Result code var mask U16 // Mask of locks to take or release if p == uintptr(0) { return SQLITE_IOERR | int32(20)<<8 } pShmNode = (*WinShm)(unsafe.Pointer(p)).FpShmNode if pShmNode == uintptr(0) { return SQLITE_IOERR | int32(20)<<8 } mask = U16(uint32(1)<<(ofst+n) - uint32(1)<<ofst) Xsqlite3_mutex_enter(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) if flags&SQLITE_SHM_UNLOCK != 0 { var allMask U16 = U16(0) // Mask of locks held by siblings // See if any siblings hold this same lock for pX = (*WinShmNode)(unsafe.Pointer(pShmNode)).FpFirst; pX != 0; pX = (*WinShm)(unsafe.Pointer(pX)).FpNext { if pX == p { continue } allMask = U16(int32(allMask) | int32((*WinShm)(unsafe.Pointer(pX)).FsharedMask)) } // Unlock the system-level locks if int32(mask)&int32(allMask) == 0 { rc = winShmSystemLock(tls, pShmNode, WINSHM_UNLCK, ofst+(22+SQLITE_SHM_NLOCK)*4, n) } else { rc = SQLITE_OK } // Undo the local locks if rc == SQLITE_OK { *(*U16)(unsafe.Pointer(p + 20)) &= U16(^int32(mask)) *(*U16)(unsafe.Pointer(p + 18)) &= U16(^int32(mask)) } } else if flags&SQLITE_SHM_SHARED != 0 { var allShared U16 = U16(0) // Union of locks held by connections other than "p" // Find out which shared locks are already held by sibling connections. // If any sibling already holds an exclusive lock, go ahead and return // SQLITE_BUSY. for pX = (*WinShmNode)(unsafe.Pointer(pShmNode)).FpFirst; pX != 0; pX = (*WinShm)(unsafe.Pointer(pX)).FpNext { if int32((*WinShm)(unsafe.Pointer(pX)).FexclMask)&int32(mask) != 0 { rc = SQLITE_BUSY break } allShared = U16(int32(allShared) | int32((*WinShm)(unsafe.Pointer(pX)).FsharedMask)) } // Get shared locks at the system level, if necessary if rc == SQLITE_OK { if int32(allShared)&int32(mask) == 0 { rc = winShmSystemLock(tls, pShmNode, WINSHM_RDLCK, ofst+(22+SQLITE_SHM_NLOCK)*4, n) } else { rc = SQLITE_OK } } // Get the local shared locks if rc == SQLITE_OK { *(*U16)(unsafe.Pointer(p + 18)) |= U16(int32(mask)) } } else { // Make sure no sibling connections hold locks that will block this // lock. If any do, return SQLITE_BUSY right away. for pX = (*WinShmNode)(unsafe.Pointer(pShmNode)).FpFirst; pX != 0; pX = (*WinShm)(unsafe.Pointer(pX)).FpNext { if int32((*WinShm)(unsafe.Pointer(pX)).FexclMask)&int32(mask) != 0 || int32((*WinShm)(unsafe.Pointer(pX)).FsharedMask)&int32(mask) != 0 { rc = SQLITE_BUSY break } } // Get the exclusive locks at the system level. Then if successful // also mark the local connection as being locked. if rc == SQLITE_OK { rc = winShmSystemLock(tls, pShmNode, WINSHM_WRLCK, ofst+(22+SQLITE_SHM_NLOCK)*4, n) if rc == SQLITE_OK { *(*U16)(unsafe.Pointer(p + 20)) |= U16(int32(mask)) } } } Xsqlite3_mutex_leave(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) return rc } // Implement a memory barrier or memory fence on shared memory. // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. func winShmBarrier(tls *libc.TLS, fd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47098:13: */ _ = fd // compiler-defined memory barrier winShmEnterMutex(tls) // Also mutex, for redundancy winShmLeaveMutex(tls) } // This function is called to obtain a pointer to region iRegion of the // shared-memory associated with the database file fd. Shared-memory regions // are numbered starting from zero. Each shared-memory region is szRegion // bytes in size. // // If an error occurs, an error code is returned and *pp is set to NULL. // // Otherwise, if the isWrite parameter is 0 and the requested shared-memory // region has not been allocated (by any client, including one running in a // separate process), then *pp is set to NULL and SQLITE_OK returned. If // isWrite is non-zero and the requested shared-memory region has not yet // been allocated, it is allocated by this function. // // If the shared-memory region has already been allocated or is allocated by // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. func winShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47126:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pDbFd uintptr var pShm uintptr var pShmNode uintptr var protect DWORD var flags DWORD var rc int32 var iOffset int32 var iOffsetShift int32 var hMap HANDLE // file-mapping handle var pMap uintptr var apNew uintptr // New aRegion[] array var nByte int32 // Minimum required file size // var sz Sqlite3_int64 at bp, 8 var iOffset1 int32 var iOffsetShift1 int32 var p uintptr pDbFd = fd pShm = (*WinFile)(unsafe.Pointer(pDbFd)).FpShm protect = DWORD(PAGE_READWRITE) flags = DWORD(SECTION_MAP_WRITE | SECTION_MAP_READ) rc = SQLITE_OK if !!(pShm != 0) { goto __1 } rc = winOpenSharedMemory(tls, pDbFd) if !(rc != SQLITE_OK) { goto __2 } return rc __2: ; pShm = (*WinFile)(unsafe.Pointer(pDbFd)).FpShm __1: ; pShmNode = (*WinShm)(unsafe.Pointer(pShm)).FpShmNode Xsqlite3_mutex_enter(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked != 0) { goto __3 } rc = winLockSharedMemory(tls, pShmNode) if !(rc != SQLITE_OK) { goto __4 } goto shmpage_out __4: ; (*WinShmNode)(unsafe.Pointer(pShmNode)).FisUnlocked = U8(0) __3: ; if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion <= iRegion) { goto __5 } // New aRegion[] array nByte = (iRegion + 1) * szRegion // Current size of wal-index file (*WinShmNode)(unsafe.Pointer(pShmNode)).FszRegion = szRegion // The requested region is not mapped into this processes address space. // Check to see if it has been allocated (i.e. if the wal-index file is // large enough to contain the requested region). rc = winFileSize(tls, pShmNode+16, bp) if !(rc != SQLITE_OK) { goto __6 } rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4732, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47169) goto shmpage_out __6: ; if !(*(*Sqlite3_int64)(unsafe.Pointer(bp)) < Sqlite3_int64(nByte)) { goto __7 } // The requested memory region does not exist. If isWrite is set to // zero, exit early. *pp will be set to NULL and SQLITE_OK returned. // // Alternatively, if isWrite is non-zero, use ftruncate() to allocate // the requested memory region. if !!(isWrite != 0) { goto __8 } goto shmpage_out __8: ; rc = winTruncate(tls, pShmNode+16, int64(nByte)) if !(rc != SQLITE_OK) { goto __9 } rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4743, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47184) goto shmpage_out __9: ; __7: ; // Map the requested memory region into this processes address space. apNew = Xsqlite3_realloc64(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion, uint64(iRegion+1)*uint64(unsafe.Sizeof(ShmRegion{}))) if !!(apNew != 0) { goto __10 } rc = SQLITE_IOERR | int32(12)<<8 goto shmpage_out __10: ; (*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion = apNew if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0) { goto __11 } protect = DWORD(PAGE_READONLY) flags = DWORD(SECTION_MAP_READ) __11: ; __12: if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion <= iRegion) { goto __13 } hMap = uintptr(0) // file-mapping handle pMap = uintptr(0) // Mapped memory region hMap = (*(*func(*libc.TLS, HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCWSTR) HANDLE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).FhFile.Fh, uintptr(0), protect, uint32(0), uint32(nByte), uintptr(0)) if !(hMap != 0) { goto __14 } iOffset = (*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion * szRegion iOffsetShift = int32(DWORD(iOffset) % winSysInfo.FdwAllocationGranularity) pMap = (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, SIZE_T) LPVOID)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 49*24 + 8)))(tls, hMap, flags, uint32(0), uint32(iOffset-iOffsetShift), uint64(szRegion+iOffsetShift)) __14: ; if !!(pMap != 0) { goto __15 } (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, (*WinShmNode)(unsafe.Pointer(pShmNode)).FlastErrno, ts+4754, (*WinFile)(unsafe.Pointer(pDbFd)).FzPath, 47243) if !(hMap != 0) { goto __16 } (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, hMap) __16: ; goto shmpage_out __15: ; (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion + uintptr((*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion)*16)).FpMap = pMap (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion + uintptr((*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion)*16)).FhMap = hMap (*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion++ goto __12 __13: ; __5: ; shmpage_out: if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FnRegion > iRegion) { goto __17 } iOffset1 = iRegion * szRegion iOffsetShift1 = int32(DWORD(iOffset1) % winSysInfo.FdwAllocationGranularity) p = (*ShmRegion)(unsafe.Pointer((*WinShmNode)(unsafe.Pointer(pShmNode)).FaRegion + uintptr(iRegion)*16)).FpMap *(*uintptr)(unsafe.Pointer(pp)) = p + uintptr(iOffsetShift1) goto __18 __17: *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) __18: ; if !((*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly != 0 && rc == SQLITE_OK) { goto __19 } rc = SQLITE_READONLY __19: ; Xsqlite3_mutex_leave(tls, (*WinShmNode)(unsafe.Pointer(pShmNode)).Fmutex) return rc } // Cleans up the mapped region of the specified file, if any. func winUnmapfile(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47280:12: */ if (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion != 0 { if !((*(*func(*libc.TLS, LPCVOID) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 59*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion) != 0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4765, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47292) } (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) } if (*WinFile)(unsafe.Pointer(pFile)).FhMap != uintptr(0) { if !((*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFile)).FhMap) != 0) { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4779, (*WinFile)(unsafe.Pointer(pFile)).FzPath, 47303) } (*WinFile)(unsafe.Pointer(pFile)).FhMap = uintptr(0) } return SQLITE_OK } // Memory map or remap the file opened by file-descriptor pFd (if the file // is already mapped, the existing mapping is replaced by the new). Or, if // there already exists a mapping for this file, and there are still // outstanding xFetch() references to it, this function is a no-op. // // If parameter nByte is non-negative, then it is the requested size of // the mapping to create. Otherwise, if nByte is less than zero, then the // requested size is the size of the file on disk. The actual size of the // created mapping is either the requested size or the value configured // using SQLITE_FCNTL_MMAP_SIZE, whichever is smaller. // // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. func winMapfile(tls *libc.TLS, pFd uintptr, nByte Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47329:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Sqlite3_int64)(unsafe.Pointer(bp /* nMap */)) = nByte var rc int32 if (*WinFile)(unsafe.Pointer(pFd)).FnFetchOut > 0 { return SQLITE_OK } if *(*Sqlite3_int64)(unsafe.Pointer(bp)) < int64(0) { rc = winFileSize(tls, pFd, bp) if rc != 0 { return SQLITE_IOERR | int32(7)<<8 } } if *(*Sqlite3_int64)(unsafe.Pointer(bp)) > (*WinFile)(unsafe.Pointer(pFd)).FmmapSizeMax { *(*Sqlite3_int64)(unsafe.Pointer(bp /* nMap */)) = (*WinFile)(unsafe.Pointer(pFd)).FmmapSizeMax } *(*Sqlite3_int64)(unsafe.Pointer(bp /* nMap */)) &= ^Sqlite3_int64(winSysInfo.FdwPageSize - DWORD(1)) if *(*Sqlite3_int64)(unsafe.Pointer(bp)) == int64(0) && (*WinFile)(unsafe.Pointer(pFd)).FmmapSize > int64(0) { winUnmapfile(tls, pFd) } if *(*Sqlite3_int64)(unsafe.Pointer(bp)) != (*WinFile)(unsafe.Pointer(pFd)).FmmapSize { var pNew uintptr = uintptr(0) var protect DWORD = DWORD(PAGE_READONLY) var flags DWORD = DWORD(SECTION_MAP_READ) winUnmapfile(tls, pFd) (*WinFile)(unsafe.Pointer(pFd)).FhMap = (*(*func(*libc.TLS, HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCWSTR) HANDLE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 7*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFd)).Fh, uintptr(0), protect, DWORD(*(*Sqlite3_int64)(unsafe.Pointer(bp))>>32&int64(0xffffffff)), DWORD(*(*Sqlite3_int64)(unsafe.Pointer(bp))&int64(0xffffffff)), uintptr(0)) if (*WinFile)(unsafe.Pointer(pFd)).FhMap == uintptr(0) { (*WinFile)(unsafe.Pointer(pFd)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4793, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47380) // Log the error, but continue normal operation using xRead/xWrite return SQLITE_OK } pNew = (*(*func(*libc.TLS, HANDLE, DWORD, DWORD, DWORD, SIZE_T) LPVOID)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 49*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFd)).FhMap, flags, uint32(0), uint32(0), SIZE_T(*(*Sqlite3_int64)(unsafe.Pointer(bp)))) if pNew == uintptr(0) { (*(*func(*libc.TLS, HANDLE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*24 + 8)))(tls, (*WinFile)(unsafe.Pointer(pFd)).FhMap) (*WinFile)(unsafe.Pointer(pFd)).FhMap = uintptr(0) (*WinFile)(unsafe.Pointer(pFd)).FlastErrno = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(24)<<8, (*WinFile)(unsafe.Pointer(pFd)).FlastErrno, ts+4805, (*WinFile)(unsafe.Pointer(pFd)).FzPath, 47398) // Log the error, but continue normal operation using xRead/xWrite return SQLITE_OK } (*WinFile)(unsafe.Pointer(pFd)).FpMapRegion = pNew (*WinFile)(unsafe.Pointer(pFd)).FmmapSize = *(*Sqlite3_int64)(unsafe.Pointer(bp /* nMap */)) } return SQLITE_OK } // If possible, return a pointer to a mapping of file fd starting at offset // iOff. The mapping must be valid for at least nAmt bytes. // // If such a pointer can be obtained, store it in *pp and return SQLITE_OK. // Or, if one cannot but no error occurs, set *pp to 0 and return SQLITE_OK. // Finally, if an error does occur, return an SQLite error code. The final // value of *pp is undefined in this case. // // If this function does return a pointer, the caller must eventually // release the reference by calling winUnfetch(). func winFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47427:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) if (*WinFile)(unsafe.Pointer(pFd)).FmmapSizeMax > int64(0) { if (*WinFile)(unsafe.Pointer(pFd)).FpMapRegion == uintptr(0) { var rc int32 = winMapfile(tls, pFd, int64(-1)) if rc != SQLITE_OK { return rc } } if (*WinFile)(unsafe.Pointer(pFd)).FmmapSize >= iOff+I64(nAmt) { *(*uintptr)(unsafe.Pointer(pp)) = (*WinFile)(unsafe.Pointer(pFd)).FpMapRegion + uintptr(iOff) (*WinFile)(unsafe.Pointer(pFd)).FnFetchOut++ } } return SQLITE_OK } // If the third argument is non-NULL, then this function releases a // reference obtained by an earlier call to winFetch(). The second // argument passed to this function must be the same as the corresponding // argument that was passed to the winFetch() invocation. // // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. func winUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47469:12: */ var pFd uintptr = fd // The underlying database file // If p==0 (unmap the entire file) then there must be no outstanding // xFetch references. Or, if p!=0 (meaning it is an xFetch reference), // then there must be at least one outstanding. // If p!=0, it must match the iOff value. if p != 0 { (*WinFile)(unsafe.Pointer(pFd)).FnFetchOut-- } else { // FIXME: If Windows truly always prevents truncating or deleting a // file while a mapping is held, then the following winUnmapfile() call // is unnecessary can be omitted - potentially improving // performance. winUnmapfile(tls, pFd) } return SQLITE_OK } // // Here ends the implementation of all sqlite3_file methods. // // End sqlite3_file Methods ******************************* // // This vector defines all the methods that can operate on an // sqlite3_file for win32. var winIoMethod = 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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47512:33 */ // This vector defines all the methods that can operate on an // sqlite3_file for win32 without performing any locking. var winIoNolockMethod = 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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47538:33 */ var winAppData = WinVfsAppData{ FpMethod: 0, // bNoLock } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47560:22 */ var winNolockAppData = WinVfsAppData{ FpMethod: 0, // pAppData FbNoLock: 1, // bNoLock } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47566:22 */ // *************************************************************************** // // sqlite3_vfs methods **************************** // // This division contains the implementation of methods on the // sqlite3_vfs object. // Convert a UTF-8 filename into whatever form the underlying // operating system wants filenames in. Space to hold the result // is obtained from malloc and must be freed by the calling // function. func winConvertFromUtf8Filename(tls *libc.TLS, zFilename uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47606:13: */ var zConverted uintptr = uintptr(0) if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { zConverted = winUtf8ToUnicode(tls, zFilename) } else { zConverted = winUtf8ToMbcs(tls, zFilename, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) } // caller will handle out of memory return zConverted } // This function returns non-zero if the specified UTF-8 string buffer // ends with a directory separator character or one was successfully // added to it. func winMakeEndInDirSep(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47625:12: */ if zBuf != 0 { var nLen int32 = Xsqlite3Strlen30(tls, zBuf) if nLen > 0 { if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nLen-1)))) == '/' || int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nLen-1)))) == '\\' { return 1 } else if nLen+1 < nBuf { *(*int8)(unsafe.Pointer(zBuf + uintptr(nLen))) = int8('\\') *(*int8)(unsafe.Pointer(zBuf + uintptr(nLen+1))) = int8(0) return 1 } } } return 0 } // Create a temporary file name and store the resulting pointer into pzBuf. // The pointer returned in pzBuf must be freed via sqlite3_free(). func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47645:12: */ bp := tls.Alloc(24) defer tls.Free(24) var i Size_t var j Size_t var nPre int32 = Xsqlite3Strlen30(tls, ts+4817) var nMax int32 var nBuf int32 var nDir int32 var nLen int32 var zBuf uintptr // It's odd to simulate an io-error here, but really this is just // using the io-error infrastructure to test that SQLite handles this // function failing. // Allocate a temporary buffer to store the fully qualified file // name for the temporary file. If this fails, we cannot continue. nMax = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname nBuf = nMax + 2 zBuf = Xsqlite3MallocZero(tls, uint64(nBuf)) if !(zBuf != 0) { return SQLITE_IOERR | int32(12)<<8 } // Figure out the effective temporary directory. First, check if one // has been explicitly set by the application; otherwise, use the one // configured by the operating system. nDir = nMax - (nPre + 15) if Xsqlite3_temp_directory != 0 { var nDirLen int32 = Xsqlite3Strlen30(tls, Xsqlite3_temp_directory) if nDirLen > 0 { if !(int32(*(*int8)(unsafe.Pointer(Xsqlite3_temp_directory + uintptr(nDirLen-1)))) == '/' || int32(*(*int8)(unsafe.Pointer(Xsqlite3_temp_directory + uintptr(nDirLen-1)))) == '\\') { nDirLen++ } if nDirLen > nDir { Xsqlite3_free(tls, zBuf) return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4825, uintptr(0), 47686) } Xsqlite3_snprintf(tls, nMax, zBuf, ts+4444, libc.VaList(bp, Xsqlite3_temp_directory)) } } else if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { var zMulti uintptr var zWidePath LPWSTR = Xsqlite3MallocZero(tls, uint64(nMax)*uint64(unsafe.Sizeof(WCHAR(0)))) if !(zWidePath != 0) { Xsqlite3_free(tls, zBuf) return SQLITE_IOERR | int32(12)<<8 } if (*(*func(*libc.TLS, DWORD, LPWSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 32*24 + 8)))(tls, uint32(nMax), zWidePath) == DWORD(0) { Xsqlite3_free(tls, zWidePath) Xsqlite3_free(tls, zBuf) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4841, uintptr(0), 47784) } zMulti = winUnicodeToUtf8(tls, zWidePath) if zMulti != 0 { Xsqlite3_snprintf(tls, nMax, zBuf, ts+4444, libc.VaList(bp+8, zMulti)) Xsqlite3_free(tls, zMulti) Xsqlite3_free(tls, zWidePath) } else { Xsqlite3_free(tls, zWidePath) Xsqlite3_free(tls, zBuf) return SQLITE_IOERR | int32(12)<<8 } } else { var zUtf8 uintptr var zMbcsPath uintptr = Xsqlite3MallocZero(tls, uint64(nMax)) if !(zMbcsPath != 0) { Xsqlite3_free(tls, zBuf) return SQLITE_IOERR | int32(12)<<8 } if (*(*func(*libc.TLS, DWORD, LPSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 31*24 + 8)))(tls, uint32(nMax), zMbcsPath) == DWORD(0) { Xsqlite3_free(tls, zBuf) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(25)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+4857, uintptr(0), 47811) } zUtf8 = winMbcsToUtf8(tls, zMbcsPath, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) if zUtf8 != 0 { Xsqlite3_snprintf(tls, nMax, zBuf, ts+4444, libc.VaList(bp+16, zUtf8)) Xsqlite3_free(tls, zUtf8) } else { Xsqlite3_free(tls, zBuf) return SQLITE_IOERR | int32(12)<<8 } } // Check to make sure the temporary directory ends with an appropriate // separator. If it does not and there is not enough space left to add // one, fail. if !(winMakeEndInDirSep(tls, nDir+1, zBuf) != 0) { Xsqlite3_free(tls, zBuf) return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4873, uintptr(0), 47835) } // Check that the output buffer is large enough for the temporary file // name in the following format: // // "<temporary_directory>/etilqs_XXXXXXXXXXXXXXX\0\0" // // If not, return SQLITE_ERROR. The number 17 is used here in order to // account for the space used by the 15 character random suffix and the // two trailing NUL characters. The final directory separator character // has already added if it was not already present. nLen = Xsqlite3Strlen30(tls, zBuf) if nLen+nPre+17 > nBuf { Xsqlite3_free(tls, zBuf) return winLogErrorAtLine(tls, SQLITE_ERROR, uint32(0), ts+4889, uintptr(0), 47853) } Xsqlite3_snprintf(tls, nBuf-16-nLen, zBuf+uintptr(nLen), ts+4817, 0) j = Size_t(Xsqlite3Strlen30(tls, zBuf)) Xsqlite3_randomness(tls, 15, zBuf+uintptr(j)) i = uint64(0) __1: if !(i < uint64(15)) { goto __3 } { *(*int8)(unsafe.Pointer(zBuf + uintptr(j))) = zChars[uint64(uint8(*(*int8)(unsafe.Pointer(zBuf + uintptr(j)))))%(uint64(unsafe.Sizeof(zChars))-uint64(1))] } goto __2 __2: i++ j++ goto __1 goto __3 __3: ; *(*int8)(unsafe.Pointer(zBuf + uintptr(j))) = int8(0) *(*int8)(unsafe.Pointer(zBuf + uintptr(j+uint64(1)))) = int8(0) *(*uintptr)(unsafe.Pointer(pzBuf)) = zBuf return SQLITE_OK } var zChars = *(*[63]int8)(unsafe.Pointer(ts + 4905)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47646:15 */ // Return TRUE if the named file is really a directory. Return false if // it is something other than a directory, or if there is any kind of memory // allocation failure. func winIsDir(tls *libc.TLS, zConverted uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47876:12: */ bp := tls.Alloc(44) defer tls.Free(44) var attr DWORD var rc int32 = 0 // var lastErrno DWORD at bp+40, 4 if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { *(*int32)(unsafe.Pointer(bp + 36 /* cnt */)) = 0 // var sAttrData WIN32_FILE_ATTRIBUTE_DATA at bp, 36 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(WIN32_FILE_ATTRIBUTE_DATA{}))) for !(libc.AssignInt32(&rc, (*(*func(*libc.TLS, LPCWSTR, GET_FILEEX_INFO_LEVELS, LPVOID) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 22*24 + 8)))(tls, zConverted, GetFileExInfoStandard, bp)) != 0) && winRetryIoerr(tls, bp+36, bp+40) != 0 { } if !(rc != 0) { return 0 // Invalid name? } attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp /* &sAttrData */)).FdwFileAttributes } else { attr = (*(*func(*libc.TLS, LPCSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 20*24 + 8)))(tls, zConverted) } return libc.Bool32(attr != libc.Uint32(libc.Uint32FromInt32(-1)) && attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0) } // Open a file. func winOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, id uintptr, flags int32, pOutFlags uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:47911:12: */ bp := tls.Alloc(24) defer tls.Free(24) var h HANDLE *(*DWORD)(unsafe.Pointer(bp + 12 /* lastErrno */)) = DWORD(0) var dwDesiredAccess DWORD var dwShareMode DWORD var dwCreationDisposition DWORD var dwFlagsAndAttributes DWORD = DWORD(0) var pAppData uintptr var pFile uintptr = id var zConverted uintptr // Filename in OS encoding var zUtf8Name uintptr = zName // Filename in UTF-8 encoding *(*int32)(unsafe.Pointer(bp + 8 /* cnt */)) = 0 // If argument zPath is a NULL pointer, this function is required to open // a temporary file. Use this buffer to store the file name in. *(*uintptr)(unsafe.Pointer(bp /* zTmpname */)) = uintptr(0) // For temporary filename, if necessary. var rc int32 = SQLITE_OK // Function Return Code var isExclusive int32 = flags & SQLITE_OPEN_EXCLUSIVE var isDelete int32 = flags & SQLITE_OPEN_DELETEONCLOSE var isCreate int32 = flags & SQLITE_OPEN_CREATE var isReadonly int32 = flags & SQLITE_OPEN_READONLY var isReadWrite int32 = flags & SQLITE_OPEN_READWRITE // Check the following statements are true: // // (a) Exactly one of the READWRITE and READONLY flags must be set, and // (b) if CREATE is set, then READWRITE must also be set, and // (c) if EXCLUSIVE is set, then CREATE must also be set. // (d) if DELETEONCLOSE is set, then CREATE must also be set. // The main DB, main journal, WAL file and super-journal are never // automatically deleted. Nor are they ever temporary files. // Assert that the upper layer has set one of the "file-type" flags. libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(WinFile{}))) (*WinFile)(unsafe.Pointer(pFile)).Fh = libc.UintptrFromInt64(int64(-1)) // If the second argument to this function is NULL, generate a // temporary file name to use if !(zUtf8Name != 0) { rc = winGetTempname(tls, pVfs, bp) if rc != SQLITE_OK { return rc } zUtf8Name = *(*uintptr)(unsafe.Pointer(bp /* zTmpname */)) } // Database filenames are double-zero terminated if they are not // URIs with parameters. Hence, they can always be passed into // sqlite3_uri_parameter(). // Convert the filename to the system encoding. zConverted = winConvertFromUtf8Filename(tls, zUtf8Name) if zConverted == uintptr(0) { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zTmpname */))) return SQLITE_IOERR | int32(12)<<8 } if winIsDir(tls, zConverted) != 0 { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zTmpname */))) return SQLITE_CANTOPEN | int32(2)<<8 } if isReadWrite != 0 { dwDesiredAccess = 0x80000000 | uint32(0x40000000) } else { dwDesiredAccess = 0x80000000 } // SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is // created. SQLite doesn't use it to indicate "exclusive access" // as it is usually understood. if isExclusive != 0 { // Creates a new file, only if it does not already exist. // If the file exists, it fails. dwCreationDisposition = DWORD(CREATE_NEW) } else if isCreate != 0 { // Open existing file, or create if it doesn't exist dwCreationDisposition = DWORD(OPEN_ALWAYS) } else { // Opens a file, only if it exists. dwCreationDisposition = DWORD(OPEN_EXISTING) } if 0 == Xsqlite3_uri_boolean(tls, zName, ts+4968, 0) { dwShareMode = DWORD(FILE_SHARE_READ | FILE_SHARE_WRITE) } else { dwShareMode = DWORD(0) } if isDelete != 0 { dwFlagsAndAttributes = DWORD(FILE_ATTRIBUTE_TEMPORARY | FILE_ATTRIBUTE_HIDDEN | FILE_FLAG_DELETE_ON_CLOSE) } else { dwFlagsAndAttributes = DWORD(FILE_ATTRIBUTE_NORMAL) } // Reports from the internet are that performance is always // better if FILE_FLAG_RANDOM_ACCESS is used. Ticket #2699. if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { for __ccgo := true; __ccgo; __ccgo = winRetryIoerr(tls, bp+8, bp+12) != 0 { h = (*(*func(*libc.TLS, LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE) HANDLE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*24 + 8)))(tls, zConverted, dwDesiredAccess, dwShareMode, uintptr(0), dwCreationDisposition, dwFlagsAndAttributes, uintptr(0)) if h != libc.UintptrFromInt64(int64(-1)) { break } if isReadWrite != 0 { var rc2 int32 *(*int32)(unsafe.Pointer(bp + 16 /* isRO */)) = 0 Xsqlite3BeginBenignMalloc(tls) rc2 = winAccess(tls, pVfs, zName, SQLITE_ACCESS_READ, bp+16) Xsqlite3EndBenignMalloc(tls) if rc2 == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 0 { break } } } } else { for __ccgo1 := true; __ccgo1; __ccgo1 = winRetryIoerr(tls, bp+8, bp+12) != 0 { h = (*(*func(*libc.TLS, LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE) HANDLE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4*24 + 8)))(tls, zConverted, dwDesiredAccess, dwShareMode, uintptr(0), dwCreationDisposition, dwFlagsAndAttributes, uintptr(0)) if h != libc.UintptrFromInt64(int64(-1)) { break } if isReadWrite != 0 { var rc2 int32 *(*int32)(unsafe.Pointer(bp + 20 /* isRO */)) = 0 Xsqlite3BeginBenignMalloc(tls) rc2 = winAccess(tls, pVfs, zName, SQLITE_ACCESS_READ, bp+20) Xsqlite3EndBenignMalloc(tls) if rc2 == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 20)) != 0 { break } } } } winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 8 /* cnt */)), 48142) if h == libc.UintptrFromInt64(int64(-1)) { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zTmpname */))) if isReadWrite != 0 && !(isExclusive != 0) { return winOpen(tls, pVfs, zName, id, (flags|SQLITE_OPEN_READONLY)&libc.CplInt32(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE), pOutFlags) } else { (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = *(*DWORD)(unsafe.Pointer(bp + 12 /* lastErrno */)) winLogErrorAtLine(tls, SQLITE_CANTOPEN, (*WinFile)(unsafe.Pointer(pFile)).FlastErrno, ts+4978, zUtf8Name, 48157) return Xsqlite3CantopenError(tls, 48158) } } if pOutFlags != 0 { if isReadWrite != 0 { *(*int32)(unsafe.Pointer(pOutFlags)) = SQLITE_OPEN_READWRITE } else { *(*int32)(unsafe.Pointer(pOutFlags)) = SQLITE_OPEN_READONLY } } pAppData = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData { Xsqlite3_free(tls, zConverted) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zTmpname */))) (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods = func() uintptr { if pAppData != 0 { return (*WinVfsAppData)(unsafe.Pointer(pAppData)).FpMethod } return uintptr(unsafe.Pointer(&winIoMethod)) }() (*WinFile)(unsafe.Pointer(pFile)).FpVfs = pVfs (*WinFile)(unsafe.Pointer(pFile)).Fh = h if isReadonly != 0 { *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_RDONLY) } if flags&SQLITE_OPEN_MAIN_DB != 0 && Xsqlite3_uri_boolean(tls, zName, ts+4986, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*U8)(unsafe.Pointer(pFile + 28)) |= U8(WINFILE_PSOW) } (*WinFile)(unsafe.Pointer(pFile)).FlastErrno = DWORD(0) (*WinFile)(unsafe.Pointer(pFile)).FzPath = zName (*WinFile)(unsafe.Pointer(pFile)).FhMap = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FpMapRegion = uintptr(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSize = int64(0) (*WinFile)(unsafe.Pointer(pFile)).FmmapSizeMax = Xsqlite3Config.FszMmap return rc } // Delete the named file. // // Note that Windows does not allow a file to be deleted if some other // process has it open. Sometimes a virus scanner or indexing program // will open a journal file shortly after it is created in order to do // whatever it does. While this other process is holding the // file open, we will be unable to delete it. To work around this // problem, we delay 100 milliseconds and try to delete again. Up // to MX_DELETION_ATTEMPTs deletion attempts are run before giving // up and returning an error. func winDelete(tls *libc.TLS, pVfs uintptr, zFilename uintptr, syncDir int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48234:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*int32)(unsafe.Pointer(bp /* cnt */)) = 0 var rc int32 var attr DWORD *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)) = DWORD(0) var zConverted uintptr _ = pVfs _ = syncDir zConverted = winConvertFromUtf8Filename(tls, zFilename) if zConverted == uintptr(0) { return SQLITE_IOERR | int32(12)<<8 } if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { for __ccgo := true; __ccgo; __ccgo = 1 != 0 { attr = (*(*func(*libc.TLS, LPCWSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*24 + 8)))(tls, zConverted) if attr == libc.Uint32(libc.Uint32FromInt32(-1)) { *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)) = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) if *(*DWORD)(unsafe.Pointer(bp + 4)) == DWORD(2) || *(*DWORD)(unsafe.Pointer(bp + 4)) == DWORD(3) { rc = SQLITE_IOERR | int32(23)<<8 // Already gone? } else { rc = SQLITE_ERROR } break } if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 { rc = SQLITE_ERROR // Files only. break } if (*(*func(*libc.TLS, LPCWSTR) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 10*24 + 8)))(tls, zConverted) != 0 { rc = SQLITE_OK // Deleted OK. break } if !(winRetryIoerr(tls, bp, bp+4) != 0) { rc = SQLITE_ERROR // No more retries. break } } } else { for __ccgo1 := true; __ccgo1; __ccgo1 = 1 != 0 { attr = (*(*func(*libc.TLS, LPCSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 20*24 + 8)))(tls, zConverted) if attr == libc.Uint32(libc.Uint32FromInt32(-1)) { *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)) = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) if *(*DWORD)(unsafe.Pointer(bp + 4)) == DWORD(2) || *(*DWORD)(unsafe.Pointer(bp + 4)) == DWORD(3) { rc = SQLITE_IOERR | int32(23)<<8 // Already gone? } else { rc = SQLITE_ERROR } break } if attr&DWORD(FILE_ATTRIBUTE_DIRECTORY) != 0 { rc = SQLITE_ERROR // Files only. break } if (*(*func(*libc.TLS, LPCSTR) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 9*24 + 8)))(tls, zConverted) != 0 { rc = SQLITE_OK // Deleted OK. break } if !(winRetryIoerr(tls, bp, bp+4) != 0) { rc = SQLITE_ERROR // No more retries. break } } } if rc != 0 && rc != SQLITE_IOERR|int32(23)<<8 { rc = winLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, *(*DWORD)(unsafe.Pointer(bp + 4 /* lastErrno */)), ts+4991, zFilename, 48330) } else { winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp /* cnt */)), 48332) } Xsqlite3_free(tls, zConverted) return rc } // Check the existence and status of a file. func winAccess(tls *libc.TLS, pVfs uintptr, zFilename uintptr, flags int32, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48342:12: */ bp := tls.Alloc(44) defer tls.Free(44) var attr DWORD var rc int32 = 0 *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)) = DWORD(0) var zConverted uintptr _ = pVfs zConverted = winConvertFromUtf8Filename(tls, zFilename) if zConverted == uintptr(0) { return SQLITE_IOERR | int32(12)<<8 } if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { *(*int32)(unsafe.Pointer(bp + 36 /* cnt */)) = 0 // var sAttrData WIN32_FILE_ATTRIBUTE_DATA at bp, 36 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(WIN32_FILE_ATTRIBUTE_DATA{}))) for !(libc.AssignInt32(&rc, (*(*func(*libc.TLS, LPCWSTR, GET_FILEEX_INFO_LEVELS, LPVOID) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 22*24 + 8)))(tls, zConverted, GetFileExInfoStandard, bp)) != 0) && winRetryIoerr(tls, bp+36, bp+40) != 0 { } if rc != 0 { // For an SQLITE_ACCESS_EXISTS query, treat a zero-length file // as if it does not exist. if flags == SQLITE_ACCESS_EXISTS && (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp)).FnFileSizeHigh == DWORD(0) && (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp)).FnFileSizeLow == DWORD(0) { attr = libc.Uint32(libc.Uint32FromInt32(-1)) } else { attr = (*WIN32_FILE_ATTRIBUTE_DATA)(unsafe.Pointer(bp /* &sAttrData */)).FdwFileAttributes } } else { winLogIoerr(tls, *(*int32)(unsafe.Pointer(bp + 36 /* cnt */)), 48382) if *(*DWORD)(unsafe.Pointer(bp + 40)) != DWORD(2) && *(*DWORD)(unsafe.Pointer(bp + 40)) != DWORD(3) { Xsqlite3_free(tls, zConverted) return winLogErrorAtLine(tls, SQLITE_IOERR|int32(13)<<8, *(*DWORD)(unsafe.Pointer(bp + 40 /* lastErrno */)), ts+5001, zFilename, 48385) } else { attr = libc.Uint32(libc.Uint32FromInt32(-1)) } } } else { attr = (*(*func(*libc.TLS, LPCSTR) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 20*24 + 8)))(tls, zConverted) } Xsqlite3_free(tls, zConverted) switch flags { case SQLITE_ACCESS_READ: fallthrough case SQLITE_ACCESS_EXISTS: rc = libc.Bool32(attr != libc.Uint32(libc.Uint32FromInt32(-1))) break case SQLITE_ACCESS_READWRITE: rc = libc.Bool32(attr != libc.Uint32(libc.Uint32FromInt32(-1)) && attr&DWORD(FILE_ATTRIBUTE_READONLY) == DWORD(0)) break default: } *(*int32)(unsafe.Pointer(pResOut)) = rc return SQLITE_OK } // Returns non-zero if the specified path name starts with the "long path" // prefix. func winIsLongPathPrefix(tls *libc.TLS, zPathname uintptr) WINBOOL { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48420:13: */ return libc.Bool32(int32(*(*int8)(unsafe.Pointer(zPathname))) == '\\' && int32(*(*int8)(unsafe.Pointer(zPathname + 1))) == '\\' && int32(*(*int8)(unsafe.Pointer(zPathname + 2))) == '?' && int32(*(*int8)(unsafe.Pointer(zPathname + 3))) == '\\') } // Returns non-zero if the specified path name starts with a drive letter // followed by a colon character. func winIsDriveLetterAndColon(tls *libc.TLS, zPathname uintptr) WINBOOL { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48431:13: */ return libc.Bool32(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zPathname)))])&0x02 != 0 && int32(*(*int8)(unsafe.Pointer(zPathname + 1))) == ':') } // Returns non-zero if the specified path name should be used verbatim. If // non-zero is returned from this function, the calling function must simply // use the provided path name verbatim -OR- resolve it into a full path name // using the GetFullPathName Win32 API function (if available). func winIsVerbatimPathname(tls *libc.TLS, zPathname uintptr) WINBOOL { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48443:13: */ // If the path name starts with a forward slash or a backslash, it is either // a legal UNC name, a volume relative path, or an absolute path name in the // "Unix" format on Windows. There is no easy way to differentiate between // the final two cases; therefore, we return the safer return value of TRUE // so that callers of this function will simply use it verbatim. if int32(*(*int8)(unsafe.Pointer(zPathname))) == '/' || int32(*(*int8)(unsafe.Pointer(zPathname))) == '\\' { return TRUE } // If the path name starts with a letter and a colon it is either a volume // relative path or an absolute path. Callers of this function must not // attempt to treat it as a relative path name (i.e. they should simply use // it verbatim). if winIsDriveLetterAndColon(tls, zPathname) != 0 { return TRUE } // If we get to this point, the path name should almost certainly be a purely // relative one (i.e. not a UNC name, not absolute, and not volume relative). return FALSE } // Turn a relative pathname into a full pathname. Write the full // pathname into zOut[]. zOut[] will be at least pVfs->mxPathname // bytes in size. func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48479:12: */ bp := tls.Alloc(32) defer tls.Free(32) var nByte DWORD var zConverted uintptr var zOut uintptr // If this path name begins with "/X:" or "\\?\", where "X" is any // alphabetic character, discard the initial "/" from the pathname. if int32(*(*int8)(unsafe.Pointer(zRelative))) == '/' && (winIsDriveLetterAndColon(tls, zRelative+uintptr(1)) != 0 || winIsLongPathPrefix(tls, zRelative+uintptr(1)) != 0) { zRelative++ } // It's odd to simulate an io-error here, but really this is just // using the io-error infrastructure to test that SQLite handles this // function failing. This function could fail if, for example, the // current working directory has been unlinked. if Xsqlite3_data_directory != 0 && !(winIsVerbatimPathname(tls, zRelative) != 0) { // NOTE: We are dealing with a relative path name and the data // directory has been set. Therefore, use it as the basis // for converting the relative path name to an absolute // one by prepending the data directory and a backslash. Xsqlite3_snprintf(tls, func() int32 { if nFull < (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname { return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname }(), zFull, ts+5011, libc.VaList(bp, Xsqlite3_data_directory, '\\', zRelative)) return SQLITE_OK } zConverted = winConvertFromUtf8Filename(tls, zRelative) if zConverted == uintptr(0) { return SQLITE_IOERR | int32(12)<<8 } if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { var zTemp LPWSTR nByte = (*(*func(*libc.TLS, LPCWSTR, DWORD, LPWSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls, zConverted, uint32(0), uintptr(0), uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5018, zRelative, 48602) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(WCHAR(0)))) if zTemp == uintptr(0) { Xsqlite3_free(tls, zConverted) return SQLITE_IOERR | int32(12)<<8 } nByte = (*(*func(*libc.TLS, LPCWSTR, DWORD, LPWSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*24 + 8)))(tls, zConverted, nByte, zTemp, uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, zTemp) return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5035, zRelative, 48615) } Xsqlite3_free(tls, zConverted) zOut = winUnicodeToUtf8(tls, zTemp) Xsqlite3_free(tls, zTemp) } else { var zTemp uintptr nByte = (*(*func(*libc.TLS, LPCSTR, DWORD, LPSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*24 + 8)))(tls, zConverted, uint32(0), uintptr(0), uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5052, zRelative, 48628) } nByte = nByte + DWORD(3) zTemp = Xsqlite3MallocZero(tls, uint64(nByte)*uint64(unsafe.Sizeof(int8(0)))) if zTemp == uintptr(0) { Xsqlite3_free(tls, zConverted) return SQLITE_IOERR | int32(12)<<8 } nByte = (*(*func(*libc.TLS, LPCSTR, DWORD, LPSTR, uintptr) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*24 + 8)))(tls, zConverted, nByte, zTemp, uintptr(0)) if nByte == DWORD(0) { Xsqlite3_free(tls, zConverted) Xsqlite3_free(tls, zTemp) return winLogErrorAtLine(tls, SQLITE_CANTOPEN|int32(3)<<8, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), ts+5069, zRelative, 48641) } Xsqlite3_free(tls, zConverted) zOut = winMbcsToUtf8(tls, zTemp, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8)))(tls)) Xsqlite3_free(tls, zTemp) } if zOut != 0 { Xsqlite3_snprintf(tls, func() int32 { if nFull < (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname { return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname }(), zFull, ts+4444, libc.VaList(bp+24, zOut)) Xsqlite3_free(tls, zOut) return SQLITE_OK } else { return SQLITE_IOERR | int32(12)<<8 } return int32(0) } // Interfaces for opening a shared library, finding entry points // within the shared library, and closing the shared library. func winDlOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48664:13: */ var h HANDLE var zConverted uintptr = winConvertFromUtf8Filename(tls, zFilename) _ = pVfs if zConverted == uintptr(0) { return uintptr(0) } if sqlite3_os_type == 2 || Xsqlite3_win32_is_nt(tls) != 0 { h = (*(*func(*libc.TLS, LPCWSTR) HMODULE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 45*24 + 8)))(tls, zConverted) } else { h = (*(*func(*libc.TLS, LPCSTR) HMODULE)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 44*24 + 8)))(tls, zConverted) } Xsqlite3_free(tls, zConverted) return h } func winDlError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBufOut uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48705:13: */ _ = pVfs winGetLastErrorMsg(tls, (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls), nBuf, zBufOut) } func winDlSym(tls *libc.TLS, pVfs uintptr, pH uintptr, zSym uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48709:13: */ var proc FARPROC _ = pVfs proc = (*(*func(*libc.TLS, HMODULE, LPCSTR) FARPROC)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*24 + 8)))(tls, pH, zSym) return proc } func winDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48717:13: */ _ = pVfs (*(*func(*libc.TLS, HMODULE) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16*24 + 8)))(tls, pHandle) } // State information for the randomness gatherer. type EntropyGatherer1 = struct { Fa uintptr Fna int32 Fi int32 FnXor int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48730:9 */ // State information for the randomness gatherer. type EntropyGatherer = EntropyGatherer1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48730:32 */ // Mix sz bytes of entropy into p. func xorMemory(tls *libc.TLS, p uintptr, x uintptr, sz int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48740:13: */ var j int32 var k int32 j = 0 k = (*EntropyGatherer)(unsafe.Pointer(p)).Fi for ; j < sz; j++ { *(*uint8)(unsafe.Pointer((*EntropyGatherer)(unsafe.Pointer(p)).Fa + uintptr(libc.PostIncInt32(&k, 1)))) ^= uint8(int32(*(*uint8)(unsafe.Pointer(x + uintptr(j))))) if k >= (*EntropyGatherer)(unsafe.Pointer(p)).Fna { k = 0 } } (*EntropyGatherer)(unsafe.Pointer(p)).Fi = k *(*int32)(unsafe.Pointer(p + 16)) += sz } // Write up to nBuf bytes of randomness into zBuf. func winRandomness(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48754:12: */ bp := tls.Alloc(56) defer tls.Free(56) // var e EntropyGatherer at bp+16, 24 _ = pVfs libc.Xmemset(tls, zBuf, 0, uint64(nBuf)) (*EntropyGatherer)(unsafe.Pointer(bp + 16 /* &e */)).Fa = zBuf (*EntropyGatherer)(unsafe.Pointer(bp + 16 /* &e */)).Fna = nBuf (*EntropyGatherer)(unsafe.Pointer(bp + 16 /* &e */)).FnXor = 0 (*EntropyGatherer)(unsafe.Pointer(bp + 16 /* &e */)).Fi = 0 { // var x SYSTEMTIME at bp, 16 (*(*func(*libc.TLS, LPSYSTEMTIME))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 29*24 + 8)))(tls, bp) xorMemory(tls, bp+16, bp, int32(unsafe.Sizeof(SYSTEMTIME{}))) } { *(*DWORD)(unsafe.Pointer(bp + 40 /* pid */)) = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*24 + 8)))(tls) xorMemory(tls, bp+16, bp+40, int32(unsafe.Sizeof(DWORD(0)))) } { *(*DWORD)(unsafe.Pointer(bp + 44 /* cnt */)) = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 33*24 + 8)))(tls) xorMemory(tls, bp+16, bp+44, int32(unsafe.Sizeof(DWORD(0)))) } { // var i LARGE_INTEGER at bp+48, 8 (*(*func(*libc.TLS, uintptr) WINBOOL)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 51*24 + 8)))(tls, bp+48) xorMemory(tls, bp+16, bp+48, int32(unsafe.Sizeof(LARGE_INTEGER{}))) } if (*EntropyGatherer)(unsafe.Pointer(bp+16)).FnXor > nBuf { return nBuf } return (*EntropyGatherer)(unsafe.Pointer(bp + 16 /* &e */)).FnXor } // Sleep for a little while. Return the amount of time slept. func winSleep(tls *libc.TLS, pVfs uintptr, microsec int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48811:12: */ Xsqlite3_win32_sleep(tls, uint32((microsec+999)/1000)) _ = pVfs return (microsec + 999) / 1000 * 1000 } // The following variable, if set to a non-zero value, is interpreted as // the number of seconds since 1970 and is used to set the result of // sqlite3OsCurrentTime() during testing. // Find the current time (in Universal Coordinated Time). Write into *piNow // the current time and date as a Julian Day number times 86_400_000. In // other words, write into *piNow the number of milliseconds since the Julian // epoch of noon in Greenwich on November 24, 4714 B.C according to the // proleptic Gregorian calendar. // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. func winCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, piNow uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48836:12: */ bp := tls.Alloc(8) defer tls.Free(8) // FILETIME structure is a 64-bit value representing the number of // 100-nanosecond intervals since January 1, 1601 (= JD 2305813.5). // // var ft FILETIME at bp, 8 (*(*func(*libc.TLS, LPFILETIME))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 30*24 + 8)))(tls, bp) *(*Sqlite3_int64)(unsafe.Pointer(piNow)) = winFiletimeEpoch + (Sqlite3_int64((*FILETIME)(unsafe.Pointer(bp)).FdwHighDateTime)*max32BitValue+Sqlite3_int64((*FILETIME)(unsafe.Pointer(bp)).FdwLowDateTime))/int64(10000) _ = pVfs return SQLITE_OK } var winFiletimeEpoch Sqlite3_int64 = int64(23058135) * int64(8640000) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48841:30 */ var max32BitValue Sqlite3_int64 = int64(2000000000) + int64(2000000000) + int64(294967296) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48846:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. func winCurrentTime(tls *libc.TLS, pVfs uintptr, prNow uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48879:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var i Sqlite3_int64 at bp, 8 rc = winCurrentTimeInt64(tls, pVfs, bp) if !(rc != 0) { *(*float64)(unsafe.Pointer(prNow)) = float64(*(*Sqlite3_int64)(unsafe.Pointer(bp))) / 86400000.0 } return rc } // The idea is that this function works like a combination of // GetLastError() and FormatMessage() on Windows (or errno and // strerror_r() on Unix). After an error is returned by an OS // function, SQLite calls this function with zBuf pointing to // a buffer of nBuf bytes. The OS layer should populate the // buffer with a nul-terminated UTF-8 encoded error message // describing the last IO error to have occurred within the calling // thread. // // If the error message is too large for the supplied buffer, // it should be truncated. The return value of xGetLastError // is zero if the error message fits in the buffer, or non-zero // otherwise (if the message was truncated). If non-zero is returned, // then it is not necessary to include the nul-terminator character // in the output buffer. // // Not supplying an error message will have no adverse effect // on SQLite. It is fine to have an implementation that never // returns an error message: // // int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){ // assert(zBuf[0]=='\0'); // return 0; // } // // However if an error message is supplied, it will be incorporated // by sqlite into the error message available to the user using // sqlite3_errmsg(), possibly making IO errors easier to debug. func winGetLastError(tls *libc.TLS, pVfs uintptr, nBuf int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48919:12: */ var e DWORD = (*(*func(*libc.TLS) DWORD)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*24 + 8)))(tls) _ = pVfs if nBuf > 0 { winGetLastErrorMsg(tls, e, nBuf, zBuf) } return int32(e) } // Initialize and deinitialize the operating system interface. func Xsqlite3_os_init(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48929:16: */ // Double-check that the aSyscall[] array has been constructed // correctly. See ticket [bb3a86e890c8e96ab] // get memory map allocation granularity libc.Xmemset(tls, uintptr(unsafe.Pointer(&winSysInfo)), 0, uint64(unsafe.Sizeof(SYSTEM_INFO{}))) (*(*func(*libc.TLS, LPSYSTEM_INFO))(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 28*24 + 8)))(tls, uintptr(unsafe.Pointer(&winSysInfo))) Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&winVfs)), 1) Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&winLongPathVfs)), 0) Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&winNolockVfs)), 0) Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&winLongPathNolockVfs)), 0) winBigLock = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) return SQLITE_OK } var winVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile FmxPathname: MAX_PATH * 4, FzName: ts + 5086, FpAppData: 0, // 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 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48930:22 */ var winLongPathVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), FzName: ts + 5092, FpAppData: 0, // 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 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48955:22 */ var winNolockVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile FmxPathname: MAX_PATH * 4, FzName: ts + 5107, FpAppData: 0, // 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 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:48980:22 */ var winLongPathNolockVfs = Sqlite3_vfs{ FiVersion: 3, // iVersion FszOsFile: int32(unsafe.Sizeof(WinFile{})), // szOsFile FmxPathname: int32(uint64(unsafe.Sizeof(WCHAR(0))) * uint64(32767)), FzName: ts + 5118, FpAppData: 0, // 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 FxSetSystemCall: 0, // xSetSystemCall FxGetSystemCall: 0, // xGetSystemCall FxNextSystemCall: 0, // xNextSystemCall } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49005:22 */ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49064:16: */ winBigLock = uintptr(0) return SQLITE_OK } //************* End of os_win.c ********************************************* //************* Begin file memdb.c ****************************************** // 2016-09-07 // // 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 in-memory VFS. A database is held as a contiguous // block of memory. // // This file also implements interface sqlite3_serialize() and // sqlite3_deserialize(). // #include "sqliteInt.h" // Forward declaration of objects used by this utility type MemVfs = sqlite3_vfs /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49107:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49108:9 */ type MemFile = MemFile1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49108:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 FszMax Sqlite3_int64 FaData uintptr FpMutex uintptr FnMmap int32 FmFlags uint32 FnRdLock int32 FnWrLock int32 FnRef int32 F__ccgo_pad1 [4]byte FzFName uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49108:9 */ type MemStore = MemStore1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49109:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. type MemFS = struct { FnMemStore int32 F__ccgo_pad1 [4]byte FapMemStore uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49179:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. var memdb_g MemFS /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49182:3: */ var memdb_vfs = Sqlite3_vfs{ FiVersion: 2, // szOsFile (set when registered) FmxPathname: 1024, // pNext FzName: ts + 5138, FxOpen: 0, /* memdbDelete, */ // xDelete FxAccess: 0, // xAccess FxFullPathname: 0, // xFullPathname FxDlOpen: 0, // xDlOpen FxDlError: 0, // xDlError FxDlSym: 0, // xDlSym FxDlClose: 0, // xDlClose FxRandomness: 0, // xRandomness FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime FxGetLastError: 0, // xGetLastError FxCurrentTimeInt64: 0, // xNextSystemCall } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49218:20 */ var memdb_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, /* memdbCheckReservedLock, */ // xCheckReservedLock FxFileControl: 0, /* memdbSectorSize,*/ // xSectorSize FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49243:33 */ // Enter/leave the mutex on a MemStore func memdbEnter(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49276:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } func memdbLeave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49279:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49291:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) for i = 0; i < memdb_g.FnMemStore; i++ { if *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) == p { memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FnRef == 1 { *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(libc.PreDecInt32(&memdb_g.FnMemStore, 1))*8)) if memdb_g.FnMemStore == 0 { Xsqlite3_free(tls, memdb_g.FapMemStore) memdb_g.FapMemStore = uintptr(0) } } break } } Xsqlite3_mutex_leave(tls, pVfsMutex) } else { memdbEnter(tls, p) } (*MemStore)(unsafe.Pointer(p)).FnRef-- if (*MemStore)(unsafe.Pointer(p)).FnRef <= 0 { if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_FREEONCLOSE) != 0 { Xsqlite3_free(tls, (*MemStore)(unsafe.Pointer(p)).FaData) } memdbLeave(tls, p) Xsqlite3_mutex_free(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) Xsqlite3_free(tls, p) } else { memdbLeave(tls, p) } return SQLITE_OK } // Read data from an memdb-file. func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49333:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { libc.Xmemset(tls, zBuf, 0, uint64(iAmt)) if iOfst < (*MemStore)(unsafe.Pointer(p)).Fsz { libc.Xmemcpy(tls, zBuf, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), uint64((*MemStore)(unsafe.Pointer(p)).Fsz-iOfst)) } memdbLeave(tls, p) return SQLITE_IOERR | int32(2)<<8 } libc.Xmemcpy(tls, zBuf, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), uint64(iAmt)) memdbLeave(tls, p) return SQLITE_OK } // Try to enlarge the memory allocation to hold at least sz bytes func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49355:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL } if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax { return SQLITE_FULL } newSz = newSz * int64(2) if newSz > (*MemStore)(unsafe.Pointer(p)).FszMax { newSz = (*MemStore)(unsafe.Pointer(p)).FszMax } pNew = Xsqlite3Realloc(tls, (*MemStore)(unsafe.Pointer(p)).FaData, uint64(newSz)) if pNew == uintptr(0) { return SQLITE_IOERR | int32(12)<<8 } (*MemStore)(unsafe.Pointer(p)).FaData = pNew (*MemStore)(unsafe.Pointer(p)).FszAlloc = newSz return SQLITE_OK } // Write data to an memdb-file. func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49375:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { // Can't happen: memdbLock() will return SQLITE_READONLY before // reaching this point memdbLeave(tls, p) return SQLITE_IOERR | int32(3)<<8 } if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { var rc int32 if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).FszAlloc && libc.AssignInt32(&rc, memdbEnlarge(tls, p, iOfst+Sqlite_int64(iAmt))) != SQLITE_OK { memdbLeave(tls, p) return rc } if iOfst > (*MemStore)(unsafe.Pointer(p)).Fsz { libc.Xmemset(tls, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr((*MemStore)(unsafe.Pointer(p)).Fsz), 0, uint64(iOfst-(*MemStore)(unsafe.Pointer(p)).Fsz)) } (*MemStore)(unsafe.Pointer(p)).Fsz = iOfst + Sqlite_int64(iAmt) } libc.Xmemcpy(tls, (*MemStore)(unsafe.Pointer(p)).FaData+uintptr(iOfst), z, uint64(iAmt)) memdbLeave(tls, p) return SQLITE_OK } // Truncate an memdb-file. // // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49412:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) if size > (*MemStore)(unsafe.Pointer(p)).Fsz { // This can only happen with a corrupt wal mode db rc = SQLITE_CORRUPT } else { (*MemStore)(unsafe.Pointer(p)).Fsz = size } memdbLeave(tls, p) return rc } // Sync an memdb-file. func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49429:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49438:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz memdbLeave(tls, p) return SQLITE_OK } // Lock an memdb-file. func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49449:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK if eLock == (*MemFile)(unsafe.Pointer(pThis)).FeLock { return SQLITE_OK } memdbEnter(tls, p) if eLock > SQLITE_LOCK_SHARED { if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { rc = SQLITE_READONLY } else if (*MemFile)(unsafe.Pointer(pThis)).FeLock <= SQLITE_LOCK_SHARED { if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { rc = SQLITE_BUSY } else { (*MemStore)(unsafe.Pointer(p)).FnWrLock = 1 } } } else if eLock == SQLITE_LOCK_SHARED { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 } else if (*MemStore)(unsafe.Pointer(p)).FnWrLock != 0 { rc = SQLITE_BUSY } else { (*MemStore)(unsafe.Pointer(p)).FnRdLock++ } } else { if (*MemFile)(unsafe.Pointer(pThis)).FeLock > SQLITE_LOCK_SHARED { (*MemStore)(unsafe.Pointer(p)).FnWrLock = 0 } (*MemStore)(unsafe.Pointer(p)).FnRdLock-- } if rc == SQLITE_OK { (*MemFile)(unsafe.Pointer(pThis)).FeLock = eLock } memdbLeave(tls, p) return rc } // File control method. For custom operations on an memdb-file. func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49503:12: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+5144, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { var iLimit Sqlite3_int64 = *(*Sqlite3_int64)(unsafe.Pointer(pArg)) if iLimit < (*MemStore)(unsafe.Pointer(p)).Fsz { if iLimit < int64(0) { iLimit = (*MemStore)(unsafe.Pointer(p)).FszMax } else { iLimit = (*MemStore)(unsafe.Pointer(p)).Fsz } } (*MemStore)(unsafe.Pointer(p)).FszMax = iLimit *(*Sqlite3_int64)(unsafe.Pointer(pArg)) = iLimit rc = SQLITE_OK } memdbLeave(tls, p) return rc } // Return the device characteristic flags supported by an memdb-file. func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49540:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49549:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) } else { (*MemStore)(unsafe.Pointer(p)).FnMmap++ *(*uintptr)(unsafe.Pointer(pp)) = (*MemStore)(unsafe.Pointer(p)).FaData + uintptr(iOfst) } memdbLeave(tls, p) return SQLITE_OK } // Release a memory-mapped page func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49568:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage memdbEnter(tls, p) (*MemStore)(unsafe.Pointer(p)).FnMmap-- memdbLeave(tls, p) return SQLITE_OK } // Open an mem file handle. func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49581:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 _ = pVfs libc.Xmemset(tls, pFile, 0, uint64(unsafe.Sizeof(MemFile{}))) szName = Xsqlite3Strlen30(tls, zName) if szName > 1 && int32(*(*int8)(unsafe.Pointer(zName))) == '/' { var i int32 var pVfsMutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_VFS1) Xsqlite3_mutex_enter(tls, pVfsMutex) for i = 0; i < memdb_g.FnMemStore; i++ { if libc.Xstrcmp(tls, (*MemStore)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)))).FzFName, zName) == 0 { p = *(*uintptr)(unsafe.Pointer(memdb_g.FapMemStore + uintptr(i)*8)) break } } if p == uintptr(0) { var apNew uintptr p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(MemStore{}))+uint64(szName)+uint64(3)) if p == uintptr(0) { Xsqlite3_mutex_leave(tls, pVfsMutex) return SQLITE_NOMEM } apNew = Xsqlite3Realloc(tls, memdb_g.FapMemStore, uint64(unsafe.Sizeof(uintptr(0)))*uint64(memdb_g.FnMemStore+1)) if apNew == uintptr(0) { Xsqlite3_free(tls, p) Xsqlite3_mutex_leave(tls, pVfsMutex) return SQLITE_NOMEM } *(*uintptr)(unsafe.Pointer(apNew + uintptr(libc.PostIncInt32(&memdb_g.FnMemStore, 1))*8)) = p memdb_g.FapMemStore = apNew libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{}))) (*MemStore)(unsafe.Pointer(p)).FmFlags = uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE) (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize (*MemStore)(unsafe.Pointer(p)).FzFName = p + 1*72 libc.Xmemcpy(tls, (*MemStore)(unsafe.Pointer(p)).FzFName, zName, uint64(szName+1)) (*MemStore)(unsafe.Pointer(p)).FpMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) if (*MemStore)(unsafe.Pointer(p)).FpMutex == uintptr(0) { memdb_g.FnMemStore-- Xsqlite3_free(tls, p) Xsqlite3_mutex_leave(tls, pVfsMutex) return SQLITE_NOMEM } (*MemStore)(unsafe.Pointer(p)).FnRef = 1 memdbEnter(tls, p) } else { memdbEnter(tls, p) (*MemStore)(unsafe.Pointer(p)).FnRef++ } Xsqlite3_mutex_leave(tls, pVfsMutex) } else { p = Xsqlite3Malloc(tls, uint64(unsafe.Sizeof(MemStore{}))) if p == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemStore{}))) (*MemStore)(unsafe.Pointer(p)).FmFlags = uint32(SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE) (*MemStore)(unsafe.Pointer(p)).FszMax = Xsqlite3Config.FmxMemdbSize } (*MemFile)(unsafe.Pointer(pFile)).FpStore = p if pOutFlags != uintptr(0) { *(*int32)(unsafe.Pointer(pOutFlags)) = flags | SQLITE_OPEN_MEMORY } (*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods = uintptr(unsafe.Pointer(&memdb_io_methods)) memdbLeave(tls, p) return SQLITE_OK } // Test for access permissions. Return true if the requested permission // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49678:12: */ _ = pVfs _ = zPath _ = flags *(*int32)(unsafe.Pointer(pResOut)) = 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 (INST_MAX_PATHNAME+1) bytes. func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49696:12: */ bp := tls.Alloc(8) defer tls.Free(8) _ = pVfs Xsqlite3_snprintf(tls, nOut, zOut, ts+4444, libc.VaList(bp, zPath)) return SQLITE_OK } // Open the dynamic library located at zPath and return a handle. func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49710:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, 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 memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49719:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49726:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49733:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) } // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49741:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) } // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49749:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49762:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49765:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) } // Translate a database connection pointer and schema name into a // MemFile pointer. func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49773:16: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) var pStore uintptr var rc int32 = Xsqlite3_file_control(tls, db, zSchema, SQLITE_FCNTL_FILE_POINTER, bp) if rc != 0 { return uintptr(0) } if (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fbase.FpMethods != uintptr(unsafe.Pointer(&memdb_io_methods)) { return uintptr(0) } pStore = (*MemFile)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpStore memdbEnter(tls, pStore) if (*MemStore)(unsafe.Pointer(pStore)).FzFName != uintptr(0) { *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) } memdbLeave(tls, pStore) return *(*uintptr)(unsafe.Pointer(bp /* p */)) } // Return the serialization of a database func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49789:26: */ bp := tls.Alloc(24) defer tls.Free(24) var p uintptr var iDb int32 var pBt uintptr var sz Sqlite3_int64 var szPage int32 = 0 *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) var pOut uintptr var zSql uintptr var rc int32 if zSchema == uintptr(0) { zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName } p = memdbFromDbSchema(tls, db, zSchema) iDb = Xsqlite3FindDbName(tls, db, zSchema) if piSize != 0 { *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = int64(-1) } if iDb < 0 { return uintptr(0) } if p != 0 { var pStore uintptr = (*MemFile)(unsafe.Pointer(p)).FpStore if piSize != 0 { *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = (*MemStore)(unsafe.Pointer(pStore)).Fsz } if mFlags&uint32(SQLITE_SERIALIZE_NOCOPY) != 0 { pOut = (*MemStore)(unsafe.Pointer(pStore)).FaData } else { pOut = Xsqlite3_malloc64(tls, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz)) if pOut != 0 { libc.Xmemcpy(tls, pOut, (*MemStore)(unsafe.Pointer(pStore)).FaData, uint64((*MemStore)(unsafe.Pointer(pStore)).Fsz)) } } return pOut } pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt if pBt == uintptr(0) { return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) zSql = Xsqlite3_mprintf(tls, ts+5159, libc.VaList(bp, zSchema)) if zSql != 0 { rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { rc = SQLITE_NOMEM } Xsqlite3_free(tls, zSql) if rc != 0 { return uintptr(0) } rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if rc != SQLITE_ROW { pOut = uintptr(0) } else { sz = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), 0) * Sqlite_int64(szPage) if piSize != 0 { *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = sz } if mFlags&uint32(SQLITE_SERIALIZE_NOCOPY) != 0 { pOut = uintptr(0) } else { pOut = Xsqlite3_malloc64(tls, uint64(sz)) if pOut != 0 { var nPage int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) var pPager uintptr = Xsqlite3BtreePager(tls, pBt) var pgno int32 for pgno = 1; pgno <= nPage; pgno++ { *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */)) = uintptr(0) var pTo uintptr = pOut + uintptr(Sqlite3_int64(szPage)*Sqlite3_int64(pgno-1)) rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+16, 0) if rc == SQLITE_OK { libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))), uint64(szPage)) } else { libc.Xmemset(tls, pTo, 0, uint64(szPage)) } Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))) } } } } Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) return pOut } // Convert zSchema to a MemDB and initialize its content. func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49870:16: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr var zSql uintptr // var pStmt uintptr at bp+8, 8 var rc int32 var iDb int32 var pStore uintptr *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if !(zSchema == uintptr(0)) { goto __1 } zSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName __1: ; iDb = Xsqlite3FindDbName(tls, db, zSchema) if !(iDb < 2 && iDb != 0) { goto __2 } rc = SQLITE_ERROR goto end_deserialize __2: ; zSql = Xsqlite3_mprintf(tls, ts+5182, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } rc = SQLITE_NOMEM goto __4 __3: rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) Xsqlite3_free(tls, zSql) __4: ; if !(rc != 0) { goto __5 } goto end_deserialize __5: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) libc.SetBitFieldPtr8Uint32(db+192+8, uint32(1), 2, 0x4) rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 2, 0x4) if !(rc != SQLITE_DONE) { goto __6 } rc = SQLITE_ERROR goto end_deserialize __6: ; p = memdbFromDbSchema(tls, db, zSchema) if !(p == uintptr(0)) { goto __7 } rc = SQLITE_ERROR goto __8 __7: pStore = (*MemFile)(unsafe.Pointer(p)).FpStore (*MemStore)(unsafe.Pointer(pStore)).FaData = pData pData = uintptr(0) (*MemStore)(unsafe.Pointer(pStore)).Fsz = szDb (*MemStore)(unsafe.Pointer(pStore)).FszAlloc = szBuf (*MemStore)(unsafe.Pointer(pStore)).FszMax = szBuf if !((*MemStore)(unsafe.Pointer(pStore)).FszMax < Xsqlite3Config.FmxMemdbSize) { goto __9 } (*MemStore)(unsafe.Pointer(pStore)).FszMax = Xsqlite3Config.FmxMemdbSize __9: ; (*MemStore)(unsafe.Pointer(pStore)).FmFlags = mFlags rc = SQLITE_OK __8: ; end_deserialize: Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if !(pData != 0 && mFlags&uint32(SQLITE_DESERIALIZE_FREEONCLOSE) != uint32(0)) { goto __10 } Xsqlite3_free(tls, pData) __10: ; Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // This routine is called when the extension is loaded. // Register the new VFS. func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:49946:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { return SQLITE_ERROR } sz = uint32((*Sqlite3_vfs)(unsafe.Pointer(pLower)).FszOsFile) memdb_vfs.FpAppData = pLower // The following conditional can only be true when compiled for // Windows x86 and SQLITE_MAX_MMAP_SIZE=0. We always leave // it in, to be safe, but it is marked as NO_TEST since there // is no way to reach it under most builds. if uint64(sz) < uint64(unsafe.Sizeof(MemFile{})) { sz = uint32(unsafe.Sizeof(MemFile{})) } //NO_TEST memdb_vfs.FszOsFile = int32(sz) return Xsqlite3_vfs_register(tls, uintptr(unsafe.Pointer(&memdb_vfs)), 0) } // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50078:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) if p != 0 { (*Bitvec)(unsafe.Pointer(p)).FiSize = iSize } return p } // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50093:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { return 0 } for (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { var bin U32 = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) if !(p != 0) { return 0 } } if uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) { return libc.Bool32(int32(*(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))))&(int32(1)<<(i&U32(BITVEC_SZELEM-1))) != 0) } else { var h U32 = U32(uint64(libc.PostIncUint32(&i, 1)*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) for *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { if *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) == i { return 1 } h = U32(uint64(h+U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) } return 0 } return int32(0) } func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50116:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } // Set the i-th bit. Return 0 on success and an error code if // anything goes wrong. // // This routine might cause sub-bitmaps to be allocated. Failing // to get the memory needed to hold the sub-bitmap is the only // that can go wrong with an insert, assuming p and i are valid. // // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50132:20: */ var h U32 var bin U32 var j uint32 var rc int32 var aiValues uintptr if !(p == uintptr(0)) { goto __1 } return SQLITE_OK __1: ; i-- __2: if !(uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) > (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) && (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0) { goto __3 } bin = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor if !(*(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) == uintptr(0)) { goto __4 } *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) = Xsqlite3BitvecCreate(tls, (*Bitvec)(unsafe.Pointer(p)).FiDivisor) if !(*(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) == uintptr(0)) { goto __5 } return SQLITE_NOMEM __5: ; __4: ; p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) goto __2 __3: ; if !(uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM)) { goto __6 } *(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))) |= U8(int32(1) << (i & U32(BITVEC_SZELEM-1))) return SQLITE_OK __6: ; h = U32(uint64(libc.PostIncUint32(&i, 1)*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) // if there wasn't a hash collision, and this doesn't // completely fill the hash, then just add it without // worring about sub-dividing and re-hashing. if !!(int32(*(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4))) != 0) { goto __7 } if !(uint64((*Bitvec)(unsafe.Pointer(p)).FnSet) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))-uint64(1)) { goto __8 } goto bitvec_set_end goto __9 __8: goto bitvec_set_rehash __9: ; __7: ; // there was a collision, check to see if it's already // in hash, if not, try to find a spot for it __10: if !(*(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) == i) { goto __13 } return SQLITE_OK __13: ; h++ if !(uint64(h) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))) { goto __14 } h = U32(0) __14: ; goto __11 __11: if *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { goto __10 } goto __12 __12: ; // we didn't find it in the hash. h points to the first // available free spot. check to see if this is going to // make our hash too "full". bitvec_set_rehash: if !(uint64((*Bitvec)(unsafe.Pointer(p)).FnSet) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))/uint64(2)) { goto __15 } aiValues = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(unsafe.Sizeof([124]U32{}))) if !(aiValues == uintptr(0)) { goto __16 } return SQLITE_NOMEM goto __17 __16: libc.Xmemcpy(tls, aiValues, p+16, uint64(unsafe.Sizeof([124]U32{}))) libc.Xmemset(tls, p+16, 0, uint64(unsafe.Sizeof([62]uintptr{}))) (*Bitvec)(unsafe.Pointer(p)).FiDivisor = U32((uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) + (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(uintptr(0))) - uint64(1)) / ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(uintptr(0))))) rc = Xsqlite3BitvecSet(tls, p, i) j = uint32(0) __18: if !(uint64(j) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0)))) { goto __20 } if !(*(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != 0) { goto __21 } rc = rc | Xsqlite3BitvecSet(tls, p, *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4))) __21: ; goto __19 __19: j++ goto __18 goto __20 __20: ; Xsqlite3DbFree(tls, uintptr(0), aiValues) return rc __17: ; __15: ; bitvec_set_end: (*Bitvec)(unsafe.Pointer(p)).FnSet++ *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) = i return SQLITE_OK } // Clear the i-th bit. // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50203:21: */ if p == uintptr(0) { return } i-- for (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { var bin U32 = i / (*Bitvec)(unsafe.Pointer(p)).FiDivisor i = i % (*Bitvec)(unsafe.Pointer(p)).FiDivisor p = *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(bin)*8)) if !(p != 0) { return } } if uint64((*Bitvec)(unsafe.Pointer(p)).FiSize) <= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U8(0)))*uint64(BITVEC_SZELEM) { *(*U8)(unsafe.Pointer(p + 16 + uintptr(i/U32(BITVEC_SZELEM)))) &= U8(^(int32(1) << (i & U32(BITVEC_SZELEM-1)))) } else { var j uint32 var aiValues uintptr = pBuf libc.Xmemcpy(tls, aiValues, p+16, uint64(unsafe.Sizeof([124]U32{}))) libc.Xmemset(tls, p+16, 0, uint64(unsafe.Sizeof([124]U32{}))) (*Bitvec)(unsafe.Pointer(p)).FnSet = U32(0) for j = uint32(0); uint64(j) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0))); j++ { if *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != 0 && *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) != i+U32(1) { var h U32 = U32(uint64((*(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4))-U32(1))*U32(1)) % ((uint64(BITVEC_SZ) - uint64(3)*uint64(unsafe.Sizeof(U32(0)))) / uint64(unsafe.Sizeof(uintptr(0))) * uint64(unsafe.Sizeof(uintptr(0))) / uint64(unsafe.Sizeof(U32(0))))) (*Bitvec)(unsafe.Pointer(p)).FnSet++ for *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) != 0 { h++ if uint64(h) >= (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(U32(0))) { h = U32(0) } } *(*U32)(unsafe.Pointer(p + 16 + uintptr(h)*4)) = *(*U32)(unsafe.Pointer(aiValues + uintptr(j)*4)) } } } } // Destroy a bitmap object. Reclaim all memory used. func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50240:21: */ if p == uintptr(0) { return } if (*Bitvec)(unsafe.Pointer(p)).FiDivisor != 0 { var i uint32 for i = uint32(0); uint64(i) < (uint64(BITVEC_SZ)-uint64(3)*uint64(unsafe.Sizeof(U32(0))))/uint64(unsafe.Sizeof(uintptr(0)))*uint64(unsafe.Sizeof(uintptr(0)))/uint64(unsafe.Sizeof(uintptr(0))); i++ { Xsqlite3BitvecDestroy(tls, *(*uintptr)(unsafe.Pointer(p + 16 + uintptr(i)*8))) } } Xsqlite3_free(tls, p) } // Return the value of the iSize parameter specified when Bitvec *p // was created. func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50255:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } // Let V[] be an array of unsigned characters sufficient to hold // up to N bits. Let I be an integer between 0 and N. 0<=I<N. // Then the following macros can be used to set, clear, or test // individual bits within V. // This routine runs an extensive test of the Bitvec code. // // The input is an array of integers that acts as a program // to test the Bitvec. The integers are opcodes followed // by 0, 1, or 3 operands, depending on the opcode. Another // opcode follows immediately after the last operand. // // There are 6 opcodes numbered from 0 through 5. 0 is the // "halt" opcode and causes the test to end. // // 0 Halt and return the number of errors // 1 N S X Set N bits beginning with S and incrementing by X // 2 N S X Clear N bits beginning with S and incrementing by X // 3 N Set N randomly chosen bits // 4 N Clear N randomly chosen bits // 5 N S X Set N bits from S increment X in array only, not in bitvec // // The opcodes 1 through 4 perform set and clear operations are performed // on both a Bitvec object and on a linear array of bits obtained from malloc. // Opcode 5 works on the linear array only, not on the Bitvec. // Opcode 5 is used to deliberately induce a fault in order to // confirm that error detection works. // // At the conclusion of the test the linear array is compared // against the Bitvec object. If there are any differences, // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50300:20: */ bp := tls.Alloc(4) defer tls.Free(4) var pBitvec uintptr var pV uintptr var rc int32 // var i int32 at bp, 4 var nx int32 var pc int32 var op int32 var pTmpSpace uintptr pBitvec = uintptr(0) pV = uintptr(0) rc = -1 // Allocate the Bitvec to be tested and a linear array of // bits to act as the reference pBitvec = Xsqlite3BitvecCreate(tls, uint32(sz)) pV = Xsqlite3MallocZero(tls, uint64((sz+7)/8+1)) pTmpSpace = Xsqlite3_malloc64(tls, uint64(BITVEC_SZ)) if !(pBitvec == uintptr(0) || pV == uintptr(0) || pTmpSpace == uintptr(0)) { goto __1 } goto bitvec_end __1: ; // NULL pBitvec tests Xsqlite3BitvecSet(tls, uintptr(0), uint32(1)) Xsqlite3BitvecClear(tls, uintptr(0), uint32(1), pTmpSpace) // Run the program pc = libc.AssignPtrInt32(bp /* i */, 0) __2: if !(libc.AssignInt32(&op, *(*int32)(unsafe.Pointer(aOp + uintptr(pc)*4))) != 0) { goto __3 } switch op { case 1: goto __5 case 2: goto __6 case 5: goto __7 case 3: goto __8 case 4: goto __9 default: goto __10 } goto __4 __5: __6: __7: nx = 4 *(*int32)(unsafe.Pointer(bp /* i */)) = *(*int32)(unsafe.Pointer(aOp + uintptr(pc+2)*4)) - 1 *(*int32)(unsafe.Pointer(aOp + uintptr(pc+2)*4)) += *(*int32)(unsafe.Pointer(aOp + uintptr(pc+3)*4)) goto __4 __8: __9: __10: nx = 2 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp) goto __4 __4: ; if !(libc.PreDecInt32(&*(*int32)(unsafe.Pointer(aOp + uintptr(pc+1)*4)), 1) > 0) { goto __11 } nx = 0 __11: ; pc = pc + nx *(*int32)(unsafe.Pointer(bp /* i */)) = *(*int32)(unsafe.Pointer(bp)) & 0x7fffffff % sz if !(op&1 != 0) { goto __12 } *(*uint8)(unsafe.Pointer(pV + uintptr((*(*int32)(unsafe.Pointer(bp))+1)>>3))) |= uint8(int32(1) << ((*(*int32)(unsafe.Pointer(bp)) + 1) & 7)) if !(op != 5) { goto __14 } if !(Xsqlite3BitvecSet(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))+1)) != 0) { goto __15 } goto bitvec_end __15: ; __14: ; goto __13 __12: *(*uint8)(unsafe.Pointer(pV + uintptr((*(*int32)(unsafe.Pointer(bp))+1)>>3))) &= uint8(^(int32(1) << ((*(*int32)(unsafe.Pointer(bp)) + 1) & 7))) Xsqlite3BitvecClear(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))+1), pTmpSpace) __13: ; goto __2 __3: ; // Test to make sure the linear array exactly matches the // Bitvec object. Start with the assumption that they do // match (rc==0). Change rc to non-zero if a discrepancy // is found. rc = int32(U32(Xsqlite3BitvecTest(tls, uintptr(0), uint32(0))+Xsqlite3BitvecTest(tls, pBitvec, uint32(sz+1))+ Xsqlite3BitvecTest(tls, pBitvec, uint32(0))) + (Xsqlite3BitvecSize(tls, pBitvec) - U32(sz))) *(*int32)(unsafe.Pointer(bp /* i */)) = 1 __16: if !(*(*int32)(unsafe.Pointer(bp)) <= sz) { goto __18 } if !(libc.Bool32(int32(*(*uint8)(unsafe.Pointer(pV + uintptr(*(*int32)(unsafe.Pointer(bp))>>3))))&(int32(1)<<(*(*int32)(unsafe.Pointer(bp))&7)) != 0) != Xsqlite3BitvecTest(tls, pBitvec, uint32(*(*int32)(unsafe.Pointer(bp))))) { goto __19 } rc = *(*int32)(unsafe.Pointer(bp /* i */)) goto __18 __19: ; goto __17 __17: *(*int32)(unsafe.Pointer(bp /* i */))++ goto __16 goto __18 __18: ; // Free allocated structure bitvec_end: Xsqlite3_free(tls, pTmpSpace) Xsqlite3_free(tls, pV) Xsqlite3BitvecDestroy(tls, pBitvec) return rc } //********************************* Test and Debug Logic ********************* // Debug tracing macros. Enable by by changing the "0" to "1" and // recompiling. // // When sqlite3PcacheTrace is 1, single line trace messages are issued. // When sqlite3PcacheTrace is 2, a dump of the pcache showing all cache entries // is displayed for many operations, resulting in a lot of output. // Check invariants on a PgHdr entry. Return true if everything is OK. // Return false if any invariant is violated. // // This routine is for use inside of assert() statements only. For // example: // // assert( sqlite3PcachePageSanity(pPg) ); //********************************* Linked List Management ******************* // Allowed values for second argument to pcacheManageDirtyList() // Manage pPage's participation on the dirty list. Bits of the addRemove // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50535:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { // Update the PCache1.pSynced variable if necessary. if (*PCache)(unsafe.Pointer(p)).FpSynced == pPage { (*PCache)(unsafe.Pointer(p)).FpSynced = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev } if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext != 0 { (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext)).FpDirtyPrev = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev } else { (*PCache)(unsafe.Pointer(p)).FpDirtyTail = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev } if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev != 0 { (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev)).FpDirtyNext = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext } else { // If there are now no dirty pages in the cache, set eCreate to 2. // This is an optimization that allows sqlite3PcacheFetch() to skip // searching for a dirty page to eject from the cache when it might // otherwise have to. (*PCache)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext if (*PCache)(unsafe.Pointer(p)).FpDirty == uintptr(0) { //OPTIMIZATION-IF-TRUE (*PCache)(unsafe.Pointer(p)).FeCreate = U8(2) } } } if int32(addRemove)&PCACHE_DIRTYLIST_ADD != 0 { (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyPrev = uintptr(0) (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext = (*PCache)(unsafe.Pointer(p)).FpDirty if (*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext != 0 { (*PgHdr)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(pPage)).FpDirtyNext)).FpDirtyPrev = pPage } else { (*PCache)(unsafe.Pointer(p)).FpDirtyTail = pPage if (*PCache)(unsafe.Pointer(p)).FbPurgeable != 0 { (*PCache)(unsafe.Pointer(p)).FeCreate = U8(1) } } (*PCache)(unsafe.Pointer(p)).FpDirty = pPage // If pSynced is NULL and this page has a clear NEED_SYNC flag, set // pSynced to point to it. Checking the NEED_SYNC flag is an // optimization, as if pSynced points to a page with the NEED_SYNC // flag set sqlite3PcacheFetchStress() searches through all newer // entries of the dirty-list for a page with NEED_SYNC clear anyway. if !(int32((*PCache)(unsafe.Pointer(p)).FpSynced) != 0) && 0 == int32((*PgHdr)(unsafe.Pointer(pPage)).Fflags)&PGHDR_NEED_SYNC { (*PCache)(unsafe.Pointer(p)).FpSynced = pPage } } } // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. func pcacheUnpin(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50605:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr, int32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 0) } } // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50617:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. return (*PCache)(unsafe.Pointer(p)).FszCache } else { var n I64 // IMPLEMANTATION-OF: R-59858-46238 If the argument N is negative, then the // number of cache pages is adjusted to be a number of pages that would // use approximately abs(N*1024) bytes of memory based on the current // page size. n = int64(-1024) * I64((*PCache)(unsafe.Pointer(p)).FszCache) / I64((*PCache)(unsafe.Pointer(p)).FszPage+(*PCache)(unsafe.Pointer(p)).FszExtra) if n > int64(1000000000) { n = int64(1000000000) } return int32(n) } return int32(0) } // ************************************************** General Interfaces ****** // // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50639:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined // page cache. Xsqlite3PCacheSetDefault(tls) } return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50649:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } } // Return the size in bytes of a PCache object. func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50659:20: */ return int32(unsafe.Sizeof(PCache{})) } // Create a new PCache object. Storage space to hold the object // has already been allocated and is passed in as the p pointer. // The caller discovers how much space needs to be allocated by // calling sqlite3PcacheSize(). // // szExtra is some extra space allocated for each page. The first // 8 bytes of the extra space will be zeroed as the page is allocated, // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50673:20: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra // First 8 bytes will be zeroed (*PCache)(unsafe.Pointer(p)).FbPurgeable = U8(bPurgeable) (*PCache)(unsafe.Pointer(p)).FeCreate = U8(2) (*PCache)(unsafe.Pointer(p)).FxStress = xStress (*PCache)(unsafe.Pointer(p)).FpStress = pStress (*PCache)(unsafe.Pointer(p)).FszCache = 100 (*PCache)(unsafe.Pointer(p)).FszSpill = 1 return Xsqlite3PcacheSetPageSize(tls, p, szPage) } // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50699:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr pNew = (*struct { f func(*libc.TLS, int32, int32, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCreate})).f(tls, szPage, int32(uint64((*PCache)(unsafe.Pointer(pCache)).FszExtra)+(uint64(unsafe.Sizeof(PgHdr{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))), int32((*PCache)(unsafe.Pointer(pCache)).FbPurgeable)) if pNew == uintptr(0) { return SQLITE_NOMEM } (*struct { f func(*libc.TLS, uintptr, int32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, pNew, numberOfCachePages(tls, pCache)) if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } (*PCache)(unsafe.Pointer(pCache)).FpCache = pNew (*PCache)(unsafe.Pointer(pCache)).FszPage = szPage } return SQLITE_OK } // Try to obtain a page from the cache. // // This routine returns a pointer to an sqlite3_pcache_page object if // such an object is already in cache, or if a new one is created. // This routine returns a NULL pointer if the object was not in cache // and could not be created. // // The createFlags should be 0 to check for existing pages and should // be 3 (not 1, but 3) to try to create a new page. // // If the createFlag is 0, then NULL is always returned if the page // is not already in the cache. If createFlag is 1, then a new page // is created only if that can be done without spilling dirty pages // and without exceeding the cache size limit. // // The caller needs to invoke sqlite3PcacheFetchFinish() to properly // initialize the sqlite3_pcache_page object and convert it into a // PgHdr object. The sqlite3PcacheFetch() and sqlite3PcacheFetchFinish() // routines are split this way for performance reasons. When separated // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50743:36: */ var eCreate int32 var pRes uintptr // eCreate defines what to do if the page does not exist. // 0 Do not allocate a new page. (createFlag==0) // 1 Allocate a new page if doing so is inexpensive. // (createFlag==1 AND bPurgeable AND pDirty) // 2 Allocate a new page even it doing so is difficult. // (createFlag==1 AND !(bPurgeable AND pDirty) eCreate = createFlag & int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) pRes = (*struct { f func(*libc.TLS, uintptr, uint32, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, eCreate) return pRes } // If the sqlite3PcacheFetch() routine is unable to allocate a new // page because no clean pages are available for reuse and the cache // size limit has been reached, then this routine can be invoked to // try harder to allocate a page. This routine might invoke the stress // callback to spill dirty pages to the journal. It will then try to // allocate the new page and will only fail to allocate a new page on // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50784:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 } if Xsqlite3PcachePagecount(tls, pCache) > (*PCache)(unsafe.Pointer(pCache)).FszSpill { // Find a dirty page to write-out and recycle. First try to find a // page that does not require a journal-sync (one with PGHDR_NEED_SYNC // cleared), but if that is not possible settle for any other // unreferenced dirty page. // // If the LRU page in the dirty list that has a clear PGHDR_NEED_SYNC // flag is currently referenced, then the following may leave pSynced // set incorrectly (pointing to other than the LRU page with NEED_SYNC // cleared). This is Ok, as pSynced is just an optimization. for pPg = (*PCache)(unsafe.Pointer(pCache)).FpSynced; pPg != 0 && ((*PgHdr)(unsafe.Pointer(pPg)).FnRef != 0 || int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0); pPg = (*PgHdr)(unsafe.Pointer(pPg)).FpDirtyPrev { } (*PCache)(unsafe.Pointer(pCache)).FpSynced = pPg if !(pPg != 0) { for pPg = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail; pPg != 0 && (*PgHdr)(unsafe.Pointer(pPg)).FnRef != 0; pPg = (*PgHdr)(unsafe.Pointer(pPg)).FpDirtyPrev { } } if pPg != 0 { var rc int32 rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*PCache)(unsafe.Pointer(pCache)).FxStress})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpStress, pPg) if rc != SQLITE_OK && rc != SQLITE_BUSY { return rc } } } *(*uintptr)(unsafe.Pointer(ppPage)) = (*struct { f func(*libc.TLS, uintptr, uint32, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno, 2) if *(*uintptr)(unsafe.Pointer(ppPage)) == uintptr(0) { return SQLITE_NOMEM } return SQLITE_OK } // This is a helper routine for sqlite3PcacheFetchFinish() // // In the uncommon case where the page being fetched has not been // initialized, this routine is invoked to do the initialization. // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50840:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra libc.Xmemset(tls, pPgHdr+32, 0, uint64(unsafe.Sizeof(PgHdr{}))-uint64(uintptr(0)+32)) (*PgHdr)(unsafe.Pointer(pPgHdr)).FpPage = pPage (*PgHdr)(unsafe.Pointer(pPgHdr)).FpData = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpBuf (*PgHdr)(unsafe.Pointer(pPgHdr)).FpExtra = pPgHdr + 1*72 libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(pPgHdr)).FpExtra, 0, uint64(8)) (*PgHdr)(unsafe.Pointer(pPgHdr)).FpCache = pCache (*PgHdr)(unsafe.Pointer(pPgHdr)).Fpgno = pgno (*PgHdr)(unsafe.Pointer(pPgHdr)).Fflags = U16(PGHDR_CLEAN) return Xsqlite3PcacheFetchFinish(tls, pCache, pgno, pPage) } // This routine converts the sqlite3_pcache_page object returned by // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50866:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra if !(int32((*PgHdr)(unsafe.Pointer(pPgHdr)).FpPage) != 0) { return pcacheFetchFinishWithInit(tls, pCache, pgno, pPage) } (*PCache)(unsafe.Pointer(pCache)).FnRefSum++ (*PgHdr)(unsafe.Pointer(pPgHdr)).FnRef++ return pPgHdr } // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50889:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_CLEAN != 0 { pcacheUnpin(tls, p) } else { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) } } } // Increase the reference count of a supplied page by 1. func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50904:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ } // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50916:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) } (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- (*struct { f func(*libc.TLS, uintptr, uintptr, int32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxUnpin})).f(tls, (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, 1) } // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50930:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_CLEAN != 0 { *(*U16)(unsafe.Pointer(p + 52)) ^= U16(PGHDR_DIRTY | PGHDR_CLEAN) pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_ADD)) } } } // Make sure the page is marked as clean. If it isn't clean already, // make it so. func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50950:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) *(*U16)(unsafe.Pointer(p + 52)) |= U16(PGHDR_CLEAN) if int32((*PgHdr)(unsafe.Pointer(p)).FnRef) == 0 { pcacheUnpin(tls, p) } } // Make every page in the cache clean. func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50967:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { Xsqlite3PcacheMakeClean(tls, p) } } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50978:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) } (*PCache)(unsafe.Pointer(pCache)).FpSynced = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:50990:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) } (*PCache)(unsafe.Pointer(pCache)).FpSynced = (*PCache)(unsafe.Pointer(pCache)).FpDirtyTail } // Change the page number of page p to newPgno. func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51001:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { f func(*libc.TLS, uintptr, uintptr, uint32, uint32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxRekey})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, (*PgHdr)(unsafe.Pointer(p)).FpPage, (*PgHdr)(unsafe.Pointer(p)).Fpgno, newPgno) (*PgHdr)(unsafe.Pointer(p)).Fpgno = newPgno if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 && int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_NEED_SYNC != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_FRONT)) } } // Drop every cache entry whose page number is greater than "pgno". The // caller must ensure that there are no outstanding references to any pages // other than page 1 with a page number greater than pgno. // // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51023:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = pNext { pNext = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext // This routine never gets call with a positive pgno except right // after sqlite3PcacheCleanAll(). So if there are dirty pages, // it must be that pgno==0. if (*PgHdr)(unsafe.Pointer(p)).Fpgno > pgno { Xsqlite3PcacheMakeClean(tls, p) } } if pgno == Pgno(0) && (*PCache)(unsafe.Pointer(pCache)).FnRefSum != 0 { var pPage1 uintptr pPage1 = (*struct { f func(*libc.TLS, uintptr, uint32, int32) uintptr })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxFetch})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, uint32(1), 0) if pPage1 != 0 { // Page 1 is always available in cache, because // pCache->nRefSum>0 libc.Xmemset(tls, (*Sqlite3_pcache_page)(unsafe.Pointer(pPage1)).FpBuf, 0, uint64((*PCache)(unsafe.Pointer(pCache)).FszPage)) pgno = Pgno(1) } } (*struct { f func(*libc.TLS, uintptr, uint32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxTruncate})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, pgno+Pgno(1)) } } // Close a cache. func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51056:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51065:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51073:14: */ bp := tls.Alloc(72) defer tls.Free(72) // var result PgHdr at bp, 72 var pTail uintptr pTail = bp /* &result */ for { if (*PgHdr)(unsafe.Pointer(pA)).Fpgno < (*PgHdr)(unsafe.Pointer(pB)).Fpgno { (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pA pTail = pA pA = (*PgHdr)(unsafe.Pointer(pA)).FpDirty if pA == uintptr(0) { (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pB break } } else { (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pB pTail = pB pB = (*PgHdr)(unsafe.Pointer(pB)).FpDirty if pB == uintptr(0) { (*PgHdr)(unsafe.Pointer(pTail)).FpDirty = pA break } } } return (*PgHdr)(unsafe.Pointer(bp /* &result */)).FpDirty } // Sort the list of pages in accending order by pgno. Pages are // connected by pDirty pointers. The pDirtyPrev pointers are // corrupted by this sort. // // Since there cannot be more than 2^31 distinct pages in a database, // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51110:14: */ bp := tls.Alloc(256) defer tls.Free(256) // var a [32]uintptr at bp, 256 var p uintptr var i int32 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([32]uintptr{}))) for pIn != 0 { p = pIn pIn = (*PgHdr)(unsafe.Pointer(p)).FpDirty (*PgHdr)(unsafe.Pointer(p)).FpDirty = uintptr(0) for i = 0; i < N_SORT_BUCKET-1; i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = p break } else { p = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) } } if i == N_SORT_BUCKET-1 { // To get here, there need to be 2^(N_SORT_BUCKET) elements in // the input list. But that is impossible. *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), p) } } p = *(*uintptr)(unsafe.Pointer(bp)) for i = 1; i < N_SORT_BUCKET; i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { continue } if p != 0 { p = pcacheMergeDirtyList(tls, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) } else { p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) } } return p } // Return a list of all dirty pages in the cache, sorted by page number. func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51145:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext } return pcacheSortDirtyList(tls, (*PCache)(unsafe.Pointer(pCache)).FpDirty) } // Return the total number of references to all pages held by the cache. // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51159:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51166:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51173:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxPagecount})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Set the suggested cache-size value. func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51190:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { f func(*libc.TLS, uintptr, int32) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxCachesize})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache, numberOfCachePages(tls, pCache)) } // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51202:20: */ var res int32 if mxPage != 0 { if mxPage < 0 { mxPage = int32(int64(-1024) * I64(mxPage) / I64((*PCache)(unsafe.Pointer(p)).FszPage+(*PCache)(unsafe.Pointer(p)).FszExtra)) } (*PCache)(unsafe.Pointer(p)).FszSpill = mxPage } res = numberOfCachePages(tls, p) if res < (*PCache)(unsafe.Pointer(p)).FszSpill { res = (*PCache)(unsafe.Pointer(p)).FszSpill } return res } // Free up as much memory as possible from the page cache. func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51219:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51228:20: */ return int32((uint64(unsafe.Sizeof(PgHdr{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51234:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) for pDirty = (*PCache)(unsafe.Pointer(pCache)).FpDirty; pDirty != 0; pDirty = (*PgHdr)(unsafe.Pointer(pDirty)).FpDirtyNext { nDirty++ } if nCache != 0 { return int32(I64(nDirty) * int64(100) / I64(nCache)) } return 0 } //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** // 2008 November 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 file implements the default page cache implementation (the // sqlite3_pcache interface). It also contains part of the implementation // of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features. // If the default page cache implementation is overridden, then neither of // these two features are available. // // A Page cache line looks like this: // // ------------------------------------------------------------- // | database page content | PgHdr1 | MemPage | PgHdr | // ------------------------------------------------------------- // // The database page content is up front (so that buffer overreads tend to // flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions). MemPage // is the extension added by the btree.c module containing information such // as the database page number and how that database page is used. PgHdr // is added by the pcache.c layer and contains information used to keep track // of which pages are "dirty". PgHdr1 is an extension added by this // module (pcache1.c). The PgHdr1 header is a subclass of sqlite3_pcache_page. // PgHdr1 contains information needed to look up a page by its page number. // The superclass sqlite3_pcache_page.pBuf points to the start of the // database page content and sqlite3_pcache_page.pExtra points to PgHdr. // // The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at // runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The // sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this // size can vary according to architecture, compile-time options, and // SQLite library version number. // // If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained // using a separate memory allocation from the database page content. This // seeks to overcome the "clownshoe" problem (also called "internal // fragmentation" in academic literature) of allocating a few bytes more // than a power of two with the memory allocator rounding up to the next // power of two, and leaving the rounded-up space unused. // // This module tracks pointers to PgHdr1 objects. Only pcache.c communicates // with this module. Information is passed back and forth as PgHdr1 pointers. // // The pcache.c and pager.c modules deal pointers to PgHdr objects. // The btree.c module deals with pointers to MemPage objects. // // SOURCE OF PAGE CACHE MEMORY: // // Memory for a page might come from any of three sources: // // (1) The general-purpose memory allocator - sqlite3Malloc() // (2) Global page-cache memory provided using sqlite3_config() with // SQLITE_CONFIG_PAGECACHE. // (3) PCache-local bulk allocation. // // The third case is a chunk of heap memory (defaulting to 100 pages worth) // that is allocated when the page cache is created. The size of the local // bulk allocation can be adjusted using // // sqlite3_config(SQLITE_CONFIG_PAGECACHE, (void*)0, 0, N). // // If N is positive, then N pages worth of memory are allocated using a single // sqlite3Malloc() call and that memory is used for the first N pages allocated. // Or if N is negative, then -1024*N bytes of memory are allocated and used // for as many pages as can be accomodated. // // Only one of (2) or (3) can be used. Once the memory available to (2) or // (3) is exhausted, subsequent allocations fail over to the general-purpose // memory allocator (1). // // Earlier versions of SQLite used only methods (1) and (2). But experiments // show that method (3) with N==100 provides about a 5% performance boost for // common workloads. // #include "sqliteInt.h" type PCache11 = struct { FpGroup uintptr FpnPurgeable uintptr FszPage int32 FszExtra int32 FszAlloc int32 FbPurgeable int32 FnMin uint32 FnMax uint32 Fn90pct uint32 FiMaxKey uint32 FnPurgeableDummy uint32 FnRecyclable uint32 FnPage uint32 FnHash uint32 FapHash uintptr FpFree uintptr FpBulk uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51351:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** // 2008 November 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 file implements the default page cache implementation (the // sqlite3_pcache interface). It also contains part of the implementation // of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features. // If the default page cache implementation is overridden, then neither of // these two features are available. // // A Page cache line looks like this: // // ------------------------------------------------------------- // | database page content | PgHdr1 | MemPage | PgHdr | // ------------------------------------------------------------- // // The database page content is up front (so that buffer overreads tend to // flow harmlessly into the PgHdr1, MemPage, and PgHdr extensions). MemPage // is the extension added by the btree.c module containing information such // as the database page number and how that database page is used. PgHdr // is added by the pcache.c layer and contains information used to keep track // of which pages are "dirty". PgHdr1 is an extension added by this // module (pcache1.c). The PgHdr1 header is a subclass of sqlite3_pcache_page. // PgHdr1 contains information needed to look up a page by its page number. // The superclass sqlite3_pcache_page.pBuf points to the start of the // database page content and sqlite3_pcache_page.pExtra points to PgHdr. // // The size of the extension (MemPage+PgHdr+PgHdr1) can be determined at // runtime using sqlite3_config(SQLITE_CONFIG_PCACHE_HDRSZ, &size). The // sizes of the extensions sum to 272 bytes on x64 for 3.8.10, but this // size can vary according to architecture, compile-time options, and // SQLite library version number. // // If SQLITE_PCACHE_SEPARATE_HEADER is defined, then the extension is obtained // using a separate memory allocation from the database page content. This // seeks to overcome the "clownshoe" problem (also called "internal // fragmentation" in academic literature) of allocating a few bytes more // than a power of two with the memory allocator rounding up to the next // power of two, and leaving the rounded-up space unused. // // This module tracks pointers to PgHdr1 objects. Only pcache.c communicates // with this module. Information is passed back and forth as PgHdr1 pointers. // // The pcache.c and pager.c modules deal pointers to PgHdr objects. // The btree.c module deals with pointers to MemPage objects. // // SOURCE OF PAGE CACHE MEMORY: // // Memory for a page might come from any of three sources: // // (1) The general-purpose memory allocator - sqlite3Malloc() // (2) Global page-cache memory provided using sqlite3_config() with // SQLITE_CONFIG_PAGECACHE. // (3) PCache-local bulk allocation. // // The third case is a chunk of heap memory (defaulting to 100 pages worth) // that is allocated when the page cache is created. The size of the local // bulk allocation can be adjusted using // // sqlite3_config(SQLITE_CONFIG_PAGECACHE, (void*)0, 0, N). // // If N is positive, then N pages worth of memory are allocated using a single // sqlite3Malloc() call and that memory is used for the first N pages allocated. // Or if N is negative, then -1024*N bytes of memory are allocated and used // for as many pages as can be accomodated. // // Only one of (2) or (3) can be used. Once the memory available to (2) or // (3) is exhausted, subsequent allocations fail over to the general-purpose // memory allocator (1). // // Earlier versions of SQLite used only methods (1) and (2). But experiments // show that method (3) with N==100 provides about a 5% performance boost for // common workloads. // #include "sqliteInt.h" type PCache1 = PCache11 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51351:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 FisBulkLocal U16 FisAnchor U16 FpNext uintptr FpCache uintptr FpLruNext uintptr FpLruPrev uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51351:9 */ type PgHdr1 = PgHdr11 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51352:23 */ type PgFreeslot1 = struct{ FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51353:9 */ type PgFreeslot = PgFreeslot1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51353:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 FnMinPage uint32 FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51351:9 */ type PGroup = PGroup1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51354:23 */ // Global data used by this cache. type PCacheGlobal = struct { Fgrp PGroup FisInit int32 FseparateCache int32 FnInitPage int32 FszSlot int32 FnSlot int32 FnReserve int32 FpStart uintptr FpEnd uintptr Fmutex uintptr FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51471:19 */ // Global data used by this cache. var pcache1_g PCacheGlobal /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51495:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when // compiling for systems that do not support real WSD. // Macros to enter and leave the PCache LRU mutex. //**************************************************************************** //******* Page Allocation/SQLITE_CONFIG_PCACHE Related Functions ************* // This function is called during initialization if a static buffer is // supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE // verb to sqlite3_config(). Parameter pBuf points to an allocation large // enough to contain 'n' buffers of 'sz' bytes each. // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51530:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { sz = libc.AssignInt32(&n, 0) } if n == 0 { sz = 0 } sz = sz & libc.CplInt32(7) pcache1_g.FszSlot = sz pcache1_g.FnSlot = libc.AssignPtrInt32(uintptr(unsafe.Pointer(&pcache1_g))+136, n) pcache1_g.FnReserve = func() int32 { if n > 90 { return 10 } return n/10 + 1 }() pcache1_g.FpStart = pBuf pcache1_g.FpFree = uintptr(0) pcache1_g.FbUnderPressure = 0 for libc.PostDecInt32(&n, 1) != 0 { p = pBuf (*PgFreeslot)(unsafe.Pointer(p)).FpNext = pcache1_g.FpFree pcache1_g.FpFree = p pBuf = pBuf + uintptr(sz) } pcache1_g.FpEnd = pBuf } } // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51556:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { return 0 } // Do not bother with a bulk allocation if the cache size very small if (*PCache1)(unsafe.Pointer(pCache)).FnMax < uint32(3) { return 0 } Xsqlite3BeginBenignMalloc(tls) if pcache1_g.FnInitPage > 0 { szBulk = I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) * I64(pcache1_g.FnInitPage) } else { szBulk = int64(-1024) * I64(pcache1_g.FnInitPage) } if szBulk > I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc)*I64((*PCache1)(unsafe.Pointer(pCache)).FnMax) { szBulk = I64((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) * I64((*PCache1)(unsafe.Pointer(pCache)).FnMax) } zBulk = libc.AssignPtrUintptr(pCache+80, Xsqlite3Malloc(tls, uint64(szBulk))) Xsqlite3EndBenignMalloc(tls) if zBulk != 0 { var nBulk int32 = Xsqlite3MallocSize(tls, zBulk) / (*PCache1)(unsafe.Pointer(pCache)).FszAlloc for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&nBulk, 1) != 0 { var pX uintptr = zBulk + uintptr((*PCache1)(unsafe.Pointer(pCache)).FszPage) (*PgHdr1)(unsafe.Pointer(pX)).Fpage.FpBuf = zBulk (*PgHdr1)(unsafe.Pointer(pX)).Fpage.FpExtra = pX + 1*56 (*PgHdr1)(unsafe.Pointer(pX)).FisBulkLocal = U16(1) (*PgHdr1)(unsafe.Pointer(pX)).FisAnchor = U16(0) (*PgHdr1)(unsafe.Pointer(pX)).FpNext = (*PCache1)(unsafe.Pointer(pCache)).FpFree (*PgHdr1)(unsafe.Pointer(pX)).FpLruPrev = uintptr(0) // Initializing this saves a valgrind error (*PCache1)(unsafe.Pointer(pCache)).FpFree = pX zBulk += uintptr((*PCache1)(unsafe.Pointer(pCache)).FszAlloc) } } return libc.Bool32((*PCache1)(unsafe.Pointer(pCache)).FpFree != uintptr(0)) } // Malloc function used within this file to allocate space from the buffer // configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no // such buffer exists or there is no space left in it, this function falls // back to sqlite3Malloc(). // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51599:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) p = pcache1_g.FpFree if p != 0 { pcache1_g.FpFree = (*PgFreeslot)(unsafe.Pointer(pcache1_g.FpFree)).FpNext pcache1_g.FnFreeSlot-- pcache1_g.FbUnderPressure = libc.Bool32(pcache1_g.FnFreeSlot < pcache1_g.FnReserve) Xsqlite3StatusHighwater(tls, SQLITE_STATUS_PAGECACHE_SIZE, nByte) Xsqlite3StatusUp(tls, SQLITE_STATUS_PAGECACHE_USED, 1) } Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) } if p == uintptr(0) { // Memory is not available in the SQLITE_CONFIG_PAGECACHE pool. Get // it from sqlite3Malloc instead. p = Xsqlite3Malloc(tls, uint64(nByte)) if p != 0 { var sz int32 = Xsqlite3MallocSize(tls, p) Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) Xsqlite3StatusHighwater(tls, SQLITE_STATUS_PAGECACHE_SIZE, nByte) Xsqlite3StatusUp(tls, SQLITE_STATUS_PAGECACHE_OVERFLOW, sz) Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) } } return p } // Free an allocated buffer obtained from pcache1Alloc(). func pcache1Free(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51637:13: */ if p == uintptr(0) { return } if Uptr(p) >= Uptr(pcache1_g.FpStart) && Uptr(p) < Uptr(pcache1_g.FpEnd) { var pSlot uintptr Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) Xsqlite3StatusDown(tls, SQLITE_STATUS_PAGECACHE_USED, 1) pSlot = p (*PgFreeslot)(unsafe.Pointer(pSlot)).FpNext = pcache1_g.FpFree pcache1_g.FpFree = pSlot pcache1_g.FnFreeSlot++ pcache1_g.FbUnderPressure = libc.Bool32(pcache1_g.FnFreeSlot < pcache1_g.FnReserve) Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) } else { { var nFreed int32 = 0 nFreed = Xsqlite3MallocSize(tls, p) Xsqlite3_mutex_enter(tls, pcache1_g.Fmutex) Xsqlite3StatusDown(tls, SQLITE_STATUS_PAGECACHE_OVERFLOW, nFreed) Xsqlite3_mutex_leave(tls, pcache1_g.Fmutex) } Xsqlite3_free(tls, p) } } // Return the size of a pcache allocation func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51670:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { var iSize int32 iSize = Xsqlite3MallocSize(tls, p) return iSize } return int32(0) } // Allocate a new page object initially associated with cache pCache. func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51687:15: */ var p uintptr = uintptr(0) var pPg uintptr if (*PCache1)(unsafe.Pointer(pCache)).FpFree != 0 || (*PCache1)(unsafe.Pointer(pCache)).FnPage == uint32(0) && pcache1InitBulk(tls, pCache) != 0 { p = (*PCache1)(unsafe.Pointer(pCache)).FpFree (*PCache1)(unsafe.Pointer(pCache)).FpFree = (*PgHdr1)(unsafe.Pointer(p)).FpNext (*PgHdr1)(unsafe.Pointer(p)).FpNext = uintptr(0) } else { // The group mutex must be released before pcache1Alloc() is called. This // is because it might call sqlite3_release_memory(), which assumes that // this mutex is not held. Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if benignMalloc != 0 { Xsqlite3BeginBenignMalloc(tls) } pPg = pcache1Alloc(tls, (*PCache1)(unsafe.Pointer(pCache)).FszAlloc) if benignMalloc != 0 { Xsqlite3EndBenignMalloc(tls) } Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if pPg == uintptr(0) { return uintptr(0) } p = pPg + uintptr((*PCache1)(unsafe.Pointer(pCache)).FszPage) (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf = pPg (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpExtra = p + 1*56 (*PgHdr1)(unsafe.Pointer(p)).FisBulkLocal = U16(0) (*PgHdr1)(unsafe.Pointer(p)).FisAnchor = U16(0) (*PgHdr1)(unsafe.Pointer(p)).FpLruPrev = uintptr(0) // Initializing this saves a valgrind error } *(*uint32)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable))++ return p } // Free a page object allocated by pcache1AllocPage(). func pcache1FreePage(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51739:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache if (*PgHdr1)(unsafe.Pointer(p)).FisBulkLocal != 0 { (*PgHdr1)(unsafe.Pointer(p)).FpNext = (*PCache1)(unsafe.Pointer(pCache)).FpFree (*PCache1)(unsafe.Pointer(pCache)).FpFree = p } else { pcache1Free(tls, (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf) } *(*uint32)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable))-- } // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51761:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51769:21: */ pcache1Free(tls, p) } // Return true if it desirable to avoid allocating a new page cache // entry. // // If memory was allocated specifically to the page cache using // SQLITE_CONFIG_PAGECACHE but that memory has all been used, then // it is desirable to avoid allocating a new page cache entry because // presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient // for all page cache needs and we should not need to spill the // allocation onto the heap. // // Or, the heap is used for all page cache memory but the heap is // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51790:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { return Xsqlite3HeapNearlyFull(tls) } return int32(0) } //**************************************************************************** //******* General Implementation Functions *********************************** // This function is used to resize the hash table used by the cache passed // as the first argument. // // The PCache mutex must be held when this function is called. func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51807:13: */ var apNew uintptr var nNew uint32 var i uint32 nNew = (*PCache1)(unsafe.Pointer(p)).FnHash * uint32(2) if nNew < uint32(256) { nNew = uint32(256) } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex) if (*PCache1)(unsafe.Pointer(p)).FnHash != 0 { Xsqlite3BeginBenignMalloc(tls) } apNew = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(uintptr(0)))*uint64(nNew)) if (*PCache1)(unsafe.Pointer(p)).FnHash != 0 { Xsqlite3EndBenignMalloc(tls) } Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FpGroup)).Fmutex) if apNew != 0 { for i = uint32(0); i < (*PCache1)(unsafe.Pointer(p)).FnHash; i++ { var pPage uintptr var pNext uintptr = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(p)).FapHash + uintptr(i)*8)) for libc.AssignUintptr(&pPage, pNext) != uintptr(0) { var h uint32 = (*PgHdr1)(unsafe.Pointer(pPage)).FiKey % nNew pNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) *(*uintptr)(unsafe.Pointer(apNew + uintptr(h)*8)) = pPage } } Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(p)).FapHash) (*PCache1)(unsafe.Pointer(p)).FapHash = apNew (*PCache1)(unsafe.Pointer(p)).FnHash = nNew } } // This function is used internally to remove the page pPage from the // PGroup LRU list, if is part of it. If pPage is not part of the PGroup // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51848:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext = uintptr(0) // pPage->pLruPrev = 0; // No need to clear pLruPrev as it is never accessed if pLruNext is 0 (*PCache1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpCache)).FnRecyclable-- return pPage } // Remove the page supplied as an argument from the hash table // (PCache1.apHash structure) that it is currently stored in. // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51873:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr h = (*PgHdr1)(unsafe.Pointer(pPage)).FiKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash for pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8; *(*uintptr)(unsafe.Pointer(pp)) != pPage; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { } *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext (*PCache1)(unsafe.Pointer(pCache)).FnPage-- if freeFlag != 0 { pcache1FreePage(tls, pPage) } } // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51891:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr for (*PGroup)(unsafe.Pointer(pGroup)).FnPurgeable > (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage && int32((*PgHdr1)(unsafe.Pointer(libc.AssignUintptr(&p, (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev))).FisAnchor) == 0 { pcache1PinPage(tls, p) pcache1RemoveFromHash(tls, p, 1) } if (*PCache1)(unsafe.Pointer(pCache)).FnPage == uint32(0) && (*PCache1)(unsafe.Pointer(pCache)).FpBulk != 0 { Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FpBulk) (*PCache1)(unsafe.Pointer(pCache)).FpBulk = libc.AssignPtrUintptr(pCache+72, uintptr(0)) } } // Discard all pages from cache pCache with a page number (key value) // greater than or equal to iLimit. Any pinned pages that meet this // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51916:13: */ var h uint32 var iStop uint32 if (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey-iLimit < (*PCache1)(unsafe.Pointer(pCache)).FnHash { // If we are just shaving the last few pages off the end of the // cache, then there is no point in scanning the entire hash table. // Only scan those hash slots that might contain pages that need to // be removed. h = iLimit % (*PCache1)(unsafe.Pointer(pCache)).FnHash iStop = (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash } else { // This is the general case where many pages are being removed. // It is necessary to scan the entire hash table h = (*PCache1)(unsafe.Pointer(pCache)).FnHash / uint32(2) iStop = h - uint32(1) } for { var pp uintptr var pPage uintptr pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8 for libc.AssignUintptr(&pPage, *(*uintptr)(unsafe.Pointer(pp))) != uintptr(0) { if (*PgHdr1)(unsafe.Pointer(pPage)).FiKey >= iLimit { (*PCache1)(unsafe.Pointer(pCache)).FnPage-- *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext if (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext != uintptr(0) { pcache1PinPage(tls, pPage) } pcache1FreePage(tls, pPage) } else { pp = pPage + 24 } } if h == iStop { break } h = (h + uint32(1)) % (*PCache1)(unsafe.Pointer(pCache)).FnHash } } //**************************************************************************** //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:51967:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) // The pcache1.separateCache variable is true if each PCache has its own // private PGroup (mode-1). pcache1.separateCache is false if the single // PGroup in pcache1.grp is used for all page caches (mode-2). // // * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT // // * Use a unified cache in single-threaded applications that have // configured a start-time buffer for use as page-cache memory using // sqlite3_config(SQLITE_CONFIG_PAGECACHE, pBuf, sz, N) with non-NULL // pBuf argument. // // * Otherwise use separate caches (mode-1) pcache1_g.FseparateCache = 0 if Xsqlite3Config.FbCoreMutex != 0 { pcache1_g.Fgrp.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_LRU) pcache1_g.Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_PMEM) } if pcache1_g.FseparateCache != 0 && Xsqlite3Config.FnPage != 0 && Xsqlite3Config.FpPage == uintptr(0) { pcache1_g.FnInitPage = Xsqlite3Config.FnPage } else { pcache1_g.FnInitPage = 0 } pcache1_g.Fgrp.FmxPinned = uint32(10) pcache1_g.FisInit = 1 return SQLITE_OK } // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52020:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint64(unsafe.Sizeof(pcache1_g))) } // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52034:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache sz = int32(uint64(unsafe.Sizeof(PCache1{})) + uint64(unsafe.Sizeof(PGroup{}))*uint64(pcache1_g.FseparateCache)) pCache = Xsqlite3MallocZero(tls, uint64(sz)) if pCache != 0 { if pcache1_g.FseparateCache != 0 { pGroup = pCache + 1*88 (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = uint32(10) } else { pGroup = uintptr(unsafe.Pointer(&pcache1_g)) } Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) if int32((*PGroup)(unsafe.Pointer(pGroup)).Flru.FisAnchor) == 0 { (*PGroup)(unsafe.Pointer(pGroup)).Flru.FisAnchor = U16(1) (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev = libc.AssignPtrUintptr(pGroup+24+40, pGroup+24) } (*PCache1)(unsafe.Pointer(pCache)).FpGroup = pGroup (*PCache1)(unsafe.Pointer(pCache)).FszPage = szPage (*PCache1)(unsafe.Pointer(pCache)).FszExtra = szExtra (*PCache1)(unsafe.Pointer(pCache)).FszAlloc = int32(uint64(szPage+szExtra) + (uint64(unsafe.Sizeof(PgHdr1{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable = func() int32 { if bPurgeable != 0 { return 1 } return 0 }() pcache1ResizeHash(tls, pCache) if bPurgeable != 0 { (*PCache1)(unsafe.Pointer(pCache)).FnMin = uint32(10) *(*uint32)(unsafe.Pointer(pGroup + 12)) += (*PCache1)(unsafe.Pointer(pCache)).FnMin (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage (*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable = pGroup + 20 } else { (*PCache1)(unsafe.Pointer(pCache)).FpnPurgeable = pCache + 48 } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) if (*PCache1)(unsafe.Pointer(pCache)).FnHash == uint32(0) { pcache1Destroy(tls, pCache) pCache = uintptr(0) } } return pCache } // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52084:13: */ var pCache uintptr = p var n U32 if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) n = U32(nMax) if n > uint32(0x7fff0000)-(*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage+(*PCache1)(unsafe.Pointer(pCache)).FnMax { n = uint32(0x7fff0000) - (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + (*PCache1)(unsafe.Pointer(pCache)).FnMax } *(*uint32)(unsafe.Pointer(pGroup + 8)) += n - (*PCache1)(unsafe.Pointer(pCache)).FnMax (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage (*PCache1)(unsafe.Pointer(pCache)).FnMax = n (*PCache1)(unsafe.Pointer(pCache)).Fn90pct = (*PCache1)(unsafe.Pointer(pCache)).FnMax * uint32(9) / uint32(10) pcache1EnforceMaxPage(tls, pCache) Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) } } // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. func pcache1Shrink(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52109:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var savedMaxPage uint32 Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) savedMaxPage = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage = uint32(0) pcache1EnforceMaxPage(tls, pCache) (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage = savedMaxPage Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) } } // Implementation of the sqlite3_pcache.xPagecount method. func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52126:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) n = int32((*PCache1)(unsafe.Pointer(pCache)).FnPage) Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return n } // Implement steps 3, 4, and 5 of the pcache1Fetch() algorithm described // in the header of the pcache1Fetch() procedure. // // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52144:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) // Step 3: Abort if createFlag is 1 but the cache is nearly full nPinned = (*PCache1)(unsafe.Pointer(pCache)).FnPage - (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable if createFlag == 1 && (nPinned >= (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned || nPinned >= (*PCache1)(unsafe.Pointer(pCache)).Fn90pct || pcache1UnderMemoryPressure(tls, pCache) != 0 && (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable < nPinned) { return uintptr(0) } if (*PCache1)(unsafe.Pointer(pCache)).FnPage >= (*PCache1)(unsafe.Pointer(pCache)).FnHash { pcache1ResizeHash(tls, pCache) } // Step 4. Try to recycle a page. if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 && !(int32((*PgHdr1)(unsafe.Pointer((*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev)).FisAnchor) != 0) && ((*PCache1)(unsafe.Pointer(pCache)).FnPage+uint32(1) >= (*PCache1)(unsafe.Pointer(pCache)).FnMax || pcache1UnderMemoryPressure(tls, pCache) != 0) { var pOther uintptr pPage = (*PGroup)(unsafe.Pointer(pGroup)).Flru.FpLruPrev pcache1RemoveFromHash(tls, pPage, 0) pcache1PinPage(tls, pPage) pOther = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache if (*PCache1)(unsafe.Pointer(pOther)).FszAlloc != (*PCache1)(unsafe.Pointer(pCache)).FszAlloc { pcache1FreePage(tls, pPage) pPage = uintptr(0) } else { *(*uint32)(unsafe.Pointer(pGroup + 20)) -= uint32((*PCache1)(unsafe.Pointer(pOther)).FbPurgeable - (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable) } } // Step 5. If a usable page buffer has still not been found, // attempt to allocate a new one. if !(pPage != 0) { pPage = pcache1AllocPage(tls, pCache, libc.Bool32(createFlag == 1)) } if pPage != 0 { var h uint32 = iKey % (*PCache1)(unsafe.Pointer(pCache)).FnHash (*PCache1)(unsafe.Pointer(pCache)).FnPage++ (*PgHdr1)(unsafe.Pointer(pPage)).FiKey = iKey (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) (*PgHdr1)(unsafe.Pointer(pPage)).FpCache = pCache (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext = uintptr(0) // pPage->pLruPrev = 0; // No need to clear pLruPrev since it is not accessed when pLruNext==0 *(*uintptr)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).Fpage.FpExtra)) = uintptr(0) *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) = pPage if iKey > (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iKey } } return pPage } // Implementation of the sqlite3_pcache.xFetch method. // // Fetch a page by key value. // // Whether or not a new page may be allocated by this function depends on // the value of the createFlag argument. 0 means do not allocate a new // page. 1 means allocate a new page if space is easily available. 2 // means to try really hard to allocate a new page. // // For a non-purgeable cache (a cache used as the storage for an in-memory // database) there is really no difference between createFlag 1 and 2. So // the calling function (pcache.c) will never have a createFlag of 1 on // a non-purgeable cache. // // There are three different approaches to obtaining space for a page, // depending on the value of parameter createFlag (which may be 0, 1 or 2). // // 1. Regardless of the value of createFlag, the cache is searched for a // copy of the requested page. If one is found, it is returned. // // 2. If createFlag==0 and the page is not already in the cache, NULL is // returned. // // 3. If createFlag is 1, and the page is not already in the cache, then // return NULL (do not allocate a new page) if any of the following // conditions are true: // // (a) the number of pages pinned by the cache is greater than // PCache1.nMax, or // // (b) the number of pages pinned by the cache is greater than // the sum of nMax for all purgeable caches, less the sum of // nMin for all other purgeable caches, or // // 4. If none of the first three conditions apply and the cache is marked // as purgeable, and if one of the following is true: // // (a) The number of pages allocated for the cache is already // PCache1.nMax, or // // (b) The number of pages allocated for all purgeable caches is // already equal to or greater than the sum of nMax for all // purgeable caches, // // (c) The system is under memory pressure and wants to avoid // unnecessary pages cache entry allocations // // then attempt to recycle a page from the LRU list. If it is the right // size, return the recycled buffer. Otherwise, free the buffer and // proceed to step 5. // // 5. Otherwise, allocate and return a new page buffer. // // There are two versions of this routine. pcache1FetchWithMutex() is // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52272:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) // Step 1: Search the hash table for an existing entry. pPage = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(iKey%(*PCache1)(unsafe.Pointer(pCache)).FnHash)*8)) for pPage != 0 && (*PgHdr1)(unsafe.Pointer(pPage)).FiKey != iKey { pPage = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext } // Step 2: If the page was found in the hash table, then return it. // If the page was not in the hash table and createFlag is 0, abort. // Otherwise (page not in hash and createFlag!=0) continue with // subsequent steps to try to create the page. if pPage != 0 { if (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext != uintptr(0) { return pcache1PinPage(tls, pPage) } else { return pPage } } else if createFlag != 0 { // Steps 3, 4, and 5 implemented by this subroutine return pcache1FetchStage2(tls, pCache, iKey, createFlag) } else { return uintptr(0) } return uintptr(0) } func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52302:15: */ var pCache uintptr = p var pPage uintptr Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) pPage = pcache1FetchNoMutex(tls, p, iKey, createFlag) Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) return pPage } func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52317:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { return pcache1FetchWithMutex(tls, p, iKey, createFlag) } else { return pcache1FetchNoMutex(tls, p, iKey, createFlag) } return uintptr(0) } // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52348:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) // It is an error to call this function if the page is already // part of the PGroup LRU list. if reuseUnlikely != 0 || (*PGroup)(unsafe.Pointer(pGroup)).FnPurgeable > (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage { pcache1RemoveFromHash(tls, pPage, 1) } else { // Add the page to the PGroup LRU list. var ppFirst uintptr = pGroup + 24 + 40 (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev = pGroup + 24 (*PgHdr1)(unsafe.Pointer(libc.AssignPtrUintptr(pPage+40, *(*uintptr)(unsafe.Pointer(ppFirst))))).FpLruPrev = pPage *(*uintptr)(unsafe.Pointer(ppFirst)) = pPage (*PCache1)(unsafe.Pointer(pCache)).FnRecyclable++ } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) } // Implementation of the sqlite3_pcache.xRekey method. func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52383:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr var h uint32 Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) h = iOld % (*PCache1)(unsafe.Pointer(pCache)).FnHash pp = (*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8 for *(*uintptr)(unsafe.Pointer(pp)) != pPage { pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 } *(*uintptr)(unsafe.Pointer(pp)) = (*PgHdr1)(unsafe.Pointer(pPage)).FpNext h = iNew % (*PCache1)(unsafe.Pointer(pCache)).FnHash (*PgHdr1)(unsafe.Pointer(pPage)).FiKey = iNew (*PgHdr1)(unsafe.Pointer(pPage)).FpNext = *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) *(*uintptr)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FapHash + uintptr(h)*8)) = pPage if iNew > (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iNew } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) } // Implementation of the sqlite3_pcache.xTruncate method. // // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52423:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { pcache1TruncateUnsafe(tls, pCache, iLimit) (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey = iLimit - uint32(1) } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) } // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). func pcache1Destroy(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52438:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) if (*PCache1)(unsafe.Pointer(pCache)).FnPage != 0 { pcache1TruncateUnsafe(tls, pCache, uint32(0)) } *(*uint32)(unsafe.Pointer(pGroup + 8)) -= (*PCache1)(unsafe.Pointer(pCache)).FnMax *(*uint32)(unsafe.Pointer(pGroup + 12)) -= (*PCache1)(unsafe.Pointer(pCache)).FnMin (*PGroup)(unsafe.Pointer(pGroup)).FmxPinned = (*PGroup)(unsafe.Pointer(pGroup)).FnMaxPage + uint32(10) - (*PGroup)(unsafe.Pointer(pGroup)).FnMinPage pcache1EnforceMaxPage(tls, pCache) Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(pGroup)).Fmutex) Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FpBulk) Xsqlite3_free(tls, (*PCache1)(unsafe.Pointer(pCache)).FapHash) Xsqlite3_free(tls, pCache) } // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52461:21: */ bp := tls.Alloc(8) defer tls.Free(8) Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods1)))) } var defaultMethods1 = Sqlite3_pcache_methods2{ FiVersion: 1, // pArg FxInit: 0, // xInit FxShutdown: 0, // xShutdown FxCreate: 0, // xCreate FxCachesize: 0, // xCachesize FxPagecount: 0, // xPagecount FxFetch: 0, // xFetch FxUnpin: 0, // xUnpin FxRekey: 0, // xRekey FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52462:40 */ // Return the size of the header on each page of this PCACHE implementation. func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52483:20: */ return int32((uint64(unsafe.Sizeof(PgHdr1{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52489:30: */ return pcache1_g.Fmutex } // This function is called to free superfluous dynamically allocated memory // held by the pager system. Memory in use by any SQLite pager allocated // by the current thread may be sqlite3_free()ed. // // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52503:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { var p uintptr Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer(uintptr(unsafe.Pointer(&pcache1_g)))).Fmutex) for (nReq < 0 || nFree < nReq) && libc.AssignUintptr(&p, pcache1_g.Fgrp.Flru.FpLruPrev) != uintptr(0) && int32((*PgHdr1)(unsafe.Pointer(p)).FisAnchor) == 0 { nFree = nFree + pcache1MemSize(tls, (*PgHdr1)(unsafe.Pointer(p)).Fpage.FpBuf) pcache1PinPage(tls, p) pcache1RemoveFromHash(tls, p, 1) } Xsqlite3_mutex_leave(tls, (*PGroup)(unsafe.Pointer(uintptr(unsafe.Pointer(&pcache1_g)))).Fmutex) } return nFree } //************* End of pcache1.c ******************************************** //************* Begin file rowset.c ***************************************** // 2008 December 3 // // 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 module implements an object we call a "RowSet". // // The RowSet object is a collection of rowids. Rowids // are inserted into the RowSet in an arbitrary order. Inserts // can be intermixed with tests to see if a given rowid has been // previously inserted into the RowSet. // // After all inserts are finished, it is possible to extract the // elements of the RowSet in sorted order. Once this extraction // process has started, no new elements may be inserted. // // Hence, the primitive operations for a RowSet are: // // CREATE // INSERT // TEST // SMALLEST // DESTROY // // The CREATE and DESTROY primitives are the constructor and destructor, // obviously. The INSERT primitive adds a new element to the RowSet. // TEST checks to see if an element is already in the RowSet. SMALLEST // extracts the least value from the RowSet. // // The INSERT primitive might allocate additional memory. Memory is // allocated in chunks so most INSERTs do no allocation. There is an // upper bound on the size of allocated memory. No memory is freed // until DESTROY. // // The TEST primitive includes a "batch" number. The TEST primitive // will only see elements that were inserted before the last change // in the batch number. In other words, if an INSERT occurs between // two TESTs where the TESTs have the same batch nubmer, then the // value added by the INSERT will not be visible to the second TEST. // The initial batch number is zero, so if the very first TEST contains // a non-zero batch number, it will see all prior INSERTs. // // No INSERTs may occurs after a SMALLEST. An assertion will fail if // that is attempted. // // The cost of an INSERT is roughly constant. (Sometimes new memory // has to be allocated on an INSERT.) The cost of a TEST with a new // batch number is O(NlogN) where N is the number of elements in the RowSet. // The cost of a TEST using the same batch number is O(logN). The cost // of the first SMALLEST is O(NlogN). Second and subsequent SMALLEST // primitives are constant time. The cost of DESTROY is O(N). // // TEST and SMALLEST may not be used by the same RowSet. This used to // be possible, but the feature was not used, so it was removed in order // to simplify the code. // #include "sqliteInt.h" // Target size for allocation chunks. // The number of rowset entries per allocation chunk. // Each entry in a RowSet is an instance of the following object. // // This same object is reused to store a linked list of trees of RowSetEntry // objects. In that alternative use, pRight points to the next entry // in the list, pLeft points to the tree, and v is unused. The // RowSet.pForest value points to the head of this forest list. type RowSetEntry = struct { Fv I64 FpRight uintptr FpLeft uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14606:9 */ // RowSetEntry objects are allocated in large chunks (instances of the // following structure) to reduce memory allocation overhead. The // chunks are kept on a linked list so that they can be deallocated // when the RowSet is destroyed. type RowSetChunk = struct { FpNextChunk uintptr FaEntry [42]struct { Fv I64 FpRight uintptr FpLeft uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:14606:9 */ // Allowed values for RowSet.rsFlags // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52683:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) (*RowSet)(unsafe.Pointer(p)).FpChunk = uintptr(0) (*RowSet)(unsafe.Pointer(p)).Fdb = db (*RowSet)(unsafe.Pointer(p)).FpEntry = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FpLast = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FpForest = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FpFresh = uintptr((uint64(unsafe.Sizeof(RowSet{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) + p (*RowSet)(unsafe.Pointer(p)).FnFresh = U16((uint64(N) - (uint64(unsafe.Sizeof(RowSet{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) / uint64(unsafe.Sizeof(RowSetEntry{}))) (*RowSet)(unsafe.Pointer(p)).FrsFlags = U16(ROWSET_SORTED) (*RowSet)(unsafe.Pointer(p)).FiBatch = 0 } return p } // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52705:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr for pChunk = (*RowSet)(unsafe.Pointer(p)).FpChunk; pChunk != 0; pChunk = pNextChunk { pNextChunk = (*RowSetChunk)(unsafe.Pointer(pChunk)).FpNextChunk Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(p)).Fdb, pChunk) } (*RowSet)(unsafe.Pointer(p)).FpChunk = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FnFresh = U16(0) (*RowSet)(unsafe.Pointer(p)).FpEntry = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FpLast = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FpForest = uintptr(0) (*RowSet)(unsafe.Pointer(p)).FrsFlags = U16(ROWSET_SORTED) } // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52725:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } // Allocate a new RowSetEntry object that is associated with the // given RowSet. Return a pointer to the new and completely uninitialized // object. // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52738:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it // is more efficient to pull a preallocated entry from the pool var pNew uintptr pNew = Xsqlite3DbMallocRawNN(tls, (*RowSet)(unsafe.Pointer(p)).Fdb, uint64(unsafe.Sizeof(RowSetChunk{}))) if pNew == uintptr(0) { return uintptr(0) } (*RowSetChunk)(unsafe.Pointer(pNew)).FpNextChunk = (*RowSet)(unsafe.Pointer(p)).FpChunk (*RowSet)(unsafe.Pointer(p)).FpChunk = pNew (*RowSet)(unsafe.Pointer(p)).FpFresh = pNew + 8 /* &.aEntry */ (*RowSet)(unsafe.Pointer(p)).FnFresh = uint16(uint64(ROWSET_ALLOCATION_SIZE-8) / uint64(unsafe.Sizeof(RowSetEntry{}))) } (*RowSet)(unsafe.Pointer(p)).FnFresh-- return libc.PostIncUintptr(&(*RowSet)(unsafe.Pointer(p)).FpFresh, 24) } // Insert a new value into a RowSet. // // The mallocFailed flag of the database connection is set if a // memory allocation fails. func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52763:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry // This routine is never called after sqlite3RowSetNext() pEntry = rowSetEntryAlloc(tls, p) if pEntry == uintptr(0) { return } (*RowSetEntry)(unsafe.Pointer(pEntry)).Fv = rowid (*RowSetEntry)(unsafe.Pointer(pEntry)).FpRight = uintptr(0) pLast = (*RowSet)(unsafe.Pointer(p)).FpLast if pLast != 0 { if rowid <= (*RowSetEntry)(unsafe.Pointer(pLast)).Fv { //OPTIMIZATION-IF-FALSE // Avoid unnecessary sorts by preserving the ROWSET_SORTED flags // where possible *(*U16)(unsafe.Pointer(p + 50)) &= libc.Uint16FromInt32(libc.CplInt32(ROWSET_SORTED)) } (*RowSetEntry)(unsafe.Pointer(pLast)).FpRight = pEntry } else { (*RowSet)(unsafe.Pointer(p)).FpEntry = pEntry } (*RowSet)(unsafe.Pointer(p)).FpLast = pEntry } // Merge two lists of RowSetEntry objects. Remove duplicates. // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52794:27: */ bp := tls.Alloc(24) defer tls.Free(24) // var head RowSetEntry at bp, 24 var pTail uintptr pTail = bp /* &head */ for { if (*RowSetEntry)(unsafe.Pointer(pA)).Fv <= (*RowSetEntry)(unsafe.Pointer(pB)).Fv { if (*RowSetEntry)(unsafe.Pointer(pA)).Fv < (*RowSetEntry)(unsafe.Pointer(pB)).Fv { pTail = libc.AssignPtrUintptr(pTail+8, pA) } pA = (*RowSetEntry)(unsafe.Pointer(pA)).FpRight if pA == uintptr(0) { (*RowSetEntry)(unsafe.Pointer(pTail)).FpRight = pB break } } else { pTail = libc.AssignPtrUintptr(pTail+8, pB) pB = (*RowSetEntry)(unsafe.Pointer(pB)).FpRight if pB == uintptr(0) { (*RowSetEntry)(unsafe.Pointer(pTail)).FpRight = pA break } } } return (*RowSetEntry)(unsafe.Pointer(bp /* &head */)).FpRight } // Sort all elements on the list of RowSetEntry objects into order of // increasing v. func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52829:27: */ bp := tls.Alloc(320) defer tls.Free(320) var i uint32 var pNext uintptr // var aBucket [40]uintptr at bp, 320 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([40]uintptr{}))) for pIn != 0 { pNext = (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight = uintptr(0) for i = uint32(0); *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*8)) != 0; i++ { pIn = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)), pIn) *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) } *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = pIn pIn = pNext } pIn = *(*uintptr)(unsafe.Pointer(bp)) for i = uint32(1); uint64(i) < uint64(unsafe.Sizeof([40]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))); i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { continue } if pIn != 0 { pIn = rowSetEntryMerge(tls, pIn, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) } else { pIn = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) } } return pIn } // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52858:13: */ bp := tls.Alloc(8) defer tls.Free(8) if (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft != 0 { // var p uintptr at bp, 8 rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft, ppFirst, bp) (*RowSetEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpRight = pIn } else { *(*uintptr)(unsafe.Pointer(ppFirst)) = pIn } if (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight != 0 { rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight, pIn+8, ppLast) } else { *(*uintptr)(unsafe.Pointer(ppLast)) = pIn } } // Convert a sorted list of elements (connected by pRight) into a binary // tree with depth of iDepth. A depth of 1 means the tree contains a single // node taken from the head of *ppList. A depth of 2 means a tree with // three nodes. And so forth. // // Use as many entries from the input list as required and update the // *ppList to point to the unused elements of the list. If the input // list contains too few elements, then construct an incomplete tree // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52893:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE // Prevent unnecessary deep recursion when we run out of entries return uintptr(0) } if iDepth > 1 { //OPTIMIZATION-IF-TRUE // This branch causes a *balanced* tree to be generated. A valid tree // is still generated without this branch, but the tree is wildly // unbalanced and inefficient. pLeft = rowSetNDeepTree(tls, ppList, iDepth-1) p = *(*uintptr)(unsafe.Pointer(ppList)) if p == uintptr(0) { //OPTIMIZATION-IF-FALSE // It is safe to always return here, but the resulting tree // would be unbalanced return pLeft } (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = pLeft *(*uintptr)(unsafe.Pointer(ppList)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, ppList, iDepth-1) } else { p = *(*uintptr)(unsafe.Pointer(ppList)) *(*uintptr)(unsafe.Pointer(ppList)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = libc.AssignPtrUintptr(p+8, uintptr(0)) } return p } // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52929:27: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList var iDepth int32 // Depth of the tree so far var p uintptr // Current tree root var pLeft uintptr // Left subtree p = *(*uintptr)(unsafe.Pointer(bp /* pList */)) *(*uintptr)(unsafe.Pointer(bp /* pList */)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = libc.AssignPtrUintptr(p+8, uintptr(0)) for iDepth = 1; *(*uintptr)(unsafe.Pointer(bp /* pList */)) != 0; iDepth++ { pLeft = p p = *(*uintptr)(unsafe.Pointer(bp /* pList */)) *(*uintptr)(unsafe.Pointer(bp /* pList */)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = pLeft (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, bp, iDepth) } return p } // Extract the smallest element from the RowSet. // Write the element into *pRowid. Return 1 on success. Return // 0 if the RowSet is already empty. // // After this routine has been called, the sqlite3RowSetInsert() // routine may not be called again. // // This routine may not be called after sqlite3RowSetTest() has // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52961:20: */ // Cannot be used with sqlite3RowSetText() // Merge the forest into a single sorted list on first call if int32((*RowSet)(unsafe.Pointer(p)).FrsFlags)&ROWSET_NEXT == 0 { //OPTIMIZATION-IF-FALSE if int32((*RowSet)(unsafe.Pointer(p)).FrsFlags)&ROWSET_SORTED == 0 { //OPTIMIZATION-IF-FALSE (*RowSet)(unsafe.Pointer(p)).FpEntry = rowSetEntrySort(tls, (*RowSet)(unsafe.Pointer(p)).FpEntry) } *(*U16)(unsafe.Pointer(p + 50)) |= U16(ROWSET_SORTED | ROWSET_NEXT) } // Return the next entry on the list if (*RowSet)(unsafe.Pointer(p)).FpEntry != 0 { *(*I64)(unsafe.Pointer(pRowid)) = (*RowSetEntry)(unsafe.Pointer((*RowSet)(unsafe.Pointer(p)).FpEntry)).Fv (*RowSet)(unsafe.Pointer(p)).FpEntry = (*RowSetEntry)(unsafe.Pointer((*RowSet)(unsafe.Pointer(p)).FpEntry)).FpRight if (*RowSet)(unsafe.Pointer(p)).FpEntry == uintptr(0) { //OPTIMIZATION-IF-TRUE // Free memory immediately, rather than waiting on sqlite3_finalize() Xsqlite3RowSetClear(tls, p) } return 1 } else { return 0 } return int32(0) } // Check to see if element iRowid was inserted into the rowset as // part of any insert batch prior to iBatch. Return 1 or 0. // // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:52995:20: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr var pTree uintptr // This routine is never called after sqlite3RowSetNext() // Sort entries into the forest on the first test of a new batch. // To save unnecessary work, only do this when the batch number changes. if iBatch != (*RowSet)(unsafe.Pointer(pRowSet)).FiBatch { //OPTIMIZATION-IF-FALSE p = (*RowSet)(unsafe.Pointer(pRowSet)).FpEntry if p != 0 { var ppPrevTree uintptr = pRowSet + 40 if int32((*RowSet)(unsafe.Pointer(pRowSet)).FrsFlags)&ROWSET_SORTED == 0 { //OPTIMIZATION-IF-FALSE // Only sort the current set of entries if they need it p = rowSetEntrySort(tls, p) } for pTree = (*RowSet)(unsafe.Pointer(pRowSet)).FpForest; pTree != 0; pTree = (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight { ppPrevTree = pTree + 8 if (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft == uintptr(0) { (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = rowSetListToTree(tls, p) break } else { // var pAux uintptr at bp, 8 // var pTail uintptr at bp+8, 8 rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft, bp, bp+8) (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = uintptr(0) p = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* pAux */)), p) } } if pTree == uintptr(0) { *(*uintptr)(unsafe.Pointer(ppPrevTree)) = libc.AssignUintptr(&pTree, rowSetEntryAlloc(tls, pRowSet)) if pTree != 0 { (*RowSetEntry)(unsafe.Pointer(pTree)).Fv = int64(0) (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight = uintptr(0) (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = rowSetListToTree(tls, p) } } (*RowSet)(unsafe.Pointer(pRowSet)).FpEntry = uintptr(0) (*RowSet)(unsafe.Pointer(pRowSet)).FpLast = uintptr(0) *(*U16)(unsafe.Pointer(pRowSet + 50)) |= U16(ROWSET_SORTED) } (*RowSet)(unsafe.Pointer(pRowSet)).FiBatch = iBatch } // Test to see if the iRowid value appears anywhere in the forest. // Return 1 if it does and 0 if not. for pTree = (*RowSet)(unsafe.Pointer(pRowSet)).FpForest; pTree != 0; pTree = (*RowSetEntry)(unsafe.Pointer(pTree)).FpRight { p = (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft for p != 0 { if (*RowSetEntry)(unsafe.Pointer(p)).Fv < iRowid { p = (*RowSetEntry)(unsafe.Pointer(p)).FpRight } else if (*RowSetEntry)(unsafe.Pointer(p)).Fv > iRowid { p = (*RowSetEntry)(unsafe.Pointer(p)).FpLeft } else { return 1 } } } return 0 } //************* End of rowset.c ********************************************* //************* Begin file pager.c ****************************************** // 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 is the implementation of the page cache subsystem or "pager". // // The pager is used to access a database disk file. It implements // atomic commit and rollback through the use of a journal file that // is separate from the database file. The pager also implements file // locking to prevent two processes from writing the same database // file simultaneously, or one process from reading the database while // another is writing. // #include "sqliteInt.h" //************* Include wal.h in the middle of pager.c ********************** //************* Begin file wal.h ******************************************** // 2010 February 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. // // // This header file defines the interface to the write-ahead logging // system. Refer to the comments below and the header comment attached to // the implementation of each function in log.c for further details. // #include "sqliteInt.h" // Macros for extracting appropriate sync flags for either transaction // commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)): // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. type Wal1 = struct { FpVfs uintptr FpDbFd uintptr FpWalFd uintptr FiCallback U32 F__ccgo_pad1 [4]byte FmxWalSize I64 FnWiData int32 FszFirstBlock int32 FapWiData uintptr FszPage U32 FreadLock I16 FsyncFlags U8 FexclusiveMode U8 FwriteLock U8 FckptLock U8 FreadOnly U8 FtruncateOnCommit U8 FsyncHeader U8 FpadToSectorBoundary U8 FbShmUnreliable U8 F__ccgo_pad2 [1]byte Fhdr WalIndexHdr FminFrame U32 FiReCksum U32 FzWalName uintptr FnCkpt U32 F__ccgo_pad3 [4]byte FpSnapshot uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ //************* End of rowset.c ********************************************* //************* Begin file pager.c ****************************************** // 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 is the implementation of the page cache subsystem or "pager". // // The pager is used to access a database disk file. It implements // atomic commit and rollback through the use of a journal file that // is separate from the database file. The pager also implements file // locking to prevent two processes from writing the same database // file simultaneously, or one process from reading the database while // another is writing. // #include "sqliteInt.h" //************* Include wal.h in the middle of pager.c ********************** //************* Begin file wal.h ******************************************** // 2010 February 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. // // // This header file defines the interface to the write-ahead logging // system. Refer to the comments below and the header comment attached to // the implementation of each function in log.c for further details. // #include "sqliteInt.h" // Macros for extracting appropriate sync flags for either transaction // commits (WAL_SYNC_FLAGS(X)) or for checkpoint ops (CKPT_SYNC_FLAGS(X)): // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. type Wal = Wal1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:53137:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* // ****************** NOTES ON THE DESIGN OF THE PAGER ************************ // // // This comment block describes invariants that hold when using a rollback // journal. These invariants do not apply for journal_mode=WAL, // journal_mode=MEMORY, or journal_mode=OFF. // // Within this comment block, a page is deemed to have been synced // automatically as soon as it is written when PRAGMA synchronous=OFF. // Otherwise, the page is not synced until the xSync method of the VFS // is called successfully on the file containing the page. // // Definition: A page of the database file is said to be "overwriteable" if // one or more of the following are true about the page: // // (a) The original content of the page as it was at the beginning of // the transaction has been written into the rollback journal and // synced. // // (b) The page was a freelist leaf page at the start of the transaction. // // (c) The page number is greater than the largest page that existed in // the database file at the start of the transaction. // // (1) A page of the database file is never overwritten unless one of the // following are true: // // (a) The page and all other pages on the same sector are overwriteable. // // (b) The atomic page write optimization is enabled, and the entire // transaction other than the update of the transaction sequence // number consists of a single page change. // // (2) The content of a page written into the rollback journal exactly matches // both the content in the database when the rollback journal was written // and the content in the database at the beginning of the current // transaction. // // (3) Writes to the database file are an integer multiple of the page size // in length and are aligned on a page boundary. // // (4) Reads from the database file are either aligned on a page boundary and // an integer multiple of the page size in length or are taken from the // first 100 bytes of the database file. // // (5) All writes to the database file are synced prior to the rollback journal // being deleted, truncated, or zeroed. // // (6) If a super-journal file is used, then all writes to the database file // are synced prior to the super-journal being deleted. // // Definition: Two databases (or the same database at two points it time) // are said to be "logically equivalent" if they give the same answer to // all queries. Note in particular the content of freelist leaf // pages can be changed arbitrarily without affecting the logical equivalence // of the database. // // (7) At any time, if any subset, including the empty set and the total set, // of the unsynced changes to a rollback journal are removed and the // journal is rolled back, the resulting database file will be logically // equivalent to the database file at the beginning of the transaction. // // (8) When a transaction is rolled back, the xTruncate method of the VFS // is called to restore the database file to the same size it was at // the beginning of the transaction. (In some VFSes, the xTruncate // method is a no-op, but that does not change the fact the SQLite will // invoke it.) // // (9) Whenever the database file is modified, at least one bit in the range // of bytes from 24 through 39 inclusive will be changed prior to releasing // the EXCLUSIVE lock, thus signaling other connections on the same // database to flush their caches. // // (10) The pattern of bits in bytes 24 through 39 shall not repeat in less // than one billion transactions. // // (11) A database file is well-formed at the beginning and at the conclusion // of every transaction. // // (12) An EXCLUSIVE lock is held on the database file when writing to // the database file. // // (13) A SHARED lock is held on the database file while reading any // content out of the database file. // // // Macros for troubleshooting. Normally turned off // The following two macros are used within the PAGERTRACE() macros above // to print out file-descriptors. // // PAGERID() takes a pointer to a Pager struct as its argument. The // associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file // struct as its argument. // The Pager.eState variable stores the current 'state' of a pager. A // pager may be in any one of the seven states shown in the following // state diagram. // // OPEN <------+------+ // | | | // V | | // +---------> READER-------+ | // | | | // | V | // |<-------WRITER_LOCKED------> ERROR // | | ^ // | V | // |<------WRITER_CACHEMOD-------->| // | | | // | V | // |<-------WRITER_DBMOD---------->| // | | | // | V | // +<------WRITER_FINISHED-------->+ // // // List of state transitions and the C [function] that performs each: // // OPEN -> READER [sqlite3PagerSharedLock] // READER -> OPEN [pager_unlock] // // READER -> WRITER_LOCKED [sqlite3PagerBegin] // WRITER_LOCKED -> WRITER_CACHEMOD [pager_open_journal] // WRITER_CACHEMOD -> WRITER_DBMOD [syncJournal] // WRITER_DBMOD -> WRITER_FINISHED [sqlite3PagerCommitPhaseOne] // WRITER_*** -> READER [pager_end_transaction] // // WRITER_*** -> ERROR [pager_error] // ERROR -> OPEN [pager_unlock] // // // OPEN: // // The pager starts up in this state. Nothing is guaranteed in this // state - the file may or may not be locked and the database size is // unknown. The database may not be read or written. // // * No read or write transaction is active. // * Any lock, or no lock at all, may be held on the database file. // * The dbSize, dbOrigSize and dbFileSize variables may not be trusted. // // READER: // // In this state all the requirements for reading the database in // rollback (non-WAL) mode are met. Unless the pager is (or recently // was) in exclusive-locking mode, a user-level read transaction is // open. The database size is known in this state. // // A connection running with locking_mode=normal enters this state when // it opens a read-transaction on the database and returns to state // OPEN after the read-transaction is completed. However a connection // running in locking_mode=exclusive (including temp databases) remains in // this state even after the read-transaction is closed. The only way // a locking_mode=exclusive connection can transition from READER to OPEN // is via the ERROR state (see below). // // * A read transaction may be active (but a write-transaction cannot). // * A SHARED or greater lock is held on the database file. // * The dbSize variable may be trusted (even if a user-level read // transaction is not active). The dbOrigSize and dbFileSize variables // may not be trusted at this point. // * If the database is a WAL database, then the WAL connection is open. // * Even if a read-transaction is not open, it is guaranteed that // there is no hot-journal in the file-system. // // WRITER_LOCKED: // // The pager moves to this state from READER when a write-transaction // is first opened on the database. In WRITER_LOCKED state, all locks // required to start a write-transaction are held, but no actual // modifications to the cache or database have taken place. // // In rollback mode, a RESERVED or (if the transaction was opened with // BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when // moving to this state, but the journal file is not written to or opened // to in this state. If the transaction is committed or rolled back while // in WRITER_LOCKED state, all that is required is to unlock the database // file. // // IN WAL mode, WalBeginWriteTransaction() is called to lock the log file. // If the connection is running with locking_mode=exclusive, an attempt // is made to obtain an EXCLUSIVE lock on the database file. // // * A write transaction is active. // * If the connection is open in rollback-mode, a RESERVED or greater // lock is held on the database file. // * If the connection is open in WAL-mode, a WAL write transaction // is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully // called). // * The dbSize, dbOrigSize and dbFileSize variables are all valid. // * The contents of the pager cache have not been modified. // * The journal file may or may not be open. // * Nothing (not even the first header) has been written to the journal. // // WRITER_CACHEMOD: // // A pager moves from WRITER_LOCKED state to this state when a page is // first modified by the upper layer. In rollback mode the journal file // is opened (if it is not already open) and a header written to the // start of it. The database file on disk has not been modified. // // * A write transaction is active. // * A RESERVED or greater lock is held on the database file. // * The journal file is open and the first header has been written // to it, but the header has not been synced to disk. // * The contents of the page cache have been modified. // // WRITER_DBMOD: // // The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state // when it modifies the contents of the database file. WAL connections // never enter this state (since they do not modify the database file, // just the log file). // // * A write transaction is active. // * An EXCLUSIVE or greater lock is held on the database file. // * The journal file is open and the first header has been written // and synced to disk. // * The contents of the page cache have been modified (and possibly // written to disk). // // WRITER_FINISHED: // // It is not possible for a WAL connection to enter this state. // // A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD // state after the entire transaction has been successfully written into the // database file. In this state the transaction may be committed simply // by finalizing the journal file. Once in WRITER_FINISHED state, it is // not possible to modify the database further. At this point, the upper // layer must either commit or rollback the transaction. // // * A write transaction is active. // * An EXCLUSIVE or greater lock is held on the database file. // * All writing and syncing of journal and database data has finished. // If no error occurred, all that remains is to finalize the journal to // commit the transaction. If an error did occur, the caller will need // to rollback the transaction. // // ERROR: // // The ERROR state is entered when an IO or disk-full error (including // SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it // difficult to be sure that the in-memory pager state (cache contents, // db size etc.) are consistent with the contents of the file-system. // // Temporary pager files may enter the ERROR state, but in-memory pagers // cannot. // // For example, if an IO error occurs while performing a rollback, // the contents of the page-cache may be left in an inconsistent state. // At this point it would be dangerous to change back to READER state // (as usually happens after a rollback). Any subsequent readers might // report database corruption (due to the inconsistent cache), and if // they upgrade to writers, they may inadvertently corrupt the database // file. To avoid this hazard, the pager switches into the ERROR state // instead of READER following such an error. // // Once it has entered the ERROR state, any attempt to use the pager // to read or write data returns an error. Eventually, once all // outstanding transactions have been abandoned, the pager is able to // transition back to OPEN state, discarding the contents of the // page-cache and any other in-memory state at the same time. Everything // is reloaded from disk (and, if necessary, hot-journal rollback peformed) // when a read-transaction is next opened on the pager (transitioning // the pager into READER state). At that point the system has recovered // from the error. // // Specifically, the pager jumps into the ERROR state if: // // 1. An error occurs while attempting a rollback. This happens in // function sqlite3PagerRollback(). // // 2. An error occurs while attempting to finalize a journal file // following a commit in function sqlite3PagerCommitPhaseTwo(). // // 3. An error occurs while attempting to write to the journal or // database file in function pagerStress() in order to free up // memory. // // In other cases, the error is returned to the b-tree layer. The b-tree // layer then attempts a rollback operation. If the error condition // persists, the pager enters the ERROR state via condition (1) above. // // Condition (3) is necessary because it can be triggered by a read-only // statement executed within a transaction. In this case, if the error // code were simply returned to the user, the b-tree layer would not // automatically attempt a rollback, as it assumes that an error in a // read-only statement cannot leave the pager in an internally inconsistent // state. // // * The Pager.errCode variable is set to something other than SQLITE_OK. // * There are one or more outstanding references to pages (after the // last reference is dropped the pager should move back to OPEN state). // * The pager is not an in-memory pager. // // // Notes: // // * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the // connection is open in WAL mode. A WAL connection is always in one // of the first four states. // // * Normally, a connection open in exclusive mode is never in PAGER_OPEN // state. There are two exceptions: immediately after exclusive-mode has // been turned on (and before any read or write transactions are // executed), and when the pager is leaving the "error state". // // * See also: assert_pager_state(). // The Pager.eLock variable is almost always set to one of the // following locking-states, according to the lock currently held on // the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK. // This variable is kept up to date as locks are taken and released by // the pagerLockDb() and pagerUnlockDb() wrappers. // // If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY // (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not // the operation was successful. In these circumstances pagerLockDb() and // pagerUnlockDb() take a conservative approach - eLock is always updated // when unlocking the file, and only updated when locking the file if the // VFS call is successful. This way, the Pager.eLock variable may be set // to a less exclusive (lower) value than the lock that is actually held // at the system level, but it is never set to a more exclusive value. // // This is usually safe. If an xUnlock fails or appears to fail, there may // be a few redundant xLock() calls or a lock may be held for longer than // required, but nothing really goes wrong. // // The exception is when the database file is unlocked as the pager moves // from ERROR to OPEN state. At this point there may be a hot-journal file // in the file-system that needs to be rolled back (as part of an OPEN->SHARED // transition, by the same pager or any other). If the call to xUnlock() // fails at this point and the pager is left holding an EXCLUSIVE lock, this // can confuse the call to xCheckReservedLock() call made later as part // of hot-journal detection. // // xCheckReservedLock() is defined as returning true "if there is a RESERVED // lock held by this process or any others". So xCheckReservedLock may // return true because the caller itself is holding an EXCLUSIVE lock (but // doesn't know it because of a previous error in xUnlock). If this happens // a hot-journal may be mistaken for a journal being created by an active // transaction in another process, causing SQLite to read from the database // without rolling it back. // // To work around this, if a call to xUnlock() fails when unlocking the // database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It // is only changed back to a real locking state after a successful call // to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition // omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK // lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE // lock on the database file before attempting to roll it back. See function // PagerSharedLock() for more detail. // // Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in // PAGER_OPEN state. // The maximum allowed sector size. 64KiB. If the xSectorsize() method // returns a value larger than this, then MAX_SECTOR_SIZE is used instead. // This could conceivably cause corruption following a power failure on // such a system. This is currently an undocumented limit. // An instance of the following structure is allocated for each active // savepoint and statement transaction in the system. All such structures // are stored in the Pager.aSavepoint[] array, which is allocated and // resized using sqlite3Realloc(). // // When a savepoint is created, the PagerSavepoint.iHdrOffset field is // set to 0. If a journal-header is written into the main journal while // the savepoint is active, then iHdrOffset is set to the byte offset // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). type PagerSavepoint1 = struct { FiOffset I64 FiHdrOffset I64 FpInSavepoint uintptr FnOrig Pgno FiSubRec Pgno FbTruncateOnRelease int32 FaWalData [4]U32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* // ****************** NOTES ON THE DESIGN OF THE PAGER ************************ // // // This comment block describes invariants that hold when using a rollback // journal. These invariants do not apply for journal_mode=WAL, // journal_mode=MEMORY, or journal_mode=OFF. // // Within this comment block, a page is deemed to have been synced // automatically as soon as it is written when PRAGMA synchronous=OFF. // Otherwise, the page is not synced until the xSync method of the VFS // is called successfully on the file containing the page. // // Definition: A page of the database file is said to be "overwriteable" if // one or more of the following are true about the page: // // (a) The original content of the page as it was at the beginning of // the transaction has been written into the rollback journal and // synced. // // (b) The page was a freelist leaf page at the start of the transaction. // // (c) The page number is greater than the largest page that existed in // the database file at the start of the transaction. // // (1) A page of the database file is never overwritten unless one of the // following are true: // // (a) The page and all other pages on the same sector are overwriteable. // // (b) The atomic page write optimization is enabled, and the entire // transaction other than the update of the transaction sequence // number consists of a single page change. // // (2) The content of a page written into the rollback journal exactly matches // both the content in the database when the rollback journal was written // and the content in the database at the beginning of the current // transaction. // // (3) Writes to the database file are an integer multiple of the page size // in length and are aligned on a page boundary. // // (4) Reads from the database file are either aligned on a page boundary and // an integer multiple of the page size in length or are taken from the // first 100 bytes of the database file. // // (5) All writes to the database file are synced prior to the rollback journal // being deleted, truncated, or zeroed. // // (6) If a super-journal file is used, then all writes to the database file // are synced prior to the super-journal being deleted. // // Definition: Two databases (or the same database at two points it time) // are said to be "logically equivalent" if they give the same answer to // all queries. Note in particular the content of freelist leaf // pages can be changed arbitrarily without affecting the logical equivalence // of the database. // // (7) At any time, if any subset, including the empty set and the total set, // of the unsynced changes to a rollback journal are removed and the // journal is rolled back, the resulting database file will be logically // equivalent to the database file at the beginning of the transaction. // // (8) When a transaction is rolled back, the xTruncate method of the VFS // is called to restore the database file to the same size it was at // the beginning of the transaction. (In some VFSes, the xTruncate // method is a no-op, but that does not change the fact the SQLite will // invoke it.) // // (9) Whenever the database file is modified, at least one bit in the range // of bytes from 24 through 39 inclusive will be changed prior to releasing // the EXCLUSIVE lock, thus signaling other connections on the same // database to flush their caches. // // (10) The pattern of bits in bytes 24 through 39 shall not repeat in less // than one billion transactions. // // (11) A database file is well-formed at the beginning and at the conclusion // of every transaction. // // (12) An EXCLUSIVE lock is held on the database file when writing to // the database file. // // (13) A SHARED lock is held on the database file while reading any // content out of the database file. // // // Macros for troubleshooting. Normally turned off // The following two macros are used within the PAGERTRACE() macros above // to print out file-descriptors. // // PAGERID() takes a pointer to a Pager struct as its argument. The // associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file // struct as its argument. // The Pager.eState variable stores the current 'state' of a pager. A // pager may be in any one of the seven states shown in the following // state diagram. // // OPEN <------+------+ // | | | // V | | // +---------> READER-------+ | // | | | // | V | // |<-------WRITER_LOCKED------> ERROR // | | ^ // | V | // |<------WRITER_CACHEMOD-------->| // | | | // | V | // |<-------WRITER_DBMOD---------->| // | | | // | V | // +<------WRITER_FINISHED-------->+ // // // List of state transitions and the C [function] that performs each: // // OPEN -> READER [sqlite3PagerSharedLock] // READER -> OPEN [pager_unlock] // // READER -> WRITER_LOCKED [sqlite3PagerBegin] // WRITER_LOCKED -> WRITER_CACHEMOD [pager_open_journal] // WRITER_CACHEMOD -> WRITER_DBMOD [syncJournal] // WRITER_DBMOD -> WRITER_FINISHED [sqlite3PagerCommitPhaseOne] // WRITER_*** -> READER [pager_end_transaction] // // WRITER_*** -> ERROR [pager_error] // ERROR -> OPEN [pager_unlock] // // // OPEN: // // The pager starts up in this state. Nothing is guaranteed in this // state - the file may or may not be locked and the database size is // unknown. The database may not be read or written. // // * No read or write transaction is active. // * Any lock, or no lock at all, may be held on the database file. // * The dbSize, dbOrigSize and dbFileSize variables may not be trusted. // // READER: // // In this state all the requirements for reading the database in // rollback (non-WAL) mode are met. Unless the pager is (or recently // was) in exclusive-locking mode, a user-level read transaction is // open. The database size is known in this state. // // A connection running with locking_mode=normal enters this state when // it opens a read-transaction on the database and returns to state // OPEN after the read-transaction is completed. However a connection // running in locking_mode=exclusive (including temp databases) remains in // this state even after the read-transaction is closed. The only way // a locking_mode=exclusive connection can transition from READER to OPEN // is via the ERROR state (see below). // // * A read transaction may be active (but a write-transaction cannot). // * A SHARED or greater lock is held on the database file. // * The dbSize variable may be trusted (even if a user-level read // transaction is not active). The dbOrigSize and dbFileSize variables // may not be trusted at this point. // * If the database is a WAL database, then the WAL connection is open. // * Even if a read-transaction is not open, it is guaranteed that // there is no hot-journal in the file-system. // // WRITER_LOCKED: // // The pager moves to this state from READER when a write-transaction // is first opened on the database. In WRITER_LOCKED state, all locks // required to start a write-transaction are held, but no actual // modifications to the cache or database have taken place. // // In rollback mode, a RESERVED or (if the transaction was opened with // BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when // moving to this state, but the journal file is not written to or opened // to in this state. If the transaction is committed or rolled back while // in WRITER_LOCKED state, all that is required is to unlock the database // file. // // IN WAL mode, WalBeginWriteTransaction() is called to lock the log file. // If the connection is running with locking_mode=exclusive, an attempt // is made to obtain an EXCLUSIVE lock on the database file. // // * A write transaction is active. // * If the connection is open in rollback-mode, a RESERVED or greater // lock is held on the database file. // * If the connection is open in WAL-mode, a WAL write transaction // is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully // called). // * The dbSize, dbOrigSize and dbFileSize variables are all valid. // * The contents of the pager cache have not been modified. // * The journal file may or may not be open. // * Nothing (not even the first header) has been written to the journal. // // WRITER_CACHEMOD: // // A pager moves from WRITER_LOCKED state to this state when a page is // first modified by the upper layer. In rollback mode the journal file // is opened (if it is not already open) and a header written to the // start of it. The database file on disk has not been modified. // // * A write transaction is active. // * A RESERVED or greater lock is held on the database file. // * The journal file is open and the first header has been written // to it, but the header has not been synced to disk. // * The contents of the page cache have been modified. // // WRITER_DBMOD: // // The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state // when it modifies the contents of the database file. WAL connections // never enter this state (since they do not modify the database file, // just the log file). // // * A write transaction is active. // * An EXCLUSIVE or greater lock is held on the database file. // * The journal file is open and the first header has been written // and synced to disk. // * The contents of the page cache have been modified (and possibly // written to disk). // // WRITER_FINISHED: // // It is not possible for a WAL connection to enter this state. // // A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD // state after the entire transaction has been successfully written into the // database file. In this state the transaction may be committed simply // by finalizing the journal file. Once in WRITER_FINISHED state, it is // not possible to modify the database further. At this point, the upper // layer must either commit or rollback the transaction. // // * A write transaction is active. // * An EXCLUSIVE or greater lock is held on the database file. // * All writing and syncing of journal and database data has finished. // If no error occurred, all that remains is to finalize the journal to // commit the transaction. If an error did occur, the caller will need // to rollback the transaction. // // ERROR: // // The ERROR state is entered when an IO or disk-full error (including // SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it // difficult to be sure that the in-memory pager state (cache contents, // db size etc.) are consistent with the contents of the file-system. // // Temporary pager files may enter the ERROR state, but in-memory pagers // cannot. // // For example, if an IO error occurs while performing a rollback, // the contents of the page-cache may be left in an inconsistent state. // At this point it would be dangerous to change back to READER state // (as usually happens after a rollback). Any subsequent readers might // report database corruption (due to the inconsistent cache), and if // they upgrade to writers, they may inadvertently corrupt the database // file. To avoid this hazard, the pager switches into the ERROR state // instead of READER following such an error. // // Once it has entered the ERROR state, any attempt to use the pager // to read or write data returns an error. Eventually, once all // outstanding transactions have been abandoned, the pager is able to // transition back to OPEN state, discarding the contents of the // page-cache and any other in-memory state at the same time. Everything // is reloaded from disk (and, if necessary, hot-journal rollback peformed) // when a read-transaction is next opened on the pager (transitioning // the pager into READER state). At that point the system has recovered // from the error. // // Specifically, the pager jumps into the ERROR state if: // // 1. An error occurs while attempting a rollback. This happens in // function sqlite3PagerRollback(). // // 2. An error occurs while attempting to finalize a journal file // following a commit in function sqlite3PagerCommitPhaseTwo(). // // 3. An error occurs while attempting to write to the journal or // database file in function pagerStress() in order to free up // memory. // // In other cases, the error is returned to the b-tree layer. The b-tree // layer then attempts a rollback operation. If the error condition // persists, the pager enters the ERROR state via condition (1) above. // // Condition (3) is necessary because it can be triggered by a read-only // statement executed within a transaction. In this case, if the error // code were simply returned to the user, the b-tree layer would not // automatically attempt a rollback, as it assumes that an error in a // read-only statement cannot leave the pager in an internally inconsistent // state. // // * The Pager.errCode variable is set to something other than SQLITE_OK. // * There are one or more outstanding references to pages (after the // last reference is dropped the pager should move back to OPEN state). // * The pager is not an in-memory pager. // // // Notes: // // * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the // connection is open in WAL mode. A WAL connection is always in one // of the first four states. // // * Normally, a connection open in exclusive mode is never in PAGER_OPEN // state. There are two exceptions: immediately after exclusive-mode has // been turned on (and before any read or write transactions are // executed), and when the pager is leaving the "error state". // // * See also: assert_pager_state(). // The Pager.eLock variable is almost always set to one of the // following locking-states, according to the lock currently held on // the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK. // This variable is kept up to date as locks are taken and released by // the pagerLockDb() and pagerUnlockDb() wrappers. // // If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY // (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not // the operation was successful. In these circumstances pagerLockDb() and // pagerUnlockDb() take a conservative approach - eLock is always updated // when unlocking the file, and only updated when locking the file if the // VFS call is successful. This way, the Pager.eLock variable may be set // to a less exclusive (lower) value than the lock that is actually held // at the system level, but it is never set to a more exclusive value. // // This is usually safe. If an xUnlock fails or appears to fail, there may // be a few redundant xLock() calls or a lock may be held for longer than // required, but nothing really goes wrong. // // The exception is when the database file is unlocked as the pager moves // from ERROR to OPEN state. At this point there may be a hot-journal file // in the file-system that needs to be rolled back (as part of an OPEN->SHARED // transition, by the same pager or any other). If the call to xUnlock() // fails at this point and the pager is left holding an EXCLUSIVE lock, this // can confuse the call to xCheckReservedLock() call made later as part // of hot-journal detection. // // xCheckReservedLock() is defined as returning true "if there is a RESERVED // lock held by this process or any others". So xCheckReservedLock may // return true because the caller itself is holding an EXCLUSIVE lock (but // doesn't know it because of a previous error in xUnlock). If this happens // a hot-journal may be mistaken for a journal being created by an active // transaction in another process, causing SQLite to read from the database // without rolling it back. // // To work around this, if a call to xUnlock() fails when unlocking the // database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It // is only changed back to a real locking state after a successful call // to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition // omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK // lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE // lock on the database file before attempting to roll it back. See function // PagerSharedLock() for more detail. // // Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in // PAGER_OPEN state. // The maximum allowed sector size. 64KiB. If the xSectorsize() method // returns a value larger than this, then MAX_SECTOR_SIZE is used instead. // This could conceivably cause corruption following a power failure on // such a system. This is currently an undocumented limit. // An instance of the following structure is allocated for each active // savepoint and statement transaction in the system. All such structures // are stored in the Pager.aSavepoint[] array, which is allocated and // resized using sqlite3Realloc(). // // When a savepoint is created, the PagerSavepoint.iHdrOffset field is // set to 0. If a journal-header is written into the main journal while // the savepoint is active, then iHdrOffset is set to the byte offset // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). type PagerSavepoint = PagerSavepoint1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:53648:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS // or CACHE_WRITE to sqlite3_db_status(). // The following global variables hold counters used for // testing purposes only. These variables do not exist in // a non-testing build. These variables are not thread-safe. // Journal files begin with the following magic string. The data // was obtained from /dev/random. It is used only as a sanity check. // // Since version 2.8.0, the journal format contains additional sanity // checking information. If the power fails while the journal is being // written, semi-random garbage data might appear in the journal // file after power is restored. If an attempt is then made // to roll the journal back, the database could be corrupted. The additional // sanity checking data is an attempt to discover the garbage in the // journal and ignore it. // // The sanity checking information for the new journal format consists // of a 32-bit checksum on each page of data. The checksum covers both // the page number and the pPager->pageSize bytes of data for the page. // This cksum is initialized to a 32-bit random value that appears in the // journal file right after the header. The random initializer is important, // because garbage data that appears at the end of a journal is likely // data that was once in other files that have now been deleted. If the // garbage data came from an obsolete journal file, the checksums might // be correct. But by initializing the checksum to random value which // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:53970:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54263:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 }{getPageError})) } else if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 }{getPageMMap})) } else { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 }{getPageNormal})) } } // Return true if it is necessary to write page *pPg into the sub-journal. // A page needs to be written into the sub-journal if there exists one // or more open savepoints for which: // // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54284:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno var i int32 for i = 0; i < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; i++ { p = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(i)*56 if (*PagerSavepoint)(unsafe.Pointer(p)).FnOrig >= pgno && 0 == Xsqlite3BitvecTestNotNull(tls, (*PagerSavepoint)(unsafe.Pointer(p)).FpInSavepoint, pgno) { for i = i + 1; i < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; i++ { (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(i)*56)).FbTruncateOnRelease = 0 } return 1 } } return 0 } // Read a 32-bit integer from the given file descriptor. Store the integer // that is read in *pRes. Return SQLITE_OK if everything worked, or an // error code is something goes wrong. // // All values are stored on disk as big-endian. func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54317:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var ac [4]uint8 at bp, 4 var rc int32 = Xsqlite3OsRead(tls, fd, bp, int32(unsafe.Sizeof([4]uint8{})), offset) if rc == SQLITE_OK { *(*U32)(unsafe.Pointer(pRes)) = Xsqlite3Get4byte(tls, bp) } return rc } // Write a 32-bit integer into a string buffer in big-endian byte order. // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54336:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var ac [4]int8 at bp, 4 Xsqlite3Put4byte(tls, bp, val) return Xsqlite3OsWrite(tls, fd, bp, 4, offset) } // Unlock the database file to level eLock, which must be either NO_LOCK // or SHARED_LOCK. Regardless of whether or not the call to xUnlock() // succeeds, set the Pager.eLock variable to match the (attempted) new lock. // // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54351:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { rc = SQLITE_OK } else { rc = Xsqlite3OsUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, eLock) } if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) != EXCLUSIVE_LOCK+1 { (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(eLock) } } (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile // ticket fb3b3024ea238d5c return rc } // Lock the database file to level eLock, which must be either SHARED_LOCK, // RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the // Pager.eLock variable to the new locking state. // // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54379:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { rc = SQLITE_OK } else { rc = Xsqlite3OsLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, eLock) } if rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeLock) != EXCLUSIVE_LOCK+1 || eLock == EXCLUSIVE_LOCK) { (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(eLock) } } return rc } // This function determines whether or not the atomic-write or // atomic-batch-write optimizations can be used with this pager. The // atomic-write optimization can be used if: // // (a) the value returned by OsDeviceCharacteristics() indicates that // a database page may be written atomically, and // (b) the value returned by OsSectorSize() is less than or equal // to the page size. // // If it can be used, then the value returned is the size of the journal // file when it contains rollback data for exactly one page. // // The atomic-batch-write optimization can be used if OsDeviceCharacteristics() // returns a value with the SQLITE_IOCAP_BATCH_ATOMIC bit set. -1 is // returned in this case. // // If neither optimization can be used, 0 is returned. func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54412:12: */ _ = pPager return 0 } // If SQLITE_CHECK_PAGES is defined then we do some sanity checking // on the cache using a hash function. This is used for testing // and debugging only. // When this is called the journal file for pager pPager must be open. // This function attempts to read a super-journal file name from the // end of the file and, if successful, copies it into memory supplied // by the caller. See comments above writeSuperJournal() for the format // used to store a super-journal file name at the end of a journal file. // // zSuper must point to a buffer of at least nSuper bytes allocated by // the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is // enough space to write the super-journal name). If the super-journal // name in the journal is longer than nSuper bytes (including a // nul-terminator), then this is handled as if no super-journal name // were present in the journal. // // If a super-journal file name is present at the end of the journal // file, then it is copied into the buffer pointed to by zSuper. A // nul-terminator byte is appended to the buffer following the // super-journal file name. // // If it is determined that no super-journal file name is present // zSuper[0] is set to 0 and SQLITE_OK returned. // // If an error occurs while reading from the journal file, an SQLite // error code is returned. func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54517:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // Return code // var len U32 at bp+8, 4 // Length in bytes of super-journal name // var szJ I64 at bp, 8 // Total size in bytes of journal file pJrnl // var cksum U32 at bp+12, 4 // MJ checksum value read from journal var u U32 // Unsigned loop counter // var aMagic [8]uint8 at bp+16, 8 // A buffer to hold the magic header *(*int8)(unsafe.Pointer(zSuper)) = int8(0) if SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsFileSize(tls, pJrnl, bp)) || *(*I64)(unsafe.Pointer(bp)) < int64(16) || SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, pJrnl, *(*I64)(unsafe.Pointer(bp))-int64(16), bp+8)) || *(*U32)(unsafe.Pointer(bp + 8)) >= nSuper || I64(*(*U32)(unsafe.Pointer(bp + 8))) > *(*I64)(unsafe.Pointer(bp))-int64(16) || *(*U32)(unsafe.Pointer(bp + 8)) == U32(0) || SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, pJrnl, *(*I64)(unsafe.Pointer(bp))-int64(12), bp+12)) || SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsRead(tls, pJrnl, bp+16, 8, *(*I64)(unsafe.Pointer(bp))-int64(8))) || libc.Xmemcmp(tls, bp+16, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(8)) != 0 || SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsRead(tls, pJrnl, zSuper, int32(*(*U32)(unsafe.Pointer(bp + 8))), *(*I64)(unsafe.Pointer(bp))-int64(16)-I64(*(*U32)(unsafe.Pointer(bp + 8))))) { return rc } // See if the checksum matches the super-journal name for u = U32(0); u < *(*U32)(unsafe.Pointer(bp + 8 /* len */)); u++ { *(*U32)(unsafe.Pointer(bp + 12 /* cksum */)) -= U32(*(*int8)(unsafe.Pointer(zSuper + uintptr(u)))) } if *(*U32)(unsafe.Pointer(bp + 12)) != 0 { // If the checksum doesn't add up, then one or more of the disk sectors // containing the super-journal filename is corrupted. This means // definitely roll back, so just return SQLITE_OK and report a (nul) // super-journal filename. *(*U32)(unsafe.Pointer(bp + 8 /* len */)) = U32(0) } *(*int8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8 /* len */))))) = int8(0) *(*int8)(unsafe.Pointer(zSuper + uintptr(*(*U32)(unsafe.Pointer(bp + 8))+U32(1)))) = int8(0) return SQLITE_OK } // Return the offset of the sector boundary at or immediately // following the value in pPager->journalOff, assuming a sector // size of pPager->sectorSize bytes. // // i.e for a sector size of 512: // // Pager.journalOff Return value // --------------------------------------- // 0 0 // 512 512 // 100 512 // 2000 2048 // func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54573:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { offset = ((c-int64(1))/I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) + int64(1)) * I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) } return offset } // The journal file must be open when this function is called. // // This function is a no-op if the journal file has not been written to // within the current transaction (i.e. if Pager.journalOff==0). // // If doTruncate is non-zero or the Pager.journalSizeLimit variable is // set to 0, then truncate the journal file to zero bytes in size. Otherwise, // zero the 28-byte header at the start of the journal file. In either case, // if the pager is not in no-sync mode, sync the journal file immediately // after writing or truncating it. // // If Pager.journalSizeLimit is set to a positive, non-zero value, and // following the truncation or zeroing described above the size of the // journal file in bytes is larger than this value, then truncate the // journal file to Pager.journalSizeLimit bytes. The journal file does // not need to be synced following this operation. // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54606:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // Return code if (*Pager)(unsafe.Pointer(pPager)).FjournalOff != 0 { var iLimit I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit // Local cache of jsl if doTruncate != 0 || iLimit == int64(0) { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int64(0)) } else { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&zeroHdr)), int32(unsafe.Sizeof(zeroHdr)), int64(0)) } if rc == SQLITE_OK && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_DATAONLY|int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) } // At this point the transaction is committed but the write lock // is still held on the file. If there is a size limit configured for // the persistent journal and the journal file currently consumes more // space than that limit allows for, truncate it now. There is no need // to sync the file following this operation. if rc == SQLITE_OK && iLimit > int64(0) { // var sz I64 at bp, 8 rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iLimit { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iLimit) } } } return rc } var zeroHdr = [28]int8{0: int8(0)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54617:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the // current location. // // The format for the journal header is as follows: // - 8 bytes: Magic identifying journal format. // - 4 bytes: Number of records in journal, or -1 no-sync mode is on. // - 4 bytes: Random number used for page hash. // - 4 bytes: Initial database page count. // - 4 bytes: Sector size used by the process that wrote this journal. // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54656:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader var nWrite U32 // Bytes of header sector written var ii int32 // Loop counter // Journal file must be open. if nHeader > (*Pager)(unsafe.Pointer(pPager)).FsectorSize { nHeader = (*Pager)(unsafe.Pointer(pPager)).FsectorSize } // If there are active savepoints and any of them were created // since the most recent journal header was written, update the // PagerSavepoint.iHdrOffset fields now. for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { if (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FiHdrOffset == int64(0) { (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(ii)*56)).FiHdrOffset = (*Pager)(unsafe.Pointer(pPager)).FjournalOff } } (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = libc.AssignPtrInt64(pPager+96, journalHdrOffset(tls, pPager)) // Write the nRec Field - the number of page records that follow this // journal header. Normally, zero is written to this value at this time. // After the records are added to the journal (and the journal synced, // if in full-sync mode), the zero is overwritten with the true number // of records (see syncJournal()). // // A faster alternative is to write 0xFFFFFFFF to the nRec field. When // reading the journal this value tells SQLite to assume that the // rest of the journal file contains valid page records. This assumption // is dangerous, as if a failure occurred whilst writing to the journal // file it may contain some garbage data. There are two scenarios // where this risk can be ignored: // // * When the pager is in no-sync mode. Corruption can follow a // power failure in this case anyway. // // * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees // that garbage data is never appended to the journal file. if (*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 || int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_SAFE_APPEND != 0 { libc.Xmemcpy(tls, zHeader, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof(aJournalMagic))) Xsqlite3Put4byte(tls, zHeader+8, 0xffffffff) } else { libc.Xmemset(tls, zHeader, 0, uint64(unsafe.Sizeof(aJournalMagic))+uint64(4)) } // The random check-hash initializer Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), pPager+56) Xsqlite3Put4byte(tls, zHeader+12, (*Pager)(unsafe.Pointer(pPager)).FcksumInit) // The initial database size Xsqlite3Put4byte(tls, zHeader+16, (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize) // The assumed sector size for this process Xsqlite3Put4byte(tls, zHeader+20, (*Pager)(unsafe.Pointer(pPager)).FsectorSize) // The page size Xsqlite3Put4byte(tls, zHeader+24, uint32((*Pager)(unsafe.Pointer(pPager)).FpageSize)) // Initializing the tail of the buffer is not necessary. Everything // works find if the following memset() is omitted. But initializing // the memory prevents valgrind from complaining, so we are willing to // take the performance hit. libc.Xmemset(tls, zHeader+28, 0, uint64(nHeader)-(uint64(unsafe.Sizeof(aJournalMagic))+uint64(20))) // In theory, it is only necessary to write the 28 bytes that the // journal header consumes to the journal file here. Then increment the // Pager.journalOff variable by JOURNAL_HDR_SZ so that the next // record is written to the following sector (leaving a gap in the file // that will be implicitly filled in by the OS). // // However it has been discovered that on some systems this pattern can // be significantly slower than contiguously writing data to the file, // even if that means explicitly writing data to the block of // (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what // is done. // // The loop is required here in case the sector-size is larger than the // database page size. Since the zHeader buffer is only Pager.pageSize // bytes in size, more than one call to sqlite3OsWrite() may be required // to populate the entire journal header sector. for nWrite = U32(0); rc == SQLITE_OK && nWrite < (*Pager)(unsafe.Pointer(pPager)).FsectorSize; nWrite = nWrite + nHeader { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zHeader, int32(nHeader), (*Pager)(unsafe.Pointer(pPager)).FjournalOff) *(*I64)(unsafe.Pointer(pPager + 96)) += I64(nHeader) } return rc } // The journal file must be open when this is called. A journal header file // (JOURNAL_HDR_SZ bytes) is read from the current location in the journal // file. The current location in the journal file is given by // pPager->journalOff. See comments above function writeJournalHdr() for // a description of the journal header format. // // If the header is read successfully, *pNRec is set to the number of // page records following this header and *pDbSize is set to the size of the // database before the transaction began, in pages. Also, pPager->cksumInit // is set to the value read from the journal header. SQLITE_OK is returned // in this case. // // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54774:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // Return code // var aMagic [8]uint8 at bp, 8 // A buffer to hold the magic header var iHdrOff I64 // Offset of journal header being read // Journal file must be open. // Advance Pager.journalOff to the start of the next sector. If the // journal file is too small for there to be a header stored at this // point, return SQLITE_DONE. (*Pager)(unsafe.Pointer(pPager)).FjournalOff = journalHdrOffset(tls, pPager) if (*Pager)(unsafe.Pointer(pPager)).FjournalOff+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) > journalSize { return SQLITE_DONE } iHdrOff = (*Pager)(unsafe.Pointer(pPager)).FjournalOff // Read in the first 8 bytes of the journal header. If they do not match // the magic string found at the start of each journal header, return // SQLITE_DONE. If an IO error occurs, return an error code. Otherwise, // proceed. if isHot != 0 || iHdrOff != (*Pager)(unsafe.Pointer(pPager)).FjournalHdr { rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([8]uint8{})), iHdrOff) if rc != 0 { return rc } if libc.Xmemcmp(tls, bp, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof([8]uint8{}))) != 0 { return SQLITE_DONE } } // Read the first three 32-bit fields of the journal header: The nRec // field, the checksum-initializer and the database size at the start // of the transaction. Return an error code if anything goes wrong. if SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(8), pNRec)) || SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(12), pPager+56)) || SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(16), pDbSize)) { return rc } if (*Pager)(unsafe.Pointer(pPager)).FjournalOff == int64(0) { // var iPageSize U32 at bp+12, 4 // Page-size field of journal header // var iSectorSize U32 at bp+8, 4 // Sector-size field of journal header // Read the page-size and sector-size journal header fields. if SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(20), bp+8)) || SQLITE_OK != libc.AssignInt32(&rc, read32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(24), bp+12)) { return rc } // Versions of SQLite prior to 3.5.8 set the page-size field of the // journal header to zero. In this case, assume that the Pager.pageSize // variable is already set to the correct page size. if *(*U32)(unsafe.Pointer(bp + 12)) == U32(0) { *(*U32)(unsafe.Pointer(bp + 12 /* iPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) } // Check that the values read from the page-size and sector-size fields // are within range. To be 'in range', both values need to be a power // of two greater than or equal to 512 or 32, and not greater than their // respective compile time maximum limits. if *(*U32)(unsafe.Pointer(bp + 12)) < U32(512) || *(*U32)(unsafe.Pointer(bp + 8)) < U32(32) || *(*U32)(unsafe.Pointer(bp + 12)) > U32(SQLITE_MAX_PAGE_SIZE) || *(*U32)(unsafe.Pointer(bp + 8)) > U32(MAX_SECTOR_SIZE) || (*(*U32)(unsafe.Pointer(bp + 12))-U32(1))&*(*U32)(unsafe.Pointer(bp + 12)) != U32(0) || (*(*U32)(unsafe.Pointer(bp + 8))-U32(1))&*(*U32)(unsafe.Pointer(bp + 8)) != U32(0) { // If the either the page-size or sector-size in the journal-header is // invalid, then the process that wrote the journal-header must have // crashed before the header was synced. In this case stop reading // the journal file here. return SQLITE_DONE } // Update the page-size to match the value read from the journal. // Use a testcase() macro to make sure that malloc failure within // PagerSetPagesize() is tested. rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+12, -1) // Update the assumed sector-size to match the value used by // the process that created this journal. If this journal was // created by a process other than this one, then this routine // is being called from within pager_playback(). The local value // of Pager.sectorSize is restored at the end of that routine. (*Pager)(unsafe.Pointer(pPager)).FsectorSize = *(*U32)(unsafe.Pointer(bp + 8 /* iSectorSize */)) } *(*I64)(unsafe.Pointer(pPager + 96)) += I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) return rc } // Write the supplied super-journal name into the journal file for pager // pPager at the current location. The super-journal name must be the last // thing written to a journal file. If the pager is in full-sync mode, the // journal file descriptor is advanced to the next sector boundary before // anything is written. The format is: // // + 4 bytes: PAGER_MJ_PGNO. // + N bytes: super-journal filename in utf-8. // + 4 bytes: N (length of super-journal name in bytes, no nul-terminator). // + 4 bytes: super-journal name checksum. // + 8 bytes: aJournalMagic[]. // // The super-journal page checksum is the sum of the bytes in thesuper-journal // name, where each byte is interpreted as a signed 8-bit integer. // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54899:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // Return code var nSuper int32 // Length of string zSuper var iHdrOff I64 // Offset of header in journal file // var jrnlSize I64 at bp, 8 // Size of journal file on disk var cksum U32 = U32(0) // Checksum of string zSuper if !(zSuper != 0) || int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { return SQLITE_OK } (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(1) // Calculate the length in bytes and the checksum of zSuper for nSuper = 0; *(*int8)(unsafe.Pointer(zSuper + uintptr(nSuper))) != 0; nSuper++ { cksum = cksum + U32(*(*int8)(unsafe.Pointer(zSuper + uintptr(nSuper)))) } // If in full-sync mode, advance to the next disk sector before writing // the super-journal name. This is in case the previous page written to // the journal has already been synced. if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { (*Pager)(unsafe.Pointer(pPager)).FjournalOff = journalHdrOffset(tls, pPager) } iHdrOff = (*Pager)(unsafe.Pointer(pPager)).FjournalOff // Write the super-journal data to the end of the journal file. If // an error occurs, return the error code to the caller. if 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff, Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)))) || 0 != libc.AssignInt32(&rc, Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, nSuper, iHdrOff+int64(4))) || 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(4)+I64(nSuper), uint32(nSuper))) || 0 != libc.AssignInt32(&rc, write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iHdrOff+int64(4)+I64(nSuper)+int64(4), cksum)) || 0 != libc.AssignInt32(&rc, Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&aJournalMagic)), 8, iHdrOff+int64(4)+I64(nSuper)+int64(8))) { return rc } *(*I64)(unsafe.Pointer(pPager + 96)) += I64(nSuper + 20) // If the pager is in peristent-journal mode, then the physical // journal-file may extend past the end of the super-journal name // and 8 bytes of magic data just written to the file. This is // dangerous because the code to rollback a hot-journal file // will not be able to find the super-journal name to determine // whether or not the journal is hot. // // Easiest thing to do in this scenario is to truncate the journal // file to the required size. if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp)) && *(*I64)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FjournalOff { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, (*Pager)(unsafe.Pointer(pPager)).FjournalOff) } return rc } // Discard the entire contents of the in-memory page-cache. func pager_reset(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54967:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54976:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:54985:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) } if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) || Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) != 0 { Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) } Xsqlite3_free(tls, (*Pager)(unsafe.Pointer(pPager)).FaSavepoint) (*Pager)(unsafe.Pointer(pPager)).FaSavepoint = uintptr(0) (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = 0 (*Pager)(unsafe.Pointer(pPager)).FnSubRec = U32(0) } // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55004:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { var p uintptr = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(ii)*56 if pgno <= (*PagerSavepoint)(unsafe.Pointer(p)).FnOrig { rc = rc | Xsqlite3BitvecSet(tls, (*PagerSavepoint)(unsafe.Pointer(p)).FpInSavepoint, pgno) } } return rc } // This function is a no-op if the pager is in exclusive mode and not // in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN // state. // // If the pager is not in exclusive-access mode, the database file is // completely unlocked. If the file is unlocked and the file-system does // not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is // closed (if it is open). // // If the pager is in ERROR state when this function is called, the // contents of the pager cache are discarded before switching back to // the OPEN state. Regardless of whether the pager is in exclusive-mode // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). func pager_unlock(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55036:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) releaseAllSavepoints(tls, pPager) if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { Xsqlite3WalEndReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) } else if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { var rc int32 // Error code returned by pagerUnlockDb() var iDc int32 if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { iDc = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) } else { iDc = 0 } // If the operating system support deletion of open files, then // close the journal file when dropping the database lock. Otherwise // another connection with journal_mode=delete might delete the file // out from under us. if 0 == iDc&SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN || 1 != int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode)&5 { Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) } // If the pager is in the ERROR state and the call to unlock the database // file fails, set the current lock to UNKNOWN_LOCK. See the comment // above the #define for UNKNOWN_LOCK for an explanation of why this // is necessary. rc = pagerUnlockDb(tls, pPager, NO_LOCK) if rc != SQLITE_OK && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_ERROR { (*Pager)(unsafe.Pointer(pPager)).FeLock = U8(EXCLUSIVE_LOCK + 1) } // The pager state may be changed from PAGER_ERROR to PAGER_OPEN here // without clearing the error code. This is intentional - the error // code is cleared and the cache reset in the block below. (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) } // If Pager.errCode is set, the contents of the pager cache cannot be // trusted. Now that there are no outstanding references to the pager, // it can safely move back to PAGER_OPEN state. This happens in both // normal and exclusive-locking mode. if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(0) (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) } else { (*Pager)(unsafe.Pointer(pPager)).FeState = func() uint8 { if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { return uint8(PAGER_OPEN) } return uint8(PAGER_READER) }() } if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) } (*Pager)(unsafe.Pointer(pPager)).FerrCode = SQLITE_OK setGetterMethod(tls, pPager) } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = int64(0) (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) } // This function is called whenever an IOERR or FULL error that requires // the pager to transition into the ERROR state may ahve occurred. // The first argument is a pointer to the pager structure, the second // the error-code about to be returned by a pager API function. The // value returned is a copy of the second argument to this function. // // If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the // IOERR sub-codes, the pager enters the ERROR state and the error code // is stored in Pager.errCode. While the pager remains in the ERROR state, // all major API calls on the Pager will immediately return Pager.errCode. // // The ERROR state indicates that the contents of the pager-cache // cannot be trusted. This state can be cleared by completely discarding // the contents of the pager-cache. If a transaction was active when // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55133:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { (*Pager)(unsafe.Pointer(pPager)).FerrCode = rc (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_ERROR) setGetterMethod(tls, pPager) } return rc } // The write transaction open on pPager is being committed (bCommit==1) // or rolled back (bCommit==0). // // Return TRUE if and only if all dirty pages should be flushed to disk. // // Rules: // // * For non-TEMP databases, always sync to disk. This is necessary // for transactions to be durable. // // * Sync TEMP database only on a COMMIT (not a ROLLBACK) when the backing // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55167:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } if !(bCommit != 0) { return 0 } if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) { return 0 } return libc.Bool32(Xsqlite3PCachePercentDirty(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) >= 25) } // This routine ends a transaction. A transaction is usually ended by // either a COMMIT or a ROLLBACK operation. This routine may be called // after rollback of a hot-journal, or if an error occurs while opening // the journal file or writing the very first journal-header of a // database transaction. // // This routine is never called in PAGER_ERROR state. If it is called // in PAGER_NONE or PAGER_SHARED state and the lock held is less // exclusive than a RESERVED lock, it is a no-op. // // Otherwise, any active savepoints are released. // // If the journal file is open, then it is "finalized". Once a journal // file has been finalized it is not possible to use it to roll back a // transaction. Nor will it be considered to be a hot-journal by this // or any other database connection. Exactly how a journal is finalized // depends on whether or not the pager is running in exclusive mode and // the current journal-mode (Pager.journalMode value), as follows: // // journalMode==MEMORY // Journal file descriptor is simply closed. This destroys an // in-memory journal. // // journalMode==TRUNCATE // Journal file is truncated to zero bytes in size. // // journalMode==PERSIST // The first 28 bytes of the journal file are zeroed. This invalidates // the first journal header in the file, and hence the entire journal // file. An invalid journal file cannot be rolled back. // // journalMode==DELETE // The journal file is closed and deleted using sqlite3OsDelete(). // // If the pager is running in exclusive mode, this method of finalizing // the journal file is never used. Instead, if the journalMode is // DELETE and the pager is in exclusive mode, the method described under // journalMode==PERSIST is used instead. // // After the journal is finalized, the pager moves to PAGER_READER state. // If running in non-exclusive rollback mode, the lock on the file is // downgraded to a SHARED_LOCK. // // SQLITE_OK is returned if no error occurs. If an error occurs during // any of the IO operations to finalize the journal file or unlock the // database then the IO error code is returned to the user. If the // operation to finalize the journal file fails, then the code still // tries to unlock the database file if not in exclusive mode. If the // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55227:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation // Do nothing if the pager does not have an open write transaction // or at least a RESERVED lock. This function may be called when there // is no write-transaction active but a RESERVED or greater lock is // held under two circumstances: // // 1. After a successful hot-journal rollback, it is called with // eState==PAGER_NONE and eLock==EXCLUSIVE_LOCK. // // 2. If a connection with locking_mode=exclusive holding an EXCLUSIVE // lock switches back to locking_mode=normal and then executes a // read-transaction, this function is called with eState==PAGER_READER // and eLock==EXCLUSIVE_LOCK when the read-transaction is closed. if int32((*Pager)(unsafe.Pointer(pPager)).FeState) < PAGER_WRITER_LOCKED && int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < RESERVED_LOCK { return SQLITE_OK } releaseAllSavepoints(tls, pPager) if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { // Finalize the journal file. if Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) != 0 { // assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ); Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_TRUNCATE { if (*Pager)(unsafe.Pointer(pPager)).FjournalOff == int64(0) { rc = SQLITE_OK } else { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int64(0)) if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { // Make sure the new file size is written into the inode right away. // Otherwise the journal might resurrect following a power loss and // cause the last transaction to roll back. See // https://bugzilla.mozilla.org/show_bug.cgi?id=1072773 rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) } } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_PERSIST || (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_WAL { rc = zeroJournalHdr(tls, pPager, libc.Bool32(hasSuper != 0 || (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0)) (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) } else { // This branch may be executed with Pager.journalMode==MEMORY if // a hot-journal was just rolled back. In this case the journal // file should be closed and deleted. If this connection writes to // the database file, it will do so using an in-memory journal. var bDelete int32 = libc.BoolInt32(!((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0)) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) if bDelete != 0 { rc = Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, int32((*Pager)(unsafe.Pointer(pPager)).FextraSync)) } } } Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 if rc == SQLITE_OK { if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 || pagerFlushOnCommit(tls, pPager, bCommit) != 0 { Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } else { Xsqlite3PcacheClearWritable(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } Xsqlite3PcacheTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, (*Pager)(unsafe.Pointer(pPager)).FdbSize) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { // Drop the WAL write-lock, if any. Also, if the connection was in // locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE // lock held on the database file. rc2 = Xsqlite3WalEndWriteTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } else if rc == SQLITE_OK && bCommit != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbFileSize > (*Pager)(unsafe.Pointer(pPager)).FdbSize { // This branch is taken when committing a transaction in rollback-journal // mode if the database file on disk is larger than the database image. // At this point the journal has been finalized and the transaction // successfully committed, but the EXCLUSIVE lock is still held on the // file. So it is safe to truncate the database file to its minimum // required size. rc = pager_truncate(tls, pPager, (*Pager)(unsafe.Pointer(pPager)).FdbSize) } if rc == SQLITE_OK && bCommit != 0 { rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_COMMIT_PHASETWO, uintptr(0)) if rc == SQLITE_NOTFOUND { rc = SQLITE_OK } } if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) && (!((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) || Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, 0) != 0) { rc2 = pagerUnlockDb(tls, pPager, SHARED_LOCK) } (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) return func() int32 { if rc == SQLITE_OK { return rc2 } return rc }() } // Execute a rollback if a transaction is active and unlock the // database file. // // If the pager has already entered the ERROR state, do not attempt // the rollback at this time. Instead, pager_unlock() is called. The // call to pager_unlock() will discard all in-memory pages, unlock // the database file and move the pager back to OPEN state. If this // means that there is a hot-journal left in the file-system, the next // connection to obtain a shared lock on the pager (which may be this one) // will roll it back. // // If the pager has not already entered the ERROR state, but an IO or // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55374:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { Xsqlite3BeginBenignMalloc(tls) Xsqlite3PagerRollback(tls, pPager) Xsqlite3EndBenignMalloc(tls) } else if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { pager_end_transaction(tls, pPager, 0, 0) } } pager_unlock(tls, pPager) } // Parameter aData must point to a buffer of pPager->pageSize bytes // of data. Compute and return a checksum based ont the contents of the // page of data and the current value of pPager->cksumInit. // // This is not a real checksum. It is really just the sum of the // random initial value (pPager->cksumInit) and every 200th byte // of the page data, starting with byte offset (pPager->pageSize%200). // Each byte is interpreted as an 8-bit unsigned integer. // // Changing the formula used to compute this checksum results in an // incompatible journal file format. // // If journal corruption occurs due to a power failure, the most likely // scenario is that one end or the other of the record will be changed. // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55408:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { cksum = cksum + U32(*(*U8)(unsafe.Pointer(aData + uintptr(i)))) i = i - 200 } return cksum } // Read a single page from either the journal file (if isMainJrnl==1) or // from the sub-journal (if isMainJrnl==0) and playback that page. // The page begins at offset *pOffset into the file. The *pOffset // value is increased to the start of the next page in the journal. // // The main rollback journal uses checksums - the statement journal does // not. // // If the page number of the page record read from the (sub-)journal file // is greater than the current value of Pager.dbSize, then playback is // skipped and SQLITE_OK is returned. // // If pDone is not NULL, then it is a record of pages that have already // been played back. If the page at *pOffset has already been played back // (if the corresponding pDone bit is set) then skip the playback. // Make sure the pDone bit corresponding to the *pOffset page is set // prior to returning. // // If the page record is successfully read from the (sub-)journal file // and played back, then SQLITE_OK is returned. If an IO error occurs // while reading the record from the (sub-)journal file or while writing // to the database file, then the IO error code is returned. If data // is successfully read from the (sub-)journal file but appears to be // corrupted, SQLITE_DONE is returned. Data is considered corrupted in // two circumstances: // // * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or // * If the record is being rolled back from the main journal file // and the checksum field does not match the record content. // // Neither of these two scenarios are possible during a savepoint rollback. // // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55455:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // var pPg uintptr at bp+8, 8 // An existing page in the cache // var pgno Pgno at bp, 4 // The page number of a page in journal // var cksum U32 at bp+4, 4 // Checksum used for sanity checking var aData uintptr // Temporary storage for the page var jfd uintptr // The file descriptor for the journal file var isSynced int32 // True if journal page is synced // isMainJrnl is 0 or 1 // isSavepnt is 0 or 1 // pDone always used on sub-journals // pDone never used on non-savepoint aData = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temp storage must have already been allocated // Either the state is greater than PAGER_WRITER_CACHEMOD (a transaction // or savepoint rollback done at the request of the caller) or this is // a hot-journal rollback. If it is a hot-journal rollback, the pager // is in state OPEN and holds an EXCLUSIVE lock. Hot-journal rollback // only reads from the main journal, not the sub-journal. // Read the page number and page data from the journal or sub-journal // file. Return an error code to the caller if an IO error occurs. if isMainJrnl != 0 { jfd = (*Pager)(unsafe.Pointer(pPager)).Fjfd } else { jfd = (*Pager)(unsafe.Pointer(pPager)).Fsjfd } rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset)), bp) if rc != SQLITE_OK { return rc } rc = Xsqlite3OsRead(tls, jfd, aData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), *(*I64)(unsafe.Pointer(pOffset))+int64(4)) if rc != SQLITE_OK { return rc } *(*I64)(unsafe.Pointer(pOffset)) += (*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(4) + I64(isMainJrnl*4) // Sanity checking on the page. This is more important that I originally // thought. If a power failure occurs while the journal is being written, // it could cause invalid data to be written into the journal. We need to // detect this invalid data (with high probability) and ignore it. if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(0) || *(*Pgno)(unsafe.Pointer(bp)) == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)) { return SQLITE_DONE } if *(*Pgno)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FdbSize || Xsqlite3BitvecTest(tls, pDone, *(*Pgno)(unsafe.Pointer(bp))) != 0 { return SQLITE_OK } if isMainJrnl != 0 { rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset))-int64(4), bp+4) if rc != 0 { return rc } if !(isSavepnt != 0) && pager_cksum(tls, pPager, aData) != *(*U32)(unsafe.Pointer(bp + 4)) { return SQLITE_DONE } } // If this page has already been played back before during the current // rollback, then don't bother to play it back again. if pDone != 0 && libc.AssignInt32(&rc, Xsqlite3BitvecSet(tls, pDone, *(*Pgno)(unsafe.Pointer(bp)))) != SQLITE_OK { return rc } // When playing back page 1, restore the nReserve setting if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(1) && int32((*Pager)(unsafe.Pointer(pPager)).FnReserve) != int32(*(*U8)(unsafe.Pointer(aData + 20))) { (*Pager)(unsafe.Pointer(pPager)).FnReserve = I16(*(*U8)(unsafe.Pointer(aData + 20))) } // If the pager is in CACHEMOD state, then there must be a copy of this // page in the pager cache. In this case just update the pager cache, // not the database file. The page is left marked dirty in this case. // // An exception to the above rule: If the database is in no-sync mode // and a page is moved during an incremental vacuum then the page may // not be in the pager cache. Later: if a malloc() or IO error occurs // during a Movepage() call, then the page may not be in the cache // either. So the condition described in the above paragraph is not // assert()able. // // If in WRITER_DBMOD, WRITER_FINISHED or OPEN state, then we update the // pager cache if it exists and the main file. The page is then marked // not dirty. Since this code is only executed in PAGER_OPEN state for // a hot-journal rollback, it is guaranteed that the page-cache is empty // if the pager is in OPEN state. // // Ticket #1171: The statement journal might contain page content that is // different from the page content at the start of the transaction. // This occurs when a page is changed prior to the start of a statement // then changed again within the statement. When rolling back such a // statement we must not write to the original database unless we know // for certain that original page contents are synced into the main rollback // journal. Otherwise, a power loss might leave modified data in the // database file without an entry in the rollback journal that can // restore the database to its original form. Two conditions must be // met before writing to the database files. (1) the database must be // locked. (2) we know that the original page content is fully synced // in the main journal either because the page is not in cache or else // the page is marked as needSync==0. // // 2008-04-14: When attempting to vacuum a corrupt database file, it // is possible to fail a statement on a database that does not yet exist. // Do not attempt to write if database file has never been opened. if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)) = Xsqlite3PagerLookup(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */))) } if isMainJrnl != 0 { isSynced = libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 || *(*I64)(unsafe.Pointer(pOffset)) <= (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) } else { isSynced = libc.Bool32(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) || 0 == int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).Fflags)&PGHDR_NEED_SYNC) } if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) && isSynced != 0 { var ofst I64 = I64(*(*Pgno)(unsafe.Pointer(bp))-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize // Write the data read from the journal back into the database file. // This is usually safe even for an encrypted database - as the data // was encrypted before it was written to the journal file. The exception // is if the data was just read from an in-memory sub-journal. In that // case it must be encrypted here before it is copied into the database // file. rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, aData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), ofst) if *(*Pgno)(unsafe.Pointer(bp)) > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize { (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = *(*Pgno)(unsafe.Pointer(bp /* pgno */)) } if (*Pager)(unsafe.Pointer(pPager)).FpBackup != 0 { Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), aData) } } else if !(isMainJrnl != 0) && *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) { // If this is a rollback of a savepoint and data was not written to // the database and the page is not in-memory, there is a potential // problem. When the page is next fetched by the b-tree layer, it // will be read from the database file, which may or may not be // current. // // There are a couple of different ways this can happen. All are quite // obscure. When running in synchronous mode, this can only happen // if the page is on the free-list at the start of the transaction, then // populated, then moved using sqlite3PagerMovepage(). // // The solution is to add an in-memory page to the cache containing // the data just read from the sub-journal. Mark the page as dirty // and if the pager requires a journal-sync, then mark the page as // requiring a journal-sync before it is written. *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_ROLLBACK) rc = Xsqlite3PagerGet(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), bp+8, 1) *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_ROLLBACK)) if rc != SQLITE_OK { return rc } Xsqlite3PcacheMakeDirty(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) } if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { // No page should ever be explicitly rolled back that is in use, except // for page 1 which is held in use in order to keep the lock on the // database active. However such a page may be rolled back as a result // of an internal error resulting in an automatic call to // sqlite3PagerRollback(). var pData uintptr pData = (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)))).FpData libc.Xmemcpy(tls, pData, aData, uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize)) (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) // It used to be that sqlite3PcacheMakeClean(pPg) was called here. But // that call was dangerous and had no detectable benefit since the cache // is normally cleaned by sqlite3PcacheCleanAll() after rollback and so // has been removed. // If this was page 1, then restore the value of Pager.dbFileVers. // Do this before any decoding. if *(*Pgno)(unsafe.Pointer(bp)) == Pgno(1) { libc.Xmemcpy(tls, pPager+136, pData+24, uint64(unsafe.Sizeof([16]int8{}))) } Xsqlite3PcacheRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) } return rc } // Parameter zSuper is the name of a super-journal file. A single journal // file that referred to the super-journal file has just been rolled back. // This routine checks if it is possible to delete the super-journal file, // and does so if it is. // // Argument zSuper may point to Pager.pTmpSpace. So that buffer is not // available for use within this function. // // When a super-journal file is created, it is populated with the names // of all of its child journals, one after another, formatted as utf-8 // encoded text. The end of each child journal file is marked with a // nul-terminator byte (0x00). i.e. the entire contents of a super-journal // file for a transaction involving two databases might be: // // "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00" // // A super-journal file may only be deleted once all of its child // journals have been rolled back. // // This function reads the contents of the super-journal file into // memory and loops through each of the child journal names. For // each child journal, it checks if: // // * if the child journal exists, and if so // * if the child journal contains a reference to super-journal // file zSuper // // If a child journal can be found that matches both of the criteria // above, this function returns without doing anything. Otherwise, if // no such child journal can be found, file zSuper is deleted from // the file-system using sqlite3OsDelete(). // // If an IO error within this function, an error code is returned. This // function allocates memory by calling sqlite3Malloc(). If an allocation // fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors // occur, SQLITE_OK is returned. // // TODO: This function allocates a single block of memory to load // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55702:12: */ bp := tls.Alloc(12) defer tls.Free(12) var pVfs uintptr var rc int32 // Return code var pSuper uintptr // Malloc'd super-journal file descriptor var pJournal uintptr // Malloc'd child-journal file descriptor var zSuperJournal uintptr // Contents of super-journal file // var nSuperJournal I64 at bp, 8 // Size of super-journal file var zJournal uintptr // Pointer to one journal within MJ file var zSuperPtr uintptr // Space to hold super-journal filename var zFree uintptr // Free this buffer var nSuperPtr int32 var flags int32 // One of the journals pointed to by the super-journal exists. // Open it and check if it points at the super-journal. If // so, return without deleting the super-journal file. // NB: zJournal is really a MAIN_JOURNAL. But call it a // SUPER_JOURNAL here so that the VFS will not send the zJournal // name into sqlite3_database_file_object(). var c int32 var flags1 int32 // var exists int32 at bp+8, 4 pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs zSuperJournal = uintptr(0) zFree = uintptr(0) // Amount of space allocated to zSuperPtr[] // Allocate space for both the pJournal and pSuper file descriptors. // If successful, open the super-journal file for reading. pSuper = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile*2)) if !!(pSuper != 0) { goto __1 } rc = SQLITE_NOMEM pJournal = uintptr(0) goto __2 __1: flags = SQLITE_OPEN_READONLY | SQLITE_OPEN_SUPER_JOURNAL rc = Xsqlite3OsOpen(tls, pVfs, zSuper, pSuper, flags, uintptr(0)) pJournal = pSuper + uintptr((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile) __2: ; if !(rc != SQLITE_OK) { goto __3 } goto delsuper_out __3: ; // Load the entire super-journal file into space obtained from // sqlite3_malloc() and pointed to by zSuperJournal. Also obtain // sufficient space (in zSuperPtr) to hold the names of super-journal // files extracted from regular rollback-journals. rc = Xsqlite3OsFileSize(tls, pSuper, bp) if !(rc != SQLITE_OK) { goto __4 } goto delsuper_out __4: ; nSuperPtr = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 zFree = Xsqlite3Malloc(tls, uint64(int64(4)+*(*I64)(unsafe.Pointer(bp))+I64(nSuperPtr)+int64(2))) if !!(zFree != 0) { goto __5 } rc = SQLITE_NOMEM goto delsuper_out __5: ; *(*int8)(unsafe.Pointer(zFree)) = libc.AssignPtrInt8(zFree+1, libc.AssignPtrInt8(zFree+2, libc.AssignPtrInt8(zFree+3, int8(0)))) zSuperJournal = zFree + 4 zSuperPtr = zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp))+int64(2)) rc = Xsqlite3OsRead(tls, pSuper, zSuperJournal, int32(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))), int64(0)) if !(rc != SQLITE_OK) { goto __6 } goto delsuper_out __6: ; *(*int8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp /* nSuperJournal */))))) = int8(0) *(*int8)(unsafe.Pointer(zSuperJournal + uintptr(*(*I64)(unsafe.Pointer(bp))+int64(1)))) = int8(0) zJournal = zSuperJournal __7: if !((int64(zJournal)-int64(zSuperJournal))/1 < *(*I64)(unsafe.Pointer(bp))) { goto __8 } rc = Xsqlite3OsAccess(tls, pVfs, zJournal, SQLITE_ACCESS_EXISTS, bp+8) if !(rc != SQLITE_OK) { goto __9 } goto delsuper_out __9: ; if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { goto __10 } flags1 = SQLITE_OPEN_READONLY | SQLITE_OPEN_SUPER_JOURNAL rc = Xsqlite3OsOpen(tls, pVfs, zJournal, pJournal, flags1, uintptr(0)) if !(rc != SQLITE_OK) { goto __11 } goto delsuper_out __11: ; rc = readSuperJournal(tls, pJournal, zSuperPtr, uint32(nSuperPtr)) Xsqlite3OsClose(tls, pJournal) if !(rc != SQLITE_OK) { goto __12 } goto delsuper_out __12: ; c = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuperPtr))) != 0 && libc.Xstrcmp(tls, zSuperPtr, zSuper) == 0) if !(c != 0) { goto __13 } // We have a match. Do not delete the super-journal file. goto delsuper_out __13: ; __10: ; zJournal += uintptr(Xsqlite3Strlen30(tls, zJournal) + 1) goto __7 __8: ; Xsqlite3OsClose(tls, pSuper) rc = Xsqlite3OsDelete(tls, pVfs, zSuper, 0) delsuper_out: Xsqlite3_free(tls, zFree) if !(pSuper != 0) { goto __14 } Xsqlite3OsClose(tls, pSuper) Xsqlite3_free(tls, pSuper) __14: ; return rc } // This function is used to change the actual size of the database // file in the file-system. This only happens when committing a transaction, // or rolling back a transaction (including rolling back a hot-journal). // // If the main database file is not open, or the pager is not in either // DBMOD or OPEN state, this function is a no-op. Otherwise, the size // of the file is changed to nPage pages (nPage*pPager->pageSize bytes). // If the file on disk is currently larger than nPage pages, then use the VFS // xTruncate() method to truncate it. // // Or, it might be the case that the file on disk is smaller than // nPage pages. Some operating system implementations can get confused if // you try to truncate a file to some size that is larger than it // currently is, so detect this case and write a single zero byte to // the end of the new file instead. // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55820:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) { // var currentSize I64 at bp, 8 var newSize I64 var szPage int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // TODO: Is it safe to use Pager.dbFileSize here? rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) newSize = I64(szPage) * I64(nPage) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) != newSize { if *(*I64)(unsafe.Pointer(bp)) > newSize { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, newSize) } else if *(*I64)(unsafe.Pointer(bp))+I64(szPage) <= newSize { var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace libc.Xmemset(tls, pTmp, 0, uint64(szPage)) rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pTmp, szPage, newSize-I64(szPage)) } if rc == SQLITE_OK { (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = nPage } } } return rc } // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55856:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 } else if iRet > MAX_SECTOR_SIZE { iRet = MAX_SECTOR_SIZE } return iRet } // Set the value of the Pager.sectorSize variable for the given // pager based on the value returned by the xSectorSize method // of the open database file. The sector size will be used // to determine the size and alignment of journal header and // super-journal pointers within created journal files. // // For temporary files the effective sector size is always 512 bytes. // // Otherwise, for non-temporary files, the effective sector size is // the value returned by the xSectorSize() method rounded up to 32 if // it is less than 32, or rounded down to MAX_SECTOR_SIZE if it // is greater than MAX_SECTOR_SIZE. // // If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set // the effective sector size to its minimum value (512). The purpose of // pPager->sectorSize is to define the "blast radius" of bytes that // might change if a crash occurs while writing to a single byte in // that range. But with POWERSAFE_OVERWRITE, the blast radius is zero // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. func setSectorSize(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55890:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { // Sector size doesn't matter for temporary files. Also, the file // may not have been opened yet, in which case the OsSectorSize() // call will segfault. (*Pager)(unsafe.Pointer(pPager)).FsectorSize = U32(512) } else { (*Pager)(unsafe.Pointer(pPager)).FsectorSize = U32(Xsqlite3SectorSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)) } } // Playback the journal and thus restore the database file to // the state it was in before we started making changes. // // The journal file format is as follows: // // (1) 8 byte prefix. A copy of aJournalMagic[]. // (2) 4 byte big-endian integer which is the number of valid page records // in the journal. If this value is 0xffffffff, then compute the // number of page records from the journal size. // (3) 4 byte big-endian integer which is the initial value for the // sanity checksum. // (4) 4 byte integer which is the number of pages to truncate the // database to during a rollback. // (5) 4 byte big-endian integer which is the sector size. The header // is this many bytes in size. // (6) 4 byte big-endian integer which is the page size. // (7) zero padding out to the next sector size. // (8) Zero or more pages instances, each as follows: // + 4 byte page number. // + pPager->pageSize bytes of data. // + 4 byte checksum // // When we speak of the journal header, we mean the first 7 items above. // Each entry in the journal is an instance of the 8th item. // // Call the value from the second bullet "nRec". nRec is the number of // valid page entries in the journal. In most cases, you can compute the // value of nRec from the size of the journal file. But if a power // failure occurred while the journal was being written, it could be the // case that the size of the journal file had already been increased but // the extra entries had not yet made it safely to disk. In such a case, // the value of nRec computed from the file size would be too large. For // that reason, we always use the nRec value in the header. // // If the nRec value is 0xffffffff it means that nRec should be computed // from the file size. This value is used when the user selects the // no-sync option for the journal. A power failure could lead to corruption // in this case. But for things like temporary table (which will be // deleted when the power is restored) we don't care. // // If the file opened as the journal file is not a well-formed // journal file then all pages up to the first corrupted page are rolled // back (or no pages if the journal header is corrupted). The journal file // is then deleted and SQLITE_OK returned, just as if no corruption had // been encountered. // // If an I/O or malloc() error occurs, the journal-file is not deleted // and an error code is returned. // // The isHot parameter indicates that we are trying to rollback a journal // that might be a hot journal. Or, it could be that the journal is // preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE. // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:55963:12: */ bp := tls.Alloc(40) defer tls.Free(40) var pVfs uintptr // var szJ I64 at bp+16, 8 // Size of the journal file in bytes // var nRec U32 at bp+28, 4 // Number of Records in the journal var u U32 // Unsigned loop counter // var mxPg Pgno at bp+32, 4 // Size of the original file in pages var rc int32 // Result code of a subroutine // var res int32 at bp+24, 4 // Value returned by sqlite3OsAccess() var zSuper uintptr // Name of super-journal file if any var needPagerReset int32 // True to reset page prior to first page rollback var nPlayback int32 // Total number of pages restored from journal // var savedPageSize U32 at bp+36, 4 pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) = Pgno(0) *(*int32)(unsafe.Pointer(bp + 24 /* res */)) = 1 zSuper = uintptr(0) nPlayback = 0 *(*U32)(unsafe.Pointer(bp + 36 /* savedPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Figure out how many records are in the journal. Abort early if // the journal is empty. rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16) if !(rc != SQLITE_OK) { goto __1 } goto end_playback __1: ; // Read the super-journal name from the journal, if it is present. // If a super-journal file name is specified, but the file is not // present on disk, then the journal is not hot and does not need to be // played back. // // TODO: Technically the following is an error because it assumes that // buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that // (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c, // mxPathname is 512, which is the same as the minimum allowable value // for pageSize. zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0) { goto __2 } rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24) __2: ; zSuper = uintptr(0) if !(rc != SQLITE_OK || !(*(*int32)(unsafe.Pointer(bp + 24)) != 0)) { goto __3 } goto end_playback __3: ; (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) needPagerReset = isHot // This loop terminates either when a readJournalHdr() or // pager_playback_one_page() call returns SQLITE_DONE or an IO error // occurs. __4: if !(1 != 0) { goto __5 } // Read the next journal header from the journal file. If there are // not enough bytes left in the journal file for a complete header, or // it is corrupted, then a process must have failed while writing it. // This indicates nothing more needs to be rolled back. rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)), bp+28, bp+32) if !(rc != SQLITE_OK) { goto __6 } if !(rc == SQLITE_DONE) { goto __7 } rc = SQLITE_OK __7: ; goto end_playback __6: ; // If nRec is 0xffffffff, then this journal was created by a process // working in no-sync mode. This means that the rest of the journal // file consists of pages, there are no more journal headers. Compute // the value of nRec based on this assumption. if !(*(*U32)(unsafe.Pointer(bp + 28)) == 0xffffffff) { goto __8 } *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32(int32((*(*I64)(unsafe.Pointer(bp + 16)) - I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize)) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8)))) __8: ; // If nRec is 0 and this rollback is of a transaction created by this // process and if this is the final header in the journal, then it means // that this part of the journal was being filled but has not yet been // synced to disk. Compute the number of pages based on the remaining // size of the file. // // The third term of the test was added to fix ticket #2565. // When rolling back a hot journal, nRec==0 always means that the next // chunk of the journal contains zero pages to be rolled back. But // when doing a ROLLBACK and the nRec==0 chunk is the last chunk in // the journal, it means that the journal might contain additional // pages that need to be rolled back and that the number of pages // should be computed based on the journal file size. if !(*(*U32)(unsafe.Pointer(bp + 28)) == U32(0) && !(isHot != 0) && (*Pager)(unsafe.Pointer(pPager)).FjournalHdr+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff) { goto __9 } *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32(int32((*(*I64)(unsafe.Pointer(bp + 16)) - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8)))) __9: ; // If this is the first header read from the journal, truncate the // database file back to its original size. if !((*Pager)(unsafe.Pointer(pPager)).FjournalOff == I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize)) { goto __10 } rc = pager_truncate(tls, pPager, *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */))) if !(rc != SQLITE_OK) { goto __11 } goto end_playback __11: ; (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) if !((*Pager)(unsafe.Pointer(pPager)).FmxPgno < *(*Pgno)(unsafe.Pointer(bp + 32))) { goto __12 } (*Pager)(unsafe.Pointer(pPager)).FmxPgno = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) __12: ; __10: ; // Copy original pages out of the journal and back into the // database file and/or page cache. u = U32(0) __13: if !(u < *(*U32)(unsafe.Pointer(bp + 28))) { goto __15 } if !(needPagerReset != 0) { goto __16 } pager_reset(tls, pPager) needPagerReset = 0 __16: ; rc = pager_playback_one_page(tls, pPager, pPager+96, uintptr(0), 1, 0) if !(rc == SQLITE_OK) { goto __17 } nPlayback++ goto __18 __17: if !(rc == SQLITE_DONE) { goto __19 } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) goto __15 goto __20 __19: if !(rc == SQLITE_IOERR|int32(2)<<8) { goto __21 } // If the journal has been truncated, simply stop reading and // processing the journal. This might happen if the journal was // not completely written and synced prior to a crash. In that // case, the database should have never been written in the // first place so it is OK to simply abandon the rollback. rc = SQLITE_OK goto end_playback goto __22 __21: // If we are unable to rollback, quit and return the error // code. This will cause the pager to enter the error state // so that no further harm will be done. Perhaps the next // process to come along will be able to rollback the database. goto end_playback __22: ; __20: ; __18: ; goto __14 __14: u++ goto __13 goto __15 __15: ; goto __4 __5: ; //NOTREACHED end_playback: if !(rc == SQLITE_OK) { goto __23 } rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) __23: ; // Following a rollback, the database file should be back in its original // state prior to the start of the transaction, so invoke the // SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the // assertion that the transaction counter was modified. // If this playback is happening automatically as a result of an IO or // malloc error that occurred after the change-counter was updated but // before the transaction was committed, then the change-counter // modification may just have been reverted. If this happens in exclusive // mode, then subsequent transactions performed by the connection will not // update the change-counter at all. This may lead to cache inconsistency // problems for other processes at some point in the future. So, just // in case this has happened, clear the changeCountDone flag now. (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(rc == SQLITE_OK) { goto __24 } // Leave 4 bytes of space before the super-journal filename in memory. // This is because it may end up being passed to sqlite3OsOpen(), in // which case it requires 4 0x00 bytes in memory immediately before // the filename. zSuper = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace + 4 rc = readSuperJournal(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, zSuper, uint32((*Sqlite3_vfs)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FpVfs)).FmxPathname+1)) __24: ; if !(rc == SQLITE_OK && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_DBMOD || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN)) { goto __25 } rc = Xsqlite3PagerSync(tls, pPager, uintptr(0)) __25: ; if !(rc == SQLITE_OK) { goto __26 } rc = pager_end_transaction(tls, pPager, libc.Bool32(int32(*(*int8)(unsafe.Pointer(zSuper))) != 0), 0) __26: ; if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0 && *(*int32)(unsafe.Pointer(bp + 24)) != 0) { goto __27 } // If there was a super-journal and this routine will return success, // see if it is possible to delete the super-journal. libc.Xmemset(tls, zSuper+libc.UintptrFromInt32(-4), 0, uint64(4)) rc = pager_delsuper(tls, pPager, zSuper) __27: ; if !(isHot != 0 && nPlayback != 0) { goto __28 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+5197, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __28: ; // The Pager.sectorSize variable may have been updated while rolling // back a journal created by a process with a different sector size // value. Reset it to the correct value for this process. setSectorSize(tls, pPager) return rc } // Read the content for page pPg out of the database file (or out of // the WAL if that is where the most recent copy if found) into // pPg->pData. A shared lock or greater must be held on the database // file before this function is called. // // If page 1 is read, then the value of Pager.dbFileVers[] is set to // the value read from the database file. // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56183:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager // Pager object associated with page pPg var rc int32 = SQLITE_OK // Return code *(*U32)(unsafe.Pointer(bp /* iFrame */)) = U32(0) // Frame of WAL containing pgno if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno, bp) if rc != 0 { return rc } } if *(*U32)(unsafe.Pointer(bp)) != 0 { rc = Xsqlite3WalReadFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, *(*U32)(unsafe.Pointer(bp /* iFrame */)), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*PgHdr)(unsafe.Pointer(pPg)).FpData) } else { var iOffset I64 = I64((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, (*PgHdr)(unsafe.Pointer(pPg)).FpData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), iOffset) if rc == SQLITE_IOERR|int32(2)<<8 { rc = SQLITE_OK } } if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno == Pgno(1) { if rc != 0 { // If the read is unsuccessful, set the dbFileVers[] to something // that will never be a valid file version. dbFileVers[] is a copy // of bytes 24..39 of the database. Bytes 28..31 should always be // zero or the size of the database in page. Bytes 32..35 and 35..39 // should be page numbers which are never 0xffffffff. So filling // pPager->dbFileVers[] with all 0xff bytes should suffice. // // For an encrypted database, the situation is more complex: bytes // 24..39 of the database are white noise. But the probability of // white noise equaling 16 bytes of 0xff is vanishingly small so // we should still be ok. libc.Xmemset(tls, pPager+136, 0xff, uint64(unsafe.Sizeof([16]int8{}))) } else { var dbFileVers uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpData + 24 libc.Xmemcpy(tls, pPager+136, dbFileVers, uint64(unsafe.Sizeof([16]int8{}))) } } return rc } // Update the value of the change-counter at offsets 24 and 92 in // the header and the sqlite version number at offset 96. // // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56246:13: */ var change_counter U32 if pPg == uintptr(0) { return } // Increment the value just read and write it back to byte 24. change_counter = Xsqlite3Get4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpPager+136) + U32(1) Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(24), change_counter) // Also store the SQLite version number in bytes 96..99 and in // bytes 92..95 store the change counter for which the version number // is valid. Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(92), change_counter) Xsqlite3Put4byte(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData+uintptr(96), uint32(SQLITE_VERSION_NUMBER)) } // This function is invoked once for each page that has already been // written into the log file when a WAL transaction is rolled back. // Parameter iPg is the page number of said page. The pCtx argument // is actually a pointer to the Pager structure. // // If page iPg is present in the cache, and has no outstanding references, // it is discarded. Otherwise, if there are one or more outstanding // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56274:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr pPg = Xsqlite3PagerLookup(tls, pPager, iPg) if pPg != 0 { if Xsqlite3PcachePageRefcount(tls, pPg) == 1 { Xsqlite3PcacheDrop(tls, pPg) } else { rc = readDbPage(tls, pPg) if rc == SQLITE_OK { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxReiniter})).f(tls, pPg) } Xsqlite3PagerUnrefNotNull(tls, pPg) } } // Normally, if a transaction is rolled back, any backup processes are // updated as data is copied out of the rollback journal and into the // database. This is not generally possible with a WAL database, as // rollback involves simply truncating the log file. Therefore, if one // or more frames have already been written to the log (and therefore // also copied into the backup databases) as part of this transaction, // the backups must be restarted. Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) return rc } // This function is called to rollback a transaction on a WAL database. func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56309:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert // For all pages in the cache that are currently dirty or have already // been written (but not committed) to the log file, do one of the // following: // // + Discard the cached page (if refcount==0), or // + Reload page content from the database (if refcount>0). (*Pager)(unsafe.Pointer(pPager)).FdbSize = (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize rc = Xsqlite3WalUndo(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno) int32 }{pagerUndoCallback})), pPager) pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) for pList != 0 && rc == SQLITE_OK { var pNext uintptr = (*PgHdr)(unsafe.Pointer(pList)).FpDirty rc = pagerUndoCallback(tls, pPager, (*PgHdr)(unsafe.Pointer(pList)).Fpgno) pList = pNext } return rc } // This function is a wrapper around sqlite3WalFrames(). As well as logging // the contents of the list of pages headed by pList (connected by pDirty), // this function notifies any active backup processes that the pages have // changed. // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56341:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = pList var rc int32 // Return code var nList int32 // Number of pages in pList var p uintptr // For looping over pages if isCommit != 0 { // If a WAL transaction is being committed, there is no point in writing // any pages with page numbers greater than nTruncate into the WAL file. // They will never be read by any client. So remove them from the pDirty // list here. var ppNext uintptr = bp /* &pList */ nList = 0 for p = *(*uintptr)(unsafe.Pointer(bp /* pList */)); libc.AssignPtrUintptr(ppNext, p) != uintptr(0); p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { if (*PgHdr)(unsafe.Pointer(p)).Fpgno <= nTruncate { ppNext = p + 32 nList++ } } } else { nList = 1 } *(*int32)(unsafe.Pointer(pPager + 240 + 2*4)) += nList if (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fpgno == Pgno(1) { pager_write_changecounter(tls, *(*uintptr)(unsafe.Pointer(bp /* pList */))) } rc = Xsqlite3WalFrames(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), *(*uintptr)(unsafe.Pointer(bp /* pList */)), nTruncate, isCommit, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags)) if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FpBackup != 0 { for p = *(*uintptr)(unsafe.Pointer(bp /* pList */)); p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, (*PgHdr)(unsafe.Pointer(p)).Fpgno, (*PgHdr)(unsafe.Pointer(p)).FpData) } } return rc } // Begin a read transaction on the WAL. // // This routine used to be called "pagerOpenSnapshot()" because it essentially // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56408:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // Return code *(*int32)(unsafe.Pointer(bp /* changed */)) = 0 // True if cache must be reset // sqlite3WalEndReadTransaction() was not called for the previous // transaction in locking_mode=EXCLUSIVE. So call it now. If we // are in locking_mode=NORMAL and EndRead() was previously called, // the duplicate call is harmless. Xsqlite3WalEndReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) rc = Xsqlite3WalBeginReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, bp) if rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp)) != 0 { pager_reset(tls, pPager) if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) } } return rc } // This function is called as part of the transition from PAGER_OPEN // to PAGER_READER state to determine the size of the database file // in pages (assuming the page size currently stored in Pager.pageSize). // // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56441:12: */ bp := tls.Alloc(8) defer tls.Free(8) var nPage Pgno // Value to return via *pnPage // Query the WAL sub-system for the database size. The WalDbsize() // function returns zero if the WAL is not open (i.e. Pager.pWal==0), or // if the database size is not available. The database size is not // available from the WAL sub-system if the log file is empty or // contains no valid committed transactions. nPage = Xsqlite3WalDbsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) // If the number of pages in the database is not available from the // WAL sub-system, determine the page count based on the size of // the database file. If the size of the database file is not an // integer multiple of the page-size, round up the result. if nPage == Pgno(0) && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { *(*I64)(unsafe.Pointer(bp /* n */)) = int64(0) // Size of db file in bytes var rc int32 = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) if rc != SQLITE_OK { return rc } nPage = Pgno((*(*I64)(unsafe.Pointer(bp)) + (*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(1)) / (*Pager)(unsafe.Pointer(pPager)).FpageSize) } // If the current number of pages in the file is greater than the // configured maximum pager number, increase the allowed limit so // that the file can be read. if nPage > (*Pager)(unsafe.Pointer(pPager)).FmxPgno { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = nPage } *(*Pgno)(unsafe.Pointer(pnPage)) = nPage return SQLITE_OK } // Check if the *-wal file that corresponds to the database opened by pPager // exists if the database is not empy, or verify that the *-wal file does // not exist (by deleting it) if the database file is empty. // // If the database is not empty and the *-wal file exists, open the pager // in WAL mode. If the database is empty or if no *-wal file exists and // if no error occurs, make sure Pager.journalMode is not set to // PAGER_JOURNALMODE_WAL. // // Return SQLITE_OK or an error code. // // The caller must hold a SHARED lock on the database file to call this // function. Because an EXCLUSIVE lock on the db file is required to delete // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56501:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) { // var isWal int32 at bp, 4 // True if WAL file exists rc = Xsqlite3OsAccess(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) != 0 { // var nPage Pgno at bp+4, 4 // Size of the database file rc = pagerPagecount(tls, pPager, bp+4) if rc != 0 { return rc } if *(*Pgno)(unsafe.Pointer(bp + 4)) == Pgno(0) { rc = Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, 0) } else { rc = Xsqlite3PagerOpenWal(tls, pPager, uintptr(0)) } } else if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(PAGER_JOURNALMODE_DELETE) } } } return rc } // Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback // the entire super-journal file. The case pSavepoint==NULL occurs when // a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction // savepoint. // // When pSavepoint is not NULL (meaning a non-transaction savepoint is // being rolled back), then the rollback consists of up to three stages, // performed in the order specified: // // * Pages are played back from the main journal starting at byte // offset PagerSavepoint.iOffset and continuing to // PagerSavepoint.iHdrOffset, or to the end of the main journal // file if PagerSavepoint.iHdrOffset is zero. // // * If PagerSavepoint.iHdrOffset is not zero, then pages are played // back starting from the journal header immediately following // PagerSavepoint.iHdrOffset to the end of the main journal file. // // * Pages are then played back from the sub-journal file, starting // with the PagerSavepoint.iSubRec and continuing to the end of // the journal file. // // Throughout the rollback process, each time a page is rolled back, the // corresponding bit is set in a bitvec structure (variable pDone in the // implementation below). This is used to ensure that a page is only // rolled back the first time it is encountered in either journal. // // If pSavepoint is NULL, then pages are only played back from the main // journal file. There is no need for a bitvec in this case. // // In either case, before playback commences the Pager.dbSize variable // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56568:12: */ bp := tls.Alloc(16) defer tls.Free(16) var szJ I64 // Effective size of the main journal var iHdrOff I64 // End of first segment of main-journal records var rc int32 = SQLITE_OK // Return code var pDone uintptr = uintptr(0) // Bitvec to ensure pages played back only once // Allocate a bitvec to use to store the set of pages rolled back if pSavepoint != 0 { pDone = Xsqlite3BitvecCreate(tls, (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FnOrig) if !(pDone != 0) { return SQLITE_NOMEM } } // Set the database size back to the value it was before the savepoint // being reverted was opened. (*Pager)(unsafe.Pointer(pPager)).FdbSize = func() uint32 { if pSavepoint != 0 { return (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FnOrig } return (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize }() (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = (*Pager)(unsafe.Pointer(pPager)).FtempFile if !(pSavepoint != 0) && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { return pagerRollbackWal(tls, pPager) } // Use pPager->journalOff as the effective size of the main rollback // journal. The actual file might be larger than this in // PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST. But anything // past pPager->journalOff is off-limits to us. szJ = (*Pager)(unsafe.Pointer(pPager)).FjournalOff // Begin by rolling back records from the main journal starting at // PagerSavepoint.iOffset and continuing to the next journal header. // There might be records in the main journal that have a page number // greater than the current database size (pPager->dbSize) but those // will be skipped automatically. Pages are added to pDone as they // are played back. if pSavepoint != 0 && !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { if (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiHdrOffset != 0 { iHdrOff = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiHdrOffset } else { iHdrOff = szJ } (*Pager)(unsafe.Pointer(pPager)).FjournalOff = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiOffset for rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < iHdrOff { rc = pager_playback_one_page(tls, pPager, pPager+96, pDone, 1, 1) } } else { (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) } // Continue rolling back records out of the main journal starting at // the first journal header seen and continuing until the effective end // of the main journal file. Continue to skip out-of-range pages and // continue adding pages rolled back to pDone. for rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < szJ { var ii U32 // Loop counter *(*U32)(unsafe.Pointer(bp /* nJRec */)) = U32(0) // Number of Journal Records // var dummy U32 at bp+4, 4 rc = readJournalHdr(tls, pPager, 0, szJ, bp, bp+4) // The "pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff" // test is related to ticket #2565. See the discussion in the // pager_playback() function for additional information. if *(*U32)(unsafe.Pointer(bp)) == U32(0) && (*Pager)(unsafe.Pointer(pPager)).FjournalHdr+I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff { *(*U32)(unsafe.Pointer(bp /* nJRec */)) = U32((szJ - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(8))) } for ii = U32(0); rc == SQLITE_OK && ii < *(*U32)(unsafe.Pointer(bp /* nJRec */)) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff < szJ; ii++ { rc = pager_playback_one_page(tls, pPager, pPager+96, pDone, 1, 1) } } // Finally, rollback pages from the sub-journal. Page that were // previously rolled back out of the main journal (and are hence in pDone) // will be skipped. Out-of-range pages are also skipped. if pSavepoint != 0 { var ii U32 // Loop counter *(*I64)(unsafe.Pointer(bp + 8 /* offset */)) = I64((*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiSubRec) * (int64(4) + (*Pager)(unsafe.Pointer(pPager)).FpageSize) if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = Xsqlite3WalSavepointUndo(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSavepoint+36) } for ii = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiSubRec; rc == SQLITE_OK && ii < (*Pager)(unsafe.Pointer(pPager)).FnSubRec; ii++ { rc = pager_playback_one_page(tls, pPager, bp+8, pDone, 0, 1) } } Xsqlite3BitvecDestroy(tls, pDone) if rc == SQLITE_OK { (*Pager)(unsafe.Pointer(pPager)).FjournalOff = szJ } return rc } // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56680:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56688:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56695:13: */ bp := tls.Alloc(8) defer tls.Free(8) var fd uintptr = (*Pager)(unsafe.Pointer(pPager)).Ffd if (*Sqlite3_file)(unsafe.Pointer(fd)).FpMethods != uintptr(0) && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(fd)).FpMethods)).FiVersion >= 3 { // var sz Sqlite3_int64 at bp, 8 *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = (*Pager)(unsafe.Pointer(pPager)).FszMmap (*Pager)(unsafe.Pointer(pPager)).FbUseFetch = U8(libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp)) > int64(0))) setGetterMethod(tls, pPager) Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_MMAP_SIZE, bp) } } // Change the maximum size of any memory mapping made of the database file. func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56711:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56719:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Adjust settings of the pager to those specified in the pgFlags parameter. // // The "level" in pgFlags & PAGER_SYNCHRONOUS_MASK sets the robustness // of the database to damage due to OS crashes or power failures by // changing the number of syncs()s when writing the journals. // There are four levels: // // OFF sqlite3OsSync() is never called. This is the default // for temporary and transient files. // // NORMAL The journal is synced once before writes begin on the // database. This is normally adequate protection, but // it is theoretically possible, though very unlikely, // that an inopertune power failure could leave the journal // in a state which would cause damage to the database // when it is rolled back. // // FULL The journal is synced twice before writes begin on the // database (with some additional information - the nRec field // of the journal header - being written in between the two // syncs). If we assume that writing a // single disk sector is atomic, then this mode provides // assurance that the journal will not be corrupted to the // point of causing damage to the database during rollback. // // EXTRA This is like FULL except that is also syncs the directory // that contains the rollback journal after the rollback // journal is unlinked. // // The above is for a rollback-journal mode. For WAL mode, OFF continues // to mean that no syncs ever occur. NORMAL means that the WAL is synced // prior to the start of checkpoint and that the database file is synced // at the conclusion of the checkpoint if the entire content of the WAL // was written back into the database. But no sync operations occur for // an ordinary commit in NORMAL mode with WAL. FULL means that the WAL // file is synced following each commit operation, in addition to the // syncs associated with NORMAL. There is no difference between FULL // and EXTRA for WAL mode. // // Do not confuse synchronous=FULL with SQLITE_SYNC_FULL. The // SQLITE_SYNC_FULL macro means to use the MacOSX-style full-fsync // using fcntl(F_FULLFSYNC). SQLITE_SYNC_NORMAL means to do an // ordinary fsync() call. There is no difference between SQLITE_SYNC_FULL // and SQLITE_SYNC_NORMAL on platforms other than MacOSX. But the // synchronous=FULL versus synchronous=NORMAL setting determines when // the xSync primitive is called and is relevant to all platforms. // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56775:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) (*Pager)(unsafe.Pointer(pPager)).FfullSync = U8(0) (*Pager)(unsafe.Pointer(pPager)).FextraSync = U8(0) } else { (*Pager)(unsafe.Pointer(pPager)).FnoSync = func() uint8 { if level == uint32(PAGER_SYNCHRONOUS_OFF) { return uint8(1) } return uint8(0) }() (*Pager)(unsafe.Pointer(pPager)).FfullSync = func() uint8 { if level >= uint32(PAGER_SYNCHRONOUS_FULL) { return uint8(1) } return uint8(0) }() (*Pager)(unsafe.Pointer(pPager)).FextraSync = func() uint8 { if level == uint32(PAGER_SYNCHRONOUS_EXTRA) { return uint8(1) } return uint8(0) }() } if (*Pager)(unsafe.Pointer(pPager)).FnoSync != 0 { (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(0) } else if pgFlags&uint32(PAGER_FULLFSYNC) != 0 { (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(SQLITE_SYNC_FULL) } else { (*Pager)(unsafe.Pointer(pPager)).FsyncFlags = U8(SQLITE_SYNC_NORMAL) } (*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags = U8(int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags) << 2) if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 { *(*U8)(unsafe.Pointer(pPager + 15)) |= U8(int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) } if pgFlags&uint32(PAGER_CKPT_FULLFSYNC) != 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { *(*U8)(unsafe.Pointer(pPager + 15)) |= U8(int32(SQLITE_SYNC_FULL) << 2) } if pgFlags&uint32(PAGER_CACHESPILL) != 0 { *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_OFF)) } else { *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_OFF) } } // The following global variable is incremented whenever the library // attempts to open a temporary file. This information is used for // testing and analysis only. // Open a temporary file. // // Write the file descriptor into *pFile. Return SQLITE_OK on success // or some other error code if we fail. The OS will automatically // delete the temporary file when it is closed. // // The flags passed to the VFS layer xOpen() call are those specified // by parameter vfsFlags ORed with the following: // // SQLITE_OPEN_READWRITE // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56835:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) rc = Xsqlite3OsOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, uintptr(0), pFile, vfsFlags, uintptr(0)) return rc } // Set the busy handler function. // // The pager invokes the busy-handler if sqlite3OsLock() returns // SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock, // or when trying to upgrade from a RESERVED lock to an EXCLUSIVE // lock. It does *not* invoke the busy handler when upgrading from // SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE // (which occurs during hot-journal rollback). Summary: // // Transition | Invokes xBusyHandler // -------------------------------------------------------- // NO_LOCK -> SHARED_LOCK | Yes // SHARED_LOCK -> RESERVED_LOCK | No // SHARED_LOCK -> EXCLUSIVE_LOCK | No // RESERVED_LOCK -> EXCLUSIVE_LOCK | Yes // // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56874:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg ap = pPager + 224 Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_BUSYHANDLER, ap) } // Change the page size used by the Pager object. The new page size // is passed in *pPageSize. // // If the pager is in the error state when this function is called, it // is a no-op. The value returned is the error state error code (i.e. // one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL). // // Otherwise, if all of the following are true: // // * the new page size (value of *pPageSize) is valid (a power // of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and // // * there are no outstanding page references, and // // * the database is either not an in-memory database or it is // an in-memory database that currently consists of zero pages. // // then the pager object page size is set to *pPageSize. // // If the page size is changed, then this function uses sqlite3PagerMalloc() // to obtain a new Pager.pTmpSpace buffer. If this allocation attempt // fails, SQLITE_NOMEM is returned and the page size remains unchanged. // In all other cases, SQLITE_OK is returned. // // If the page size is not changed, either because one of the enumerated // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56918:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // It is not possible to do a full assert_pager_state() here, as this // function may be called from within PagerOpen(), before the state // of the Pager object is internally consistent. // // At one point this function returned an error if the pager was in // PAGER_ERROR state. But since PAGER_ERROR state guarantees that // there is at least one outstanding page reference, this function // is a no-op for that case anyhow. var pageSize U32 = *(*U32)(unsafe.Pointer(pPageSize)) if (int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) == 0 || (*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(0)) && Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 && pageSize != 0 && pageSize != U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) { var pNew uintptr = uintptr(0) // New temp space *(*I64)(unsafe.Pointer(bp /* nByte */)) = int64(0) if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_OPEN && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) } if rc == SQLITE_OK { // 8 bytes of zeroed overrun space is sufficient so that the b-tree // cell header parser will never run off the end of the allocation pNew = Xsqlite3PageMalloc(tls, int32(pageSize+U32(8))) if !(pNew != 0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pNew+uintptr(pageSize), 0, uint64(8)) } } if rc == SQLITE_OK { pager_reset(tls, pPager) rc = Xsqlite3PcacheSetPageSize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, int32(pageSize)) } if rc == SQLITE_OK { Xsqlite3PageFree(tls, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace = pNew (*Pager)(unsafe.Pointer(pPager)).FdbSize = Pgno((*(*I64)(unsafe.Pointer(bp)) + I64(pageSize) - int64(1)) / I64(pageSize)) (*Pager)(unsafe.Pointer(pPager)).FpageSize = I64(pageSize) } else { Xsqlite3PageFree(tls, pNew) } } *(*U32)(unsafe.Pointer(pPageSize)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) if rc == SQLITE_OK { if nReserve < 0 { nReserve = int32((*Pager)(unsafe.Pointer(pPager)).FnReserve) } (*Pager)(unsafe.Pointer(pPager)).FnReserve = I16(nReserve) pagerFixMaplimit(tls, pPager) } return rc } // Return a pointer to the "temporary page" buffer held internally // by the pager. This is a buffer that is big enough to hold the // entire content of a database page. This buffer is used internally // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56986:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } // Attempt to set the maximum database page count if mxPage is positive. // Make no changes if mxPage is zero or negative. And never reduce the // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:56997:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } // Called only by OP_MaxPgcnt // assert( pPager->mxPgno>=pPager->dbSize ); // OP_MaxPgcnt ensures that the parameter passed to this function is not // less than the total number of valid pages in the database. But this // may be less than Pager.dbSize, and so the assert() above is not valid return (*Pager)(unsafe.Pointer(pPager)).FmxPgno } // The following set of routines are used to disable the simulated // I/O error mechanism. These routines are used to avoid simulated // errors in places where we do not care about errors. // // Unless -DSQLITE_TEST=1 is used, these routines are all no-ops // and generate no code. // Read the first N bytes from the beginning of the file into memory // that pDest points to. // // If the pager was opened on a transient file (zFilename==""), or // opened on a file less than N bytes in size, the output buffer is // zeroed and SQLITE_OK returned. The rationale for this is that this // function is used to read database headers, and a new transient or // zero sized database has a header than consists entirely of zeroes. // // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57047:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint64(N)) // This routine is only called by btree immediately after creating // the Pager object. There has not been an opportunity to transition // to WAL mode yet. if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pDest, N, int64(0)) if rc == SQLITE_IOERR|int32(2)<<8 { rc = SQLITE_OK } } return rc } // This function may only be called when a read-transaction is open on // the pager. It returns the total number of pages in the database. // // However, if the file is between 1 and <page-size> bytes in size, then // this is considered a 1 page file. func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57075:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } // Try to obtain a lock of type locktype on the database file. If // a similar or greater lock is already held, this function is a no-op // (returning SQLITE_OK immediately). // // Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke // the busy callback if the lock is currently not available. Repeat // until the busy callback returns false or until the attempt to // obtain the lock succeeds. // // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57096:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is // already held), or one of the transitions that the busy-handler // may be invoked during, according to the comment above // sqlite3PagerSetBusyhandler(). for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxBusyHandler})).f(tls, (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg) != 0 { rc = pagerLockDb(tls, pPager, locktype) } return rc } // Function assertTruncateConstraint(pPager) checks that one of the // following is true for all dirty pages currently in the page-cache: // // a) The page number is less than or equal to the size of the // current database image, in pages, OR // // b) if the page content were written at this time, it would not // be necessary to write the current content out to the sub-journal. // // If the condition asserted by this function were not true, and the // dirty page were to be discarded from the cache via the pagerStress() // routine, pagerStress() would not write the current page content to // the database file. If a savepoint transaction were rolled back after // this happened, the correct behavior would be to restore the current // content of the page. However, since this content is not present in either // the database file or the portion of the rollback journal and // sub-journal rolled back the content could not be restored and the // database image would become corrupt. It is therefore fortunate that // this circumstance cannot arise. // Truncate the in-memory database file image to nPage pages. This // function does not actually modify the database file on disk. It // just sets the internal state of the pager object so that the // truncation will be done when the current transaction is committed. // // This function is only called right before committing a transaction. // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57167:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage // At one point the code here called assertTruncateConstraint() to // ensure that all pages being truncated away by this operation are, // if one or more savepoints are open, present in the savepoint // journal so that they can be restored if the savepoint is rolled // back. This is no longer necessary as this function is now only // called right before committing a transaction. So although the // Pager object may still have open savepoints (Pager.nSavepoint!=0), // they cannot be rolled back. So the assertTruncateConstraint() call // is no longer correct. } // This function is called before attempting a hot-journal rollback. It // syncs the journal file to disk, then sets pPager->journalHdr to the // size of the journal file so that the pager_playback() routine knows // that the entire journal file has been synced. // // Syncing a hot-journal to disk before attempting to roll it back ensures // that if a power-failure occurs during the rollback, the process that // attempts rollback following system recovery sees the same journal // content as this process. // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57198:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) } if rc == SQLITE_OK { rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, pPager+104) } return rc } // Obtain a reference to a memory mapped page object for page number pgno. // The new object will use the pointer pData, obtained from xFetch(). // If successful, set *ppPage to point to the new page reference // and return SQLITE_OK. Otherwise, return an SQLite error code and set // *ppPage to zero. // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57220:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { *(*uintptr)(unsafe.Pointer(ppPage)) = libc.AssignUintptr(&p, (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist) (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist = (*PgHdr)(unsafe.Pointer(p)).FpDirty (*PgHdr)(unsafe.Pointer(p)).FpDirty = uintptr(0) libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(p)).FpExtra, 0, uint64(8)) } else { *(*uintptr)(unsafe.Pointer(ppPage)) = libc.AssignUintptr(&p, Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(PgHdr{}))+uint64((*Pager)(unsafe.Pointer(pPager)).FnExtra))) if p == uintptr(0) { Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, pData) return SQLITE_NOMEM } (*PgHdr)(unsafe.Pointer(p)).FpExtra = p + 1*72 (*PgHdr)(unsafe.Pointer(p)).Fflags = U16(PGHDR_MMAP) (*PgHdr)(unsafe.Pointer(p)).FnRef = int16(1) (*PgHdr)(unsafe.Pointer(p)).FpPager = pPager } (*PgHdr)(unsafe.Pointer(p)).Fpgno = pgno (*PgHdr)(unsafe.Pointer(p)).FpData = pData (*Pager)(unsafe.Pointer(pPager)).FnMmapOut++ return SQLITE_OK } // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57264:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist = pPg Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, (*PgHdr)(unsafe.Pointer(pPg)).FpData) } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57277:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { pNext = (*PgHdr)(unsafe.Pointer(p)).FpDirty Xsqlite3_free(tls, p) } } // Verify that the database file has not be deleted or renamed out from // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57291:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* bHasMoved */)) = 0 var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { return SQLITE_OK } if (*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(0) { return SQLITE_OK } rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_HAS_MOVED, bp) if rc == SQLITE_NOTFOUND { // If the HAS_MOVED file-control is unimplemented, assume that the file // has not been moved. That is the historical behavior of SQLite: prior to // version 3.8.3, it never checked rc = SQLITE_OK } else if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { rc = SQLITE_READONLY | int32(4)<<8 } return rc } // Shutdown the page cache. Free all memory and close all files. // // If a transaction was in progress when this routine is called, that // transaction is rolled back. All outstanding pages are invalidated // and their memory is freed. Any attempt to use a page associated // with this page cache after this function returns will likely // result in a coredump. // // This function always succeeds. If a transaction is active an attempt // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57325:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) pagerFreeMapHdrs(tls, pPager) // pPager->errCode = 0; (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(0) { var a uintptr = uintptr(0) if db != 0 && uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NoCkptOnClose) && SQLITE_OK == databaseIsUnmoved(tls, pPager) { a = pTmp } Xsqlite3WalClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), a) (*Pager)(unsafe.Pointer(pPager)).FpWal = uintptr(0) } pager_reset(tls, pPager) if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { pager_unlock(tls, pPager) } else { // If it is open, sync the journal file before calling UnlockAndRollback. // If this is not done, then an unsynced portion of the open journal // file may be played back into the database. If a power failure occurs // while this is happening, the database could become corrupt. // // If an error occurs while trying to sync the journal, shift the pager // into the ERROR state. This causes UnlockAndRollback to unlock the // database and close the journal file without attempting to roll it // back or finalize it. The next database user will have to do hot-journal // rollback before accessing the database file. if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { pager_error(tls, pPager, pagerSyncHotJournal(tls, pPager)) } pagerUnlockAndRollback(tls, pPager) } Xsqlite3EndBenignMalloc(tls) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) Xsqlite3PageFree(tls, pTmp) Xsqlite3PcacheClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) Xsqlite3_free(tls, pPager) return SQLITE_OK } // Increment the reference count for page pPg. func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57394:21: */ Xsqlite3PcacheRef(tls, pPg) } // Sync the journal. In other words, make sure all the pages that have // been written to the journal have actually reached the surface of the // disk and can be restored in the event of a hot-journal rollback. // // If the Pager.noSync flag is set, then this function is a no-op. // Otherwise, the actions required depend on the journal-mode and the // device characteristics of the file-system, as follows: // // * If the journal file is an in-memory journal file, no action need // be taken. // // * Otherwise, if the device does not support the SAFE_APPEND property, // then the nRec field of the most recently written journal header // is updated to contain the number of journal records that have // been written following it. If the pager is operating in full-sync // mode, then the journal file is synced before this field is updated. // // * If the device does not support the SEQUENTIAL property, then // journal file is synced. // // Or, in pseudo-code: // // if( NOT <in-memory journal> ){ // if( NOT SAFE_APPEND ){ // if( <full-sync mode> ) xSync(<journal file>); // <update nRec field> // } // if( NOT SEQUENTIAL ) xSync(<journal file>); // } // // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57433:12: */ bp := tls.Alloc(20) defer tls.Free(20) var rc int32 // Return code rc = Xsqlite3PagerExclusiveLock(tls, pPager) if rc != SQLITE_OK { return rc } if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_MEMORY { var iDc int32 = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd) if 0 == iDc&SQLITE_IOCAP_SAFE_APPEND { // This block deals with an obscure problem. If the last connection // that wrote to this database was operating in persistent-journal // mode, then the journal file may at this point actually be larger // than Pager.journalOff bytes. If the next thing in the journal // file happens to be a journal-header (written as part of the // previous connection's transaction), and a crash or power-failure // occurs after nRec is updated but before this connection writes // anything else to the journal file (or commits/rolls back its // transaction), then SQLite may become confused when doing the // hot-journal rollback following recovery. It may roll back all // of this connections data, then proceed to rolling back the old, // out-of-date data that follows it. Database corruption. // // To work around this, if the journal file does appear to contain // a valid header following Pager.journalOff, then write a 0x00 // byte to the start of it to prevent it from being recognized. // // Variable iNextHdrOffset is set to the offset at which this // problematic header will occur, if it exists. aMagic is used // as a temporary buffer to inspect the first couple of bytes of // the potential journal header. var iNextHdrOffset I64 // var aMagic [8]U8 at bp+12, 8 // var zHeader [12]U8 at bp, 12 libc.Xmemcpy(tls, bp, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(unsafe.Sizeof(aJournalMagic))) Xsqlite3Put4byte(tls, bp+8, uint32((*Pager)(unsafe.Pointer(pPager)).FnRec)) iNextHdrOffset = journalHdrOffset(tls, pPager) rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+12, 8, iNextHdrOffset) if rc == SQLITE_OK && 0 == libc.Xmemcmp(tls, bp+12, uintptr(unsafe.Pointer(&aJournalMagic)), uint64(8)) { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&zerobyte)), 1, iNextHdrOffset) } if rc != SQLITE_OK && rc != SQLITE_IOERR|int32(2)<<8 { return rc } // Write the nRec value into the journal file header. If in // full-synchronous mode, sync the journal first. This ensures that // all data has really hit the disk before nRec is updated to mark // it as a candidate for rollback. // // This is not required if the persistent media supports the // SAFE_APPEND property. Because in this case it is not possible // for garbage data to be appended to the file, the nRec field // is populated with 0xFFFFFFFF when the journal header is written // and never needs to be updated. if (*Pager)(unsafe.Pointer(pPager)).FfullSync != 0 && 0 == iDc&SQLITE_IOCAP_SEQUENTIAL { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) if rc != SQLITE_OK { return rc } } rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([12]U8{})), (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) if rc != SQLITE_OK { return rc } } if 0 == iDc&SQLITE_IOCAP_SEQUENTIAL { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)|func() int32 { if int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags) == SQLITE_SYNC_FULL { return SQLITE_SYNC_DATAONLY } return 0 }()) if rc != SQLITE_OK { return rc } } (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if newHdr != 0 && 0 == iDc&SQLITE_IOCAP_SAFE_APPEND { (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 rc = writeJournalHdr(tls, pPager) if rc != SQLITE_OK { return rc } } } else { (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = (*Pager)(unsafe.Pointer(pPager)).FjournalOff } } // Unless the pager is in noSync mode, the journal file was just // successfully synced. Either way, clear the PGHDR_NEED_SYNC flag on // all pages. Xsqlite3PcacheClearSyncFlags(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_DBMOD) return SQLITE_OK } var zerobyte U8 = U8(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57484:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the // in-memory pages in the list to the database file. The argument may // be NULL, representing an empty list. In this case this function is // a no-op. // // The pager must hold at least a RESERVED lock when this function // is called. Before writing anything to the database file, this lock // is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained, // SQLITE_BUSY is returned and no data is written to the database file. // // If the pager is a temp-file pager and the actual file-system file // is not yet open, it is created and opened before any data is // written out. // // Once the lock has been upgraded and, if necessary, the file opened, // the pages are written out to the database file in list order. Writing // a page is skipped if it meets either of the following criteria: // // * The page number is greater than Pager.dbSize, or // * The PGHDR_DONT_WRITE flag is set on the page. // // If writing out a page causes the database file to grow, Pager.dbFileSize // is updated accordingly. If page 1 is written out, then the value cached // in Pager.dbFileVers[] is updated to match the new value stored in // the database file. // // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57576:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // Return code // This function is only called for rollback pagers in WRITER_DBMOD state. // If the file is a temp-file has not yet been opened, open it now. It // is not possible for rc to be other than SQLITE_OK if this branch // is taken, as pager_wait_on_lock() is a no-op for temp-files. if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) { rc = pagerOpentemp(tls, pPager, (*Pager)(unsafe.Pointer(pPager)).Ffd, int32((*Pager)(unsafe.Pointer(pPager)).FvfsFlags)) } // Before the first write, give the VFS a hint of what the final // file size will be. if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FdbHintSize < (*Pager)(unsafe.Pointer(pPager)).FdbSize && ((*PgHdr)(unsafe.Pointer(pList)).FpDirty != 0 || (*PgHdr)(unsafe.Pointer(pList)).Fpgno > (*Pager)(unsafe.Pointer(pPager)).FdbHintSize) { *(*Sqlite3_int64)(unsafe.Pointer(bp /* szFile */)) = (*Pager)(unsafe.Pointer(pPager)).FpageSize * Sqlite3_int64((*Pager)(unsafe.Pointer(pPager)).FdbSize) Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SIZE_HINT, bp) (*Pager)(unsafe.Pointer(pPager)).FdbHintSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize } for rc == SQLITE_OK && pList != 0 { var pgno Pgno = (*PgHdr)(unsafe.Pointer(pList)).Fpgno // If there are dirty pages in the page cache with page numbers greater // than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to // make the file smaller (presumably by auto-vacuum code). Do not write // any such pages to the file. // // Also, do not write out any page that has the PGHDR_DONT_WRITE flag // set (set by sqlite3PagerDontWrite()). if pgno <= (*Pager)(unsafe.Pointer(pPager)).FdbSize && 0 == int32((*PgHdr)(unsafe.Pointer(pList)).Fflags)&PGHDR_DONT_WRITE { var offset I64 = I64(pgno-Pgno(1)) * (*Pager)(unsafe.Pointer(pPager)).FpageSize // Offset to write var pData uintptr // Data to write if (*PgHdr)(unsafe.Pointer(pList)).Fpgno == Pgno(1) { pager_write_changecounter(tls, pList) } pData = (*PgHdr)(unsafe.Pointer(pList)).FpData // Write out the page data. rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, pData, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), offset) // If page 1 was just written, update Pager.dbFileVers to match // the value now stored in the database file. If writing this // page caused the database file to grow, update dbFileSize. if pgno == Pgno(1) { libc.Xmemcpy(tls, pPager+136, pData+24, uint64(unsafe.Sizeof([16]int8{}))) } if pgno > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize { (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = pgno } *(*int32)(unsafe.Pointer(pPager + 240 + 2*4))++ // Update any backup objects copying the contents of this pager. Xsqlite3BackupUpdate(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup, pgno, (*PgHdr)(unsafe.Pointer(pList)).FpData) } else { } pList = (*PgHdr)(unsafe.Pointer(pList)).FpDirty } return rc } // Ensure that the sub-journal file is open. If it is already open, this // function is a no-op. // // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57667:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE var nStmtSpill int32 = Xsqlite3Config.FnStmtSpill if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY || (*Pager)(unsafe.Pointer(pPager)).FsubjInMemory != 0 { nStmtSpill = -1 } rc = Xsqlite3JournalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, uintptr(0), (*Pager)(unsafe.Pointer(pPager)).Fsjfd, flags, nStmtSpill) } return rc } // Append a record of the current state of page pPg to the sub-journal. // // If successful, set the bit corresponding to pPg->pgno in the bitvecs // for all open savepoints before returning. // // This function returns SQLITE_OK if everything is successful, an IO // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57693:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { // Open the sub-journal, if it has not already been opened rc = openSubJournal(tls, pPager) // If the sub-journal was opened successfully (or was already open), // write the journal record into the file. if rc == SQLITE_OK { var pData uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpData var offset I64 = I64((*Pager)(unsafe.Pointer(pPager)).FnSubRec) * (int64(4) + (*Pager)(unsafe.Pointer(pPager)).FpageSize) var pData2 uintptr pData2 = pData rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, offset, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) if rc == SQLITE_OK { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, pData2, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), offset+int64(4)) } } } if rc == SQLITE_OK { (*Pager)(unsafe.Pointer(pPager)).FnSubRec++ rc = addToSavepointBitvecs(tls, pPager, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) } return rc } func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57729:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { return SQLITE_OK } return int32(0) } // This function is called by the pcache layer when it has reached some // soft memory limit. The first argument is a pointer to a Pager object // (cast as a void*). The pager is always 'purgeable' (not an in-memory // database). The second argument is a reference to a page that is // currently dirty but has no outstanding references. The page // is always associated with the Pager object passed as the first // argument. // // The job of this function is to make pPg clean by writing its contents // out to the database file, if possible. This may involve syncing the // journal file. // // If successful, sqlite3PcacheMakeClean() is called on the page and // SQLITE_OK returned. If an IO error occurs while trying to make the // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57756:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK // The doNotSpill NOSYNC bit is set during times when doing a sync of // journal (and adding a new header) is not allowed. This occurs // during calls to sqlite3PagerWrite() while trying to journal multiple // pages belonging to the same sector. // // The doNotSpill ROLLBACK and OFF bits inhibits all cache spilling // regardless of whether or not a sync is required. This is set during // a rollback or by user request, respectively. // // Spilling is also prohibited when in an error state since that could // lead to database corruption. In the current implementation it // is impossible for sqlite3PcacheFetch() to be called with createFlag==3 // while in the error state, hence it is impossible for this routine to // be called in the error state. Nevertheless, we include a NEVER() // test for the error state as a safeguard against future changes. if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { return SQLITE_OK } if (*Pager)(unsafe.Pointer(pPager)).FdoNotSpill != 0 && (int32((*Pager)(unsafe.Pointer(pPager)).FdoNotSpill)&(SPILLFLAG_ROLLBACK|SPILLFLAG_OFF) != 0 || int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0) { return SQLITE_OK } *(*int32)(unsafe.Pointer(pPager + 240 + 3*4))++ (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = uintptr(0) if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { // Write a single frame for this page to the log. rc = subjournalPageIfRequired(tls, pPg) if rc == SQLITE_OK { rc = pagerWalFrames(tls, pPager, pPg, uint32(0), 0) } } else { // Sync the journal file if required. if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0 || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_CACHEMOD { rc = syncJournal(tls, pPager, 1) } // Write the contents of the page out to the database file. if rc == SQLITE_OK { rc = pager_write_pagelist(tls, pPager, pPg) } } // Mark the page as clean. if rc == SQLITE_OK { Xsqlite3PcacheMakeClean(tls, pPg) } return pager_error(tls, pPager, rc) } // Flush all unreferenced dirty pages to disk. func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57833:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) for rc == SQLITE_OK && pList != 0 { var pNext uintptr = (*PgHdr)(unsafe.Pointer(pList)).FpDirty if int32((*PgHdr)(unsafe.Pointer(pList)).FnRef) == 0 { rc = pagerStress(tls, pPager, pList) } pList = pNext } } return rc } // Allocate and initialize a new Pager object and put a pointer to it // in *ppPager. The pager should eventually be freed by passing it // to sqlite3PagerClose(). // // The zFilename argument is the path to the database file to open. // If zFilename is NULL then a randomly-named temporary file is created // and used as the file to be cached. Temporary files are be deleted // automatically when they are closed. If zFilename is ":memory:" then // all information is held in cache. It is never written to disk. // This can be used to implement an in-memory database. // // The nExtra parameter specifies the number of bytes of space allocated // along with each page reference. This space is available to the user // via the sqlite3PagerGetExtra() API. When a new page is allocated, the // first 8 bytes of this space are zeroed but the remainder is uninitialized. // (The extra space is used by btree as the MemPage object.) // // The flags argument is used to specify properties that affect the // operation of the pager. It should be passed some bitwise combination // of the PAGER_* flags. // // The vfsFlags parameter is a bitmask to pass to the flags parameter // of the xOpen() method of the supplied VFS when opening files. // // If the pager object is allocated and the specified file opened // successfully, SQLITE_OK is returned and *ppPager set to point to // the new pager object. If an error occurs, *ppPager is set to NULL // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:57882:20: */ bp := tls.Alloc(16) defer tls.Free(16) var pPtr uintptr _ = pPtr // var pPager uintptr at bp, 8 // Pager object to allocate and return var rc int32 // Return code var tempFile int32 // True for temp files (incl. in-memory files) var memDb int32 // True if this is an in-memory file var memJM int32 // Memory journal mode var readOnly int32 // True if this is a read-only file var journalFileSize int32 // Bytes to allocate for each journal fd var zPathname uintptr // Full path to database file var nPathname int32 // Number of bytes in zPathname var useJournal int32 // False to omit journal var pcacheSize int32 // Bytes to allocate for PCache // var szPageDflt U32 at bp+12, 4 // Default page size var zUri uintptr // URI args to copy var nUriByte int32 // Number of bytes of URI args at *zUri var nUri int32 var z uintptr var iDc int32 // var fout int32 at bp+8, 4 *(*uintptr)(unsafe.Pointer(bp /* pPager */)) = uintptr(0) rc = SQLITE_OK tempFile = 0 memDb = 0 memJM = 0 readOnly = 0 zPathname = uintptr(0) nPathname = 0 useJournal = libc.Bool32(flags&PAGER_OMIT_JOURNAL == 0) pcacheSize = Xsqlite3PcacheSize(tls) *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = U32(SQLITE_DEFAULT_PAGE_SIZE) zUri = uintptr(0) nUriByte = 1 nUri = 0 // Number of URI parameters // Figure out how much space is required for each journal file-handle // (there are two of them, the main journal and the sub-journal). journalFileSize = (Xsqlite3JournalSize(tls, pVfs) + 7) & libc.CplInt32(7) // Set the output variable to NULL in case an error occurs. *(*uintptr)(unsafe.Pointer(ppPager)) = uintptr(0) if !(flags&PAGER_MEMORY != 0) { goto __1 } memDb = 1 if !(zFilename != 0 && *(*int8)(unsafe.Pointer(zFilename)) != 0) { goto __2 } zPathname = Xsqlite3DbStrDup(tls, uintptr(0), zFilename) if !(zPathname == uintptr(0)) { goto __3 } return SQLITE_NOMEM __3: ; nPathname = Xsqlite3Strlen30(tls, zPathname) zFilename = uintptr(0) __2: ; __1: ; // Compute and store the full pathname in an allocated buffer pointed // to by zPathname, length nPathname. Or, if this is a temporary file, // leave both nPathname and zPathname set to 0. if !(zFilename != 0 && *(*int8)(unsafe.Pointer(zFilename)) != 0) { goto __4 } nPathname = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 zPathname = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(nPathname*2)) if !(zPathname == uintptr(0)) { goto __5 } return SQLITE_NOMEM __5: ; *(*int8)(unsafe.Pointer(zPathname)) = int8(0) // Make sure initialized even if FullPathname() fails rc = Xsqlite3OsFullPathname(tls, pVfs, zFilename, nPathname, zPathname) if !(rc != SQLITE_OK) { goto __6 } if !(rc == SQLITE_OK|int32(2)<<8) { goto __7 } if !(vfsFlags&SQLITE_OPEN_NOFOLLOW != 0) { goto __8 } rc = SQLITE_CANTOPEN | int32(6)<<8 goto __9 __8: rc = SQLITE_OK __9: ; __7: ; __6: ; nPathname = Xsqlite3Strlen30(tls, zPathname) z = libc.AssignUintptr(&zUri, zFilename+uintptr(Xsqlite3Strlen30(tls, zFilename)+1)) __10: if !(*(*int8)(unsafe.Pointer(z)) != 0) { goto __11 } z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) z += uintptr(libc.Xstrlen(tls, z) + uint64(1)) nUri++ goto __10 __11: ; nUriByte = int32((int64(z+1) - int64(zUri)) / 1) if !(rc == SQLITE_OK && nPathname+8 > (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname) { goto __12 } // This branch is taken when the journal path required by // the database being opened will be more than pVfs->mxPathname // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. rc = Xsqlite3CantopenError(tls, 57969) __12: ; if !(rc != SQLITE_OK) { goto __13 } Xsqlite3DbFree(tls, uintptr(0), zPathname) return rc __13: ; __4: ; // Allocate memory for the Pager structure, PCache object, the // three file descriptors, the database file name and the journal // file name. The layout in memory is as follows: // // Pager object (sizeof(Pager) bytes) // PCache object (sqlite3PcacheSize() bytes) // Database file handle (pVfs->szOsFile bytes) // Sub-journal file handle (journalFileSize bytes) // Main journal file handle (journalFileSize bytes) // Ptr back to the Pager (sizeof(Pager*) bytes) // \0\0\0\0 database prefix (4 bytes) // Database file name (nPathname+1 bytes) // URI query parameters (nUriByte bytes) // Journal filename (nPathname+8+1 bytes) // WAL filename (nPathname+4+1 bytes) // \0\0\0 terminator (3 bytes) // // Some 3rd-party software, over which we have no control, depends on // the specific order of the filenames and the \0 separators between them // so that it can (for example) find the database filename given the WAL // filename without using the sqlite3_filename_database() API. This is a // misuse of SQLite and a bug in the 3rd-party software, but the 3rd-party // software is in widespread use, so we try to avoid changing the filename // order and formatting if possible. In particular, the details of the // filename format expected by 3rd-party software should be as follows: // // - Main Database Path // - \0 // - Multiple URI components consisting of: // - Key // - \0 // - Value // - \0 // - \0 // - Journal Path // - \0 // - WAL Path (zWALName) // - \0 // // The sqlite3_create_filename() interface and the databaseFilename() utility // that is used by sqlite3_filename_database() and kin also depend on the // specific formatting and order of the various filenames, so if the format // changes here, be sure to change it there as well. pPtr = Xsqlite3MallocZero(tls, (uint64(unsafe.Sizeof(Pager{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))+uint64((pcacheSize+7)&libc.CplInt32(7))+uint64(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile+7)&libc.CplInt32(7))+uint64(journalFileSize*2)+uint64(unsafe.Sizeof(uintptr(0)))+uint64(4)+uint64(nPathname)+uint64(1)+uint64(nUriByte)+uint64(nPathname)+uint64(8)+uint64(1)+uint64(nPathname)+uint64(4)+uint64(1)+uint64(3)) if !!(pPtr != 0) { goto __14 } Xsqlite3DbFree(tls, uintptr(0), zPathname) return SQLITE_NOMEM __14: ; *(*uintptr)(unsafe.Pointer(bp /* pPager */)) = pPtr pPtr += uintptr((uint64(unsafe.Sizeof(Pager{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpPCache = pPtr pPtr += uintptr((pcacheSize + 7) & libc.CplInt32(7)) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd = pPtr pPtr += uintptr(((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile + 7) & libc.CplInt32(7)) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Fsjfd = pPtr pPtr += uintptr(journalFileSize) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Fjfd = pPtr pPtr += uintptr(journalFileSize) libc.Xmemcpy(tls, pPtr, bp, uint64(unsafe.Sizeof(uintptr(0)))) pPtr += uintptr(unsafe.Sizeof(uintptr(0))) // Fill in the Pager.zFilename and pPager.zQueryParam fields pPtr += uintptr(4) // Skip zero prefix (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename = pPtr if !(nPathname > 0) { goto __15 } libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname + 1) if !(zUri != 0) { goto __16 } libc.Xmemcpy(tls, pPtr, zUri, uint64(nUriByte)) pPtr += uintptr(nUriByte) goto __17 __16: pPtr++ __17: ; __15: ; // Fill in Pager.zJournal if !(nPathname > 0) { goto __18 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) libc.Xmemcpy(tls, pPtr, ts+5224, uint64(8)) pPtr += uintptr(8 + 1) goto __19 __18: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = uintptr(0) __19: ; // Fill in Pager.zWal if !(nPathname > 0) { goto __20 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint64(nPathname)) pPtr += uintptr(nPathname) libc.Xmemcpy(tls, pPtr, ts+5233, uint64(4)) pPtr += uintptr(4 + 1) goto __21 __20: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = uintptr(0) __21: ; _ = pPtr // Suppress warning about unused pPtr value if !(nPathname != 0) { goto __22 } Xsqlite3DbFree(tls, uintptr(0), zPathname) __22: ; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpVfs = pVfs (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FvfsFlags = U32(vfsFlags) // Open the pager file. if !(zFilename != 0 && *(*int8)(unsafe.Pointer(zFilename)) != 0) { goto __23 } *(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 // VFS flags returned by xOpen() rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd, vfsFlags, bp+8) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmemVfs = U8(libc.AssignInt32(&memJM, libc.Bool32(*(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_MEMORY != 0))) readOnly = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) // If the file was successfully opened for read/write access, // choose a default page size in case we have to create the // database file. The default page size is the maximum of: // // + SQLITE_DEFAULT_PAGE_SIZE, // + The value returned by sqlite3OsSectorSize() // + The largest page size that can be written atomically. if !(rc == SQLITE_OK) { goto __25 } iDc = Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd) if !!(readOnly != 0) { goto __26 } setSectorSize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) if !(*(*U32)(unsafe.Pointer(bp + 12)) < (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FsectorSize) { goto __27 } if !((*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FsectorSize > U32(SQLITE_MAX_DEFAULT_PAGE_SIZE)) { goto __28 } *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = U32(SQLITE_MAX_DEFAULT_PAGE_SIZE) goto __29 __28: *(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */)) = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FsectorSize __29: ; __27: ; __26: ; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+5238, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+5245, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY goto act_like_temp_file __30: ; __25: ; goto __24 __23: // If a temporary file is requested, it is not opened immediately. // In this case we accept the default page size and delay actually // opening the file until the first call to OsWrite(). // // This branch is also run for an in-memory database. An in-memory // database is the same as a temp-file that is never written out to // disk and uses an in-memory rollback journal. // // This branch also runs for files marked as immutable. act_like_temp_file: tempFile = 1 (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FeState = U8(PAGER_READER) // Pretend we already have a lock (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FeLock = U8(EXCLUSIVE_LOCK) // Pretend we are in EXCLUSIVE mode (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(1) // Do no locking readOnly = vfsFlags & SQLITE_OPEN_READONLY __24: ; // The following call to PagerSetPagesize() serves to set the value of // Pager.pageSize and to allocate the Pager.pTmpSpace buffer. if !(rc == SQLITE_OK) { goto __31 } rc = Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */)), bp+12, -1) __31: ; // Initialize the PCache object. if !(rc == SQLITE_OK) { goto __32 } nExtra = (nExtra + 7) & libc.CplInt32(7) rc = Xsqlite3PcacheOpen(tls, int32(*(*U32)(unsafe.Pointer(bp + 12 /* szPageDflt */))), nExtra, libc.BoolInt32(!(memDb != 0)), func() uintptr { if !(memDb != 0) { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{pagerStress})) } return uintptr(0) }(), *(*uintptr)(unsafe.Pointer(bp /* pPager */)), (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpPCache) __32: ; // If an error occurred above, free the Pager structure and close the file. if !(rc != SQLITE_OK) { goto __33 } Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd) Xsqlite3PageFree(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FpTmpSpace) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) return rc __33: ; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FuseJournal = U8(useJournal) // pPager->stmtOpen = 0; // pPager->stmtInUse = 0; // pPager->nRef = 0; // pPager->stmtSize = 0; // pPager->stmtJSize = 0; // pPager->nPage = 0; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmxPgno = Pgno(SQLITE_MAX_PAGE_COUNT) // pPager->state = PAGER_UNLOCK; // pPager->errMask = 0; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile = U8(tempFile) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FexclusiveMode = U8(tempFile) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FchangeCountDone = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmemDb = U8(memDb) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FreadOnly = U8(readOnly) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoSync = (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FtempFile if !((*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnoSync != 0) { goto __34 } goto __35 __34: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FfullSync = U8(1) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FextraSync = U8(0) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FsyncFlags = U8(SQLITE_SYNC_NORMAL) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FwalSyncFlags = U8(SQLITE_SYNC_NORMAL | int32(SQLITE_SYNC_NORMAL)<<2) __35: ; // pPager->pFirst = 0; // pPager->pFirstSynced = 0; // pPager->pLast = 0; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnExtra = U16(nExtra) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalSizeLimit = int64(-1) setSectorSize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) if !!(useJournal != 0) { goto __36 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_OFF) goto __37 __36: if !(memDb != 0 || memJM != 0) { goto __38 } (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FjournalMode = U8(PAGER_JOURNALMODE_MEMORY) __38: ; __37: ; // pPager->xBusyHandler = 0; // pPager->pBusyHandlerArg = 0; (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FxReiniter = xReinit setGetterMethod(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */))) // memset(pPager->aHash, 0, sizeof(pPager->aHash)); // pPager->szMmap = SQLITE_DEFAULT_MMAP_SIZE // will be set by btree.c *(*uintptr)(unsafe.Pointer(ppPager)) = *(*uintptr)(unsafe.Pointer(bp /* pPager */)) return SQLITE_OK } // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58254:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } pPager = *(*uintptr)(unsafe.Pointer(zName - uintptr(4) - uintptr(uint64(unsafe.Sizeof(uintptr(0)))))) return (*Pager)(unsafe.Pointer(pPager)).Ffd } // This function is called after transitioning from PAGER_UNLOCK to // PAGER_SHARED state. It tests if there is a hot journal present in // the file-system for the given pager. A hot journal is one that // needs to be played back. According to this function, a hot-journal // file exists if the following criteria are met: // // * The journal file exists in the file system, and // * No process holds a RESERVED or greater lock on the database file, and // * The database file itself is greater than 0 bytes in size, and // * The first byte of the journal file exists and is not 0x00. // // If the current size of the database file is 0 but a journal file // exists, that is probably an old journal left over from a prior // database with the same name. In this case the journal file is // just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK // is returned. // // This routine does not check if there is a super-journal filename // at the end of the file. If there is, and that super-journal file // does not exist, then the journal file is not really hot. In this // case this routine will return a false-positive. The pager_playback() // routine will discover that the journal file is not really hot and // will not roll it back. // // If a hot-journal file is found to exist, *pExists is set to 1 and // SQLITE_OK returned. If no hot-journal file is present, *pExists is // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58295:12: */ bp := tls.Alloc(17) defer tls.Free(17) var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs var rc int32 = SQLITE_OK // Return code *(*int32)(unsafe.Pointer(bp /* exists */)) = 1 // True if a journal file is present var jrnlOpen int32 = libc.BoolInt32(!!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0))) *(*int32)(unsafe.Pointer(pExists)) = 0 if !(jrnlOpen != 0) { rc = Xsqlite3OsAccess(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp) } if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { *(*int32)(unsafe.Pointer(bp + 4 /* locked */)) = 0 // True if some process holds a RESERVED lock // Race condition here: Another process might have been holding the // the RESERVED lock and have a journal open at the sqlite3OsAccess() // call above, but then delete the journal and drop the lock before // we get to the following sqlite3OsCheckReservedLock() call. If that // is the case, this routine might think there is a hot journal when // in fact there is none. This results in a false-positive which will // be dealt with by the playback routine. Ticket #3883. rc = Xsqlite3OsCheckReservedLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+4) if rc == SQLITE_OK && !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) { // var nPage Pgno at bp+8, 4 // Number of pages in database file rc = pagerPagecount(tls, pPager, bp+8) if rc == SQLITE_OK { // If the database is zero pages in size, that means that either (1) the // journal is a remnant from a prior database with the same name where // the database file but not the journal was deleted, or (2) the initial // transaction that populates a new database is being rolled back. // In either case, the journal file can be deleted. However, take care // not to delete the journal file if it is already open due to // journal_mode=PERSIST. if *(*Pgno)(unsafe.Pointer(bp + 8)) == Pgno(0) && !(jrnlOpen != 0) { Xsqlite3BeginBenignMalloc(tls) if pagerLockDb(tls, pPager, RESERVED_LOCK) == SQLITE_OK { Xsqlite3OsDelete(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { pagerUnlockDb(tls, pPager, SHARED_LOCK) } } Xsqlite3EndBenignMalloc(tls) } else { // The journal file exists and no other connection has a reserved // or greater lock on the database file. Now check that there is // at least one non-zero bytes at the start of the journal file. // If there is, then we consider this journal to be hot. If not, // it can be ignored. if !(jrnlOpen != 0) { *(*int32)(unsafe.Pointer(bp + 12 /* f */)) = SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_JOURNAL rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, *(*int32)(unsafe.Pointer(bp + 12 /* f */)), bp+12) } if rc == SQLITE_OK { *(*U8)(unsafe.Pointer(bp + 16 /* first */)) = U8(0) rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16, 1, int64(0)) if rc == SQLITE_IOERR|int32(2)<<8 { rc = SQLITE_OK } if !(jrnlOpen != 0) { Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) } *(*int32)(unsafe.Pointer(pExists)) = libc.Bool32(int32(*(*U8)(unsafe.Pointer(bp + 16))) != 0) } else if rc == SQLITE_CANTOPEN { // If we cannot open the rollback journal file in order to see if // it has a zero header, that might be due to an I/O error, or // it might be due to the race condition described above and in // ticket #3883. Either way, assume that the journal is hot. // This might be a false positive. But if it is, then the // automatic journal playback and recovery mechanism will deal // with it under an EXCLUSIVE lock where we do not need to // worry so much with race conditions. *(*int32)(unsafe.Pointer(pExists)) = 1 rc = SQLITE_OK } } } } } return rc } // This function is called to obtain a shared lock on the database file. // It is illegal to call sqlite3PagerGet() until after this function // has been successfully called. If a shared-lock is already held when // this function is called, it is a no-op. // // The following operations are also performed by this function. // // 1) If the pager is currently in PAGER_OPEN state (no lock held // on the database file), then an attempt is made to obtain a // SHARED lock on the database file. Immediately after obtaining // the SHARED lock, the file-system is checked for a hot-journal, // which is played back if present. Following any hot-journal // rollback, the contents of the cache are validated by checking // the 'change-counter' field of the database file header and // discarded if they are found to be invalid. // // 2) If the pager is running in exclusive-mode, and there are currently // no outstanding references to any pages, and is in the error state, // then an attempt is made to clear the error state by discarding // the contents of the page cache and rolling back any open journal // file. // // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58415:20: */ bp := tls.Alloc(28) defer tls.Free(28) var rc int32 // var fout int32 at bp+8, 4 var f int32 var pVfs uintptr // var bExists int32 at bp+4, 4 // The shared-lock has just been acquired then check to // see if the database has been modified. If the database has changed, // flush the cache. The hasHeldSharedLock flag prevents this from // occurring on the very first access to a file, in order to save a // single unnecessary sqlite3OsRead() call at the start-up. // // Database changes are detected by looking at 15 bytes beginning // at offset 24 into the file. The first 4 of these 16 bytes are // a 32-bit counter that is incremented with each change. The // other bytes change randomly with each file change when // a codec is in use. // // There is a vanishingly small chance that a change will not be // detected. The chance of an undetected change is so small that // it can be neglected. // var dbFileVers [16]int8 at bp+12, 16 // var bHotJournal int32 at bp, 4 rc = SQLITE_OK // Return code // This routine is only called from b-tree and only when there are no // outstanding pages. This implies that the pager state should either // be OPEN or READER. READER is only possible if the pager is or was in // exclusive access mode. if !(!((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN) { goto __1 } *(*int32)(unsafe.Pointer(bp /* bHotJournal */)) = 1 // True if there exists a hot journal-file rc = pager_wait_on_lock(tls, pPager, SHARED_LOCK) if !(rc != SQLITE_OK) { goto __2 } goto failed __2: ; // If a journal file exists, and there is no RESERVED lock on the // database file, then it either needs to be played back or deleted. if !(int32((*Pager)(unsafe.Pointer(pPager)).FeLock) <= SHARED_LOCK) { goto __3 } rc = hasHotJournal(tls, pPager, bp) __3: ; if !(rc != SQLITE_OK) { goto __4 } goto failed __4: ; if !(*(*int32)(unsafe.Pointer(bp)) != 0) { goto __5 } if !((*Pager)(unsafe.Pointer(pPager)).FreadOnly != 0) { goto __6 } rc = SQLITE_READONLY | int32(3)<<8 goto failed __6: ; // Get an EXCLUSIVE lock on the database file. At this point it is // important that a RESERVED lock is not obtained on the way to the // EXCLUSIVE lock. If it were, another process might open the // database file, detect the RESERVED lock, and conclude that the // database is safe to read while this process is still rolling the // hot-journal back. // // Because the intermediate RESERVED lock is not requested, any // other process attempting to access the database file will get to // this point in the code and fail to obtain its own EXCLUSIVE lock // on the database file. // // Unless the pager is in locking_mode=exclusive mode, the lock is // downgraded to SHARED_LOCK before this function returns. rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) if !(rc != SQLITE_OK) { goto __7 } goto failed __7: ; // If it is not already open and the file exists on disk, open the // journal for read/write access. Write access is required because // in exclusive-access mode the file descriptor will be kept open // and possibly used for a transaction later on. Also, write-access // is usually required to finalize the journal in journal_mode=persist // mode (and also for journal_mode=truncate on some systems). // // If the journal does not exist, it usually means that some // other connection managed to get in and roll it back before // this connection obtained the exclusive lock above. Or, it // may mean that the pager was in the error-state when this // function was called and the journal file does not exist. if !(!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF) { goto __8 } pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs // True if journal file exists rc = Xsqlite3OsAccess(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp+4) if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 4)) != 0) { goto __9 } *(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 f = SQLITE_OPEN_READWRITE | SQLITE_OPEN_MAIN_JOURNAL rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8) if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } rc = Xsqlite3CantopenError(tls, 58499) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; __9: ; __8: ; // Playback and delete the journal. Drop the database write // lock and reacquire the read lock. Purge the cache before // playing back the hot-journal so that we don't end up with // an inconsistent cache. Sync the hot journal before playing // it back since the process that crashed and left the hot journal // probably did not sync it and we are required to always sync // the journal before playing it back. if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { goto __11 } rc = pagerSyncHotJournal(tls, pPager) if !(rc == SQLITE_OK) { goto __13 } rc = pager_playback(tls, pPager, libc.BoolInt32(!((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0))) (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) __13: ; goto __12 __11: if !!(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { goto __14 } pagerUnlockDb(tls, pPager, SHARED_LOCK) __14: ; __12: ; if !(rc != SQLITE_OK) { goto __15 } // This branch is taken if an error occurs while trying to open // or roll back a hot-journal while holding an EXCLUSIVE lock. The // pager_unlock() routine will be called before returning to unlock // the file. If the unlock attempt fails, then Pager.eLock must be // set to UNKNOWN_LOCK (see the comment above the #define for // UNKNOWN_LOCK above for an explanation). // // In order to get pager_unlock() to do this, set Pager.eState to // PAGER_ERROR now. This is not actually counted as a transition // to ERROR state in the state diagram at the top of this file, // since we know that the same call to pager_unlock() will very // shortly transition the pager object to the OPEN state. Calling // assert_pager_state() would fail now, as it should not be possible // to be in ERROR state when there are zero outstanding page // references. pager_error(tls, pPager, rc) goto failed __15: ; __5: ; if !(!(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && (*Pager)(unsafe.Pointer(pPager)).FhasHeldSharedLock != 0) { goto __16 } rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12, int32(unsafe.Sizeof([16]int8{})), int64(24)) if !(rc != SQLITE_OK) { goto __17 } if !(rc != SQLITE_IOERR|int32(2)<<8) { goto __18 } goto failed __18: ; libc.Xmemset(tls, bp+12, 0, uint64(unsafe.Sizeof([16]int8{}))) __17: ; if !(libc.Xmemcmp(tls, pPager+136, bp+12, uint64(unsafe.Sizeof([16]int8{}))) != 0) { goto __19 } pager_reset(tls, pPager) // Unmap the database file. It is possible that external processes // may have truncated the database file and then extended it back // to its original size while this process was not holding a lock. // In this case there may exist a Pager.pMap mapping that appears // to be the right size but is not actually valid. Avoid this // possibility by unmapping the db here. if !((*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0) { goto __20 } Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int64(0), uintptr(0)) __20: ; __19: ; __16: ; // If there is a WAL file in the file-system, open this database in WAL // mode. Otherwise, the following function call is a no-op. rc = pagerOpenWalIfPresent(tls, pPager) __1: ; if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { goto __21 } rc = pagerBeginReadTransaction(tls, pPager) __21: ; if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 && int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_OPEN && rc == SQLITE_OK) { goto __22 } rc = pagerPagecount(tls, pPager, pPager+32) __22: ; failed: if !(rc != SQLITE_OK) { goto __23 } pager_unlock(tls, pPager) goto __24 __23: (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) (*Pager)(unsafe.Pointer(pPager)).FhasHeldSharedLock = U8(1) __24: ; return rc } // If the reference count has reached zero, rollback any active // transaction and unlock the pager. // // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58632:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) } } // The page getter methods each try to acquire a reference to a // page with page number pgno. If the requested reference is // successfully obtained, it is copied to *ppPage and SQLITE_OK returned. // // There are different implementations of the getter method depending // on the current state of the pager. // // getPageNormal() -- The normal getter // getPageError() -- Used if the pager is in an error state // getPageMmap() -- Used if memory-mapped I/O is enabled // // If the requested page is already in the cache, it is returned. // Otherwise, a new page object is allocated and populated with data // read from the database file. In some cases, the pcache module may // choose not to allocate a new page object and may reuse an existing // object with no outstanding references. // // The extra data appended to a page is always initialized to zeros the // first time a page is loaded into memory. If the page requested is // already in the cache when this function is called, then the extra // data is left as it was when the page object was last used. // // If the database image is smaller than the requested page or if // the flags parameter contains the PAGER_GET_NOCONTENT bit and the // requested page is not already stored in the cache, then no // actual disk read occurs. In this case the memory image of the // page is initialized to all zeros. // // If PAGER_GET_NOCONTENT is true, it means that we do not care about // the contents of the page. This occurs in two scenarios: // // a) When reading a free-list leaf page from the database, and // // b) When a savepoint is being rolled back and we need to load // a new page into the cache to be filled with the data read // from the savepoint journal. // // If PAGER_GET_NOCONTENT is true, then the data returned is zeroed instead // of being read from the database. Additionally, the bits corresponding // to pgno in Pager.pInJournal (bitvec of pages already written to the // journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open // savepoints are set. This means if the page is made writable at any // point in the future, using a call to sqlite3PagerWrite(), its contents // will not be journaled. This saves IO. // // The acquisition might fail for several reasons. In all cases, // an appropriate error code is returned and *ppPage is set to NULL. // // See also sqlite3PagerLookup(). Both this routine and Lookup() attempt // to find a page in the in-memory cache first. If the page is not already // in memory, this routine goes to disk to read it in whereas Lookup() // just returns 0. This routine acquires a read-lock the first time it // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58696:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 var pPg uintptr var noContent U8 // True if PAGER_GET_NOCONTENT is set // var pBase uintptr at bp, 8 rc = SQLITE_OK if !(pgno == Pgno(0)) { goto __1 } return Xsqlite3CorruptError(tls, 58712) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { goto __2 } pPg = uintptr(0) rc = Xsqlite3PcacheFetchStress(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, bp) if !(rc != SQLITE_OK) { goto __3 } goto pager_acquire_err __3: ; if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { goto __4 } rc = SQLITE_NOMEM goto pager_acquire_err __4: ; __2: ; pPg = libc.AssignPtrUintptr(ppPage, Xsqlite3PcacheFetchFinish(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, *(*uintptr)(unsafe.Pointer(bp /* pBase */)))) noContent = U8(libc.Bool32(flags&PAGER_GET_NOCONTENT != 0)) if !((*PgHdr)(unsafe.Pointer(pPg)).FpPager != 0 && !(noContent != 0)) { goto __5 } // In this case the pcache already contains an initialized copy of // the page. Return without further ado. *(*int32)(unsafe.Pointer(pPager + 240))++ return SQLITE_OK goto __6 __5: // The pager cache has created a new page. Its content needs to // be initialized. But first some error checks: // // (*) obsolete. Was: maximum page number is 2^31 // (2) Never try to fetch the locking page if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } rc = Xsqlite3CorruptError(tls, 58744) goto pager_acquire_err __7: ; (*PgHdr)(unsafe.Pointer(pPg)).FpPager = pPager if !(!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0)) || (*Pager)(unsafe.Pointer(pPager)).FdbSize < pgno || noContent != 0) { goto __8 } if !(pgno > (*Pager)(unsafe.Pointer(pPager)).FmxPgno) { goto __10 } rc = SQLITE_FULL goto pager_acquire_err __10: ; if !(noContent != 0) { goto __11 } // Failure to set the bits in the InJournal bit-vectors is benign. // It merely means that we might do some extra work to journal a // page that does not need to be journaled. Nevertheless, be sure // to test the case where a malloc error occurs while trying to set // a bit in a bit vector. Xsqlite3BeginBenignMalloc(tls) if !(pgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize) { goto __12 } Xsqlite3BitvecSet(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, pgno) __12: ; addToSavepointBitvecs(tls, pPager, pgno) Xsqlite3EndBenignMalloc(tls) __11: ; libc.Xmemset(tls, (*PgHdr)(unsafe.Pointer(pPg)).FpData, 0, uint64((*Pager)(unsafe.Pointer(pPager)).FpageSize)) goto __9 __8: ; *(*int32)(unsafe.Pointer(pPager + 240 + 1*4))++ rc = readDbPage(tls, pPg) if !(rc != SQLITE_OK) { goto __13 } goto pager_acquire_err __13: ; __9: ; __6: ; return SQLITE_OK pager_acquire_err: ; if !(pPg != 0) { goto __14 } Xsqlite3PcacheDrop(tls, pPg) __14: ; pagerUnlockIfUnused(tls, pPager) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return rc } // The page getter for when memory-mapped I/O is enabled func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58798:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) = uintptr(0) *(*U32)(unsafe.Pointer(bp /* iFrame */)) = U32(0) // Frame to read from WAL file // It is acceptable to use a read-only (mmap) page for any page except // page 1 if there is no write-transaction open or the ACQUIRE_READONLY // flag was specified by the caller. And so long as the db is not a // temporary or in-memory database. var bMmapOk int32 = libc.Bool32(pgno > Pgno(1) && (int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER || flags&PAGER_GET_READONLY != 0)) // Optimization note: Adding the "pgno<=1" term before "pgno==0" here // allows the compiler optimizer to reuse the results of the "pgno>1" // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { return Xsqlite3CorruptError(tls, 58823) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pgno, bp) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return rc } } if bMmapOk != 0 && *(*U32)(unsafe.Pointer(bp)) == U32(0) { *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */)) = uintptr(0) rc = Xsqlite3OsFetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), bp+8) if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_READER || (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) = Xsqlite3PagerLookup(tls, pPager, pgno) } if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { rc = pagerAcquireMapPage(tls, pPager, pgno, *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */)), bp+16) } else { Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, *(*uintptr)(unsafe.Pointer(bp + 8 /* pData */))) } if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */)) return SQLITE_OK } } if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return rc } } return getPageNormal(tls, pPager, pgno, ppPage, flags) } // The page getter method for when the pager is an error state func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58867:12: */ _ = pgno _ = flags *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return (*Pager)(unsafe.Pointer(pPager)).FerrCode } // Dispatch all page fetch requests to the appropriate getter method. func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58883:20: */ // printf("PAGE %u\n", pgno); fflush(stdout); return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxGet})).f(tls, pPager, pgno, ppPage, flags) } // Acquire a page if it is already in the in-memory cache. Do // not read the page from disk. Return a pointer to the page, // or 0 if the page is not in cache. // // See also sqlite3PagerGet(). The difference between this routine // and sqlite3PagerGet() is that _get() will go to the disk and read // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58904:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) if pPage == uintptr(0) { return uintptr(0) } return Xsqlite3PcacheFetchFinish(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, pPage) } // Release a page reference. // // The sqlite3PagerUnref() and sqlite3PagerUnrefNotNull() may only be // used if we know that the page being released is not the last page. // The btree layer always holds page1 open until the end, so these first // to routines can be used to release any page other than BtShared.pPage1. // // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58927:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped pagerReleaseMapPage(tls, pPg) } else { Xsqlite3PcacheRelease(tls, pPg) } // Do not use this routine to release the last reference to page1 } func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58939:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58942:21: */ var pPager uintptr // Page1 is never memory mapped pPager = (*DbPage)(unsafe.Pointer(pPg)).FpPager Xsqlite3PcacheRelease(tls, pPg) pagerUnlockIfUnused(tls, pPager) } // This function is called at the start of every write transaction. // There must already be a RESERVED or EXCLUSIVE lock on the database // file when this routine is called. // // Open the journal file for pager pPager and write a journal header // to the start of it. If there are active savepoints, open the sub-journal // as well. This function is only used when the journal file is being // opened to write a rollback log for a transaction. It is not used // when opening a hot journal file to roll it back. // // If the journal file is already open (as it may be in exclusive mode), // then this function just writes a journal header to the start of the // already open file. // // Whether or not the journal file is opened by this function, the // Pager.pInJournal bitvec structure is allocated. // // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:58974:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer // If already in the error state, this function is a no-op. But on // the other hand, this routine is never called if we are already in // an error state. if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { return (*Pager)(unsafe.Pointer(pPager)).FerrCode } if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { (*Pager)(unsafe.Pointer(pPager)).FpInJournal = Xsqlite3BitvecCreate(tls, (*Pager)(unsafe.Pointer(pPager)).FdbSize) if (*Pager)(unsafe.Pointer(pPager)).FpInJournal == uintptr(0) { return SQLITE_NOMEM } // Open the journal file if it is not already open. if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_MEMORY { Xsqlite3MemJournalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) } else { var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE var nSpill int32 if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { flags = flags | (SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_JOURNAL) nSpill = Xsqlite3Config.FnStmtSpill } else { flags = flags | SQLITE_OPEN_MAIN_JOURNAL nSpill = jrnlBufferSize(tls, pPager) } // Verify that the database still has the same name as it did when // it was originally opened. rc = databaseIsUnmoved(tls, pPager) if rc == SQLITE_OK { rc = Xsqlite3JournalOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, flags, nSpill) } } } // Write the first journal header to the journal file and open // the sub-journal if necessary. if rc == SQLITE_OK { // TODO: Check if all of these are really required. (*Pager)(unsafe.Pointer(pPager)).FnRec = 0 (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) (*Pager)(unsafe.Pointer(pPager)).FsetSuper = U8(0) (*Pager)(unsafe.Pointer(pPager)).FjournalHdr = int64(0) rc = writeJournalHdr(tls, pPager) } } if rc != SQLITE_OK { Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) } else { (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_CACHEMOD) } return rc } // Begin a write-transaction on the specified pager object. If a // write-transaction has already been opened, this function is a no-op. // // If the exFlag argument is false, then acquire at least a RESERVED // lock on the database file. If exFlag is true, then acquire at least // an EXCLUSIVE lock. If such a lock is already held, no locking // functions need be called. // // If the subjInMemory argument is non-zero, then any sub-journal opened // within this transaction will be opened as an in-memory file. This // has no effect if the sub-journal is already opened (as it may be when // running in exclusive mode) or if the transaction does not require a // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59063:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { return (*Pager)(unsafe.Pointer(pPager)).FerrCode } (*Pager)(unsafe.Pointer(pPager)).FsubjInMemory = U8(subjInMemory) if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER { if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { // If the pager is configured to use locking_mode=exclusive, and an // exclusive lock on the database is not already held, obtain it now. if (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, -1) != 0 { rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) if rc != SQLITE_OK { return rc } Xsqlite3WalExclusiveMode(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, 1) } // Grab the write lock on the log file. If successful, upgrade to // PAGER_RESERVED state. Otherwise, return an error code to the caller. // The busy-handler is not invoked if another connection already // holds the write-lock. If possible, the upper layer will call it. rc = Xsqlite3WalBeginWriteTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } else { // Obtain a RESERVED lock on the database file. If the exFlag parameter // is true, then immediately upgrade this to an EXCLUSIVE lock. The // busy-handler callback can be used when upgrading to the EXCLUSIVE // lock, but not when obtaining the RESERVED lock. rc = pagerLockDb(tls, pPager, RESERVED_LOCK) if rc == SQLITE_OK && exFlag != 0 { rc = pager_wait_on_lock(tls, pPager, EXCLUSIVE_LOCK) } } if rc == SQLITE_OK { // Change to WRITER_LOCKED state. // // WAL mode sets Pager.eState to PAGER_WRITER_LOCKED or CACHEMOD // when it has an open transaction, but never to DBMOD or FINISHED. // This is because in those states the code to roll back savepoint // transactions may copy data from the sub-journal into the database // file as well as into the page cache. Which would be incorrect in // WAL mode. (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_LOCKED) (*Pager)(unsafe.Pointer(pPager)).FdbHintSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize (*Pager)(unsafe.Pointer(pPager)).FdbFileSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize (*Pager)(unsafe.Pointer(pPager)).FjournalOff = int64(0) } } return rc } // Write page pPg onto the end of the rollback journal. func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59132:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 var pData2 uintptr var iOff I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff // We should never write to the journal file the page that // contains the database locks. The following assert verifies // that we do not. pData2 = (*PgHdr)(unsafe.Pointer(pPg)).FpData cksum = pager_cksum(tls, pPager, pData2) // Even if an IO or diskfull error occurs while journalling the // page in the block above, set the need-sync flag for the page. // Otherwise, when the transaction is rolled back, the logic in // playback_one_page() will think that the page needs to be restored // in the database file. And if an IO error occurs while doing so, // then corruption may follow. *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_NEED_SYNC) rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iOff, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) if rc != SQLITE_OK { return rc } rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, pData2, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), iOff+int64(4)) if rc != SQLITE_OK { return rc } rc = write32bits(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iOff+(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(4), cksum) if rc != SQLITE_OK { return rc } *(*I64)(unsafe.Pointer(pPager + 96)) += int64(8) + (*Pager)(unsafe.Pointer(pPager)).FpageSize (*Pager)(unsafe.Pointer(pPager)).FnRec++ rc = Xsqlite3BitvecSet(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) rc = rc | addToSavepointBitvecs(tls, pPager, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) return rc } // Mark a single data page as writeable. The page is written into the // main journal or sub-journal as required. If the page is written into // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59189:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK // This routine is not called unless a write-transaction has already // been started. The journal file may or may not be open at this point. // It is never called in the ERROR state. // The journal file needs to be opened. Higher level routines have already // obtained the necessary locks to begin the write-transaction, but the // rollback journal might not yet be open. Open it now if this is the case. // // This is done before calling sqlite3PcacheMakeDirty() on the page. // Otherwise, if it were done after calling sqlite3PcacheMakeDirty(), then // an error might occur and the pager would end up in WRITER_LOCKED state // with pages marked as dirty in the cache. if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED { rc = pager_open_journal(tls, pPager) if rc != SQLITE_OK { return rc } } // Mark the page that is about to be modified as dirty. Xsqlite3PcacheMakeDirty(tls, pPg) // If a rollback journal is in use, them make sure the page that is about // to change is in the rollback journal, or if the page is a new page off // then end of the file, make sure it is marked as PGHDR_NEED_SYNC. if (*Pager)(unsafe.Pointer(pPager)).FpInJournal != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno) == 0 { if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize { rc = pagerAddPageToRollbackJournal(tls, pPg) if rc != SQLITE_OK { return rc } } else { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_WRITER_DBMOD { *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_NEED_SYNC) } } } // The PGHDR_DIRTY bit is set above when the page was added to the dirty-list // and before writing the page into the rollback journal. Wait until now, // after the page has been successfully journalled, before setting the // PGHDR_WRITEABLE bit that indicates that the page can be safely modified. *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_WRITEABLE) // If the statement journal is open and the page is not in it, // then write the page into the statement journal. if (*Pager)(unsafe.Pointer(pPager)).FnSavepoint > 0 { rc = subjournalPageIfRequired(tls, pPg) } // Update the database size and return. if (*Pager)(unsafe.Pointer(pPager)).FdbSize < (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { (*Pager)(unsafe.Pointer(pPager)).FdbSize = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno } return rc } // This is a variant of sqlite3PagerWrite() that runs when the sector size // is larger than the page size. SQLite makes the (reasonable) assumption that // all bytes of a sector are written together by hardware. Hence, all bytes of // a sector need to be journalled in case of a power loss in the middle of // a write. // // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59281:28: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // Return code var nPageCount Pgno // Total number of pages in database file var pg1 Pgno // First page of the sector pPg is located on. var nPage int32 = 0 // Number of pages starting at pg1 to journal var ii int32 // Loop counter var needSync int32 = 0 // True if any page has PGHDR_NEED_SYNC var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager // The pager that owns pPg var nPagePerSector Pgno = Pgno(I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) / (*Pager)(unsafe.Pointer(pPager)).FpageSize) // Set the doNotSpill NOSYNC bit to 1. This is because we cannot allow // a journal header to be written between the pages journaled by // this function. *(*U8)(unsafe.Pointer(pPager + 25)) |= U8(SPILLFLAG_NOSYNC) // This trick assumes that both the page-size and sector-size are // an integer power of 2. It sets variable pg1 to the identifier // of the first page of the sector pPg is located on. pg1 = ((*PgHdr)(unsafe.Pointer(pPg)).Fpgno-Pgno(1)) & ^(nPagePerSector-Pgno(1)) + Pgno(1) nPageCount = (*Pager)(unsafe.Pointer(pPager)).FdbSize if (*PgHdr)(unsafe.Pointer(pPg)).Fpgno > nPageCount { nPage = int32((*PgHdr)(unsafe.Pointer(pPg)).Fpgno - pg1 + Pgno(1)) } else if pg1+nPagePerSector-Pgno(1) > nPageCount { nPage = int32(nPageCount + Pgno(1) - pg1) } else { nPage = int32(nPagePerSector) } for ii = 0; ii < nPage && rc == SQLITE_OK; ii++ { var pg Pgno = pg1 + Pgno(ii) // var pPage uintptr at bp, 8 if pg == (*PgHdr)(unsafe.Pointer(pPg)).Fpgno || !(Xsqlite3BitvecTest(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, pg) != 0) { if pg != Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)) { rc = Xsqlite3PagerGet(tls, pPager, pg, bp, 0) if rc == SQLITE_OK { rc = pager_write(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) if int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags)&PGHDR_NEED_SYNC != 0 { needSync = 1 } Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) } } } else if libc.AssignPtrUintptr(bp, Xsqlite3PagerLookup(tls, pPager, pg)) != uintptr(0) { if int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags)&PGHDR_NEED_SYNC != 0 { needSync = 1 } Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) } } // If the PGHDR_NEED_SYNC flag is set for any of the nPage pages // starting at pg1, then it needs to be set for all of them. Because // writing to any of these nPage pages may damage the others, the // journal file must contain sync()ed copies of all of them // before any of them can be written out to the database file. if rc == SQLITE_OK && needSync != 0 { for ii = 0; ii < nPage; ii++ { var pPage uintptr = Xsqlite3PagerLookup(tls, pPager, pg1+Pgno(ii)) if pPage != 0 { *(*U16)(unsafe.Pointer(pPage + 52)) |= U16(PGHDR_NEED_SYNC) Xsqlite3PagerUnrefNotNull(tls, pPage) } } } *(*U8)(unsafe.Pointer(pPager + 25)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_NOSYNC)) return rc } // Mark a data page as writeable. This routine must be called before // making changes to a page. The caller must check the return value // of this function and be careful not to change any page data unless // this routine returns SQLITE_OK. // // The difference between this function and pager_write() is that this // function also deals with the special case where 2 or more pages // fit on a single disk sector. In this case all co-resident pages // must have been written to the journal file before returning. // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59375:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { if (*Pager)(unsafe.Pointer(pPager)).FnSavepoint != 0 { return subjournalPageIfRequired(tls, pPg) } return SQLITE_OK } else if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { return (*Pager)(unsafe.Pointer(pPager)).FerrCode } else if (*Pager)(unsafe.Pointer(pPager)).FsectorSize > U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) { return pagerWriteLargeSector(tls, pPg) } else { return pager_write(tls, pPg) } return int32(0) } // Return TRUE if the page given in the argument was previously passed // to sqlite3PagerWrite(). In other words, return TRUE if it is ok // to change the content of the page. // A call to this routine tells the pager that it is not necessary to // write the information on page pPg back to the disk, even though // that page might be marked as dirty. This happens, for example, when // the page has been added as a leaf of the freelist and so its // content no longer matters. // // The overlying software layer calls this routine when all of the data // on the given page is unused. The pager marks the page as clean so // that it does not get written to disk. // // Tests show that this optimization can quadruple the speed of large // DELETE operations. // // This optimization cannot be used with a temp-file, as the page may // have been dirty at the start of the transaction. In that case, if // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59424:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(PGHDR_DONT_WRITE) *(*U16)(unsafe.Pointer(pPg + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_WRITEABLE)) } } // This routine is called to increment the value of the database file // change-counter, stored as a 4-byte big-endian integer starting at // byte offset 24 of the pager file. The secondary change counter at // 92 is also updated, as is the SQLite version number at offset 96. // // But this only happens if the pPager->changeCountDone flag is false. // To avoid excess churning of page 1, the update only happens once. // See also the pager_write_changecounter() routine that does an // unconditional update of the change counters. // // If the isDirectMode flag is zero, then this is done by calling // sqlite3PagerWrite() on page 1, then modifying the contents of the // page data. In this case the file will be updated when the current // transaction is committed. // // The isDirectMode flag may only be non-zero if the library was compiled // with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case, // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59458:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // Declare and initialize constant integer 'isDirect'. If the // atomic-write optimization is enabled in this build, then isDirect // is initialized to the value passed as the isDirectMode parameter // to this function. Otherwise, it is always set to zero. // // The idea is that if the atomic-write optimization is not // enabled at compile time, the compiler can omit the tests of // 'isDirect' below, as well as the block enclosed in the // "if( isDirect )" condition. _ = isDirectMode if !(int32((*Pager)(unsafe.Pointer(pPager)).FchangeCountDone) != 0) && (*Pager)(unsafe.Pointer(pPager)).FdbSize > Pgno(0) { // var pPgHdr uintptr at bp, 8 // Reference to page 1 // Open page 1 of the file for writing. rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) // If page one was fetched successfully, and this function is not // operating in direct-mode, make page 1 writable. When not in // direct mode, page 1 is always held in cache and hence the PagerGet() // above is always successful - hence the ALWAYS on rc==SQLITE_OK. if !(0 != 0) && rc == SQLITE_OK { rc = Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) } if rc == SQLITE_OK { // Actually do the update of the change counter pager_write_changecounter(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) // If running in direct mode, write the contents of page 1 to the file. if 0 != 0 { var zBuf uintptr zBuf = (*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPgHdr */)))).FpData if rc == SQLITE_OK { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, zBuf, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), int64(0)) *(*int32)(unsafe.Pointer(pPager + 240 + 2*4))++ } if rc == SQLITE_OK { // Update the pager's copy of the change-counter. Otherwise, the // next time a read transaction is opened the cache will be // flushed (as the change-counter values will not match). var pCopy uintptr = zBuf + 24 libc.Xmemcpy(tls, pPager+136, pCopy, uint64(unsafe.Sizeof([16]int8{}))) (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(1) } } else { (*Pager)(unsafe.Pointer(pPager)).FchangeCountDone = U8(1) } } // Release the page reference. Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) } return rc } // Sync the database file to disk. This is a no-op for in-memory databases // or pages with the Pager.noSync flag set. // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59541:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) if rc == SQLITE_NOTFOUND { rc = SQLITE_OK } if rc == SQLITE_OK && !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, int32((*Pager)(unsafe.Pointer(pPager)).FsyncFlags)) } return rc } // This function may only be called while a write-transaction is active in // rollback. If the connection is in WAL mode, this call is a no-op. // Otherwise, if the connection does not already have an EXCLUSIVE lock on // the database file, an attempt is made to obtain one. // // If the EXCLUSIVE lock is already held or the attempt to obtain it is // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59564:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { if 0 == libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { rc = pager_wait_on_lock(tls, pPager, EXCLUSIVE_LOCK) } } return rc } // Sync the database file for the pager pPager. zSuper points to the name // of a super-journal file that should be written into the individual // journal file. zSuper may be NULL, which is interpreted as no // super-journal (a single database transaction). // // This routine ensures that: // // * The database file change-counter is updated, // * the journal is synced (unless the atomic-write optimization is used), // * all dirty pages are written to the database file, // * the database file is truncated (if required), and // * the database file synced. // // The only thing that remains to commit the transaction is to finalize // (delete, truncate or zero the first part of) the journal file (or // delete the super-journal file if specified). // // Note that if zSuper==NULL, this does not overwrite a previous value // passed to an sqlite3PagerCommitPhaseOne() call. // // If the final parameter - noSync - is true, then the database file itself // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59606:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var pPageOne uintptr at bp, 8 var nNew Pgno var pList uintptr rc = SQLITE_OK // Return code // If a prior error occurred, report that error again. if !((*Pager)(unsafe.Pointer(pPager)).FerrCode != 0) { goto __1 } return (*Pager)(unsafe.Pointer(pPager)).FerrCode __1: ; // Provide the ability to easily simulate an I/O error during testing if !(Xsqlite3FaultSim(tls, 400) != 0) { goto __2 } return SQLITE_IOERR __2: ; // If no database changes have been made, return early. if !(int32((*Pager)(unsafe.Pointer(pPager)).FeState) < PAGER_WRITER_CACHEMOD) { goto __3 } return SQLITE_OK __3: ; if !(0 == pagerFlushOnCommit(tls, pPager, 1)) { goto __4 } // If this is an in-memory db, or no pages have been written to, or this // function has already been called, it is mostly a no-op. However, any // backup in progress needs to be restarted. Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) goto __5 __4: if !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0)) { goto __6 } *(*uintptr)(unsafe.Pointer(bp /* pPageOne */)) = uintptr(0) pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) if !(pList == uintptr(0)) { goto __8 } // Must have at least one page for the WAL commit flag. // Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) pList = *(*uintptr)(unsafe.Pointer(bp /* pPageOne */)) (*PgHdr)(unsafe.Pointer(pList)).FpDirty = uintptr(0) __8: ; if !(pList != 0) { goto __9 } rc = pagerWalFrames(tls, pPager, pList, (*Pager)(unsafe.Pointer(pPager)).FdbSize, 1) __9: ; Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageOne */))) if !(rc == SQLITE_OK) { goto __10 } Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) __10: ; goto __7 __6: // The bBatch boolean is true if the batch-atomic-write commit method // should be used. No rollback journal is created if batch-atomic-write // is enabled. rc = pager_incr_changecounter(tls, pPager, 0) if !(rc != SQLITE_OK) { goto __11 } goto commit_phase_one_exit __11: ; // Write the super-journal name into the journal file. If a // super-journal file name has already been written to the journal file, // or if zSuper is NULL (no super-journal), then this call is a no-op. rc = writeSuperJournal(tls, pPager, zSuper) if !(rc != SQLITE_OK) { goto __12 } goto commit_phase_one_exit __12: ; // Sync the journal file and write all dirty pages to the database. // If the atomic-update optimization is being used, this sync will not // create the journal file or perform any real IO. // // Because the change-counter page was just modified, unless the // atomic-update optimization is used it is almost certain that the // journal requires a sync here. However, in locking_mode=exclusive // on a system under memory pressure it is just possible that this is // not the case. In this case it is likely enough that the redundant // xSync() call will be changed to a no-op by the OS anyhow. rc = syncJournal(tls, pPager, 0) if !(rc != SQLITE_OK) { goto __13 } goto commit_phase_one_exit __13: ; pList = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) if !(BBatch == 0) { goto __14 } rc = pager_write_pagelist(tls, pPager, pList) __14: ; if !(rc != SQLITE_OK) { goto __15 } goto commit_phase_one_exit __15: ; Xsqlite3PcacheCleanAll(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) // If the file on disk is smaller than the database image, use // pager_truncate to grow the file here. This can happen if the database // image was extended as part of the current transaction and then the // last page in the db image moved to the free-list. In this case the // last page is never written out to disk, leaving the database file // undersized. Fix this now if it is the case. if !((*Pager)(unsafe.Pointer(pPager)).FdbSize > (*Pager)(unsafe.Pointer(pPager)).FdbFileSize) { goto __16 } nNew = (*Pager)(unsafe.Pointer(pPager)).FdbSize - Pgno(libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FdbSize == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)))) rc = pager_truncate(tls, pPager, nNew) if !(rc != SQLITE_OK) { goto __17 } goto commit_phase_one_exit __17: ; __16: ; // Finally, sync the database file. if !!(noSync != 0) { goto __18 } rc = Xsqlite3PagerSync(tls, pPager, zSuper) __18: ; __7: ; __5: ; commit_phase_one_exit: if !(rc == SQLITE_OK && !((*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0))) { goto __19 } (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_WRITER_FINISHED) __19: ; return rc } // When this function is called, the database file has been completely // updated to reflect the changes made by the current transaction and // synced to disk. The journal file still exists in the file-system // though, and if a failure occurs at this point it will eventually // be used as a hot-journal and the current transaction rolled back. // // This function finalizes the journal file, either by deleting, // truncating or partially zeroing it, so that it cannot be used // for hot-journal rollback. Once this is done the transaction is // irrevocably committed. // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59836:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. // But if (due to a coding error elsewhere in the system) it does get // called, just return the same error code without doing anything. if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { return (*Pager)(unsafe.Pointer(pPager)).FerrCode } (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ // An optimization. If the database was not actually modified during // this transaction, the pager is running in exclusive-mode and is // using persistent journals, then this function is a no-op. // // The start of the journal file currently contains a single journal // header with the nRec field set to 0. If such a journal is used as // a hot-journal during hot-journal rollback, 0 changes will be made // to the database file. So there is no need to zero the journal // header. Since the pager is in exclusive mode, there is no need // to drop any locks either. if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED && (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_PERSIST { (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_READER) return SQLITE_OK } rc = pager_end_transaction(tls, pPager, int32((*Pager)(unsafe.Pointer(pPager)).FsetSuper), 1) return pager_error(tls, pPager, rc) } // If a write transaction is open, then all changes made within the // transaction are reverted and the current write-transaction is closed. // The pager falls back to PAGER_READER state if successful, or PAGER_ERROR // state if an error occurs. // // If the pager is already in PAGER_ERROR state when this function is called, // it returns Pager.errCode immediately. No work is performed in this case. // // Otherwise, in rollback mode, this function performs two functions: // // 1) It rolls back the journal file, restoring all database file and // in-memory cache pages to the state they were in when the transaction // was opened, and // // 2) It finalizes the journal file, so that it is not used for hot // rollback at any point in the future. // // Finalization of the journal file (task 2) is only performed if the // rollback is successful. // // In WAL mode, all cache-entries containing data modified within the // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59902:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If // the pager is already in the ERROR state, the rollback is not // attempted here. Instead, the error code is returned to the caller. if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_ERROR { return (*Pager)(unsafe.Pointer(pPager)).FerrCode } if int32((*Pager)(unsafe.Pointer(pPager)).FeState) <= PAGER_READER { return SQLITE_OK } if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { var rc2 int32 rc = Xsqlite3PagerSavepoint(tls, pPager, SAVEPOINT_ROLLBACK, -1) rc2 = pager_end_transaction(tls, pPager, int32((*Pager)(unsafe.Pointer(pPager)).FsetSuper), 0) if rc == SQLITE_OK { rc = rc2 } } else if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) || int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_WRITER_LOCKED { var eState int32 = int32((*Pager)(unsafe.Pointer(pPager)).FeState) rc = pager_end_transaction(tls, pPager, 0, 0) if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) && eState > PAGER_WRITER_LOCKED { // This can happen using journal_mode=off. Move the pager to the error // state to indicate that the contents of the cache may not be trusted. // Any active readers will get SQLITE_ABORT. (*Pager)(unsafe.Pointer(pPager)).FerrCode = SQLITE_ABORT (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_ERROR) setGetterMethod(tls, pPager) return rc } } else { rc = pager_playback(tls, pPager, 0) } // If an error occurs during a ROLLBACK, we can no longer trust the pager // cache. So call pager_error() on the way out to make any error persistent. return pager_error(tls, pPager, rc) } // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59952:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59969:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint64(unsafe.Sizeof(PgHdr{}))+uint64(5)*uint64(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ Xsqlite3MallocSize(tls, pPager)) + (*Pager)(unsafe.Pointer(pPager)).FpageSize) } // Return the number of references to the specified page. func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:59980:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } // Parameter eStat must be one of SQLITE_DBSTATUS_CACHE_HIT, _MISS, _WRITE, // or _WRITE+1. The SQLITE_DBSTATUS_CACHE_WRITE+1 case is a translation // of SQLITE_DBSTATUS_CACHE_SPILL. The _SPILL case is not contiguous because // it was added later. // // Before returning, *pnVal is incremented by the // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60016:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) if reset != 0 { *(*int32)(unsafe.Pointer(pPager + 240 + uintptr(eStat)*4)) = 0 } } // Return true if this is an in-memory or temp-file backed pager. func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60039:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } // Check that there are at least nSavepoint savepoints open. If there are // currently less than nSavepoints open, then open one or more savepoints // to make up the difference. If the number of savepoints is already // equal to nSavepoint, then this function is a no-op. // // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60053:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable var aNew uintptr // New Pager.aSavepoint array // Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM // if the allocation fails. Otherwise, zero the new portion in case a // malloc failure occurs while populating it in the for(...) loop below. aNew = Xsqlite3Realloc(tls, (*Pager)(unsafe.Pointer(pPager)).FaSavepoint, uint64(unsafe.Sizeof(PagerSavepoint{}))*uint64(nSavepoint)) if !(aNew != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, aNew+uintptr(nCurrent)*56, 0, uint64(nSavepoint-nCurrent)*uint64(unsafe.Sizeof(PagerSavepoint{}))) (*Pager)(unsafe.Pointer(pPager)).FaSavepoint = aNew // Populate the PagerSavepoint structures just allocated. for ii = nCurrent; ii < nSavepoint; ii++ { (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FnOrig = (*Pager)(unsafe.Pointer(pPager)).FdbSize if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff > int64(0) { (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiOffset = (*Pager)(unsafe.Pointer(pPager)).FjournalOff } else { (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiOffset = I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize) } (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FiSubRec = (*Pager)(unsafe.Pointer(pPager)).FnSubRec (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FpInSavepoint = Xsqlite3BitvecCreate(tls, (*Pager)(unsafe.Pointer(pPager)).FdbSize) (*PagerSavepoint)(unsafe.Pointer(aNew + uintptr(ii)*56)).FbTruncateOnRelease = 1 if !(int32((*PagerSavepoint)(unsafe.Pointer(aNew+uintptr(ii)*56)).FpInSavepoint) != 0) { return SQLITE_NOMEM } if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { Xsqlite3WalSavepoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, aNew+uintptr(ii)*56+36) } (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = ii + 1 } return rc } func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60099:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) } else { return SQLITE_OK } return int32(0) } // This function is called to rollback or release (commit) a savepoint. // The savepoint to release or rollback need not be the most recently // created savepoint. // // Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE. // If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with // index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes // that have occurred since the specified savepoint was created. // // The savepoint to rollback or release is identified by parameter // iSavepoint. A value of 0 means to operate on the outermost savepoint // (the first created). A value of (Pager.nSavepoint-1) means operate // on the most recently created savepoint. If iSavepoint is greater than // (Pager.nSavepoint-1), then this function is a no-op. // // If a negative value is passed to this function, then the current // transaction is rolled back. This is different to calling // sqlite3PagerRollback() because this function does not terminate // the transaction or unlock the database, it just restores the // contents of the database to its original state. // // In any case, all savepoints with an index greater than iSavepoint // are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE), // then savepoint iSavepoint is also destroyed. // // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60141:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { var ii int32 // Iterator variable var nNew int32 // Number of remaining savepoints after this op. // Figure out how many savepoints will still be active after this // operation. Store this value in nNew. Then free resources associated // with any savepoints that are destroyed by this operation. nNew = iSavepoint + func() int32 { if op == SAVEPOINT_RELEASE { return 0 } return 1 }() for ii = nNew; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*56)).FpInSavepoint) } (*Pager)(unsafe.Pointer(pPager)).FnSavepoint = nNew // Truncate the sub-journal so that it only includes the parts // that are still in use. if op == SAVEPOINT_RELEASE { var pRel uintptr = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(nNew)*56 if (*PagerSavepoint)(unsafe.Pointer(pRel)).FbTruncateOnRelease != 0 && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0) { // Only truncate if it is an in-memory sub-journal. if Xsqlite3JournalIsInMemory(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd) != 0 { var sz I64 = ((*Pager)(unsafe.Pointer(pPager)).FpageSize + int64(4)) * I64((*PagerSavepoint)(unsafe.Pointer(pRel)).FiSubRec) rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fsjfd, sz) } (*Pager)(unsafe.Pointer(pPager)).FnSubRec = (*PagerSavepoint)(unsafe.Pointer(pRel)).FiSubRec } } else if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) || (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) { var pSavepoint uintptr if nNew == 0 { pSavepoint = uintptr(0) } else { pSavepoint = (*Pager)(unsafe.Pointer(pPager)).FaSavepoint + uintptr(nNew-1)*56 } rc = pagerPlaybackSavepoint(tls, pPager, pSavepoint) } } return rc } // Return the full pathname of the database file. // // Except, if the pager is in-memory only, then return an empty string if // nullIfMemDb is true. This routine is called with nullIfMemDb==1 when // used to report the filename to the user, for compatibility with legacy // behavior. But when the Btree needs to know the filename for matching to // shared cache, it uses nullIfMemDb==0 so that in-memory databases can // participate in shared-cache. // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60222:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60223:21 */ // Return the VFS structure for the pager. func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60230:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60239:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60247:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } return (*Pager)(unsafe.Pointer(pPager)).Fjfd } // Return the full pathname of the journal file. func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60258:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } // Move the page pPg to location pgno in the file. // // There must be no references to the page previously located at // pgno (which we call pPgOld) though that page is allowed to be // in cache. If the page previously located at pgno is not already // in the rollback journal, it is not put there by by this routine. // // References to the page pPg remain valid. Updating any // meta-data associated with pPg (i.e. data stored in the nExtra bytes // allocated along with the page) is the responsibility of the caller. // // A transaction must be active when this routine is called. It used to be // required that a statement transaction was not active, but this restriction // has been removed (CREATE INDEX needs to move a page when a statement // transaction is active). // // If the fourth argument, isCommit, is non-zero, then this page is being // moved as part of a database reorganization just before the transaction // is being committed. In this case, it is guaranteed that the database page // pPg refers to will not be written to again within this transaction. // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60288:20: */ bp := tls.Alloc(8) defer tls.Free(8) var pPgOld uintptr // The page being overwritten. var needSyncPgno Pgno = Pgno(0) // Old value of pPg->pgno, if sync is required var rc int32 // Return code var origPgno Pgno // The original page number // In order to be able to rollback, an in-memory database must journal // the page we are moving from. if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { rc = Xsqlite3PagerWrite(tls, pPg) if rc != 0 { return rc } } // If the page being moved is dirty and has not been saved by the latest // savepoint, then save the current contents of the page into the // sub-journal now. This is required to handle the following scenario: // // BEGIN; // <journal page X, then modify it in memory> // SAVEPOINT one; // <Move page X to location Y> // ROLLBACK TO one; // // If page X were not written to the sub-journal here, it would not // be possible to restore its contents when the "ROLLBACK TO one" // statement were is processed. // // subjournalPage() may need to allocate space to store pPg->pgno into // one or more savepoint bitvecs. This is the reason this function // may return SQLITE_NOMEM. if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && SQLITE_OK != libc.AssignInt32(&rc, subjournalPageIfRequired(tls, pPg)) { return rc } // If the journal needs to be sync()ed before page pPg->pgno can // be written to, store pPg->pgno in local variable needSyncPgno. // // If the isCommit flag is set, there is no need to remember that // the journal needs to be sync()ed before database page pPg->pgno // can be written to. The caller has already promised not to write to it. if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_NEED_SYNC != 0 && !(isCommit != 0) { needSyncPgno = (*DbPage)(unsafe.Pointer(pPg)).Fpgno } // If the cache contains a page with page-number pgno, remove it // from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for // page pgno before the 'move' operation, it needs to be retained // for the page moved there. *(*U16)(unsafe.Pointer(pPg + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) pPgOld = Xsqlite3PagerLookup(tls, pPager, pgno) if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) return Xsqlite3CorruptError(tls, 60362) } *(*U16)(unsafe.Pointer(pPg + 52)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { // Do not discard pages from an in-memory database since we might // need to rollback later. Just move the page out of the way. Xsqlite3PcacheMove(tls, pPgOld, (*Pager)(unsafe.Pointer(pPager)).FdbSize+Pgno(1)) } else { Xsqlite3PcacheDrop(tls, pPgOld) } } origPgno = (*DbPage)(unsafe.Pointer(pPg)).Fpgno Xsqlite3PcacheMove(tls, pPg, pgno) Xsqlite3PcacheMakeDirty(tls, pPg) // For an in-memory database, make sure the original page continues // to exist, in case the transaction needs to roll back. Use pPgOld // as the original page since it has already been allocated. if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 && pPgOld != 0 { Xsqlite3PcacheMove(tls, pPgOld, origPgno) Xsqlite3PagerUnrefNotNull(tls, pPgOld) } if needSyncPgno != 0 { // If needSyncPgno is non-zero, then the journal file needs to be // sync()ed before any data is written to database file page needSyncPgno. // Currently, no such page exists in the page-cache and the // "is journaled" bitvec flag has been set. This needs to be remedied by // loading the page into the pager-cache and setting the PGHDR_NEED_SYNC // flag. // // If the attempt to load the page into the page-cache fails, (due // to a malloc() or IO failure), clear the bit in the pInJournal[] // array. Otherwise, if the page is loaded and written again in // this transaction, it may be written to the database file before // it is synced into the journal file. This way, it may end up in // the journal file twice, but that is not a problem. // var pPgHdr uintptr at bp, 8 rc = Xsqlite3PagerGet(tls, pPager, needSyncPgno, bp, 0) if rc != SQLITE_OK { if needSyncPgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize { Xsqlite3BitvecClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, needSyncPgno, (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) } return rc } *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)) + 52)) |= U16(PGHDR_NEED_SYNC) Xsqlite3PcacheMakeDirty(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) Xsqlite3PagerUnrefNotNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pPgHdr */))) } return SQLITE_OK } // The page handle passed as the first argument refers to a dirty page // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60426:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60435:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60444:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } // Get/set the locking-mode for this pager. Parameter eMode must be one // of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then // the locking-mode is set to the value specified. // // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60458:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) } return int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) } // Set the journal-mode for this pager. Parameter eMode must be one of: // // PAGER_JOURNALMODE_DELETE // PAGER_JOURNALMODE_TRUNCATE // PAGER_JOURNALMODE_PERSIST // PAGER_JOURNALMODE_OFF // PAGER_JOURNALMODE_MEMORY // PAGER_JOURNALMODE_WAL // // The journalmode is set to the value specified if the change is allowed. // The change may be disallowed for the following reasons: // // * An in-memory database can only have its journal_mode set to _OFF // or _MEMORY. // // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60491:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid // This routine is only called from the OP_JournalMode opcode, and // the logic there will never allow a temporary file to be changed // to WAL mode. // Do allow the journalmode of an in-memory database to be set to // anything other than MEMORY or OFF if (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { if eMode != PAGER_JOURNALMODE_MEMORY && eMode != PAGER_JOURNALMODE_OFF { eMode = int32(eOld) } } if eMode != int32(eOld) { // Change the journal mode. (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(eMode) // When transistioning from TRUNCATE or PERSIST to any other journal // mode except WAL, unless the pager is in locking_mode=exclusive mode, // delete the journal file. if !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) && int32(eOld)&5 == 1 && eMode&1 == 0 { // In this case we would like to delete the journal file. If it is // not possible, then that is not a problem. Deleting the journal file // here is an optimization only. // // Before deleting the journal file, obtain a RESERVED lock on the // database file. This ensures that the journal file is not deleted // while it is in use by some other client. Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) >= RESERVED_LOCK { Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) } else { var rc int32 = SQLITE_OK var state int32 = int32((*Pager)(unsafe.Pointer(pPager)).FeState) if state == PAGER_OPEN { rc = Xsqlite3PagerSharedLock(tls, pPager) } if int32((*Pager)(unsafe.Pointer(pPager)).FeState) == PAGER_READER { rc = pagerLockDb(tls, pPager, RESERVED_LOCK) } if rc == SQLITE_OK { Xsqlite3OsDelete(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, 0) } if rc == SQLITE_OK && state == PAGER_READER { pagerUnlockDb(tls, pPager, SHARED_LOCK) } else if state == PAGER_OPEN { pager_unlock(tls, pPager) } } } else if eMode == PAGER_JOURNALMODE_OFF { Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) } } // Return the new journal mode return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return the current journal mode. func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60581:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60590:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 } if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0) && (*Pager)(unsafe.Pointer(pPager)).FjournalOff > int64(0) { return 0 } return 1 } // Get/set the size-limit used for persistent journal files. // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60603:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) } return (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit } // Return a pointer to the pPager->pBackup variable. The backup module // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60617:31: */ return pPager + 112 } // Unless this is an in-memory or temporary database, clear the pager cache. func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60625:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) } } // This function is called when the user invokes "PRAGMA wal_checkpoint", // "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint() // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60640:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal == uintptr(0) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) == PAGER_JOURNALMODE_WAL { // This only happens when a database file is zero bytes in size opened and // then "PRAGMA journal_mode=WAL" is run and then sqlite3_wal_checkpoint() // is invoked without any intervening transactions. We need to start // a transaction to initialize pWal. The PRAGMA table_list statement is // used for this since it starts transactions on every database file, // including all ATTACHed databases. This seems expensive for a single // sqlite3_wal_checkpoint() call, but it happens very rarely. // https://sqlite.org/forum/forumpost/fd0f19d229156939 Xsqlite3_exec(tls, db, ts+5255, uintptr(0), uintptr(0), uintptr(0)) } if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, func() uintptr { if eMode == SQLITE_CHECKPOINT_PASSIVE { return uintptr(0) } return (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler }(), (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace, pnLog, pnCkpt) } return rc } func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60671:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60679:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 } return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 || (*Sqlite3_io_methods)(unsafe.Pointer(pMethods)).FiVersion >= 2 && (*Sqlite3_io_methods)(unsafe.Pointer(pMethods)).FxShmMap != 0) } // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60689:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) if rc != SQLITE_OK { // If the attempt to grab the exclusive lock failed, release the // pending lock that may have been obtained instead. pagerUnlockDb(tls, pPager, SHARED_LOCK) } return rc } // Call sqlite3WalOpen() to open the WAL handle. If the pager is in // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60709:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use // heap-memory for the wal-index instead of the VFS shared-memory // implementation. Take the exclusive lock now, before opening the WAL // file, to make sure this is safe. if (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode != 0 { rc = pagerExclusiveLock(tls, pPager) } // Open the connection to the log file. If this operation fails, // (e.g. due to malloc() failure), return an error code. if rc == SQLITE_OK { rc = Xsqlite3WalOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).Ffd, (*Pager)(unsafe.Pointer(pPager)).FzWal, int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode), (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit, pPager+288) } pagerFixMaplimit(tls, pPager) return rc } // The caller must be holding a SHARED lock on the database file to call // this function. // // If the pager passed as the first argument is open on a real database // file (not a temp file or an in-memory database), and the WAL file // is not already open, make an attempt to open it now. If successful, // return SQLITE_OK. If an error occurs or the VFS used by the pager does // not support the xShmXXX() methods, return an error code. *pbOpen is // not modified in either case. // // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60754:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { if !(Xsqlite3PagerWalSupported(tls, pPager) != 0) { return SQLITE_CANTOPEN } // Close any rollback journal previously open Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) rc = pagerOpenWal(tls, pPager) if rc == SQLITE_OK { (*Pager)(unsafe.Pointer(pPager)).FjournalMode = U8(PAGER_JOURNALMODE_WAL) (*Pager)(unsafe.Pointer(pPager)).FeState = U8(PAGER_OPEN) } } else { *(*int32)(unsafe.Pointer(pbOpen)) = 1 } return rc } // This function is called to close the connection to the log file prior // to switching from WAL to rollback mode. // // Before closing the log file, this function attempts to take an // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60793:20: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_OK // If the log file is not already open, but does exist in the file-system, // it may need to be checkpointed before the connection can switch to // rollback mode. Open it now so this can happen. if !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { *(*int32)(unsafe.Pointer(bp /* logexists */)) = 0 rc = pagerLockDb(tls, pPager, SHARED_LOCK) if rc == SQLITE_OK { rc = Xsqlite3OsAccess(tls, (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) } if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { rc = pagerOpenWal(tls, pPager) } } // Checkpoint and close the log. Because an EXCLUSIVE lock is held on // the database file, the log and log-summary files will be deleted. if rc == SQLITE_OK && (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = pagerExclusiveLock(tls, pPager) if rc == SQLITE_OK { rc = Xsqlite3WalClose(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, int32((*Pager)(unsafe.Pointer(pPager)).FwalSyncFlags), int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace) (*Pager)(unsafe.Pointer(pPager)).FpWal = uintptr(0) pagerFixMaplimit(tls, pPager) if rc != 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FexclusiveMode) != 0) { pagerUnlockDb(tls, pPager, SHARED_LOCK) } } } return rc } // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60862:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) } return rc } // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60875:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) } else { rc = SQLITE_ERROR } return rc } // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60892:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } else { rc = SQLITE_ERROR } return rc } // The caller currently has a read transaction open on the database. // If this is not a WAL database, SQLITE_ERROR is returned. Otherwise, // this function takes a SHARED lock on the CHECKPOINTER slot and then // checks if the snapshot passed as the second argument is still // available. If so, SQLITE_OK is returned. // // If the snapshot is not available, SQLITE_ERROR is returned. Or, if // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60914:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) } else { rc = SQLITE_ERROR } return rc } // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:60928:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } //************* End of pager.c ********************************************** //************* Begin file wal.c ******************************************** // 2010 February 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. // // // // This file contains the implementation of a write-ahead log (WAL) used in // "journal_mode=WAL" mode. // // WRITE-AHEAD LOG (WAL) FILE FORMAT // // A WAL file consists of a header followed by zero or more "frames". // Each frame records the revised content of a single page from the // database file. All changes to the database are recorded by writing // frames into the WAL. Transactions commit when a frame is written that // contains a commit marker. A single WAL can and usually does record // multiple transactions. Periodically, the content of the WAL is // transferred back into the database file in an operation called a // "checkpoint". // // A single WAL file can be used multiple times. In other words, the // WAL can fill up with frames and then be checkpointed and then new // frames can overwrite the old ones. A WAL always grows from beginning // toward the end. Checksums and counters attached to each frame are // used to determine which frames within the WAL are valid and which // are leftovers from prior checkpoints. // // The WAL header is 32 bytes in size and consists of the following eight // big-endian 32-bit unsigned integer values: // // 0: Magic number. 0x377f0682 or 0x377f0683 // 4: File format version. Currently 3007000 // 8: Database page size. Example: 1024 // 12: Checkpoint sequence number // 16: Salt-1, random integer incremented with each checkpoint // 20: Salt-2, a different random integer changing with each ckpt // 24: Checksum-1 (first part of checksum for first 24 bytes of header). // 28: Checksum-2 (second part of checksum for first 24 bytes of header). // // Immediately following the wal-header are zero or more frames. Each // frame consists of a 24-byte frame-header followed by a <page-size> bytes // of page data. The frame-header is six big-endian 32-bit unsigned // integer values, as follows: // // 0: Page number. // 4: For commit records, the size of the database image in pages // after the commit. For all other records, zero. // 8: Salt-1 (copied from the header) // 12: Salt-2 (copied from the header) // 16: Checksum-1. // 20: Checksum-2. // // A frame is considered valid if and only if the following conditions are // true: // // (1) The salt-1 and salt-2 values in the frame-header match // salt values in the wal-header // // (2) The checksum values in the final 8 bytes of the frame-header // exactly match the checksum computed consecutively on the // WAL header and the first 8 bytes and the content of all frames // up to and including the current frame. // // The checksum is computed using 32-bit big-endian integers if the // magic number in the first 4 bytes of the WAL is 0x377f0683 and it // is computed using little-endian if the magic number is 0x377f0682. // The checksum values are always stored in the frame header in a // big-endian format regardless of which byte order is used to compute // the checksum. The checksum is computed by interpreting the input as // an even number of unsigned 32-bit integers: x[0] through x[N]. The // algorithm used for the checksum is as follows: // // for i from 0 to n-1 step 2: // s0 += x[i] + s1; // s1 += x[i+1] + s0; // endfor // // Note that s0 and s1 are both weighted checksums using fibonacci weights // in reverse order (the largest fibonacci weight occurs on the first element // of the sequence being summed.) The s1 value spans all 32-bit // terms of the sequence whereas s0 omits the final term. // // On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the // WAL is transferred into the database, then the database is VFS.xSync-ed. // The VFS.xSync operations serve as write barriers - all writes launched // before the xSync must complete before any write that launches after the // xSync begins. // // After each checkpoint, the salt-1 value is incremented and the salt-2 // value is randomized. This prevents old and new frames in the WAL from // being considered valid at the same time and being checkpointing together // following a crash. // // READER ALGORITHM // // To read a page from the database (call it page number P), a reader // first checks the WAL to see if it contains page P. If so, then the // last valid instance of page P that is a followed by a commit frame // or is a commit frame itself becomes the value read. If the WAL // contains no copies of page P that are valid and which are a commit // frame or are followed by a commit frame, then page P is read from // the database file. // // To start a read transaction, the reader records the index of the last // valid frame in the WAL. The reader uses this recorded "mxFrame" value // for all subsequent read operations. New transactions can be appended // to the WAL, but as long as the reader uses its original mxFrame value // and ignores the newly appended content, it will see a consistent snapshot // of the database from a single point in time. This technique allows // multiple concurrent readers to view different versions of the database // content simultaneously. // // The reader algorithm in the previous paragraphs works correctly, but // because frames for page P can appear anywhere within the WAL, the // reader has to scan the entire WAL looking for page P frames. If the // WAL is large (multiple megabytes is typical) that scan can be slow, // and read performance suffers. To overcome this problem, a separate // data structure called the wal-index is maintained to expedite the // search for frames of a particular page. // // WAL-INDEX FORMAT // // Conceptually, the wal-index is shared memory, though VFS implementations // might choose to implement the wal-index using a mmapped file. Because // the wal-index is shared memory, SQLite does not support journal_mode=WAL // on a network filesystem. All users of the database must be able to // share memory. // // In the default unix and windows implementation, the wal-index is a mmapped // file whose name is the database name with a "-shm" suffix added. For that // reason, the wal-index is sometimes called the "shm" file. // // The wal-index is transient. After a crash, the wal-index can (and should // be) reconstructed from the original WAL file. In fact, the VFS is required // to either truncate or zero the header of the wal-index when the last // connection to it closes. Because the wal-index is transient, it can // use an architecture-specific format; it does not have to be cross-platform. // Hence, unlike the database and WAL file formats which store all values // as big endian, the wal-index can store multi-byte values in the native // byte order of the host computer. // // The purpose of the wal-index is to answer this question quickly: Given // a page number P and a maximum frame index M, return the index of the // last frame in the wal before frame M for page P in the WAL, or return // NULL if there are no frames for page P in the WAL prior to M. // // The wal-index consists of a header region, followed by an one or // more index blocks. // // The wal-index header contains the total number of frames within the WAL // in the mxFrame field. // // Each index block except for the first contains information on // HASHTABLE_NPAGE frames. The first index block contains information on // HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and // HASHTABLE_NPAGE are selected so that together the wal-index header and // first index block are the same size as all other index blocks in the // wal-index. The values are: // // HASHTABLE_NPAGE 4096 // HASHTABLE_NPAGE_ONE 4062 // // Each index block contains two sections, a page-mapping that contains the // database page number associated with each wal frame, and a hash-table // that allows readers to query an index block for a specific page number. // The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE // for the first index block) 32-bit page numbers. The first entry in the // first index-block contains the database page number corresponding to the // first frame in the WAL file. The first entry in the second index block // in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in // the log, and so on. // // The last index block in a wal-index usually contains less than the full // complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers, // depending on the contents of the WAL file. This does not change the // allocated size of the page-mapping array - the page-mapping array merely // contains unused entries. // // Even without using the hash table, the last frame for page P // can be found by scanning the page-mapping sections of each index block // starting with the last index block and moving toward the first, and // within each index block, starting at the end and moving toward the // beginning. The first entry that equals P corresponds to the frame // holding the content for that page. // // The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers. // HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the // hash table for each page number in the mapping section, so the hash // table is never more than half full. The expected number of collisions // prior to finding a match is 1. Each entry of the hash table is an // 1-based index of an entry in the mapping section of the same // index block. Let K be the 1-based index of the largest entry in // the mapping section. (For index blocks other than the last, K will // always be exactly HASHTABLE_NPAGE (4096) and for the last index block // K will be (mxFrame%HASHTABLE_NPAGE).) Unused slots of the hash table // contain a value of 0. // // To look for page P in the hash table, first compute a hash iKey on // P as follows: // // iKey = (P * 383) % HASHTABLE_NSLOT // // Then start scanning entries of the hash table, starting with iKey // (wrapping around to the beginning when the end of the hash table is // reached) until an unused hash slot is found. Let the first unused slot // be at index iUnused. (iUnused might be less than iKey if there was // wrap-around.) Because the hash table is never more than half full, // the search is guaranteed to eventually hit an unused entry. Let // iMax be the value between iKey and iUnused, closest to iUnused, // where aHash[iMax]==P. If there is no iMax entry (if there exists // no hash slot such that aHash[i]==p) then page P is not in the // current index block. Otherwise the iMax-th mapping entry of the // current index block corresponds to the last entry that references // page P. // // A hash search begins with the last index block and moves toward the // first index block, looking for entries corresponding to page P. On // average, only two or three slots in each index block need to be // examined in order to either find the last entry for page P, or to // establish that no such entry exists in the block. Each index block // holds over 4000 entries. So two or three index blocks are sufficient // to cover a typical 10 megabyte WAL file, assuming 1K pages. 8 or 10 // comparisons (on average) suffice to either locate a frame in the // WAL or to establish that the frame does not exist in the WAL. This // is much faster than scanning the entire 10MB WAL. // // Note that entries are added in order of increasing K. Hence, one // reader might be using some value K0 and a second reader that started // at a later time (after additional transactions were added to the WAL // and to the wal-index) might be using a different value K1, where K1>K0. // Both readers can use the same hash table and mapping section to get // the correct result. There may be entries in the hash table with // K>K0 but to the first reader, those entries will appear to be unused // slots in the hash table and so the first reader will get an answer as // if no values greater than K0 had ever been inserted into the hash table // in the first place - which is what reader one wants. Meanwhile, the // second reader using K1 will see additional values that were inserted // later, which is exactly what reader two wants. // // When a rollback occurs, the value of K is decreased. Hash table entries // that correspond to frames greater than the new K value are removed // from the hash table at this point. // #include "wal.h" // Trace output macros // The maximum (and only) versions of the wal and wal-index formats // that may be interpreted by this version of SQLite. // // If a client begins recovering a WAL file and finds that (a) the checksum // values in the wal-header are correct and (b) the version field is not // WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN. // // Similarly, if a client successfully reads a wal-index header (i.e. the // checksum test is successful) and finds that the version field is not // WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite // returns SQLITE_CANTOPEN. // Index numbers for various locking bytes. WAL_NREADER is the number // of available reader locks and should be at least 3. The default // is SQLITE_SHM_NLOCK==8 and WAL_NREADER==5. // // Technically, the various VFSes are free to implement these locks however // they see fit. However, compatibility is encouraged so that VFSes can // interoperate. The standard implemention used on both unix and windows // is for the index number to indicate a byte offset into the // WalCkptInfo.aLock[] array in the wal-index header. In other words, all // locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which // should be 120) is the location in the shm file for the first locking // byte. // Object declarations type WalIndexHdr1 = struct { FiVersion U32 Funused U32 FiChange U32 FisInit U8 FbigEndCksum U8 FszPage U16 FmxFrame U32 FnPage U32 FaFrameCksum [2]U32 FaSalt [2]U32 FaCksum [2]U32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ //************* End of pager.c ********************************************** //************* Begin file wal.c ******************************************** // 2010 February 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. // // // // This file contains the implementation of a write-ahead log (WAL) used in // "journal_mode=WAL" mode. // // WRITE-AHEAD LOG (WAL) FILE FORMAT // // A WAL file consists of a header followed by zero or more "frames". // Each frame records the revised content of a single page from the // database file. All changes to the database are recorded by writing // frames into the WAL. Transactions commit when a frame is written that // contains a commit marker. A single WAL can and usually does record // multiple transactions. Periodically, the content of the WAL is // transferred back into the database file in an operation called a // "checkpoint". // // A single WAL file can be used multiple times. In other words, the // WAL can fill up with frames and then be checkpointed and then new // frames can overwrite the old ones. A WAL always grows from beginning // toward the end. Checksums and counters attached to each frame are // used to determine which frames within the WAL are valid and which // are leftovers from prior checkpoints. // // The WAL header is 32 bytes in size and consists of the following eight // big-endian 32-bit unsigned integer values: // // 0: Magic number. 0x377f0682 or 0x377f0683 // 4: File format version. Currently 3007000 // 8: Database page size. Example: 1024 // 12: Checkpoint sequence number // 16: Salt-1, random integer incremented with each checkpoint // 20: Salt-2, a different random integer changing with each ckpt // 24: Checksum-1 (first part of checksum for first 24 bytes of header). // 28: Checksum-2 (second part of checksum for first 24 bytes of header). // // Immediately following the wal-header are zero or more frames. Each // frame consists of a 24-byte frame-header followed by a <page-size> bytes // of page data. The frame-header is six big-endian 32-bit unsigned // integer values, as follows: // // 0: Page number. // 4: For commit records, the size of the database image in pages // after the commit. For all other records, zero. // 8: Salt-1 (copied from the header) // 12: Salt-2 (copied from the header) // 16: Checksum-1. // 20: Checksum-2. // // A frame is considered valid if and only if the following conditions are // true: // // (1) The salt-1 and salt-2 values in the frame-header match // salt values in the wal-header // // (2) The checksum values in the final 8 bytes of the frame-header // exactly match the checksum computed consecutively on the // WAL header and the first 8 bytes and the content of all frames // up to and including the current frame. // // The checksum is computed using 32-bit big-endian integers if the // magic number in the first 4 bytes of the WAL is 0x377f0683 and it // is computed using little-endian if the magic number is 0x377f0682. // The checksum values are always stored in the frame header in a // big-endian format regardless of which byte order is used to compute // the checksum. The checksum is computed by interpreting the input as // an even number of unsigned 32-bit integers: x[0] through x[N]. The // algorithm used for the checksum is as follows: // // for i from 0 to n-1 step 2: // s0 += x[i] + s1; // s1 += x[i+1] + s0; // endfor // // Note that s0 and s1 are both weighted checksums using fibonacci weights // in reverse order (the largest fibonacci weight occurs on the first element // of the sequence being summed.) The s1 value spans all 32-bit // terms of the sequence whereas s0 omits the final term. // // On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the // WAL is transferred into the database, then the database is VFS.xSync-ed. // The VFS.xSync operations serve as write barriers - all writes launched // before the xSync must complete before any write that launches after the // xSync begins. // // After each checkpoint, the salt-1 value is incremented and the salt-2 // value is randomized. This prevents old and new frames in the WAL from // being considered valid at the same time and being checkpointing together // following a crash. // // READER ALGORITHM // // To read a page from the database (call it page number P), a reader // first checks the WAL to see if it contains page P. If so, then the // last valid instance of page P that is a followed by a commit frame // or is a commit frame itself becomes the value read. If the WAL // contains no copies of page P that are valid and which are a commit // frame or are followed by a commit frame, then page P is read from // the database file. // // To start a read transaction, the reader records the index of the last // valid frame in the WAL. The reader uses this recorded "mxFrame" value // for all subsequent read operations. New transactions can be appended // to the WAL, but as long as the reader uses its original mxFrame value // and ignores the newly appended content, it will see a consistent snapshot // of the database from a single point in time. This technique allows // multiple concurrent readers to view different versions of the database // content simultaneously. // // The reader algorithm in the previous paragraphs works correctly, but // because frames for page P can appear anywhere within the WAL, the // reader has to scan the entire WAL looking for page P frames. If the // WAL is large (multiple megabytes is typical) that scan can be slow, // and read performance suffers. To overcome this problem, a separate // data structure called the wal-index is maintained to expedite the // search for frames of a particular page. // // WAL-INDEX FORMAT // // Conceptually, the wal-index is shared memory, though VFS implementations // might choose to implement the wal-index using a mmapped file. Because // the wal-index is shared memory, SQLite does not support journal_mode=WAL // on a network filesystem. All users of the database must be able to // share memory. // // In the default unix and windows implementation, the wal-index is a mmapped // file whose name is the database name with a "-shm" suffix added. For that // reason, the wal-index is sometimes called the "shm" file. // // The wal-index is transient. After a crash, the wal-index can (and should // be) reconstructed from the original WAL file. In fact, the VFS is required // to either truncate or zero the header of the wal-index when the last // connection to it closes. Because the wal-index is transient, it can // use an architecture-specific format; it does not have to be cross-platform. // Hence, unlike the database and WAL file formats which store all values // as big endian, the wal-index can store multi-byte values in the native // byte order of the host computer. // // The purpose of the wal-index is to answer this question quickly: Given // a page number P and a maximum frame index M, return the index of the // last frame in the wal before frame M for page P in the WAL, or return // NULL if there are no frames for page P in the WAL prior to M. // // The wal-index consists of a header region, followed by an one or // more index blocks. // // The wal-index header contains the total number of frames within the WAL // in the mxFrame field. // // Each index block except for the first contains information on // HASHTABLE_NPAGE frames. The first index block contains information on // HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and // HASHTABLE_NPAGE are selected so that together the wal-index header and // first index block are the same size as all other index blocks in the // wal-index. The values are: // // HASHTABLE_NPAGE 4096 // HASHTABLE_NPAGE_ONE 4062 // // Each index block contains two sections, a page-mapping that contains the // database page number associated with each wal frame, and a hash-table // that allows readers to query an index block for a specific page number. // The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE // for the first index block) 32-bit page numbers. The first entry in the // first index-block contains the database page number corresponding to the // first frame in the WAL file. The first entry in the second index block // in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in // the log, and so on. // // The last index block in a wal-index usually contains less than the full // complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers, // depending on the contents of the WAL file. This does not change the // allocated size of the page-mapping array - the page-mapping array merely // contains unused entries. // // Even without using the hash table, the last frame for page P // can be found by scanning the page-mapping sections of each index block // starting with the last index block and moving toward the first, and // within each index block, starting at the end and moving toward the // beginning. The first entry that equals P corresponds to the frame // holding the content for that page. // // The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers. // HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the // hash table for each page number in the mapping section, so the hash // table is never more than half full. The expected number of collisions // prior to finding a match is 1. Each entry of the hash table is an // 1-based index of an entry in the mapping section of the same // index block. Let K be the 1-based index of the largest entry in // the mapping section. (For index blocks other than the last, K will // always be exactly HASHTABLE_NPAGE (4096) and for the last index block // K will be (mxFrame%HASHTABLE_NPAGE).) Unused slots of the hash table // contain a value of 0. // // To look for page P in the hash table, first compute a hash iKey on // P as follows: // // iKey = (P * 383) % HASHTABLE_NSLOT // // Then start scanning entries of the hash table, starting with iKey // (wrapping around to the beginning when the end of the hash table is // reached) until an unused hash slot is found. Let the first unused slot // be at index iUnused. (iUnused might be less than iKey if there was // wrap-around.) Because the hash table is never more than half full, // the search is guaranteed to eventually hit an unused entry. Let // iMax be the value between iKey and iUnused, closest to iUnused, // where aHash[iMax]==P. If there is no iMax entry (if there exists // no hash slot such that aHash[i]==p) then page P is not in the // current index block. Otherwise the iMax-th mapping entry of the // current index block corresponds to the last entry that references // page P. // // A hash search begins with the last index block and moves toward the // first index block, looking for entries corresponding to page P. On // average, only two or three slots in each index block need to be // examined in order to either find the last entry for page P, or to // establish that no such entry exists in the block. Each index block // holds over 4000 entries. So two or three index blocks are sufficient // to cover a typical 10 megabyte WAL file, assuming 1K pages. 8 or 10 // comparisons (on average) suffice to either locate a frame in the // WAL or to establish that the frame does not exist in the WAL. This // is much faster than scanning the entire 10MB WAL. // // Note that entries are added in order of increasing K. Hence, one // reader might be using some value K0 and a second reader that started // at a later time (after additional transactions were added to the WAL // and to the wal-index) might be using a different value K1, where K1>K0. // Both readers can use the same hash table and mapping section to get // the correct result. There may be entries in the hash table with // K>K0 but to the first reader, those entries will appear to be unused // slots in the hash table and so the first reader will get an answer as // if no values greater than K0 had ever been inserted into the hash table // in the first place - which is what reader one wants. Meanwhile, the // second reader using K1 will see additional values that were inserted // later, which is exactly what reader two wants. // // When a rollback occurs, the value of K is decreased. Hash table entries // that correspond to frames greater than the new K value are removed // from the hash table at this point. // #include "wal.h" // Trace output macros // The maximum (and only) versions of the wal and wal-index formats // that may be interpreted by this version of SQLite. // // If a client begins recovering a WAL file and finds that (a) the checksum // values in the wal-header are correct and (b) the version field is not // WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN. // // Similarly, if a client successfully reads a wal-index header (i.e. the // checksum test is successful) and finds that the version field is not // WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite // returns SQLITE_CANTOPEN. // Index numbers for various locking bytes. WAL_NREADER is the number // of available reader locks and should be at least 3. The default // is SQLITE_SHM_NLOCK==8 and WAL_NREADER==5. // // Technically, the various VFSes are free to implement these locks however // they see fit. However, compatibility is encouraged so that VFSes can // interoperate. The standard implemention used on both unix and windows // is for the index number to indicate a byte offset into the // WalCkptInfo.aLock[] array in the wal-index header. In other words, all // locks are on the shm file. The WALINDEX_LOCK_OFFSET constant (which // should be 120) is the location in the shm file for the first locking // byte. // Object declarations type WalIndexHdr = WalIndexHdr1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61256:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 FaSegment [1]struct { FiNext int32 F__ccgo_pad1 [4]byte FaIndex uintptr FaPgno uintptr FnEntry int32 FiZero int32 } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61257:9 */ type WalIterator = WalIterator1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61257:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61258:9 */ type WalCkptInfo = WalCkptInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61258:28 */ // Candidate values for Wal.exclusiveMode. // Possible values for WAL.readOnly // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. type Ht_slot = U16 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61513:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames // correspond to the same database page, the iterator visits only the // frame most recently written to the WAL (in other words, the frame with // the largest index). // // The internals of this structure are only accessed by: // // walIteratorInit() - Create a new iterator, // walIteratorNext() - Step an iterator, // walIteratorFree() - Free an iterator. // // This functionality is used by the checkpoint code (see walCheckpoint()). type WalSegment = struct { FiNext int32 F__ccgo_pad1 [4]byte FaIndex uintptr FaPgno uintptr FnEntry int32 FiZero int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61257:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the // wal-index. // // Changing any of these constants will alter the wal-index format and // create incompatibilities. // The block of page numbers associated with the first hash-table in a // wal-index is smaller than usual. This is so that there is a complete // hash-table on each aligned 32KB page of the wal-index. // The wal-index is divided into pages of WALINDEX_PGSZ bytes each. // Obtain a pointer to the iPage'th page of the wal-index. The wal-index // is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are // numbered from zero. // // If the wal-index is currently smaller the iPage pages then the size // of the wal-index might be increased, but only if it is safe to do // so. It is safe to enlarge the wal-index if pWal->writeLock is true // or pWal->exclusiveMode==WAL_HEAPMEMORY_MODE. // // Three possible result scenarios: // // (1) rc==SQLITE_OK and *ppPage==Requested-Wal-Index-Page // (2) rc>=SQLITE_ERROR and *ppPage==NULL // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61584:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required if (*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(iPage+1)) var apNew uintptr libc.AtomicStoreUintptr(&apNew, uintptr(Xsqlite3Realloc(tls, (*Wal)(unsafe.Pointer(pWal)).FapWiData, uint64(nByte)))) if !(apNew != 0) { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return SQLITE_NOMEM } libc.Xmemset(tls, apNew+uintptr((*Wal)(unsafe.Pointer(pWal)).FnWiData)*8, 0, uint64(unsafe.Sizeof(uintptr(0)))*uint64(iPage+1-(*Wal)(unsafe.Pointer(pWal)).FnWiData)) (*Wal)(unsafe.Pointer(pWal)).FapWiData = apNew (*Wal)(unsafe.Pointer(pWal)).FnWiData = iPage + 1 } // Request a pointer to the required page from the VFS if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE { *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))) if !(int32(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8))) != 0) { rc = SQLITE_NOMEM } } else { rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, iPage, int32(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))), int32((*Wal)(unsafe.Pointer(pWal)).FwriteLock), (*Wal)(unsafe.Pointer(pWal)).FapWiData+uintptr(iPage)*8) if rc == SQLITE_OK { if iPage > 0 && Xsqlite3FaultSim(tls, 600) != 0 { rc = SQLITE_NOMEM } } else if rc&0xff == SQLITE_READONLY { *(*U8)(unsafe.Pointer(pWal + 66)) |= U8(WAL_SHM_RDONLY) if rc == SQLITE_READONLY { rc = SQLITE_OK } } } *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8)) return rc } func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61633:12: */ if (*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage || libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*8))) == uintptr(0) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) } return SQLITE_OK } // Return a pointer to the WalCkptInfo structure in the wal-index. func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61647:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61655:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } // The argument to this macro must be of type u32. On a little-endian // architecture, it returns the u32 value that results from interpreting // the 4 bytes as a big-endian value. On a big-endian architecture, it // returns the value that would be produced by interpreting the 4 bytes // of the input value as a little-endian integer. // Generate or extend an 8 byte checksum based on the data in // array aByte[] and the initial values of aIn[0] and aIn[1] (or // initial values of 0 and 0 if aIn==NULL). // // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61681:13: */ var s1 U32 var s2 U32 var aData uintptr = a var aEnd uintptr = a + uintptr(nByte) if aIn != 0 { s1 = *(*U32)(unsafe.Pointer(aIn)) s2 = *(*U32)(unsafe.Pointer(aIn + 1*4)) } else { s1 = libc.AssignUint32(&s2, U32(0)) } if nativeCksum != 0 { for __ccgo := true; __ccgo; __ccgo = aData < aEnd { s1 = s1 + (*(*U32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + s2) s2 = s2 + (*(*U32)(unsafe.Pointer(libc.PostIncUintptr(&aData, 4))) + s1) } } else { for __ccgo1 := true; __ccgo1; __ccgo1 = aData < aEnd { s1 = 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 + s2) s2 = 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 + s1) aData += 4 * uintptr(2) } } *(*U32)(unsafe.Pointer(aOut)) = s1 *(*U32)(unsafe.Pointer(aOut + 1*4)) = s2 } // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61724:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } } // Add the SQLITE_NO_TSAN as part of the return-type of a function // definition as a hint that the function contains constructs that // might give false-positive TSAN warnings. // // See tag-20200519-1. // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61748:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FisInit = U8(1) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion = U32(WALINDEX_MAX_VERSION) walChecksumBytes(tls, 1, pWal+72, nCksum, uintptr(0), pWal+72+40) // Possible TSAN false-positive. See tag-20200519-1 libc.Xmemcpy(tls, aHdr+1*48, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) walShmBarrier(tls, pWal) libc.Xmemcpy(tls, aHdr, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) } // This function encodes a single frame header and writes it to a buffer // supplied by the caller. A frame-header is made up of a series of // 4-byte big-endian integers, as follows: // // 0: Page number. // 4: For commit records, the size of the database image in pages // after the commit. For all other records, zero. // 8: Salt-1 (copied from the wal-header) // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61775:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 Xsqlite3Put4byte(tls, aFrame, iPage) Xsqlite3Put4byte(tls, aFrame+4, nTruncate) if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(0) { libc.Xmemcpy(tls, aFrame+8, pWal+72+32, uint64(8)) nativeCksum = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == SQLITE_BIGENDIAN) walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum) walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum) Xsqlite3Put4byte(tls, aFrame+16, *(*U32)(unsafe.Pointer(aCksum))) Xsqlite3Put4byte(tls, aFrame+20, *(*U32)(unsafe.Pointer(aCksum + 1*4))) } else { libc.Xmemset(tls, aFrame+8, 0, uint64(16)) } } // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61806:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 72 + 24 var pgno U32 // Page number of the frame // A frame is only valid if the salt values in the frame-header // match the salt values in the wal-header. if libc.Xmemcmp(tls, pWal+72+32, aFrame+8, uint64(8)) != 0 { return 0 } // A frame is only valid if the page number is creater than zero. pgno = Xsqlite3Get4byte(tls, aFrame) if pgno == U32(0) { return 0 } // A frame is only valid if a checksum of the WAL header, // all prior frams, the first 16 bytes of this frame-header, // and the frame-data matches the checksum in the last 8 // bytes of this frame-header. nativeCksum = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == SQLITE_BIGENDIAN) walChecksumBytes(tls, nativeCksum, aFrame, 8, aCksum, aCksum) walChecksumBytes(tls, nativeCksum, aData, int32((*Wal)(unsafe.Pointer(pWal)).FszPage), aCksum, aCksum) if *(*U32)(unsafe.Pointer(aCksum)) != Xsqlite3Get4byte(tls, aFrame+16) || *(*U32)(unsafe.Pointer(aCksum + 1*4)) != Xsqlite3Get4byte(tls, aFrame+20) { // Checksum failed. return 0 } // If we reach this point, the frame is valid. Return the page number // and the new database size. *(*U32)(unsafe.Pointer(piPage)) = pgno *(*U32)(unsafe.Pointer(pnTruncate)) = Xsqlite3Get4byte(tls, aFrame+4) return 1 } // Set or release locks on the WAL. Locks are either shared or exclusive. // A lock cannot be moved directly between shared and exclusive - it must go // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61885:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK } rc = Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, 1, SQLITE_SHM_LOCK|SQLITE_SHM_SHARED) return rc } func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61895:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, 1, SQLITE_SHM_UNLOCK|SQLITE_SHM_SHARED) } func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61901:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK } rc = Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, n, SQLITE_SHM_LOCK|SQLITE_SHM_EXCLUSIVE) return rc } func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61911:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } Xsqlite3OsShmLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, lockIdx, n, SQLITE_SHM_UNLOCK|SQLITE_SHM_EXCLUSIVE) } // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. func walHash(tls *libc.TLS, iPage U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61924:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61929:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). type WalHashLoc1 = struct { FaHash uintptr FaPgno uintptr FiZero U32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61938:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). type WalHashLoc = WalHashLoc1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61938:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages // numbered starting from 0. // // Set output variable pLoc->aHash to point to the start of the hash table // in the wal-index file. Set pLoc->iZero to one less than the frame // number of the first frame indexed by this hash table. If a // slot in the hash table is set to N, it refers to frame number // (pLoc->iZero+N) in the log. // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61959:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+8) if (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno != 0 { (*WalHashLoc)(unsafe.Pointer(pLoc)).FaHash = (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno + 4096*4 if iHash == 0 { (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno = (*WalHashLoc)(unsafe.Pointer(pLoc)).FaPgno + 34*4 (*WalHashLoc)(unsafe.Pointer(pLoc)).FiZero = U32(0) } else { (*WalHashLoc)(unsafe.Pointer(pLoc)).FiZero = U32(uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64((iHash-1)*HASHTABLE_NPAGE)) } } else if rc == SQLITE_OK { rc = SQLITE_ERROR } return rc } // Return the number of the wal-index page that contains the hash-table // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:61989:12: */ var iHash int32 = int32((uint64(iFrame+U32(HASHTABLE_NPAGE)) - (uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))) - uint64(1)) / uint64(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62004:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iFrame)-uint64(1))*4)) } return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iHash)*8)) + uintptr((uint64(iFrame-U32(1))-(uint64(HASHTABLE_NPAGE)-(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))))%uint64(HASHTABLE_NPAGE))*4)) } // Remove entries from the hash table that point to WAL slots greater // than pWal->hdr.mxFrame. // // This function is called whenever pWal->hdr.mxFrame is decreased due // to a rollback or savepoint. // // At most only the hash table containing pWal->hdr.mxFrame needs to be // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62024:13: */ bp := tls.Alloc(24) defer tls.Free(24) // var sLoc WalHashLoc at bp, 24 // Hash table location var iLimit int32 = 0 // Zero values greater than this var nByte int32 // Number of bytes to zero in aPgno[] var i int32 // Used to iterate through aHash[] if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0) { return } // Obtain pointers to the hash-table and page-number array containing // the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed // that the page said hash-table and array reside on is already mapped.(1) i = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp) if i != 0 { return } // Defense-in-depth, in case (1) above is wrong // Zero all hash-table entries that correspond to frame numbers greater // than pWal->hdr.mxFrame. iLimit = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) for i = 0; i < HASHTABLE_NPAGE*2; i++ { if int32(*(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaHash + uintptr(i)*2))) > iLimit { *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(i)*2)) = Ht_slot(0) } } // Zero the entries in the aPgno array that correspond to frames with // frame numbers greater than pWal->hdr.mxFrame. nByte = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno+uintptr(iLimit)*4)) / 1) libc.Xmemset(tls, (*WalHashLoc)(unsafe.Pointer(bp)).FaPgno+uintptr(iLimit)*4, 0, uint64(nByte)) } // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62086:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // Return code // var sLoc WalHashLoc at bp, 24 // Wal-index hash table location rc = walHashGet(tls, pWal, walFramePage(tls, iFrame), bp) // Assuming the wal-index file was successfully mapped, populate the // page number array and hash table entry. if rc == SQLITE_OK { var iKey int32 // Hash table key var idx int32 // Value to write to hash-table slot var nCollide int32 // Number of hash collisions idx = int32(iFrame - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) // If this is the first entry to be added to this hash-table, zero the // entire hash table and aPgno[] array before proceeding. if idx == 1 { var nByte int32 = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+8192*2) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno)) / 1) libc.Xmemset(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, 0, uint64(nByte)) } // If the entry in aPgno[] is already set, then the previous writer // must have exited unexpectedly in the middle of a transaction (after // writing one or more dirty pages to the WAL to free up memory). // Remove the remnants of that writers uncommitted transaction from // the hash-table before writing any new entries. if *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(idx-1)*4)) != 0 { walCleanupHash(tls, pWal) } // Write the aPgno[] array entry and the hash-table slot. nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { return Xsqlite3CorruptError(tls, 62126) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage libc.AtomicStoreNUint16((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+uintptr(iKey)*2, uint16(Ht_slot(idx)), 0) } return rc } // Recover the wal-index by reading the write-ahead log file. // // This routine first tries to establish an exclusive lock on the // wal-index to prevent other threads/processes from doing anything // with the WAL or wal-index while recovery is running. The // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62175:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 // Return Code // var nSize I64 at bp+16, 8 // Size of log file // var aFrameCksum [2]U32 at bp+72, 8 var iLock int32 var iOffset I64 // var pgno U32 at bp+64, 4 // Database page number for frame // var nTruncate U32 at bp+68, 4 // var aShare uintptr at bp+56, 8 var iFrame U32 // Index of last frame read var iLast U32 var iFirst U32 var nHdr U32 var nHdr32 U32 // var aBuf [32]U8 at bp+24, 32 // Buffer to load WAL header into var aPrivate uintptr // Heap copy of *-shm hash being populated var aFrame uintptr // Malloc'd buffer to load entire frame var szFrame int32 // Number of bytes in buffer aFrame[] var aData uintptr // Pointer to data part of aFrame buffer var szPage int32 // Page size according to the log var magic U32 // Magic value read from WAL header var version U32 // Magic value read from WAL header var isValid int32 // True if this frame is valid var iPg U32 // Current 32KB wal-index page var iLastFrame U32 var pInfo uintptr var i int32 *(*[2]U32)(unsafe.Pointer(bp + 72 /* aFrameCksum */)) = [2]U32{U32(0), U32(0)} // Lock offset to lock for checkpoint // Obtain an exclusive lock on all byte in the locking range not already // locked by the caller. The caller is guaranteed to have locked the // WAL_WRITE_LOCK byte, and may have also locked the WAL_CKPT_LOCK byte. // If successful, the same bytes that are locked here are unlocked before // this function returns. iLock = WAL_ALL_BUT_WRITE + int32((*Wal)(unsafe.Pointer(pWal)).FckptLock) rc = walLockExclusive(tls, pWal, iLock, 3+0-iLock) if !(rc != 0) { goto __1 } return rc __1: ; libc.Xmemset(tls, pWal+72, 0, uint64(unsafe.Sizeof(WalIndexHdr{}))) rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16) if !(rc != SQLITE_OK) { goto __2 } goto recovery_error __2: ; if !(*(*I64)(unsafe.Pointer(bp + 16)) > int64(WAL_HDRSIZE)) { goto __3 } // Buffer to load WAL header into aPrivate = uintptr(0) // Heap copy of *-shm hash being populated aFrame = uintptr(0) // Last frame in wal, based on nSize alone // Read in the WAL header. rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24, WAL_HDRSIZE, int64(0)) if !(rc != SQLITE_OK) { goto __4 } goto recovery_error __4: ; // If the database page size is not a power of two, or is greater than // SQLITE_MAX_PAGE_SIZE, conclude that the WAL file contains no valid // data. Similarly, if the 'magic' value is invalid, ignore the whole // WAL file. magic = Xsqlite3Get4byte(tls, bp+24) szPage = int32(Xsqlite3Get4byte(tls, bp+24+8)) if !(magic&0xFFFFFFFE != U32(WAL_MAGIC) || szPage&(szPage-1) != 0 || szPage > SQLITE_MAX_PAGE_SIZE || szPage < 512) { goto __5 } goto finished __5: ; (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = U8(magic & U32(0x00000001)) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) (*Wal)(unsafe.Pointer(pWal)).FnCkpt = Xsqlite3Get4byte(tls, bp+24+12) libc.Xmemcpy(tls, pWal+72+32, bp+24+16, uint64(8)) // Verify that the WAL header checksum is correct walChecksumBytes(tls, libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == SQLITE_BIGENDIAN), bp+24, WAL_HDRSIZE-2*4, uintptr(0), pWal+72+24) if !(*(*U32)(unsafe.Pointer(pWal + 72 + 24)) != Xsqlite3Get4byte(tls, bp+24+24) || *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) != Xsqlite3Get4byte(tls, bp+24+28)) { goto __6 } goto finished __6: ; // Verify that the version number on the WAL format is one that // are able to understand version = Xsqlite3Get4byte(tls, bp+24+4) if !(version != U32(WAL_MAX_VERSION)) { goto __7 } rc = Xsqlite3CantopenError(tls, 62258) goto finished __7: ; // Malloc a buffer to read frames into. szFrame = szPage + WAL_FRAME_HDRSIZE aFrame = Xsqlite3_malloc64(tls, uint64(szFrame)+(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0))))) if !!(aFrame != 0) { goto __8 } rc = SQLITE_NOMEM goto recovery_error __8: ; aData = aFrame + 24 aPrivate = aData + uintptr(szPage) // Read all frames from the log file. iLastFrame = U32((*(*I64)(unsafe.Pointer(bp + 16)) - int64(WAL_HDRSIZE)) / I64(szFrame)) iPg = U32(0) __9: if !(iPg <= U32(walFramePage(tls, iLastFrame))) { goto __11 } // Index of last frame read iLast = func() uint32 { if uint64(iLastFrame) < uint64(HASHTABLE_NPAGE)-(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0)))+uint64(iPg*U32(HASHTABLE_NPAGE)) { return iLastFrame } return uint32(uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64(iPg*U32(HASHTABLE_NPAGE))) }() iFirst = U32(uint64(1) + func() uint64 { if iPg == U32(0) { return uint64(0) } return uint64(HASHTABLE_NPAGE) - (uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2)+uint64(unsafe.Sizeof(WalCkptInfo{})))/uint64(unsafe.Sizeof(U32(0))) + uint64((iPg-U32(1))*U32(HASHTABLE_NPAGE)) }()) rc = walIndexPage(tls, pWal, int32(iPg), bp+56) if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __12 } goto __11 __12: ; *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = aPrivate iFrame = iFirst __13: if !(iFrame <= iLast) { goto __15 } iOffset = int64(WAL_HDRSIZE) + I64(iFrame-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) // dbsize field from frame header // Read and decode the next log frame. rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aFrame, szFrame, iOffset) if !(rc != SQLITE_OK) { goto __16 } goto __15 __16: ; isValid = walDecodeFrame(tls, pWal, bp+64, bp+68, aData, aFrame) if !!(isValid != 0) { goto __17 } goto __15 __17: ; rc = walIndexAppend(tls, pWal, iFrame, *(*U32)(unsafe.Pointer(bp + 64 /* pgno */))) if !(rc != SQLITE_OK) { goto __18 } goto __15 __18: ; // If nTruncate is non-zero, this is a commit record. if !(*(*U32)(unsafe.Pointer(bp + 68)) != 0) { goto __19 } (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = iFrame (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = *(*U32)(unsafe.Pointer(bp + 68 /* nTruncate */)) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = U16(szPage&0xff00 | szPage>>16) *(*U32)(unsafe.Pointer(bp + 72)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) *(*U32)(unsafe.Pointer(bp + 72 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) __19: ; goto __14 __14: iFrame++ goto __13 goto __15 __15: ; *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* aShare */)) nHdr = func() uint32 { if iPg == U32(0) { return uint32(uint64(unsafe.Sizeof(WalIndexHdr{}))*uint64(2) + uint64(unsafe.Sizeof(WalCkptInfo{}))) } return uint32(0) }() nHdr32 = U32(uint64(nHdr) / uint64(unsafe.Sizeof(U32(0)))) // Memcpy() should work fine here, on all reasonable implementations. // Technically, memcpy() might change the destination to some // intermediate value before setting to the final value, and that might // cause a concurrent reader to malfunction. Memcpy() is allowed to // do that, according to the spec, but no memcpy() implementation that // we know of actually does that, which is why we say that memcpy() // is safe for this. Memcpy() is certainly a lot faster. libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 56))+uintptr(nHdr32)*4, aPrivate+uintptr(nHdr32)*4, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))-uint64(nHdr)) if !(iFrame <= iLast) { goto __20 } goto __11 __20: ; goto __10 __10: iPg++ goto __9 goto __11 __11: ; Xsqlite3_free(tls, aFrame) __3: ; finished: if !(rc == SQLITE_OK) { goto __21 } *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 72)) *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 72 + 1*4)) walIndexWriteHdr(tls, pWal) // Reset the checkpoint-header. This is safe because this thread is // currently holding locks that exclude all other writers and // checkpointers. Then set the values of read-mark slots 1 through N. libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill = U32(0) (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(pInfo + 4)) = U32(0) i = 1 __22: if !(i < SQLITE_SHM_NLOCK-3) { goto __24 } rc = walLockExclusive(tls, pWal, 3+i, 1) if !(rc == SQLITE_OK) { goto __25 } if !(i == 1 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0) { goto __27 } *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame goto __28 __27: *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = READMARK_NOT_USED __28: ; walUnlockExclusive(tls, pWal, 3+i, 1) goto __26 __25: if !(rc != SQLITE_BUSY) { goto __29 } goto recovery_error __29: ; __26: ; goto __23 __23: i++ goto __22 goto __24 __24: ; // If more than one frame was recovered from the log file, report an // event via sqlite3_log(). This is to help with identifying performance // problems caused by applications routinely shutting down without // checkpointing the log file. if !((*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage != 0) { goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, ts+5273, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; __21: ; recovery_error: ; walUnlockExclusive(tls, pWal, iLock, 3+0-iLock) return rc } // Close an open wal-index. func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62398:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8)) = uintptr(0) } } if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmUnmap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, isDelete) } } // Open a connection to the WAL file zWalName. The database file must // already be opened on connection pDbFd. The buffer that zWalName points // to must remain valid for the lifetime of the returned Wal* handle. // // A SHARED lock should be held on the database file when this function // is called. The purpose of this SHARED lock is to prevent any other // client from unlinking the WAL or wal-index file. If another process // were to do this just after this client opened one of these files, the // system would be badly broken. // // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62426:20: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // Return Code var pRet uintptr // Object to allocate and return // var flags int32 at bp, 4 // Flags passed to OsOpen() // Verify the values of various constants. Any changes to the values // of these constants would result in an incompatible on-disk format // for the -shm file. Any change that causes one of these asserts to // fail is a backward compatibility problem, even if the change otherwise // works. // // This table also serves as a helpful cross-reference when trying to // interpret hex dumps of the -shm file. // In the amalgamation, the os_unix.c and os_win.c source files come before // this source file. Verify that the #defines of the locking byte offsets // in os_unix.c and os_win.c agree with the WALINDEX_LOCK_OFFSET value. // For that matter, if the lock offset ever changes from its initial design // value of 120, we need to know that so there is an assert() to check it. // Allocate an instance of struct Wal to return. *(*uintptr)(unsafe.Pointer(ppWal)) = uintptr(0) pRet = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Wal{}))+uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) if !(pRet != 0) { return SQLITE_NOMEM } (*Wal)(unsafe.Pointer(pRet)).FpVfs = pVfs (*Wal)(unsafe.Pointer(pRet)).FpWalFd = pRet + 1*152 (*Wal)(unsafe.Pointer(pRet)).FpDbFd = pDbFd (*Wal)(unsafe.Pointer(pRet)).FreadLock = int16(-1) (*Wal)(unsafe.Pointer(pRet)).FmxWalSize = mxWalSize (*Wal)(unsafe.Pointer(pRet)).FzWalName = zWalName (*Wal)(unsafe.Pointer(pRet)).FsyncHeader = U8(1) (*Wal)(unsafe.Pointer(pRet)).FpadToSectorBoundary = U8(1) (*Wal)(unsafe.Pointer(pRet)).FexclusiveMode = func() uint8 { if bNoShm != 0 { return uint8(WAL_HEAPMEMORY_MODE) } return uint8(WAL_NORMAL_MODE) }() // Open file handle on the write-ahead log file. *(*int32)(unsafe.Pointer(bp /* flags */)) = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_WAL rc = Xsqlite3OsOpen(tls, pVfs, zWalName, (*Wal)(unsafe.Pointer(pRet)).FpWalFd, *(*int32)(unsafe.Pointer(bp /* flags */)), bp) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp))&SQLITE_OPEN_READONLY != 0 { (*Wal)(unsafe.Pointer(pRet)).FreadOnly = U8(WAL_RDONLY) } if rc != SQLITE_OK { walIndexClose(tls, pRet, 0) Xsqlite3OsClose(tls, (*Wal)(unsafe.Pointer(pRet)).FpWalFd) Xsqlite3_free(tls, pRet) } else { var iDC int32 = Xsqlite3OsDeviceCharacteristics(tls, pDbFd) if iDC&SQLITE_IOCAP_SEQUENTIAL != 0 { (*Wal)(unsafe.Pointer(pRet)).FsyncHeader = U8(0) } if iDC&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { (*Wal)(unsafe.Pointer(pRet)).FpadToSectorBoundary = U8(0) } *(*uintptr)(unsafe.Pointer(ppWal)) = pRet } return rc } // Change the size to which the WAL file is trucated on each reset. func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62529:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } } // Find the smallest page number out of all pages held in the WAL that // has not been returned by any prior invocation of this method on the // same WalIterator object. Write into *piFrame the frame index where // that page was last written into the WAL. Write into *piPage the page // number. // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62543:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments iMin = (*WalIterator)(unsafe.Pointer(p)).FiPrior for i = (*WalIterator)(unsafe.Pointer(p)).FnSegment - 1; i >= 0; i-- { var pSegment uintptr = p + 8 + uintptr(i)*32 for (*WalSegment)(unsafe.Pointer(pSegment)).FiNext < (*WalSegment)(unsafe.Pointer(pSegment)).FnEntry { var iPg U32 = *(*U32)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaPgno + uintptr(*(*Ht_slot)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaIndex + uintptr((*WalSegment)(unsafe.Pointer(pSegment)).FiNext)*2)))*4)) if iPg > iMin { if iPg < iRet { iRet = iPg *(*U32)(unsafe.Pointer(piFrame)) = U32((*WalSegment)(unsafe.Pointer(pSegment)).FiZero + int32(*(*Ht_slot)(unsafe.Pointer((*WalSegment)(unsafe.Pointer(pSegment)).FaIndex + uintptr((*WalSegment)(unsafe.Pointer(pSegment)).FiNext)*2)))) } break } (*WalSegment)(unsafe.Pointer(pSegment)).FiNext++ } } *(*U32)(unsafe.Pointer(piPage)) = libc.AssignPtrUint32(p, iRet) return libc.Bool32(iRet == 0xFFFFFFFF) } // This function merges two sorted lists into a single sorted list. // // aLeft[] and aRight[] are arrays of indices. The sort key is // aContent[aLeft[]] and aContent[aRight[]]. Upon entry, the following // is guaranteed for all J<K: // // aContent[aLeft[J]] < aContent[aLeft[K]] // aContent[aRight[J]] < aContent[aRight[K]] // // This routine overwrites aRight[] with a new (probably longer) sequence // of indices such that the aRight[] contains every index that appears in // either aLeft[] or the old aRight[] and such that the second condition // above is still met. // // The aContent[aLeft[X]] values will be unique for all X. And the // aContent[aRight[X]] values will be unique too. But there might be // one or more combinations of X and Y such that // // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62596:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer var nRight int32 = *(*int32)(unsafe.Pointer(pnRight)) var aRight uintptr = *(*uintptr)(unsafe.Pointer(paRight)) for iRight < nRight || iLeft < nLeft { var logpage Ht_slot var dbpage Pgno if iLeft < nLeft && (iRight >= nRight || *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(iLeft)*2)))*4)) < *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aRight + uintptr(iRight)*2)))*4))) { logpage = *(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(libc.PostIncInt32(&iLeft, 1))*2)) } else { logpage = *(*Ht_slot)(unsafe.Pointer(aRight + uintptr(libc.PostIncInt32(&iRight, 1))*2)) } dbpage = *(*U32)(unsafe.Pointer(aContent + uintptr(logpage)*4)) *(*Ht_slot)(unsafe.Pointer(aTmp + uintptr(libc.PostIncInt32(&iOut, 1))*2)) = logpage if iLeft < nLeft && *(*U32)(unsafe.Pointer(aContent + uintptr(*(*Ht_slot)(unsafe.Pointer(aLeft + uintptr(iLeft)*2)))*4)) == dbpage { iLeft++ } } *(*uintptr)(unsafe.Pointer(paRight)) = aLeft *(*int32)(unsafe.Pointer(pnRight)) = iOut libc.Xmemcpy(tls, aLeft, aTmp, uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(iOut)) } // Sort the elements in list aList using aContent[] as the sort key. // Remove elements with duplicate keys, preferring to keep the // larger aList[] values. // // The aList[] entries are indices into aContent[]. The values in // aList[] are to be sorted so that for all J<K: // // aContent[aList[J]] < aContent[aList[K]] // // For any X and Y such that // // aContent[aList[X]] == aContent[aList[Y]] // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62653:13: */ bp := tls.Alloc(220) defer tls.Free(220) var nList int32 = *(*int32)(unsafe.Pointer(pnList)) // Size of input list *(*int32)(unsafe.Pointer(bp + 216 /* nMerge */)) = 0 // Number of elements in list aMerge *(*uintptr)(unsafe.Pointer(bp + 208 /* aMerge */)) = uintptr(0) // List to be merged var iList int32 // Index into input list var iSub U32 = U32(0) // Index into aSub array // var aSub [13]Sublist at bp, 208 // Array of sub-lists libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([13]Sublist{}))) for iList = 0; iList < nList; iList++ { *(*int32)(unsafe.Pointer(bp + 216 /* nMerge */)) = 1 *(*uintptr)(unsafe.Pointer(bp + 208 /* aMerge */)) = aList + uintptr(iList)*2 for iSub = U32(0); iList&(int32(1)<<iSub) != 0; iSub++ { var p uintptr p = bp + uintptr(iSub)*16 walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+208, bp+216, aBuffer) } (*Sublist)(unsafe.Pointer(bp + uintptr(iSub)*16)).FaList = *(*uintptr)(unsafe.Pointer(bp + 208 /* aMerge */)) (*Sublist)(unsafe.Pointer(bp + uintptr(iSub)*16)).FnList = *(*int32)(unsafe.Pointer(bp + 216 /* nMerge */)) } for iSub++; iSub < U32(int32(uint64(unsafe.Sizeof([13]Sublist{}))/uint64(unsafe.Sizeof(Sublist{})))); iSub++ { if nList&(int32(1)<<iSub) != 0 { var p uintptr p = bp + uintptr(iSub)*16 walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+208, bp+216, aBuffer) } } *(*int32)(unsafe.Pointer(pnList)) = *(*int32)(unsafe.Pointer(bp + 216 /* nMerge */)) } type Sublist = struct { FnList int32 F__ccgo_pad1 [4]byte FaList uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62659:3 */ // Free an iterator allocated by walIteratorInit(). func walIteratorFree(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62716:13: */ Xsqlite3_free(tls, p) } // Construct a WalInterator object that can be used to loop over all // pages in the WAL following frame nBackfill in ascending order. Frames // nBackfill or earlier may be included - excluding them is an optimization // only. The caller must hold the checkpoint lock. // // On success, make *pp point to the newly allocated WalInterator object // return SQLITE_OK. Otherwise, return an error code. If this routine // returns an error, the value of *pp is undefined. // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62733:12: */ bp := tls.Alloc(28) defer tls.Free(28) var p uintptr // Return value var nSegment int32 // Number of segments to merge var iLast U32 // Last frame in log var nByte Sqlite3_int64 // Number of bytes to allocate var i int32 // Iterator variable var aTmp uintptr // Temp space used by merge-sort var rc int32 = SQLITE_OK // Return Code // This routine only runs while holding the checkpoint lock. And // it only runs if there is actually content in the log (mxFrame>0). iLast = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame // Allocate space for the WalIterator object. nSegment = walFramePage(tls, iLast) + 1 nByte = Sqlite3_int64(uint64(unsafe.Sizeof(WalIterator{})) + uint64(nSegment-1)*uint64(unsafe.Sizeof(WalSegment{})) + uint64(iLast)*uint64(unsafe.Sizeof(Ht_slot(0)))) p = Xsqlite3_malloc64(tls, uint64(nByte)) if !(p != 0) { return SQLITE_NOMEM } libc.Xmemset(tls, p, 0, uint64(nByte)) (*WalIterator)(unsafe.Pointer(p)).FnSegment = nSegment // Allocate temporary space used by the merge-sort routine. This block // of memory will be freed before this function returns. aTmp = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Ht_slot(0)))*func() uint64 { if iLast > U32(HASHTABLE_NPAGE) { return uint64(HASHTABLE_NPAGE) } return uint64(iLast) }()) if !(aTmp != 0) { rc = SQLITE_NOMEM } for i = walFramePage(tls, nBackfill+U32(1)); rc == SQLITE_OK && i < nSegment; i++ { // var sLoc WalHashLoc at bp, 24 rc = walHashGet(tls, pWal, i, bp) if rc == SQLITE_OK { var j int32 // Counter variable // var nEntry int32 at bp+24, 4 // Number of entries in this segment var aIndex uintptr // Sorted index for this segment if i+1 == nSegment { *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) = int32(iLast - (*WalHashLoc)(unsafe.Pointer(bp)).FiZero) } else { *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) = int32((int64((*WalHashLoc)(unsafe.Pointer(bp)).FaHash) - int64((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno)) / 4) } aIndex = p + 8 + uintptr((*WalIterator)(unsafe.Pointer(p)).FnSegment)*32 + uintptr((*WalHashLoc)(unsafe.Pointer(bp)).FiZero)*2 (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FiZero++ for j = 0; j < *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)); j++ { *(*Ht_slot)(unsafe.Pointer(aIndex + uintptr(j)*2)) = Ht_slot(j) } walMergesort(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, aTmp, aIndex, bp+24) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FiZero = int32((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FiZero) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FnEntry = *(*int32)(unsafe.Pointer(bp + 24 /* nEntry */)) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FaIndex = aIndex (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*32)).FaPgno = (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno } } Xsqlite3_free(tls, aTmp) if rc != SQLITE_OK { walIteratorFree(tls, p) p = uintptr(0) } *(*uintptr)(unsafe.Pointer(pp)) = p return rc } // Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62896:12: */ var rc int32 for __ccgo := true; __ccgo; __ccgo = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xBusy})).f(tls, pBusyArg) != 0 { rc = walLockExclusive(tls, pWal, lockIdx, n) } return rc } // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62920:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } // The following is guaranteed when this function is called: // // a) the WRITER lock is held, // b) the entire log file has been checkpointed, and // c) any existing readers are reading exclusively from the database // file - there are no readers that may attempt to read a frame from // the log file. // // This function updates the shared-memory structures so that the next // client to write to the database (which may be this one) does so by // writing frames into the start of the log file. // // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62941:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 var pInfo uintptr = walCkptInfo(tls, pWal) var i int32 // Loop counter var aSalt uintptr = pWal + 72 + 32 // Big-endian salt values (*Wal)(unsafe.Pointer(pWal)).FnCkpt++ (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = U32(0) Xsqlite3Put4byte(tls, aSalt, U32(1)+Xsqlite3Get4byte(tls, aSalt)) libc.Xmemcpy(tls, pWal+72+32+1*4, bp, uint64(4)) walIndexWriteHdr(tls, pWal) libc.AtomicStoreNInt32(pInfo, int32(0), 0) (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = U32(0) *(*U32)(unsafe.Pointer(pInfo + 4 + 1*4)) = U32(0) for i = 2; i < SQLITE_SHM_NLOCK-3; i++ { *(*U32)(unsafe.Pointer(pInfo + 4 + uintptr(i)*4)) = READMARK_NOT_USED } } // Copy as much content as we can from the WAL back into the database file // in response to an sqlite3_wal_checkpoint() request or the equivalent. // // The amount of information copies from WAL to database might be limited // by active readers. This routine will never overwrite a database page // that a concurrent reader might be using. // // All I/O barrier operations (a.k.a fsyncs) occur in this routine when // SQLite is in WAL-mode in synchronous=NORMAL. That means that if // checkpoints are always run by a background thread or background // process, foreground threads will never block on a lengthy fsync call. // // Fsync is called on the WAL before writing content out of the WAL and // into the database. This ensures that if the new content is persistent // in the WAL and can be recovered following a power-loss or hard reset. // // Fsync is also called on the database file if (and only if) the entire // WAL content is copied into the database file. This second fsync makes // it safe to delete the WAL since the new content will persist in the // database file. // // This routine uses and updates the nBackfill field of the wal-index header. // This is the only routine that will increase the value of nBackfill. // (A WAL reset or recovery will revert nBackfill to zero, but not increase // its value.) // // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:62988:12: */ bp := tls.Alloc(36) defer tls.Free(36) var rc int32 // Return code var szPage int32 // Database page-size // var pIter uintptr at bp, 8 // Wal iterator context // var iDbpage U32 at bp+24, 4 // Next database page to write // var iFrame U32 at bp+28, 4 // Wal frame containing data for iDbpage var mxSafeFrame U32 // Max frame that can be backfilled var mxPage U32 // Max database page to write var i int32 // Loop counter var pInfo uintptr var iMark U32 var y U32 // var nReq I64 at bp+16, 8 // var nSize I64 at bp+8, 8 var iOffset I64 var szDb I64 var nBackfill U32 // var salt1 U32 at bp+32, 4 rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) *(*U32)(unsafe.Pointer(bp + 24 /* iDbpage */)) = U32(0) *(*U32)(unsafe.Pointer(bp + 28 /* iFrame */)) = U32(0) // The checkpoint status information szPage = walPagesize(tls, pWal) libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) { goto __1 } // EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked // in the SQLITE_CHECKPOINT_PASSIVE mode. // Compute in mxSafeFrame the index of the last frame of the WAL that is // safe to write into the database. Frames beyond mxSafeFrame might // overwrite database pages that are in use by active readers and thus // cannot be backfilled from the WAL. mxSafeFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame mxPage = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage i = 1 __2: if !(i < SQLITE_SHM_NLOCK-3) { goto __4 } y = U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(i)*4, 0)) if !(mxSafeFrame > y) { goto __5 } rc = walBusyLock(tls, pWal, xBusy, pBusyArg, 3+i, 1) if !(rc == SQLITE_OK) { goto __6 } iMark = func() uint32 { if i == 1 { return mxSafeFrame } return READMARK_NOT_USED }() libc.AtomicStoreNUint32(pInfo+4+uintptr(i)*4, uint32(iMark), 0) walUnlockExclusive(tls, pWal, 3+i, 1) goto __7 __6: if !(rc == SQLITE_BUSY) { goto __8 } mxSafeFrame = y xBusy = uintptr(0) goto __9 __8: goto walcheckpoint_out __9: ; __7: ; __5: ; goto __3 __3: i++ goto __2 goto __4 __4: ; // Allocate the iterator if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < mxSafeFrame) { goto __10 } rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill, bp) __10: ; if !(*(*uintptr)(unsafe.Pointer(bp)) != 0 && libc.AssignInt32(&rc, walBusyLock(tls, pWal, xBusy, pBusyArg, 3+0, 1)) == SQLITE_OK) { goto __11 } nBackfill = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = mxSafeFrame // Sync the WAL to disk rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, sync_flags>>2&0x03) // If the database may grow as a result of this checkpoint, hint // about the eventual size of the db file to the VFS layer. if !(rc == SQLITE_OK) { goto __12 } *(*I64)(unsafe.Pointer(bp + 16 /* nReq */)) = I64(mxPage) * I64(szPage) // Current size of database file Xsqlite3OsFileControl(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_CKPT_START, uintptr(0)) rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp+8) if !(rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 8)) < *(*I64)(unsafe.Pointer(bp + 16))) { goto __13 } if !(*(*I64)(unsafe.Pointer(bp + 8))+int64(65536)+I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame)*I64(szPage) < *(*I64)(unsafe.Pointer(bp + 16))) { goto __14 } // If the size of the final database is larger than the current // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. rc = Xsqlite3CorruptError(tls, 63072) goto __15 __14: Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+16) __15: ; __13: ; __12: ; // Iterate through the contents of the WAL, copying data to the db file __16: if !(rc == SQLITE_OK && 0 == walIteratorNext(tls, *(*uintptr)(unsafe.Pointer(bp)), bp+24, bp+28)) { goto __17 } if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { goto __18 } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } else { rc = SQLITE_INTERRUPT } goto __17 __18: ; if !(*(*U32)(unsafe.Pointer(bp + 28)) <= nBackfill || *(*U32)(unsafe.Pointer(bp + 28)) > mxSafeFrame || *(*U32)(unsafe.Pointer(bp + 24)) > mxPage) { goto __19 } goto __16 __19: ; iOffset = int64(WAL_HDRSIZE) + I64(*(*U32)(unsafe.Pointer(bp + 28))-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) // testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, zBuf, szPage, iOffset) if !(rc != SQLITE_OK) { goto __20 } goto __17 __20: ; iOffset = I64(*(*U32)(unsafe.Pointer(bp + 24))-U32(1)) * I64(szPage) rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, zBuf, szPage, iOffset) if !(rc != SQLITE_OK) { goto __21 } goto __17 __21: ; goto __16 __17: ; Xsqlite3OsFileControl(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_CKPT_DONE, uintptr(0)) // If work was actually accomplished... if !(rc == SQLITE_OK) { goto __22 } if !(mxSafeFrame == (*WalIndexHdr)(unsafe.Pointer(walIndexHdr(tls, pWal))).FmxFrame) { goto __23 } szDb = I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage) * I64(szPage) rc = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, szDb) if !(rc == SQLITE_OK) { goto __24 } rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, sync_flags>>2&0x03) __24: ; __23: ; if !(rc == SQLITE_OK) { goto __25 } libc.AtomicStoreNUint32(pInfo, uint32(mxSafeFrame), 0) __25: ; __22: ; // Release the reader lock held while backfilling walUnlockExclusive(tls, pWal, 3+0, 1) __11: ; if !(rc == SQLITE_BUSY) { goto __26 } // Reset the return code so as not to report a checkpoint failure // just because there are active readers. rc = SQLITE_OK __26: ; __1: ; // If this is an SQLITE_CHECKPOINT_RESTART or TRUNCATE operation, and the // entire wal file has been copied into the database file, then block // until all readers have finished using the wal file. This ensures that // the next process to write to the database restarts the wal file. if !(rc == SQLITE_OK && eMode != SQLITE_CHECKPOINT_PASSIVE) { goto __27 } if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) { goto __28 } rc = SQLITE_BUSY goto __29 __28: if !(eMode >= SQLITE_CHECKPOINT_RESTART) { goto __30 } Xsqlite3_randomness(tls, 4, bp+32) rc = walBusyLock(tls, pWal, xBusy, pBusyArg, 3+1, SQLITE_SHM_NLOCK-3-1) if !(rc == SQLITE_OK) { goto __31 } if !(eMode == SQLITE_CHECKPOINT_TRUNCATE) { goto __32 } // IMPLEMENTATION-OF: R-44699-57140 This mode works the same way as // SQLITE_CHECKPOINT_RESTART with the addition that it also // truncates the log file to zero bytes just prior to a // successful return. // // In theory, it might be safe to do this without updating the // wal-index header in shared memory, as all subsequent reader or // writer clients should see that the entire log file has been // checkpointed and behave accordingly. This seems unsafe though, // as it would leave the system in a state where the contents of // the wal-index header do not match the contents of the // file-system. To avoid this, update the wal-index header to // indicate that the log file contains zero valid frames. walRestartHdr(tls, pWal, *(*U32)(unsafe.Pointer(bp + 32 /* salt1 */))) rc = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, int64(0)) __32: ; walUnlockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) __31: ; __30: ; __29: ; __27: ; walcheckpoint_out: walIteratorFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) return rc } // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63174:13: */ bp := tls.Alloc(16) defer tls.Free(16) // var sz I64 at bp+8, 8 var rx int32 Xsqlite3BeginBenignMalloc(tls) rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8) if rx == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 8)) > nMax { rx = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, nMax) } Xsqlite3EndBenignMalloc(tls) if rx != 0 { Xsqlite3_log(tls, rx, ts+5310, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } // Close a connection to a log file. func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63191:20: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_OK if pWal != 0 { var isDelete int32 = 0 // True to unlink wal and wal-index files // If an EXCLUSIVE lock can be obtained on the database file (using the // ordinary, rollback-mode locking methods, this guarantees that the // connection associated with this log file is the only connection to // the database. In this case checkpoint the database and unlink both // the wal and wal-index files. // // The EXCLUSIVE lock is not released before returning. if zBuf != uintptr(0) && SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3OsLock(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_LOCK_EXCLUSIVE)) { if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE { (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) } rc = Xsqlite3WalCheckpoint(tls, pWal, db, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0), sync_flags, nBuf, zBuf, uintptr(0), uintptr(0)) if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* bPersist */)) = -1 Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_PERSIST_WAL, bp) if *(*int32)(unsafe.Pointer(bp)) != 1 { // Try to delete the WAL file if the checkpoint completed and // fsyned (rc==SQLITE_OK) and if we are not in persistent-wal // mode (!bPersist) isDelete = 1 } else if (*Wal)(unsafe.Pointer(pWal)).FmxWalSize >= int64(0) { // Try to truncate the WAL file to zero bytes if the checkpoint // completed and fsynced (rc==SQLITE_OK) and we are in persistent // WAL mode (bPersist) and if the PRAGMA journal_size_limit is a // non-negative value (pWal->mxWalSize>=0). Note that we truncate // to zero bytes as truncating to the journal_size_limit might // leave a corrupt WAL file on disk. walLimitSize(tls, pWal, int64(0)) } } } walIndexClose(tls, pWal, isDelete) Xsqlite3OsClose(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd) if isDelete != 0 { Xsqlite3BeginBenignMalloc(tls) Xsqlite3OsDelete(tls, (*Wal)(unsafe.Pointer(pWal)).FpVfs, (*Wal)(unsafe.Pointer(pWal)).FzWalName, 0) Xsqlite3EndBenignMalloc(tls) } Xsqlite3_free(tls, (*Wal)(unsafe.Pointer(pWal)).FapWiData) Xsqlite3_free(tls, pWal) } return rc } // Try to read the wal-index header. Return 0 on success and 1 if // there is a problem. // // The wal-index is in shared memory. Another thread or process might // be writing the header at the same time this procedure is trying to // read it, which might result in inconsistency. A dirty read is detected // by verifying that both copies of the header are the same and also by // a checksum on the header. // // If and only if the read is consistent and the header is different from // pWal->hdr, then pWal->hdr is updated to the content of the new header // and *pChanged is set to 1. // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63272:27: */ bp := tls.Alloc(104) defer tls.Free(104) // var aCksum [2]U32 at bp+96, 8 // Checksum on the header content // var h1 WalIndexHdr at bp, 48 // var h2 WalIndexHdr at bp+48, 48 // Two copies of the header content var aHdr uintptr // Header in shared memory // The first page of the wal-index must be mapped at this point. // Read the header. This might happen concurrently with a write to the // same area of shared memory on a different CPU in a SMP, // meaning it is possible that an inconsistent snapshot is read // from the file. If this happens, return non-zero. // // tag-20200519-1: // There are two copies of the header at the beginning of the wal-index. // When reading, read [0] first then [1]. Writes are in the reverse order. // Memory barriers are used to prevent the compiler or the hardware from // reordering the reads and writes. TSAN and similar tools can sometimes // give false-positive warnings about these accesses because the tools do not // account for the double-read and the memory barrier. The use of mutexes // here would be problematic as the memory being accessed is potentially // shared among multiple processes and not all mutex implementions work // reliably in that environment. libc.AtomicStoreUintptr(&aHdr, uintptr(walIndexHdr(tls, pWal))) libc.Xmemcpy(tls, bp, aHdr, uint64(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive walShmBarrier(tls, pWal) libc.Xmemcpy(tls, bp+48, aHdr+1*48, uint64(unsafe.Sizeof(WalIndexHdr{}))) if libc.Xmemcmp(tls, bp, bp+48, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { return 1 // Dirty read } if int32((*WalIndexHdr)(unsafe.Pointer(bp)).FisInit) == 0 { return 1 // Malformed header - probably all zeros } walChecksumBytes(tls, 1, bp, int32(uint64(unsafe.Sizeof(WalIndexHdr{}))-uint64(unsafe.Sizeof([2]U32{}))), uintptr(0), bp+96) if *(*U32)(unsafe.Pointer(bp + 96)) != *(*U32)(unsafe.Pointer(bp + 40)) || *(*U32)(unsafe.Pointer(bp + 96 + 1*4)) != *(*U32)(unsafe.Pointer(bp + 40 + 1*4)) { return 1 // Checksum does not match } if libc.Xmemcmp(tls, pWal+72, bp, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { *(*int32)(unsafe.Pointer(pChanged)) = 1 libc.Xmemcpy(tls, pWal+72, bp, uint64(unsafe.Sizeof(WalIndexHdr{}))) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16) } // The header was successfully read. Return zero. return 0 } // This is the value that walTryBeginRead returns when it needs to // be retried. // Read the wal-index header from the wal-index and into pWal->hdr. // If the wal-header appears to be corrupt, try to reconstruct the // wal-index from the WAL before returning. // // Set *pChanged to 1 if the wal-index header value in pWal->hdr is // changed by this operation. If pWal->hdr is unchanged, set *pChanged // to 0. // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63342:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // Return code var badHdr int32 // True if a header read failed // var page0 uintptr at bp, 8 // Chunk of wal-index containing header // Ensure that page 0 of the wal-index (the page that contains the // wal-index header) is mapped. Return early if an error occurs here. rc = walIndexPage(tls, pWal, 0, bp) if rc != SQLITE_OK { // READONLY changed to OK in walIndexPage if rc == SQLITE_READONLY|int32(5)<<8 { // The SQLITE_READONLY_CANTINIT return means that the shared-memory // was openable but is not writable, and this thread is unable to // confirm that another write-capable connection has the shared-memory // open, and hence the content of the shared-memory is unreliable, // since the shared-memory might be inconsistent with the WAL file // and there is no writer on hand to fix it. (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(1) (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_HEAPMEMORY_MODE) *(*int32)(unsafe.Pointer(pChanged)) = 1 } else { return rc // Any other non-OK return is just an error } } else { // page0 can be NULL if the SHM is zero bytes in size and pWal->writeLock // is zero, which prevents the SHM from growing } // If the first page of the wal-index has been mapped, try to read the // wal-index header immediately, without holding any lock. This usually // works, but may fail if the wal-index header is corrupt or currently // being modified by another thread or process. badHdr = func() int32 { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return walIndexTryHdr(tls, pWal, pChanged) } return 1 }() // If the first attempt failed, it might have been due to a race // with a writer. So get a WRITE lock and try again. if badHdr != 0 { if int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadOnly)&WAL_SHM_RDONLY != 0 { if SQLITE_OK == libc.AssignInt32(&rc, walLockShared(tls, pWal, WAL_WRITE_LOCK)) { walUnlockShared(tls, pWal, WAL_WRITE_LOCK) rc = SQLITE_READONLY | int32(1)<<8 } } else { var bWriteLock int32 = int32((*Wal)(unsafe.Pointer(pWal)).FwriteLock) if bWriteLock != 0 || SQLITE_OK == libc.AssignInt32(&rc, walLockExclusive(tls, pWal, WAL_WRITE_LOCK, 1)) { (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) if SQLITE_OK == libc.AssignInt32(&rc, walIndexPage(tls, pWal, 0, bp)) { badHdr = walIndexTryHdr(tls, pWal, pChanged) if badHdr != 0 { // If the wal-index header is still malformed even while holding // a WRITE lock, it can only mean that the header is corrupted and // needs to be reconstructed. So run recovery to do exactly that. rc = walIndexRecover(tls, pWal) *(*int32)(unsafe.Pointer(pChanged)) = 1 } } if bWriteLock == 0 { (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) } } } } // If the header is read successfully, check the version number to make // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { rc = Xsqlite3CantopenError(tls, 63421) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { walIndexClose(tls, pWal, 0) (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(0) // walIndexRecover() might have returned SHORT_READ if a concurrent // writer truncated the WAL out from under it. If that happens, it // indicates that a writer has fixed the SHM file for us, so retry if rc == SQLITE_IOERR|int32(2)<<8 { rc = -1 } } (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_NORMAL_MODE) } return rc } // Open a transaction in a connection where the shared-memory is read-only // and where we cannot verify that there is a separate write-capable connection // on hand to keep the shared-memory up-to-date with the WAL file. // // This can happen, for example, when the shared-memory is implemented by // memory-mapping a *-shm file, where a prior writer has shut down and // left the *-shm file on disk, and now the present connection is trying // to use that database but lacks write permission on the *-shm file. // Other scenarios are also possible, depending on the VFS implementation. // // Precondition: // // The *-wal file has been read and an appropriate wal-index has been // constructed in pWal->apWiData[] using heap memory instead of shared // memory. // // If this function returns SQLITE_OK, then the read transaction has // been successfully opened. In this case output variable (*pChanged) // is set to true before returning if the caller should discard the // contents of the page cache before proceeding. Or, if it returns // WAL_RETRY, then the heap memory wal-index has been discarded and // the caller should retry opening the read transaction from the // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63466:12: */ bp := tls.Alloc(64) defer tls.Free(64) // var szWal I64 at bp+8, 8 // Size of wal file on disk in bytes var iOffset I64 // Current offset when reading wal file // var aBuf [32]U8 at bp+16, 32 // Buffer to load WAL header into var aFrame uintptr // Malloc'd buffer to load entire frame var szFrame int32 // Number of bytes in buffer aFrame[] var aData uintptr // Pointer to data part of aFrame buffer // var pDummy uintptr at bp, 8 // Dummy argument for xShmMap var rc int32 // Return code // var aSaveCksum [2]U32 at bp+48, 8 // var pgno U32 at bp+56, 4 // Database page number for frame // var nTruncate U32 at bp+60, 4 var i int32 aFrame = uintptr(0) // Saved copy of pWal->hdr.aFrameCksum // Take WAL_READ_LOCK(0). This has the effect of preventing any // writers from running a checkpoint, but does not stop them // from running recovery. rc = walLockShared(tls, pWal, 3+0) if !(rc != SQLITE_OK) { goto __1 } if !(rc == SQLITE_BUSY) { goto __2 } rc = -1 __2: ; goto begin_unreliable_shm_out __1: ; (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(0) // Check to see if a separate writer has attached to the shared-memory area, // thus making the shared-memory "reliable" again. Do this by invoking // the xShmMap() routine of the VFS and looking to see if the return // is SQLITE_READONLY instead of SQLITE_READONLY_CANTINIT. // // If the shared-memory is now "reliable" return WAL_RETRY, which will // cause the heap-memory WAL-index to be discarded and the actual // shared memory to be used in its place. // // This step is important because, even though this connection is holding // the WAL_READ_LOCK(0) which prevents a checkpoint, a writer might // have already checkpointed the WAL file and, while the current // is active, wrap the WAL and start overwriting frames that this // process wants to use. // // Once sqlite3OsShmMap() has been called for an sqlite3_file and has // returned any SQLITE_READONLY value, it must return only SQLITE_READONLY // or SQLITE_READONLY_CANTINIT or some error for all subsequent invocations, // even if some external agent does a "chmod" to make the shared-memory // writable by us, until sqlite3OsShmUnmap() has been called. // This is a requirement on the VFS implementation. rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, 0, int32(uint64(unsafe.Sizeof(Ht_slot(0)))*uint64(HASHTABLE_NPAGE*2)+uint64(HASHTABLE_NPAGE)*uint64(unsafe.Sizeof(U32(0)))), 0, bp) // SQLITE_OK not possible for read-only connection if !(rc != SQLITE_READONLY|int32(5)<<8) { goto __3 } rc = func() int32 { if rc == SQLITE_READONLY { return -1 } return rc }() goto begin_unreliable_shm_out __3: ; // We reach this point only if the real shared-memory is still unreliable. // Assume the in-memory WAL-index substitute is correct and load it // into pWal->hdr. libc.Xmemcpy(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) // Make sure some writer hasn't come in and changed the WAL file out // from under us, then disconnected, while we were not looking. rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8) if !(rc != SQLITE_OK) { goto __4 } goto begin_unreliable_shm_out __4: ; if !(*(*I64)(unsafe.Pointer(bp + 8)) < int64(WAL_HDRSIZE)) { goto __5 } // If the wal file is too small to contain a wal-header and the // wal-index header has mxFrame==0, then it must be safe to proceed // reading the database file only. However, the page cache cannot // be trusted, as a read/write connection may have connected, written // the db, run a checkpoint, truncated the wal file and disconnected // since this client's last read transaction. *(*int32)(unsafe.Pointer(pChanged)) = 1 rc = func() int32 { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0) { return SQLITE_OK } return -1 }() goto begin_unreliable_shm_out __5: ; // Check the salt keys at the start of the wal file still match. rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16, WAL_HDRSIZE, int64(0)) if !(rc != SQLITE_OK) { goto __6 } goto begin_unreliable_shm_out __6: ; if !(libc.Xmemcmp(tls, pWal+72+32, bp+16+16, uint64(8)) != 0) { goto __7 } // Some writer has wrapped the WAL file while we were not looking. // Return WAL_RETRY which will cause the in-memory WAL-index to be // rebuilt. rc = -1 goto begin_unreliable_shm_out __7: ; // Allocate a buffer to read frames into szFrame = int32((*Wal)(unsafe.Pointer(pWal)).FszPage + U32(WAL_FRAME_HDRSIZE)) aFrame = Xsqlite3_malloc64(tls, uint64(szFrame)) if !(aFrame == uintptr(0)) { goto __8 } rc = SQLITE_NOMEM goto begin_unreliable_shm_out __8: ; aData = aFrame + 24 // Check to see if a complete transaction has been appended to the // wal file since the heap-memory wal-index was created. If so, the // heap-memory wal-index is discarded and WAL_RETRY returned to // the caller. *(*U32)(unsafe.Pointer(bp + 48)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) *(*U32)(unsafe.Pointer(bp + 48 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) iOffset = int64(WAL_HDRSIZE) + I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame+U32(1)-U32(1))*I64((*Wal)(unsafe.Pointer(pWal)).FszPage+U32(WAL_FRAME_HDRSIZE)) __9: if !(iOffset+I64(szFrame) <= *(*I64)(unsafe.Pointer(bp + 8))) { goto __11 } // dbsize field from frame header // Read and decode the next log frame. rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aFrame, szFrame, iOffset) if !(rc != SQLITE_OK) { goto __12 } goto __11 __12: ; if !!(walDecodeFrame(tls, pWal, bp+56, bp+60, aData, aFrame) != 0) { goto __13 } goto __11 __13: ; // If nTruncate is non-zero, then a complete transaction has been // appended to this wal file. Set rc to WAL_RETRY and break out of // the loop. if !(*(*U32)(unsafe.Pointer(bp + 60)) != 0) { goto __14 } rc = -1 goto __11 __14: ; goto __10 __10: iOffset = iOffset + I64(szFrame) goto __9 goto __11 __11: ; *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 48)) *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 48 + 1*4)) begin_unreliable_shm_out: Xsqlite3_free(tls, aFrame) if !(rc != SQLITE_OK) { goto __15 } i = 0 __16: if !(i < (*Wal)(unsafe.Pointer(pWal)).FnWiData) { goto __18 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(i)*8)) = uintptr(0) goto __17 __17: i++ goto __16 goto __18 __18: ; (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable = U8(0) Xsqlite3WalEndReadTransaction(tls, pWal) *(*int32)(unsafe.Pointer(pChanged)) = 1 __15: ; return rc } // Attempt to start a read transaction. This might fail due to a race or // other transient condition. When that happens, it returns WAL_RETRY to // indicate to the caller that it is safe to retry immediately. // // On success return SQLITE_OK. On a permanent failure (such an // I/O error or an SQLITE_BUSY because another process is running // recovery) return a positive error code. // // The useWal parameter is true to force the use of the WAL and disable // the case where the WAL is bypassed because it has been completely // checkpointed. If useWal==0 then this routine calls walIndexReadHdr() // to make a copy of the wal-index header into pWal->hdr. If the // wal-index header has changed, *pChanged is set to 1 (as an indication // to the caller that the local page cache is obsolete and needs to be // flushed.) When useWal==1, the wal-index header is assumed to already // be loaded and the pChanged parameter is unused. // // The caller must set the cnt parameter to the number of prior calls to // this routine during the current read attempt that returned WAL_RETRY. // This routine will start taking more aggressive measures to clear the // race conditions after multiple WAL_RETRY returns, and after an excessive // number of errors will ultimately return SQLITE_PROTOCOL. The // SQLITE_PROTOCOL return indicates that some other process has gone rogue // and is not honoring the locking protocol. There is a vanishingly small // chance that SQLITE_PROTOCOL could be returned because of a run of really // bad luck when there is lots of contention for the wal-index, but that // possibility is so small that it can be safely neglected, we believe. // // On success, this routine obtains a read lock on // WAL_READ_LOCK(pWal->readLock). The pWal->readLock integer is // in the range 0 <= pWal->readLock < WAL_NREADER. If pWal->readLock==(-1) // that means the Wal does not hold any read lock. The reader must not // access any database page that is modified by a WAL frame up to and // including frame number aReadMark[pWal->readLock]. The reader will // use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0 // Or if pWal->readLock==0, then the reader will ignore the WAL // completely and get all content directly from the database file. // If the useWal parameter is 1 then the WAL will never be ignored and // this routine will always set pWal->readLock>0 on success. // When the read transaction is completed, the caller must release the // lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1. // // This routine uses the nBackfill and aReadMark[] fields of the header // to select a particular WAL_READ_LOCK() that strives to let the // checkpoint process do as much work as possible. This routine might // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63663:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value var i int32 // Loop counter var rc int32 = SQLITE_OK // Return code var mxFrame U32 // Wal frame to lock to // Not currently locked // useWal may only be set for read/write connections // Take steps to avoid spinning forever if there is a protocol error. // // Circumstances that cause a RETRY should only last for the briefest // instances of time. No I/O or other system calls are done while the // locks are held, so the locks should not be held for very long. But // if we are unlucky, another process that is holding a lock might get // paged out or take a page-fault that is time-consuming to resolve, // during the few nanoseconds that it is holding the lock. In that case, // it might take longer than normal for the lock to free. // // After 5 RETRYs, we begin calling sqlite3OsSleep(). The first few // calls to sqlite3OsSleep() have a delay of 1 microsecond. Really this // is more of a scheduler yield than an actual delay. But on the 10th // an subsequent retries, the delays start becoming longer and longer, // so that on the 100th (and last) RETRY we delay for 323 milliseconds. // The total delay time before giving up is less than 10 seconds. if cnt > 5 { var nDelay int32 = 1 // Pause time in microseconds if cnt > 100 { return SQLITE_PROTOCOL } if cnt >= 10 { nDelay = (cnt - 9) * (cnt - 9) * 39 } Xsqlite3OsSleep(tls, (*Wal)(unsafe.Pointer(pWal)).FpVfs, nDelay) } if !(useWal != 0) { if int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 { rc = walIndexReadHdr(tls, pWal, pChanged) } if rc == SQLITE_BUSY { // If there is not a recovery running in another thread or process // then convert BUSY errors to WAL_RETRY. If recovery is known to // be running, convert BUSY to BUSY_RECOVERY. There is a race here // which might cause WAL_RETRY to be returned even if BUSY_RECOVERY // would be technically correct. But the race is benign since with // WAL_RETRY this routine will be called again and will probably be // right on the second iteration. if *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) == uintptr(0) { // This branch is taken when the xShmMap() method returns SQLITE_BUSY. // We assume this is a transient condition, so return WAL_RETRY. The // xShmMap() implementation used by the default unix and win32 VFS // modules may return SQLITE_BUSY due to a race condition in the // code that determines whether or not the shared-memory region // must be zeroed before the requested page is returned. rc = -1 } else if SQLITE_OK == libc.AssignInt32(&rc, walLockShared(tls, pWal, WAL_RECOVER_LOCK)) { walUnlockShared(tls, pWal, WAL_RECOVER_LOCK) rc = -1 } else if rc == SQLITE_BUSY { rc = SQLITE_BUSY | int32(1)<<8 } } if rc != SQLITE_OK { return rc } else if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { return walBeginShmUnreliable(tls, pWal, pChanged) } } libc.AtomicStoreUintptr(&pInfo, uintptr(walCkptInfo(tls, pWal))) if !(useWal != 0) && U32(libc.AtomicLoadNUint32(pInfo, 0)) == (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame && ((*Wal)(unsafe.Pointer(pWal)).FpSnapshot == uintptr(0) || (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame == U32(0)) { // The WAL has been completely backfilled (or it is empty). // and can be safely ignored. rc = walLockShared(tls, pWal, 3+0) walShmBarrier(tls, pWal) if rc == SQLITE_OK { if libc.Xmemcmp(tls, walIndexHdr(tls, pWal), pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { // It is not safe to allow the reader to continue here if frames // may have been appended to the log before READ_LOCK(0) was obtained. // When holding READ_LOCK(0), the reader ignores the entire log file, // which implies that the database file contains a trustworthy // snapshot. Since holding READ_LOCK(0) prevents a checkpoint from // happening, this is usually correct. // // However, if frames have been appended to the log (or if the log // is wrapped and written for that matter) before the READ_LOCK(0) // is obtained, that is not necessarily true. A checkpointer may // have started to backfill the appended frames but crashed before // it finished. Leaving a corrupt image in the database file. walUnlockShared(tls, pWal, 3+0) return -1 } (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(0) return SQLITE_OK } else if rc != SQLITE_BUSY { return rc } } // If we get this far, it means that the reader will want to use // the WAL to get at content from recent commits. The job now is // to select one of the aReadMark[] entries that is closest to // but not exceeding pWal->hdr.mxFrame and lock that entry. mxReadMark = U32(0) mxI = 0 mxFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame if (*Wal)(unsafe.Pointer(pWal)).FpSnapshot != 0 && (*WalIndexHdr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpSnapshot)).FmxFrame < mxFrame { mxFrame = (*WalIndexHdr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpSnapshot)).FmxFrame } for i = 1; i < SQLITE_SHM_NLOCK-3; i++ { var thisMark U32 = U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(i)*4, 0)) if mxReadMark <= thisMark && thisMark <= mxFrame { mxReadMark = thisMark mxI = i } } if int32((*Wal)(unsafe.Pointer(pWal)).FreadOnly)&WAL_SHM_RDONLY == 0 && (mxReadMark < mxFrame || mxI == 0) { for i = 1; i < SQLITE_SHM_NLOCK-3; i++ { rc = walLockExclusive(tls, pWal, 3+i, 1) if rc == SQLITE_OK { libc.AtomicStoreNUint32(pInfo+4+uintptr(i)*4, uint32(mxFrame), 0) mxReadMark = mxFrame mxI = i walUnlockExclusive(tls, pWal, 3+i, 1) break } else if rc != SQLITE_BUSY { return rc } } } if mxI == 0 { if rc == SQLITE_BUSY { return -1 } return SQLITE_READONLY | int32(5)<<8 } rc = walLockShared(tls, pWal, 3+mxI) if rc != 0 { if rc == SQLITE_BUSY { return -1 } return rc } // Now that the read-lock has been obtained, check that neither the // value in the aReadMark[] array or the contents of the wal-index // header have changed. // // It is necessary to check that the wal-index header did not change // between the time it was read and when the shared-lock was obtained // on WAL_READ_LOCK(mxI) was obtained to account for the possibility // that the log file may have been wrapped by a writer, or that frames // that occur later in the log than pWal->hdr.mxFrame may have been // copied into the database by a checkpointer. If either of these things // happened, then reading the database with the current value of // pWal->hdr.mxFrame risks reading a corrupted snapshot. So, retry // instead. // // Before checking that the live wal-index header has not changed // since it was read, set Wal.minFrame to the first frame in the wal // file that has not yet been checkpointed. This client will not need // to read any frames earlier than minFrame from the wal file - they // can be safely read directly from the database file. // // Because a ShmBarrier() call is made between taking the copy of // nBackfill and checking that the wal-header in shared-memory still // matches the one cached in pWal->hdr, it is guaranteed that the // checkpointer that set nBackfill was not working with a wal-index // header newer than that cached in pWal->hdr. If it were, that could // cause a problem. The checkpointer could omit to checkpoint // a version of page X that lies before pWal->minFrame (call that version // A) on the basis that there is a newer version (version B) of the same // page later in the wal file. But if version B happens to like past // frame pWal->hdr.mxFrame - then the client would incorrectly assume // that it can read version A from the database file. However, since // we can guarantee that the checkpointer that set nBackfill could not // see any pages past pWal->hdr.mxFrame, this problem does not come up. (*Wal)(unsafe.Pointer(pWal)).FminFrame = U32(libc.AtomicLoadNUint32(pInfo, 0) + 1) walShmBarrier(tls, pWal) if U32(libc.AtomicLoadNUint32(pInfo+4+uintptr(mxI)*4, 0)) != mxReadMark || libc.Xmemcmp(tls, walIndexHdr(tls, pWal), pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { walUnlockShared(tls, pWal, 3+mxI) return -1 } else { (*Wal)(unsafe.Pointer(pWal)).FreadLock = I16(mxI) } return rc } // Attempt to reduce the value of the WalCkptInfo.nBackfillAttempted // variable so that older snapshots can be accessed. To do this, loop // through all wal frames from nBackfillAttempted to (nBackfill+1), // comparing their content to the corresponding page with the database // file, if any. Set nBackfillAttempted to the frame number of the // first frame for which the wal file content matches the db file. // // This is only really safe if the file-system is such that any page // writes made by earlier checkpointers were atomic operations, which // is not always true. It is also possible that nBackfillAttempted // may be left set to a value larger than expected, if a wal frame // contains content that duplicate of an earlier version of the same // page. // // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63893:20: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 rc = walLockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) if rc == SQLITE_OK { var pInfo uintptr = walCkptInfo(tls, pWal) var szPage int32 = int32((*Wal)(unsafe.Pointer(pWal)).FszPage) // var szDb I64 at bp, 8 // Size of db file in bytes rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp) if rc == SQLITE_OK { var pBuf1 uintptr = Xsqlite3_malloc(tls, szPage) var pBuf2 uintptr = Xsqlite3_malloc(tls, szPage) if pBuf1 == uintptr(0) || pBuf2 == uintptr(0) { rc = SQLITE_NOMEM } else { var i U32 = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted for i = (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted; i > U32(libc.AtomicLoadNUint32(pInfo /* &.nBackfill */, 0)); i-- { // var sLoc WalHashLoc at bp+8, 24 // Hash table location var pgno U32 // Page number in db file var iDbOff I64 // Offset of db file entry var iWalOff I64 // Offset of wal file entry rc = walHashGet(tls, pWal, walFramePage(tls, i), bp+8) if rc != SQLITE_OK { break } pgno = *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp+8 /* &sLoc */)).FaPgno + uintptr(i-(*WalHashLoc)(unsafe.Pointer(bp+8)).FiZero-U32(1))*4)) iDbOff = I64(pgno-U32(1)) * I64(szPage) if iDbOff+I64(szPage) <= *(*I64)(unsafe.Pointer(bp)) { iWalOff = int64(WAL_HDRSIZE) + I64(i-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pBuf1, szPage, iWalOff) if rc == SQLITE_OK { rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, pBuf2, szPage, iDbOff) } if rc != SQLITE_OK || 0 == libc.Xmemcmp(tls, pBuf1, pBuf2, uint64(szPage)) { break } } (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = i - U32(1) } } Xsqlite3_free(tls, pBuf1) Xsqlite3_free(tls, pBuf2) } walUnlockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) } return rc } // Begin a read transaction on the database. // // This routine used to be called sqlite3OpenSnapshot() and with good reason: // it takes a snapshot of the state of the WAL and wal-index for the current // instant in time. The current thread will continue to use this snapshot. // Other threads might append new content to the WAL and wal-index but // that extra content is ignored by the current thread. // // If the database contents have changes since the previous read // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:63964:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 var pSnapshot uintptr = (*Wal)(unsafe.Pointer(pWal)).FpSnapshot if pSnapshot != 0 { if libc.Xmemcmp(tls, pSnapshot, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { bChanged = 1 } // It is possible that there is a checkpointer thread running // concurrent with this code. If this is the case, it may be that the // checkpointer has already determined that it will checkpoint // snapshot X, where X is later in the wal file than pSnapshot, but // has not yet set the pInfo->nBackfillAttempted variable to indicate // its intent. To avoid the race condition this leads to, ensure that // there is no checkpointer process by taking a shared CKPT lock // before checking pInfo->nBackfillAttempted. rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc != SQLITE_OK { return rc } (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(1) } for __ccgo := true; __ccgo; __ccgo = rc == -1 { rc = walTryBeginRead(tls, pWal, pChanged, 0, libc.PreIncInt32(&cnt, 1)) } if rc == SQLITE_OK { if pSnapshot != 0 && libc.Xmemcmp(tls, pSnapshot, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { // At this point the client has a lock on an aReadMark[] slot holding // a value equal to or smaller than pSnapshot->mxFrame, but pWal->hdr // is populated with the wal-index header corresponding to the head // of the wal file. Verify that pSnapshot is still valid before // continuing. Reasons why pSnapshot might no longer be valid: // // (1) The WAL file has been reset since the snapshot was taken. // In this case, the salt will have changed. // // (2) A checkpoint as been attempted that wrote frames past // pSnapshot->mxFrame into the database file. Note that the // checkpoint need not have completed for this to cause problems. var pInfo uintptr = walCkptInfo(tls, pWal) // Check that the wal file has not been wrapped. Assuming that it has // not, also check that no checkpointer has attempted to checkpoint any // frames beyond pSnapshot->mxFrame. If either of these conditions are // true, return SQLITE_ERROR_SNAPSHOT. Otherwise, overwrite pWal->hdr // with *pSnapshot and set *pChanged as appropriate for opening the // snapshot. if !(libc.Xmemcmp(tls, pSnapshot+32, pWal+72+32, uint64(unsafe.Sizeof([2]U32{}))) != 0) && (*WalIndexHdr)(unsafe.Pointer(pSnapshot)).FmxFrame >= (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted { libc.Xmemcpy(tls, pWal+72, pSnapshot, uint64(unsafe.Sizeof(WalIndexHdr{}))) *(*int32)(unsafe.Pointer(pChanged)) = bChanged } else { rc = SQLITE_ERROR | int32(3)<<8 } // A client using a non-current snapshot may not ignore any frames // from the start of the wal file. This is because, for a system // where (minFrame < iSnapshot < maxFrame), a checkpointer may // have omitted to checkpoint a frame earlier than minFrame in // the file because there exists a frame after iSnapshot that // is the same database page. (*Wal)(unsafe.Pointer(pWal)).FminFrame = U32(1) if rc != SQLITE_OK { Xsqlite3WalEndReadTransaction(tls, pWal) } } } // Release the shared CKPT lock obtained above. if (*Wal)(unsafe.Pointer(pWal)).FckptLock != 0 { walUnlockShared(tls, pWal, WAL_CKPT_LOCK) (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(0) } return rc } // Finish with a read transaction. All this does is release the // read-lock. func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64072:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(-1) } } // Search the wal file for page pgno. If found, set *piRead to the frame that // contains the page. Otherwise, if pgno is not in the wal file, set *piRead // to zero. // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64088:20: */ bp := tls.Alloc(24) defer tls.Free(24) var iRead U32 = U32(0) // If !=0, WAL frame to return data from var iLast U32 = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame // Last page in WAL for this reader var iHash int32 // Used to loop through N hash tables var iMinHash int32 // This routine is only be called from within a read transaction. // If the "last page" field of the wal-index header snapshot is 0, then // no data will be read from the wal under any circumstances. Return early // in this case as an optimization. Likewise, if pWal->readLock==0, // then the WAL is ignored by the reader so return early, as if the // WAL were empty. if iLast == U32(0) || int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) == 0 && int32((*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable) == 0 { *(*U32)(unsafe.Pointer(piRead)) = U32(0) return SQLITE_OK } // Search the hash table or tables for an entry matching page number // pgno. Each iteration of the following for() loop searches one // hash table (each hash table indexes up to HASHTABLE_NPAGE frames). // // This code might run concurrently to the code in walIndexAppend() // that adds entries to the wal-index (and possibly to this hash // table). This means the value just read from the hash // slot (aHash[iKey]) may have been added before or after the // current read transaction was opened. Values added after the // read transaction was opened may have been written incorrectly - // i.e. these slots may contain garbage data. However, we assume // that any slots written before the current read transaction was // opened remain unmodified. // // For the reasons above, the if(...) condition featured in the inner // loop of the following block is more stringent that would be required // if we had exclusive access to the hash-table: // // (aPgno[iFrame]==pgno): // This condition filters out normal hash-table collisions. // // (iFrame<=iLast): // This condition filters out entries that were added to the hash // table after the current read-transaction had started. iMinHash = walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).FminFrame) for iHash = walFramePage(tls, iLast); iHash >= iMinHash; iHash-- { // var sLoc WalHashLoc at bp, 24 // Hash table location var iKey int32 // Hash slot index var nCollide int32 // Number of hash collisions remaining var rc int32 // Error code var iH U32 rc = walHashGet(tls, pWal, iHash, bp) if rc != SQLITE_OK { return rc } nCollide = HASHTABLE_NPAGE * 2 iKey = walHash(tls, pgno) for libc.AssignUint32(&iH, U32(libc.AtomicLoadNUint16((*WalHashLoc)(unsafe.Pointer(bp)).FaHash+uintptr(iKey)*2, 0))) != U32(0) { var iFrame U32 = iH + (*WalHashLoc)(unsafe.Pointer(bp)).FiZero if iFrame <= iLast && iFrame >= (*Wal)(unsafe.Pointer(pWal)).FminFrame && *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp)).FaPgno + uintptr(iH-U32(1))*4)) == pgno { iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { return Xsqlite3CorruptError(tls, 64158) } iKey = walNextHash(tls, iKey) } if iRead != 0 { break } } *(*U32)(unsafe.Pointer(piRead)) = iRead return SQLITE_OK } // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64192:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) sz = sz&0xfe00 + sz&0x0001<<16 iOffset = int64(WAL_HDRSIZE) + I64(iRead-U32(1))*I64(sz+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) // testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL return Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pOut, func() int32 { if nOut > sz { return sz } return nOut }(), iOffset) } // Return the size of the database in pages (or zero, if unknown). func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64212:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } return Pgno(0) } // This function starts a write transaction on the WAL. // // A read transaction must have already been started by a prior call // to sqlite3WalBeginReadTransaction(). // // If another thread or process has written into the database since // the read transaction was started, then it is not possible for this // thread to write as doing so would cause a fork. So this routine // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64233:20: */ var rc int32 // Cannot start a write transaction without first holding a read // transaction. if (*Wal)(unsafe.Pointer(pWal)).FreadOnly != 0 { return SQLITE_READONLY } // Only one writer allowed at a time. Get the write lock. Return // SQLITE_BUSY if unable. rc = walLockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) if rc != 0 { return rc } (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) // If another connection has written to the database file since the // time the read transaction on this connection was started, then // the write is disallowed. if libc.Xmemcmp(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) rc = SQLITE_BUSY | int32(2)<<8 } return rc } // End a write transaction. The commit has already been done. This // routine merely releases the lock. func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64281:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) (*Wal)(unsafe.Pointer(pWal)).FiReCksum = U32(0) (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(0) } return SQLITE_OK } // If any data has been written (but not committed) to the log file, this // function moves the write-pointer back to the start of the transaction. // // Additionally, the callback function is invoked for each frame written // to the WAL since the start of the transaction. If the callback returns // other than SQLITE_OK, it is not invoked again and the error code is // returned to the caller. // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64303:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame var iFrame Pgno // Restore the clients cache of the wal-index header to the state it // was in before the client began writing to the database. libc.Xmemcpy(tls, pWal+72, walIndexHdr(tls, pWal), uint64(unsafe.Sizeof(WalIndexHdr{}))) for iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame + U32(1); rc == SQLITE_OK && iFrame <= iMax; iFrame++ { // This call cannot fail. Unless the page for which the page number // is passed as the second argument is (a) in the cache and // (b) has an outstanding reference, then xUndo is either a no-op // (if (a) is false) or simply expels the page from the cache (if (b) // is false). // // If the upper layer is doing a rollback, it is guaranteed that there // are no outstanding references to any page other than page 1. And // page 1 is never written to the log until the transaction is // committed. As a result, the call to xUndo may not fail. rc = (*struct { f func(*libc.TLS, uintptr, Pgno) int32 })(unsafe.Pointer(&struct{ uintptr }{xUndo})).f(tls, pUndoCtx, walFramePgno(tls, pWal, iFrame)) } if iMax != (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame { walCleanupHash(tls, pWal) } } return rc } // Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32 // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64343:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24)) *(*U32)(unsafe.Pointer(aWalData + 2*4)) = *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) *(*U32)(unsafe.Pointer(aWalData + 3*4)) = (*Wal)(unsafe.Pointer(pWal)).FnCkpt } // Move the write position of the WAL back to the point identified by // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64357:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { // This savepoint was opened immediately after the write-transaction // was started. Right after that, the writer decided to wrap around // to the start of the log. Update the savepoint values to match. *(*U32)(unsafe.Pointer(aWalData)) = U32(0) *(*U32)(unsafe.Pointer(aWalData + 3*4)) = (*Wal)(unsafe.Pointer(pWal)).FnCkpt } if *(*U32)(unsafe.Pointer(aWalData)) < (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame { (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = *(*U32)(unsafe.Pointer(aWalData)) *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(aWalData + 1*4)) *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(aWalData + 2*4)) walCleanupHash(tls, pWal) } return rc } // This function is called just before writing a set of frames to the log // file (see sqlite3WalFrames()). It checks to see if, instead of appending // to the current log file, it is possible to overwrite the start of the // existing log file with the new frames (i.e. "reset" the log). If so, // it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left // unchanged. // // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64394:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK var cnt int32 if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) == 0 { var pInfo uintptr = walCkptInfo(tls, pWal) if (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill > U32(0) { // var salt1 U32 at bp, 4 Xsqlite3_randomness(tls, 4, bp) rc = walLockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) if rc == SQLITE_OK { // If all readers are using WAL_READ_LOCK(0) (in other words if no // readers are currently using the WAL), then the transactions // frames will overwrite the start of the existing log. Update the // wal-index header to reflect this. // // In theory it would be Ok to update the cache of the header only // at this point. But updating the actual wal-index header is also // safe and means there is no special case for sqlite3WalUndo() // to handle if this transaction is rolled back. walRestartHdr(tls, pWal, *(*U32)(unsafe.Pointer(bp /* salt1 */))) walUnlockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) } else if rc != SQLITE_BUSY { return rc } } walUnlockShared(tls, pWal, 3+0) (*Wal)(unsafe.Pointer(pWal)).FreadLock = int16(-1) cnt = 0 for __ccgo := true; __ccgo; __ccgo = rc == -1 { // var notUsed int32 at bp+4, 4 rc = walTryBeginRead(tls, pWal, bp+4, 1, libc.PreIncInt32(&cnt, 1)) } // BUSY not possible when useWal==1 } return rc } // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). type WalWriter1 = struct { FpWal uintptr FpFd uintptr FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64441:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). type WalWriter = WalWriter1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64447:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. // // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64457:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) rc = Xsqlite3OsWrite(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, pContent, iFirstAmt, iOffset) if rc != 0 { return rc } iOffset = iOffset + Sqlite3_int64(iFirstAmt) iAmt = iAmt - iFirstAmt pContent = uintptr(iFirstAmt) + pContent rc = Xsqlite3OsSync(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, (*WalWriter)(unsafe.Pointer(p)).FsyncFlags&0x03) if iAmt == 0 || rc != 0 { return rc } } rc = Xsqlite3OsWrite(tls, (*WalWriter)(unsafe.Pointer(p)).FpFd, pContent, iAmt, iOffset) return rc } // Write out a single frame of the WAL func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64482:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // Result code from subfunctions var pData uintptr // Data actually written // var aFrame [24]U8 at bp, 24 // Buffer to assemble frame-header in pData = (*PgHdr)(unsafe.Pointer(pPage)).FpData walEncodeFrame(tls, (*WalWriter)(unsafe.Pointer(p)).FpWal, (*PgHdr)(unsafe.Pointer(pPage)).Fpgno, uint32(nTruncate), pData, bp) rc = walWriteToLog(tls, p, bp, int32(unsafe.Sizeof([24]U8{})), iOffset) if rc != 0 { return rc } // Write the page data rc = walWriteToLog(tls, p, pData, (*WalWriter)(unsafe.Pointer(p)).FszPage, int64(uint64(iOffset)+uint64(unsafe.Sizeof([24]U8{})))) return rc } // This function is called as part of committing a transaction within which // one or more frames have been overwritten. It updates the checksums for // all frames written to the wal file by the current transaction starting // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64508:12: */ bp := tls.Alloc(24) defer tls.Free(24) var szPage int32 = int32((*Wal)(unsafe.Pointer(pWal)).FszPage) // Database page size var rc int32 = SQLITE_OK // Return code var aBuf uintptr // Buffer to load data from wal file into // var aFrame [24]U8 at bp, 24 // Buffer to assemble frame-headers in var iRead U32 // Next frame to read from wal file var iCksumOff I64 aBuf = Xsqlite3_malloc(tls, szPage+WAL_FRAME_HDRSIZE) if aBuf == uintptr(0) { return SQLITE_NOMEM } // Find the checksum values to use as input for the recalculating the // first checksum. If the first frame is frame 1 (implying that the current // transaction restarted the wal file), these values must be read from the // wal-file header. Otherwise, read them from the frame header of the // previous frame. if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(1) { iCksumOff = int64(24) } else { iCksumOff = int64(WAL_HDRSIZE) + I64((*Wal)(unsafe.Pointer(pWal)).FiReCksum-U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(16) } rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aBuf, int32(uint64(unsafe.Sizeof(U32(0)))*uint64(2)), iCksumOff) *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = Xsqlite3Get4byte(tls, aBuf) *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = Xsqlite3Get4byte(tls, aBuf+4) iRead = (*Wal)(unsafe.Pointer(pWal)).FiReCksum (*Wal)(unsafe.Pointer(pWal)).FiReCksum = U32(0) for ; rc == SQLITE_OK && iRead <= iLast; iRead++ { var iOff I64 = int64(WAL_HDRSIZE) + I64(iRead-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, aBuf, szPage+WAL_FRAME_HDRSIZE, iOff) if rc == SQLITE_OK { var iPgno U32 var nDbSize U32 iPgno = Xsqlite3Get4byte(tls, aBuf) nDbSize = Xsqlite3Get4byte(tls, aBuf+4) walEncodeFrame(tls, pWal, iPgno, nDbSize, aBuf+24, bp) rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([24]U8{})), iOff) } } Xsqlite3_free(tls, aBuf) return rc } // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64557:20: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 // Used to catch return codes var iFrame U32 // Next frame address var p uintptr // Iterator to run through pList with. var pLast uintptr = uintptr(0) // Last frame in list var nExtra int32 = 0 // Number of extra copies of last page var szFrame int32 // The size of a single frame var iOffset I64 // Next byte to write in WAL file // var w WalWriter at bp+48, 32 // The writer var iFirst U32 = U32(0) // First frame that may be overwritten var pLive uintptr // Pointer to shared header // If this frame set completes a transaction, then nTruncate>0. If // nTruncate==0 then this frame set does not complete the transaction. pLive = walIndexHdr(tls, pWal) if libc.Xmemcmp(tls, pWal+72, pLive, uint64(unsafe.Sizeof(WalIndexHdr{}))) != 0 { iFirst = (*WalIndexHdr)(unsafe.Pointer(pLive)).FmxFrame + U32(1) } // See if it is possible to write these frames into the start of the // log file, instead of appending to it at pWal->hdr.mxFrame. if SQLITE_OK != libc.AssignInt32(&rc, walRestartLog(tls, pWal)) { return rc } // If this is the first frame written into the log, write the WAL // header to the start of the WAL file. See comments at the top of // this source file for a description of the WAL header format. iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame if iFrame == U32(0) { // var aWalHdr [32]U8 at bp, 32 // Buffer to assemble wal-header in // var aCksum [2]U32 at bp+32, 8 // Checksum for wal-header Xsqlite3Put4byte(tls, bp, uint32(WAL_MAGIC|SQLITE_BIGENDIAN)) Xsqlite3Put4byte(tls, bp+4, uint32(WAL_MAX_VERSION)) Xsqlite3Put4byte(tls, bp+8, uint32(szPage)) Xsqlite3Put4byte(tls, bp+12, (*Wal)(unsafe.Pointer(pWal)).FnCkpt) if (*Wal)(unsafe.Pointer(pWal)).FnCkpt == U32(0) { Xsqlite3_randomness(tls, 8, pWal+72+32) } libc.Xmemcpy(tls, bp+16, pWal+72+32, uint64(8)) walChecksumBytes(tls, 1, bp, WAL_HDRSIZE-2*4, uintptr(0), bp+32) Xsqlite3Put4byte(tls, bp+24, *(*U32)(unsafe.Pointer(bp + 32))) Xsqlite3Put4byte(tls, bp+28, *(*U32)(unsafe.Pointer(bp + 32 + 1*4))) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = U8(SQLITE_BIGENDIAN) *(*U32)(unsafe.Pointer(pWal + 72 + 24)) = *(*U32)(unsafe.Pointer(bp + 32)) *(*U32)(unsafe.Pointer(pWal + 72 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 32 + 1*4)) (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(1) rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([32]U8{})), int64(0)) if rc != SQLITE_OK { return rc } // Sync the header (unless SQLITE_IOCAP_SEQUENTIAL is true or unless // all syncing is turned off by PRAGMA synchronous=OFF). Otherwise // an out-of-order write following a WAL restart could result in // database corruption. See the ticket: // // https://sqlite.org/src/info/ff5be73dee if (*Wal)(unsafe.Pointer(pWal)).FsyncHeader != 0 { rc = Xsqlite3OsSync(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, sync_flags>>2&0x03) if rc != 0 { return rc } } } // Setup information needed to write frames into the WAL (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FpWal = pWal (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FpFd = (*Wal)(unsafe.Pointer(pWal)).FpWalFd (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FiSyncPoint = int64(0) (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FsyncFlags = sync_flags (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FszPage = szPage iOffset = int64(WAL_HDRSIZE) + I64(iFrame+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) szFrame = szPage + WAL_FRAME_HDRSIZE // Write all frames into the log file exactly once for p = pList; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { var nDbSize int32 // 0 normally. Positive == commit flag // Check if this page has already been written into the wal file by // the current transaction. If so, overwrite the existing frame and // set Wal.writeLock to WAL_WRITELOCK_RECKSUM - indicating that // checksums must be recomputed when the transaction is committed. if iFirst != 0 && ((*PgHdr)(unsafe.Pointer(p)).FpDirty != 0 || isCommit == 0) { *(*U32)(unsafe.Pointer(bp + 40 /* iWrite */)) = U32(0) Xsqlite3WalFindFrame(tls, pWal, (*PgHdr)(unsafe.Pointer(p)).Fpgno, bp+40) if *(*U32)(unsafe.Pointer(bp + 40)) >= iFirst { var iOff I64 = int64(WAL_HDRSIZE) + I64(*(*U32)(unsafe.Pointer(bp + 40))-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) var pData uintptr if (*Wal)(unsafe.Pointer(pWal)).FiReCksum == U32(0) || *(*U32)(unsafe.Pointer(bp + 40)) < (*Wal)(unsafe.Pointer(pWal)).FiReCksum { (*Wal)(unsafe.Pointer(pWal)).FiReCksum = *(*U32)(unsafe.Pointer(bp + 40 /* iWrite */)) } pData = (*PgHdr)(unsafe.Pointer(p)).FpData rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, pData, szPage, iOff) if rc != 0 { return rc } *(*U16)(unsafe.Pointer(p + 52)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_WAL_APPEND)) continue } } iFrame++ if isCommit != 0 && (*PgHdr)(unsafe.Pointer(p)).FpDirty == uintptr(0) { nDbSize = int32(nTruncate) } else { nDbSize = 0 } rc = walWriteOneFrame(tls, bp+48, p, nDbSize, iOffset) if rc != 0 { return rc } pLast = p iOffset = iOffset + I64(szFrame) *(*U16)(unsafe.Pointer(p + 52)) |= U16(PGHDR_WAL_APPEND) } // Recalculate checksums within the wal file if required. if isCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FiReCksum != 0 { rc = walRewriteChecksums(tls, pWal, iFrame) if rc != 0 { return rc } } // If this is the end of a transaction, then we might need to pad // the transaction and/or sync the WAL file. // // Padding and syncing only occur if this set of frames complete a // transaction and if PRAGMA synchronous=FULL. If synchronous==NORMAL // or synchronous==OFF, then no padding or syncing are needed. // // If SQLITE_IOCAP_POWERSAFE_OVERWRITE is defined, then padding is not // needed and only the sync is done. If padding is needed, then the // final frame is repeated (with its commit mark) until the next sector // boundary is crossed. Only the part of the WAL prior to the last // sector boundary is synced; the part of the last frame that extends // past the sector boundary is written after the sync. if isCommit != 0 && sync_flags&0x03 != 0 { var bSync int32 = 1 if (*Wal)(unsafe.Pointer(pWal)).FpadToSectorBoundary != 0 { var sectorSize int32 = Xsqlite3SectorSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd) (*WalWriter)(unsafe.Pointer(bp + 48 /* &w */)).FiSyncPoint = (iOffset + I64(sectorSize) - int64(1)) / I64(sectorSize) * I64(sectorSize) bSync = libc.Bool32((*WalWriter)(unsafe.Pointer(bp+48)).FiSyncPoint == iOffset) for iOffset < (*WalWriter)(unsafe.Pointer(bp+48)).FiSyncPoint { rc = walWriteOneFrame(tls, bp+48, pLast, int32(nTruncate), iOffset) if rc != 0 { return rc } iOffset = iOffset + I64(szFrame) nExtra++ } } if bSync != 0 { rc = Xsqlite3OsSync(tls, (*WalWriter)(unsafe.Pointer(bp+48 /* &w */)).FpFd, sync_flags&0x03) } } // If this frame set completes the first transaction in the WAL and // if PRAGMA journal_size_limit is set, then truncate the WAL to the // journal size limit, if possible. if isCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit != 0 && (*Wal)(unsafe.Pointer(pWal)).FmxWalSize >= int64(0) { var sz I64 = (*Wal)(unsafe.Pointer(pWal)).FmxWalSize if int64(WAL_HDRSIZE)+I64(iFrame+U32(nExtra)+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) > (*Wal)(unsafe.Pointer(pWal)).FmxWalSize { sz = int64(WAL_HDRSIZE) + I64(iFrame+U32(nExtra)+U32(1)-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) } walLimitSize(tls, pWal, sz) (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(0) } // Append data to the wal-index. It is not necessary to lock the // wal-index to do this as the SQLITE_SHM_WRITE lock held on the wal-index // guarantees that there are no other writers, and no data that may // be in use by existing readers is being overwritten. iFrame = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame for p = pList; p != 0 && rc == SQLITE_OK; p = (*PgHdr)(unsafe.Pointer(p)).FpDirty { if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_WAL_APPEND == 0 { continue } iFrame++ rc = walIndexAppend(tls, pWal, iFrame, (*PgHdr)(unsafe.Pointer(p)).Fpgno) } for rc == SQLITE_OK && nExtra > 0 { iFrame++ nExtra-- rc = walIndexAppend(tls, pWal, iFrame, (*PgHdr)(unsafe.Pointer(pLast)).Fpgno) } if rc == SQLITE_OK { // Update the private copy of the header. (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = U16(szPage&0xff00 | szPage>>16) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = iFrame if isCommit != 0 { (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiChange++ (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = nTruncate } // If this is a commit, update the wal-index header too. if isCommit != 0 { walIndexWriteHdr(tls, pWal) (*Wal)(unsafe.Pointer(pWal)).FiCallback = iFrame } } return rc } // This routine is called to implement sqlite3_wal_checkpoint() and // related interfaces. // // Obtain a CHECKPOINT lock and then backfill as much information as // we can from WAL into the database. // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64795:20: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // Return code *(*int32)(unsafe.Pointer(bp /* isChanged */)) = 0 // True if a new wal-index header is loaded var eMode2 int32 = eMode // Mode to pass to walCheckpoint() var xBusy2 uintptr = xBusy // Busy handler for eMode2 // EVIDENCE-OF: R-62920-47450 The busy-handler callback is never invoked // in the SQLITE_CHECKPOINT_PASSIVE mode. if (*Wal)(unsafe.Pointer(pWal)).FreadOnly != 0 { return SQLITE_READONLY } // Enable blocking locks, if possible. If blocking locks are successfully // enabled, set xBusy2=0 so that the busy-handler is never invoked. // IMPLEMENTATION-OF: R-62028-47212 All calls obtain an exclusive // "checkpoint" lock on the database file. // EVIDENCE-OF: R-10421-19736 If any other process is running a // checkpoint operation at the same time, the lock cannot be obtained and // SQLITE_BUSY is returned. // EVIDENCE-OF: R-53820-33897 Even if there is a busy-handler configured, // it will not be invoked in this case. rc = walLockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) if rc == SQLITE_OK { (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(1) // IMPLEMENTATION-OF: R-59782-36818 The SQLITE_CHECKPOINT_FULL, RESTART and // TRUNCATE modes also obtain the exclusive "writer" lock on the database // file. // // EVIDENCE-OF: R-60642-04082 If the writer lock cannot be obtained // immediately, and a busy-handler is configured, it is invoked and the // writer lock retried until either the busy-handler returns 0 or the // lock is successfully obtained. if eMode != SQLITE_CHECKPOINT_PASSIVE { rc = walBusyLock(tls, pWal, xBusy2, pBusyArg, WAL_WRITE_LOCK, 1) if rc == SQLITE_OK { (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(1) } else if rc == SQLITE_BUSY { eMode2 = SQLITE_CHECKPOINT_PASSIVE xBusy2 = uintptr(0) rc = SQLITE_OK } } } // Read the wal-index header. if rc == SQLITE_OK { rc = walIndexReadHdr(tls, pWal, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpDbFd)).FpMethods)).FiVersion >= 3 { Xsqlite3OsUnfetch(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, int64(0), uintptr(0)) } } // Copy data from the log to the database file. if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { rc = Xsqlite3CorruptError(tls, 64877) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } // If no error occurred, set the output variables. if rc == SQLITE_OK || rc == SQLITE_BUSY { if pnLog != 0 { *(*int32)(unsafe.Pointer(pnLog)) = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame) } if pnCkpt != 0 { *(*int32)(unsafe.Pointer(pnCkpt)) = int32((*WalCkptInfo)(unsafe.Pointer(walCkptInfo(tls, pWal))).FnBackfill) } } } if *(*int32)(unsafe.Pointer(bp)) != 0 { // If a new wal-index header was loaded before the checkpoint was // performed, then the pager-cache associated with pWal is now // out of date. So zero the cached wal-index header to ensure that // next time the pager opens a snapshot on this database it knows that // the cache needs to be reset. libc.Xmemset(tls, pWal+72, 0, uint64(unsafe.Sizeof(WalIndexHdr{}))) } // Release the locks. Xsqlite3WalEndWriteTransaction(tls, pWal) if (*Wal)(unsafe.Pointer(pWal)).FckptLock != 0 { walUnlockExclusive(tls, pWal, WAL_CKPT_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FckptLock = U8(0) } return func() int32 { if rc == SQLITE_OK && eMode != eMode2 { return SQLITE_BUSY } return rc }() } // Return the value to pass to a sqlite3_wal_hook callback, the // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64920:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback (*Wal)(unsafe.Pointer(pWal)).FiCallback = U32(0) } return int32(ret) } // This function is called to change the WAL subsystem into or out // of locking_mode=EXCLUSIVE. // // If op is zero, then attempt to change from locking_mode=EXCLUSIVE // into locking_mode=NORMAL. This means that we must acquire a lock // on the pWal->readLock byte. If the WAL is already in locking_mode=NORMAL // or if the acquisition of the lock fails, then return 0. If the // transition out of exclusive-mode is successful, return 1. This // operation must occur while the pager is still holding the exclusive // lock on the main database file. // // If op is one, then change from locking_mode=NORMAL into // locking_mode=EXCLUSIVE. This means that the pWal->readLock must // be released. Return 1 if the transition is made and 0 if the // WAL is already in exclusive-locking mode - meaning that this // routine is a no-op. The pager must already hold the exclusive lock // on the main database file before invoking this operation. // // If op is negative, then do a dry-run of the op==1 case but do // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64953:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a // prior error while attempting to acquire are read-lock. This cannot // happen if the connection is actually in exclusive mode (as no xShmLock // locks are taken in this case). Nor should the pager attempt to // upgrade to exclusive-mode following such an error. if op == 0 { if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_NORMAL_MODE { (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_NORMAL_MODE) if walLockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) != SQLITE_OK { (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) } rc = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE) } else { // Already in locking_mode=NORMAL rc = 0 } } else if op > 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode = U8(WAL_EXCLUSIVE_MODE) rc = 1 } else { rc = libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_NORMAL_MODE) } return rc } // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:64995:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65004:20: */ var rc int32 = SQLITE_OK var pRet uintptr if libc.Xmemcmp(tls, pWal+72+24, uintptr(unsafe.Pointer(&aZero)), uint64(16)) == 0 { *(*uintptr)(unsafe.Pointer(ppSnapshot)) = uintptr(0) return SQLITE_ERROR } pRet = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(WalIndexHdr{}))) if pRet == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemcpy(tls, pRet, pWal+72, uint64(unsafe.Sizeof(WalIndexHdr{}))) *(*uintptr)(unsafe.Pointer(ppSnapshot)) = pRet } return rc } var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65007:20 */ // Try to open on pSnapshot when the next read-transaction starts func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65028:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65039:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 // aSalt[0] is a copy of the value stored in the wal file header. It // is incremented each time the wal file is restarted. if *(*U32)(unsafe.Pointer(pHdr1 + 32)) < *(*U32)(unsafe.Pointer(pHdr2 + 32)) { return -1 } if *(*U32)(unsafe.Pointer(pHdr1 + 32)) > *(*U32)(unsafe.Pointer(pHdr2 + 32)) { return +1 } if (*WalIndexHdr)(unsafe.Pointer(pHdr1)).FmxFrame < (*WalIndexHdr)(unsafe.Pointer(pHdr2)).FmxFrame { return -1 } if (*WalIndexHdr)(unsafe.Pointer(pHdr1)).FmxFrame > (*WalIndexHdr)(unsafe.Pointer(pHdr2)).FmxFrame { return +1 } return 0 } // The caller currently has a read transaction open on the database. // This function takes a SHARED lock on the CHECKPOINTER slot and then // checks if the snapshot passed as the second argument is still // available. If so, SQLITE_OK is returned. // // If the snapshot is not available, SQLITE_ERROR is returned. Or, if // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65063:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { var pNew uintptr = pSnapshot if libc.Xmemcmp(tls, pNew+32, pWal+72+32, uint64(unsafe.Sizeof([2]U32{}))) != 0 || (*WalIndexHdr)(unsafe.Pointer(pNew)).FmxFrame < (*WalCkptInfo)(unsafe.Pointer(walCkptInfo(tls, pWal))).FnBackfillAttempted { rc = SQLITE_ERROR | int32(3)<<8 walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } } return rc } // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65082:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65104:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } //************* End of wal.c ************************************************ //************* Begin file btmutex.c **************************************** // 2007 August 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 contains code used to implement mutexes on Btree objects. // This code really belongs in btree.c. But btree.c is getting too // big and we want to break it down some. This packaged seemed like // a good breakout. //************* Include btreeInt.h in the middle of btmutex.c *************** //************* Begin file btreeInt.h *************************************** // 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 // #include "sqliteInt.h" // 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 FintKey U8 FintKeyLeaf U8 F__ccgo_pad1 [1]byte Fpgno Pgno Fleaf U8 FhdrOffset U8 FchildPtrSize U8 Fmax1bytePayload U8 FnOverflow U8 F__ccgo_pad2 [1]byte FmaxLocal U16 FminLocal U16 FcellOffset U16 FnFree int32 FnCell U16 FmaskPage U16 FaiOvfl [4]U16 F__ccgo_pad3 [4]byte FapOvfl [4]uintptr FpBt uintptr FaData uintptr FaDataEnd uintptr FaCellIdx uintptr FaDataOfst uintptr FpDbPage uintptr FxCellSize uintptr FxParseCell uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ //************* End of wal.c ************************************************ //************* Begin file btmutex.c **************************************** // 2007 August 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 contains code used to implement mutexes on Btree objects. // This code really belongs in btree.c. But btree.c is getting too // big and we want to break it down some. This packaged seemed like // a good breakout. //************* Include btreeInt.h in the middle of btmutex.c *************** //************* Begin file btreeInt.h *************************************** // 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 // #include "sqliteInt.h" // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65362:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno FeLock U8 F__ccgo_pad1 [3]byte FpNext uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type BtLock = BtLock1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65363:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr FnPayload U32 FnLocal U16 FnSize U16 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:578:9 */ type CellInfo = CellInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65364: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 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65823: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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65823:28 */ // Routines to read or write a two- and four-byte big-endian integer values. // get2byteAligned(), unlike get2byte(), requires that its argument point to a // two-byte aligned address. get2bytea() is only used for accessing the // cell addresses in a btree header. //************* End of btreeInt.h ******************************************* //************* Continuing where we left off in btmutex.c ******************* // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65873:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb (*Btree)(unsafe.Pointer(p)).Flocked = U8(1) } // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65887:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) (*Btree)(unsafe.Pointer(p)).Flocked = U8(0) } // Enter a mutex on the given BTree object. // // If the object is not sharable, then no mutex is ever required // and this routine is a no-op. The underlying mutex is non-recursive. // But we keep a reference count in Btree.wantToLock so the behavior // of this interface is recursive. // // To avoid deadlocks, multiple Btrees are locked in the same order // by all database connections. The p->pNext is a list of other // Btrees belonging to the same database connection as the p Btree // which need to be locked after p. If we cannot get a lock on // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65917:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to // the same connection. Only shared Btrees are on the list. // Check for locking consistency // We should already hold a lock on the database connection // Unless the database is sharable and unlocked, then BtShared.db // should already be set correctly. if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) { return } (*Btree)(unsafe.Pointer(p)).FwantToLock++ if (*Btree)(unsafe.Pointer(p)).Flocked != 0 { return } btreeLockCarefully(tls, p) } // This is a helper function for sqlite3BtreeLock(). By moving // complex, but seldom used logic, out of sqlite3BtreeLock() and // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65951:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we // want without having to go through the ascending lock // procedure that follows. Just be sure not to block. if Xsqlite3_mutex_try(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) == SQLITE_OK { (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb (*Btree)(unsafe.Pointer(p)).Flocked = U8(1) return } // To avoid deadlock, first release all locks with a larger // BtShared address. Then acquire our lock. Then reacquire // the other BtShared locks that we used to hold in ascending // order. for pLater = (*Btree)(unsafe.Pointer(p)).FpNext; pLater != 0; pLater = (*Btree)(unsafe.Pointer(pLater)).FpNext { if (*Btree)(unsafe.Pointer(pLater)).Flocked != 0 { unlockBtreeMutex(tls, pLater) } } lockBtreeMutex(tls, p) for pLater = (*Btree)(unsafe.Pointer(p)).FpNext; pLater != 0; pLater = (*Btree)(unsafe.Pointer(pLater)).FpNext { if (*Btree)(unsafe.Pointer(pLater)).FwantToLock != 0 { lockBtreeMutex(tls, pLater) } } } // Exit the recursive mutex on a Btree. func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:65989:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { (*Btree)(unsafe.Pointer(p)).FwantToLock-- if (*Btree)(unsafe.Pointer(p)).FwantToLock == 0 { unlockBtreeMutex(tls, p) } } } // Enter the mutex on every Btree associated with a database // connection. This is needed (for example) prior to parsing // a statement since we will be comparing table and column names // against all schemas and we do not want those schemas being // reset out from under us. // // There is a corresponding leave-all procedures. // // Enter the mutexes in accending order by BtShared pointer address // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. func btreeEnterAll(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66032:29: */ var i int32 var skipOk int32 = 1 var p uintptr for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { p = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if p != 0 && (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { Xsqlite3BtreeEnter(tls, p) skipOk = 0 } } (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66046:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66049:29: */ var i int32 var p uintptr for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { p = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if p != 0 { Xsqlite3BtreeLeave(tls, p) } } } func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66058:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } } // Enter a mutex on a Btree given a cursor owned by that Btree. // // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66144:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66148:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } //************* End of btmutex.c ******************************************** //************* Begin file btree.c ****************************************** // 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. // See the header comment on "btreeInt.h" for additional information. // Including a description of file format and an overview of operation. // #include "btreeInt.h" // The header string that appears at the beginning of every // SQLite database. var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 5336)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66179:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. // Extract a 2-byte big-endian integer from an array of unsigned bytes. // But if the value is zero, make it 65536. // // This routine is used to extract the "offset to cell content area" value // from the header of a btree page. If the page size is 65536 and the page // is empty, the offset should be 65536, but the 2-byte value stores zero. // This routine makes the necessary adjustment to 65536. // Values passed as the 5th argument to allocateBtreePage() // Macro IfNotOmitAV(x) returns (x) if SQLITE_OMIT_AUTOVACUUM is not // defined, or 0 if it is. For example: // // bIncrVacuum = IfNotOmitAV(pBtShared->incrVacuum); // A list of BtShared objects that are eligible for participation // in shared cache. This variable has file scope during normal builds, // but the test harness needs to access it so we make it global for // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. var sqlite3SharedCacheList uintptr = uintptr(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66234:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66246:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } // Implementation of the SQLITE_CORRUPT_PAGE() macro. Takes a single // (MemPage*) as an argument. The (MemPage*) must not be NULL. // // If SQLITE_DEBUG is not defined, then this macro is equivalent to // SQLITE_CORRUPT_BKPT. Or, if SQLITE_DEBUG is set, then the log message // normally produced as a side-effect of SQLITE_CORRUPT_BKPT is augmented // with the page number and filename associated with the (MemPage*). // Query to see if Btree handle p may obtain a lock of type eLock // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66445:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr // If requesting a write-lock, then the Btree must have an open write // transaction on this file. And, obviously, for this to be so there // must be an open write transaction on the file itself. // This routine is a no-op if the shared-cache is not enabled if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) { return SQLITE_OK } // If some other connection is holding an exclusive lock, the // requested lock may not be obtained. if (*BtShared)(unsafe.Pointer(pBt)).FpWriter != p && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_EXCLUSIVE != 0 { Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, (*Btree)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpWriter)).Fdb) return SQLITE_LOCKED | int32(1)<<8 } for pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pIter != 0; pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext { // The condition (pIter->eLock!=eLock) in the following if(...) // statement is a simplification of: // // (eLock==WRITE_LOCK || pIter->eLock==WRITE_LOCK) // // since we know that if eLock==WRITE_LOCK, then no other connection // may hold a WRITE_LOCK on any table in this file (since there can // only be a single writer). if (*BtLock)(unsafe.Pointer(pIter)).FpBtree != p && (*BtLock)(unsafe.Pointer(pIter)).FiTable == iTab && int32((*BtLock)(unsafe.Pointer(pIter)).FeLock) != int32(eLock) { Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, (*Btree)(unsafe.Pointer((*BtLock)(unsafe.Pointer(pIter)).FpBtree)).Fdb) if int32(eLock) == WRITE_LOCK { *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PENDING) } return SQLITE_LOCKED | int32(1)<<8 } } return SQLITE_OK } // Add a lock on the table with root-page iTable to the shared-btree used // by Btree handle p. Parameter eLock must be either READ_LOCK or // WRITE_LOCK. // // This function assumes the following: // // (a) The specified Btree object p is connected to a sharable // database (one with the BtShared.sharable flag set), and // // (b) No other Btree objects hold a lock that conflicts // with the requested lock (i.e. querySharedCacheTableLock() has // already been called and returned SQLITE_OK). // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66517:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr // A connection with the read-uncommitted flag set will never try to // obtain a read-lock using this function. The only read-lock obtained // by a connection in read-uncommitted mode is on the sqlite_schema // table, and that lock is obtained in BtreeBeginTrans(). // This function should only be called on a sharable b-tree after it // has been determined that no other b-tree holds a conflicting lock. // First search the list for an existing lock on this table. for pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pIter != 0; pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext { if (*BtLock)(unsafe.Pointer(pIter)).FiTable == iTable && (*BtLock)(unsafe.Pointer(pIter)).FpBtree == p { pLock = pIter break } } // If the above search did not find a BtLock struct associating Btree p // with table iTable, allocate one and link it into the list. if !(pLock != 0) { pLock = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(BtLock{}))) if !(pLock != 0) { return SQLITE_NOMEM } (*BtLock)(unsafe.Pointer(pLock)).FiTable = iTable (*BtLock)(unsafe.Pointer(pLock)).FpBtree = p (*BtLock)(unsafe.Pointer(pLock)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpLock (*BtShared)(unsafe.Pointer(pBt)).FpLock = pLock } // Set the BtLock.eLock variable to the maximum of the current lock // and the requested lock. This means if a write-lock was already held // and a read-lock requested, we don't incorrectly downgrade the lock. if int32(eLock) > int32((*BtLock)(unsafe.Pointer(pLock)).FeLock) { (*BtLock)(unsafe.Pointer(pLock)).FeLock = eLock } return SQLITE_OK } // Release all the table locks (locks obtained via calls to // the setSharedCacheTableLock() procedure) held by Btree object p. // // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66581:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 120 for *(*uintptr)(unsafe.Pointer(ppIter)) != 0 { var pLock uintptr = *(*uintptr)(unsafe.Pointer(ppIter)) if (*BtLock)(unsafe.Pointer(pLock)).FpBtree == p { *(*uintptr)(unsafe.Pointer(ppIter)) = (*BtLock)(unsafe.Pointer(pLock)).FpNext if (*BtLock)(unsafe.Pointer(pLock)).FiTable != Pgno(1) { Xsqlite3_free(tls, pLock) } } else { ppIter = pLock + 16 } } if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { (*BtShared)(unsafe.Pointer(pBt)).FpWriter = uintptr(0) *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE | BTS_PENDING)) } else if (*BtShared)(unsafe.Pointer(pBt)).FnTransaction == 2 { // This function is called when Btree p is concluding its // transaction. If there currently exists a writer, and p is not // that writer, then the number of locks held by connections other // than the writer must be about to drop to zero. In this case // set the BTS_PENDING flag to 0. // // If there is not currently a writer, then BTS_PENDING must // be zero already. So this next line is harmless in that case. *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_PENDING)) } } // This function changes all write-locks held by Btree p into read-locks. func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66625:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr (*BtShared)(unsafe.Pointer(pBt)).FpWriter = uintptr(0) *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE | BTS_PENDING)) for pLock = (*BtShared)(unsafe.Pointer(pBt)).FpLock; pLock != 0; pLock = (*BtLock)(unsafe.Pointer(pLock)).FpNext { (*BtLock)(unsafe.Pointer(pLock)).FeLock = U8(READ_LOCK) } } } // Forward reference // This routine is used inside of assert() only **** // // Verify that the cursor holds the mutex on its BtShared // Invalidate the overflow cache of the cursor passed as the first argument. // on the shared btree structure pBt. // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66678:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { *(*U8)(unsafe.Pointer(p + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) } } // This function is called before modifying the contents of a table // to invalidate any incrblob cursors that are open on the // row or one of the rows being modified. // // If argument isClearTable is true, then the entire contents of the // table is about to be deleted. In this case invalidate all incrblob // cursors open on any row within the table with root-page pgnoRoot. // // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66700:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) for p = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBtree)).FpBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { if int32((*BtCursor)(unsafe.Pointer(p)).FcurFlags)&BTCF_Incrblob != 0 { (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(1) if (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == pgnoRoot && (isClearTable != 0 || (*BtCursor)(unsafe.Pointer(p)).Finfo.FnKey == iRow) { (*BtCursor)(unsafe.Pointer(p)).FeState = U8(CURSOR_INVALID) } } } } // Set bit pgno of the BtShared.pHasContent bitvec. This is called // when a page that previously contained data becomes a free-list leaf // page. // // The BtShared.pHasContent bitvec exists to work around an obscure // bug caused by the interaction of two useful IO optimizations surrounding // free-list leaf pages: // // 1) When all data is deleted from a page and the page becomes // a free-list leaf page, the page is not written to the database // (as free-list leaf pages contain no meaningful data). Sometimes // such a page is not even journalled (as it will not be modified, // why bother journalling it?). // // 2) When a free-list leaf page is reused, its content is not read // from the database or written to the journal file (why should it // be, if it is not at all meaningful?). // // By themselves, these optimizations work fine and provide a handy // performance boost to bulk delete or insert operations. However, if // a page is moved to the free-list and then reused within the same // transaction, a problem comes up. If the page is not journalled when // it is moved to the free-list and it is also not journalled when it // is extracted from the free-list and reused, then the original data // may be lost. In the event of a rollback, it may not be possible // to restore the database to its original configuration. // // The solution is the BtShared.pHasContent bitvec. Whenever a page is // moved to become a free-list leaf page, the corresponding bit is // set in the bitvec. Whenever a leaf page is extracted from the free-list, // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66760:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = Xsqlite3BitvecCreate(tls, (*BtShared)(unsafe.Pointer(pBt)).FnPage) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { rc = SQLITE_NOMEM } } if rc == SQLITE_OK && pgno <= Xsqlite3BitvecSize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) { rc = Xsqlite3BitvecSet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent, pgno) } return rc } // Query the BtShared.pHasContent vector. // // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66782:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66791:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66799:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { releasePageNotNull(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(i)*8))) } releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(-1) } } // The cursor passed as the only argument must point to a valid entry // when this function is called (i.e. have eState==CURSOR_VALID). This // function saves the current cursor key in variables pCur->nKey and // pCur->pKey. SQLITE_OK is returned if successful or an SQLite error // code otherwise. // // If the cursor is open on an intkey table, then the integer key // (the rowid) is stored in pCur->nKey and pCur->pKey is left set to // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66823:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { // Only the rowid is required for a table btree (*BtCursor)(unsafe.Pointer(pCur)).FnKey = Xsqlite3BtreeIntegerKey(tls, pCur) } else { // For an index btree, save the complete key content. It is possible // that the current key is corrupt. In that case, it is possible that // the sqlite3VdbeRecordUnpack() function may overread the buffer by // up to the size of 1 varint plus 1 8-byte value when the cursor // position is restored. Hence the 17 bytes of padding allocated // below. var pKey uintptr (*BtCursor)(unsafe.Pointer(pCur)).FnKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) pKey = Xsqlite3Malloc(tls, uint64((*BtCursor)(unsafe.Pointer(pCur)).FnKey+int64(9)+int64(8))) if pKey != 0 { rc = Xsqlite3BtreePayload(tls, pCur, uint32(0), uint32(int32((*BtCursor)(unsafe.Pointer(pCur)).FnKey)), pKey) if rc == SQLITE_OK { libc.Xmemset(tls, pKey+uintptr((*BtCursor)(unsafe.Pointer(pCur)).FnKey), 0, uint64(9+8)) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = pKey } else { Xsqlite3_free(tls, pKey) } } else { rc = SQLITE_NOMEM } } return rc } // Save the current cursor position in the variables BtCursor.nKey // and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK. // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66865:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { return SQLITE_CONSTRAINT | int32(11)<<8 } if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_SKIPNEXT { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) } else { (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = 0 } rc = saveCursorKey(tls, pCur) if rc == SQLITE_OK { btreeReleaseAllCursorPages(tls, pCur) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) } *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl | BTCF_AtLast)) return rc } // Save the positions of all cursors (except pExcept) that are open on // the table with root-page iRoot. "Saving the cursor position" means that // the location in the btree is remembered in such a way that it can be // moved back to the same spot after the btree has been modified. This // routine is called just before cursor pExcept is used to modify the // table, for example in BtreeDelete() or BtreeInsert(). // // If there are two or more cursors on the same btree, then all such // cursors should have their BTCF_Multiple flag set. The btreeCursor() // routine enforces that rule. This routine only needs to be called in // the uncommon case when pExpect has the BTCF_Multiple flag set. // // If pExpect!=NULL and if no other cursors are found on the same root-page, // then the BTCF_Multiple flag on pExpect is cleared, to avoid another // pointless call to this routine. // // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66915:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { break } } if p != 0 { return saveCursorsOnList(tls, p, iRoot, pExcept) } if pExcept != 0 { *(*U8)(unsafe.Pointer(pExcept + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Multiple)) } return SQLITE_OK } // This helper routine to saveAllCursors does the actual work of saving // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66932:28: */ for __ccgo := true; __ccgo; __ccgo = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { var rc int32 = saveCursorPosition(tls, p) if SQLITE_OK != rc { return rc } } else { btreeReleaseAllCursorPages(tls, p) } } p = (*BtCursor)(unsafe.Pointer(p)).FpNext } return SQLITE_OK } // Clear the current cursor position. func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66957:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) } // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:66969:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key if pKey != 0 { var pKeyInfo uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo pIdxKey = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) if pIdxKey == uintptr(0) { return SQLITE_NOMEM } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { rc = Xsqlite3CorruptError(tls, 66986) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } Xsqlite3DbFree(tls, (*KeyInfo1)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo)).Fdb, pIdxKey) } else { pIdxKey = uintptr(0) rc = Xsqlite3BtreeTableMoveto(tls, pCur, nKey, bias, pRes) } return rc } // Restore the cursor to the position it was in (or as close to as possible) // when saveCursorPosition() was called. Note that this call deletes the // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67005:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 *(*int32)(unsafe.Pointer(bp /* skipNext */)) = 0 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_FAULT { return (*BtCursor)(unsafe.Pointer(pCur)).FskipNext } (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) if Xsqlite3FaultSim(tls, 410) != 0 { rc = SQLITE_IOERR } else { rc = btreeMoveto(tls, pCur, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtCursor)(unsafe.Pointer(pCur)).FnKey, 0, bp) } if rc == SQLITE_OK { Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) if *(*int32)(unsafe.Pointer(bp)) != 0 { (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = *(*int32)(unsafe.Pointer(bp /* skipNext */)) } if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext != 0 && int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_SKIPNEXT) } } return rc } // Determine whether or not a cursor has moved from the position where // it was last placed, or has been invalidated for any other reason. // Cursors can move when the row they are pointing at is deleted out // from under them, for example. Cursor might also move if a btree // is rebalanced. // // Calling this routine with a NULL cursor pointer returns false. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67048:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67061:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } var fakeCursor U8 = U8(CURSOR_VALID) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67062:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or // a row having been deleted out from under the cursor). // // On success, the *pDifferentRow parameter is false if the cursor is left // pointing at exactly the same row. *pDifferntRow is the row the cursor // was pointing to has been deleted, forcing the cursor to point to some // nearby row. // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67080:20: */ var rc int32 rc = func() int32 { if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { return btreeRestoreCursorPosition(tls, pCur) } return SQLITE_OK }() if rc != 0 { *(*int32)(unsafe.Pointer(pDifferentRow)) = 1 return rc } if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { *(*int32)(unsafe.Pointer(pDifferentRow)) = 1 } else { *(*int32)(unsafe.Pointer(pDifferentRow)) = 0 } return SQLITE_OK } // Provide flag hints to the cursor. func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67112:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } // Given a page number of a regular database page, return the page // number for the pointer-map page that contains the entry for the // input page number. // // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67128:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno if pgno < Pgno(2) { return Pgno(0) } nPagesPerMapPage = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(5) + U32(1)) iPtrMap = (pgno - Pgno(2)) / Pgno(nPagesPerMapPage) ret = iPtrMap*Pgno(nPagesPerMapPage) + Pgno(2) if ret == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { ret++ } return ret } // Write an entry into the pointer map. // // This routine updates the pointer map entry for page number 'key' // so that it maps to type 'eType' and parent page number 'pgno'. // // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67152:13: */ bp := tls.Alloc(8) defer tls.Free(8) // var pDbPage uintptr at bp, 8 // The pointer map page var pPtrmap uintptr // The pointer map data var iPtrmap Pgno // The pointer map page number var offset int32 // Offset in pointer map page var rc int32 // Return code from subfunctions if !(*(*int32)(unsafe.Pointer(pRC)) != 0) { goto __1 } return __1: ; // The super-journal page number must never be used as a pointer map page if !(key == Pgno(0)) { goto __2 } *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67167) return __2: ; iPtrmap = ptrmapPageno(tls, pBt, key) rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iPtrmap, bp, 0) if !(rc != SQLITE_OK) { goto __3 } *(*int32)(unsafe.Pointer(pRC)) = rc return __3: ; if !(int32(*(*int8)(unsafe.Pointer(Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp)))))) != 0) { goto __4 } // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67180) goto ptrmap_exit __4: ; offset = int32(Pgno(5) * (key - iPtrmap - Pgno(1))) if !(offset < 0) { goto __5 } *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67185) goto ptrmap_exit __5: ; pPtrmap = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if !(int32(eType) != int32(*(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset)))) || Xsqlite3Get4byte(tls, pPtrmap+uintptr(offset+1)) != parent) { goto __6 } *(*int32)(unsafe.Pointer(pRC)) = libc.AssignInt32(&rc, Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)))) if !(rc == SQLITE_OK) { goto __7 } *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) = eType Xsqlite3Put4byte(tls, pPtrmap+uintptr(offset+1), parent) __7: ; __6: ; ptrmap_exit: Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) } // Read an entry from the pointer map. // // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67211:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var pDbPage uintptr at bp, 8 // The pointer map page var iPtrmap int32 // Pointer map page index var pPtrmap uintptr // Pointer map page data var offset int32 // Offset of entry in pointer map var rc int32 iPtrmap = int32(ptrmapPageno(tls, pBt, key)) rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uint32(iPtrmap), bp, 0) if rc != 0 { return rc } pPtrmap = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) return Xsqlite3CorruptError(tls, 67230) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) if pPgno != 0 { *(*Pgno)(unsafe.Pointer(pPgno)) = Xsqlite3Get4byte(tls, pPtrmap+uintptr(offset+1)) } Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { return Xsqlite3CorruptError(tls, 67238) } return SQLITE_OK } // Given a btree page and a cell index (0 means the first cell on // the page, 1 means the second cell, and so forth) return a pointer // to the cell content. // // findCellPastPtr() does the same except it skips past the initial // 4-byte child pointer found on interior pages, if there is one. // // This routine works only for pages that do not contain overflow cells. // This is common tail processing for btreeParseCellPtr() and // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67270:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused // space on overflow pages while keeping the amount of local storage // in between minLocal and maxLocal. // // Warning: changing the way overflow payload is distributed in any // way will result in an incompatible file format. var minLocal int32 // Minimum amount of payload held locally var maxLocal int32 // Maximum amount of payload held locally var surplus int32 // Overflow payload available for local storage minLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) surplus = int32(U32(minLocal) + ((*CellInfo)(unsafe.Pointer(pInfo)).FnPayload-U32(minLocal))%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) if surplus <= maxLocal { (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(surplus) } else { (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(minLocal) } (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(int32(U16((int64((*CellInfo)(unsafe.Pointer(pInfo)).FpPayload+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnLocal))-int64(pCell))/1)) + 4) } // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67305:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { return int32(nPayload) } else { var minLocal int32 // Minimum amount of payload held locally var surplus int32 // Overflow payload available for local storage minLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) surplus = int32(I64(minLocal) + (nPayload-I64(minLocal))%I64((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) if surplus <= maxLocal { return surplus } return minLocal } return int32(0) } // The following routines are implementations of the MemPage.xParseCell() // method. // // Parse a cell content block and fill in the CellInfo structure. // // btreeParseCellPtr() => table btree leaf nodes // btreeParseCellNoPayload() => table btree internal nodes // btreeParseCellPtrIndex() => index btree nodes // // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67333:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = U32(0) (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(0) (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = uintptr(0) return } func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67350:13: */ bp := tls.Alloc(8) defer tls.Free(8) var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload // var iKey U64 at bp, 8 // Extracted Key value pIter = pCell // The next block of code is equivalent to: // // pIter += getVarint32(pIter, nPayload); // // The code is inlined to avoid a function call. nPayload = U32(*(*U8)(unsafe.Pointer(pIter))) if nPayload >= U32(0x80) { var pEnd uintptr = pIter + 8 nPayload = nPayload & U32(0x7f) for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { nPayload = nPayload<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) } } pIter++ // The next block of code is equivalent to: // // pIter += getVarint(pIter, (u64*)&pInfo->nKey); // // The code is inlined and the loop is unrolled for performance. // This routine is a high-runner. *(*U64)(unsafe.Pointer(bp /* iKey */)) = U64(*(*U8)(unsafe.Pointer(pIter))) if *(*U64)(unsafe.Pointer(bp)) >= uint64(0x80) { var x U8 *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))&uint64(0x7f)<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<7 | U64(int32(libc.AssignUint8(&x, *(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))))&0x7f) if int32(x) >= 0x80 { *(*U64)(unsafe.Pointer(bp /* iKey */)) = *(*U64)(unsafe.Pointer(bp))<<8 | U64(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1)))) } } } } } } } } pIter++ (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = *(*I64)(unsafe.Pointer(bp)) (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = nPayload (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = pIter if nPayload <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { // This is the (easy) common case where the entire payload fits // on the local page. No overflow is required. (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(nPayload + U32(U16((int64(pIter)-int64(pCell))/1))) if int32((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) < 4 { (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4) } (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(nPayload) } else { btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67432:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload pIter = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) nPayload = U32(*(*U8)(unsafe.Pointer(pIter))) if nPayload >= U32(0x80) { var pEnd uintptr = pIter + 8 nPayload = nPayload & U32(0x7f) for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { nPayload = nPayload<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) } } pIter++ (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = I64(nPayload) (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = nPayload (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = pIter if nPayload <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { // This is the (easy) common case where the entire payload fits // on the local page. No overflow is required. (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(nPayload + U32(U16((int64(pIter)-int64(pCell))/1))) if int32((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) < 4 { (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4) } (*CellInfo)(unsafe.Pointer(pInfo)).FnLocal = U16(nPayload) } else { btreeParseCellAdjustSizeForOverflow(tls, pPage, pCell, pInfo) } } func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67469:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell)))))), pInfo) } // The following routines are implementations of the MemPage.xCellSize // method. // // Compute the total number of bytes that a Cell needs in the cell // data area of the btree-page. The return number includes the cell // data header and the local payload, but not any overflow page or // the space used by the cell pointer. // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67489:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return nSize = U32(*(*U8)(unsafe.Pointer(pIter))) if nSize >= U32(0x80) { pEnd = pIter + 8 nSize = nSize & U32(0x7f) for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(pIter))) >= 0x80 && pIter < pEnd { nSize = nSize<<7 | U32(int32(*(*U8)(unsafe.Pointer(libc.PreIncUintptr(&pIter, 1))))&0x7f) } } pIter++ if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { // pIter now points at the 64-bit integer key value, a variable length // integer. The following block moves pIter to point at the first byte // past the end of the key value. pEnd = pIter + 9 for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pIter, 1))))&0x80 != 0 && pIter < pEnd { } } if nSize <= U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { nSize = nSize + U32((int64(pIter)-int64(pCell))/1) if nSize < U32(4) { nSize = U32(4) } } else { var minLocal int32 = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) nSize = U32(minLocal) + (nSize-U32(minLocal))%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4)) if nSize > U32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { nSize = U32(minLocal) } nSize = nSize + U32(4+int32(U16((int64(pIter)-int64(pCell))/1))) } return U16(nSize) } func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67537:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint _ = pPage pEnd = pIter + uintptr(9) for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pIter, 1))))&0x80 != 0 && pIter < pEnd { } return U16((int64(pIter) - int64(pCell)) / 1) } // The cell pCell is currently part of page pSrc but will ultimately be part // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67575:13: */ bp := tls.Alloc(24) defer tls.Free(24) // var info CellInfo at bp, 24 if *(*int32)(unsafe.Pointer(pRC)) != 0 { return } (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 67584) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) ptrmapPut(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, pRC) } } // Defragment the page given. This routine reorganizes cells within the // page so that there are no free-blocks on the free-block list. // // Parameter nMaxFrag is the maximum amount of fragmented space that may be // present in the page after this routine returns. // // EVIDENCE-OF: R-44582-60138 SQLite may from time to time reorganize a // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67606:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header var size int32 // Size of a cell var usableSize int32 // Number of usable bytes on a page var cellOffset int32 // Offset to the cell pointer array var cbrk int32 // Offset to the cell content area var nCell int32 // Number of cells on the page var data uintptr // The page data var temp uintptr // Temp area for cell content var src uintptr // Source of content var iCellFirst int32 // First allowable cell index var iCellLast int32 // Last possible cell index var iCellStart int32 var pEnd uintptr var pAddr uintptr var sz2 int32 var sz int32 var top int32 var iFree2 int32 var iFree int32 var pAddr1 uintptr // First cell offset in input temp = uintptr(0) src = libc.AssignUintptr(&data, (*MemPage)(unsafe.Pointer(pPage)).FaData) hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) cellOffset = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) iCellFirst = cellOffset + 2*nCell usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) // This block handles pages with two or fewer free blocks and nMaxFrag // or fewer fragmented bytes. In this case it is faster to move the // two (or one) blocks of cells using memmove() and add the required // offsets to each pointer in the cell-pointer array than it is to // reconstruct the entire page. if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7)))) <= nMaxFrag) { goto __1 } iFree = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+1))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+1) + 1))) if !(iFree > usableSize-4) { goto __2 } return Xsqlite3CorruptError(tls, 67643) __2: ; if !(iFree != 0) { goto __3 } iFree2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree) + 1))) if !(iFree2 > usableSize-4) { goto __4 } return Xsqlite3CorruptError(tls, 67646) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { goto __5 } pEnd = data + uintptr(cellOffset+nCell*2) sz2 = 0 sz = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree+2) + 1))) top = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) if !(top >= iFree) { goto __6 } return Xsqlite3CorruptError(tls, 67654) __6: ; if !(iFree2 != 0) { goto __7 } if !(iFree+sz > iFree2) { goto __9 } return Xsqlite3CorruptError(tls, 67657) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } return Xsqlite3CorruptError(tls, 67659) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint64(iFree2-(iFree+sz))) sz = sz + sz2 goto __8 __7: if !(iFree+sz > usableSize) { goto __11 } return Xsqlite3CorruptError(tls, 67663) __11: ; __8: ; cbrk = top + sz libc.Xmemmove(tls, data+uintptr(cbrk), data+uintptr(top), uint64(iFree-top)) pAddr = data + uintptr(cellOffset) __12: if !(pAddr < pEnd) { goto __14 } pc = int32(*(*U8)(unsafe.Pointer(pAddr)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr + 1))) if !(pc < iFree) { goto __15 } *(*U8)(unsafe.Pointer(pAddr)) = U8((pc + sz) >> 8) *(*U8)(unsafe.Pointer(pAddr + 1)) = U8(pc + sz) goto __16 __15: if !(pc < iFree2) { goto __17 } *(*U8)(unsafe.Pointer(pAddr)) = U8((pc + sz2) >> 8) *(*U8)(unsafe.Pointer(pAddr + 1)) = U8(pc + sz2) __17: ; __16: ; goto __13 __13: pAddr += uintptr(2) goto __12 goto __14 __14: ; goto defragment_out __5: ; __3: ; __1: ; cbrk = usableSize iCellLast = usableSize - 4 iCellStart = int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) i = 0 __18: if !(i < nCell) { goto __20 } // The i-th cell pointer pAddr1 = data + uintptr(cellOffset+i*2) pc = int32(*(*U8)(unsafe.Pointer(pAddr1)))<<8 | int32(*(*U8)(unsafe.Pointer(pAddr1 + 1))) // These conditions have already been verified in btreeInitPage() // if PRAGMA cell_size_check=ON. if !(pc < iCellStart || pc > iCellLast) { goto __21 } return Xsqlite3CorruptError(tls, 67692) __21: ; size = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, src+uintptr(pc))) cbrk = cbrk - size if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } return Xsqlite3CorruptError(tls, 67698) __22: ; *(*U8)(unsafe.Pointer(pAddr1)) = U8(cbrk >> 8) *(*U8)(unsafe.Pointer(pAddr1 + 1)) = U8(cbrk) if !(temp == uintptr(0)) { goto __23 } if !(cbrk == pc) { goto __24 } goto __19 __24: ; temp = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FpPager) libc.Xmemcpy(tls, temp+uintptr(iCellStart), data+uintptr(iCellStart), uint64(usableSize-iCellStart)) src = temp __23: ; libc.Xmemcpy(tls, data+uintptr(cbrk), src+uintptr(pc), uint64(size)) goto __19 __19: i++ goto __18 goto __20 __20: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))) = uint8(0) defragment_out: ; if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } return Xsqlite3CorruptError(tls, 67717) __25: ; *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(cbrk >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(cbrk) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+1))) = uint8(0) *(*uint8)(unsafe.Pointer(data + uintptr(hdr+2))) = uint8(0) libc.Xmemset(tls, data+uintptr(iCellFirst), 0, uint64(cbrk-iCellFirst)) return SQLITE_OK } // Search the free-list on page pPg for space to store a cell nByte bytes in // size. If one can be found, return a pointer to the space and remove it // from the free-list. // // If no suitable space can be found on the free-list, return NULL. // // This function may detect corruption within pPg. If corruption is // detected then *pRc is set to SQLITE_CORRUPT and NULL is returned. // // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67742:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc var pc int32 = int32(*(*U8)(unsafe.Pointer(aData + uintptr(iAddr))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(iAddr) + 1))) // Address of a free slot var x int32 // Excess size of the slot var maxPC int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize - U32(nByte)) // Max address for a usable slot var size int32 // Size of the free slot for pc <= maxPC { // EVIDENCE-OF: R-22710-53328 The third and fourth bytes of each // freeblock form a big-endian integer which is the size of the freeblock // in bytes, including the 4-byte header. size = int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc+2) + 1))) if libc.AssignInt32(&x, size-nByte) >= 0 { if x < 4 { // EVIDENCE-OF: R-11498-58022 In a well-formed b-tree page, the total // number of bytes in fragments may not exceed 60. if int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+7)))) > 57 { return uintptr(0) } // Remove the slot from the free-list. Update the number of // fragmented bytes within the page. libc.Xmemcpy(tls, aData+uintptr(iAddr), aData+uintptr(pc), uint64(2)) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) return aData + uintptr(pc) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67773) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account // for the portion used by the new allocation. *(*U8)(unsafe.Pointer(aData + uintptr(pc+2))) = U8(x >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(pc+2) + 1)) = U8(x) } return aData + uintptr(pc+x) } iAddr = pc pc = int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(pc) + 1))) if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67787) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67794) } return uintptr(0) } // Allocate nByte bytes of space from within the B-Tree page passed // as the first argument. Write into *pIdx the index into pPage->aData[] // of the first byte of allocated space. Return either SQLITE_OK or // an error code (usually SQLITE_CORRUPT). // // The caller guarantees that there is sufficient space to make the // allocation. This routine might need to defragment in order to bring // all the space together, however. This routine will avoid using // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67812:12: */ bp := tls.Alloc(4) defer tls.Free(4) var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) // Local cache of pPage->hdrOffset var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData // Local cache of pPage->aData var top int32 // First byte of cell content area *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK // Integer return code var gap int32 // First byte of gap between cell pointers and cell content // Minimum cell size is 4 gap = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) // EVIDENCE-OF: R-29356-02391 If the database uses a 65536-byte page size // and the reserved space is zero (the usual value for reserved space) // then the cell content offset of an empty page wants to be 65536. // However, that integer is too large to be stored in a 2-byte unsigned // integer, so a value of 0 is used in its place. top = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1))) // by btreeComputeFreeSpace() if gap > top { if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { return Xsqlite3CorruptError(tls, 67841) } } // If there is enough space between gap and top for one more cell pointer, // and if the freelist is not empty, then search the // freelist looking for a slot big enough to satisfy the request. if (*(*U8)(unsafe.Pointer(data + uintptr(hdr+2))) != 0 || *(*U8)(unsafe.Pointer(data + uintptr(hdr+1))) != 0) && gap+2 <= top { var pSpace uintptr = pageFindSlot(tls, pPage, nByte, bp) if pSpace != 0 { var g2 int32 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, int32((int64(pSpace)-int64(data))/1)) if g2 <= gap { return Xsqlite3CorruptError(tls, 67859) } else { return SQLITE_OK } } else if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } // The request could not be fulfilled using a freelist slot. Check // to see if defragmentation is necessary. if gap+2+nByte > top { *(*int32)(unsafe.Pointer(bp /* rc */)) = defragmentPage(tls, pPage, func() int32 { if 4 < (*MemPage)(unsafe.Pointer(pPage)).FnFree-(2+nByte) { return 4 } return (*MemPage)(unsafe.Pointer(pPage)).FnFree - (2 + nByte) }()) if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) } top = (int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1 } // Allocate memory from the gap in between the cell pointer array // and the cell content area. The btreeComputeFreeSpace() call has already // validated the freelist. Given that the freelist is valid, there // is no way that the allocation can extend off the end of the page. // The assert() below verifies the previous sentence. top = top - nByte *(*U8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8(top >> 8) *(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8(top) *(*int32)(unsafe.Pointer(pIdx)) = top return SQLITE_OK } // Return a section of the pPage->aData to the freelist. // The first byte of the new free block is pPage->aData[iStart] // and the size of the block is iSize bytes. // // Adjacent freeblocks are coalesced. // // Even though the freeblock list was checked by btreeComputeFreeSpace(), // that routine will not detect overlap between cells or freeblocks. Nor // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:67908:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 var nFrag U8 = U8(0) // Reduction in fragmentation var iOrigSize U16 = iSize // Original value of iSize var x U16 // Offset to cell content area var iEnd U32 = U32(int32(iStart) + int32(iSize)) // First byte past the iStart buffer var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData // Page content // Minimum cell size is 4 // The list of freeblocks must be in ascending order. Find the // spot on the list where iStart should be inserted. hdr = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset iPtr = U16(int32(hdr) + 1) if int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+1)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr)))) == 0 { iFreeBlk = U16(0) // Shortcut for the case when the freelist is empty } else { for int32(libc.AssignUint16(&iFreeBlk, U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr))))<<8|int32(*(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)))))) < int32(iStart) { if int32(iFreeBlk) < int32(iPtr)+4 { if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 return Xsqlite3CorruptError(tls, 67937) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 return Xsqlite3CorruptError(tls, 67942) } // At this point: // iFreeBlk: First freeblock after iStart, or zero if none // iPtr: The address of a pointer to iFreeBlk // // Check to see if iFreeBlk should be coalesced onto the end of iStart. if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { return Xsqlite3CorruptError(tls, 67954) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { return Xsqlite3CorruptError(tls, 67957) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) } // If iPtr is another freeblock (that is, if iPtr is not the freelist // pointer in the page header) then check to see if iStart should be // coalesced onto the end of iPtr. if int32(iPtr) > int32(hdr)+1 { var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { return Xsqlite3CorruptError(tls, 67970) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) iStart = iPtr } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { return Xsqlite3CorruptError(tls, 67976) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } x = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)))) if int32(iStart) <= int32(x) { // The new freeblock is at the beginning of the cell content area, // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { return Xsqlite3CorruptError(tls, 67984) } if int32(iPtr) != int32(hdr)+1 { return Xsqlite3CorruptError(tls, 67985) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))) = U8(iEnd >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)) = U8(iEnd) } else { // Insert the new freeblock into the freelist *(*uint8)(unsafe.Pointer(data + uintptr(iPtr))) = U8(int32(iStart) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(iPtr) + 1)) = U8(iStart) } if int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FbtsFlags)&BTS_FAST_SECURE != 0 { // Overwrite deleted information with zeros when the secure_delete // option is enabled libc.Xmemset(tls, data+uintptr(iStart), 0, uint64(iSize)) } *(*uint8)(unsafe.Pointer(data + uintptr(iStart))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(iStart) + 1)) = U8(iFreeBlk) *(*uint8)(unsafe.Pointer(data + uintptr(int32(iStart)+2))) = U8(int32(iSize) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(iStart)+2) + 1)) = U8(iSize) *(*int32)(unsafe.Pointer(pPage + 20)) += int32(iOrigSize) return SQLITE_OK } // Decode the flags byte (the first byte of the header) for a page // and initialize fields of the MemPage structure accordingly. // // Only the following combinations are supported. Anything different // indicates a corrupt database files: // // PTF_ZERODATA // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68015:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) flagByte = flagByte & libc.CplInt32(PTF_LEAF) (*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize = U8(4 - 4*int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf)) (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) U16 }{cellSizePtr})) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt if flagByte == PTF_LEAFDATA|PTF_INTKEY { // EVIDENCE-OF: R-07291-35328 A value of 5 (0x05) means the page is an // interior table b-tree page. // EVIDENCE-OF: R-26900-09176 A value of 13 (0x0d) means the page is a // leaf table b-tree page. (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(1) if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(1) (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtr})) } else { (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FxCellSize = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) U16 }{cellSizePtrNoPayload})) (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrNoPayload})) } (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLeaf } else if flagByte == PTF_ZERODATA { // EVIDENCE-OF: R-43316-37308 A value of 2 (0x02) means the page is an // interior index b-tree page. // EVIDENCE-OF: R-59615-42828 A value of 10 (0x0a) means the page is a // leaf index b-tree page. (*MemPage)(unsafe.Pointer(pPage)).FintKey = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FxParseCell = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) }{btreeParseCellPtrIndex})) (*MemPage)(unsafe.Pointer(pPage)).FmaxLocal = (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal (*MemPage)(unsafe.Pointer(pPage)).FminLocal = (*BtShared)(unsafe.Pointer(pBt)).FminLocal } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. return Xsqlite3CorruptError(tls, 68058) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK } // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68068:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData var usableSize int32 // Amount of usable space on each page var nFree int32 // Number of unused bytes on the page var top int32 // First byte of the cell content area var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) hdr = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset data = (*MemPage)(unsafe.Pointer(pPage)).FaData // EVIDENCE-OF: R-58015-48175 The two-byte integer at offset 5 designates // the start of the cell content area. A zero value for this integer is // interpreted as 65536. top = (int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)))-1)&0xffff + 1 iCellFirst = int32(hdr) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) iCellLast = usableSize - 4 // Compute the total free space on the page // EVIDENCE-OF: R-23588-34450 The two-byte integer at offset 1 gives the // start of the first freeblock on the page, or is zero if there are no // freeblocks. pc = int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1))) nFree = int32(*(*U8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) + top // Init nFree to non-freeblock free space if pc > 0 { var next U32 var size U32 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. return Xsqlite3CorruptError(tls, 68109) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page return Xsqlite3CorruptError(tls, 68114) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) nFree = int32(U32(nFree) + size) if next <= U32(pc)+size+U32(3) { break } pc = int32(next) } if next > U32(0) { // Freeblock not in ascending order return Xsqlite3CorruptError(tls, 68124) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end return Xsqlite3CorruptError(tls, 68128) } } // At this point, nFree contains the sum of the offset to the start // of the cell-content area plus the number of free bytes within // the cell-content area. If this is greater than the usable-size // of the page, then the page must be corrupted. This check also // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { return Xsqlite3CorruptError(tls, 68140) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK } // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68150:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array var sz int32 // Size of a cell var pc int32 // Address of a freeblock within pPage->aData[] var data uintptr // Equal to pPage->aData var usableSize int32 // Maximum usable space on the page var cellOffset int32 // Start of cell content area iCellFirst = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) + 2*int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) usableSize = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) iCellLast = usableSize - 4 data = (*MemPage)(unsafe.Pointer(pPage)).FaData cellOffset = int32((*MemPage)(unsafe.Pointer(pPage)).FcellOffset) if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { iCellLast-- } for i = 0; i < int32((*MemPage)(unsafe.Pointer(pPage)).FnCell); i++ { pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { return Xsqlite3CorruptError(tls, 68171) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { return Xsqlite3CorruptError(tls, 68176) } } return SQLITE_OK } // Initialize the auxiliary information for a disk block. // // Return SQLITE_OK on success. If we see that the page does // not contain a well-formed database page, then return // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68191:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt data = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { return Xsqlite3CorruptError(tls, 68208) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) + 8 + int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize)) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) + uintptr(8) (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt return Xsqlite3CorruptError(tls, 68222) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only // possible for a root page of a table that contains no rows) then the // offset to the cell content area will equal the page size minus the // bytes of reserved space. (*MemPage)(unsafe.Pointer(pPage)).FnFree = -1 // Indicate that this value is yet uncomputed (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(1) if (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags&uint64(SQLITE_CellSizeCk) != 0 { return btreeCellSizeCheck(tls, pPage) } return SQLITE_OK } // Set up a raw page so that it looks like a database page holding // no entries. func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68244:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset var first U16 if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_FAST_SECURE != 0 { libc.Xmemset(tls, data+uintptr(hdr), 0, uint64((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(hdr))) } *(*uint8)(unsafe.Pointer(data + uintptr(hdr))) = uint8(int8(flags)) first = U16(int32(hdr) + func() int32 { if flags&PTF_LEAF == 0 { return 12 } return 8 }()) libc.Xmemset(tls, data+uintptr(int32(hdr)+1), 0, uint64(4)) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) = uint8(0) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5))) = U8((*BtShared)(unsafe.Pointer(pBt)).FusableSize >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+5) + 1)) = U8((*BtShared)(unsafe.Pointer(pBt)).FusableSize) (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(first))) decodeFlags(tls, pPage, flags) (*MemPage)(unsafe.Pointer(pPage)).FcellOffset = first (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd = data + uintptr((*BtShared)(unsafe.Pointer(pBt)).FpageSize) (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx = data + uintptr(first) (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst = data + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(0) (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(1) } // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68281:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) (*MemPage)(unsafe.Pointer(pPage)).FpDbPage = pDbPage (*MemPage)(unsafe.Pointer(pPage)).FpBt = pBt (*MemPage)(unsafe.Pointer(pPage)).Fpgno = pgno (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset = func() uint8 { if pgno == Pgno(1) { return uint8(100) } return uint8(0) }() } return pPage } // Get a page from the pager. Initialize the MemPage.pBt and // MemPage.aData elements if needed. See also: btreeGetUnusedPage(). // // If the PAGER_GET_NOCONTENT flag is set, it means that we do not care // about the content of the page at this time. So do not go to the disk // to fetch the content. Just fill in the content with zeros for now. // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68305:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var pDbPage uintptr at bp, 8 rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, flags) if rc != 0 { return rc } *(*uintptr)(unsafe.Pointer(ppPage)) = btreePageFromDbPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)), pgno, pBt) return SQLITE_OK } // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68327:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) if pDbPage != 0 { return btreePageFromDbPage(tls, pDbPage, pgno, pBt) } return uintptr(0) } // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68341:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68344:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } // Get a page from the pager and initialize it. // // If pCur!=0 then the page is being fetched as part of a moveToChild() // call. Do additional sanity checking on the page in this case. // And if the fetch fails, this routine must decrement pCur->iPage. // // The page is fetched as read-write unless pCur is not NULL and is // a read-only cursor. // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68362:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var pDbPage uintptr at bp, 8 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } rc = Xsqlite3CorruptError(tls, 68377) goto getAndInitPage_error1 __1: ; rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, bReadOnly) if !(rc != 0) { goto __2 } goto getAndInitPage_error1 __2: ; *(*uintptr)(unsafe.Pointer(ppPage)) = Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if !(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit) == 0) { goto __3 } btreePageFromDbPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */)), pgno, pBt) rc = btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) if !(rc != SQLITE_OK) { goto __4 } goto getAndInitPage_error2 __4: ; __3: ; // If obtaining a child page for a cursor, we must verify that the page is // compatible with the root page. if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } rc = Xsqlite3CorruptError(tls, 68398) goto getAndInitPage_error2 __5: ; return SQLITE_OK getAndInitPage_error2: releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) getAndInitPage_error1: if !(pCur != 0) { goto __6 } (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) __6: ; return rc } // Release a MemPage. This should be called once for each prior // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68421:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } func releasePage(tls *libc.TLS, pPage uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68430:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } func releasePageOne(tls *libc.TLS, pPage uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68433:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } // Get an unused page. // // This works just like btreeGetPage() with the addition: // // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68453:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return Xsqlite3CorruptError(tls, 68464) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) } return rc } // During a rollback, when the pager reloads information into the cache // so that the cache is restored to its original state at the start of // the transaction, for each page restored this routine is called. // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. func pageReinit(tls *libc.TLS, pData uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68482:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { (*MemPage)(unsafe.Pointer(pPage)).FisInit = U8(0) if Xsqlite3PagerPageRefcount(tls, pData) > 1 { // pPage might not be a btree page; it might be an overflow page // or ptrmap page or a free page. In those cases, the following // call to btreeInitPage() will likely return SQLITE_CORRUPT. // But no harm is done by this. And it is very important that // btreeInitPage() be called on every btree page so we make // the call for every page that comes in for re-initing. btreeInitPage(tls, pPage) } } } // Invoke the busy handler for a btree. func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68504:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+664) } // Open a database file. // // zFilename is the name of the database file. If zFilename is NULL // then an ephemeral database is created. The ephemeral database might // be exclusively in memory, or it might use a disk-based memory cache. // Either way, the ephemeral database will be automatically deleted // when sqlite3BtreeClose() is called. // // If zFilename is ":memory:" then an in-memory database is created // that is automatically destroyed when it is closed. // // The "flags" parameter is a bitmask that might contain bits like // BTREE_OMIT_JOURNAL and/or BTREE_MEMORY. // // If the database is already opened in the same database connection // and we are in shared cache mode, then the open will fail with an // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68532:20: */ bp := tls.Alloc(100) defer tls.Free(100) var pBt uintptr // Shared part of btree structure var p uintptr // Handle to return var mutexOpen uintptr // Prevents a race condition. Ticket #3537 var rc int32 // Result code from this function var nReserve U8 // Byte of unused space on each page // var zDbHeader [100]uint8 at bp, 100 // Database header content // True if opening an ephemeral, temporary database var isTempDb int32 // Set the variable isMemdb to true for an in-memory database, or // false for a file-based database. var isMemdb int32 var pExisting uintptr var iDb int32 var nFilename int32 var nFullPathname int32 var zFullPathname uintptr var mutexShared uintptr var mutexShared1 uintptr var i int32 var pSib uintptr var pFile uintptr pBt = uintptr(0) mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+5352) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) // flags fit in 8 bits // Only a BTREE_SINGLE database can be BTREE_UNORDERED // A BTREE_SINGLE database is always a temporary and/or ephemeral if !(isMemdb != 0) { goto __1 } flags = flags | BTREE_MEMORY __1: ; if !(vfsFlags&SQLITE_OPEN_MAIN_DB != 0 && (isMemdb != 0 || isTempDb != 0)) { goto __2 } vfsFlags = vfsFlags&libc.CplInt32(SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB __2: ; p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Btree{}))) if !!(p != 0) { goto __3 } return SQLITE_NOMEM __3: ; (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_NONE) (*Btree)(unsafe.Pointer(p)).Fdb = db (*Btree)(unsafe.Pointer(p)).Flock.FpBtree = p (*Btree)(unsafe.Pointer(p)).Flock.FiTable = Pgno(1) // If this Btree is a candidate for shared cache, try to find an // existing BtShared object that we can share with if !(isTempDb == 0 && (isMemdb == 0 || vfsFlags&SQLITE_OPEN_URI != 0)) { goto __4 } if !(vfsFlags&SQLITE_OPEN_SHAREDCACHE != 0) { goto __5 } nFilename = Xsqlite3Strlen30(tls, zFilename) + 1 nFullPathname = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname + 1 zFullPathname = Xsqlite3Malloc(tls, func() uint64 { if nFullPathname > nFilename { return uint64(nFullPathname) } return uint64(nFilename) }()) (*Btree)(unsafe.Pointer(p)).Fsharable = U8(1) if !!(zFullPathname != 0) { goto __6 } Xsqlite3_free(tls, p) return SQLITE_NOMEM __6: ; if !(isMemdb != 0) { goto __7 } libc.Xmemcpy(tls, zFullPathname, zFilename, uint64(nFilename)) goto __8 __7: rc = Xsqlite3OsFullPathname(tls, pVfs, zFilename, nFullPathname, zFullPathname) if !(rc != 0) { goto __9 } if !(rc == SQLITE_OK|int32(2)<<8) { goto __10 } rc = SQLITE_OK goto __11 __10: Xsqlite3_free(tls, zFullPathname) Xsqlite3_free(tls, p) return rc __11: ; __9: ; __8: ; mutexOpen = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_OPEN) Xsqlite3_mutex_enter(tls, mutexOpen) mutexShared = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutexShared) pBt = sqlite3SharedCacheList __12: if !(pBt != 0) { goto __14 } if !(0 == libc.Xstrcmp(tls, zFullPathname, Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, 0)) && Xsqlite3PagerVfs(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) == pVfs) { goto __15 } iDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 __16: if !(iDb >= 0) { goto __18 } pExisting = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt if !(pExisting != 0 && (*Btree)(unsafe.Pointer(pExisting)).FpBt == pBt) { goto __19 } Xsqlite3_mutex_leave(tls, mutexShared) Xsqlite3_mutex_leave(tls, mutexOpen) Xsqlite3_free(tls, zFullPathname) Xsqlite3_free(tls, p) return SQLITE_CONSTRAINT __19: ; goto __17 __17: iDb-- goto __16 goto __18 __18: ; (*Btree)(unsafe.Pointer(p)).FpBt = pBt (*BtShared)(unsafe.Pointer(pBt)).FnRef++ goto __14 __15: ; goto __13 __13: pBt = (*BtShared)(unsafe.Pointer(pBt)).FpNext goto __12 goto __14 __14: ; Xsqlite3_mutex_leave(tls, mutexShared) Xsqlite3_free(tls, zFullPathname) __5: ; __4: ; if !(pBt == uintptr(0)) { goto __20 } // The following asserts make sure that structures used by the btree are // the right size. This is to guard against size changes that result // when compiling on a different architecture. pBt = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(BtShared{}))) if !(pBt == uintptr(0)) { goto __21 } rc = SQLITE_NOMEM goto btree_open_out __21: ; rc = Xsqlite3PagerOpen(tls, pVfs, pBt, zFilename, int32(unsafe.Sizeof(MemPage{})), flags, vfsFlags, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{pageReinit}))) if !(rc == SQLITE_OK) { goto __22 } Xsqlite3PagerSetMmapLimit(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Sqlite3)(unsafe.Pointer(db)).FszMmap) rc = Xsqlite3PagerReadFileheader(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, int32(unsafe.Sizeof([100]uint8{})), bp) __22: ; if !(rc != SQLITE_OK) { goto __23 } goto btree_open_out __23: ; (*BtShared)(unsafe.Pointer(pBt)).FopenFlags = U8(flags) (*BtShared)(unsafe.Pointer(pBt)).Fdb = db Xsqlite3PagerSetBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 }{btreeInvokeBusyHandler})), pBt) (*Btree)(unsafe.Pointer(p)).FpBt = pBt (*BtShared)(unsafe.Pointer(pBt)).FpCursor = uintptr(0) (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) if !(Xsqlite3PagerIsreadonly(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) != 0) { goto __24 } *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_READ_ONLY) __24: ; // EVIDENCE-OF: R-51873-39618 The page size for a database file is // determined by the 2-byte integer located at an offset of 16 bytes from // the beginning of the database file. (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(int32(*(*uint8)(unsafe.Pointer(bp + 16)))<<8 | int32(*(*uint8)(unsafe.Pointer(bp + 17)))<<16) if !((*BtShared)(unsafe.Pointer(pBt)).FpageSize < U32(512) || (*BtShared)(unsafe.Pointer(pBt)).FpageSize > U32(SQLITE_MAX_PAGE_SIZE) || ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(1))&(*BtShared)(unsafe.Pointer(pBt)).FpageSize != U32(0)) { goto __25 } (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(0) // If the magic name ":memory:" will create an in-memory database, then // leave the autoVacuum mode at 0 (do not auto-vacuum), even if // SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if // SQLITE_OMIT_MEMORYDB has been defined, then ":memory:" is just a // regular file-name. In this case the auto-vacuum applies as per normal. if !(zFilename != 0 && !(isMemdb != 0)) { goto __27 } (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { if 0 != 0 { return uint8(1) } return uint8(0) }() (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { if SQLITE_DEFAULT_AUTOVACUUM == 2 { return uint8(1) } return uint8(0) }() __27: ; nReserve = U8(0) goto __26 __25: // EVIDENCE-OF: R-37497-42412 The size of the reserved region is // determined by the one-byte unsigned integer found at an offset of 20 // into the database file header. nReserve = *(*uint8)(unsafe.Pointer(bp + 20)) *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { if Xsqlite3Get4byte(tls, bp+52) != 0 { return uint8(1) } return uint8(0) }() (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { if Xsqlite3Get4byte(tls, bp+64) != 0 { return uint8(1) } return uint8(0) }() __26: ; rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, int32(nReserve)) if !(rc != 0) { goto __28 } goto btree_open_out __28: ; (*BtShared)(unsafe.Pointer(pBt)).FusableSize = (*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(nReserve) // 8-byte alignment of pageSize // Add the new BtShared object to the linked list sharable BtShareds. (*BtShared)(unsafe.Pointer(pBt)).FnRef = 1 if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { goto __29 } mutexShared1 = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) if !(1 != 0 && Xsqlite3Config.FbCoreMutex != 0) { goto __30 } (*BtShared)(unsafe.Pointer(pBt)).Fmutex = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_FAST) if !((*BtShared)(unsafe.Pointer(pBt)).Fmutex == uintptr(0)) { goto __31 } rc = SQLITE_NOMEM goto btree_open_out __31: ; __30: ; Xsqlite3_mutex_enter(tls, mutexShared1) (*BtShared)(unsafe.Pointer(pBt)).FpNext = sqlite3SharedCacheList sqlite3SharedCacheList = pBt Xsqlite3_mutex_leave(tls, mutexShared1) __29: ; __20: ; // If the new Btree uses a sharable pBtShared, then link the new // Btree into the list of all sharable Btrees for the same connection. // The list is kept in ascending order by pBt address. if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { goto __32 } i = 0 __33: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __35 } if !(libc.AssignUintptr(&pSib, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpBt) != uintptr(0) && (*Btree)(unsafe.Pointer(pSib)).Fsharable != 0) { goto __36 } __37: if !((*Btree)(unsafe.Pointer(pSib)).FpPrev != 0) { goto __38 } pSib = (*Btree)(unsafe.Pointer(pSib)).FpPrev goto __37 __38: ; if !(Uptr((*Btree)(unsafe.Pointer(p)).FpBt) < Uptr((*Btree)(unsafe.Pointer(pSib)).FpBt)) { goto __39 } (*Btree)(unsafe.Pointer(p)).FpNext = pSib (*Btree)(unsafe.Pointer(p)).FpPrev = uintptr(0) (*Btree)(unsafe.Pointer(pSib)).FpPrev = p goto __40 __39: __41: if !((*Btree)(unsafe.Pointer(pSib)).FpNext != 0 && Uptr((*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(pSib)).FpNext)).FpBt) < Uptr((*Btree)(unsafe.Pointer(p)).FpBt)) { goto __42 } pSib = (*Btree)(unsafe.Pointer(pSib)).FpNext goto __41 __42: ; (*Btree)(unsafe.Pointer(p)).FpNext = (*Btree)(unsafe.Pointer(pSib)).FpNext (*Btree)(unsafe.Pointer(p)).FpPrev = pSib if !((*Btree)(unsafe.Pointer(p)).FpNext != 0) { goto __43 } (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpNext)).FpPrev = p __43: ; (*Btree)(unsafe.Pointer(pSib)).FpNext = p __40: ; goto __35 __36: ; goto __34 __34: i++ goto __33 goto __35 __35: ; __32: ; *(*uintptr)(unsafe.Pointer(ppBtree)) = p btree_open_out: if !(rc != SQLITE_OK) { goto __44 } if !(pBt != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpPager != 0) { goto __46 } Xsqlite3PagerClose(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uintptr(0)) __46: ; Xsqlite3_free(tls, pBt) Xsqlite3_free(tls, p) *(*uintptr)(unsafe.Pointer(ppBtree)) = uintptr(0) goto __45 __44: // If the B-Tree was successfully opened, set the pager-cache size to the // default value. Except, when opening on an existing shared pager-cache, // do not change the pager-cache size. if !(Xsqlite3BtreeSchema(tls, p, 0, uintptr(0)) == uintptr(0)) { goto __47 } Xsqlite3BtreeSetCacheSize(tls, p, -2000) __47: ; pFile = Xsqlite3PagerFile(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) if !((*Sqlite3_file)(unsafe.Pointer(pFile)).FpMethods != 0) { goto __48 } Xsqlite3OsFileControlHint(tls, pFile, SQLITE_FCNTL_PDB, pBt+8) __48: ; __45: ; if !(mutexOpen != 0) { goto __49 } Xsqlite3_mutex_leave(tls, mutexOpen) __49: ; return rc } // Decrement the BtShared.nRef counter. When it reaches zero, // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68830:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 pMainMtx = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, pMainMtx) (*BtShared)(unsafe.Pointer(pBt)).FnRef-- if (*BtShared)(unsafe.Pointer(pBt)).FnRef <= 0 { if sqlite3SharedCacheList == pBt { sqlite3SharedCacheList = (*BtShared)(unsafe.Pointer(pBt)).FpNext } else { pList = sqlite3SharedCacheList for pList != 0 && (*BtShared)(unsafe.Pointer(pList)).FpNext != pBt { pList = (*BtShared)(unsafe.Pointer(pList)).FpNext } if pList != 0 { (*BtShared)(unsafe.Pointer(pList)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpNext } } if 1 != 0 { Xsqlite3_mutex_free(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) } removed = 1 } Xsqlite3_mutex_leave(tls, pMainMtx) return removed } // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. func allocateTempSpace(tls *libc.TLS, pBt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68869:28: */ // This routine is called only by btreeCursor() when allocating the // first write cursor for the BtShared object (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace == uintptr(0) { var pCur uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpCursor (*BtShared)(unsafe.Pointer(pBt)).FpCursor = (*BtCursor)(unsafe.Pointer(pCur)).FpNext // Unlink the cursor libc.Xmemset(tls, pCur, 0, uint64(unsafe.Sizeof(BtCursor{}))) return SQLITE_NOMEM } // One of the uses of pBt->pTmpSpace is to format cells before // inserting them into a leaf page (function fillInCell()). If // a cell is less than 4 bytes in size, it is rounded up to 4 bytes // by the various routines that manipulate binary cells. Which // can mean that fillInCell() only initializes the first 2 or 3 // bytes of pTmpSpace, but that the first 4 bytes are copied from // it into a database page. This is not actually a problem, but it // does cause a valgrind error when the 1 or 2 bytes of unitialized // data is passed to system call write(). So to avoid this error, // zero the first 4 bytes of temp space here. // // Also: Provide four bytes of initialized space before the // beginning of pTmpSpace as an area available to prepend the // left-child pointer to the beginning of a cell. libc.Xmemset(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace, 0, uint64(8)) *(*uintptr)(unsafe.Pointer(pBt + 136)) += uintptr(4) return SQLITE_OK } // Free the pBt->pTmpSpace allocation func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68906:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 136)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = uintptr(0) } } // Close an open database and invalidate all cursors. func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68917:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. Xsqlite3BtreeEnter(tls, p) // Verify that no other cursors have this Btree open // Rollback any active transaction and free the handle structure. // The call to sqlite3BtreeRollback() drops any table-locks held by // this handle. Xsqlite3BtreeRollback(tls, p, SQLITE_OK, 0) Xsqlite3BtreeLeave(tls, p) // If there are still other outstanding references to the shared-btree // structure, return now. The remainder of this procedure cleans // up the shared-btree. if !(int32((*Btree)(unsafe.Pointer(p)).Fsharable) != 0) || removeFromSharingList(tls, pBt) != 0 { // The pBt is no longer on the sharing list, so we can access // it without having to hold the mutex. // // Clean out and delete the BtShared object. Xsqlite3PagerClose(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Btree)(unsafe.Pointer(p)).Fdb) if (*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpSchema != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema})).f(tls, (*BtShared)(unsafe.Pointer(pBt)).FpSchema) } Xsqlite3DbFree(tls, uintptr(0), (*BtShared)(unsafe.Pointer(pBt)).FpSchema) freeTempSpace(tls, pBt) Xsqlite3_free(tls, pBt) } if (*Btree)(unsafe.Pointer(p)).FpPrev != 0 { (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpPrev)).FpNext = (*Btree)(unsafe.Pointer(p)).FpNext } if (*Btree)(unsafe.Pointer(p)).FpNext != 0 { (*Btree)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpNext)).FpPrev = (*Btree)(unsafe.Pointer(p)).FpPrev } Xsqlite3_free(tls, p) return SQLITE_OK } // Change the "soft" limit on the number of pages in the cache. // Unused and unmodified pages will be recycled when the number of // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:68983:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) Xsqlite3PagerSetCachesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, mxPage) Xsqlite3BtreeLeave(tls, p) return SQLITE_OK } // Change the "spill" limit on the number of pages in the cache. // If the number of pages exceeds this limit during a write transaction, // the pager might attempt to "spill" pages to the journal early in // order to free up memory. // // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69002:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 Xsqlite3BtreeEnter(tls, p) res = Xsqlite3PagerSetSpillsize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, mxPage) Xsqlite3BtreeLeave(tls, p) return res } // Change the limit on the amount of the database file that may be // memory mapped. func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69017:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) Xsqlite3PagerSetMmapLimit(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, szMmap) Xsqlite3BtreeLeave(tls, p) return SQLITE_OK } // Change the way data is synced to disk in order to increase or decrease // how well the database resists damage due to OS crashes and power // failures. Level 1 is the same as asynchronous (no syncs() occur and // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69036:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) Xsqlite3PagerSetFlags(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgFlags) Xsqlite3BtreeLeave(tls, p) return SQLITE_OK } // Change the default pages size and the number of reserved bytes per page. // Or, if the page size has already been fixed, return SQLITE_READONLY // without changing anything. // // The page size must be a power of 2 between 512 and 65536. If the page // size supplied does not meet this constraint then the page size is not // changed. // // Page sizes are constrained to be a power of two so that the region // of the database file used for locking (beginning at PENDING_BYTE, // the first byte past the 1GB boundary, 0x40000000) needs to occur // at the beginning of a page. // // If parameter nReserve is less than zero, then the number of reserved // bytes per page is left unchanged. // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69069:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer(pBt)).FnReserveWanted = U8(nReserve) x = int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize - (*BtShared)(unsafe.Pointer(pBt)).FusableSize) if nReserve < x { nReserve = x } if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PAGESIZE_FIXED != 0 { Xsqlite3BtreeLeave(tls, p) return SQLITE_READONLY } if pageSize >= 512 && pageSize <= SQLITE_MAX_PAGE_SIZE && (pageSize-1)&pageSize == 0 { if nReserve > 32 && pageSize == 512 { pageSize = 1024 } (*BtShared)(unsafe.Pointer(pBt)).FpageSize = U32(pageSize) freeTempSpace(tls, pBt) } rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, nReserve) (*BtShared)(unsafe.Pointer(pBt)).FusableSize = (*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(U16(nReserve)) if iFix != 0 { *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) } Xsqlite3BtreeLeave(tls, p) return rc } // Return the currently defined page size func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69101:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } // This function is similar to sqlite3BtreeGetReserve(), except that it // may only be called if it is guaranteed that the b-tree mutex is already // held. // // This is useful in one special case in the backup API code where it is // known that the shared b-tree mutex is held, but the mutex on the // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69116:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) return n } // Return the number of bytes of space at the end of every page that // are intentually left unused. This is the "reserved" space that is // sometimes used by extensions. // // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69132:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) n1 = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnReserveWanted) n2 = Xsqlite3BtreeGetReserveNoMutex(tls, p) Xsqlite3BtreeLeave(tls, p) if n1 > n2 { return n1 } return n2 } // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69147:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) Xsqlite3BtreeLeave(tls, p) return n } // Change the values for the BTS_SECURE_DELETE and BTS_OVERWRITE flags: // // newFlag==0 Both BTS_SECURE_DELETE and BTS_OVERWRITE are cleared // newFlag==1 BTS_SECURE_DELETE set and BTS_OVERWRITE is cleared // newFlag==2 BTS_SECURE_DELETE cleared and BTS_OVERWRITE is set // newFlag==(-1) No changes // // This routine acts as a query if newFlag is less than zero // // With BTS_OVERWRITE set, deleted content is overwritten by zeros, but // freelist leaf pages are not written back to the database. Thus in-page // deleted content is cleared, but freelist deleted content is not. // // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69173:20: */ var b int32 if p == uintptr(0) { return 0 } Xsqlite3BtreeEnter(tls, p) if newFlag >= 0 { *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_FAST_SECURE)) *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt + 40)) |= U16(BTS_SECURE_DELETE * newFlag) } b = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags) & BTS_FAST_SECURE / BTS_SECURE_DELETE Xsqlite3BtreeLeave(tls, p) return b } // Change the 'auto-vacuum' property of the database. If the 'autoVacuum' // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69194:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) Xsqlite3BtreeEnter(tls, p) if int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PAGESIZE_FIXED != 0 && func() int32 { if av != 0 { return 1 } return 0 }() != int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) { rc = SQLITE_READONLY } else { (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { if av != 0 { return uint8(1) } return uint8(0) }() (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { if int32(av) == 2 { return uint8(1) } return uint8(0) }() } Xsqlite3BtreeLeave(tls, p) return rc } // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69218:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { if !(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FautoVacuum) != 0) { return BTREE_AUTOVACUUM_NONE } return func() int32 { if !(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FincrVacuum) != 0) { return BTREE_AUTOVACUUM_FULL } return BTREE_AUTOVACUUM_INCR }() }() Xsqlite3BtreeLeave(tls, p) return rc } // Get a reference to pPage1 of the database file. This will // also acquire a readlock on that file. // // SQLITE_OK is returned on success. If the file is not a // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69274:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // Result code from subfunctions // var pPage1 uintptr at bp, 8 // Page 1 of the database file var nPage U32 // Number of pages in the database // var nPageFile U32 at bp+8, 4 // var isOpen int32 at bp+12, 4 var pageSize U32 var usableSize U32 var page1 uintptr *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) = U32(0) // Number of pages in the database file rc = Xsqlite3PagerSharedLock(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) if !(rc != SQLITE_OK) { goto __1 } return rc __1: ; rc = btreeGetPage(tls, pBt, uint32(1), bp, 0) if !(rc != SQLITE_OK) { goto __2 } return rc __2: ; // Do some checking to help insure the file we opened really is // a valid database file. nPage = Xsqlite3Get4byte(tls, uintptr(28)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+8) if !(nPage == U32(0) || libc.Xmemcmp(tls, uintptr(24)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uintptr(92)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uint64(4)) != 0) { goto __3 } nPage = *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) __3: ; if !((*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags&uint64(SQLITE_ResetDatabase) != uint64(0)) { goto __4 } nPage = U32(0) __4: ; if !(nPage > U32(0)) { goto __5 } page1 = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage1 */)))).FaData rc = SQLITE_NOTADB // EVIDENCE-OF: R-43737-39999 Every valid SQLite database file begins // with the following 16 bytes (in hex): 53 51 4c 69 74 65 20 66 6f 72 6d // 61 74 20 33 00. if !(libc.Xmemcmp(tls, page1, uintptr(unsafe.Pointer(&zMagicHeader)), uint64(16)) != 0) { goto __6 } goto page1_init_failed __6: ; if !(int32(*(*U8)(unsafe.Pointer(page1 + 18))) > 2) { goto __7 } *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_READ_ONLY) __7: ; if !(int32(*(*U8)(unsafe.Pointer(page1 + 19))) > 2) { goto __8 } goto page1_init_failed __8: ; // If the read version is set to 2, this database should be accessed // in WAL mode. If the log is not already open, open it now. Then // return SQLITE_OK and return without populating BtShared.pPage1. // The caller detects this and calls this function again. This is // required as the version of page 1 currently in the page1 buffer // may not be the latest version - there may be a newer one in the log // file. if !(int32(*(*U8)(unsafe.Pointer(page1 + 19))) == 2 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_NO_WAL == 0) { goto __9 } *(*int32)(unsafe.Pointer(bp + 12 /* isOpen */)) = 0 rc = Xsqlite3PagerOpenWal(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+12) if !(rc != SQLITE_OK) { goto __11 } goto page1_init_failed goto __12 __11: ; if !(*(*int32)(unsafe.Pointer(bp + 12)) == 0) { goto __13 } releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) return SQLITE_OK __13: ; __12: ; rc = SQLITE_NOTADB goto __10 __9: ; __10: ; // EVIDENCE-OF: R-15465-20813 The maximum and minimum embedded payload // fractions and the leaf payload fraction values must be 64, 32, and 32. // // The original design allowed these amounts to vary, but as of // version 3.6.0, we require them to be fixed. if !(libc.Xmemcmp(tls, page1+21, ts+5361, uint64(3)) != 0) { goto __14 } goto page1_init_failed __14: ; // EVIDENCE-OF: R-51873-39618 The page size for a database file is // determined by the 2-byte integer located at an offset of 16 bytes from // the beginning of the database file. pageSize = U32(int32(*(*U8)(unsafe.Pointer(page1 + 16)))<<8 | int32(*(*U8)(unsafe.Pointer(page1 + 17)))<<16) // EVIDENCE-OF: R-25008-21688 The size of a page is a power of two // between 512 and 65536 inclusive. if !((pageSize-U32(1))&pageSize != U32(0) || pageSize > U32(SQLITE_MAX_PAGE_SIZE) || pageSize <= U32(256)) { goto __15 } goto page1_init_failed __15: ; *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) // EVIDENCE-OF: R-59310-51205 The "reserved space" size in the 1-byte // integer at offset 20 is the number of bytes of space at the end of // each page to reserve for extensions. // // EVIDENCE-OF: R-37497-42412 The size of the reserved region is // determined by the one-byte unsigned integer found at an offset of 20 // into the database file header. usableSize = pageSize - U32(*(*U8)(unsafe.Pointer(page1 + 20))) if !(pageSize != (*BtShared)(unsafe.Pointer(pBt)).FpageSize) { goto __16 } // After reading the first page of the database assuming a page size // of BtShared.pageSize, we have discovered that the page-size is // actually pageSize. Unlock the database, leave pBt->pPage1 at // zero and return SQLITE_OK. The caller will call this function // again with the correct page-size. releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) (*BtShared)(unsafe.Pointer(pBt)).FusableSize = usableSize (*BtShared)(unsafe.Pointer(pBt)).FpageSize = pageSize freeTempSpace(tls, pBt) rc = Xsqlite3PagerSetPagesize(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pBt+52, int32(pageSize-usableSize)) return rc __16: ; if !(nPage > *(*U32)(unsafe.Pointer(bp + 8))) { goto __17 } if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0) { goto __18 } rc = Xsqlite3CorruptError(tls, 69399) goto page1_init_failed goto __19 __18: nPage = *(*U32)(unsafe.Pointer(bp + 8 /* nPageFile */)) __19: ; __17: ; // EVIDENCE-OF: R-28312-64704 However, the usable size is not allowed to // be less than 480. In other words, if the page size is 512, then the // reserved space size cannot exceed 32. if !(usableSize < U32(480)) { goto __20 } goto page1_init_failed __20: ; (*BtShared)(unsafe.Pointer(pBt)).FpageSize = pageSize (*BtShared)(unsafe.Pointer(pBt)).FusableSize = usableSize (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { if Xsqlite3Get4byte(tls, page1+52) != 0 { return uint8(1) } return uint8(0) }() (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = func() uint8 { if Xsqlite3Get4byte(tls, page1+64) != 0 { return uint8(1) } return uint8(0) }() __5: ; // maxLocal is the maximum amount of payload to store locally for // a cell. Make sure it is small enough so that at least minFanout // cells can will fit on one page. We assume a 10-byte page header. // Besides the payload, the cell must store: // 2-byte pointer to the cell // 4-byte child pointer // 9-byte nKey value // 4-byte nData value // 4-byte overflow page pointer // So a cell consists of a 2-byte pointer, a header which is as much as // 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow // page pointer. (*BtShared)(unsafe.Pointer(pBt)).FmaxLocal = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(64)/U32(255) - U32(23)) (*BtShared)(unsafe.Pointer(pBt)).FminLocal = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(32)/U32(255) - U32(23)) (*BtShared)(unsafe.Pointer(pBt)).FmaxLeaf = U16((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(35)) (*BtShared)(unsafe.Pointer(pBt)).FminLeaf = U16(((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(12))*U32(32)/U32(255) - U32(23)) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FmaxLocal) > 127) { goto __21 } (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload = U8(127) goto __22 __21: (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload = U8((*BtShared)(unsafe.Pointer(pBt)).FmaxLocal) __22: ; (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = *(*uintptr)(unsafe.Pointer(bp /* pPage1 */)) (*BtShared)(unsafe.Pointer(pBt)).FnPage = nPage return SQLITE_OK page1_init_failed: releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) return rc } // If there are no outstanding cursors and we are not in the middle // of a transaction but there is a read lock on the database, then // this routine unrefs the first page of the database file which // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69484:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 (*BtShared)(unsafe.Pointer(pBt)).FpPage1 = uintptr(0) releasePageOne(tls, pPage1) } } // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69501:12: */ var pP1 uintptr var data uintptr var rc int32 if (*BtShared)(unsafe.Pointer(pBt)).FnPage > U32(0) { return SQLITE_OK } pP1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 data = (*MemPage)(unsafe.Pointer(pP1)).FaData rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pP1)).FpDbPage) if rc != 0 { return rc } libc.Xmemcpy(tls, data, uintptr(unsafe.Pointer(&zMagicHeader)), uint64(unsafe.Sizeof(zMagicHeader))) *(*uint8)(unsafe.Pointer(data + 16)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize >> 8 & U32(0xff)) *(*uint8)(unsafe.Pointer(data + 17)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize >> 16 & U32(0xff)) *(*uint8)(unsafe.Pointer(data + 18)) = uint8(1) *(*uint8)(unsafe.Pointer(data + 19)) = uint8(1) *(*uint8)(unsafe.Pointer(data + 20)) = U8((*BtShared)(unsafe.Pointer(pBt)).FpageSize - (*BtShared)(unsafe.Pointer(pBt)).FusableSize) *(*uint8)(unsafe.Pointer(data + 21)) = uint8(64) *(*uint8)(unsafe.Pointer(data + 22)) = uint8(32) *(*uint8)(unsafe.Pointer(data + 23)) = uint8(32) libc.Xmemset(tls, data+24, 0, uint64(100-24)) zeroPage(tls, pP1, PTF_INTKEY|PTF_LEAF|PTF_LEAFDATA) *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_PAGESIZE_FIXED) Xsqlite3Put4byte(tls, data+52, uint32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum)) Xsqlite3Put4byte(tls, data+64, uint32((*BtShared)(unsafe.Pointer(pBt)).FincrVacuum)) (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(1) *(*uint8)(unsafe.Pointer(data + 31)) = uint8(1) return SQLITE_OK } // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69545:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) rc = newDatabase(tls, (*Btree)(unsafe.Pointer(p)).FpBt) Xsqlite3BtreeLeave(tls, p) return rc } // Attempt to start a new transaction. A write-transaction // is started if the second argument is nonzero, otherwise a read- // transaction. If the second argument is 2 or more and exclusive // transaction is started, meaning that no other process is allowed // to access the database. A preexisting transaction may not be // upgraded to exclusive by calling this routine a second time - the // exclusivity flag only works for a new transaction. // // A write-transaction must be started before attempting any // changes to the database. None of the following routines // will work unless a transaction is started first: // // sqlite3BtreeCreateTable() // sqlite3BtreeCreateIndex() // sqlite3BtreeClearTable() // sqlite3BtreeDropTable() // sqlite3BtreeInsert() // sqlite3BtreeDelete() // sqlite3BtreeUpdateMeta() // // If an initial attempt to acquire the lock fails because of lock contention // and the database was previously unlocked, then invoke the busy handler // if there is one. But if there was previously a read-lock, do not // invoke the busy handler - just return SQLITE_BUSY. SQLITE_BUSY is // returned when there is already a read-lock in order to avoid a deadlock. // // Suppose there are two processes A and B. A has a read lock and B has // a reserved lock. B tries to promote to exclusive but is blocked because // of A's read lock. A tries to promote to reserved but is blocked by B. // One or the other of the two processes must give way or there can be // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69589:20: */ var pBt uintptr var pPager uintptr var rc int32 var pIter uintptr var pBlock uintptr var pPage1 uintptr pBt = (*Btree)(unsafe.Pointer(p)).FpBt pPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager rc = SQLITE_OK Xsqlite3BtreeEnter(tls, p) // If the btree is already in a write-transaction, or it // is already in a read-transaction and a read-transaction // is requested, this is a no-op. if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE || int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_READ && !(wrflag != 0)) { goto __1 } goto trans_begun __1: ; if !((*Sqlite3)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).Fdb)).Fflags&uint64(SQLITE_ResetDatabase) != 0 && int32(Xsqlite3PagerIsreadonly(tls, pPager)) == 0) { goto __2 } *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_READ_ONLY)) __2: ; // Write transactions are not possible on a read-only database if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_READ_ONLY != 0 && wrflag != 0) { goto __3 } rc = SQLITE_READONLY goto trans_begun __3: ; pBlock = uintptr(0) // If another database handle has already opened a write transaction // on this shared-btree structure and a second write transaction is // requested, return SQLITE_LOCKED. if !(wrflag != 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_WRITE || int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_PENDING != 0) { goto __4 } pBlock = (*Btree)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpWriter)).Fdb goto __5 __4: if !(wrflag > 1) { goto __6 } pIter = (*BtShared)(unsafe.Pointer(pBt)).FpLock __7: if !(pIter != 0) { goto __9 } if !((*BtLock)(unsafe.Pointer(pIter)).FpBtree != p) { goto __10 } pBlock = (*Btree)(unsafe.Pointer((*BtLock)(unsafe.Pointer(pIter)).FpBtree)).Fdb goto __9 __10: ; goto __8 __8: pIter = (*BtLock)(unsafe.Pointer(pIter)).FpNext goto __7 goto __9 __9: ; __6: ; __5: ; if !(pBlock != 0) { goto __11 } Xsqlite3ConnectionBlocked(tls, (*Btree)(unsafe.Pointer(p)).Fdb, pBlock) rc = SQLITE_LOCKED | int32(1)<<8 goto trans_begun __11: ; // Any read-only or read-write transaction implies a read-lock on // page 1. So if some other shared-cache client already has a write-lock // on page 1, the transaction cannot be opened. rc = querySharedCacheTableLock(tls, p, uint32(SCHEMA_ROOT), uint8(READ_LOCK)) if !(SQLITE_OK != rc) { goto __12 } goto trans_begun __12: ; *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_INITIALLY_EMPTY)) if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(0)) { goto __13 } *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_INITIALLY_EMPTY) __13: ; __14: ; // Call lockBtree() until either pBt->pPage1 is populated or // lockBtree() returns something other than SQLITE_OK. lockBtree() // may return SQLITE_OK but leave pBt->pPage1 set to 0 if after // reading page 1 it discovers that the page-size of the database // file is not pBt->pageSize. In this case lockBtree() will update // pBt->pageSize to the page-size of the file on disk. __17: if !((*BtShared)(unsafe.Pointer(pBt)).FpPage1 == uintptr(0) && SQLITE_OK == libc.AssignInt32(&rc, lockBtree(tls, pBt))) { goto __18 } goto __17 __18: ; if !(rc == SQLITE_OK && wrflag != 0) { goto __19 } if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_READ_ONLY != 0) { goto __20 } rc = SQLITE_READONLY goto __21 __20: rc = Xsqlite3PagerBegin(tls, pPager, libc.Bool32(wrflag > 1), Xsqlite3TempInMemory(tls, (*Btree)(unsafe.Pointer(p)).Fdb)) if !(rc == SQLITE_OK) { goto __22 } rc = newDatabase(tls, pBt) goto __23 __22: if !(rc == SQLITE_BUSY|int32(2)<<8 && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE) { goto __24 } // if there was no transaction opened when this function was // called and SQLITE_BUSY_SNAPSHOT is returned, change the error // code to SQLITE_BUSY. rc = SQLITE_BUSY __24: ; __23: ; __21: ; __19: ; if !(rc != SQLITE_OK) { goto __25 } unlockBtreeIfUnused(tls, pBt) __25: ; goto __15 __15: if rc&0xFF == SQLITE_BUSY && int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && btreeInvokeBusyHandler(tls, pBt) != 0 { goto __14 } goto __16 __16: ; if !(rc == SQLITE_OK) { goto __26 } if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE) { goto __27 } (*BtShared)(unsafe.Pointer(pBt)).FnTransaction++ if !((*Btree)(unsafe.Pointer(p)).Fsharable != 0) { goto __28 } (*Btree)(unsafe.Pointer(p)).Flock.FeLock = U8(READ_LOCK) (*Btree)(unsafe.Pointer(p)).Flock.FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpLock (*BtShared)(unsafe.Pointer(pBt)).FpLock = p + 48 __28: ; __27: ; (*Btree)(unsafe.Pointer(p)).FinTrans = func() uint8 { if wrflag != 0 { return uint8(TRANS_WRITE) } return uint8(TRANS_READ) }() if !(int32((*Btree)(unsafe.Pointer(p)).FinTrans) > int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction)) { goto __29 } (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = (*Btree)(unsafe.Pointer(p)).FinTrans __29: ; if !(wrflag != 0) { goto __30 } pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 (*BtShared)(unsafe.Pointer(pBt)).FpWriter = p *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_EXCLUSIVE)) if !(wrflag > 1) { goto __31 } *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_EXCLUSIVE) __31: ; // If the db-size header field is incorrect (as it may be if an old // client has been writing the database file), update it now. Doing // this sooner rather than later means the database size can safely // re-read the database size from page 1 if a savepoint or transaction // rollback occurs within the transaction. if !((*BtShared)(unsafe.Pointer(pBt)).FnPage != Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28)) { goto __32 } rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) if !(rc == SQLITE_OK) { goto __33 } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28, (*BtShared)(unsafe.Pointer(pBt)).FnPage) __33: ; __32: ; __30: ; __26: ; trans_begun: if !(rc == SQLITE_OK) { goto __34 } if !(pSchemaVersion != 0) { goto __35 } *(*int32)(unsafe.Pointer(pSchemaVersion)) = int32(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+40)) __35: ; if !(wrflag != 0) { goto __36 } // This call makes sure that the pager has the correct number of // open savepoints. If the second parameter is greater than 0 and // the sub-journal is not already open, then it will be opened here. rc = Xsqlite3PagerOpenSavepoint(tls, pPager, (*Sqlite3)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).Fdb)).FnSavepoint) __36: ; __34: ; Xsqlite3BtreeLeave(tls, p) return rc } // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69769:12: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 // Counter variable var nCell int32 // Number of cells in page pPage // var rc int32 at bp, 4 // Return code var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var pgno Pgno = (*MemPage)(unsafe.Pointer(pPage)).Fpgno if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeInitPage(tls, pPage) } if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) for i = 0; i < nCell; i++ { var pCell uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i)))))) ptrmapPutOvflPtr(tls, pPage, pPage, pCell, bp) if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var childPgno Pgno = Xsqlite3Get4byte(tls, pCell) ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) } } if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var childPgno Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Somewhere on pPage is a pointer to page iFrom. Modify this pointer so // that it points to iTo. Parameter eType describes the type of pointer to // be modified, as follows: // // PTRMAP_BTREE: pPage is a btree-page. The pointer points at a child // page of pPage. // // PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow // page pointed to by one of the cells on pPage. // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69814:12: */ bp := tls.Alloc(24) defer tls.Free(24) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { return Xsqlite3CorruptError(tls, 69820) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { var i int32 var nCell int32 var rc int32 if (*MemPage)(unsafe.Pointer(pPage)).FisInit != 0 { rc = SQLITE_OK } else { rc = btreeInitPage(tls, pPage) } if rc != 0 { return rc } nCell = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) for i = 0; i < nCell; i++ { var pCell uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i)))))) if int32(eType) == PTRMAP_OVERFLOW1 { // var info CellInfo at bp, 24 (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { return Xsqlite3CorruptError(tls, 69839) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) break } } } else { if Xsqlite3Get4byte(tls, pCell) == iFrom { Xsqlite3Put4byte(tls, pCell, iTo) break } } } if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { return Xsqlite3CorruptError(tls, 69857) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } } return SQLITE_OK } // Move the open database page pDbPage to location iFreePage in the // database. The pDbPage reference remains valid. // // The isCommit flag indicates that there is no need to remember that // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69875:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var pPtrPage uintptr at bp+8, 8 // The page that contains a pointer to pDbPage var iDbPage Pgno = (*MemPage)(unsafe.Pointer(pDbPage)).Fpgno var pPager uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPager // var rc int32 at bp, 4 if iDbPage < Pgno(3) { return Xsqlite3CorruptError(tls, 69892) } // Move page iDbPage from its current location to page number iFreePage *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3PagerMovepage(tls, pPager, (*MemPage)(unsafe.Pointer(pDbPage)).FpDbPage, iFreePage, isCommit) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } (*MemPage)(unsafe.Pointer(pDbPage)).Fpgno = iFreePage // If pDbPage was a btree-page, then it may have child pages and/or cells // that point to overflow pages. The pointer map entries for all these // pages need to be changed. // // If pDbPage is an overflow page, then the first 4 bytes may store a // pointer to a subsequent overflow page. If this is the case, then // the pointer map needs to be updated for the subsequent overflow page. if int32(eType) == PTRMAP_BTREE || int32(eType) == PTRMAP_ROOTPAGE { *(*int32)(unsafe.Pointer(bp /* rc */)) = setChildPtrmaps(tls, pDbPage) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } else { var nextOvfl Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pDbPage)).FaData) if nextOvfl != Pgno(0) { ptrmapPut(tls, pBt, nextOvfl, uint8(PTRMAP_OVERFLOW2), iFreePage, bp) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } } // Fix the database pointer on page iPtrPage that pointed at iDbPage so // that it points at iFreePage. Also fix the pointer map entry for // iPtrPage. if int32(eType) != PTRMAP_ROOTPAGE { *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeGetPage(tls, pBt, iPtrPage, bp+8, 0) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */)))).FpDbPage) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */))) return *(*int32)(unsafe.Pointer(bp /* rc */)) } *(*int32)(unsafe.Pointer(bp /* rc */)) = modifyPagePointer(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */)), iDbPage, iFreePage, eType) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPtrPage */))) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { ptrmapPut(tls, pBt, iFreePage, eType, iPtrPage, bp) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Perform a single step of an incremental-vacuum. If successful, return // SQLITE_OK. If there is no work to do (and therefore no point in // calling this function again), return SQLITE_DONE. Or, if an error // occurs, return some other error code. // // More specifically, this function attempts to re-organize the database so // that the last page of the file currently in use is no longer in use. // // Parameter nFin is the number of pages that this database would contain // were this function called until it returns SQLITE_DONE. // // If the bCommit parameter is non-zero, this function assumes that the // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:69969:12: */ bp := tls.Alloc(44) defer tls.Free(44) var nFreeList Pgno // Number of pages still on the free-list var rc int32 if !(ptrmapPageno(tls, pBt, iLastPg) == iLastPg) && iLastPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { // var eType U8 at bp, 1 // var iPtrPage Pgno at bp+4, 4 nFreeList = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) if nFreeList == Pgno(0) { return SQLITE_DONE } rc = ptrmapGet(tls, pBt, iLastPg, bp, bp+4) if rc != SQLITE_OK { return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { return Xsqlite3CorruptError(tls, 69990) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { if bCommit == 0 { // Remove the page from the files free-list. This is not required // if bCommit is non-zero. In that case, the free-list will be // truncated to zero after this function returns, so it doesn't // matter if it still contains some garbage entries. // var iFreePg Pgno at bp+16, 4 // var pFreePg uintptr at bp+8, 8 rc = allocateBtreePage(tls, pBt, bp+8, bp+16, iLastPg, uint8(BTALLOC_EXACT)) if rc != SQLITE_OK { return rc } releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pFreePg */))) } } else { // var iFreePg Pgno at bp+40, 4 // Index of free page to move pLastPg to // var pLastPg uintptr at bp+24, 8 var eMode U8 = U8(BTALLOC_ANY) // Mode parameter for allocateBtreePage() var iNear Pgno = Pgno(0) // nearby parameter for allocateBtreePage() rc = btreeGetPage(tls, pBt, iLastPg, bp+24, 0) if rc != SQLITE_OK { return rc } // If bCommit is zero, this loop runs exactly once and page pLastPg // is swapped with the first free page pulled off the free list. // // On the other hand, if bCommit is greater than zero, then keep // looping until a free-page located within the first nFin pages // of the file is found. if bCommit == 0 { eMode = U8(BTALLOC_LE) iNear = nFin } for __ccgo := true; __ccgo; __ccgo = bCommit != 0 && *(*Pgno)(unsafe.Pointer(bp + 40)) > nFin { // var pFreePg uintptr at bp+32, 8 rc = allocateBtreePage(tls, pBt, bp+32, bp+40, iNear, eMode) if rc != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */))) return rc } releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pFreePg */))) } rc = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */)), *(*U8)(unsafe.Pointer(bp /* eType */)), *(*Pgno)(unsafe.Pointer(bp + 4 /* iPtrPage */)), *(*Pgno)(unsafe.Pointer(bp + 40 /* iFreePg */)), bCommit) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pLastPg */))) if rc != SQLITE_OK { return rc } } } if bCommit == 0 { for __ccgo1 := true; __ccgo1; __ccgo1 = iLastPg == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) || ptrmapPageno(tls, pBt, iLastPg) == iLastPg { iLastPg-- } (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(1) (*BtShared)(unsafe.Pointer(pBt)).FnPage = iLastPg } return SQLITE_OK } // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70065:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value nEntry = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize / U32(5)) nPtrmap = (nFree - nOrig + ptrmapPageno(tls, pBt, nOrig) + Pgno(nEntry)) / Pgno(nEntry) nFin = nOrig - nFree - nPtrmap if nOrig > U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) && nFin < U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { nFin-- } for ptrmapPageno(tls, pBt, nFin) == nFin || nFin == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { nFin-- } return nFin } // A write-transaction must be opened before calling this function. // It performs a single unit of work towards an incremental vacuum. // // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70091:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) { rc = SQLITE_DONE } else { var nOrig Pgno = btreePagecount(tls, pBt) var nFree Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { rc = Xsqlite3CorruptError(tls, 70105) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { invalidateAllOverflowCache(tls, pBt) rc = incrVacuumStep(tls, pBt, nFin, nOrig, 0) } if rc == SQLITE_OK { rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+28, (*BtShared)(unsafe.Pointer(pBt)).FnPage) } } else { rc = SQLITE_DONE } } Xsqlite3BtreeLeave(tls, p) return rc } // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70128:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr var db uintptr pBt = (*Btree)(unsafe.Pointer(p)).FpBt pPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager invalidateAllOverflowCache(tls, pBt) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FincrVacuum) != 0) { var nFin Pgno // Number of pages in database after autovacuuming var nFree Pgno // Number of pages on the freelist initially var nVac Pgno // Number of pages to vacuum var iFree Pgno // The next page to be freed var nOrig Pgno // Database size before freeing nOrig = btreePagecount(tls, pBt) if ptrmapPageno(tls, pBt, nOrig) == nOrig || nOrig == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. return Xsqlite3CorruptError(tls, 70156) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) db = (*Btree)(unsafe.Pointer(p)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacPages != 0 { var iDb int32 for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt == p { break } } nVac = (*struct { f func(*libc.TLS, uintptr, uintptr, U32, U32, U32) uint32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacPages})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, nOrig, nFree, (*BtShared)(unsafe.Pointer(pBt)).FpageSize) if nVac > nFree { nVac = nFree } if nVac == Pgno(0) { return SQLITE_OK } } else { nVac = nFree } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { return Xsqlite3CorruptError(tls, 70183) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) } for iFree = nOrig; iFree > nFin && rc == SQLITE_OK; iFree-- { rc = incrVacuumStep(tls, pBt, nFin, iFree, libc.Bool32(nVac == nFree)) } if (rc == SQLITE_DONE || rc == SQLITE_OK) && nFree > Pgno(0) { rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) if nVac == nFree { Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32, uint32(0)) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36, uint32(0)) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+28, nFin) (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(1) (*BtShared)(unsafe.Pointer(pBt)).FnPage = nFin } if rc != SQLITE_OK { Xsqlite3PagerRollback(tls, pPager) } } return rc } // This routine does the first phase of a two-phase commit. This routine // causes a rollback journal to be created (if it does not already exist) // and populated with enough information so that if a power loss occurs // the database can be restored to its original state by playing back // the journal. Then the contents of the journal are flushed out to // the disk. After the journal is safely on oxide, the changes to the // database are written into the database file and flushed to oxide. // At the end of this call, the rollback journal still exists on the // disk and we are still holding all locks, so the transaction has not // committed. See sqlite3BtreeCommitPhaseTwo() for the second phase of the // commit process. // // This call is a no-op if no write-transaction is currently active on pBt. // // Otherwise, sync the database file for the btree pBt. zSuperJrnl points to // the name of a super-journal file that should be written into the // individual journal file, or is NULL, indicating no super-journal file // (single database transaction). // // When this is called, the super-journal should already have been // created, populated with this journal pointer and synced to disk. // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70239:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { rc = autoVacuumCommit(tls, p) if rc != SQLITE_OK { Xsqlite3BtreeLeave(tls, p) return rc } } if (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate != 0 { Xsqlite3PagerTruncateImage(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*BtShared)(unsafe.Pointer(pBt)).FnPage) } rc = Xsqlite3PagerCommitPhaseOne(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, zSuperJrnl, 0) Xsqlite3BtreeLeave(tls, p) } return rc } // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70266:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb (*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate = U8(0) if int32((*Btree)(unsafe.Pointer(p)).FinTrans) > TRANS_NONE && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1 { // If there are other active statements that belong to this database // handle, downgrade to a read-only transaction. The other statements // may still be reading from the database. downgradeAllSharedCacheTableLocks(tls, p) (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_READ) } else { // If the handle had any kind of transaction open, decrement the // transaction count of the shared btree. If the transaction count // reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused() // call below will unlock the pager. if int32((*Btree)(unsafe.Pointer(p)).FinTrans) != TRANS_NONE { clearAllSharedCacheTableLocks(tls, p) (*BtShared)(unsafe.Pointer(pBt)).FnTransaction-- if 0 == (*BtShared)(unsafe.Pointer(pBt)).FnTransaction { (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_NONE) } } // Set the current transaction state to TRANS_NONE and unlock the // pager if this call closed the only read or write transaction. (*Btree)(unsafe.Pointer(p)).FinTrans = U8(TRANS_NONE) unlockBtreeIfUnused(tls, pBt) } } // Commit the transaction currently in progress. // // This routine implements the second phase of a 2-phase commit. The // sqlite3BtreeCommitPhaseOne() routine does the first phase and should // be invoked prior to calling this routine. The sqlite3BtreeCommitPhaseOne() // routine did all the work of writing information out to disk and flushing the // contents so that they are written onto the disk platter. All this // routine has to do is delete or truncate or zero the header in the // the rollback journal (which causes the transaction to commit) and // drop locks. // // Normally, if an error occurs while the pager layer is attempting to // finalize the underlying journal file, this function returns an error and // the upper layer will attempt a rollback. However, if the second argument // is non-zero then this b-tree transaction is part of a multi-file // transaction. In this case, the transaction has already been committed // (by deleting a super-journal file) and the caller will ignore this // functions return code. So, even if an error occurs in the pager layer, // reset the b-tree objects internal state to indicate that the write // transaction has been closed. This is quite safe, as the pager will have // transitioned to the error state. // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70328:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK } Xsqlite3BtreeEnter(tls, p) // If the handle has a write-transaction open, commit the shared-btrees // transaction and set the shared state to TRANS_READ. if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt rc = Xsqlite3PagerCommitPhaseTwo(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) if rc != SQLITE_OK && bCleanup == 0 { Xsqlite3BtreeLeave(tls, p) return rc } (*Btree)(unsafe.Pointer(p)).FiBDataVersion-- // Compensate for pPager->iDataVersion++; (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_READ) btreeClearHasContent(tls, pBt) } btreeEndTransaction(tls, p) Xsqlite3BtreeLeave(tls, p) return SQLITE_OK } // Do both phases of a commit. func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70360:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) if rc == SQLITE_OK { rc = Xsqlite3BtreeCommitPhaseTwo(tls, p, 0) } Xsqlite3BtreeLeave(tls, p) return rc } // This routine sets the state to CURSOR_FAULT and the error // code to errCode for every cursor on any BtShared that pBtree // references. Or if the writeOnly flag is set to 1, then only // trip write cursors and leave read cursors unchanged. // // Every cursor is a candidate to be tripped, including cursors // that belong to other database connections that happen to be // sharing the cache with pBtree. // // This routine gets called when a rollback occurs. If the writeOnly // flag is true, then only write-cursors need be tripped - read-only // cursors save their current positions so that they may continue // following the rollback. Or, if writeOnly is false, all cursors are // tripped. In general, writeOnly is false if the transaction being // rolled back modified the database schema. In this case b-tree root // pages may be moved or deleted from the database altogether, making // it unsafe for read cursors to continue. // // If the writeOnly flag is true and an error is encountered while // saving the current position of a read-only cursor, all cursors, // including all read-cursors are tripped. // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70397:20: */ var p uintptr var rc int32 = SQLITE_OK if pBtree != 0 { Xsqlite3BtreeEnter(tls, pBtree) for p = (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(pBtree)).FpBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { if writeOnly != 0 && int32((*BtCursor)(unsafe.Pointer(p)).FcurFlags)&BTCF_WriteFlag == 0 { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { rc = saveCursorPosition(tls, p) if rc != SQLITE_OK { Xsqlite3BtreeTripAllCursors(tls, pBtree, rc, 0) break } } } else { Xsqlite3BtreeClearCursor(tls, p) (*BtCursor)(unsafe.Pointer(p)).FeState = U8(CURSOR_FAULT) (*BtCursor)(unsafe.Pointer(p)).FskipNext = errCode } btreeReleaseAllCursorPages(tls, p) } Xsqlite3BtreeLeave(tls, pBtree) } return rc } // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70429:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nPage */)) = int32(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28)) if *(*int32)(unsafe.Pointer(bp)) == 0 { Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp) } (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(*(*int32)(unsafe.Pointer(bp /* nPage */))) } // Rollback the transaction in progress. // // If tripCode is not SQLITE_OK then cursors will be invalidated (tripped). // Only write cursors are tripped if writeOnly is true but all cursors are // tripped if writeOnly is false. Any attempt to use // a tripped cursor will result in an error. // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70448:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // var pPage1 uintptr at bp, 8 Xsqlite3BtreeEnter(tls, p) if tripCode == SQLITE_OK { rc = libc.AssignInt32(&tripCode, saveAllCursors(tls, pBt, uint32(0), uintptr(0))) if rc != 0 { writeOnly = 0 } } else { rc = SQLITE_OK } if tripCode != 0 { var rc2 int32 = Xsqlite3BtreeTripAllCursors(tls, p, tripCode, writeOnly) if rc2 != SQLITE_OK { rc = rc2 } } if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var rc2 int32 rc2 = Xsqlite3PagerRollback(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) if rc2 != SQLITE_OK { rc = rc2 } // The rollback may have destroyed the pPage1->aData value. So // call btreeGetPage() on page 1 again to make // sure pPage1->aData is set correctly. if btreeGetPage(tls, pBt, uint32(1), bp, 0) == SQLITE_OK { btreeSetNPage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) releasePageOne(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage1 */))) } (*BtShared)(unsafe.Pointer(pBt)).FinTransaction = U8(TRANS_READ) btreeClearHasContent(tls, pBt) } btreeEndTransaction(tls, p) Xsqlite3BtreeLeave(tls, p) return rc } // Start a statement subtransaction. The subtransaction can be rolled // back independently of the main transaction. You must start a transaction // before starting a subtransaction. The subtransaction is ended automatically // if the main transaction commits or rolls back. // // Statement subtransactions are used around individual SQL statements // that are contained within a BEGIN...COMMIT block. If a constraint // error occurs within the statement, the effect of that one statement // can be rolled back without having to rollback the entire transaction. // // A statement sub-transaction is implemented as an anonymous savepoint. The // value passed as the second parameter is the total number of savepoints, // including the new anonymous savepoint, open on the B-Tree. i.e. if there // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70513:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) // At the pager level, a statement transaction is a savepoint with // an index greater than all savepoints created explicitly using // SQL statements. It is illegal to open, release or rollback any // such savepoints while the statement transaction savepoint is active. rc = Xsqlite3PagerOpenSavepoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iStatement) Xsqlite3BtreeLeave(tls, p) return rc } // The second argument to this function, op, is always SAVEPOINT_ROLLBACK // or SAVEPOINT_RELEASE. This function either releases or rolls back the // savepoint identified by parameter iSavepoint, depending on the value // of op. // // Normally, iSavepoint is greater than or equal to zero. However, if op is // SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70544:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if op == SAVEPOINT_ROLLBACK { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3PagerSavepoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, op, iSavepoint) } if rc == SQLITE_OK { if iSavepoint < 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_INITIALLY_EMPTY != 0 { (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(0) } rc = newDatabase(tls, pBt) btreeSetNPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FpPage1) // pBt->nPage might be zero if the database was corrupt when // the transaction was started. Otherwise, it must be at least 1. } Xsqlite3BtreeLeave(tls, p) } return rc } // Create a new cursor for the BTree whose root is on the page // iTable. If a read-only cursor is requested, it is assumed that // the caller already has at least a read-only transaction open // on the database already. If a write-cursor is requested, then // the caller is assumed to have an open write transaction. // // If the BTREE_WRCSR bit of wrFlag is clear, then the cursor can only // be used for reading. If the BTREE_WRCSR bit is set, then the cursor // can be used for reading or for writing if other conditions for writing // are also met. These are the conditions that must be met in order // for writing to be allowed: // // 1: The cursor must have been opened with wrFlag containing BTREE_WRCSR // // 2: Other database connections that share the same pager cache // but which are not in the READ_UNCOMMITTED state may not have // cursors open with wrFlag==0 on the same table. Otherwise // the changes made by this write cursor would be visible to // the read cursors in the other database connection. // // 3: The database must be writable (not on read-only media) // // 4: There must be an active transaction. // // The BTREE_FORDELETE bit of wrFlag may optionally be set if BTREE_WRCSR // is set. If FORDELETE is set, that is a hint to the implementation that // this cursor will only be used to seek to and delete entries of an index // as part of a larger DELETE statement. The FORDELETE hint is not used by // this implementation. But in a hypothetical alternative storage engine // in which index entries are automatically deleted when corresponding table // rows are deleted, the FORDELETE flag is a hint that all SEEK and DELETE // operations on this cursor can be no-ops and all READ operations can // return a null row (2-bytes: 0x01 0x00). // // No checking is done to make sure that page iTable really is the // root page of a b-tree. If it is not, then the cursor acquired // will not work correctly. // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70615:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors // The following assert statements verify that if this is a sharable // b-tree database, the connection is holding the required table locks, // and that no other connection has any open cursor that conflicts with // this lock. The iTable<1 term disables the check for corrupt schemas. // Assert that the caller has opened the required transaction. if iTable <= Pgno(1) { if iTable < Pgno(1) { return Xsqlite3CorruptError(tls, 70647) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) } } // Now that no other errors can occur, finish filling in the BtCursor // variables and link the cursor into the BtShared list. (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot = iTable (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(-1) (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo = pKeyInfo (*BtCursor)(unsafe.Pointer(pCur)).FpBtree = p (*BtCursor)(unsafe.Pointer(pCur)).FpBt = pBt (*BtCursor)(unsafe.Pointer(pCur)).FcurFlags = U8(0) // If there are two or more cursors on the same btree, then all such // cursors *must* have the BTCF_Multiple flag set. for pX = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; pX != 0; pX = (*BtCursor)(unsafe.Pointer(pX)).FpNext { if (*BtCursor)(unsafe.Pointer(pX)).FpgnoRoot == iTable { *(*U8)(unsafe.Pointer(pX + 1)) |= U8(BTCF_Multiple) (*BtCursor)(unsafe.Pointer(pCur)).FcurFlags = U8(BTCF_Multiple) } } (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) (*BtCursor)(unsafe.Pointer(pCur)).FpNext = (*BtShared)(unsafe.Pointer(pBt)).FpCursor (*BtShared)(unsafe.Pointer(pBt)).FpCursor = pCur if wrFlag != 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_WriteFlag) (*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags = U8(0) if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace == uintptr(0) { return allocateTempSpace(tls, pBt) } } else { (*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags = U8(PAGER_GET_READONLY) } return SQLITE_OK } func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70682:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) Xsqlite3BtreeLeave(tls, p) return rc } func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70695:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { return btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) } return int32(0) } // Return the size of a BtCursor object in bytes. // // This interfaces is needed so that users of cursors can preallocate // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70717:20: */ return int32((uint64(unsafe.Sizeof(BtCursor{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Initialize memory that will be converted into a BtCursor object. // // The simple approach here would be to memset() the entire object // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70729:21: */ libc.Xmemset(tls, p, 0, uint64(uintptr(0)+32)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70737:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt Xsqlite3BtreeEnter(tls, pBtree) if (*BtShared)(unsafe.Pointer(pBt)).FpCursor == pCur { (*BtShared)(unsafe.Pointer(pBt)).FpCursor = (*BtCursor)(unsafe.Pointer(pCur)).FpNext } else { var pPrev uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpCursor for __ccgo := true; __ccgo; __ccgo = pPrev != 0 { if (*BtCursor)(unsafe.Pointer(pPrev)).FpNext == pCur { (*BtCursor)(unsafe.Pointer(pPrev)).FpNext = (*BtCursor)(unsafe.Pointer(pCur)).FpNext break } pPrev = (*BtCursor)(unsafe.Pointer(pPrev)).FpNext } } btreeReleaseAllCursorPages(tls, pCur) unlockBtreeIfUnused(tls, pBt) Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow) Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) if int32((*BtShared)(unsafe.Pointer(pBt)).FopenFlags)&BTREE_SINGLE != 0 && (*BtShared)(unsafe.Pointer(pBt)).FpCursor == uintptr(0) { // Since the BtShared is not sharable, there is no need to // worry about the missing sqlite3BtreeLeave() call here. Xsqlite3BtreeClose(tls, pBtree) } else { Xsqlite3BtreeLeave(tls, pBtree) } (*BtCursor)(unsafe.Pointer(pCur)).FpBtree = uintptr(0) } return SQLITE_OK } // Make sure the BtCursor* given in the argument has a valid // BtCursor.info structure. If it is not already valid, call // btreeParseCell() to fill it in. // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). func getCellInfo(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70798:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+48) } else { } } func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70817:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } // Return the value of the integer key or "rowid" for a table btree. // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70828:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70839:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70843:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70853:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + (int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1 } // Return the number of bytes of payload for the entry that pCur is // currently pointing to. For table btrees, this will be the amount // of data. For index btrees, this will be the size of the key. // // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70871:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload } // Return an upper bound on the size of any record for the table // that the cursor is pointing into. // // This is an optimization. Everything will still work if this // routine always returns 2147483647 (which is the largest record // that SQLite can handle) or more. But returning a smaller value might // prevent large memory allocations when trying to interpret a // corrupt datrabase. // // The current implementation merely returns the size of the underlying // database file. func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70891:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } // Given the page number of an overflow page in the database (parameter // ovfl), this function finds the page number of the next page in the // linked list of overflow pages. If possible, it uses the auto-vacuum // pointer-map data instead of reading the content of page ovfl to do so. // // If an error occurs an SQLite error code is returned. Otherwise: // // The page number of the next overflow page in the linked list is // written to *pPgnoNext. If page ovfl is the last page in its linked // list, *pPgnoNext is set to zero. // // If ppPage is not NULL, and a reference to the MemPage object corresponding // to page number pOvfl was obtained, then *ppPage is set to point to that // reference. It is the responsibility of the caller to call releasePage() // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70916:12: */ bp := tls.Alloc(16) defer tls.Free(16) var next Pgno = Pgno(0) *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)) = uintptr(0) var rc int32 = SQLITE_OK // Try to find the next page in the overflow list using the // autovacuum pointer-map pages. Guess that the next page in // the overflow list is page number (ovfl+1). If that guess turns // out to be wrong, fall back to loading the data of page // number ovfl to determine the next page number. if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { // var pgno Pgno at bp+4, 4 var iGuess Pgno = ovfl + Pgno(1) // var eType U8 at bp, 1 for ptrmapPageno(tls, pBt, iGuess) == iGuess || iGuess == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { iGuess++ } if iGuess <= btreePagecount(tls, pBt) { rc = ptrmapGet(tls, pBt, iGuess, bp, bp+4) if rc == SQLITE_OK && int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_OVERFLOW2 && *(*Pgno)(unsafe.Pointer(bp + 4)) == ovfl { next = iGuess rc = SQLITE_DONE } } } if rc == SQLITE_OK { rc = btreeGetPage(tls, pBt, ovfl, bp+8, func() int32 { if ppPage == uintptr(0) { return PAGER_GET_READONLY } return 0 }()) if rc == SQLITE_OK { next = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)))).FaData) } } *(*Pgno)(unsafe.Pointer(pPgnoNext)) = next if ppPage != 0 { *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */)) } else { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPage */))) } return func() int32 { if rc == SQLITE_DONE { return SQLITE_OK } return rc }() } // Copy data from a buffer to a page, or from a page to a buffer. // // pPayload is a pointer to data stored on database page pDbPage. // If argument eOp is false, then nByte bytes of data are copied // from pPayload to the buffer pointed at by pBuf. If eOp is true, // then sqlite3PagerWrite() is called on pDbPage and nByte bytes // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:70984:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) if rc != SQLITE_OK { return rc } libc.Xmemcpy(tls, pPayload, pBuf, uint64(nByte)) } else { // Copy data from page to buffer (a read operation) libc.Xmemcpy(tls, pBuf, pPayload, uint64(nByte)) } return SQLITE_OK } // This function is used to read or overwrite payload information // for the entry that the pCur cursor is pointing to. The eOp // argument is interpreted as follows: // // 0: The operation is a read. Populate the overflow cache. // 1: The operation is a write. Populate the overflow cache. // // A total of "amt" bytes are read or written beginning at "offset". // Data is read to or from the buffer pBuf. // // The content being read or written might appear on the main page // or be scattered out on multiple overflow pages. // // If the current cursor entry uses one or more overflow pages // this function may allocate space for and lazily populate // the overflow page-list cache array (BtCursor.aOverflow). // Subsequent calls use this cache to make seeking to the supplied offset // more efficient. // // Once an overflow page-list cache has been allocated, it must be // invalidated if some other cursor writes to the same table, or if // the cursor is moved to a different row. Additionally, in auto-vacuum // mode, the following events may invalidate an overflow page-list cache. // // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71034:12: */ bp := tls.Alloc(16) defer tls.Free(16) var aPayload uintptr var rc int32 = SQLITE_OK var iIdx int32 = 0 var pPage uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Btree page of current entry var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { return Xsqlite3CorruptError(tls, 71054) } getCellInfo(tls, pCur) aPayload = (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload if Uptr((int64(aPayload)-int64((*MemPage)(unsafe.Pointer(pPage)).FaData))/1) > Uptr((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) { // Trying to read or write past the end of the data is an error. The // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems return Xsqlite3CorruptError(tls, 71069) } // Check if data must be read/written to/from the btree page itself. if offset < U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { var a int32 = int32(amt) if U32(a)+offset > U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) { a = int32(U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) - offset) } rc = copyPayload(tls, aPayload+uintptr(offset), pBuf, a, eOp, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) offset = U32(0) pBuf += uintptr(a) amt = amt - U32(a) } else { offset = offset - U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) } if rc == SQLITE_OK && amt > U32(0) { var ovflSize U32 = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) // Bytes content per ovfl page // var nextPage Pgno at bp, 4 *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = Xsqlite3Get4byte(tls, aPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) // If the BtCursor.aOverflow[] has not been allocated, allocate it now. // // The aOverflow[] array is sized at one entry for each overflow page // in the overflow chain. The page number of the first overflow page is // stored in aOverflow[0], etc. A value of 0 in the aOverflow[] array // means "not yet known" (the cache is lazily populated). if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidOvfl == 0 { var nOvfl int32 = int32(((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload - U32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) + ovflSize - U32(1)) / ovflSize) if (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow == uintptr(0) || nOvfl*int32(unsafe.Sizeof(Pgno(0))) > Xsqlite3MallocSize(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow) { var aNew uintptr = Xsqlite3Realloc(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow, uint64(nOvfl*2)*uint64(unsafe.Sizeof(Pgno(0)))) if aNew == uintptr(0) { return SQLITE_NOMEM } else { (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow = aNew } } libc.Xmemset(tls, (*BtCursor)(unsafe.Pointer(pCur)).FaOverflow, 0, uint64(nOvfl)*uint64(unsafe.Sizeof(Pgno(0)))) *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidOvfl) } else { // If the overflow page-list cache has been allocated and the // entry for the first required overflow page is valid, skip // directly to it. if *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(offset/ovflSize)*4)) != 0 { iIdx = int32(offset / ovflSize) *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) offset = offset % ovflSize } } for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { return Xsqlite3CorruptError(tls, 71131) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) if offset >= ovflSize { // The only reason to read this page is to obtain the page // number for the next page in the overflow chain. The page // data is not required. So first try to lookup the overflow // page-list cache, if any, then fall back to the getOverflowPage() // function. if *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) != 0 { *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) } else { rc = getOverflowPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), uintptr(0), bp) } offset = offset - ovflSize } else { // Need to read this page properly. It contains some of the // range of data that is being read (eOp==0) or written (eOp!=0). var a int32 = int32(amt) if U32(a)+offset > ovflSize { a = int32(ovflSize - offset) } { // var pDbPage uintptr at bp+8, 8 rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), bp+8, func() int32 { if eOp == 0 { return PAGER_GET_READONLY } return 0 }()) if rc == SQLITE_OK { aPayload = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = Xsqlite3Get4byte(tls, aPayload) rc = copyPayload(tls, aPayload+uintptr(offset+U32(4)), pBuf, a, eOp, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pDbPage */))) offset = U32(0) } } amt = amt - U32(a) if amt == U32(0) { return rc } pBuf += uintptr(a) } if rc != 0 { break } iIdx++ } } if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely return Xsqlite3CorruptError(tls, 71216) } return rc } // Read part of the payload for the row at which that cursor pCur is currently // pointing. "amt" bytes will be transferred into pBuf[]. The transfer // begins at "offset". // // pCur can be pointing to either a table or an index b-tree. // If pointing to a table btree, then the content section is read. If // pCur is pointing to an index b-tree then the key section is read. // // For sqlite3BtreePayload(), the caller must ensure that pCur is pointing // to a valid row in the table. For sqlite3BtreePayloadChecked(), the // cursor might be invalid or might need to be restored before being read. // // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71238:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71251:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT } rc = btreeRestoreCursorPosition(tls, pCur) if rc != 0 { return rc } return accessPayload(tls, pCur, offset, amt, pBuf, 0) } func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71265:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) } else { return accessPayloadChecked(tls, pCur, offset, amt, pBuf) } return int32(0) } // Return a pointer to payload information from the entry that the // pCur cursor is pointing to. The pointer is to the beginning of // the key if index btrees (pPage->intKey==0) and is the data for // table btrees (pPage->intKey==1). The number of bytes of available // key/data is written into *pAmt. If *pAmt==0, then the value // returned will not be a valid pointer. // // This routine is an optimization. It is common for the entire key // and data to fit on the local page and for there to be no overflow // pages. When that is so, this routine can be used to access the // key and data without making a copy. If the key and/or data spills // onto overflow pages, then accessPayload() must be used to reassemble // the key/data and copy it into a preallocated buffer. // // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71294:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) if amt > int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd)-int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload))/1) { // There is too little space on the page for the expected amount // of local content. Database must be corrupt. amt = func() int32 { if 0 > int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd)-int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload))/1) { return 0 } return int32((int64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaDataEnd) - int64((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)) / 1) }() } *(*U32)(unsafe.Pointer(pAmt)) = U32(amt) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload } // For the entry that cursor pCur is point to, return as // many bytes of the key or data as are available on the local // b-tree page. Write the number of available bytes into *pAmt. // // The pointer returned is ephemeral. The key/data may move // or be destroyed on the next call to any Btree routine, // including calls from other threads against the same cache. // Hence, a mutex on the BtShared should be held prior to calling // this routine. // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71333:27: */ return fetchPayload(tls, pCur, pAmt) } // Move the cursor down to a new child page. The newPgno argument is the // page number of the child page to move to. // // This function returns SQLITE_CORRUPT if the page-header flags field of // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71347:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { return Xsqlite3CorruptError(tls, 71355) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) *(*U16)(unsafe.Pointer(pCur + 88 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*2)) = (*BtCursor)(unsafe.Pointer(pCur)).Fix *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).FiPage++ return getAndInitPage(tls, pBt, newPgno, pCur+136, pCur, int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) } // Move the cursor up to the parent page. // // pCur->idx is set to the cell index that contains the pointer // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. func moveToParent(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71396:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) (*BtCursor)(unsafe.Pointer(pCur)).Fix = *(*U16)(unsafe.Pointer(pCur + 88 + uintptr(int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)-1)*2)) pLeaf = (*BtCursor)(unsafe.Pointer(pCur)).FpPage (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(libc.PreDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1))*8)) releasePageNotNull(tls, pLeaf) } // Move the cursor to point to the root page of its b-tree structure. // // If the table has a virtual root page, then the cursor is moved to point // to the virtual root page instead of the actual root page. A table has a // virtual root page when the actual root page contains no cells and a // single child page. This can only happen with the table rooted at page 1. // // If the b-tree structure is empty, the cursor state is set to // CURSOR_INVALID and this routine returns SQLITE_EMPTY. Otherwise, // the cursor is set to point to the first cell located on the root // (or virtual root) page and the cursor state is set to CURSOR_VALID. // // If this function returns successfully, it may be assumed that the // page-header flags indicate that the [virtual] root-page is the expected // kind of b-tree page (i.e. if when opening the cursor the caller did not // specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D, // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71437:12: */ var pRoot uintptr var rc int32 var subpage Pgno rc = SQLITE_OK if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0) { goto __1 } if !((*BtCursor)(unsafe.Pointer(pCur)).FiPage != 0) { goto __3 } releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) __4: if !(libc.PreDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1) != 0) { goto __5 } releasePageNotNull(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8))) goto __4 __5: ; pRoot = libc.AssignPtrUintptr(pCur+136, *(*uintptr)(unsafe.Pointer(pCur + 144))) goto skip_init __3: ; goto __2 __1: if !((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot == Pgno(0)) { goto __6 } (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) return SQLITE_EMPTY goto __7 __6: ; if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK) { goto __8 } if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_FAULT) { goto __9 } return (*BtCursor)(unsafe.Pointer(pCur)).FskipNext __9: ; Xsqlite3BtreeClearCursor(tls, pCur) __8: ; rc = getAndInitPage(tls, (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FpBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur+136, uintptr(0), int32((*BtCursor)(unsafe.Pointer(pCur)).FcurPagerFlags)) if !(rc != SQLITE_OK) { goto __10 } (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) return rc __10: ; (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(0) (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey = (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FintKey __7: ; __2: ; pRoot = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // If pCur->pKeyInfo is not NULL, then the caller that opened this cursor // expected to open it on an index b-tree. Otherwise, if pKeyInfo is // NULL, the caller expects a table b-tree. If this is not the case, // return an SQLITE_CORRUPT error. // // Earlier versions of SQLite assumed that this test could not fail // if the root page was already loaded when this function was called (i.e. // if pCur->iPage>=0). But this is not so if the database is corrupted // in such a way that page pRoot is linked into a second b-tree table // (or the freelist). if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } return Xsqlite3CorruptError(tls, 71493) __11: ; skip_init: (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidNKey | BTCF_ValidOvfl)) if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FnCell) > 0) { goto __12 } (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) goto __13 __12: if !!(int32((*MemPage)(unsafe.Pointer(pRoot)).Fleaf) != 0) { goto __14 } if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } return Xsqlite3CorruptError(tls, 71505) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) rc = moveToChild(tls, pCur, subpage) goto __15 __14: (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) rc = SQLITE_EMPTY __15: ; __13: ; return rc } // Move the cursor down to the left-most leaf entry beneath the // entry to which it is currently pointing. // // The left-most leaf is the one with the smallest key - the first // in ascending order. func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71523:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr for rc == SQLITE_OK && !(int32((*MemPage)(unsafe.Pointer(libc.AssignUintptr(&pPage, (*BtCursor)(unsafe.Pointer(pCur)).FpPage))).Fleaf) != 0) { pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*int32((*BtCursor)(unsafe.Pointer(pCur)).Fix)))))))) rc = moveToChild(tls, pCur, pgno) } return rc } // Move the cursor down to the right-most leaf entry beneath the // page to which it is currently pointing. Notice the difference // between moveToLeftmost() and moveToRightmost(). moveToLeftmost() // finds the left-most entry beneath the *entry* whereas moveToRightmost() // finds the right-most entry beneath the *page*. // // The right-most entry is the one with the largest key - the last // key in ascending order. func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71548:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) for !(int32((*MemPage)(unsafe.Pointer(libc.AssignUintptr(&pPage, (*BtCursor)(unsafe.Pointer(pCur)).FpPage))).Fleaf) != 0) { pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) (*BtCursor)(unsafe.Pointer(pCur)).Fix = (*MemPage)(unsafe.Pointer(pPage)).FnCell rc = moveToChild(tls, pCur, pgno) if rc != 0 { return rc } } (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1) return SQLITE_OK } // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71571:20: */ var rc int32 rc = moveToRoot(tls, pCur) if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(pRes)) = 0 rc = moveToLeftmost(tls, pCur) } else if rc == SQLITE_EMPTY { *(*int32)(unsafe.Pointer(pRes)) = 1 rc = SQLITE_OK } return rc } // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71593:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. if CURSOR_VALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0 { *(*int32)(unsafe.Pointer(pRes)) = 0 return SQLITE_OK } rc = moveToRoot(tls, pCur) if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(pRes)) = 0 rc = moveToRightmost(tls, pCur) if rc == SQLITE_OK { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_AtLast) } else { *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast)) } } else if rc == SQLITE_EMPTY { *(*int32)(unsafe.Pointer(pRes)) = 1 rc = SQLITE_OK } return rc } // Move the cursor so that it points to an entry in a table (a.k.a INTKEY) // table near the key intKey. Return a success code. // // If an exact match is not found, then the cursor is always // left pointing at a leaf page which would hold the entry if it // were present. The cursor might point to an entry that comes // before or after the key. // // An integer is written into *pRes which is the result of // comparing the key with the entry to which the cursor is // pointing. The meaning of the integer written into // *pRes is as follows: // // *pRes<0 The cursor is left pointing at an entry that // is smaller than intKey or if the table is empty // and the cursor is therefore left point to nothing. // // *pRes==0 The cursor is left pointing at an entry that // exactly matches intKey. // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71658:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var nCellKey I64 at bp, 8 var lwr int32 var upr int32 var idx int32 var c int32 var chldPg Pgno var pPage uintptr var pCell uintptr // If the cursor is already positioned at the point we are trying // to move to, then just return without doing any work if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID && int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidNKey != 0) { goto __1 } if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == intKey) { goto __2 } *(*int32)(unsafe.Pointer(pRes)) = 0 return SQLITE_OK __2: ; if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey < intKey) { goto __3 } if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_AtLast != 0) { goto __4 } *(*int32)(unsafe.Pointer(pRes)) = -1 return SQLITE_OK __4: ; // If the requested key is one more than the previous key, then // try to get there using sqlite3BtreeNext() rather than a full // binary search. This is an optimization only. The correct answer // is still obtained without this case, only a little more slowely if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey+int64(1) == intKey) { goto __5 } *(*int32)(unsafe.Pointer(pRes)) = 0 rc = Xsqlite3BtreeNext(tls, pCur, 0) if !(rc == SQLITE_OK) { goto __6 } getCellInfo(tls, pCur) if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == intKey) { goto __8 } return SQLITE_OK __8: ; goto __7 __6: if !(rc != SQLITE_DONE) { goto __9 } return rc __9: ; __7: ; __5: ; __3: ; __1: ; rc = moveToRoot(tls, pCur) if !(rc != 0) { goto __10 } if !(rc == SQLITE_EMPTY) { goto __11 } *(*int32)(unsafe.Pointer(pRes)) = -1 return SQLITE_OK __11: ; return rc __10: ; __12: pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Pointer to current cell in pPage // pPage->nCell must be greater than zero. If this is the root-page // the cursor would have been INVALID above and this for(;;) loop // not run. If this is not the root-page, then the moveToChild() routine // would have already detected db corruption. Similarly, pPage must // be the right kind (index or table) of b-tree page. Otherwise // a moveToChild() or moveToRoot() call would have detected corruption. lwr = 0 upr = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1 idx = upr >> (1 - biasRight) // idx = biasRight ? upr : (lwr+upr)/2; __15: pCell = (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx)))))) if !((*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf != 0) { goto __18 } __19: if !(0x80 <= int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&pCell, 1))))) { goto __20 } if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } return Xsqlite3CorruptError(tls, 71747) __21: ; goto __19 __20: ; __18: ; Xsqlite3GetVarint(tls, pCell, bp) if !(*(*I64)(unsafe.Pointer(bp)) < intKey) { goto __22 } lwr = idx + 1 if !(lwr > upr) { goto __24 } c = -1 goto __17 __24: ; goto __23 __22: if !(*(*I64)(unsafe.Pointer(bp)) > intKey) { goto __25 } upr = idx - 1 if !(lwr > upr) { goto __27 } c = +1 goto __17 __27: ; goto __26 __25: ; (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) if !!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { goto __28 } lwr = idx goto moveto_table_next_layer goto __29 __28: *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey = *(*I64)(unsafe.Pointer(bp /* nCellKey */)) (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*int32)(unsafe.Pointer(pRes)) = 0 return SQLITE_OK __29: ; __26: ; __23: ; idx = (lwr + upr) >> 1 // idx = (lwr+upr)/2; goto __16 __16: goto __15 goto __17 __17: ; if !((*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { goto __30 } (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) *(*int32)(unsafe.Pointer(pRes)) = c rc = SQLITE_OK goto moveto_table_finish __30: ; moveto_table_next_layer: if !(lwr >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) goto __32 __31: chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr))))))) __32: ; (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(lwr) rc = moveToChild(tls, pCur, chldPg) if !(rc != 0) { goto __33 } goto __14 __33: ; goto __13 __13: goto __12 goto __14 __14: ; moveto_table_finish: (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) return rc } // Move the cursor so that it points to an entry in an index table // near the key pIdxKey. Return a success code. // // If an exact match is not found, then the cursor is always // left pointing at a leaf page which would hold the entry if it // were present. The cursor might point to an entry that comes // before or after the key. // // An integer is written into *pRes which is the result of // comparing the key with the entry to which the cursor is // pointing. The meaning of the integer written into // *pRes is as follows: // // *pRes<0 The cursor is left pointing at an entry that // is smaller than pIdxKey or if the table is empty // and the cursor is therefore left point to nothing. // // *pRes==0 The cursor is left pointing at an entry that // exactly matches pIdxKey. // // *pRes>0 The cursor is left pointing at an entry that // is larger than pIdxKey. // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71826:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In // this case the whole cell needs to be parsed, a buffer allocated // and accessPayload() used to retrieve the record into the // buffer before VdbeRecordCompare() can be called. // // If the record is corrupt, the xRecordCompare routine may read // up to two varints past the end of the buffer. An extra 18 // bytes of padding is allocated at the end of the buffer in // case this happens. var pCellKey uintptr var pCellBody uintptr var nOverrun int32 var nCell int32 var lwr int32 var upr int32 var idx int32 var c int32 var chldPg Pgno var pPage uintptr var pCell uintptr xRecordCompare = Xsqlite3VdbeFindCompare(tls, pIdxKey) (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode = U8(0) rc = moveToRoot(tls, pCur) if !(rc != 0) { goto __1 } if !(rc == SQLITE_EMPTY) { goto __2 } *(*int32)(unsafe.Pointer(pRes)) = -1 return SQLITE_OK __2: ; return rc __1: ; __3: pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Pointer to current cell in pPage // pPage->nCell must be greater than zero. If this is the root-page // the cursor would have been INVALID above and this for(;;) loop // not run. If this is not the root-page, then the moveToChild() routine // would have already detected db corruption. Similarly, pPage must // be the right kind (index or table) of b-tree page. Otherwise // a moveToChild() or moveToRoot() call would have detected corruption. lwr = 0 upr = int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1 idx = upr >> 1 // idx = (lwr+upr)/2; __6: // Size of the pCell cell in bytes pCell = (*MemPage)(unsafe.Pointer(pPage)).FaDataOfst + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx)))))) // The maximum supported page-size is 65536 bytes. This means that // the maximum number of record bytes stored on an index B-Tree // page is less than 16384 bytes and may be stored as a 2-byte // varint. This information is used to attempt to avoid parsing // the entire cell by checking for the cases where the record is // stored entirely within the b-tree page by inspecting the first // 2 bytes of the cell. nCell = int32(*(*U8)(unsafe.Pointer(pCell))) if !(nCell <= int32((*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload)) { goto __9 } // This branch runs if the record-size field of the cell is a // single byte varint and the record fits entirely on the main // b-tree page. c = (*struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, pCell+1, pIdxKey) goto __10 __9: if !(!(int32(*(*U8)(unsafe.Pointer(pCell + 1)))&0x80 != 0) && libc.AssignInt32(&nCell, nCell&0x7f<<7+int32(*(*U8)(unsafe.Pointer(pCell + 1)))) <= int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { goto __11 } // The record-size field is a 2 byte varint and the record // fits entirely on the main b-tree page. c = (*struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xRecordCompare})).f(tls, nCell, pCell+2, pIdxKey) goto __12 __11: pCellBody = pCell - uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) nOverrun = 18 // Size of the overrun padding (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCellBody, pCur+48 /* &.info */) nCell = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey) // True if key size is 2^32 or more // Invalid key size: 0x80 0x80 0x00 // Invalid key size: 0x80 0x80 0x01 // Minimum legal index key size if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } rc = Xsqlite3CorruptError(tls, 71928) goto moveto_index_finish __13: ; pCellKey = Xsqlite3Malloc(tls, uint64(nCell+nOverrun)) if !(pCellKey == uintptr(0)) { goto __14 } rc = SQLITE_NOMEM goto moveto_index_finish __14: ; (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) rc = accessPayload(tls, pCur, uint32(0), uint32(nCell), pCellKey, 0) libc.Xmemset(tls, pCellKey+uintptr(nCell), 0, uint64(nOverrun)) // Fix uninit warnings *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) if !(rc != 0) { goto __15 } Xsqlite3_free(tls, pCellKey) goto moveto_index_finish __15: ; c = Xsqlite3VdbeRecordCompare(tls, nCell, pCellKey, pIdxKey) Xsqlite3_free(tls, pCellKey) __12: ; __10: ; if !(c < 0) { goto __16 } lwr = idx + 1 goto __17 __16: if !(c > 0) { goto __18 } upr = idx - 1 goto __19 __18: ; *(*int32)(unsafe.Pointer(pRes)) = 0 rc = SQLITE_OK (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } rc = Xsqlite3CorruptError(tls, 71960) __20: ; goto moveto_index_finish __19: ; __17: ; if !(lwr > upr) { goto __21 } goto __8 __21: ; idx = (lwr + upr) >> 1 // idx = (lwr+upr)/2 goto __7 __7: goto __6 goto __8 __8: ; if !((*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0) { goto __22 } (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(idx) *(*int32)(unsafe.Pointer(pRes)) = c rc = SQLITE_OK goto moveto_index_finish __22: ; if !(lwr >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __23 } chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) goto __24 __23: chldPg = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*lwr))))))) __24: ; (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(lwr) rc = moveToChild(tls, pCur, chldPg) if !(rc != 0) { goto __25 } goto __5 __25: ; goto __4 __4: goto __3 goto __5 __5: ; moveto_index_finish: (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) return rc } // Return TRUE if the cursor is not pointing at an entry of the table. // // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:71999:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. return libc.Bool32(CURSOR_VALID != int32((*BtCursor)(unsafe.Pointer(pCur)).FeState)) } // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72012:20: */ var n I64 var i U8 // Currently this interface is only called by the OP_IfSmaller // opcode, and it that case the cursor will always be valid and // will always point to a leaf node. if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { return int64(-1) } if int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fleaf) == 0 { return int64(-1) } n = I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) for i = U8(0); int32(i) < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { n = n * I64((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(i)*8)))).FnCell) } return n } // Advance the cursor to the next entry in the database. // Return value: // // SQLITE_OK success // SQLITE_DONE cursor is already pointing at the last element // otherwise some kind of error occurred // // The main entry point is sqlite3BtreeNext(). That routine is optimized // for the common case of merely incrementing the cell counter BtCursor.aiIdx // to the next cell on the current page. The (slower) btreeNext() helper // routine is called when it is necessary to move to a different page or // to restore the cursor. // // If bit 0x01 of the F argument in sqlite3BtreeNext(C,F) is 1, then the // cursor corresponds to an SQL index and this routine could have been // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72052:28: */ var rc int32 var idx int32 var pPage uintptr if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { rc = func() int32 { if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { return btreeRestoreCursorPosition(tls, pCur) } return SQLITE_OK }() if rc != SQLITE_OK { return rc } if CURSOR_INVALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { return SQLITE_DONE } if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_SKIPNEXT { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext > 0 { return SQLITE_OK } } } pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) if !(int32((*MemPage)(unsafe.Pointer(pPage)).FisInit) != 0) || Xsqlite3FaultSim(tls, 412) != 0 { // The only known way for this to happen is for there to be a // recursive SQL function that does a DELETE operation as part of a // SELECT which deletes content out from under an active cursor // in a corrupt database file where the table being DELETE-ed from // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. return Xsqlite3CorruptError(tls, 72083) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8))) if rc != 0 { return rc } return moveToLeftmost(tls, pCur) } for __ccgo := true; __ccgo; __ccgo = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) return SQLITE_DONE } moveToParent(tls, pCur) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage } if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { return Xsqlite3BtreeNext(tls, pCur, 0) } else { return SQLITE_OK } } if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { return SQLITE_OK } else { return moveToLeftmost(tls, pCur) } return int32(0) } func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72112:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { return btreeNext(tls, pCur) } pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { (*BtCursor)(unsafe.Pointer(pCur)).Fix-- return btreeNext(tls, pCur) } if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { return SQLITE_OK } else { return moveToLeftmost(tls, pCur) } return int32(0) } // Step the cursor to the back to the previous entry in the database. // Return values: // // SQLITE_OK success // SQLITE_DONE the cursor is already on the first element of the table // otherwise some kind of error occurred // // The main entry point is sqlite3BtreePrevious(). That routine is optimized // for the common case of merely decrementing the cell counter BtCursor.aiIdx // to the previous cell on the current page. The (slower) btreePrevious() // helper routine is called when it is necessary to move to a different page // or to restore the cursor. // // If bit 0x01 of the F argument to sqlite3BtreePrevious(C,F) is 1, then // the cursor corresponds to an SQL index and this routine could have been // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72152:28: */ var rc int32 var pPage uintptr if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { rc = func() int32 { if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { return btreeRestoreCursorPosition(tls, pCur) } return SQLITE_OK }() if rc != SQLITE_OK { return rc } if CURSOR_INVALID == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { return SQLITE_DONE } if CURSOR_SKIPNEXT == int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_VALID) if (*BtCursor)(unsafe.Pointer(pCur)).FskipNext < 0 { return SQLITE_OK } } } pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var idx int32 = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx)))))))) if rc != 0 { return rc } rc = moveToRightmost(tls, pCur) } else { for int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) == 0 { if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) return SQLITE_DONE } moveToParent(tls, pCur) } (*BtCursor)(unsafe.Pointer(pCur)).Fix-- pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 && !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { rc = Xsqlite3BtreePrevious(tls, pCur, 0) } else { rc = SQLITE_OK } } return rc } func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72201:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) == 0 || int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fleaf) == 0 { return btreePrevious(tls, pCur) } (*BtCursor)(unsafe.Pointer(pCur)).Fix-- return SQLITE_OK } // Allocate a new page from the database file. // // The new page is marked as dirty. (In other words, sqlite3PagerWrite() // has already been called on the new page.) The new page has also // been referenced and the calling routine is responsible for calling // sqlite3PagerUnref() on the new page when it is done. // // SQLITE_OK is returned on success. Any other return value indicates // an error. *ppPage is set to NULL in the event of an error. // // If the "nearby" parameter is not 0, then an effort is made to // locate a page close to the page number "nearby". This can be used in an // attempt to keep related pages close to each other in the database file, // which in turn can make database access faster. // // If the eMode parameter is BTALLOC_EXACT and the nearby page exists // anywhere on the free-list, then it is guaranteed to be returned. If // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72239:12: */ bp := tls.Alloc(32) defer tls.Free(32) var pPage1 uintptr var rc int32 var n U32 // Number of pages on the freelist var k U32 // Number of leaves on the trunk of the freelist // var pTrunk uintptr at bp+8, 8 var pPrevTrunk uintptr var mxPage Pgno // var eType U8 at bp, 1 // The trunk page is required by the caller but it contains // pointers to free-list leaves. The first leaf becomes a trunk // page in this case. // var pNewTrunk uintptr at bp+16, 8 var iNewTrunk Pgno var d2 int32 var dist int32 var i U32 var noContent int32 // Extract a leaf from the trunk var closest U32 var iPage Pgno var aData uintptr // There are pages on the freelist. Reuse one of those pages. var iTrunk Pgno var searchList U8 // If the free-list must be searched for 'nearby' var nSearch U32 // If *pPgno refers to a pointer-map page, allocate two new pages // at the end of the file instead of one. The first allocated page // becomes a new pointer-map page, the second is used by the caller. // var pPg uintptr at bp+24, 8 // There are no pages on the freelist, so append a new page to the // database image. // // Normally, new pages allocated by this block can be requested from the // pager layer with the 'no-content' flag set. This prevents the pager // from trying to read the pages content from disk. However, if the // current transaction has already run one or more incremental-vacuum // steps, then the page we are about to allocate may contain content // that is required in the event of a rollback. In this case, do // not set the no-content flag. This causes the pager to load and journal // the current page content before overwriting it. // // Note that the pager will not actually attempt to load or journal // content for any page that really does lie past the end of the database // file on disk. So the effects of disabling the no-content optimization // here are confined to those pages that lie between the end of the // database image and the end of the database file. var bNoContent int32 *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) pPrevTrunk = uintptr(0) // Total size of the database file pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 mxPage = btreePagecount(tls, pBt) // EVIDENCE-OF: R-05119-02637 The 4-byte big-endian integer at offset 36 // stores stores the total number of pages on the freelist. n = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36) if !(n >= mxPage) { goto __1 } return Xsqlite3CorruptError(tls, 72263) __1: ; if !(n > U32(0)) { goto __2 } searchList = U8(0) // If the free-list must be searched for 'nearby' nSearch = U32(0) // Count of the number of search attempts // If eMode==BTALLOC_EXACT and a query of the pointer-map // shows that the page 'nearby' is somewhere on the free-list, then // the entire-list will be searched for that page. if !(int32(eMode) == BTALLOC_EXACT) { goto __4 } if !(nearby <= mxPage) { goto __6 } rc = ptrmapGet(tls, pBt, nearby, bp, uintptr(0)) if !(rc != 0) { goto __7 } return rc __7: ; if !(int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE) { goto __8 } searchList = U8(1) __8: ; __6: ; goto __5 __4: if !(int32(eMode) == BTALLOC_LE) { goto __9 } searchList = U8(1) __9: ; __5: ; // Decrement the free-list count by 1. Set iTrunk to the index of the // first free-list trunk page. iPrevTrunk is initially 1. rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) if !(rc != 0) { goto __10 } return rc __10: ; Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36, n-U32(1)) // The code within this loop is run only once if the 'searchList' variable // is not true. Otherwise, it runs once for each trunk-page on the // free-list until the page 'nearby' is located (eMode==BTALLOC_EXACT) // or until a page less than 'nearby' is located (eMode==BTALLOC_LT) __11: pPrevTrunk = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) if !(pPrevTrunk != 0) { goto __14 } // EVIDENCE-OF: R-01506-11053 The first integer on a freelist trunk page // is the page number of the next freelist trunk page in the list or // zero if this is the last freelist trunk page. iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData) goto __15 __14: // EVIDENCE-OF: R-59841-13798 The 4-byte big-endian integer at offset 32 // stores the page number of the first page of the freelist, or zero if // the freelist is empty. iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32) __15: ; if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } rc = Xsqlite3CorruptError(tls, 72319) goto __17 __16: rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+8, 0) __17: ; if !(rc != 0) { goto __18 } *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) goto end_allocate_page __18: ; // EVIDENCE-OF: R-13523-04394 The second integer on a freelist trunk page // is the number of leaf page pointers to follow. k = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+4) if !(k == U32(0) && !(searchList != 0)) { goto __19 } // The trunk has no leaves and the list is not being searched. // So extract the trunk page itself and use it as the newly // allocated page rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) if !(rc != 0) { goto __21 } goto end_allocate_page __21: ; *(*Pgno)(unsafe.Pointer(pPgno)) = iTrunk libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) goto __20 __19: if !(k > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __22 } // Value of k is out of range. Database corruption rc = Xsqlite3CorruptError(tls, 72348) goto end_allocate_page goto __23 __22: if !(searchList != 0 && (nearby == iTrunk || iTrunk < nearby && int32(eMode) == BTALLOC_LE)) { goto __24 } // The list is being searched and this trunk page is the page // to allocate, regardless of whether it has leaves. *(*Pgno)(unsafe.Pointer(pPgno)) = iTrunk *(*uintptr)(unsafe.Pointer(ppPage)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) searchList = U8(0) rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) if !(rc != 0) { goto __26 } goto end_allocate_page __26: ; if !(k == U32(0)) { goto __27 } if !!(pPrevTrunk != 0) { goto __29 } libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) goto __30 __29: rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FpDbPage) if !(rc != SQLITE_OK) { goto __31 } goto end_allocate_page __31: ; libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) __30: ; goto __28 __27: iNewTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+8) if !(iNewTrunk > mxPage) { goto __32 } rc = Xsqlite3CorruptError(tls, 72382) goto end_allocate_page __32: ; rc = btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+16, 0) if !(rc != SQLITE_OK) { goto __33 } goto end_allocate_page __33: ; rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */)))).FpDbPage) if !(rc != SQLITE_OK) { goto __34 } releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */))) goto end_allocate_page __34: ; libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData, uint64(4)) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4, k-U32(1)) libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+8, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))).FaData+12, uint64((k-U32(1))*U32(4))) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pNewTrunk */))) if !!(pPrevTrunk != 0) { goto __35 } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, iNewTrunk) goto __36 __35: rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FpDbPage) if !(rc != 0) { goto __37 } goto end_allocate_page __37: ; Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPrevTrunk)).FaData, iNewTrunk) __36: ; __28: ; *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)) = uintptr(0) goto __25 __24: if !(k > U32(0)) { goto __38 } aData = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FaData if !(nearby > Pgno(0)) { goto __39 } closest = U32(0) if !(int32(eMode) == BTALLOC_LE) { goto __41 } i = U32(0) __43: if !(i < k) { goto __45 } iPage = Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+i*U32(4))) if !(iPage <= nearby) { goto __46 } closest = i goto __45 __46: ; goto __44 __44: i++ goto __43 goto __45 __45: ; goto __42 __41: dist = Xsqlite3AbsInt32(tls, int32(Xsqlite3Get4byte(tls, aData+8)-nearby)) i = U32(1) __47: if !(i < k) { goto __49 } d2 = Xsqlite3AbsInt32(tls, int32(Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+i*U32(4)))-nearby)) if !(d2 < dist) { goto __50 } closest = i dist = d2 __50: ; goto __48 __48: i++ goto __47 goto __49 __49: ; __42: ; goto __40 __39: closest = U32(0) __40: ; iPage = Xsqlite3Get4byte(tls, aData+uintptr(U32(8)+closest*U32(4))) if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } rc = Xsqlite3CorruptError(tls, 72447) goto end_allocate_page __51: ; if !(!(searchList != 0) || (iPage == nearby || iPage < nearby && int32(eMode) == BTALLOC_LE)) { goto __52 } *(*Pgno)(unsafe.Pointer(pPgno)) = iPage rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */)))).FpDbPage) if !(rc != 0) { goto __53 } goto end_allocate_page __53: ; if !(closest < k-U32(1)) { goto __54 } libc.Xmemcpy(tls, aData+uintptr(U32(8)+closest*U32(4)), aData+uintptr(U32(4)+k*U32(4)), uint64(4)) __54: ; Xsqlite3Put4byte(tls, aData+4, k-U32(1)) if !(btreeGetHasContent(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno))) != 0) { noContent = PAGER_GET_NOCONTENT } else { noContent = 0 } rc = btreeGetUnusedPage(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno)), ppPage, noContent) if !(rc == SQLITE_OK) { goto __55 } rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) if !(rc != SQLITE_OK) { goto __56 } releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) __56: ; __55: ; searchList = U8(0) __52: ; __38: ; __25: ; __23: ; __20: ; releasePage(tls, pPrevTrunk) pPrevTrunk = uintptr(0) goto __12 __12: if searchList != 0 { goto __11 } goto __13 __13: ; goto __3 __2: // There are no pages on the freelist, so append a new page to the // database image. // // Normally, new pages allocated by this block can be requested from the // pager layer with the 'no-content' flag set. This prevents the pager // from trying to read the pages content from disk. However, if the // current transaction has already run one or more incremental-vacuum // steps, then the page we are about to allocate may contain content // that is required in the event of a rollback. In this case, do // not set the no-content flag. This causes the pager to load and journal // the current page content before overwriting it. // // Note that the pager will not actually attempt to load or journal // content for any page that really does lie past the end of the database // file on disk. So the effects of disabling the no-content optimization // here are confined to those pages that lie between the end of the // database image and the end of the database file. if 0 == int32((*BtShared)(unsafe.Pointer(pBt)).FbDoTruncate) { bNoContent = PAGER_GET_NOCONTENT } else { bNoContent = 0 } rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) if !(rc != 0) { goto __57 } return rc __57: ; (*BtShared)(unsafe.Pointer(pBt)).FnPage++ if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1)) { goto __58 } (*BtShared)(unsafe.Pointer(pBt)).FnPage++ __58: ; if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && ptrmapPageno(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage) == (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __59 } // If *pPgno refers to a pointer-map page, allocate two new pages // at the end of the file instead of one. The first allocated page // becomes a new pointer-map page, the second is used by the caller. *(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */)) = uintptr(0) rc = btreeGetUnusedPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage, bp+24, bNoContent) if !(rc == SQLITE_OK) { goto __60 } rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */)))).FpDbPage) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPg */))) __60: ; if !(rc != 0) { goto __61 } return rc __61: ; (*BtShared)(unsafe.Pointer(pBt)).FnPage++ if !((*BtShared)(unsafe.Pointer(pBt)).FnPage == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1)) { goto __62 } (*BtShared)(unsafe.Pointer(pBt)).FnPage++ __62: ; __59: ; Xsqlite3Put4byte(tls, uintptr(28)+(*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData, (*BtShared)(unsafe.Pointer(pBt)).FnPage) *(*Pgno)(unsafe.Pointer(pPgno)) = (*BtShared)(unsafe.Pointer(pBt)).FnPage rc = btreeGetUnusedPage(tls, pBt, *(*Pgno)(unsafe.Pointer(pPgno)), ppPage, bNoContent) if !(rc != 0) { goto __63 } return rc __63: ; rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) if !(rc != SQLITE_OK) { goto __64 } releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) __64: ; __3: ; end_allocate_page: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pTrunk */))) releasePage(tls, pPrevTrunk) return rc } // This function is used to add page iPage to the database file free-list. // It is assumed that the page is not already a part of the free-list. // // The value passed as the second argument to this function is optional. // If the caller happens to have a pointer to the MemPage object // corresponding to page iPage handy, it may pass it as the second value. // Otherwise, it may pass NULL. // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72561:12: */ bp := tls.Alloc(24) defer tls.Free(24) // var pTrunk uintptr at bp+16, 8 // Free-list trunk page var iTrunk Pgno // Page number of free-list trunk page var pPage1 uintptr // Local reference to page 1 // var pPage uintptr at bp, 8 // Page being freed. May be NULL. // var rc int32 at bp+8, 4 // Return Code var nFree U32 var nLeaf U32 *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */)) = uintptr(0) iTrunk = Pgno(0) pPage1 = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 // Initial number of pages on free-list if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } return Xsqlite3CorruptError(tls, 72574) __1: ; if !(pMemPage != 0) { goto __2 } *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = pMemPage Xsqlite3PagerRef(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) goto __3 __2: *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = btreePageLookup(tls, pBt, iPage) __3: ; // Increment the free page count on pPage1 *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage1)).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { goto __4 } goto freepage_out __4: ; nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+36, nFree+U32(1)) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_SECURE_DELETE != 0) { goto __5 } // If the secure_delete option is enabled, then // always fully overwrite deleted information with zeros. if !(!(*(*uintptr)(unsafe.Pointer(bp)) != 0) && libc.AssignPtrInt32(bp+8, btreeGetPage(tls, pBt, iPage, bp, 0)) != 0 || libc.AssignPtrInt32(bp+8, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage)) != 0) { goto __6 } goto freepage_out __6: ; libc.Xmemset(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData, 0, uint64((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpBt)).FpageSize)) __5: ; // If the database supports auto-vacuum, write an entry in the pointer-map // to indicate that the page is free. if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __7 } ptrmapPut(tls, pBt, iPage, uint8(PTRMAP_FREEPAGE), uint32(0), bp+8) if !(*(*int32)(unsafe.Pointer(bp + 8)) != 0) { goto __8 } goto freepage_out __8: ; __7: ; // Now manipulate the actual database free-list structure. There are two // possibilities. If the free-list is currently empty, or if the first // trunk page in the free-list is full, then this page will become a // new free-list trunk page. Otherwise, it will become a leaf of the // first trunk page in the current free-list. This block tests if it // is possible to add the page as a new free-list leaf. if !(nFree != U32(0)) { goto __9 } // Initial number of leaf cells on trunk page iTrunk = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32) if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72621) goto freepage_out __10: ; *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, iTrunk, bp+16, 0) if !(*(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK) { goto __11 } goto freepage_out __11: ; nLeaf = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4) if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3CorruptError(tls, 72632) goto freepage_out __12: ; if !(nLeaf < (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(8)) { goto __13 } // In this case there is room on the trunk page to insert the page // being freed as a new leaf. // // Note that the trunk page is not really full until it contains // usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have // coded. But due to a coding error in versions of SQLite prior to // 3.6.0, databases with freelist trunk pages holding more than // usableSize/4 - 8 entries will be reported as corrupt. In order // to maintain backwards compatibility with older versions of SQLite, // we will continue to restrict the number of entries to usableSize/4 - 8 // for now. At some point in the future (once everyone has upgraded // to 3.6.0 or later) we should consider fixing the conditional above // to read "usableSize/4-2" instead of "usableSize/4-8". // // EVIDENCE-OF: R-19920-11576 However, newer versions of SQLite still // avoid using the last six entries in the freelist trunk page array in // order that database files created by newer versions of SQLite can be // read by older versions of SQLite. *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */)))).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK) { goto __14 } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+4, nLeaf+U32(1)) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).FaData+uintptr(U32(8)+nLeaf*U32(4)), iPage) if !(*(*uintptr)(unsafe.Pointer(bp)) != 0 && int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_SECURE_DELETE == 0) { goto __15 } Xsqlite3PagerDontWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) __15: ; *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeSetHasContent(tls, pBt, iPage) __14: ; goto freepage_out __13: ; __9: ; // If control flows to this point, then it was not possible to add the // the page being freed as a leaf page of the first trunk in the free-list. // Possibly because the free-list is empty, or possibly because the // first trunk in the free-list is full. Either way, the page being freed // will become the new first trunk page in the free-list. if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) && SQLITE_OK != libc.AssignPtrInt32(bp+8, btreeGetPage(tls, pBt, iPage, bp, 0))) { goto __16 } goto freepage_out __16: ; *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK) { goto __17 } goto freepage_out __17: ; Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData, iTrunk) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+4, uint32(0)) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+32, iPage) freepage_out: if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { goto __18 } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FisInit = U8(0) __18: ; releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pTrunk */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72695:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72704:28: */ bp := tls.Alloc(12) defer tls.Free(12) var pBt uintptr var ovflPgno Pgno var rc int32 var nOvfl int32 var ovflPageSize U32 if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page return Xsqlite3CorruptError(tls, 72721) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt ovflPageSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) nOvfl = int32(((*CellInfo)(unsafe.Pointer(pInfo)).FnPayload - U32((*CellInfo)(unsafe.Pointer(pInfo)).FnLocal) + ovflPageSize - U32(1)) / ovflPageSize) for libc.PostDecInt32(&nOvfl, 1) != 0 { *(*Pgno)(unsafe.Pointer(bp + 8 /* iNext */)) = Pgno(0) *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) = uintptr(0) if ovflPgno < Pgno(2) || ovflPgno > btreePagecount(tls, pBt) { // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. return Xsqlite3CorruptError(tls, 72738) } if nOvfl != 0 { rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+8) if rc != 0 { return rc } } if (*(*uintptr)(unsafe.Pointer(bp)) != 0 || libc.AssignPtrUintptr(bp, btreePageLookup(tls, pBt, ovflPgno)) != uintptr(0)) && Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 { // There is no reason any cursor should have an outstanding reference // to an overflow page belonging to a cell that is being deleted/updated. // So if there exists more than one reference to this page, then it // must not really be an overflow page and the database must be corrupt. // It is helpful to detect this before calling freePage2(), as // freePage2() may zero the page contents if secure-delete mode is // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. rc = Xsqlite3CorruptError(tls, 72758) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 { Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pOvfl */)))).FpDbPage) } if rc != 0 { return rc } ovflPgno = *(*Pgno)(unsafe.Pointer(bp + 8 /* iNext */)) } return SQLITE_OK } // Call xParseCell to compute the size of a cell. If the cell contains // overflow, then invoke cellClearOverflow to clear out that overflow. // STore the result code (SQLITE_OK or some error code) in rc. // // Implemented as macro to force inlining for performance. // Create the byte sequence used to represent a cell on page pPage // and write that byte sequence into pCell[]. Overflow pages are // allocated and filled in as necessary. The calling procedure // is responsible for making sure sufficient space has been allocated // for pCell[]. // // Note that pCell does not necessary need to point to the pPage->aData // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72799:12: */ bp := tls.Alloc(16) defer tls.Free(16) var nPayload int32 var pSrc uintptr var nSrc int32 var n int32 // var rc int32 at bp+12, 4 var mn int32 var spaceLeft int32 var pToRelease uintptr var pPrior uintptr var pPayload uintptr var pBt uintptr // var pgnoOvfl Pgno at bp+8, 4 var nHeader int32 // pPage is not necessarily writeable since pCell might be auxiliary // buffer space that is separate from the pPage buffer area // Fill in the header. nHeader = int32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) if (*MemPage)(unsafe.Pointer(pPage)).FintKey != 0 { nPayload = (*BtreePayload)(unsafe.Pointer(pX)).FnData + (*BtreePayload)(unsafe.Pointer(pX)).FnZero pSrc = (*BtreePayload)(unsafe.Pointer(pX)).FpData nSrc = (*BtreePayload)(unsafe.Pointer(pX)).FnData // fillInCell() only called for leaves nHeader = nHeader + int32(func() uint8 { if U32(nPayload) < U32(0x80) { return uint8(func() int32 { *(*uint8)(unsafe.Pointer(pCell + uintptr(nHeader))) = uint8(nPayload); return 1 }()) } return uint8(Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), uint64(nPayload))) }()) nHeader = nHeader + Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), *(*U64)(unsafe.Pointer(pX + 8))) } else { nSrc = libc.AssignInt32(&nPayload, int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) pSrc = (*BtreePayload)(unsafe.Pointer(pX)).FpKey nHeader = nHeader + int32(func() uint8 { if U32(nPayload) < U32(0x80) { return uint8(func() int32 { *(*uint8)(unsafe.Pointer(pCell + uintptr(nHeader))) = uint8(nPayload); return 1 }()) } return uint8(Xsqlite3PutVarint(tls, pCell+uintptr(nHeader), uint64(nPayload))) }()) } // Fill in the payload pPayload = pCell + uintptr(nHeader) if nPayload <= int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { // This is the common case where everything fits on the btree page // and no overflow pages are required. n = nHeader + nPayload if n < 4 { n = 4 } *(*int32)(unsafe.Pointer(pnSize)) = n libc.Xmemcpy(tls, pPayload, pSrc, uint64(nSrc)) libc.Xmemset(tls, pPayload+uintptr(nSrc), 0, uint64(nPayload-nSrc)) return SQLITE_OK } // If we reach this point, it means that some of the content will need // to spill onto overflow pages. mn = int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal) n = int32(U32(mn) + U32(nPayload-mn)%((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4))) if n > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) { n = mn } spaceLeft = n *(*int32)(unsafe.Pointer(pnSize)) = n + nHeader + 4 pPrior = pCell + uintptr(nHeader+n) pToRelease = uintptr(0) *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)) = Pgno(0) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt // At this point variables should be set as follows: // // nPayload Total payload size in bytes // pPayload Begin writing payload here // spaceLeft Space available at pPayload. If nPayload>spaceLeft, // that means content must spill into overflow pages. // *pnSize Size of the local cell (not counting overflow pages) // pPrior Where to write the pgno of the first overflow page // // Use a call to btreeParseCellPtr() to verify that the values above // were computed correctly. // Write the payload into the local Cell and any extra into overflow pages for 1 != 0 { n = nPayload if n > spaceLeft { n = spaceLeft } // If pToRelease is not zero than pPayload points into the data area // of pToRelease. Make sure pToRelease is still writeable. // If pPayload is part of the data area of pPage, then make sure pPage // is still writeable if nSrc >= n { libc.Xmemcpy(tls, pPayload, pSrc, uint64(n)) } else if nSrc > 0 { n = nSrc libc.Xmemcpy(tls, pPayload, pSrc, uint64(n)) } else { libc.Xmemset(tls, pPayload, 0, uint64(n)) } nPayload = nPayload - n if nPayload <= 0 { break } pPayload += uintptr(n) pSrc += uintptr(n) nSrc = nSrc - n spaceLeft = spaceLeft - n if spaceLeft == 0 { *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) = uintptr(0) var pgnoPtrmap Pgno = *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)) // Overflow page pointer-map entry page if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { for __ccgo := true; __ccgo; __ccgo = ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8))) == *(*Pgno)(unsafe.Pointer(bp + 8)) || *(*Pgno)(unsafe.Pointer(bp + 8)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */))++ } } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)), uint8(0)) // If the database supports auto-vacuum, and the second or subsequent // overflow page is being allocated, add an entry to the pointer-map // for that page now. // // If this is the first overflow page, then write a partial entry // to the pointer-map. If we write nothing to this pointer-map slot, // then the optimistic overflow chain processing in clearCell() // may misinterpret the uninitialized values and delete the // wrong pages from the database. if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { var eType U8 = func() uint8 { if pgnoPtrmap != 0 { return uint8(PTRMAP_OVERFLOW2) } return uint8(PTRMAP_OVERFLOW1) }() ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */)), eType, pgnoPtrmap, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */))) } } if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { releasePage(tls, pToRelease) return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } // If pToRelease is not zero than pPrior points into the data area // of pToRelease. Make sure pToRelease is still writeable. // If pPrior is part of the data area of pPage, then make sure pPage // is still writeable Xsqlite3Put4byte(tls, pPrior, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoOvfl */))) releasePage(tls, pToRelease) pToRelease = *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)) pPrior = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pOvfl */)))).FaData Xsqlite3Put4byte(tls, pPrior, uint32(0)) pPayload = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + 4 spaceLeft = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4)) } } releasePage(tls, pToRelease) return SQLITE_OK } // Remove the i-th cell from pPage. This routine effects pPage only. // The cell content is not freed or deallocated. It is assumed that // the cell content has been copied someplace else. This routine just // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:72989:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] var rc int32 // The return code var hdr int32 // Beginning of the header. 0 most pages. 100 page 1 if *(*int32)(unsafe.Pointer(pRC)) != 0 { return } data = (*MemPage)(unsafe.Pointer(pPage)).FaData ptr = (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) pc = U32(int32(*(*U8)(unsafe.Pointer(ptr)))<<8 | int32(*(*U8)(unsafe.Pointer(ptr + 1)))) hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 73017) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) if rc != 0 { *(*int32)(unsafe.Pointer(pRC)) = rc return } (*MemPage)(unsafe.Pointer(pPage)).FnCell-- if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { libc.Xmemset(tls, data+uintptr(hdr+1), 0, uint64(4)) *(*U8)(unsafe.Pointer(data + uintptr(hdr+7))) = U8(0) *(*U8)(unsafe.Pointer(data + uintptr(hdr+5))) = U8((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize >> 8) *(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)) = U8((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize - U32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) - U32((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) - U32(8)) } else { libc.Xmemmove(tls, ptr, ptr+uintptr(2), uint64(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-idx))) *(*U8)(unsafe.Pointer(data + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) >> 8) *(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPage)).FnCell) *(*int32)(unsafe.Pointer(pPage + 20)) += 2 } } // Insert a new cell on pPage at cell index "i". pCell points to the // content of the cell. // // If the cell content will fit on the page, then put it there. If it // will not fit, then make a copy of the cell content into pTemp if // pTemp is not null. Regardless of pTemp, allocate a new entry // in pPage->apOvfl[] and make it point to the cell content (either // in pTemp or the original pCell) and also record its index. // Allocating a new entry in pPage->aCell[] implies that // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73053:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* idx */)) = 0 // Where to write new cell content in data[] var j int32 // Loop counter var data uintptr // The content of the whole page var pIns uintptr // The point in pPage->aCellIdx[] where no cell inserted if (*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0 || sz+2 > (*MemPage)(unsafe.Pointer(pPage)).FnFree { if pTemp != 0 { libc.Xmemcpy(tls, pTemp, pCell, uint64(sz)) pCell = pTemp } if iChild != 0 { Xsqlite3Put4byte(tls, pCell, iChild) } j = int32(libc.PostIncUint8(&(*MemPage)(unsafe.Pointer(pPage)).FnOverflow, 1)) // Comparison against ArraySize-1 since we hold back one extra slot // as a contingency. In other words, never need more than 3 overflow // slots but 4 are allocated, just to be safe. *(*uintptr)(unsafe.Pointer(pPage + 40 + uintptr(j)*8)) = pCell *(*U16)(unsafe.Pointer(pPage + 28 + uintptr(j)*2)) = U16(i) // When multiple overflows occur, they are always sequential and in // sorted order. This invariants arise because multiple overflows can // only occur when inserting divider cells into the parent page during // balancing, and the dividers are adjacent and sorted. // Overflows in sorted order // Overflows are sequential } else { var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if rc != SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = rc return } data = (*MemPage)(unsafe.Pointer(pPage)).FaData rc = allocateSpace(tls, pPage, sz, bp) if rc != 0 { *(*int32)(unsafe.Pointer(pRC)) = rc return } // The allocateSpace() routine guarantees the following properties // if it returns successfully *(*int32)(unsafe.Pointer(pPage + 20)) -= int32(U16(2 + sz)) if iChild != 0 { // In a corrupt database where an entry in the cell index section of // a btree page has a value of 3 or less, the pCell value might point // as many as 4 bytes in front of the start of the aData buffer for // the source page. Make sure this does not cause problems by not // reading the first 4 bytes libc.Xmemcpy(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))+4), pCell+uintptr(4), uint64(sz-4)) Xsqlite3Put4byte(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))), iChild) } else { libc.Xmemcpy(tls, data+uintptr(*(*int32)(unsafe.Pointer(bp))), pCell, uint64(sz)) } pIns = (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(i*2) libc.Xmemmove(tls, pIns+uintptr(2), pIns, uint64(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-i))) *(*U8)(unsafe.Pointer(pIns)) = U8(*(*int32)(unsafe.Pointer(bp)) >> 8) *(*U8)(unsafe.Pointer(pIns + 1)) = U8(*(*int32)(unsafe.Pointer(bp))) (*MemPage)(unsafe.Pointer(pPage)).FnCell++ // increment the cell count if int32(libc.PreIncUint8(&*(*U8)(unsafe.Pointer(data + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+4))), 1)) == 0 { *(*U8)(unsafe.Pointer(data + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+3)))++ } if (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FautoVacuum != 0 { // The cell may contain a pointer to an overflow page. If so, write // the entry for the overflow page into the pointer map. ptrmapPutOvflPtr(tls, pPage, pPage, pCell, pRC) } } } // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side // of the page that participate in the balancing operation. NB is the // total number of pages that participate, including the target page and // NN neighbors on either side. // // The minimum value of NN is 1 (of course). Increasing NN above 1 // (to 2 or 3) gives a modest improvement in SELECT and DELETE performance // in exchange for a larger degradation in INSERT and UPDATE performance. // The value of NN appears to give the best results overall. // // (Later:) The description above makes it seem as if these values are // tunable - as if you could change them and recompile and it would all work. // But that is unlikely. NB has been 3 since the inception of SQLite and // we have never tested any other value. // A CellArray object contains a cache of pointers and sizes for a // consecutive sequence of cells that might be held on multiple pages. // // The cells in this array are the divider cell or cells from the pParent // page plus up to three child pages. There are a total of nCell cells. // // pRef is a pointer to one of the pages that contributes cells. This is // used to access information such as MemPage.intKey and MemPage.pBt->pageSize // which should be common to all pages that contribute cells to this array. // // apCell[] and szCell[] hold, respectively, pointers to the start of each // cell and the size of each cell. Some of the apCell[] pointers might refer // to overflow cells. In other words, some apCel[] pointers might not point // to content area of the pages. // // A szCell[] of zero means the size of that cell has not yet been computed. // // The cells come from as many as four different pages: // // ----------- // | Parent | // ----------- // / | ** / | ** --------- --------- --------- // |Child-1| |Child-2| |Child-3| // --------- --------- --------- // // The order of cells is in the array is for an index btree is: // // 1. All cells from Child-1 in order // 2. The first divider cell from Parent // 3. All cells from Child-2 in order // 4. The second divider cell from Parent // 5. All cells from Child-3 in order // // For a table-btree (with rowids) the items 2 and 4 are empty because // content exists only in leaves and there are no divider cells. // // For an index btree, the apEnd[] array holds pointer to the end of page // for Child-1, the Parent, Child-2, the Parent (again), and Child-3, // respectively. The ixNx[] array holds the number of cells contained in // each of these 5 stages, and all stages to the left. Hence: // // ixNx[0] = Number of cells in Child-1. // ixNx[1] = Number of cells in Child-1 plus 1 for first divider. // ixNx[2] = Number of cells in Child-1 and Child-2 + 1 for 1st divider. // ixNx[3] = Number of cells in Child-1 and Child-2 + both divider cells // ixNx[4] = Total number of cells. // // For a table-btree, the concept is similar, except only apEnd[0]..apEnd[2] // are used and they point to the leaf pages only, and the ixNx value are: // // ixNx[0] = Number of cells in Child-1. // ixNx[1] = Number of cells in Child-1 and Child-2. // ixNx[2] = Total number of cells. // // Sometimes when deleting, a child page can have zero cells. In those // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous type CellArray1 = struct { FnCell int32 F__ccgo_pad1 [4]byte FpRef uintptr FapCell uintptr FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73228:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side // of the page that participate in the balancing operation. NB is the // total number of pages that participate, including the target page and // NN neighbors on either side. // // The minimum value of NN is 1 (of course). Increasing NN above 1 // (to 2 or 3) gives a modest improvement in SELECT and DELETE performance // in exchange for a larger degradation in INSERT and UPDATE performance. // The value of NN appears to give the best results overall. // // (Later:) The description above makes it seem as if these values are // tunable - as if you could change them and recompile and it would all work. // But that is unlikely. NB has been 3 since the inception of SQLite and // we have never tested any other value. // A CellArray object contains a cache of pointers and sizes for a // consecutive sequence of cells that might be held on multiple pages. // // The cells in this array are the divider cell or cells from the pParent // page plus up to three child pages. There are a total of nCell cells. // // pRef is a pointer to one of the pages that contributes cells. This is // used to access information such as MemPage.intKey and MemPage.pBt->pageSize // which should be common to all pages that contribute cells to this array. // // apCell[] and szCell[] hold, respectively, pointers to the start of each // cell and the size of each cell. Some of the apCell[] pointers might refer // to overflow cells. In other words, some apCel[] pointers might not point // to content area of the pages. // // A szCell[] of zero means the size of that cell has not yet been computed. // // The cells come from as many as four different pages: // // ----------- // | Parent | // ----------- // / | ** / | ** --------- --------- --------- // |Child-1| |Child-2| |Child-3| // --------- --------- --------- // // The order of cells is in the array is for an index btree is: // // 1. All cells from Child-1 in order // 2. The first divider cell from Parent // 3. All cells from Child-2 in order // 4. The second divider cell from Parent // 5. All cells from Child-3 in order // // For a table-btree (with rowids) the items 2 and 4 are empty because // content exists only in leaves and there are no divider cells. // // For an index btree, the apEnd[] array holds pointer to the end of page // for Child-1, the Parent, Child-2, the Parent (again), and Child-3, // respectively. The ixNx[] array holds the number of cells contained in // each of these 5 stages, and all stages to the left. Hence: // // ixNx[0] = Number of cells in Child-1. // ixNx[1] = Number of cells in Child-1 plus 1 for first divider. // ixNx[2] = Number of cells in Child-1 and Child-2 + 1 for 1st divider. // ixNx[3] = Number of cells in Child-1 and Child-2 + both divider cells // ixNx[4] = Total number of cells. // // For a table-btree, the concept is similar, except only apEnd[0]..apEnd[2] // are used and they point to the leaf pages only, and the ixNx value are: // // ixNx[0] = Number of cells in Child-1. // ixNx[1] = Number of cells in Child-1 and Child-2. // ixNx[2] = Total number of cells. // // Sometimes when deleting, a child page can have zero cells. In those // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous type CellArray = CellArray1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73228:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73242:13: */ for N > 0 { if int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2))) == 0 { *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(idx)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(idx)*8))) } else { } idx++ N-- } } // Return the size of the Nth element of the cell array func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73260:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FpRef)).FxCellSize})).f(tls, (*CellArray)(unsafe.Pointer(p)).FpRef, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FapCell + uintptr(N)*8))) return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73266:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } return computeCellSize(tls, p, N) } // Array apCell[] contains pointers to nCell b-tree page cells. The // szCell[] array contains the size in bytes of each cell. This function // replaces the current contents of page pPg with the contents of the cell // array. // // Some of the cells in apCell[] may currently be stored in pPg. This // function works around problems caused by this by making a copy of any // such cells before overwriting the page data. // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73285:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pEnd uintptr = aData + uintptr(usableSize) var i int32 = iFirst // Which cell to copy from pCArray var j U32 // Start of cell content area var iEnd int32 = i + nCell // Loop terminator var pCellptr uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx var pTmp uintptr = Xsqlite3PagerTempSpace(tls, (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FpPager) var pData uintptr var k int32 // Current slot in pCArray->apEnd[] var pSrcEnd uintptr // Current pCArray->apEnd[k] value j = U32(int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)))) if j > U32(usableSize) { j = U32(0) } libc.Xmemcpy(tls, pTmp+uintptr(j), aData+uintptr(j), uint64(U32(usableSize)-j)) for k = 0; *(*int32)(unsafe.Pointer(pCArray + 80 /* &.ixNx */ + uintptr(k)*4)) <= i && k < NB*2; k++ { } pSrcEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) pData = pEnd for 1 != 0 { var pCell uintptr = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)) var sz U16 = *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2)) if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { return Xsqlite3CorruptError(tls, 73318) } pCell = pTmp + uintptr((int64(pCell)-int64(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { return Xsqlite3CorruptError(tls, 73323) } pData -= uintptr(sz) *(*U8)(unsafe.Pointer(pCellptr)) = U8((int64(pData) - int64(aData)) / 1 >> 8) *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pData) - int64(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { return Xsqlite3CorruptError(tls, 73329) } libc.Xmemmove(tls, pData, pCell, uint64(sz)) i++ if i >= iEnd { break } if *(*int32)(unsafe.Pointer(pCArray + 80 + uintptr(k)*4)) <= i { k++ pSrcEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) } } // The pPg->nFree field is now set incorrectly. The caller will fix it. (*MemPage)(unsafe.Pointer(pPg)).FnCell = U16(nCell) (*MemPage)(unsafe.Pointer(pPg)).FnOverflow = U8(0) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+1))) = U8(int32(0) >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+1) + 1)) = U8(0) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPg)).FnCell) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))) = U8((int64(pData) - int64(aData)) / 1 >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)) = U8((int64(pData) - int64(aData)) / 1) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) = U8(0x00) return SQLITE_OK } // The pCArray objects contains pointers to b-tree cells and the cell sizes. // This function attempts to add the cells stored in the array to page pPg. // If it cannot (because the page needs to be defragmented before the cells // will fit), non-zero is returned. Otherwise, if the cells are added // successfully, zero is returned. // // Argument pCellptr points to the first entry in the cell-pointer array // (part of page pPg) to populate. After cell apCell[0] is written to the // page body, a 16-bit offset is written to pCellptr. And so on, for each // cell in the array. It is the responsibility of the caller to ensure // that it is safe to overwrite this part of the cell-pointer array. // // When this function is called, *ppData points to the start of the // content area on page pPg. If the size of the content area is extended, // *ppData is updated to point to the new start of the content area // before returning. // // Finally, argument pBegin points to the byte immediately following the // end of the space required by this page for the cell-pointer area (for // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73375:12: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 = iFirst // Loop counter - cell index to insert var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Complete page var pData uintptr = *(*uintptr)(unsafe.Pointer(ppData)) // Content area. A subset of aData[] var iEnd int32 = iFirst + nCell // End of loop. One past last cell to ins var k int32 // Current slot in pCArray->apEnd[] var pEnd uintptr // Maximum extent of cell data // Never called on page 1 if iEnd <= iFirst { return 0 } for k = 0; *(*int32)(unsafe.Pointer(pCArray + 80 /* &.ixNx */ + uintptr(k)*4)) <= i && k < NB*2; k++ { } pEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) for 1 != 0 { var sz int32 // var rc int32 at bp, 4 var pSlot uintptr sz = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))) if int32(*(*U8)(unsafe.Pointer(aData + 1))) == 0 && int32(*(*U8)(unsafe.Pointer(aData + 2))) == 0 || libc.AssignUintptr(&pSlot, pageFindSlot(tls, pPg, sz, bp)) == uintptr(0) { if (int64(pData)-int64(pBegin))/1 < int64(sz) { return 1 } pData -= uintptr(sz) pSlot = pData } // pSlot and pCArray->apCell[i] will never overlap on a well-formed // database. But they might for a corrupt database. Hence use memmove() // since memcpy() sends SIGABORT with overlapping buffers on OpenBSD if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8))) < Uptr(pEnd) { Xsqlite3CorruptError(tls, 73414) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)), uint64(sz)) *(*U8)(unsafe.Pointer(pCellptr)) = U8((int64(pSlot) - int64(aData)) / 1 >> 8) *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int64(pSlot) - int64(aData)) / 1) pCellptr += uintptr(2) i++ if i >= iEnd { break } if *(*int32)(unsafe.Pointer(pCArray + 80 + uintptr(k)*4)) <= i { k++ pEnd = *(*uintptr)(unsafe.Pointer(pCArray + 32 + uintptr(k)*8)) } } *(*uintptr)(unsafe.Pointer(ppData)) = pData return 0 } // The pCArray object contains pointers to b-tree cells and their sizes. // // This function adds the space associated with each cell in the array // that is currently stored within the body of pPg to the pPg free-list. // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73440:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) var nRet int32 = 0 var i int32 var iEnd int32 = iFirst + nCell var pFree uintptr = uintptr(0) var szFree int32 = 0 for i = iFirst; i < iEnd; i++ { var pCell uintptr = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*8)) if Uptr(pCell) >= Uptr(pStart) && Uptr(pCell) < Uptr(pEnd) { var sz int32 // No need to use cachedCellSize() here. The sizes of all cells that // are to be freed have already been computing while deciding which // cells need freeing sz = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FszCell + uintptr(i)*2))) if pFree != pCell+uintptr(sz) { if pFree != 0 { freeSpace(tls, pPg, U16((int64(pFree)-int64(aData))/1), uint16(szFree)) } pFree = pCell szFree = sz if pFree+uintptr(sz) > pEnd { return 0 } } else { pFree = pCell szFree = szFree + sz } nRet++ } } if pFree != 0 { freeSpace(tls, pPg, U16((int64(pFree)-int64(aData))/1), uint16(szFree)) } return nRet } // pCArray contains pointers to and sizes of all cells in the page being // balanced. The current page, pPg, has pPg->nCell cells starting with // pCArray->apCell[iOld]. After balancing, this page should hold nNew cells // starting at apCell[iNew]. // // This routine makes the necessary adjustments to pPg so that it contains // the correct cells after being balanced. // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73499:12: */ bp := tls.Alloc(8) defer tls.Free(8) var aData uintptr var hdr int32 var pBegin uintptr var nCell int32 // Cells stored on pPg // var pData uintptr at bp, 8 var pCellptr uintptr var i int32 var iOldEnd int32 var iNewEnd int32 var nShift int32 var nTail int32 var nAdd int32 var iCell int32 aData = (*MemPage)(unsafe.Pointer(pPg)).FaData hdr = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) pBegin = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(nNew*2) nCell = int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) iOldEnd = iOld + int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) + int32((*MemPage)(unsafe.Pointer(pPg)).FnOverflow) iNewEnd = iNew + nNew // Remove cells from the start and end of the page if !(iOld < iNew) { goto __1 } nShift = pageFreeArray(tls, pPg, iOld, iNew-iOld, pCArray) if !(nShift > nCell) { goto __2 } return Xsqlite3CorruptError(tls, 73525) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint64(nCell*2)) nCell = nCell - nShift __1: ; if !(iNewEnd < iOldEnd) { goto __3 } nTail = pageFreeArray(tls, pPg, iNewEnd, iOldEnd-iNewEnd, pCArray) nCell = nCell - nTail __3: ; *(*uintptr)(unsafe.Pointer(bp /* pData */)) = aData + uintptr((int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)))-1)&0xffff+1) if !(*(*uintptr)(unsafe.Pointer(bp)) < pBegin) { goto __4 } goto editpage_fail __4: ; if !(*(*uintptr)(unsafe.Pointer(bp)) > (*MemPage)(unsafe.Pointer(pPg)).FaDataEnd) { goto __5 } goto editpage_fail __5: ; // Add cells to the start of the page if !(iNew < iOld) { goto __6 } nAdd = func() int32 { if nNew < iOld-iNew { return nNew } return iOld - iNew }() pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx libc.Xmemmove(tls, pCellptr+uintptr(nAdd*2), pCellptr, uint64(nCell*2)) if !(pageInsertArray(tls, pPg, pBegin, bp, pCellptr, iNew, nAdd, pCArray) != 0) { goto __7 } goto editpage_fail __7: ; nCell = nCell + nAdd __6: ; // Add any overflow cells i = 0 __8: if !(i < int32((*MemPage)(unsafe.Pointer(pPg)).FnOverflow)) { goto __10 } iCell = iOld + int32(*(*U16)(unsafe.Pointer(pPg + 28 + uintptr(i)*2))) - iNew if !(iCell >= 0 && iCell < nNew) { goto __11 } pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(iCell*2) if !(nCell > iCell) { goto __12 } libc.Xmemmove(tls, pCellptr+2, pCellptr, uint64((nCell-iCell)*2)) __12: ; nCell++ cachedCellSize(tls, pCArray, iCell+iNew) if !(pageInsertArray(tls, pPg, pBegin, bp, pCellptr, iCell+iNew, 1, pCArray) != 0) { goto __13 } goto editpage_fail __13: ; __11: ; goto __9 __9: i++ goto __8 goto __10 __10: ; // Append cells to the end of the page pCellptr = (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx + uintptr(nCell*2) if !(pageInsertArray(tls, pPg, pBegin, bp, pCellptr, iNew+nCell, nNew-nCell, pCArray) != 0) { goto __14 } goto editpage_fail __14: ; (*MemPage)(unsafe.Pointer(pPg)).FnCell = U16(nNew) (*MemPage)(unsafe.Pointer(pPg)).FnOverflow = U8(0) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3))) = U8(int32((*MemPage)(unsafe.Pointer(pPg)).FnCell) >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+3) + 1)) = U8((*MemPage)(unsafe.Pointer(pPg)).FnCell) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5))) = U8((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(aData)) / 1 >> 8) *(*U8)(unsafe.Pointer(aData + uintptr(hdr+5) + 1)) = U8((int64(*(*uintptr)(unsafe.Pointer(bp))) - int64(aData)) / 1) return SQLITE_OK editpage_fail: // Unable to edit this page. Rebuild it from scratch instead. populateCellCache(tls, pCArray, iNew, nNew) return rebuildPage(tls, pCArray, iNew, nNew, pPg) } // This version of balance() handles the common special case where // a new entry is being inserted on the extreme right-end of the // tree, in other words, when the new entry will become the largest // entry in the tree. // // Instead of trying to balance the 3 right-most leaf pages, just add // a new page to the right-hand side and put the one new entry in // that page. This leaves the right side of the tree somewhat // unbalanced. But odds are that we will be inserting new entries // at the end soon afterwards so the nearly empty page will quickly // fill up. On average. // // pPage is the leaf page which is the right-most page in the tree. // pParent is its parent. pPage must have a single overflow entry // which is also the right-most entry on the page. // // The pSpace buffer is used to store a temporary copy of the divider // cell that will be inserted into pParent. Such a cell consists of a 4 // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73628:12: */ bp := tls.Alloc(140) defer tls.Free(140) var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt // B-Tree Database // var pNew uintptr at bp, 8 // Newly allocated page // var rc int32 at bp+136, 4 // Return Code // var pgnoNew Pgno at bp+8, 4 // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { return Xsqlite3CorruptError(tls, 73638) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of // pPage. Make the parent page writable, so that the new divider cell // may be inserted. If both these operations are successful, proceed. *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, uint32(0), uint8(0)) if *(*int32)(unsafe.Pointer(bp + 136)) == SQLITE_OK { var pOut uintptr = pSpace + 4 *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)) = *(*uintptr)(unsafe.Pointer(pPage + 40)) *(*U16)(unsafe.Pointer(bp + 24 /* szCell */)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */))) var pStop uintptr // var b CellArray at bp+32, 104 zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FnCell = 1 (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FpRef = pPage (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FapCell = bp + 16 /* &pCell */ (*CellArray)(unsafe.Pointer(bp + 32 /* &b */)).FszCell = bp + 24 /* &szCell */ *(*uintptr)(unsafe.Pointer(bp + 32 + 32)) = (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd *(*int32)(unsafe.Pointer(bp + 32 + 80)) = 2 *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) = rebuildPage(tls, bp+32, 0, 1, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) if *(*int32)(unsafe.Pointer(bp + 136)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FnFree = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) - U32(2) - U32(*(*U16)(unsafe.Pointer(bp + 24)))) // If this is an auto-vacuum database, update the pointer map // with entries for the new page, and any pointer from the // cell on the page to an overflow page. If either of these // operations fails, the return code is set, but the contents // of the parent page are still manipulated by thh code below. // That is Ok, at this point the parent page is guaranteed to // be marked as dirty. Returning an error code will cause a // rollback, undoing any changes made to the parent page. if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+136) if int32(*(*U16)(unsafe.Pointer(bp + 24))) > int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FminLocal) { ptrmapPutOvflPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)), bp+136) } } // Create a divider cell to insert into pParent. The divider cell // consists of a 4-byte page number (the page number of pPage) and // a variable length key value (which must be the same value as the // largest key on pPage). // // To find the largest key value on pPage, first find the right-most // cell on pPage. The first two fields of this cell are the // record-length (a variable length integer at most 32-bits in size) // and the key value (a variable length integer, may have any value). // The first of the while(...) loops below skips over the record-length // field. The second while(...) loop copies the key value from the // cell on pPage into the pSpace buffer. *(*uintptr)(unsafe.Pointer(bp + 16 /* pCell */)) = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)-1))))))) pStop = *(*uintptr)(unsafe.Pointer(bp + 16)) + 9 for int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 16)), 1))))&0x80 != 0 && *(*uintptr)(unsafe.Pointer(bp + 16)) < pStop { } pStop = *(*uintptr)(unsafe.Pointer(bp + 16)) + 9 for int32(libc.AssignPtrUint8(libc.PostIncUintptr(&pOut, 1), *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 16)), 1)))))&0x80 != 0 && *(*uintptr)(unsafe.Pointer(bp + 16)) < pStop { } // Insert the new divider cell into pParent. if *(*int32)(unsafe.Pointer(bp + 136)) == SQLITE_OK { insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, int32((int64(pOut)-int64(pSpace))/1), uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+136) } // Set the right-child pointer of pParent to point to the new page. Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pParent)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset)+8), *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */))) // Release the reference to the new page. releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) } return *(*int32)(unsafe.Pointer(bp + 136 /* rc */)) } // This function is used to copy the contents of the b-tree node stored // on page pFrom to page pTo. If page pFrom was not a leaf page, then // the pointer-map entries for each child page are updated so that the // parent page stored in the pointer map is page pTo. If pFrom contained // any cells with overflow page pointers, then the corresponding pointer // map entries are also updated so that the parent page is page pTo. // // If pFrom is currently carrying any overflow cells (entries in the // MemPage.apOvfl[] array), they are not copied to pTo. // // Before returning, page pTo is reinitialized using btreeInitPage(). // // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73783:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData var aTo uintptr = (*MemPage)(unsafe.Pointer(pTo)).FaData var iFromHdr int32 = int32((*MemPage)(unsafe.Pointer(pFrom)).FhdrOffset) var iToHdr int32 = func() int32 { if (*MemPage)(unsafe.Pointer(pTo)).Fpgno == Pgno(1) { return 100 } return 0 }() var rc int32 var iData int32 // Copy the b-tree node content from page pFrom to page pTo. iData = int32(*(*U8)(unsafe.Pointer(aFrom + uintptr(iFromHdr+5))))<<8 | int32(*(*U8)(unsafe.Pointer(aFrom + uintptr(iFromHdr+5) + 1))) libc.Xmemcpy(tls, aTo+uintptr(iData), aFrom+uintptr(iData), uint64((*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(iData))) libc.Xmemcpy(tls, aTo+uintptr(iToHdr), aFrom+uintptr(iFromHdr), uint64(int32((*MemPage)(unsafe.Pointer(pFrom)).FcellOffset)+2*int32((*MemPage)(unsafe.Pointer(pFrom)).FnCell))) // Reinitialize page pTo so that the contents of the MemPage structure // match the new data. The initialization of pTo can actually fail under // fairly obscure circumstances, even though it is a copy of initialized // page pFrom. (*MemPage)(unsafe.Pointer(pTo)).FisInit = U8(0) rc = btreeInitPage(tls, pTo) if rc == SQLITE_OK { rc = btreeComputeFreeSpace(tls, pTo) } if rc != SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = rc return } // If this is an auto-vacuum database, update the pointer-map entries // for any b-tree or overflow pages that pTo now contains the pointers to. if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { *(*int32)(unsafe.Pointer(pRC)) = setChildPtrmaps(tls, pTo) } } } // This routine redistributes cells on the iParentIdx'th child of pParent // (hereafter "the page") and up to 2 siblings so that all pages have about the // same amount of free space. Usually a single sibling on either side of the // page are used in the balancing, though both siblings might come from one // side if the page is the first or last child of its parent. If the page // has fewer than 2 siblings (something which can only happen if the page // is a root page or a child of a root page) then all available siblings // participate in the balancing. // // The number of siblings of the page might be increased or decreased by // one or two in an effort to keep pages nearly full but not over full. // // Note that when this routine is called, some of the cells on the page // might not actually be stored in MemPage.aData[]. This can happen // if the page is overfull. This routine ensures that all cells allocated // to the page and its siblings fit into MemPage.aData[] before returning. // // In the course of balancing the page and its siblings, cells may be // inserted into or removed from the parent page (pParent). Doing so // may cause the parent page to become overfull or underfull. If this // happens, it is the responsibility of the caller to invoke the correct // balancing routine to fix this problem (see the balance() routine). // // If this routine fails for any reason, it might leave the database // in a corrupted state. So if this routine fails, the database should // be rolled back. // // The third argument to this function, aOvflSpace, is a pointer to a // buffer big enough to hold one page. If while inserting cells into the parent // page (pParent) the parent page becomes overfull, this buffer is // used to store the parent's overflow cells. Because this function inserts // a maximum of four divider cells into the parent page, and the maximum // size of a cell stored within an internal node is always less than 1/4 // of the page-size, the aOvflSpace[] buffer is guaranteed to be large // enough for all overflow cells. // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:73865:12: */ bp := tls.Alloc(344) defer tls.Free(344) var pBt uintptr // The whole database var nMaxCells int32 // Allocated size of apCell, szCell, aFrom. var nNew int32 // Number of pages in apNew[] var nOld int32 // Number of pages in apOld[] var i int32 var j int32 var k int32 // Loop counters var nxDiv int32 // Next divider slot in pParent->aCell[] // var rc int32 at bp+172, 4 // The return code var leafCorrection U16 // 4 if pPage is a leaf. 0 if not var leafData int32 // True if pPage is a leaf of a LEAFDATA tree var usableSpace int32 // Bytes in pPage beyond the header var pageFlags int32 // Value of pPage->aData[0] var iSpace1 int32 // First unused byte of aSpace1[] var iOvflSpace int32 // First unused byte of aOvflSpace[] var szScratch int32 // Size of scratch memory requested // var apOld [3]uintptr at bp+112, 24 // pPage and up to two siblings // var apNew [5]uintptr at bp+216, 40 // pPage and up to NB siblings after balancing var pRight uintptr // Location in parent of right-sibling pointer // var apDiv [2]uintptr at bp+136, 16 // Divider cells in pParent // var cntNew [5]int32 at bp+196, 20 // Index in b.paCell[] of cell after i-th page // var cntOld [5]int32 at bp+176, 20 // Old index in b.apCell[] // var szNew [5]int32 at bp+152, 20 // Combined size of cells placed on i-th page var aSpace1 uintptr // Space for copies of dividers cells // var pgno Pgno at bp+264, 4 // Temp var to store a page number in // var abDone [5]U8 at bp, 5 // True after i'th new page is populated // var aPgno [5]Pgno at bp+288, 20 // Page numbers of new pages before shuffling // var aPgOrder [5]Pgno at bp+268, 20 // Copy of aPgno[] used for sorting pages // var aPgFlags [5]U16 at bp+308, 10 // flags field of new pages before shuffling // var b CellArray at bp+8, 104 var iOff int32 var sz U16 var pTemp uintptr var pOld uintptr var limit int32 var aData uintptr var maskPage U16 var piCell uintptr var piEnd uintptr var p uintptr var sz1 int32 var szRight int32 // Size of sibling on the right var szLeft int32 // Size of sibling on the left var r int32 // Index of right-most cell in left sibling var d int32 // var pNew uintptr at bp+256, 8 var iBest int32 var pOld1 uintptr var pCell uintptr var pOld2 uintptr var pNew1 uintptr var cntOldNext int32 var iNew int32 var iOld int32 // If the tree is a leaf-data tree, and the siblings are leaves, // then there is no divider cell in b.apCell[]. Instead, the divider // cell consists of the integer key for the right-most cell of // the sibling-page assembled above only. // var info CellInfo at bp+320, 24 var pCell1 uintptr var pTemp1 uintptr var sz2 int32 var pSrcEnd uintptr var pNew2 uintptr var iNew1 int32 var iOld1 int32 var nNewCell int32 var iPg int32 var key U32 nMaxCells = 0 nNew = 0 *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = SQLITE_OK iSpace1 = 0 iOvflSpace = 0 // Parsed information on cells being balanced libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([5]U8{}))) libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(CellArray{}))) pBt = (*MemPage)(unsafe.Pointer(pParent)).FpBt // At this point pParent may have at most one overflow cell. And if // this overflow cell is present, it must be the cell with // index iParentIdx. This scenario comes about when this function // is called (indirectly) from sqlite3BtreeDelete(). if !!(aOvflSpace != 0) { goto __1 } return SQLITE_NOMEM __1: ; // Find the sibling pages to balance. Also locate the cells in pParent // that divide the siblings. An attempt is made to find NN siblings on // either side of pPage. More siblings are taken from one side, however, // if there are fewer than NN siblings on the other side. If pParent // has NB or fewer children then all children of pParent are taken. // // This loop also drops the divider cells from the parent page. This // way, the remainder of the function does not have to deal with any // overflow cells in the parent page, since if any existed they will // have already been removed. i = int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow) + int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) if !(i < 2) { goto __2 } nxDiv = 0 goto __3 __2: ; if !(iParentIdx == 0) { goto __4 } nxDiv = 0 goto __5 __4: if !(iParentIdx == i) { goto __6 } nxDiv = i - 2 + bBulk goto __7 __6: nxDiv = iParentIdx - 1 __7: ; __5: ; i = 2 - bBulk __3: ; nOld = i + 1 if !(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow) == int32((*MemPage)(unsafe.Pointer(pParent)).FnCell)) { goto __8 } pRight = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset)+8) goto __9 __8: pRight = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow)))))))) __9: ; *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, pRight) __10: if !(1 != 0) { goto __11 } if !(*(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __12 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = getAndInitPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)), bp+112+uintptr(i)*8, uintptr(0), 0) __12: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __13 } libc.Xmemset(tls, bp+112, 0, uint64(i+1)*uint64(unsafe.Sizeof(uintptr(0)))) goto balance_cleanup __13: ; if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)))).FnFree < 0) { goto __14 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __15 } libc.Xmemset(tls, bp+112, 0, uint64(i)*uint64(unsafe.Sizeof(uintptr(0)))) goto balance_cleanup __15: ; __14: ; nMaxCells = nMaxCells + (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)))).FnCell) + int32(uint64(unsafe.Sizeof([4]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0))))) if !(libc.PostDecInt32(&i, 1) == 0) { goto __16 } goto __11 __16: ; if !((*MemPage)(unsafe.Pointer(pParent)).FnOverflow != 0 && i+nxDiv == int32(*(*U16)(unsafe.Pointer(pParent + 28)))) { goto __17 } *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(pParent + 40)) *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 136 /* &apDiv[0] */ + uintptr(i)*8)))) (*MemPage)(unsafe.Pointer(pParent)).FnOverflow = U8(0) goto __18 __17: *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow)))))))) *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 136 /* &apDiv[0] */ + uintptr(i)*8)))) // Drop the cell from the parent page. apDiv[i] still points to // the cell within the parent, even though it has been dropped. // This is safe because dropping a cell only overwrites the first // four bytes of it, and this function does not need the first // four bytes of the divider cell. So the pointer is safe to use // later on. // // But not if we are in secure-delete mode. In secure-delete mode, // the dropCell() routine will overwrite the entire cell with zeroes. // In this case, temporarily copy the cell into the aOvflSpace[] // buffer. It will be copied out again as soon as the aSpace[] buffer // is allocated. if !(int32((*BtShared)(unsafe.Pointer(pBt)).FbtsFlags)&BTS_FAST_SECURE != 0) { goto __19 } // If the following if() condition is not true, the db is corrupted. // The call to dropCell() below will detect this. iOff = int32(*(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8))) - int32((*MemPage)(unsafe.Pointer(pParent)).FaData) if !(iOff+*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) <= int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize)) { goto __20 } libc.Xmemcpy(tls, aOvflSpace+uintptr(iOff), *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)), uint64(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)))) *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)) = aOvflSpace + uintptr((int64(*(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)))-int64((*MemPage)(unsafe.Pointer(pParent)).FaData))/1) __20: ; __19: ; dropCell(tls, pParent, i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow), *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)), bp+172) __18: ; goto __10 __11: ; // Make nMaxCells a multiple of 4 in order to preserve 8-byte // alignment nMaxCells = (nMaxCells + 3) & libc.CplInt32(3) // Allocate space for memory structures szScratch = int32(uint64(nMaxCells)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(nMaxCells)*uint64(unsafe.Sizeof(U16(0))) + uint64((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) // aSpace1 (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FapCell = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(szScratch)) if !((*CellArray)(unsafe.Pointer(bp+8)).FapCell == uintptr(0)) { goto __21 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = SQLITE_NOMEM goto balance_cleanup __21: ; (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FszCell = (*CellArray)(unsafe.Pointer(bp+8)).FapCell + uintptr(nMaxCells)*8 aSpace1 = (*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(nMaxCells)*2 // Load pointers to all cells on sibling pages and the divider cells // into the local b.apCell[] array. Make copies of the divider cells // into space obtained from aSpace1[]. The divider cells have already // been removed from pParent. // // If the siblings are on leaf pages, then the child pointers of the // divider cells are stripped from the cells before they are copied // into aSpace1[]. In this way, all cells in b.apCell[] are without // child pointers. If siblings are not leaves, then all cell in // b.apCell[] include child pointers. Either way, all cells in b.apCell[] // are alike. // // leafCorrection: 4 if pPage is a leaf. 0 if pPage is not a leaf. // leafData: 1 if pPage holds key+data and pParent holds only keys. (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef = *(*uintptr)(unsafe.Pointer(bp + 112)) leafCorrection = U16(int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FpRef)).Fleaf) * 4) leafData = int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef)).FintKeyLeaf) i = 0 __22: if !(i < nOld) { goto __24 } pOld = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) limit = int32((*MemPage)(unsafe.Pointer(pOld)).FnCell) aData = (*MemPage)(unsafe.Pointer(pOld)).FaData maskPage = (*MemPage)(unsafe.Pointer(pOld)).FmaskPage piCell = aData + uintptr((*MemPage)(unsafe.Pointer(pOld)).FcellOffset) // Verify that all sibling pages are of the same "type" (table-leaf, // table-interior, index-leaf, or index-interior). if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData)))) { goto __25 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74061) goto balance_cleanup __25: ; // Load b.apCell[] with pointers to all cells in pOld. If pOld // contains overflow cells, include them in the b.apCell[] array // in the correct spot. // // Note that when there are multiple overflow cells, it is always the // case that they are sequential and adjacent. This invariant arises // because multiple overflows can only occurs when inserting divider // cells into a parent on a prior balance, and divider cells are always // adjacent and are inserted in order. There is an assert() tagged // with "NOTE 1" in the overflow cell insertion loop to prove this // invariant. // // This must be done in advance. Once the balance starts, the cell // offset section of the btree page will be overwritten and we will no // long be able to find the cells if a pointer to each cell is not saved // first. libc.Xmemset(tls, (*CellArray)(unsafe.Pointer(bp+8)).FszCell+uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2, 0, uint64(unsafe.Sizeof(U16(0)))*uint64(limit+int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow))) if !(int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow) > 0) { goto __26 } if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74085) goto balance_cleanup __27: ; limit = int32(*(*U16)(unsafe.Pointer(pOld + 28))) j = 0 __28: if !(j < limit) { goto __30 } *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = aData + uintptr(int32(maskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(piCell))))) piCell += uintptr(2) (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ goto __29 __29: j++ goto __28 goto __30 __30: ; k = 0 __31: if !(k < int32((*MemPage)(unsafe.Pointer(pOld)).FnOverflow)) { goto __33 } // NOTE 1 *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = *(*uintptr)(unsafe.Pointer(pOld + 40 + uintptr(k)*8)) (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ goto __32 __32: k++ goto __31 goto __33 __33: ; __26: ; piEnd = aData + uintptr((*MemPage)(unsafe.Pointer(pOld)).FcellOffset) + uintptr(2*int32((*MemPage)(unsafe.Pointer(pOld)).FnCell)) __34: if !(piCell < piEnd) { goto __35 } *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = aData + uintptr(int32(maskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(piCell))))) piCell += uintptr(2) (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ goto __34 __35: ; *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell if !(i < nOld-1 && !(leafData != 0)) { goto __36 } sz = U16(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4))) *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = sz pTemp = aSpace1 + uintptr(iSpace1) iSpace1 = iSpace1 + int32(sz) libc.Xmemcpy(tls, pTemp, *(*uintptr)(unsafe.Pointer(bp + 136 + uintptr(i)*8)), uint64(sz)) *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)) = pTemp + uintptr(leafCorrection) *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = U16(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2))) - int32(leafCorrection)) if !!(int32((*MemPage)(unsafe.Pointer(pOld)).Fleaf) != 0) { goto __37 } // The right pointer of the child page pOld becomes the left // pointer of the divider cell libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*8)), (*MemPage)(unsafe.Pointer(pOld)).FaData+8, uint64(4)) goto __38 __37: ; __39: if !(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2))) < 4) { goto __40 } // Do not allow any cells smaller than 4 bytes. If a smaller cell // does exist, pad it with 0x00 bytes. *(*U8)(unsafe.Pointer(aSpace1 + uintptr(libc.PostIncInt32(&iSpace1, 1)))) = U8(0x00) *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2))++ goto __39 __40: ; __38: ; (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell++ __36: ; goto __23 __23: i++ goto __22 goto __24 __24: ; // Figure out the number of pages needed to hold all b.nCell cells. // Store this number in "k". Also compute szNew[] which is the total // size of all cells on the i-th page and cntNew[] which is the index // in b.apCell[] of the cell that divides page i from page i+1. // cntNew[k] should equal b.nCell. // // Values computed by this block: // // k: The total number of sibling pages // szNew[i]: Spaced used on the i-th sibling page. // cntNew[i]: Index in b.apCell[] and b.szCell[] for the first cell to // the right of the i-th sibling page. // usableSpace: Number of bytes of space available on each sibling. // usableSpace = int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(12) + U32(leafCorrection)) i = libc.AssignInt32(&k, 0) __41: if !(i < nOld) { goto __43 } p = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) = (*MemPage)(unsafe.Pointer(p)).FaDataEnd *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) if !(k != 0 && *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) == *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k-1)*4))) { goto __44 } k-- // Omit b.ixNx[] entry for child pages with no cells __44: ; if !!(leafData != 0) { goto __45 } k++ *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) = (*MemPage)(unsafe.Pointer(pParent)).FaDataEnd *(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) + 1 __45: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = usableSpace - (*MemPage)(unsafe.Pointer(p)).FnFree j = 0 __46: if !(j < int32((*MemPage)(unsafe.Pointer(p)).FnOverflow)) { goto __48 } *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) += 2 + int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(p)).FxCellSize})).f(tls, p, *(*uintptr)(unsafe.Pointer(p + 40 + uintptr(j)*8)))) goto __47 __47: j++ goto __46 goto __48 __48: ; *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) goto __42 __42: i++ k++ goto __41 goto __43 __43: ; k = nOld i = 0 __49: if !(i < k) { goto __51 } __52: if !(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) > usableSpace) { goto __53 } if !(i+1 >= k) { goto __54 } k = i + 2 if !(k > NB+2) { goto __55 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74186) goto balance_cleanup __55: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(k-1)*4)) = 0 *(*int32)(unsafe.Pointer(bp + 196 + uintptr(k-1)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell __54: ; sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))-1)) *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) -= sz1 if !!(leafData != 0) { goto __56 } if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { goto __57 } sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) goto __58 __57: sz1 = 0 __58: ; __56: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i+1)*4)) += sz1 *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))-- goto __52 __53: ; __59: if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { goto __60 } sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) if !(*(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4))+sz1 > usableSpace) { goto __61 } goto __60 __61: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) += sz1 *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4))++ if !!(leafData != 0) { goto __62 } if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { goto __63 } sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)))) goto __64 __63: sz1 = 0 __64: ; __62: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i+1)*4)) -= sz1 goto __59 __60: ; if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) >= (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { goto __65 } k = i + 1 goto __66 __65: if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) <= func() int32 { if i > 0 { return *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) } return 0 }()) { goto __67 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74219) goto balance_cleanup __67: ; __66: ; goto __50 __50: i++ goto __49 goto __51 __51: ; // The packing computed by the previous block is biased toward the siblings // on the left side (siblings with smaller keys). The left siblings are // always nearly full, while the right-most sibling might be nearly empty. // The next block of code attempts to adjust the packing of siblings to // get a better balance. // // This adjustment is more than an optimization. The packing above might // be so out of balance as to be illegal. For example, the right-most // sibling might be completely empty. This adjustment is not optional. i = k - 1 __68: if !(i > 0) { goto __70 } szRight = *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) // Size of sibling on the right szLeft = *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i-1)*4)) // Index of first cell to the left of right sibling r = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) - 1 d = r + 1 - leafData cachedCellSize(tls, bp+8, d) __71: ; cachedCellSize(tls, bp+8, r) if !(szRight != 0 && (bBulk != 0 || szRight+int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2)))+2 > szLeft-(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2)))+func() int32 { if i == k-1 { return 0 } return 2 }()))) { goto __74 } goto __73 __74: ; szRight = szRight + (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2))) + 2) szLeft = szLeft - (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2))) + 2) *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) = r r-- d-- goto __72 __72: if r >= 0 { goto __71 } goto __73 __73: ; *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i)*4)) = szRight *(*int32)(unsafe.Pointer(bp + 152 + uintptr(i-1)*4)) = szLeft if !(*(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-1)*4)) <= func() int32 { if i > 1 { return *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i-2)*4)) } return 0 }()) { goto __75 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74261) goto balance_cleanup __75: ; goto __69 __69: i-- goto __68 goto __70 __70: ; // Sanity check: For a non-corrupt database file one of the follwing // must be true: // (1) We found one or more cells (cntNew[0])>0), or // (2) pPage is a virtual root page. A virtual root page is when // the real root page is page 1 and we are the only child of // that page. // Allocate k new pages. Reuse old pages where possible. pageFlags = int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 112)))).FaData))) i = 0 __76: if !(i < k) { goto __78 } if !(i < nOld) { goto __79 } *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)) = libc.AssignPtrUintptr(bp+216+uintptr(i)*8, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)))).FpDbPage) nNew++ if !(Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256)))).FpDbPage) != 1+libc.Bool32(i == iParentIdx-nxDiv) && *(*int32)(unsafe.Pointer(bp + 172)) == SQLITE_OK) { goto __81 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74294) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __82 } goto balance_cleanup __82: ; goto __80 __79: ; *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = allocateBtreePage(tls, pBt, bp+256, bp+264, func() uint32 { if bBulk != 0 { return uint32(1) } return *(*Pgno)(unsafe.Pointer(bp + 264)) }(), uint8(0)) if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __83 } goto balance_cleanup __83: ; zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)), pageFlags) *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)) nNew++ *(*int32)(unsafe.Pointer(bp + 176 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell // Set the pointer-map entry for the new sibling page. if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __84 } ptrmapPut(tls, pBt, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 256 /* pNew */)))).Fpgno, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+172) if !(*(*int32)(unsafe.Pointer(bp + 172)) != SQLITE_OK) { goto __85 } goto balance_cleanup __85: ; __84: ; __80: ; goto __77 __77: i++ goto __76 goto __78 __78: ; // Reassign page numbers so that the new pages are in ascending order. // This helps to keep entries in the disk file in order so that a scan // of the table is closer to a linear scan through the file. That in turn // helps the operating system to deliver pages from the disk more rapidly. // // An O(n^2) insertion sort algorithm is used, but since n is never more // than (NB+2) (a small constant), that should not be a problem. // // When NB==3, this one optimization makes the database about 25% faster // for large insertions and deletions. i = 0 __86: if !(i < nNew) { goto __88 } *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(i)*4)) = libc.AssignPtrUint32(bp+288+uintptr(i)*4, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno) *(*U16)(unsafe.Pointer(bp + 308 + uintptr(i)*2)) = (*DbPage)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FpDbPage)).Fflags j = 0 __89: if !(j < i) { goto __91 } if !(*(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(j)*4)) == *(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(i)*4))) { goto __92 } // This branch is taken if the set of sibling pages somehow contains // duplicate entries. This can happen if the database is corrupt. // It would be simpler to detect this as part of the loop below, but // we do the detection here in order to avoid populating the pager // cache with two separate objects associated with the same // page number. *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74340) goto balance_cleanup __92: ; goto __90 __90: j++ goto __89 goto __91 __91: ; goto __87 __87: i++ goto __86 goto __88 __88: ; i = 0 __93: if !(i < nNew) { goto __95 } iBest = 0 // aPgno[] index of page number to use j = 1 __96: if !(j < nNew) { goto __98 } if !(*(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(j)*4)) < *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4))) { goto __99 } iBest = j __99: ; goto __97 __97: j++ goto __96 goto __98 __98: ; *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) = *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4)) *(*Pgno)(unsafe.Pointer(bp + 268 + uintptr(iBest)*4)) = 0xffffffff if !(iBest != i) { goto __100 } if !(iBest > i) { goto __101 } Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iBest)*8)))).FpDbPage, (*BtShared)(unsafe.Pointer(pBt)).FnPage+U32(iBest)+U32(1), uint16(0)) __101: ; Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FpDbPage, *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)), *(*U16)(unsafe.Pointer(bp + 308 + uintptr(iBest)*2))) (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno = *(*Pgno)(unsafe.Pointer(bp + 264 /* pgno */)) __100: ; goto __94 __94: i++ goto __93 goto __95 __95: ; Xsqlite3Put4byte(tls, pRight, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(nNew-1)*8)))).Fpgno) // If the sibling pages are not leaves, ensure that the right-child pointer // of the right-most new sibling page is set to the value that was // originally in the same field of the right-most old sibling page. if !(pageFlags&PTF_LEAF == 0 && nOld != nNew) { goto __102 } pOld1 = *(*uintptr)(unsafe.Pointer(func() uintptr { if nNew > nOld { return bp + 216 /* &apNew[0] */ } return bp + 112 /* &apOld[0] */ }() + uintptr(nOld-1)*8)) libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(nNew-1)*8)))).FaData+8, (*MemPage)(unsafe.Pointer(pOld1)).FaData+8, uint64(4)) __102: ; // Make any required updates to pointer map entries associated with // cells stored on sibling pages following the balance operation. Pointer // map entries associated with divider cells are set by the insertCell() // routine. The associated pointer map entries are: // // a) if the cell contains a reference to an overflow chain, the // entry associated with the first page in the overflow chain, and // // b) if the sibling pages are not leaves, the child page associated // with the cell. // // If the sibling pages are not leaves, then the pointer map entry // associated with the right-child of each sibling may also need to be // updated. This happens below, after the sibling pages have been // populated, not here. if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __103 } pNew1 = libc.AssignUintptr(&pOld2, *(*uintptr)(unsafe.Pointer(bp + 216))) cntOldNext = int32((*MemPage)(unsafe.Pointer(pNew1)).FnCell) + int32((*MemPage)(unsafe.Pointer(pNew1)).FnOverflow) iNew = 0 iOld = 0 i = 0 __104: if !(i < (*CellArray)(unsafe.Pointer(bp+8)).FnCell) { goto __106 } pCell = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(i)*8)) __107: if !(i == cntOldNext) { goto __108 } iOld++ if iOld < nNew { pOld2 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iOld)*8)) } else { pOld2 = *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(iOld)*8)) } cntOldNext = cntOldNext + (int32((*MemPage)(unsafe.Pointer(pOld2)).FnCell) + int32((*MemPage)(unsafe.Pointer(pOld2)).FnOverflow) + libc.BoolInt32(!(leafData != 0))) goto __107 __108: ; if !(i == *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iNew)*4))) { goto __109 } pNew1 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(libc.PreIncInt32(&iNew, 1))*8)) if !!(leafData != 0) { goto __110 } goto __105 __110: ; __109: ; // Cell pCell is destined for new sibling page pNew. Originally, it // was either part of sibling page iOld (possibly an overflow cell), // or else the divider cell to the left of sibling page iOld. So, // if sibling page iOld had the same page number as pNew, and if // pCell really was a part of sibling page iOld (not a divider or // overflow cell), we can skip updating the pointer map entries. if !(iOld >= nNew || (*MemPage)(unsafe.Pointer(pNew1)).Fpgno != *(*Pgno)(unsafe.Pointer(bp + 288 + uintptr(iOld)*4)) || !(Uptr(pCell) >= Uptr((*MemPage)(unsafe.Pointer(pOld2)).FaData) && Uptr(pCell) < Uptr((*MemPage)(unsafe.Pointer(pOld2)).FaDataEnd))) { goto __111 } if !!(leafCorrection != 0) { goto __112 } ptrmapPut(tls, pBt, Xsqlite3Get4byte(tls, pCell), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pNew1)).Fpgno, bp+172) __112: ; if !(int32(cachedCellSize(tls, bp+8, i)) > int32((*MemPage)(unsafe.Pointer(pNew1)).FminLocal)) { goto __113 } ptrmapPutOvflPtr(tls, pNew1, pOld2, pCell, bp+172) __113: ; if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __114 } goto balance_cleanup __114: ; __111: ; goto __105 __105: i++ goto __104 goto __106 __106: ; __103: ; // Insert new divider cells into pParent. i = 0 __115: if !(i < nNew-1) { goto __117 } pNew2 = *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)) j = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(i)*4)) pCell1 = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(j)*8)) sz2 = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(j)*2))) + int32(leafCorrection) pTemp1 = aOvflSpace + uintptr(iOvflSpace) if !!(int32((*MemPage)(unsafe.Pointer(pNew2)).Fleaf) != 0) { goto __118 } libc.Xmemcpy(tls, (*MemPage)(unsafe.Pointer(pNew2)).FaData+8, pCell1, uint64(4)) goto __119 __118: if !(leafData != 0) { goto __120 } j-- (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pNew2)).FxParseCell})).f(tls, pNew2, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(j)*8)), bp+320 /* &info */) pCell1 = pTemp1 sz2 = 4 + Xsqlite3PutVarint(tls, pCell1+4, uint64((*CellInfo)(unsafe.Pointer(bp+320)).FnKey)) pTemp1 = uintptr(0) goto __121 __120: pCell1 -= uintptr(4) // Obscure case for non-leaf-data trees: If the cell at pCell was // previously stored on a leaf node, and its reported size was 4 // bytes, then it may actually be smaller than this // (see btreeParseCellPtr(), 4 bytes is the minimum size of // any cell). But it is important to pass the correct size to // insertCell(), so reparse the cell now. // // This can only happen for b-trees used to evaluate "IN (SELECT ...)" // and WITHOUT ROWID tables with exactly one column which is the // primary key. if !(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(j)*2))) == 4) { goto __122 } sz2 = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, pCell1)) __122: ; __121: ; __119: ; iOvflSpace = iOvflSpace + sz2 k = 0 __123: if !(*(*int32)(unsafe.Pointer(bp + 8 + 80 + uintptr(k)*4)) <= j && k < NB*2) { goto __125 } goto __124 __124: k++ goto __123 goto __125 __125: ; pSrcEnd = *(*uintptr)(unsafe.Pointer(bp + 8 + 32 + uintptr(k)*8)) if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = Xsqlite3CorruptError(tls, 74497) goto balance_cleanup __126: ; insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+172) if !(*(*int32)(unsafe.Pointer(bp + 172)) != SQLITE_OK) { goto __127 } goto balance_cleanup __127: ; goto __116 __116: i++ goto __115 goto __117 __117: ; // Now update the actual sibling pages. The order in which they are updated // is important, as this code needs to avoid disrupting any page from which // cells may still to be read. In practice, this means: // // (1) If cells are moving left (from apNew[iPg] to apNew[iPg-1]) // then it is not safe to update page apNew[iPg] until after // the left-hand sibling apNew[iPg-1] has been updated. // // (2) If cells are moving right (from apNew[iPg] to apNew[iPg+1]) // then it is not safe to update page apNew[iPg] until after // the right-hand sibling apNew[iPg+1] has been updated. // // If neither of the above apply, the page is safe to update. // // The iPg value in the following loop starts at nNew-1 goes down // to 0, then back up to nNew-1 again, thus making two passes over // the pages. On the initial downward pass, only condition (1) above // needs to be tested because (2) will always be true from the previous // step. On the upward pass, both conditions are always true, so the // upwards pass simply processes pages that were missed on the downward // pass. i = 1 - nNew __128: if !(i < nNew) { goto __130 } if i < 0 { iPg = -i } else { iPg = i } if !(*(*U8)(unsafe.Pointer(bp + uintptr(iPg))) != 0) { goto __131 } goto __129 __131: ; // Skip pages already processed if !(i >= 0 || *(*int32)(unsafe.Pointer(bp + 176 + uintptr(iPg-1)*4)) >= *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg-1)*4))) { goto __132 } // Verify condition (1): If cells are moving left, update iPg // only after iPg-1 has already been updated. // Verify condition (2): If cells are moving right, update iPg // only after iPg+1 has already been updated. if !(iPg == 0) { goto __133 } iNew1 = libc.AssignInt32(&iOld1, 0) nNewCell = *(*int32)(unsafe.Pointer(bp + 196)) goto __134 __133: if iPg < nOld { iOld1 = *(*int32)(unsafe.Pointer(bp + 176 + uintptr(iPg-1)*4)) + libc.BoolInt32(!(leafData != 0)) } else { iOld1 = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell } iNew1 = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg-1)*4)) + libc.BoolInt32(!(leafData != 0)) nNewCell = *(*int32)(unsafe.Pointer(bp + 196 + uintptr(iPg)*4)) - iNew1 __134: ; *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = editPage(tls, *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iPg)*8)), iOld1, iNew1, nNewCell, bp+8) if !(*(*int32)(unsafe.Pointer(bp + 172)) != 0) { goto __135 } goto balance_cleanup __135: ; *(*U8)(unsafe.Pointer(bp + uintptr(iPg)))++ (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(iPg)*8)))).FnFree = usableSpace - *(*int32)(unsafe.Pointer(bp + 152 + uintptr(iPg)*4)) __132: ; goto __129 __129: i++ goto __128 goto __130 __130: ; // All pages have been processed exactly once if !(isRoot != 0 && int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) == 0 && int32((*MemPage)(unsafe.Pointer(pParent)).FhdrOffset) <= (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216)))).FnFree) { goto __136 } // The root page of the b-tree now contains no cells. The only sibling // page is the right-child of the parent. Copy the contents of the // child page into the parent, decreasing the overall height of the // b-tree structure by one. This is described as the "balance-shallower" // sub-algorithm in some documentation. // // If this is an auto-vacuum database, the call to copyNodeContent() // sets all pointer-map entries corresponding to database image pages // for which the pointer is stored within the content being copied. // // It is critical that the child page be defragmented before being // copied into the parent, because if the parent is page 1 then it will // by smaller than the child due to the database header, and so all the // free space needs to be up front. *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) = defragmentPage(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), -1) copyNodeContent(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), pParent, bp+172) freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 216)), bp+172) goto __137 __136: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && !(leafCorrection != 0)) { goto __138 } // Fix the pointer map entries associated with the right-child of each // sibling page. All other pointer map entries have already been taken // care of. i = 0 __139: if !(i < nNew) { goto __141 } key = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).FaData+8) ptrmapPut(tls, pBt, key, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8)))).Fpgno, bp+172) goto __140 __140: i++ goto __139 goto __141 __141: ; __138: ; __137: ; // Free any old pages that were not reused as new pages. i = nNew __142: if !(i < nOld) { goto __144 } freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8)), bp+172) goto __143 __143: i++ goto __142 goto __144 __144: ; // Cleanup before returning. balance_cleanup: Xsqlite3DbFree(tls, uintptr(0), (*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell) i = 0 __145: if !(i < nOld) { goto __147 } releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 112 + uintptr(i)*8))) goto __146 __146: i++ goto __145 goto __147 __147: ; i = 0 __148: if !(i < nNew) { goto __150 } releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 216 + uintptr(i)*8))) goto __149 __149: i++ goto __148 goto __150 __150: ; return *(*int32)(unsafe.Pointer(bp + 172 /* rc */)) } // This function is called when the root page of a b-tree structure is // overfull (has one or more overflow pages). // // A new child page is allocated and the contents of the current root // page, including overflow cells, are copied into the child. The root // page is then overwritten to make it an empty page with the right-child // pointer pointing to the new page. // // Before returning, all pointer-map entries corresponding to pages // that the new child-page now contains pointers to are updated. The // entry corresponding to the new right-child pointer of the root // page is also updated. // // If successful, *ppChild is set to contain a reference to the child // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74662:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var rc int32 at bp+12, 4 // Return value from subprocedures *(*uintptr)(unsafe.Pointer(bp /* pChild */)) = uintptr(0) // Pointer to a new child page *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */)) = Pgno(0) // Page number of the new child page var pBt uintptr = (*MemPage)(unsafe.Pointer(pRoot)).FpBt // The BTree // Make pRoot, the root page of the b-tree, writable. Allocate a new // page that will become the new right-child of pPage. Copy the contents // of the node stored on pRoot into the new child page. *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pRoot)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+8, (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, uint8(0)) copyNodeContent(tls, pRoot, *(*uintptr)(unsafe.Pointer(bp /* pChild */)), bp+12) if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, bp+12) } } if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { *(*uintptr)(unsafe.Pointer(ppChild)) = uintptr(0) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pChild */))) return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } // Copy the overflow cells from pRoot to pChild libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp))+28, pRoot+28, uint64((*MemPage)(unsafe.Pointer(pRoot)).FnOverflow)*uint64(unsafe.Sizeof(U16(0)))) libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp))+40, pRoot+40, uint64((*MemPage)(unsafe.Pointer(pRoot)).FnOverflow)*uint64(unsafe.Sizeof(uintptr(0)))) (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pChild */)))).FnOverflow = (*MemPage)(unsafe.Pointer(pRoot)).FnOverflow // Zero the contents of pRoot. Then install pChild as the right-child. zeroPage(tls, pRoot, int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData)))&libc.CplInt32(PTF_LEAF)) Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8), *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoChild */))) *(*uintptr)(unsafe.Pointer(ppChild)) = *(*uintptr)(unsafe.Pointer(bp /* pChild */)) return SQLITE_OK } // Return SQLITE_CORRUPT if any cursor other than pCur is currently valid // on the same B-tree as pCur. // // This can occur if a database is corrupt with two or more SQL tables // pointing to the same b-tree. If an insert occurs on one SQL table // and causes a BEFORE TRIGGER to do a secondary insert on the other SQL // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74720:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { return Xsqlite3CorruptError(tls, 74727) } } return SQLITE_OK } // The page that pCur currently points to has just been modified in // some way. This function figures out if this modification means the // tree needs to be balanced, and if so calls the appropriate balancing // routine. Balancing routines are: // // balance_quick() // balance_deeper() // balance_nonroot() func balance(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74743:12: */ bp := tls.Alloc(13) defer tls.Free(13) var rc int32 = SQLITE_OK var nMin int32 = int32((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize * U32(2) / U32(3)) // var aBalanceQuickSpace [13]U8 at bp, 13 var pFree uintptr = uintptr(0) for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK { var iPage int32 var pPage uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { break } if int32((*MemPage)(unsafe.Pointer(pPage)).FnOverflow) == 0 && (*MemPage)(unsafe.Pointer(pPage)).FnFree <= nMin { break } else if libc.AssignInt32(&iPage, int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)) == 0 { if (*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0 && libc.AssignInt32(&rc, anotherValidCursor(tls, pCur)) == SQLITE_OK { // The root page of the b-tree is overfull. In this case call the // balance_deeper() function to create a new child for the root-page // and copy the current contents of the root-page to it. The // next iteration of the do-loop will balance the child page. rc = balance_deeper(tls, pPage, pCur+144+1*8) if rc == SQLITE_OK { (*BtCursor)(unsafe.Pointer(pCur)).FiPage = int8(1) (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(0) *(*U16)(unsafe.Pointer(pCur + 88)) = U16(0) *(*uintptr)(unsafe.Pointer(pCur + 144)) = pPage (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + 1*8)) } } else { break } } else { var pParent uintptr = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iPage-1)*8)) var iIdx int32 = int32(*(*U16)(unsafe.Pointer(pCur + 88 + uintptr(iPage-1)*2))) rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pParent)).FpDbPage) if rc == SQLITE_OK && (*MemPage)(unsafe.Pointer(pParent)).FnFree < 0 { rc = btreeComputeFreeSpace(tls, pParent) } if rc == SQLITE_OK { if (*MemPage)(unsafe.Pointer(pPage)).FintKeyLeaf != 0 && int32((*MemPage)(unsafe.Pointer(pPage)).FnOverflow) == 1 && int32(*(*U16)(unsafe.Pointer(pPage + 28))) == int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) && (*MemPage)(unsafe.Pointer(pParent)).Fpgno != Pgno(1) && int32((*MemPage)(unsafe.Pointer(pParent)).FnCell) == iIdx { // Call balance_quick() to create a new sibling of pPage on which // to store the overflow cell. balance_quick() inserts a new cell // into pParent, which may cause pParent overflow. If this // happens, the next iteration of the do-loop will balance pParent // use either balance_nonroot() or balance_deeper(). Until this // happens, the overflow cell is stored in the aBalanceQuickSpace[] // buffer. // // The purpose of the following assert() is to check that only a // single call to balance_quick() is made for each call to this // function. If this were not verified, a subtle bug involving reuse // of the aBalanceQuickSpace[] might sneak in. rc = balance_quick(tls, pParent, pPage, bp) } else { // In this case, call balance_nonroot() to redistribute cells // between pPage and up to 2 of its sibling pages. This involves // modifying the contents of pParent, which may cause pParent to // become overfull or underfull. The next iteration of the do-loop // will balance the parent page to correct this. // // If the parent page becomes overfull, the overflow cell or cells // are stored in the pSpace buffer allocated immediately below. // A subsequent iteration of the do-loop will deal with this by // calling balance_nonroot() (balance_deeper() may be called first, // but it doesn't deal with overflow cells - just moves them to a // different page). Once this subsequent call to balance_nonroot() // has completed, it is safe to release the pSpace buffer used by // the previous call, as the overflow cell data will have been // copied either into the body of a database page or into the new // pSpace buffer passed to the latter call to balance_nonroot(). var pSpace uintptr = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)) rc = balance_nonroot(tls, pParent, iIdx, pSpace, libc.Bool32(iPage == 1), int32((*BtCursor)(unsafe.Pointer(pCur)).Fhints)&BTREE_BULKLOAD) if pFree != 0 { // If pFree is not NULL, it points to the pSpace buffer used // by a previous call to balance_nonroot(). Its contents are // now stored either on real database pages or within the // new pSpace buffer, so it may be safely freed here. Xsqlite3PageFree(tls, pFree) } // The pSpace buffer will be freed after the next call to // balance_nonroot(), or just before this function returns, whichever // comes first. pFree = pSpace } } (*MemPage)(unsafe.Pointer(pPage)).FnOverflow = U8(0) // The next iteration of the do-loop balances the parent page. releasePage(tls, pPage) (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) } } if pFree != 0 { Xsqlite3PageFree(tls, pFree) } return rc } // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74869:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros var i int32 for i = 0; i < iAmt && int32(*(*U8)(unsafe.Pointer(pDest + uintptr(i)))) == 0; i++ { } if i < iAmt { var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if rc != 0 { return rc } libc.Xmemset(tls, pDest+uintptr(i), 0, uint64(iAmt-i)) } } else { if nData < iAmt { // Mixed read data and zeros at the end. Make a recursive call // to write the zeros then fall through to write the real data var rc int32 = btreeOverwriteContent(tls, pPage, pDest+uintptr(nData), pX, iOffset+nData, iAmt-nData) if rc != 0 { return rc } iAmt = nData } if libc.Xmemcmp(tls, pDest, (*BtreePayload)(unsafe.Pointer(pX)).FpData+uintptr(iOffset), uint64(iAmt)) != 0 { var rc int32 = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if rc != 0 { return rc } // In a corrupt database, it is possible for the source and destination // buffers to overlap. This is harmless since the database is already // corrupt but it does cause valgrind and ASAN warnings. So use // memmove(). libc.Xmemmove(tls, pDest, (*BtreePayload)(unsafe.Pointer(pX)).FpData+uintptr(iOffset), uint64(iAmt)) } } return SQLITE_OK } // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74912:12: */ bp := tls.Alloc(8) defer tls.Free(8) var iOffset int32 // Next byte of pX->pData to write var nTotal int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData + (*BtreePayload)(unsafe.Pointer(pX)).FnZero // Total bytes of to write var rc int32 // Return code *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = (*BtCursor)(unsafe.Pointer(pCur)).FpPage // Page being written var pBt uintptr // Btree var ovflPgno Pgno // Next overflow page to write var ovflPageSize U32 // Size to write on overflow page if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { return Xsqlite3CorruptError(tls, 74924) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, 0, int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal)) if rc != 0 { return rc } if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) == nTotal { return SQLITE_OK } // Now overwrite the overflow pages iOffset = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) ovflPgno = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr(iOffset)) pBt = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpBt ovflPageSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) for __ccgo := true; __ccgo; __ccgo = iOffset < nTotal { rc = btreeGetPage(tls, pBt, ovflPgno, bp, 0) if rc != 0 { return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { rc = Xsqlite3CorruptError(tls, 74943) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) } else { ovflPageSize = U32(nTotal - iOffset) } rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr(4), pX, iOffset, int32(ovflPageSize)) } Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpDbPage) if rc != 0 { return rc } iOffset = int32(U32(iOffset) + ovflPageSize) } return SQLITE_OK } // Insert a new record into the BTree. The content of the new record // is described by the pX object. The pCur cursor is used only to // define what table the record should be inserted into, and is left // pointing at a random location. // // For a table btree (used for rowid tables), only the pX.nKey value of // the key is used. The pX.pKey value must be NULL. The pX.nKey is the // rowid or INTEGER PRIMARY KEY of the row. The pX.nData,pData,nZero fields // hold the content of the row. // // For an index btree (used for indexes and WITHOUT ROWID tables), the // key is an arbitrary byte sequence stored in pX.pKey,nKey. The // pX.pData,nData,nZero fields must be zero. // // If the seekResult parameter is non-zero, then a successful call to // MovetoUnpacked() to seek cursor pCur to (pKey,nKey) has already // been performed. In other words, if seekResult!=0 then the cursor // is currently pointing to a cell that will be adjacent to the cell // to be inserted. If seekResult<0 then pCur points to a cell that is // smaller then (pKey,nKey). If seekResult>0 then pCur points to a cell // that is larger than (pKey,nKey). // // If seekResult==0, that means pCur is pointing at some unknown location. // In that case, this routine must seek the cursor to the correct insertion // point for (pKey,nKey) before doing the insertion. For index btrees, // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:74991:20: */ bp := tls.Alloc(136) defer tls.Free(136) // var rc int32 at bp+104, 4 // var loc int32 at bp, 4 // -1: before desired location +1: after // var szNew int32 at bp+108, 4 var idx int32 var pPage uintptr var p uintptr var pBt uintptr var oldCell uintptr var newCell uintptr // var r UnpackedRecord at bp+8, 24 // var x2 BtreePayload at bp+32, 48 var ovfl Pgno // var info CellInfo at bp+80, 24 // var info1 CellInfo at bp+112, 24 *(*int32)(unsafe.Pointer(bp /* loc */)) = seekResult *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = 0 p = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree pBt = (*Btree)(unsafe.Pointer(p)).FpBt newCell = uintptr(0) // Save the positions of any other cursors open on this table. // // In some cases, the call to btreeMoveto() below is a no-op. For // example, when inserting data into a table with auto-generated integer // keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the // integer key to use. It then calls this function to actually insert the // data into the intkey B-Tree. In this case btreeMoveto() recognizes // that the cursor is already where it needs to be and returns without // doing any work. To avoid thwarting these optimizations, it is important // not to clear the cursor here. if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Multiple != 0) { goto __1 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __2 } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) __2: ; if !(*(*int32)(unsafe.Pointer(bp)) != 0 && int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) < 0) { goto __3 } // This can only happen if the schema is corrupt such that there is more // than one table or index with the same root page as used by the cursor. // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. return Xsqlite3CorruptError(tls, 75030) __3: ; __1: ; if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK) { goto __4 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = moveToRoot(tls, pCur) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0 && *(*int32)(unsafe.Pointer(bp + 104)) != SQLITE_EMPTY) { goto __5 } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) __5: ; __4: ; // Assert that the caller has been consistent. If this cursor was opened // expecting an index b-tree, then the caller should be inserting blob // keys with no associated data. If the cursor was opened expecting an // intkey table, the caller should be inserting integer keys with a // blob of associated data. if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) { goto __6 } // If this is an insert into a table b-tree, invalidate any incrblob // cursors open on the row being replaced if !((*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0) { goto __8 } invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, 0) __8: ; // If BTREE_SAVEPOSITION is set, the cursor must already be pointing // to a row with the same key as the new entry being inserted. // On the other hand, BTREE_SAVEPOSITION==0 does not imply // that the cursor is not pointing to a row to be overwritten. // So do a complete check. if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_ValidNKey != 0 && (*BtreePayload)(unsafe.Pointer(pX)).FnKey == (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey) { goto __9 } // The cursor is pointing to the entry that is to be // overwritten if !(int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) != 0 && (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload == U32((*BtreePayload)(unsafe.Pointer(pX)).FnData)+U32((*BtreePayload)(unsafe.Pointer(pX)).FnZero)) { goto __11 } // New entry is the same size as the old. Do an overwrite return btreeOverwriteCell(tls, pCur, pX) __11: ; goto __10 __9: if !(*(*int32)(unsafe.Pointer(bp)) == 0) { goto __12 } // The cursor is *not* pointing to the cell to be overwritten, nor // to an adjacent cell. Move the cursor so that it is pointing either // to the cell to be overwritten or an adjacent cell. *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeTableMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, libc.Bool32(flags&BTREE_APPEND != 0), bp) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __13 } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) __13: ; __12: ; __10: ; goto __7 __6: // This is an index or a WITHOUT ROWID table // If BTREE_SAVEPOSITION is set, the cursor must already be pointing // to a row with the same key as the new entry being inserted. ; // If the cursor is not already pointing either to the cell to be // overwritten, or if a new cell is being inserted, if the cursor is // not pointing to an immediately adjacent cell, then move the cursor // so that it does. if !(*(*int32)(unsafe.Pointer(bp)) == 0 && flags&BTREE_SAVEPOSITION == 0) { goto __14 } if !((*BtreePayload)(unsafe.Pointer(pX)).FnMem != 0) { goto __15 } (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FpKeyInfo = (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FaMem = (*BtreePayload)(unsafe.Pointer(pX)).FaMem (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FnField = (*BtreePayload)(unsafe.Pointer(pX)).FnMem (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 8 /* &r */)).FeqSeen = U8(0) *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3BtreeIndexMoveto(tls, pCur, bp+8, bp) goto __16 __15: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, libc.Bool32(flags&BTREE_APPEND != 0), bp) __16: ; if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __17 } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) __17: ; __14: ; // If the cursor is currently pointing to an entry to be overwritten // and the new content is the same as as the old, then use the // overwrite optimization. if !(*(*int32)(unsafe.Pointer(bp)) == 0) { goto __18 } getCellInfo(tls, pCur) if !((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey == (*BtreePayload)(unsafe.Pointer(pX)).FnKey) { goto __19 } (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FpData = (*BtreePayload)(unsafe.Pointer(pX)).FpKey (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnData = int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey) (*BtreePayload)(unsafe.Pointer(bp + 32 /* &x2 */)).FnZero = 0 return btreeOverwriteCell(tls, pCur, bp+32) __19: ; __18: ; __7: ; pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if !((*MemPage)(unsafe.Pointer(pPage)).FnFree < 0) { goto __20 } if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __21 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3CorruptError(tls, 75147) goto __22 __21: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = btreeComputeFreeSpace(tls, pPage) __22: ; if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __23 } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) __23: ; __20: ; newCell = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace if !(flags&BTREE_PREFORMAT != 0) { goto __24 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize if !(*(*int32)(unsafe.Pointer(bp + 108)) < 4) { goto __26 } *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)) = 4 __26: ; if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*int32)(unsafe.Pointer(bp + 108)) > int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal)) { goto __27 } (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, newCell, bp+80 /* &info */) if !((*CellInfo)(unsafe.Pointer(bp+80)).FnPayload != U32((*CellInfo)(unsafe.Pointer(bp+80)).FnLocal)) { goto __28 } ovfl = Xsqlite3Get4byte(tls, newCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))-4)) ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+104) __28: ; __27: ; goto __25 __24: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = fillInCell(tls, pPage, newCell, pX, bp+108) __25: ; if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __29 } goto end_insert __29: ; idx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) if !(*(*int32)(unsafe.Pointer(bp)) == 0) { goto __30 } if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __32 } return Xsqlite3CorruptError(tls, 75183) __32: ; *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __33 } goto end_insert __33: ; oldCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx)))))) if !!(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { goto __34 } libc.Xmemcpy(tls, newCell, oldCell, uint64(4)) __34: ; (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, oldCell, bp+112 /* &info1 */) if !(U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnPayload) { goto __35 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = clearCellOverflow(tls, pPage, oldCell, bp+112 /* &info1 */) goto __36 __35: *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_OK __36: ; *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidOvfl)) if !(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) == *(*int32)(unsafe.Pointer(bp + 108)) && U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) == (*CellInfo)(unsafe.Pointer(bp+112)).FnPayload && (!(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0) || *(*int32)(unsafe.Pointer(bp + 108)) < int32((*MemPage)(unsafe.Pointer(pPage)).FminLocal))) { goto __37 } // Overwrite the old cell with the new if they are the same size. // We could also try to do this if the old cell is smaller, then add // the leftover space to the free list. But experiments show that // doing that is no faster then skipping this optimization and just // calling dropCell() and insertCell(). // // This optimization cannot be used on an autovacuum database if the // new entry uses overflow pages, as the insertCell() call below is // necessary to add the PTRMAP_OVERFLOW1 pointer-map entry. // clearCell never fails when nLocal==nPayload if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __38 } return Xsqlite3CorruptError(tls, 75210) __38: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 108))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __39 } return Xsqlite3CorruptError(tls, 75213) __39: ; libc.Xmemcpy(tls, oldCell, newCell, uint64(*(*int32)(unsafe.Pointer(bp + 108 /* szNew */)))) return SQLITE_OK __37: ; dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+112 /* &info1 */)).FnSize), bp+104) if !(*(*int32)(unsafe.Pointer(bp + 104)) != 0) { goto __40 } goto end_insert __40: ; goto __31 __30: if !(*(*int32)(unsafe.Pointer(bp)) < 0 && int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > 0) { goto __41 } idx = int32(libc.PreIncUint16(&(*BtCursor)(unsafe.Pointer(pCur)).Fix, 1)) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) goto __42 __41: ; __42: ; __31: ; insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 108 /* szNew */)), uintptr(0), uint32(0), bp+104) // If no error has occurred and pPage has an overflow cell, call balance() // to redistribute the cells within the tree. Since balance() may move // the cursor, zero the BtCursor.info.nSize and BTCF_ValidNKey // variables. // // Previous versions of SQLite called moveToRoot() to move the cursor // back to the root page as balance() used to invalidate the contents // of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that, // set the cursor state to "invalid". This makes common insert operations // slightly faster. // // There is a subtle but important optimization here too. When inserting // multiple records into an intkey b-tree using a single cursor (as can // happen while processing an "INSERT INTO ... SELECT" statement), it // is advantageous to leave the cursor pointing to the last entry in // the b-tree if possible. If the cursor is left pointing to the last // entry in the table, and the next row inserted has an integer key // larger than the largest existing key, it is possible to insert the // row without seeking the cursor. This can be a big performance boost. (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) if !((*MemPage)(unsafe.Pointer(pPage)).FnOverflow != 0) { goto __43 } *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey)) *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = balance(tls, pCur) // Must make sure nOverflow is reset to zero even if the balance() // fails. Internal data structure corruption will result otherwise. // Also, set the cursor state to invalid. This stops saveCursorPosition() // from trying to save the current position of the cursor. (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnOverflow = U8(0) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_INVALID) if !(flags&BTREE_SAVEPOSITION != 0 && *(*int32)(unsafe.Pointer(bp + 104)) == SQLITE_OK) { goto __44 } btreeReleaseAllCursorPages(tls, pCur) if !((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo != 0) { goto __45 } (*BtCursor)(unsafe.Pointer(pCur)).FpKey = Xsqlite3Malloc(tls, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) if !((*BtCursor)(unsafe.Pointer(pCur)).FpKey == uintptr(0)) { goto __46 } *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = SQLITE_NOMEM goto __47 __46: libc.Xmemcpy(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, uint64((*BtreePayload)(unsafe.Pointer(pX)).FnKey)) __47: ; __45: ; (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) (*BtCursor)(unsafe.Pointer(pCur)).FnKey = (*BtreePayload)(unsafe.Pointer(pX)).FnKey __44: ; __43: ; end_insert: return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) } // This function is used as part of copying the current row from cursor // pSrc into cursor pDest. If the cursors are open on intkey tables, then // parameter iKey is used as the rowid value when the record is copied // into pDest. Otherwise, the record is copied verbatim. // // This function does not actually write the new value to cursor pDest. // Instead, it creates and populates any required overflow pages and // writes the data for the new cell into the BtShared.pTmpSpace buffer // for the destination database. The size of the cell, in bytes, is left // in BtShared.nPreformatSize. The caller completes the insertion by // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75299:20: */ bp := tls.Alloc(24) defer tls.Free(24) *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_OK var pBt uintptr = (*BtCursor)(unsafe.Pointer(pDest)).FpBt var aOut uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace // Pointer to next output buffer var aIn uintptr // Pointer to next input buffer var nIn U32 // Size of input buffer aIn[] var nRem U32 // Bytes of data still to copy getCellInfo(tls, pSrc) aOut += uintptr(func() uint8 { if (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aOut)) = uint8((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload) return 1 }()) } return uint8(Xsqlite3PutVarint(tls, aOut, uint64((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload))) }()) if (*BtCursor)(unsafe.Pointer(pDest)).FpKeyInfo == uintptr(0) { aOut += uintptr(Xsqlite3PutVarint(tls, aOut, uint64(iKey))) } nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { return Xsqlite3CorruptError(tls, 75313) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { libc.Xmemcpy(tls, aOut, aIn, uint64(nIn)) (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(int64(nIn) + (int64(aOut)-int64((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1) } else { var pSrcPager uintptr = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FpPager var pPgnoOut uintptr = uintptr(0) var ovflIn Pgno = Pgno(0) *(*uintptr)(unsafe.Pointer(bp /* pPageIn */)) = uintptr(0) var pPageOut uintptr = uintptr(0) var nOut U32 // Size of output buffer aOut[] nOut = U32(btreePayloadToLocal(tls, (*BtCursor)(unsafe.Pointer(pDest)).FpPage, int64((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload))) (*BtShared)(unsafe.Pointer(pBt)).FnPreformatSize = int32(int64(nOut) + (int64(aOut)-int64((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace))/1) if nOut < (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload { pPgnoOut = aOut + uintptr(nOut) *(*int32)(unsafe.Pointer(pBt + 144)) += 4 } if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { return Xsqlite3CorruptError(tls, 75336) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } for __ccgo := true; __ccgo; __ccgo = nRem > U32(0) && *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK { nRem = nRem - nOut for __ccgo1 := true; __ccgo1; __ccgo1 = *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK && nOut > U32(0) { if nIn > U32(0) { var nCopy int32 = func() int32 { if nOut < nIn { return int32(nOut) } return int32(nIn) }() libc.Xmemcpy(tls, aOut, aIn, uint64(nCopy)) nOut = nOut - U32(nCopy) nIn = nIn - U32(nCopy) aOut += uintptr(nCopy) aIn += uintptr(nCopy) } if nOut > U32(0) { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) *(*uintptr)(unsafe.Pointer(bp /* pPageIn */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = Xsqlite3PagerGet(tls, pSrcPager, ovflIn, bp, PAGER_GET_READONLY) if *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK { aIn = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) ovflIn = Xsqlite3Get4byte(tls, aIn) aIn += uintptr(4) nIn = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpBt)).FusableSize - U32(4) } } } if *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK && nRem > U32(0) && pPgnoOut != 0 { // var pgnoNew Pgno at bp+16, 4 *(*uintptr)(unsafe.Pointer(bp + 8 /* pNew */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = allocateBtreePage(tls, pBt, bp+8, bp+16, uint32(0), uint8(0)) Xsqlite3Put4byte(tls, pPgnoOut, *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoNew */))) if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && pPageOut != 0 { ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoNew */)), uint8(PTRMAP_OVERFLOW2), (*MemPage)(unsafe.Pointer(pPageOut)).Fpgno, bp+20) } releasePage(tls, pPageOut) pPageOut = *(*uintptr)(unsafe.Pointer(bp + 8 /* pNew */)) if pPageOut != 0 { pPgnoOut = (*MemPage)(unsafe.Pointer(pPageOut)).FaData Xsqlite3Put4byte(tls, pPgnoOut, uint32(0)) aOut = pPgnoOut + 4 nOut = func() uint32 { if (*BtShared)(unsafe.Pointer(pBt)).FusableSize-U32(4) < nRem { return (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) } return nRem }() } } } releasePage(tls, pPageOut) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) } return *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) } // Delete the entry that the cursor is pointing to. // // If the BTREE_SAVEPOSITION bit of the flags parameter is zero, then // the cursor is left pointing at an arbitrary location after the delete. // But if that bit is set, then the cursor is left in a state such that // the next call to BtreeNext() or BtreePrev() moves it to the same row // as it would have been on if the call to BtreeDelete() had been omitted. // // The BTREE_AUXDELETE bit of flags indicates that is one of several deletes // associated with a single table entry and its indexes. Only one of those // deletes is considered the "primary" delete. The primary delete occurs // on a cursor that is not a BTREE_FORDELETE cursor. All but one delete // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75409:20: */ bp := tls.Alloc(28) defer tls.Free(28) var p uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // var rc int32 at bp+24, 4 // Return code var pPage uintptr // Page to delete cell from var pCell uintptr // Pointer to cell to delete var iCellIdx int32 // Index of cell to delete var iCellDepth int32 // Depth of node containing pCell // var info CellInfo at bp, 24 // Size of the cell being deleted var bPreserve U8 // Keep cursor valid. 2 for CURSOR_SKIPNEXT if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) >= CURSOR_REQUIRESEEK { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeRestoreCursorPosition(tls, pCur) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 || int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) != CURSOR_VALID { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } else { return Xsqlite3CorruptError(tls, 75433) } } iCellDepth = int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) iCellIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { return Xsqlite3CorruptError(tls, 75442) } pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { return Xsqlite3CorruptError(tls, 75446) } // If the BTREE_SAVEPOSITION bit is on, then the cursor position must // be preserved following this delete operation. If the current delete // will cause a b-tree rebalance, then this is done by saving the cursor // key and leaving the cursor in CURSOR_REQUIRESEEK state before // returning. // // If the current delete will not cause a rebalance, then the cursor // will be left in CURSOR_SKIPNEXT state pointing to the entry immediately // before or after the deleted entry. // // The bPreserve value records which path is required: // // bPreserve==0 Not necessary to save the cursor position // bPreserve==1 Use CURSOR_REQUIRESEEK to save the cursor position // bPreserve==2 Cursor won't move. Set CURSOR_SKIPNEXT. bPreserve = U8(libc.Bool32(int32(flags)&BTREE_SAVEPOSITION != 0)) if bPreserve != 0 { if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) || (*MemPage)(unsafe.Pointer(pPage)).FnFree+int32(cellSizePtr(tls, pPage, pCell))+2 > int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize*U32(2)/U32(3)) || int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 1 { // A b-tree rebalance will be required after deleting this entry. // Save the cursor key. *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = saveCursorKey(tls, pCur) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } else { bPreserve = U8(2) } } // If the page containing the entry to delete is not a leaf page, move // the cursor to the largest entry in the tree that is smaller than // the entry being deleted. This cell will replace the cell being deleted // from the internal node. The 'previous' entry is used for this instead // of the 'next' entry, as the previous entry is always a part of the // sub-tree headed by the child page of the cell being deleted. This makes // balancing the tree following the delete operation easier. if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3BtreePrevious(tls, pCur, 0) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } // Save the positions of any other cursors open on this table before // making any modifications. if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Multiple != 0 { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = saveAllCursors(tls, pBt, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, pCur) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } // If this is a delete operation to remove a row from a table b-tree, // invalidate any incrblob cursors open on the row being deleted. if (*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0) && (*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0 { invalidateIncrblobCursors(tls, p, (*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot, (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey, 0) } // Make the page containing the entry to be deleted writable. Then free any // overflow pages associated with the entry and finally remove the cell // itself from within the page. *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp /* &info */)).FnPayload { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = clearCellOverflow(tls, pPage, pCell, bp /* &info */) } else { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK } dropCell(tls, pPage, iCellIdx, int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize), bp+24) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } // If the cell deleted was not located on a leaf page, then the cursor // is currently pointing to the largest entry in the sub-tree headed // by the child-page of the cell that was just deleted from an internal // node. The cell from the leaf node needs to be moved to the internal // node to replace the deleted cell. if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var pLeaf uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpPage var nCell int32 var n Pgno var pTmp uintptr if (*MemPage)(unsafe.Pointer(pLeaf)).FnFree < 0 { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeComputeFreeSpace(tls, pLeaf) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } if iCellDepth < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage)-1 { n = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(iCellDepth+1)*8)))).Fpgno } else { n = (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { return Xsqlite3CorruptError(tls, 75536) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pLeaf)).FxCellSize})).f(tls, pLeaf, pCell)) pTmp = (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pLeaf)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n, bp+24) } dropCell(tls, pLeaf, int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1, nCell, bp+24) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } } // Balance the tree. If the entry deleted was located on a leaf page, // then the cursor still points to that page. In this case the first // call to balance() repairs the tree, and the if(...) condition is // never true. // // Otherwise, if the entry deleted was on an internal node page, then // pCur is pointing to the leaf page from which a cell was removed to // replace the cell deleted from the internal node. This is slightly // tricky as the leaf node may be underfull, and the internal node may // be either under or overfull. In this case run the balancing algorithm // on the leaf node first. If the balance proceeds far enough up the // tree that we can be sure that any problem in the internal node has // been corrected, so be it. Otherwise, after balancing the leaf node, // walk the cursor up the tree to the internal node and balance it as // well. *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = balance(tls, pCur) if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK && int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) > iCellDepth { releasePageNotNull(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage) (*BtCursor)(unsafe.Pointer(pCur)).FiPage-- for int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) > iCellDepth { releasePage(tls, *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr(libc.PostDecInt8(&(*BtCursor)(unsafe.Pointer(pCur)).FiPage, 1))*8))) } (*BtCursor)(unsafe.Pointer(pCur)).FpPage = *(*uintptr)(unsafe.Pointer(pCur + 144 + uintptr((*BtCursor)(unsafe.Pointer(pCur)).FiPage)*8)) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = balance(tls, pCur) } if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { if int32(bPreserve) > 1 { (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_SKIPNEXT) if iCellIdx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = -1 (*BtCursor)(unsafe.Pointer(pCur)).Fix = U16(int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) - 1) } else { (*BtCursor)(unsafe.Pointer(pCur)).FskipNext = 1 } } else { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = moveToRoot(tls, pCur) if bPreserve != 0 { btreeReleaseAllCursorPages(tls, pCur) (*BtCursor)(unsafe.Pointer(pCur)).FeState = U8(CURSOR_REQUIRESEEK) } if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_EMPTY { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK } } } return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } // Create a new BTree table. Write into *piTable the page // number for the root page of the new table. // // The type of type is determined by the flags parameter. Only the // following values of flags are currently in use. Other values for // flags might not work: // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75610:12: */ bp := tls.Alloc(44) defer tls.Free(44) var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // var pRoot uintptr at bp+24, 8 // var pgnoRoot Pgno at bp, 4 // var rc int32 at bp+40, 4 var ptfFlags int32 // Page-type flage for the root page of new table if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { // var pgnoMove Pgno at bp+16, 4 // Move a page here to make room for the root-page // var pPageMove uintptr at bp+8, 8 // The page to move to. // Creating a new table may probably require moving an existing database // to make room for the new tables root page. In case this page turns // out to be an overflow page, delete all overflow page-map caches // held by open cursors. invalidateAllOverflowCache(tls, pBt) // Read the value of meta[3] from the database to determine where the // root page of the new table should go. meta[3] is the largest root-page // created so far, so the new root-page is (meta[3]+1). Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { return Xsqlite3CorruptError(tls, 75644) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ // The new root-page may not be allocated on a pointer-map page, or the // PENDING_BYTE page. for *(*Pgno)(unsafe.Pointer(bp)) == ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp))) || *(*Pgno)(unsafe.Pointer(bp)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) { *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ } // Allocate a page. The page that currently resides at pgnoRoot will // be moved to the allocated page (unless the allocated page happens // to reside at pgnoRoot). *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = allocateBtreePage(tls, pBt, bp+8, bp+16, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(BTALLOC_EXACT)) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if *(*Pgno)(unsafe.Pointer(bp + 16)) != *(*Pgno)(unsafe.Pointer(bp)) { // pgnoRoot is the page that will be used for the root-page of // the new table (assuming an error did not occur). But we were // allocated pgnoMove. If required (i.e. if it was not allocated // by extending the file), the current page at position pgnoMove // is already journaled. *(*U8)(unsafe.Pointer(bp + 32 /* eType */)) = U8(0) *(*Pgno)(unsafe.Pointer(bp + 36 /* iPtrPage */)) = Pgno(0) // Save the positions of any open cursors. This is required in // case they are holding a reference to an xFetch reference // corresponding to page pgnoRoot. *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPageMove */))) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } // Move the page currently at pgnoRoot to pgnoMove. *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+24, 0) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+32, bp+36) if int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 32))) == PTRMAP_FREEPAGE { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3CorruptError(tls, 75692) } if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)), *(*U8)(unsafe.Pointer(bp + 32 /* eType */)), *(*Pgno)(unsafe.Pointer(bp + 36 /* iPtrPage */)), *(*Pgno)(unsafe.Pointer(bp + 16 /* pgnoMove */)), 0) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) // Obtain the page at pgnoRoot if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+24, 0) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)))).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 40)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } } else { *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pPageMove */)) } // Update the pointer-map and meta-data with the new root-page number. ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(PTRMAP_ROOTPAGE), uint32(0), bp+40) if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } // When the new root page was allocated, page 1 was made writable in // order either to increase the database filesize, or to decrement the // freelist count. Hence, the sqlite3BtreeUpdateMeta() call cannot fail. *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = Xsqlite3BtreeUpdateMeta(tls, p, 4, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))) if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */))) return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = allocateBtreePage(tls, pBt, bp+24, bp, uint32(1), uint8(0)) if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } } if createTabFlags&BTREE_INTKEY != 0 { ptfFlags = PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF } else { ptfFlags = PTF_ZERODATA | PTF_LEAF } zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)), ptfFlags) Xsqlite3PagerUnref(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pRoot */)))).FpDbPage) *(*Pgno)(unsafe.Pointer(piTable)) = *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)) return SQLITE_OK } func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75755:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) Xsqlite3BtreeLeave(tls, p) return rc } // Erase the given database page and all its children. Return // the page to the freelist. func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75767:12: */ bp := tls.Alloc(36) defer tls.Free(36) // var pPage uintptr at bp, 8 // var rc int32 at bp+32, 4 var pCell uintptr var i int32 var hdr int32 // var info CellInfo at bp+8, 24 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } return Xsqlite3CorruptError(tls, 75782) __1: ; *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __2 } return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) __2: ; if !(int32((*BtShared)(unsafe.Pointer(pBt)).FopenFlags)&BTREE_SINGLE == 0 && Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1+libc.Bool32(pgno == Pgno(1))) { goto __3 } *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 75789) goto cleardatabasepage_out __3: ; hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FhdrOffset) i = 0 __4: if !(i < int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnCell)) { goto __6 } pCell = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaCellIdx + uintptr(2*i)))))) if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fleaf) != 0) { goto __7 } *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearDatabasePage(tls, pBt, Xsqlite3Get4byte(tls, pCell), 1, pnChange) if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __8 } goto cleardatabasepage_out __8: ; __7: ; (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */) if !(U32((*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnLocal) != (*CellInfo)(unsafe.Pointer(bp+8 /* &info */)).FnPayload) { goto __9 } *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearCellOverflow(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), pCell, bp+8 /* &info */) goto __10 __9: *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK __10: ; if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __11 } goto cleardatabasepage_out __11: ; goto __5 __5: i++ goto __4 goto __6 __6: ; if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fleaf) != 0) { goto __12 } *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = clearDatabasePage(tls, pBt, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr(hdr+8)), 1, pnChange) if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __13 } goto cleardatabasepage_out __13: ; if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FintKey != 0) { goto __14 } pnChange = uintptr(0) __14: ; __12: ; if !(pnChange != 0) { goto __15 } *(*I64)(unsafe.Pointer(pnChange)) += I64((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnCell) __15: ; if !(freePageFlag != 0) { goto __16 } freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+32) goto __17 __16: if !(libc.AssignPtrInt32(bp+32, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage)) == 0) { goto __18 } zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData + uintptr(hdr))))|PTF_LEAF) __18: ; __17: ; cleardatabasepage_out: releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } // Delete all information from a single table in the database. iTable is // the page number of the root of the table. After this routine returns, // the root page is empty, but still exists. // // This routine will fail with SQLITE_LOCKED if there are any open // read cursors on the table. Open write cursors are moved to the // root of the table. // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75834:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) rc = saveAllCursors(tls, pBt, Pgno(iTable), uintptr(0)) if SQLITE_OK == rc { // Invalidate all incrblob cursors open on table iTable (assuming iTable // is the root of a table b-tree - if it is not, the following call is // a no-op). if (*Btree)(unsafe.Pointer(p)).FhasIncrblobCur != 0 { invalidateIncrblobCursors(tls, p, Pgno(iTable), int64(0), 1) } rc = clearDatabasePage(tls, pBt, Pgno(iTable), 0, pnChange) } Xsqlite3BtreeLeave(tls, p) return rc } // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75860:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } // Erase all information in a table and add the root of the table to // the freelist. Except, the root of the principle table (the one on // page 1) is never added to the freelist. // // This routine will fail with SQLITE_LOCKED if there are any open // cursors on the table. // // If AUTOVACUUM is enabled and the page at iTable is not the last // root page in the database file, then the last root page // in the database file is moved into the slot formerly occupied by // iTable and that last slot formerly occupied by the last root page // is added to the freelist instead of iTable. In this say, all // root pages are kept at the beginning of the database file, which // is necessary for AUTOVACUUM to work right. *piMoved is set to the // page number that used to be the last root page in the file before // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75884:12: */ bp := tls.Alloc(24) defer tls.Free(24) // var rc int32 at bp+12, 4 *(*uintptr)(unsafe.Pointer(bp /* pPage */)) = uintptr(0) var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { return Xsqlite3CorruptError(tls, 75893) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, iTable, bp, 0) if *(*int32)(unsafe.Pointer(bp + 12)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } *(*int32)(unsafe.Pointer(piMoved)) = 0 if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { // var maxRootPgno Pgno at bp+8, 4 Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp+8) if iTable == *(*Pgno)(unsafe.Pointer(bp + 8)) { // If the table being dropped is the table with the largest root-page // number in the database, put the root page on the free list. freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+12) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } } else { // The table being dropped does not have the largest root-page // number in the database. So move the page that does into the // gap left by the deleted root-page. // var pMove uintptr at bp+16, 8 releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */)), bp+16, 0) if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = relocatePage(tls, pBt, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)), uint8(PTRMAP_ROOTPAGE), uint32(0), iTable, 0) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */))) if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */)), bp+16, 0) freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */)), bp+12) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pMove */))) if *(*int32)(unsafe.Pointer(bp + 12)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } *(*int32)(unsafe.Pointer(piMoved)) = int32(*(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))) } // Set the new 'max-root-page' value in the database header. This // is the old value less one, less one more if that happens to // be a root-page number, less one again if that is the // PENDING_BYTE_PAGE. *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))-- for *(*Pgno)(unsafe.Pointer(bp + 8)) == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize+U32(1) || ptrmapPageno(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8))) == *(*Pgno)(unsafe.Pointer(bp + 8)) { *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))-- } *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3BtreeUpdateMeta(tls, p, 4, *(*Pgno)(unsafe.Pointer(bp + 8 /* maxRootPgno */))) } else { freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+12) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) } return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75969:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) Xsqlite3BtreeLeave(tls, p) return rc } // This function may only be called if the b-tree connection already // has a read or write transaction open on the database. // // Read the meta-information out of a database file. Meta[0] // is the number of free pages currently in the database. Meta[1] // through meta[15] are available for use by higher layers. Meta[0] // is read-only, the others are read/write. // // The schema layer numbers meta values differently. At the schema // layer (and the SetCookie and ReadCookie opcodes) the number of // free pages is not visible. So Cookie[0] is the same as Meta[1]. // // This routine treats Meta[BTREE_DATA_VERSION] as a special case. Instead // of reading the value out of the header, it instead loads the "DataVersion" // from the pager. The BTREE_DATA_VERSION value is not actually stored in the // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:75998:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if idx == BTREE_DATA_VERSION { *(*U32)(unsafe.Pointer(pMeta)) = Xsqlite3PagerDataVersion(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager) + (*Btree)(unsafe.Pointer(p)).FiBDataVersion } else { *(*U32)(unsafe.Pointer(pMeta)) = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+uintptr(36+idx*4)) } // If auto-vacuum is disabled in this build and this is an auto-vacuum // database, mark the database as read-only. Xsqlite3BtreeLeave(tls, p) } // Write meta-information back into the database. Meta[0] is // read-only and may not be written. func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76028:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 Xsqlite3BtreeEnter(tls, p) pP1 = (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) if rc == SQLITE_OK { Xsqlite3Put4byte(tls, pP1+uintptr(36+idx*4), iMeta) if idx == BTREE_INCR_VACUUM { (*BtShared)(unsafe.Pointer(pBt)).FincrVacuum = U8(iMeta) } } Xsqlite3BtreeLeave(tls, p) return rc } // The first argument, pCur, is a cursor opened on some b-tree. Count the // number of entries in the b-tree and write the result to *pnEntry. // // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76060:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code rc = moveToRoot(tls, pCur) if rc == SQLITE_EMPTY { *(*I64)(unsafe.Pointer(pnEntry)) = int64(0) return SQLITE_OK } // Unless an error occurs, the following loop runs one iteration for each // page in the B-Tree structure (not including overflow pages). for rc == SQLITE_OK && !(libc.AtomicLoadNInt32(db+432, 0) != 0) { var iIdx int32 // Index of child node in parent var pPage uintptr // Current page of the b-tree // If this is a leaf page or the tree is not an int-key tree, then // this page contains countable entries. Increment the entry counter // accordingly. pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 || !(int32((*MemPage)(unsafe.Pointer(pPage)).FintKey) != 0) { nEntry = nEntry + I64((*MemPage)(unsafe.Pointer(pPage)).FnCell) } // pPage is a leaf node. This loop navigates the cursor so that it // points to the first interior cell that it points to the parent of // the next page in the tree that has not yet been visited. The // pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell // of the page, or to the number of cells in the page if the next page // to visit is the right-child of its parent. // // If all pages in the tree have been visited, return SQLITE_OK to the // caller. if (*MemPage)(unsafe.Pointer(pPage)).Fleaf != 0 { for __ccgo := true; __ccgo; __ccgo = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FnCell) { if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) == 0 { // All pages of the b-tree have been visited. Return successfully. *(*I64)(unsafe.Pointer(pnEntry)) = nEntry return moveToRoot(tls, pCur) } moveToParent(tls, pCur) } (*BtCursor)(unsafe.Pointer(pCur)).Fix++ pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage } // Descend to the child node of the cell that the cursor currently // points at. This is the right-child if (iIdx==pPage->nCell). iIdx = int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) if iIdx == int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8))) } else { rc = moveToChild(tls, pCur, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iIdx)))))))) } } // An error has occurred. Return an error code. return rc } // Return the pager associated with a BTree. This routine is used for // testing and debugging only. func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76129:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76137:13: */ bp := tls.Alloc(16) defer tls.Free(16) var ap Va_list _ = ap if !((*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { return } (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr-- (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { Xsqlite3_str_append(tls, pCheck+56, ts+5365, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+56, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) } Xsqlite3_str_vappendf(tls, pCheck+56, zFormat, ap) _ = ap if int32((*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FaccError) == SQLITE_NOMEM { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } } // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76167:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76175:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } // Add 1 to the reference count for page iPage. If this is the second // reference to the page, add an error message to pCheck->zErrMsg. // Return 1 if there are 2 or more references to the page and 0 if // if this is the first reference to the page. // // Also check that the page number is in bounds. func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76189:12: */ bp := tls.Alloc(16) defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { checkAppendMsg(tls, pCheck, ts+5367, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { checkAppendMsg(tls, pCheck, ts+5390, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+432, 0) != 0 { return 1 } setPageReferenced(tls, pCheck, iPage) return 0 } // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76209:13: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 // var ePtrmapType U8 at bp+48, 1 // var iPtrmapParent Pgno at bp+52, 4 rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48, bp+52) if rc != SQLITE_OK { if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } checkAppendMsg(tls, pCheck, ts+5415, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, ts+5444, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)))) } } // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76238:13: */ bp := tls.Alloc(48) defer tls.Free(48) var i int32 var expected U32 = N var nErrAtStart int32 = (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr for iPage != Pgno(0) && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0 { // var pOvflPage uintptr at bp+40, 8 var pOvflData uintptr if checkRef(tls, pCheck, iPage) != 0 { break } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { checkAppendMsg(tls, pCheck, ts+5498, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) if isFreeList != 0 { var n U32 = Xsqlite3Get4byte(tls, pOvflData+4) if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 { checkPtrmap(tls, pCheck, iPage, uint8(PTRMAP_FREEPAGE), uint32(0)) } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, ts+5520, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { var iFreePage Pgno = Xsqlite3Get4byte(tls, pOvflData+uintptr(8+i*4)) if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 { checkPtrmap(tls, pCheck, iFreePage, uint8(PTRMAP_FREEPAGE), uint32(0)) } checkRef(tls, pCheck, iFreePage) } N = N - n } } else { // If this database supports auto-vacuum and iPage is not the last // page in this overflow list, check that the pointer-map entry for // the following page matches iPage. if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 && N > U32(0) { i = int32(Xsqlite3Get4byte(tls, pOvflData)) checkPtrmap(tls, pCheck, uint32(i), uint8(PTRMAP_OVERFLOW2), iPage) } } iPage = Xsqlite3Get4byte(tls, pOvflData) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, ts+5559, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { return ts + 5585 /* "size" */ } return ts + 5590 /* "overflow list le..." */ }(), expected-N, expected)) } } // An implementation of a min-heap. // // aHeap[0] is the number of elements on the heap. aHeap[1] is the // root element. The daughter nodes of aHeap[N] are aHeap[N*2] // and aHeap[N*2+1]. // // The heap property is this: Every node is less than or equal to both // of its daughter nodes. A consequence of the heap property is that the // root node aHeap[1] is always the minimum value currently in the heap. // // The btreeHeapInsert() routine inserts an unsigned 32-bit number onto // the heap, preserving the heap property. The btreeHeapPull() routine // removes the root element from the heap (the minimum value in the heap) // and then moves other nodes around as necessary to preserve the heap // property. // // This heap is used for cell overlap and coverage testing. Each u32 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76327:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x for libc.AssignUint32(&j, i/U32(2)) > U32(0) && *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) > *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) { x = *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x i = j } } func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76337:12: */ var j U32 var i U32 var x U32 if libc.AssignUint32(&x, *(*U32)(unsafe.Pointer(aHeap))) == U32(0) { return 0 } *(*U32)(unsafe.Pointer(pOut)) = *(*U32)(unsafe.Pointer(aHeap + 1*4)) *(*U32)(unsafe.Pointer(aHeap + 1*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(x)*4)) *(*U32)(unsafe.Pointer(aHeap + uintptr(x)*4)) = 0xffffffff *(*U32)(unsafe.Pointer(aHeap))-- i = U32(1) for libc.AssignUint32(&j, i*U32(2)) <= *(*U32)(unsafe.Pointer(aHeap)) { if *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) > *(*U32)(unsafe.Pointer(aHeap + uintptr(j+U32(1))*4)) { j++ } if *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) < *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) { break } x = *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) *(*U32)(unsafe.Pointer(aHeap + uintptr(j)*4)) = x i = j } return 1 } // Do various sanity checks on a single page of a tree. Return // the tree depth. Root pages return 0. Parents of root pages // return 1, and so forth. // // These checks are done: // // 1. Make sure that cells and freeblocks do not overlap // but combine to completely cover the page. // 2. Make sure integer cell keys are in order. // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76371:12: */ bp := tls.Alloc(140) defer tls.Free(140) *(*I64)(unsafe.Pointer(bp + 104)) = maxKey // var pPage uintptr at bp+96, 8 // The page being analyzed var i int32 // Loop counter var rc int32 // Result code from subroutine call var depth int32 var d2 int32 // Depth of a subtree var pgno int32 // Page number var nFrag int32 // Number of fragmented bytes on the page var hdr int32 // Offset to the page header var cellStart int32 // Offset to the start of the cell pointer array var nCell int32 // Number of cells var doCoverageCheck int32 // True if cell coverage checking should be done var keyCanBeEqual int32 // True if IPK can be equal to maxKey // False if IPK must be strictly less than maxKey var data uintptr // Page content var pCell uintptr // Cell content var pCellIdx uintptr // Next element of the cell pointer array var pBt uintptr // The BtShared object that owns pPage var pc U32 // Address of a cell var usableSize U32 // Usable size of the page var contentOffset U32 // Offset to the start of the cell content area var heap uintptr // Min-heap used for checking cell coverage // var x U32 at bp+136, 4 var prev U32 // Next and previous entry on the min-heap var saved_zPfx uintptr var saved_v1 int32 var saved_v2 int32 var savedIsInit U8 var nPage U32 // Number of pages on the overflow chain var pgnoOvfl Pgno // var info CellInfo at bp+112, 24 var size U32 var size1 int32 var j int32 *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) = uintptr(0) depth = -1 doCoverageCheck = 1 keyCanBeEqual = 1 heap = uintptr(0) prev = U32(0) saved_zPfx = (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx saved_v1 = int32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1) saved_v2 = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 savedIsInit = U8(0) // Check that the page exists pBt = (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt usableSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize if !(iPage == Pgno(0)) { goto __1 } return 0 __1: ; if !(checkRef(tls, pCheck, iPage) != 0) { goto __2 } return 0 __2: ; (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5611 /* "Page %u: " */ (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, ts+5621, libc.VaList(bp, rc)) goto end_of_check __3: ; // Clear MemPage.isInit to make sure the corruption detection code in // btreeInitPage() is executed. savedIsInit = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = U8(0) if !(libc.AssignInt32(&rc, btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { goto __4 } // The only possible error from InitPage checkAppendMsg(tls, pCheck, ts+5659, libc.VaList(bp+8, rc)) goto end_of_check __4: ; if !(libc.AssignInt32(&rc, btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 96)))) != 0) { goto __5 } checkAppendMsg(tls, pCheck, ts+5697, libc.VaList(bp+16, rc)) goto end_of_check __5: ; data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FaData hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FhdrOffset) // Set up for cell analysis (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5719 /* "On tree page %u ..." */ contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) // Enforced by btreeInitPage() // EVIDENCE-OF: R-37002-32774 The two-byte integer at offset 3 gives the // number of cells on the page. nCell = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+3) + 1))) // EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page // immediately follows the b-tree page header. cellStart = hdr + 12 - 4*int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) pCellIdx = data + uintptr(cellStart+2*(nCell-1)) if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { goto __6 } // Analyze the right-child page of internal pages pgno = int32(Xsqlite3Get4byte(tls, data+uintptr(hdr+8))) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 5745 /* "On page %u at ri..." */ checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; depth = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) keyCanBeEqual = 0 goto __7 __6: // For leaf pages, the coverage check will occur in the same loop // as the other cell checks, so initialize the heap. heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap *(*U32)(unsafe.Pointer(heap)) = U32(0) __7: ; // EVIDENCE-OF: R-02776-14802 The cell pointer array consists of K 2-byte // integer offsets to the cell contents. i = nCell - 1 __9: if !(i >= 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { goto __11 } // Check cell size (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = i pc = U32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(pCellIdx)))) pCellIdx -= uintptr(2) if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } checkAppendMsg(tls, pCheck, ts+5773, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 __12: ; pCell = data + uintptr(pc) (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxParseCell})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), pCell, bp+112 /* &info */) if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize) > usableSize) { goto __13 } checkAppendMsg(tls, pCheck, ts+5803, 0) doCoverageCheck = 0 goto __10 __13: ; // Check for integer primary key out of range if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).FintKey != 0) { goto __14 } if !(func() int32 { if keyCanBeEqual != 0 { return libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112)).FnKey > *(*I64)(unsafe.Pointer(bp + 104))) } return libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112)).FnKey >= *(*I64)(unsafe.Pointer(bp + 104))) }() != 0) { goto __15 } checkAppendMsg(tls, pCheck, ts+5827, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 112 /* &info */)).FnKey keyCanBeEqual = 0 // Only the first key on the page may ==maxKey __14: ; // Check the content overflow list if !((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload > U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal)) { goto __16 } // First page of the overflow chain nPage = ((*CellInfo)(unsafe.Pointer(bp+112)).FnPayload - U32((*CellInfo)(unsafe.Pointer(bp+112)).FnLocal) + usableSize - U32(5)) / (usableSize - U32(4)) pgnoOvfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-4)) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __17 } checkPtrmap(tls, pCheck, pgnoOvfl, uint8(PTRMAP_OVERFLOW1), iPage) __17: ; checkList(tls, pCheck, 0, pgnoOvfl, nPage) __16: ; if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { goto __18 } // Check sanity of left child page for internal pages pgno = int32(Xsqlite3Get4byte(tls, pCell)) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __20 } checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __20: ; d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+104, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) keyCanBeEqual = 0 if !(d2 != depth) { goto __21 } checkAppendMsg(tls, pCheck, ts+5851, 0) depth = d2 __21: ; goto __19 __18: // Populate the coverage-checking heap for leaf pages btreeHeapInsert(tls, heap, pc<<16|(pc+U32((*CellInfo)(unsafe.Pointer(bp+112)).FnSize)-U32(1))) __19: ; goto __10 __10: i-- goto __9 goto __11 __11: ; *(*I64)(unsafe.Pointer(piMinKey)) = *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) // Check for complete coverage of the page (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = uintptr(0) if !(doCoverageCheck != 0 && (*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr > 0) { goto __22 } // For leaf pages, the min-heap has already been initialized and the // cells have already been inserted. But for internal pages, that has // not yet been done, so do it now if !!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96)))).Fleaf) != 0) { goto __23 } heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap *(*U32)(unsafe.Pointer(heap)) = U32(0) i = nCell - 1 __24: if !(i >= 0) { goto __26 } pc = U32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellStart+i*2))))) size = U32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FxCellSize})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), data+uintptr(pc))) btreeHeapInsert(tls, heap, pc<<16|(pc+size-U32(1))) goto __25 __25: i-- goto __24 goto __26 __26: ; __23: ; // Add the freeblocks to the min-heap // // EVIDENCE-OF: R-20690-50594 The second field of the b-tree page header // is the offset of the first freeblock, or zero if there are no // freeblocks on the page. i = int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+1) + 1))) __27: if !(i > 0) { goto __28 } // Enforced by btreeComputeFreeSpace() size1 = int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i+2) + 1))) // due to btreeComputeFreeSpace() btreeHeapInsert(tls, heap, U32(i)<<16|U32(i+size1-1)) // EVIDENCE-OF: R-58208-19414 The first 2 bytes of a freeblock are a // big-endian integer which is the offset in the b-tree page of the next // freeblock in the chain, or zero if the freeblock is the last on the // chain. j = int32(*(*U8)(unsafe.Pointer(data + uintptr(i))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(i) + 1))) // EVIDENCE-OF: R-06866-39125 Freeblocks are always connected in order of // increasing offset. // Enforced by btreeComputeFreeSpace() // Enforced by btreeComputeFreeSpace() i = j goto __27 __28: ; // Analyze the min-heap looking for overlap between cells and/or // freeblocks, and counting the number of untracked bytes in nFrag. // // Each min-heap entry is of the form: (start_address<<16)|end_address. // There is an implied first entry the covers the page header, the cell // pointer index, and the gap between the cell pointer index and the start // of cell content. // // The loop below pulls entries from the min-heap in order and compares // the start_address against the previous end_address. If there is an // overlap, that means bytes are used multiple times. If there is a gap, // that gap is added to the fragmentation count. nFrag = 0 prev = contentOffset - U32(1) // Implied first min-heap entry __29: if !(btreeHeapPull(tls, heap, bp+136) != 0) { goto __30 } if !(prev&U32(0xffff) >= *(*U32)(unsafe.Pointer(bp + 136))>>16) { goto __31 } checkAppendMsg(tls, pCheck, ts+5876, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 136))>>16, iPage)) goto __30 goto __32 __31: nFrag = int32(U32(nFrag) + (*(*U32)(unsafe.Pointer(bp + 136))>>16 - prev&U32(0xffff) - U32(1))) prev = *(*U32)(unsafe.Pointer(bp + 136 /* x */)) __32: ; goto __29 __30: ; nFrag = int32(U32(nFrag) + (usableSize - prev&U32(0xffff) - U32(1))) // EVIDENCE-OF: R-43263-13491 The total number of bytes in all fragments // is stored in the fifth field of the b-tree page header. // EVIDENCE-OF: R-07161-27322 The one-byte integer at offset 7 gives the // number of fragmented free bytes within the cell content area. if !(*(*U32)(unsafe.Pointer(heap)) == U32(0) && nFrag != int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7))))) { goto __33 } checkAppendMsg(tls, pCheck, ts+5913, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; __22: ; end_of_check: if !!(doCoverageCheck != 0) { goto __34 } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = savedIsInit __34: ; releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */))) (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = saved_zPfx (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = Pgno(saved_v1) (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = saved_v2 return depth + 1 } // This routine does a complete check of the given BTree file. aRoot[] is // an array of pages numbers were each page number is the root page of // a table. nRoot is the number of entries in aRoot. // // A read-only or read-write transaction must be opened before calling // this function. // // Write the number of error seen in *pnErr. Except for some memory // allocation errors, an error message held in memory obtained from // malloc is returned if *pnErr is non-zero. If *pnErr==0 then NULL is // returned. If a memory allocation error occurs, NULL is returned. // // If the first entry in aRoot[] is 0, that indicates that the list of // root pages is incomplete. This is a "partial integrity-check". This // happens when performing an integrity check on a single table. The // zero is skipped, of course. But in addition, the freelist checks // and the checks to make sure every page is referenced are also skipped, // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76650:21: */ bp := tls.Alloc(248) defer tls.Free(248) var i Pgno // var sCheck IntegrityCk at bp+32, 104 var pBt uintptr var savedDbFlags U64 // var zErr [100]int8 at bp+136, 100 var bPartial int32 // True if not checking all btrees var bCkFreelist int32 var mx Pgno var mxInHdr Pgno // var notUsed I64 at bp+240, 8 pBt = (*Btree)(unsafe.Pointer(p)).FpBt savedDbFlags = (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags bPartial = 0 bCkFreelist = 1 // True to scan the freelist // aRoot[0]==0 means this is a partial check if !(*(*Pgno)(unsafe.Pointer(aRoot)) == Pgno(0)) { goto __1 } bPartial = 1 if !(*(*Pgno)(unsafe.Pointer(aRoot + 1*4)) != Pgno(1)) { goto __2 } bCkFreelist = 0 __2: ; __1: ; Xsqlite3BtreeEnter(tls, p) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fdb = db (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpBt = pBt (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnPage = btreePagecount(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FpBt) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FmxErr = mxErr (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr = 0 (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 0 (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv1 = Pgno(0) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv2 = 0 (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = uintptr(0) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = uintptr(0) Xsqlite3StrAccumInit(tls, bp+32+56, uintptr(0), bp+136, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage == Pgno(0)) { goto __3 } goto integrity_ck_cleanup __3: ; (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = Xsqlite3MallocZero(tls, uint64((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage/Pgno(8)+Pgno(1))) if !!(int32((*IntegrityCk)(unsafe.Pointer(bp+32)).FaPgRef) != 0) { goto __4 } (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 goto integrity_ck_cleanup __4: ; (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) if !((*IntegrityCk)(unsafe.Pointer(bp+32)).Fheap == uintptr(0)) { goto __5 } (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 goto integrity_ck_cleanup __5: ; i = U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer(pBt)).FpageSize + U32(1) if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage) { goto __6 } setPageReferenced(tls, bp+32, i) __6: ; // Check the integrity of the freelist if !(bCkFreelist != 0) { goto __7 } (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 5965 /* "Main freelist: " */ checkList(tls, bp+32, 1, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) __7: ; // Check all the tables. if !!(bPartial != 0) { goto __8 } if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __9 } mx = Pgno(0) i = Pgno(0) __11: if !(int32(i) < nRoot) { goto __13 } if !(mx < *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4))) { goto __14 } mx = *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) __14: ; goto __12 __12: i++ goto __11 goto __13 __13: ; mxInHdr = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+52) if !(mx != mxInHdr) { goto __15 } checkAppendMsg(tls, bp+32, ts+5981, libc.VaList(bp, mx, mxInHdr)) __15: ; goto __10 __9: if !(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64) != U32(0)) { goto __16 } checkAppendMsg(tls, bp+32, ts+6026, 0) __16: ; __10: ; __8: ; *(*U64)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb + 48)) &= libc.CplUint64(uint64(SQLITE_CellSizeCk)) i = Pgno(0) __17: if !(int32(i) < nRoot && (*IntegrityCk)(unsafe.Pointer(bp+32)).FmxErr != 0) { goto __19 } if !(*(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) == Pgno(0)) { goto __20 } goto __18 __20: ; if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) > Pgno(1) && !(bPartial != 0)) { goto __21 } checkPtrmap(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) __21: ; checkTreePage(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+240, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) goto __18 __18: i++ goto __17 goto __19 __19: ; (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags = savedDbFlags // Make sure every page in the file is referenced if !!(bPartial != 0) { goto __22 } i = Pgno(1) __23: if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage && (*IntegrityCk)(unsafe.Pointer(bp+32)).FmxErr != 0) { goto __25 } // If the database supports auto-vacuum, make sure no tables contain // references to pointer-map pages. if !(getPageReferenced(tls, bp+32, i) == 0 && (ptrmapPageno(tls, pBt, i) != i || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { goto __26 } checkAppendMsg(tls, bp+32, ts+6081, libc.VaList(bp+16, i)) __26: ; if !(getPageReferenced(tls, bp+32, i) != 0 && (ptrmapPageno(tls, pBt, i) == i && (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) { goto __27 } checkAppendMsg(tls, bp+32, ts+6103, libc.VaList(bp+24, i)) __27: ; goto __24 __24: i++ goto __23 goto __25 __25: ; __22: ; // Clean up and report errors. integrity_ck_cleanup: Xsqlite3PageFree(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).Fheap) Xsqlite3_free(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FaPgRef) if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FbOomFault != 0) { goto __28 } Xsqlite3_str_reset(tls, bp+32+56) (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnErr++ __28: ; *(*int32)(unsafe.Pointer(pnErr)) = (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnErr == 0) { goto __29 } Xsqlite3_str_reset(tls, bp+32+56) __29: ; // Make sure this analysis did not leave any unref() pages. Xsqlite3BtreeLeave(tls, p) return Xsqlite3StrAccumFinish(tls, bp+32+56) } // Return the full pathname of the underlying database file. Return // an empty string if the database is in-memory or a TEMP database. // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76805:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } // Return the pathname of the journal file for this database. The return // value of this routine is the same regardless of whether the journal file // has been created or not. // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76818:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76827:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) } return 0 } // Run a checkpoint on the Btree passed as the first argument. // // Return SQLITE_LOCKED if this or any other connection has an open // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76841:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) != TRANS_NONE { rc = SQLITE_LOCKED } else { rc = Xsqlite3PagerCheckpoint(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Btree)(unsafe.Pointer(p)).Fdb, eMode, pnLog, pnCkpt) } Xsqlite3BtreeLeave(tls, p) } return rc } // Return true if there is currently a backup running on Btree p. func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76860:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } // This function returns a pointer to a blob of memory associated with // a single shared-btree. The memory is used by client code for its own // purposes (for example, to store a high-level schema associated with // the shared-btree). The btree layer manages reference counting issues. // // The first time this is called on a shared-btree, nBytes bytes of memory // are allocated, zeroed, and returned to the caller. For each subsequent // call the nBytes parameter is ignored and a pointer to the same blob // of memory returned. // // If the nBytes parameter is 0 and the blob of memory has not yet been // allocated, a null pointer is returned. If the blob has already been // allocated, it is returned as normal. // // Just before the shared-btree is closed, the function passed as the // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76886:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { (*BtShared)(unsafe.Pointer(pBt)).FpSchema = Xsqlite3DbMallocZero(tls, uintptr(0), uint64(nBytes)) (*BtShared)(unsafe.Pointer(pBt)).FxFreeSchema = xFree } Xsqlite3BtreeLeave(tls, p) return (*BtShared)(unsafe.Pointer(pBt)).FpSchema } // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76902:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = querySharedCacheTableLock(tls, p, uint32(SCHEMA_ROOT), uint8(READ_LOCK)) Xsqlite3BtreeLeave(tls, p) return rc } // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76919:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { var lockType U8 = U8(READ_LOCK + int32(isWriteLock)) Xsqlite3BtreeEnter(tls, p) rc = querySharedCacheTableLock(tls, p, uint32(iTab), lockType) if rc == SQLITE_OK { rc = setSharedCacheTableLock(tls, p, uint32(iTab), lockType) } Xsqlite3BtreeLeave(tls, p) } return rc } // Argument pCsr must be a cursor opened for writing on an // INTKEY table currently pointing at a valid table entry. // This function modifies the data stored as part of that entry. // // Only the data content may only be modified, it is not possible to // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76949:20: */ var rc int32 rc = func() int32 { if int32((*BtCursor)(unsafe.Pointer(pCsr)).FeState) >= CURSOR_REQUIRESEEK { return btreeRestoreCursorPosition(tls, pCsr) } return SQLITE_OK }() if rc != SQLITE_OK { return rc } if int32((*BtCursor)(unsafe.Pointer(pCsr)).FeState) != CURSOR_VALID { return SQLITE_ABORT } // Save the positions of all other cursors open on this table. This is // required in case any of them are holding references to an xFetch // version of the b-tree page modified by the accessPayload call below. // // Note that pCsr must be open on a INTKEY table and saveCursorPosition() // and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence // saveAllCursors can only return SQLITE_OK. saveAllCursors(tls, (*BtCursor)(unsafe.Pointer(pCsr)).FpBt, (*BtCursor)(unsafe.Pointer(pCsr)).FpgnoRoot, pCsr) // Check some assumptions: // (a) the cursor is open for writing, // (b) there is a read/write transaction open, // (c) the connection holds a write-lock on the table (if required), // (d) there are no conflicting read-locks, and // (e) the cursor points at a valid row of an intKey table. if int32((*BtCursor)(unsafe.Pointer(pCsr)).FcurFlags)&BTCF_WriteFlag == 0 { return SQLITE_READONLY } return accessPayload(tls, pCsr, offset, amt, z, 1) } // Mark this cursor as an incremental blob cursor. func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:76997:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77008:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code // If setting the version fields to 1, do not automatically open the // WAL connection, even if the version fields are currently set to 2. *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_NO_WAL)) if iVersion == 1 { *(*U16)(unsafe.Pointer(pBt + 40)) |= U16(BTS_NO_WAL) } rc = Xsqlite3BtreeBeginTrans(tls, pBtree, 0, uintptr(0)) if rc == SQLITE_OK { var aData uintptr = (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData if int32(*(*U8)(unsafe.Pointer(aData + 18))) != int32(U8(iVersion)) || int32(*(*U8)(unsafe.Pointer(aData + 19))) != int32(U8(iVersion)) { rc = Xsqlite3BtreeBeginTrans(tls, pBtree, 2, uintptr(0)) if rc == SQLITE_OK { rc = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FpDbPage) if rc == SQLITE_OK { *(*U8)(unsafe.Pointer(aData + 18)) = U8(iVersion) *(*U8)(unsafe.Pointer(aData + 19)) = U8(iVersion) } } } } *(*U16)(unsafe.Pointer(pBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_NO_WAL)) return rc } // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77043:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77050:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77057:20: */ return int32((uint64(unsafe.Sizeof(MemPage{})) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77063:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77072:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } // THREAD SAFETY NOTES: // // Once it has been created using backup_init(), a single sqlite3_backup // structure may be accessed via two groups of thread-safe entry points: // // * Via the sqlite3_backup_XXX() API function backup_step() and // backup_finish(). Both these functions obtain the source database // handle mutex and the mutex associated with the source BtShared // structure, in that order. // // * Via the BackupUpdate() and BackupRestart() functions, which are // invoked by the pager layer to report various state changes in // the page cache associated with the source database. The mutex // associated with the source database BtShared structure will always // be held when either of these functions are invoked. // // The other sqlite3_backup_XXX() API functions, backup_remaining() and // backup_pagecount() are not thread-safe functions. If they are called // while some other thread is calling backup_step() or backup_finish(), // the values returned may be invalid. There is no way for a call to // BackupUpdate() or BackupRestart() to interfere with backup_remaining() // or backup_pagecount(). // // Depending on the SQLite configuration, the database handles and/or // the Btree objects may have their own mutexes that require locking. // Non-sharable Btrees (in-memory databases for example), do not have // associated mutexes. // Return a pointer corresponding to database zDb (i.e. "main", "temp") // in connection handle pDb. If such a database cannot be found, return // a NULL pointer and write an error message to pErrorDb. // // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77161:14: */ bp := tls.Alloc(424) defer tls.Free(424) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) if i == 1 { // var sParse Parse at bp+16, 408 var rc int32 = 0 Xsqlite3ParseObjectInit(tls, bp+16, pDb) if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+4444, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) Xsqlite3ParseObjectReset(tls, bp+16) if rc != 0 { return uintptr(0) } } if i < 0 { Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+6137, libc.VaList(bp+8, zDb)) return uintptr(0) } return (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(pDb)).FaDb + uintptr(i)*32)).FpBt } // Attempt to set the page size of the destination to match the page size // of the source. func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77191:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc } // Check that there is no open read-transaction on the b-tree passed as the // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77203:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+6157, 0) return SQLITE_ERROR } return SQLITE_OK } // Create an sqlite3_backup process to copy the contents of zSrcDb from // connection handle pSrcDb to zDestDb in pDestDb. If successful, return // a pointer to the new sqlite3_backup object. // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77219:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database // handle is not locked in this routine, but it is locked in // sqlite3_backup_step(). The user is required to ensure that no // other thread accesses the destination handle for the duration // of the backup operation. Any attempt to use the destination // database connection while a backup is in progress may cause // a malfunction or a deadlock. Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDestDb)).Fmutex) if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, pDestDb, SQLITE_ERROR, ts+6188, 0) p = uintptr(0) } else { // Allocate space for a new sqlite3_backup object... // EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a // call to sqlite3_backup_init() and is destroyed by a call to // sqlite3_backup_finish(). p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3_backup{}))) if !(p != 0) { Xsqlite3Error(tls, pDestDb, SQLITE_NOMEM) } } // If the allocation succeeded, populate the new object. if p != 0 { (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc = findBtree(tls, pDestDb, pSrcDb, zSrcDb) (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest = findBtree(tls, pDestDb, pDestDb, zDestDb) (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb = pDestDb (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb = pSrcDb (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext = Pgno(1) (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached = 0 if uintptr(0) == (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc || uintptr(0) == (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest || checkReadTransaction(tls, pDestDb, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) != SQLITE_OK { // One (or both) of the named databases did not exist or an OOM // error was hit. Or there is a transaction open on the destination // database. The error has already been written into the pDestDb // handle. All that is left to do here is free the sqlite3_backup // structure. Xsqlite3_free(tls, p) p = uintptr(0) } } if p != 0 { (*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FnBackup++ } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDestDb)).Fmutex) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) return p } // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. func isFatalError(tls *libc.TLS, rc int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77296:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77305:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pDestPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) var nSrcPgsz int32 = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) var nDestPgsz int32 = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) var nCopy int32 = func() int32 { if nSrcPgsz < nDestPgsz { return nSrcPgsz } return nDestPgsz }() var iEnd I64 = I64(iSrcPg) * I64(nSrcPgsz) var rc int32 = SQLITE_OK var iOff I64 // Catch the case where the destination is an in-memory database and the // page sizes of the source and destination differ. if nSrcPgsz != nDestPgsz && Xsqlite3PagerIsMemdb(tls, pDestPager) != 0 { rc = SQLITE_READONLY } // This loop runs once for each destination page spanned by the source // page. For each iteration, variable iOff is set to the byte offset // of the destination page. for iOff = iEnd - I64(nSrcPgsz); rc == SQLITE_OK && iOff < iEnd; iOff = iOff + I64(nDestPgsz) { *(*uintptr)(unsafe.Pointer(bp /* pDestPg */)) = uintptr(0) var iDest Pgno = Pgno(iOff/I64(nDestPgsz)) + Pgno(1) if iDest == U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1) { continue } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3PagerGet(tls, pDestPager, iDest, bp, 0)) && SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp)))) { var zIn uintptr = zSrcData + uintptr(iOff%I64(nSrcPgsz)) var zDestData uintptr = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pDestPg */))) var zOut uintptr = zDestData + uintptr(iOff%I64(nDestPgsz)) // Copy the data from the source page into the destination page. // Then clear the Btree layer MemPage.isInit flag. Both this module // and the pager code use this trick (clearing the first byte // of the page 'extra' space to invalidate the Btree layers // cached parse of the page). MemPage.isInit is marked // "MUST BE FIRST" for this purpose. libc.Xmemcpy(tls, zOut, zIn, uint64(nCopy)) *(*U8)(unsafe.Pointer(Xsqlite3PagerGetExtra(tls, *(*uintptr)(unsafe.Pointer(bp))))) = U8(0) if iOff == int64(0) && bUpdate == 0 { Xsqlite3Put4byte(tls, zOut+28, Xsqlite3BtreeLastPage(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) } } Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDestPg */))) } return rc } // If pFile is currently larger than iSize bytes, then truncate it to // exactly iSize bytes. If pFile is not larger than iSize bytes, then // this function is a no-op. // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77374:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var iCurrent I64 at bp, 8 var rc int32 = Xsqlite3OsFileSize(tls, pFile, bp) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iSize { rc = Xsqlite3OsTruncate(tls, pFile, iSize) } return rc } // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. func attachBackupObject(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77387:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext = *(*uintptr)(unsafe.Pointer(pp)) *(*uintptr)(unsafe.Pointer(pp)) = p (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached = 1 } // Copy nPage pages from the source b-tree to the destination. func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77399:16: */ bp := tls.Alloc(32) defer tls.Free(32) var rc int32 var destMode int32 // Destination journal mode var pgszSrc int32 = 0 // Source page size var pgszDest int32 = 0 // Destination page size Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb)).Fmutex) Xsqlite3BtreeEnter(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) } rc = (*Sqlite3_backup)(unsafe.Pointer(p)).Frc if !(isFatalError(tls, rc) != 0) { var pSrcPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) // Source pager var pDestPager uintptr = Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) // Dest pager var ii int32 // Iterator variable var nSrcPage int32 = -1 // Size of source db in pages var bCloseTrans int32 = 0 // True if src db requires unlocking // If the source pager is currently in a write-transaction, return // SQLITE_BUSY immediately. if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 && int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FpBt)).FinTransaction) == TRANS_WRITE { rc = SQLITE_BUSY } else { rc = SQLITE_OK } // If there is no open read-transaction on the source database, open // one now. If a transaction is opened here, then it will be closed // before this function exits. if rc == SQLITE_OK && SQLITE_TXN_NONE == Xsqlite3BtreeTxnState(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) { rc = Xsqlite3BtreeBeginTrans(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, 0, uintptr(0)) bCloseTrans = 1 } // If the destination database has not yet been locked (i.e. if this // is the first call to backup_step() for the current backup operation), // try to set its page size to the same as the source database. This // is especially important on ZipVFS systems, as in that case it is // not possible to create a database file that uses one page size by // writing to it with another. if (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked == 0 && rc == SQLITE_OK && setDestPgsz(tls, p) == SQLITE_NOMEM { rc = SQLITE_NOMEM } // Lock the destination database, if it is not locked already. if SQLITE_OK == rc && (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked == 0 && SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3BtreeBeginTrans(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 2, p+16)) { (*Sqlite3_backup)(unsafe.Pointer(p)).FbDestLocked = 1 } // Do not allow backup if the destination database is in WAL mode // and the page sizes are different between source and destination pgszSrc = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) pgszDest = Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) destMode = Xsqlite3PagerGetJournalMode(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)) if SQLITE_OK == rc && destMode == PAGER_JOURNALMODE_WAL && pgszSrc != pgszDest { rc = SQLITE_READONLY } // Now that there is a read-lock on the source database, query the // source pager for the number of pages in the database. nSrcPage = int32(Xsqlite3BtreeLastPage(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) for ii = 0; (nPage < 0 || ii < nPage) && (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext <= Pgno(nSrcPage) && !(rc != 0); ii++ { var iSrcPg Pgno = (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext // Source page number if iSrcPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FpBt)).FpageSize+U32(1) { // var pSrcPg uintptr at bp, 8 // Source page object rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp, PAGER_GET_READONLY) if rc == SQLITE_OK { rc = backupOnePage(tls, p, iSrcPg, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))), 0) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))) } } (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext++ } if rc == SQLITE_OK { (*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount = Pgno(nSrcPage) (*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining = Pgno(nSrcPage+1) - (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext if (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext > Pgno(nSrcPage) { rc = SQLITE_DONE } else if !((*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached != 0) { attachBackupObject(tls, p) } } // Update the schema version field in the destination database. This // is to make sure that the schema-version really does change in // the case where the source and destination databases have the // same schema version. if rc == SQLITE_DONE { if nSrcPage == 0 { rc = Xsqlite3BtreeNewDb(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest) nSrcPage = 1 } if rc == SQLITE_OK || rc == SQLITE_DONE { rc = Xsqlite3BtreeUpdateMeta(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 1, (*Sqlite3_backup)(unsafe.Pointer(p)).FiDestSchema+U32(1)) } if rc == SQLITE_OK { if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { Xsqlite3ResetAllSchemasOfConnection(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb) } if destMode == PAGER_JOURNALMODE_WAL { rc = Xsqlite3BtreeSetVersion(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 2) } } if rc == SQLITE_OK { var nDestTruncate int32 // Set nDestTruncate to the final number of pages in the destination // database. The complication here is that the destination page // size may be different to the source page size. // // If the source page size is smaller than the destination page size, // round up. In this case the call to sqlite3OsTruncate() below will // fix the size of the file. However it is important to call // sqlite3PagerTruncateImage() here so that any pages in the // destination file that lie beyond the nDestTruncate page mark are // journalled by PagerCommitPhaseOne() before they are destroyed // by the file truncation. if pgszSrc < pgszDest { var ratio int32 = pgszDest / pgszSrc nDestTruncate = (nSrcPage + ratio - 1) / ratio if nDestTruncate == int32(U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1)) { nDestTruncate-- } } else { nDestTruncate = nSrcPage * (pgszSrc / pgszDest) } if pgszSrc < pgszDest { // If the source page-size is smaller than the destination page-size, // two extra things may need to happen: // // * The destination may need to be truncated, and // // * Data stored on the pages immediately following the // pending-byte page in the source database may need to be // copied into the destination database. var iSize I64 = I64(pgszSrc) * I64(nSrcPage) var pFile uintptr = Xsqlite3PagerFile(tls, pDestPager) var iPg Pgno // var nDstPage int32 at bp+8, 4 var iOff I64 var iEnd I64 // This block ensures that all data required to recreate the original // database has been stored in the journal for pDestPager and the // journal synced to disk. So at this point we may safely modify // the database file in any way, knowing that if a power failure // occurs, the original database will be reconstructed from the // journal file. Xsqlite3PagerPagecount(tls, pDestPager, bp+8) for iPg = Pgno(nDestTruncate); rc == SQLITE_OK && iPg <= Pgno(*(*int32)(unsafe.Pointer(bp + 8 /* nDstPage */))); iPg++ { if iPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1) { // var pPg uintptr at bp+16, 8 rc = Xsqlite3PagerGet(tls, pDestPager, iPg, bp+16, 0) if rc == SQLITE_OK { rc = Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */))) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPg */))) } } } if rc == SQLITE_OK { rc = Xsqlite3PagerCommitPhaseOne(tls, pDestPager, uintptr(0), 1) } // Write the extra pages and truncate the database file as required iEnd = func() int64 { if I64(Xsqlite3PendingByte+pgszDest) < iSize { return int64(Xsqlite3PendingByte + pgszDest) } return iSize }() for iOff = I64(Xsqlite3PendingByte + pgszSrc); rc == SQLITE_OK && iOff < iEnd; iOff = iOff + I64(pgszSrc) { *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */)) = uintptr(0) var iSrcPg Pgno = Pgno(iOff/I64(pgszSrc) + int64(1)) rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp+24, 0) if rc == SQLITE_OK { var zData uintptr = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */))) rc = Xsqlite3OsWrite(tls, pFile, zData, pgszSrc, iOff) } Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcPg */))) } if rc == SQLITE_OK { rc = backupTruncateFile(tls, pFile, iSize) } // Sync the database file to disk. if rc == SQLITE_OK { rc = Xsqlite3PagerSync(tls, pDestPager, uintptr(0)) } } else { Xsqlite3PagerTruncateImage(tls, pDestPager, uint32(nDestTruncate)) rc = Xsqlite3PagerCommitPhaseOne(tls, pDestPager, uintptr(0), 0) } // Finish committing the transaction to the destination database. if SQLITE_OK == rc && SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3BtreeCommitPhaseTwo(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, 0)) { rc = SQLITE_DONE } } } // If bCloseTrans is true, then this function opened a read transaction // on the source database. Close the read transaction here. There is // no need to check the return values of the btree methods here, as // "committing" a read-only transaction cannot fail. if bCloseTrans != 0 { Xsqlite3BtreeCommitPhaseOne(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, uintptr(0)) Xsqlite3BtreeCommitPhaseTwo(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc, 0) } if rc == SQLITE_IOERR|int32(12)<<8 { rc = SQLITE_NOMEM } (*Sqlite3_backup)(unsafe.Pointer(p)).Frc = rc } if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) } Xsqlite3BtreeLeave(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb)).Fmutex) return rc } // Release all resources associated with an sqlite3_backup* handle. func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77653:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return // Enter the mutexes if p == uintptr(0) { return SQLITE_OK } pSrcDb = (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrcDb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pSrcDb)).Fmutex) Xsqlite3BtreeEnter(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) } // Detach this backup from the source pager. if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { (*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FnBackup-- } if (*Sqlite3_backup)(unsafe.Pointer(p)).FisAttached != 0 { pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) for *(*uintptr)(unsafe.Pointer(pp)) != p { pp = *(*uintptr)(unsafe.Pointer(pp)) + 64 } *(*uintptr)(unsafe.Pointer(pp)) = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext } // If a transaction is still open on the Btree, roll it back. Xsqlite3BtreeRollback(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, SQLITE_OK, 0) // Set the error code of the destination database handle. if (*Sqlite3_backup)(unsafe.Pointer(p)).Frc == SQLITE_DONE { rc = SQLITE_OK } else { rc = (*Sqlite3_backup)(unsafe.Pointer(p)).Frc } if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { Xsqlite3Error(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb, rc) // Exit the mutexes and free the backup context structure. Xsqlite3LeaveMutexAndCloseZombie(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb) } Xsqlite3BtreeLeave(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc) if (*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb != 0 { // EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a // call to sqlite3_backup_init() and is destroyed by a call to // sqlite3_backup_finish(). Xsqlite3_free(tls, p) } Xsqlite3LeaveMutexAndCloseZombie(tls, pSrcDb) return rc } // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77707:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77721:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } // This function is called after the contents of page iPage of the // source database have been modified. If page iPage has already been // copied into the destination database, then the data written to the // destination is now invalidated. The destination copy of iPage needs // to be updated with the new data before the backup operation is // complete. // // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77743:29: */ for __ccgo := true; __ccgo; __ccgo = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { if !(isFatalError(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).Frc) != 0) && iPage < (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext { // The backup process p has already copied page iPage. But now it // has been modified by a transaction on the source pager. Copy // the new data into the backup. var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) rc = backupOnePage(tls, p, iPage, aData, 1) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDestDb)).Fmutex) if rc != SQLITE_OK { (*Sqlite3_backup)(unsafe.Pointer(p)).Frc = rc } } } } func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77768:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } } // Restart the backup process. This is called when the pager layer // detects that the database has been modified by an external database // connection. In this case there is no way of knowing which of the // pages that have been copied into the destination database are still // valid and which are not, so the entire process needs to be restarted. // // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77783:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { (*Sqlite3_backup)(unsafe.Pointer(p)).FiNext = Pgno(1) } } // Copy the complete content of pBtFrom into pBtTo. A transaction // must be active for both files. // // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77800:20: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 var pFd uintptr // File descriptor for database pTo // var b Sqlite3_backup at bp+8, 72 // var nByte I64 at bp, 8 Xsqlite3BtreeEnter(tls, pTo) Xsqlite3BtreeEnter(tls, pFrom) pFd = Xsqlite3PagerFile(tls, Xsqlite3BtreePager(tls, pTo)) if !((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods != 0) { goto __1 } *(*I64)(unsafe.Pointer(bp /* nByte */)) = I64(Xsqlite3BtreeGetPageSize(tls, pFrom)) * I64(Xsqlite3BtreeLastPage(tls, pFrom)) rc = Xsqlite3OsFileControl(tls, pFd, SQLITE_FCNTL_OVERWRITE, bp) if !(rc == SQLITE_NOTFOUND) { goto __2 } rc = SQLITE_OK __2: ; if !(rc != 0) { goto __3 } goto copy_finished __3: ; __1: ; // Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set // to 0. This is used by the implementations of sqlite3_backup_step() // and sqlite3_backup_finish() to detect that they are being called // from this function, not directly by the user. libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Sqlite3_backup{}))) (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrcDb = (*Btree)(unsafe.Pointer(pFrom)).Fdb (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrc = pFrom (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpDest = pTo (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FiNext = Pgno(1) // 0x7FFFFFFF is the hard limit for the number of pages in a database // file. By passing this as the number of pages to copy to // sqlite3_backup_step(), we can guarantee that the copy finishes // within a single call (unless an error occurs). The assert() statement // checks this assumption - (p->rc) should be set to either SQLITE_DONE // or an error code. Xsqlite3_backup_step(tls, bp+8, 0x7FFFFFFF) rc = Xsqlite3_backup_finish(tls, bp+8) if !(rc == SQLITE_OK) { goto __4 } *(*U16)(unsafe.Pointer((*Btree)(unsafe.Pointer(pTo)).FpBt + 40)) &= libc.Uint16FromInt32(libc.CplInt32(BTS_PAGESIZE_FIXED)) goto __5 __4: Xsqlite3PagerClearCache(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(bp+8 /* &b */)).FpDest)) __5: ; copy_finished: Xsqlite3BtreeLeave(tls, pFrom) Xsqlite3BtreeLeave(tls, pTo) return rc } //************* End of backup.c ********************************************* //************* Begin file vdbemem.c **************************************** // 2004 May 26 // // 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 code use to manipulate "Mem" structure. A "Mem" // stores a single value in the VDBE. Mem is an opaque structure visible // only within the VDBE. Interface routines refer to a Mem using the // name sqlite_value // #include "sqliteInt.h" // #include "vdbeInt.h" // True if X is a power of two. 0 is considered a power of two here. // In other words, return true if X has at most one bit set. // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:77958:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var acc StrAccum at bp+16, 32 if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int != 0 { // Work-around for GCC bug // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 // var x I64 at bp+8, 8 libc.Xmemcpy(tls, bp+8, p, uint64(int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int*2)) Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8 /* x */)), zBuf) } else { Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) Xsqlite3_str_appendf(tls, bp+16, ts+6228, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) } return *(*float64)(unsafe.Pointer(p)) }())) *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+16 /* &acc */)).FnChar))) = int8(0) // Fast version of sqlite3StrAccumFinish(&acc) } } // If pMem is an object with a valid string representation, this routine // ensures the internal encoding for the string representation is // 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE. // // If pMem is not a string object, or the encoding of the string // representation is already stored using the requested encoding, then this // routine is a no-op. // // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78051:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) { (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(desiredEnc) return SQLITE_OK } if int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { return SQLITE_OK } // MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned, // then the encoding of the value may not have changed. rc = Xsqlite3VdbeMemTranslate(tls, pMem, U8(desiredEnc)) return rc } // Make sure pMem->z points to a writable allocation of at least n bytes. // // If the bPreserve argument is true, then copy of the content of // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78090:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 && bPreserve != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz == (*Mem)(unsafe.Pointer(pMem)).FzMalloc { if (*Mem)(unsafe.Pointer(pMem)).Fdb != 0 { (*Mem)(unsafe.Pointer(pMem)).Fz = libc.AssignPtrUintptr(pMem+24, Xsqlite3DbReallocOrFree(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(n))) } else { (*Mem)(unsafe.Pointer(pMem)).FzMalloc = Xsqlite3Realloc(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(n)) if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { Xsqlite3_free(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) } (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc } bPreserve = 0 } else { if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } (*Mem)(unsafe.Pointer(pMem)).FzMalloc = Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(n)) } if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { Xsqlite3VdbeMemSetNull(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 return SQLITE_NOMEM } else { (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } if bPreserve != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz != 0 { libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pMem)).FzMalloc, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64((*Mem)(unsafe.Pointer(pMem)).Fn)) } if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Dyn != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(pMem)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) } (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem | MEM_Static)) return SQLITE_OK } // Change the pMem->zMalloc allocation to be at least szNew bytes. // If pMem->zMalloc already meets or exceeds the requested size, this // routine is a no-op. // // Any prior string or blob content in the pMem object may be discarded. // The pMem->xDel destructor is called, if it exists. Though MEM_Str // and MEM_Blob values may be discarded, MEM_Int, MEM_Real, MEM_IntReal, // and MEM_Null values are preserved. // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78153:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) } (*Mem)(unsafe.Pointer(pMem)).Fz = (*Mem)(unsafe.Pointer(pMem)).FzMalloc *(*U16)(unsafe.Pointer(pMem + 8)) &= U16(MEM_Null | MEM_Int | MEM_Real | MEM_IntReal) return SQLITE_OK } // It is already known that pMem contains an unterminated string. // Add the zero terminator. // // Three bytes of zero are added. In this way, there is guaranteed // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78174:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+1))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((*Mem)(unsafe.Pointer(pMem)).Fn+2))) = int8(0) *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Term) return SQLITE_OK } // Change pMem so that its MEM_Str or MEM_Blob value is stored in // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78191:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pMem) } return 0 }() != 0 { return SQLITE_NOMEM } if (*Mem)(unsafe.Pointer(pMem)).FszMalloc == 0 || (*Mem)(unsafe.Pointer(pMem)).Fz != (*Mem)(unsafe.Pointer(pMem)).FzMalloc { var rc int32 = vdbeMemAddTerminator(tls, pMem) if rc != 0 { return rc } } } *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) return SQLITE_OK } // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78215:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. nByte = (*Mem)(unsafe.Pointer(pMem)).Fn + *(*int32)(unsafe.Pointer(pMem)) if nByte <= 0 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Blob == 0 { return SQLITE_OK } nByte = 1 } if Xsqlite3VdbeMemGrow(tls, pMem, nByte, 1) != 0 { return SQLITE_NOMEM } libc.Xmemset(tls, (*Mem)(unsafe.Pointer(pMem)).Fz+uintptr((*Mem)(unsafe.Pointer(pMem)).Fn), 0, uint64(*(*int32)(unsafe.Pointer(pMem)))) *(*int32)(unsafe.Pointer(pMem + 12)) += *(*int32)(unsafe.Pointer(pMem)) *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Zero | MEM_Term)) return SQLITE_OK } // Make sure the given Mem is \u0000 terminated. func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78246:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do } else { return vdbeMemAddTerminator(tls, pMem) } return int32(0) } // Add MEM_Str to the set of representations for the given Mem. This // routine is only called if pMem is a number of some kind, not a NULL // or a BLOB. // // Existing representations MEM_Int, MEM_Real, or MEM_IntReal are invalidated // if bForce is true but are retained if bForce is false. // // A MEM_Null value will never be passed to this function. This function is // used for converting values to text for returning to the user (i.e. via // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78272:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(0) return SQLITE_NOMEM } vdbeMemRenderNum(tls, nByte, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem) (*Mem)(unsafe.Pointer(pMem)).Fn = int32(libc.Xstrlen(tls, (*Mem)(unsafe.Pointer(pMem)).Fz) & uint64(0x3fffffff)) (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(MEM_Str | MEM_Term) if bForce != 0 { *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal)) } Xsqlite3VdbeChangeEncoding(tls, pMem, int32(enc)) return SQLITE_OK } // Memory cell pMem contains the context of an aggregate function. // This routine calls the finalize method for that function. The // result of the aggregate is stored back into pMem. // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78307:20: */ bp := tls.Alloc(112) defer tls.Free(112) // var ctx Sqlite3_context at bp, 56 // var t Mem at bp+56, 56 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 56 /* &t */)).Fflags = U16(MEM_Null) (*Mem)(unsafe.Pointer(bp + 56 /* &t */)).Fdb = (*Mem)(unsafe.Pointer(pMem)).Fdb (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = bp + 56 /* &t */ (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pMem (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxFinalize})).f(tls, bp /* &ctx */) // IMP: R-24505-23230 if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } libc.Xmemcpy(tls, pMem, bp+56, uint64(unsafe.Sizeof(Mem{}))) return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError } // Memory cell pAccum contains the context of an aggregate function. // This routine calls the xValue method for that function and stores // the results in memory cell pMem. // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78338:20: */ bp := tls.Alloc(56) defer tls.Free(56) // var ctx Sqlite3_context at bp, 56 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) Xsqlite3VdbeMemSetNull(tls, pOut) (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pAccum (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpFunc = pFunc (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxValue})).f(tls, bp /* &ctx */) return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError } // If the memory cell contains a value that must be freed by // invoking the external callback in Mem.xDel, then this routine // will free that value. It also sets Mem.flags to MEM_Null. // // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78363:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) } if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Dyn != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Mem)(unsafe.Pointer(p)).FxDel})).f(tls, (*Mem)(unsafe.Pointer(p)).Fz) } (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) } // Release memory held by the Mem p, both external memory cleared // by p->xDel and memory in p->zMalloc. // // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. func vdbeMemClear(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78386:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(p)).Fdb, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 } (*Mem)(unsafe.Pointer(p)).Fz = uintptr(0) } // Release any memory resources held by the Mem. Both the memory that is // free by Mem.xDel and the Mem.zMalloc allocation are freed. // // Use this routine prior to clean up prior to abandoning a Mem, or to // reset a Mem back to its minimum memory utilization. // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78407:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) } } // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. func doubleToInt64(tls *libc.TLS, r float64) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78419:28: */ if r <= float64(minInt) { return minInt } else if r >= float64(maxInt) { return maxInt } else { return I64(r) } return I64(0) } var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78431:20 */ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78432:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. // If pMem is an integer, then the value is exact. If pMem is // a floating-point then the value returned is the integer part. // If pMem is a string or blob, then we make an attempt to convert // it into an integer and return that. If pMem represents an // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78455:28: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp /* value */)) = int64(0) Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78460:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) if flags&(MEM_Int|MEM_IntReal) != 0 { return *(*I64)(unsafe.Pointer(pMem)) } else if flags&MEM_Real != 0 { return doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) } else if flags&(MEM_Str|MEM_Blob) != 0 && (*Mem)(unsafe.Pointer(pMem)).Fz != uintptr(0) { return memIntValue(tls, pMem) } else { return int64(0) } return I64(0) } // Return the best representation of pMem that we can get into a // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78484:31: */ bp := tls.Alloc(8) defer tls.Free(8) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... *(*float64)(unsafe.Pointer(bp /* val */)) = float64(0) Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78490:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return float64(*(*I64)(unsafe.Pointer(pMem))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { return memRealValue(tls, pMem) } else { // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... return float64(0) } return float64(0) } // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78511:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) } if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return ifNull } return libc.Bool32(Xsqlite3VdbeRealValue(tls, pMem) != 0.0) } // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78522:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) // Only mark the value as an integer if // // (1) the round-trip conversion real->int->real is a no-op, and // (2) The integer is neither the largest nor the smallest // possible integer (ticket #3922) // // The second and third terms in the following conditional enforces // the second condition under the assumption that addition overflow causes // values to wrap around. if *(*float64)(unsafe.Pointer(pMem)) == float64(ix) && ix > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) && ix < int64(0xffffffff)|I64(int64(0x7fffffff))<<32 { *(*I64)(unsafe.Pointer(pMem)) = ix (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } } // Convert pMem to type integer. Invalidate any prior representations. func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78551:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) return SQLITE_OK } // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78566:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) return SQLITE_OK } // Compare a floating point value to an integer. Return true if the two // values are the same within the precision of the floating point value. // // This function assumes that i was obtained by assignment from r1. // // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78585:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 *(*float64)(unsafe.Pointer(bp + 8 /* r2 */)) = float64(i) return libc.Bool32(*(*float64)(unsafe.Pointer(bp)) == 0.0 || libc.Xmemcmp(tls, bp, bp+8, uint64(unsafe.Sizeof(float64(0)))) == 0 && i >= -2251799813685248 && i < 2251799813685248) } // Convert pMem so that it has type MEM_Real or MEM_Int. // Invalidate any prior representations. // // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78600:20: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Null) == 0 { var rc int32 // var ix Sqlite3_int64 at bp, 8 rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) if (rc == 0 || rc == 1) && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1 || Xsqlite3RealSameAsInt(tls, *(*float64)(unsafe.Pointer(pMem)), libc.AssignPtrInt64(bp, libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(pMem))))) != 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) } else { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) } } *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str | MEM_Blob | MEM_Zero)) return SQLITE_OK } // Cast the datatype of the value in pMem according to the affinity // "aff". Casting is different from applying affinity in that a cast // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78633:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } switch int32(aff) { case SQLITE_AFF_BLOB: { // Really a cast to BLOB if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Blob == 0 { Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) } } else { *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_TypeMask & libc.CplInt32(MEM_Blob))) } break } case SQLITE_AFF_NUMERIC: { Xsqlite3VdbeMemNumerify(tls, pMem) break } case SQLITE_AFF_INTEGER: { Xsqlite3VdbeMemIntegerify(tls, pMem) break } case SQLITE_AFF_REAL: { Xsqlite3VdbeMemRealify(tls, pMem) break } default: { *(*U16)(unsafe.Pointer(pMem + 8)) |= U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Blob >> 3) Xsqlite3ValueApplyAffinity(tls, pMem, uint8(SQLITE_AFF_TEXT), encoding) *(*U16)(unsafe.Pointer(pMem + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int | MEM_Real | MEM_IntReal | MEM_Blob | MEM_Zero)) return Xsqlite3VdbeChangeEncoding(tls, pMem, int32(encoding)) } } return SQLITE_OK } // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78676:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 } // Delete any previous value and set the value stored in *pMem to NULL. // // This routine calls the Mem.xDel destructor to dispose of values that // require the destructor. But it preserves the Mem.zMalloc memory allocation. // To free all resources, use sqlite3VdbeMemRelease(), which both calls this // routine to invoke the destructor and deallocates Mem.zMalloc. // // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78696:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) } } func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78703:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78712:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 if n < 0 { n = 0 } *(*int32)(unsafe.Pointer(pMem)) = n (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) } // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78742:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) } // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78752:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) } } // A no-op destructor func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78762:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78768:21: */ vdbeMemClear(tls, pMem) *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType } return ts + 1524 /* "" */ }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) (*Mem)(unsafe.Pointer(pMem)).FeSubtype = U8('p') (*Mem)(unsafe.Pointer(pMem)).FxDel = func() uintptr { if xDestructor != 0 { return xDestructor } return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3NoopDestructor})) }() } // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78788:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Real) } } // Delete any previous value and set the value of pMem to be an // empty boolean index. // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78815:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr Xsqlite3VdbeMemRelease(tls, pMem) p = Xsqlite3RowSetInit(tls, db) if p == uintptr(0) { return SQLITE_NOMEM } (*Mem)(unsafe.Pointer(pMem)).Fz = p (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Dyn) (*Mem)(unsafe.Pointer(pMem)).FxDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3RowSetDelete})) return SQLITE_OK } // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78833:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { n = n + *(*int32)(unsafe.Pointer(p)) } return libc.Bool32(n > *(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(p)).Fdb + 136))) } return 0 } // Make an shallow copy of pFrom into pTo. Prior contents of // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78889:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78894:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) return } libc.Xmemcpy(tls, pTo, pFrom, uint64(uintptr(0)+24)) if int32((*Mem)(unsafe.Pointer(pFrom)).Fflags)&MEM_Static == 0 { *(*U16)(unsafe.Pointer(pTo + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Static | MEM_Ephem)) *(*U16)(unsafe.Pointer(pTo + 8)) |= U16(srcType) } } // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78910:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pTo) } libc.Xmemcpy(tls, pTo, pFrom, uint64(uintptr(0)+24)) *(*U16)(unsafe.Pointer(pTo + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn)) if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if 0 == int32((*Mem)(unsafe.Pointer(pFrom)).Fflags)&MEM_Static { *(*U16)(unsafe.Pointer(pTo + 8)) |= U16(MEM_Ephem) rc = Xsqlite3VdbeMemMakeWriteable(tls, pTo) } } return rc } // Transfer the contents of pFrom to pTo. Any existing value in pTo is // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78933:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(pFrom)).Fflags = U16(MEM_Null) (*Mem)(unsafe.Pointer(pFrom)).FszMalloc = 0 } // Change the value of a Mem to be a string or a BLOB. // // The memory management strategy depends on the value of the xDel // parameter. If the value passed is SQLITE_TRANSIENT, then the // string is copied into a (possibly existing) buffer managed by the // Mem structure. Otherwise, any existing buffer is freed and the // pointer copied. // // If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH // size limit) then no memory allocation occurs. If the string can be // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:78959:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags // If z is a NULL pointer, set pMem to contain an SQL NULL. if !(z != 0) { Xsqlite3VdbeMemSetNull(tls, pMem) return SQLITE_OK } if (*Mem)(unsafe.Pointer(pMem)).Fdb != 0 { iLimit = *(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fdb + 136)) } else { iLimit = SQLITE_MAX_LENGTH } flags = func() uint16 { if int32(enc) == 0 { return uint16(MEM_Blob) } return uint16(MEM_Str) }() if nByte < int64(0) { if int32(enc) == SQLITE_UTF8 { nByte = I64(libc.Xstrlen(tls, z)) } else { for nByte = int64(0); nByte <= I64(iLimit) && int32(*(*int8)(unsafe.Pointer(z + uintptr(nByte))))|int32(*(*int8)(unsafe.Pointer(z + uintptr(nByte+int64(1))))) != 0; nByte = nByte + int64(2) { } } flags = U16(int32(flags) | MEM_Term) } // The following block sets the new values of Mem.z and Mem.xDel. It // also sets a flag in local variable "flags" to indicate the memory // management (one of MEM_Dyn or MEM_Static). if xDel == libc.UintptrFromInt32(-1) { var nAlloc I64 = nByte if int32(flags)&MEM_Term != 0 { nAlloc = nAlloc + func() int64 { if int32(enc) == SQLITE_UTF8 { return int64(1) } return int64(2) }() } if nByte > I64(iLimit) { return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG) } if Xsqlite3VdbeMemClearAndResize(tls, pMem, func() int32 { if nAlloc > int64(32) { return int32(nAlloc) } return 32 }()) != 0 { return SQLITE_NOMEM } libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, z, uint64(nAlloc)) } else { Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fz = z if xDel == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault})) { (*Mem)(unsafe.Pointer(pMem)).FzMalloc = (*Mem)(unsafe.Pointer(pMem)).Fz (*Mem)(unsafe.Pointer(pMem)).FszMalloc = Xsqlite3DbMallocSize(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } else { (*Mem)(unsafe.Pointer(pMem)).FxDel = xDel flags = U16(int32(flags) | func() int32 { if xDel == uintptr(0) { return MEM_Static } return MEM_Dyn }()) } } (*Mem)(unsafe.Pointer(pMem)).Fn = int32(nByte & int64(0x7fffffff)) (*Mem)(unsafe.Pointer(pMem)).Fflags = flags if enc != 0 { (*Mem)(unsafe.Pointer(pMem)).Fenc = enc } else if (*Mem)(unsafe.Pointer(pMem)).Fdb == uintptr(0) { (*Mem)(unsafe.Pointer(pMem)).Fenc = U8(SQLITE_UTF8) } else { (*Mem)(unsafe.Pointer(pMem)).Fenc = (*Sqlite3)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fdb)).Fenc } if int32(enc) > SQLITE_UTF8 && Xsqlite3VdbeMemHandleBom(tls, pMem) != 0 { return SQLITE_NOMEM } if nByte > I64(iLimit) { return Xsqlite3ErrorToParser(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, SQLITE_TOOBIG) } return SQLITE_OK } // Move data out of a btree key or data field and into a Mem structure. // The data is payload from the entry that pCur is currently pointing // to. offset and amt determine what portion of the data or key to retrieve. // The result is written into the pMem element. // // The pMem object must have been initialized. This routine will use // pMem->zMalloc to hold the content from the btree, if possible. New // pMem->zMalloc space will be allocated if necessary. The calling routine // is responsible for making sure that the pMem object is eventually // destroyed. // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79068:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { return Xsqlite3CorruptError(tls, 79077) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) if rc == SQLITE_OK { *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pMem)).Fz + uintptr(amt))) = int8(0) // Overrun area used when reading malformed records (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob) (*Mem)(unsafe.Pointer(pMem)).Fn = int32(amt) } else { Xsqlite3VdbeMemRelease(tls, pMem) } } return rc } func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79091:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp /* available */)) = U32(0) // Number of bytes available on the local btree page var rc int32 = SQLITE_OK // Return code // Note: the calls to BtreeKeyFetch() and DataFetch() below assert() // that both the BtShared and database handle mutexes are held. (*Mem)(unsafe.Pointer(pMem)).Fz = Xsqlite3BtreePayloadFetch(tls, pCur, bp) if amt <= *(*U32)(unsafe.Pointer(bp)) { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Ephem) (*Mem)(unsafe.Pointer(pMem)).Fn = int32(amt) } else { rc = Xsqlite3VdbeMemFromBtree(tls, pCur, uint32(0), amt, pMem) } return rc } // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79123:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pVal) } return 0 }() != 0 { return uintptr(0) } *(*U16)(unsafe.Pointer(pVal + 8)) |= U16(MEM_Str) if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) != int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) { Xsqlite3VdbeChangeEncoding(tls, pVal, int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED)) } if int32(enc)&SQLITE_UTF16_ALIGNED != 0 && 1 == 1&int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fz) { if Xsqlite3VdbeMemMakeWriteable(tls, pVal) != SQLITE_OK { return uintptr(0) } } Xsqlite3VdbeMemNulTerminate(tls, pVal) // IMP: R-31275-44060 } else { Xsqlite3VdbeMemStringify(tls, pVal, enc, uint8(0)) } if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc)&libc.CplInt32(SQLITE_UTF16_ALIGNED) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz } else { return uintptr(0) } return uintptr(0) } // This function is only available internally, it is not part of the // external API. It works in a similar way to sqlite3_value_text(), // except the data returned is in the encoding specified by the second // parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or // SQLITE_UTF8. // // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79166:27: */ if !(pVal != 0) { return uintptr(0) } if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Str|MEM_Term) == MEM_Str|MEM_Term && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fz } if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_Null != 0 { return uintptr(0) } return valueToText(tls, pVal, enc) } // Create a new sqlite3_value object. func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79184:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) (*Mem)(unsafe.Pointer(p)).Fdb = db } return p } // Context object passed by sqlite3Stat4ProbeSetValue() through to // valueNew(). See comments above valueNew() for details. type ValueNewStat4Ctx = struct { FpParse uintptr FpIdx uintptr FppRec uintptr FiVal int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79197:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated // by calling sqlite3ValueNew(). // // Otherwise, if the second argument is non-zero, then this function is // being called indirectly by sqlite3Stat4ProbeSetValue(). If it has not // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79215:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) if pRec == uintptr(0) { var pIdx uintptr = (*ValueNewStat4Ctx)(unsafe.Pointer(p)).FpIdx // Index being probed var nByte int32 // Bytes of space to allocate var i int32 // Counter variable var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) // Number of index columns including rowid nByte = int32(uint64(unsafe.Sizeof(Mem{}))*uint64(nCol) + (uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) pRec = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if pRec != 0 { (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo = Xsqlite3KeyInfoOfIndex(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(p)).FpParse, pIdx) if (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo != 0 { (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem = pRec + uintptr((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) for i = 0; i < nCol; i++ { (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr(i)*56)).Fflags = U16(MEM_Null) (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr(i)*56)).Fdb = db } } else { Xsqlite3DbFreeNN(tls, db, pRec) pRec = uintptr(0) } } if pRec == uintptr(0) { return uintptr(0) } *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) = pRec } (*UnpackedRecord)(unsafe.Pointer(pRec)).FnField = U16((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FiVal + 1) return (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem + uintptr((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FiVal)*56 } return Xsqlite3ValueNew(tls, db) } // The expression object indicated by the second argument is guaranteed // to be a scalar SQL function. If // // * all function arguments are SQL literals, // * one of the SQLITE_FUNC_CONSTANT or _SLOCHNG function flags is set, and // * the SQLITE_FUNC_NEEDCOLL function flag is not set, // // then this routine attempts to invoke the SQL function. Assuming no // error occurs, output parameter (*ppVal) is set to point to a value // object containing the result before returning SQLITE_OK. // // Affinity aff is applied to the result of the function before returning. // If the result is a text value, the sqlite3_value object uses encoding // enc. // // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79277:12: */ bp := tls.Alloc(64) defer tls.Free(64) // var ctx Sqlite3_context at bp+8, 56 // Context object for function invocation var apVal uintptr // Function arguments var nVal int32 // Size of apVal[] array var pFunc uintptr // Function definition var pVal uintptr // New value var rc int32 // Return code var pList uintptr // Function arguments var i int32 apVal = uintptr(0) nVal = 0 pFunc = uintptr(0) pVal = uintptr(0) rc = SQLITE_OK pList = uintptr(0) // Iterator variable pList = *(*uintptr)(unsafe.Pointer(p + 32)) if !(pList != 0) { goto __1 } nVal = (*ExprList)(unsafe.Pointer(pList)).FnExpr __1: ; pFunc = Xsqlite3FindFunction(tls, db, *(*uintptr)(unsafe.Pointer(p + 8)), nVal, enc, uint8(0)) if !((*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) == U32(0) || (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { goto __2 } return SQLITE_OK __2: ; if !(pList != 0) { goto __3 } apVal = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(uintptr(0)))*uint64(nVal)) if !(apVal == uintptr(0)) { goto __4 } rc = SQLITE_NOMEM goto value_from_function_out __4: ; i = 0 __5: if !(i < nVal) { goto __7 } rc = Xsqlite3ValueFromExpr(tls, db, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr, enc, aff, apVal+uintptr(i)*8) if !(*(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) == uintptr(0) || rc != SQLITE_OK) { goto __8 } goto value_from_function_out __8: ; goto __6 __6: i++ goto __5 goto __7 __7: ; __3: ; pVal = valueNew(tls, db, pCtx) if !(pVal == uintptr(0)) { goto __9 } rc = SQLITE_NOMEM goto value_from_function_out __9: ; libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpOut = pVal (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpFunc = pFunc (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer(pFunc)).FxSFunc})).f(tls, bp+8 /* &ctx */, nVal, apVal) if !((*Sqlite3_context)(unsafe.Pointer(bp+8)).FisError != 0) { goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FisError Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+4444, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) rc = Xsqlite3VdbeChangeEncoding(tls, pVal, int32(enc)) if !(rc == SQLITE_OK && Xsqlite3VdbeMemTooBig(tls, pVal) != 0) { goto __12 } rc = SQLITE_TOOBIG (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).FnErr++ __12: ; __11: ; (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).Frc = rc value_from_function_out: if !(rc != SQLITE_OK) { goto __13 } pVal = uintptr(0) __13: ; if !(apVal != 0) { goto __14 } i = 0 __15: if !(i < nVal) { goto __17 } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) goto __16 __16: i++ goto __15 goto __17 __17: ; Xsqlite3DbFreeNN(tls, db, apVal) __14: ; *(*uintptr)(unsafe.Pointer(ppVal)) = pVal return rc } // Extract a value from the supplied expression in the manner described // above sqlite3ValueFromExpr(). Allocate the sqlite3_value object // using valueNew(). // // If pCtx is NULL and an error occurs after the sqlite3_value object // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79373:12: */ bp := tls.Alloc(24) defer tls.Free(24) var op int32 var zVal uintptr // var pVal uintptr at bp+16, 8 var negInt int32 var zNeg uintptr var rc int32 var aff U8 var nVal int32 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0) negInt = 1 zNeg = ts + 1524 /* "" */ rc = SQLITE_OK __1: if !(libc.AssignInt32(&op, int32((*Expr)(unsafe.Pointer(pExpr)).Fop)) == TK_UPLUS || op == TK_SPAN) { goto __2 } pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto __1 __2: ; if !(op == TK_REGISTER) { goto __3 } op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) __3: ; // Compressed expressions only appear when parsing the DEFAULT clause // on a table column definition, and hence only when pCtx==0. This // check ensures that an EP_TokenOnly expression is never passed down // into valueFromFunction(). if !(op == TK_CAST) { goto __4 } aff = U8(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0))) rc = valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, aff, ppVal, pCtx) if !(*(*uintptr)(unsafe.Pointer(ppVal)) != 0) { goto __5 } Xsqlite3VdbeMemCast(tls, *(*uintptr)(unsafe.Pointer(ppVal)), aff, uint8(SQLITE_UTF8)) Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(ppVal)), affinity, uint8(SQLITE_UTF8)) __5: ; return rc __4: ; // Handle negative integers in a single step. This is needed in the // case when the value is -9223372036854775808. if !(op == TK_UMINUS && (int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_INTEGER || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_FLOAT)) { goto __6 } pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 zNeg = ts + 6235 /* "-" */ __6: ; if !(op == TK_STRING || op == TK_FLOAT || op == TK_INTEGER) { goto __7 } *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { goto __9 } goto no_mem __9: ; if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0)) { goto __10 } Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: zVal = Xsqlite3MPrintf(tls, db, ts+6237, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } goto no_mem __12: ; Xsqlite3ValueSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), -1, zVal, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) __11: ; if !((op == TK_INTEGER || op == TK_FLOAT) && int32(affinity) == SQLITE_AFF_BLOB) { goto __13 } Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_UTF8)) goto __14 __13: Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, uint8(SQLITE_UTF8)) __14: ; if !(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&(MEM_Int|MEM_IntReal|MEM_Real) != 0) { goto __15 } *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)) + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str)) __15: ; if !(int32(enc) != SQLITE_UTF8) { goto __16 } rc = Xsqlite3VdbeChangeEncoding(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), int32(enc)) __16: ; goto __8 __7: if !(op == TK_UMINUS) { goto __17 } // This branch happens for multiple negative signs. Ex: -(-5) if !(SQLITE_OK == valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, affinity, bp+16, pCtx) && *(*uintptr)(unsafe.Pointer(bp + 16)) != uintptr(0)) { goto __19 } Xsqlite3VdbeMemNumerify(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) if !(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&MEM_Real != 0) { goto __20 } *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -*(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) goto __21 __20: if !(*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { goto __22 } *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -float64(int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32)) (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags = U16(int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) goto __23 __22: *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = -*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) __23: ; __21: ; Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, enc) __19: ; goto __18 __17: if !(op == TK_NULL) { goto __24 } *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { goto __26 } goto no_mem __26: ; Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) goto __25 __24: if !(op == TK_BLOB) { goto __27 } *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) if !!(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __29 } goto no_mem __29: ; zVal = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 nVal = Xsqlite3Strlen30(tls, zVal) - 1 Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), int64(nVal/2), uint8(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) goto __28 __27: if !(op == TK_FUNCTION && pCtx != uintptr(0)) { goto __30 } rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+16, pCtx) goto __31 __30: if !(op == TK_TRUEFALSE) { goto __32 } *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { goto __33 } (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16)))) = I64(libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0)) __33: ; __32: ; __31: ; __28: ; __25: ; __18: ; __8: ; *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) return rc no_mem: if !(pCtx == uintptr(0) || (*Parse)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse)).FnErr == 0) { goto __34 } Xsqlite3OomFault(tls, db) __34: ; Xsqlite3DbFree(tls, db, zVal) if !(pCtx == uintptr(0)) { goto __35 } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) __35: ; return SQLITE_NOMEM } // Create a new sqlite3_value object, containing the value of pExpr. // // This only works for very simple expressions that consist of one constant // token (i.e. "5", "5.1", "'a string'"). If the expression can // be converted directly into a value, then the value is allocated and // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79528:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } return 0 } // Attempt to extract a value from pExpr and use it to construct *ppVal. // // If pAlloc is not NULL, then an UnpackedRecord object is created for // pAlloc if one does not exist and the new value is added to the // UnpackedRecord object. // // A value is extracted in the following cases: // // * (pExpr==0). In this case the value is assumed to be an SQL NULL, // // * The expression is a bound variable, and this is a reprepare, or // // * The expression is a literal value. // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79557:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Skip over any TK_COLLATE nodes pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) if !(pExpr != 0) { *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = valueNew(tls, db, pAlloc) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VARIABLE && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableQPSG) == uint64(0) { var v uintptr var iBindVar int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iBindVar) if libc.AssignUintptr(&v, (*Parse)(unsafe.Pointer(pParse)).FpReprepare) != uintptr(0) { *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = valueNew(tls, db, pAlloc) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { rc = Xsqlite3VdbeMemCopy(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)), (*Vdbe)(unsafe.Pointer(v)).FaVar+uintptr(iBindVar-1)*56) Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */)), affinity, (*Sqlite3)(unsafe.Pointer(db)).Fenc) (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pVal */)))).Fdb = (*Parse)(unsafe.Pointer(pParse)).Fdb } } } else { rc = valueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, affinity, bp, pAlloc) } *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */)) return rc } // This function is used to allocate and populate UnpackedRecord // structures intended to be compared against sample index keys stored // in the sqlite_stat4 table. // // A single call to this function populates zero or more fields of the // record starting with field iVal (fields are numbered from left to // right starting with 0). A single field is populated if: // // * (pExpr==0). In this case the value is assumed to be an SQL NULL, // // * The expression is a bound variable, and this is a reprepare, or // // * The sqlite3ValueFromExpr() function is able to extract a value // from the expression (i.e. the expression is a literal value). // // Or, if pExpr is a TK_VECTOR, one field is populated for each of the // vector components that match either of the two latter criteria listed // above. // // Before any value is appended to the record, the affinity of the // corresponding column within index pIdx is applied to it. Before // this function returns, output parameter *pnExtract is set to the // number of values appended to the record. // // When this function is called, *ppRec must either point to an object // allocated by an earlier call to this function, or must be NULL. If it // is NULL and a value can be successfully extracted, a new UnpackedRecord // is allocated (and *ppRec set to point to it) before returning. // // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79632:20: */ bp := tls.Alloc(40) defer tls.Free(40) var rc int32 = SQLITE_OK var nExtract int32 = 0 if pExpr == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT { var i int32 // var alloc ValueNewStat4Ctx at bp, 32 (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FpParse = pParse (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FpIdx = pIdx (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FppRec = ppRec for i = 0; i < nElem; i++ { *(*uintptr)(unsafe.Pointer(bp + 32 /* pVal */)) = uintptr(0) var pElem uintptr = func() uintptr { if pExpr != 0 { return Xsqlite3VectorFieldSubexpr(tls, pExpr, i) } return uintptr(0) }() var aff U8 = U8(Xsqlite3IndexColumnAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx, iVal+i)) (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FiVal = iVal + i rc = stat4ValueFromExpr(tls, pParse, pElem, aff, bp, bp+32) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) != 0) { break } nExtract++ } } *(*int32)(unsafe.Pointer(pnExtract)) = nExtract return rc } // Attempt to extract a value from expression pExpr using the methods // as described for sqlite3Stat4ProbeSetValue() above. // // If successful, set *ppVal to point to a new value object and return // SQLITE_OK. If no value can be extracted, but no other error occurs // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79677:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } // Extract the iCol-th column from the nRec-byte record in pRec. Write // the column value into *ppVal. If *ppVal is initially NULL then a new // sqlite3_value object is allocated. // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79694:20: */ bp := tls.Alloc(8) defer tls.Free(8) *(*U32)(unsafe.Pointer(bp + 4 /* t */)) = U32(0) // a column type code // var nHdr int32 at bp, 4 // Size of the header in the record var iHdr int32 // Next unread header byte var iField int32 // Next unread data byte var szField int32 = 0 // Size of the current data field var i int32 // Column index var a uintptr = pRec // Typecast byte array var pMem uintptr = *(*uintptr)(unsafe.Pointer(ppVal)) // Write result into this Mem object iHdr = int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(a))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(bp)) = int32(U32(*(*U8)(unsafe.Pointer(a)))); return 1 }()) } return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { return Xsqlite3CorruptError(tls, 79712) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { iHdr = iHdr + int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(a + uintptr(iHdr)))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*U8)(unsafe.Pointer(a + uintptr(iHdr)))) return 1 }()) } return Xsqlite3GetVarint32(tls, a+uintptr(iHdr), bp+4) }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { return Xsqlite3CorruptError(tls, 79718) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { return Xsqlite3CorruptError(tls, 79724) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) if pMem == uintptr(0) { return SQLITE_NOMEM } } Xsqlite3VdbeSerialGet(tls, a+uintptr(iField-szField), *(*U32)(unsafe.Pointer(bp + 4 /* t */)), pMem) (*Mem)(unsafe.Pointer(pMem)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc return SQLITE_OK } // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79739:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) var aMem uintptr = (*UnpackedRecord)(unsafe.Pointer(pRec)).FaMem var db uintptr = (*Mem)(unsafe.Pointer(aMem)).Fdb for i = 0; i < nCol; i++ { Xsqlite3VdbeMemRelease(tls, aMem+uintptr(i)*56) } Xsqlite3KeyInfoUnref(tls, (*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo) Xsqlite3DbFreeNN(tls, db, pRec) } } // Change the string value of an sqlite3_value object func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79757:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79770:21: */ if !(v != 0) { return } Xsqlite3VdbeMemRelease(tls, v) Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(v)).Fdb, v) } // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79781:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79784:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { return (*Mem)(unsafe.Pointer(p)).Fn } if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Blob != 0 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { return (*Mem)(unsafe.Pointer(p)).Fn + *(*int32)(unsafe.Pointer(p)) } else { return (*Mem)(unsafe.Pointer(p)).Fn } } if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Null != 0 { return 0 } return valueBytes(tls, pVal, enc) } // Create a new virtual database engine. func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79827:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) if p == uintptr(0) { return uintptr(0) } libc.Xmemset(tls, p+144, 0, uint64(unsafe.Sizeof(Vdbe{}))-uint64(uintptr(0)+144)) (*Vdbe)(unsafe.Pointer(p)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { (*Vdbe1)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVdbe)).FpPrev = p } (*Vdbe)(unsafe.Pointer(p)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe (*Vdbe)(unsafe.Pointer(p)).FpPrev = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = p (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_INIT) (*Vdbe)(unsafe.Pointer(p)).FpParse = pParse (*Parse)(unsafe.Pointer(pParse)).FpVdbe = p Xsqlite3VdbeAddOp2(tls, p, OP_Init, 0, 1) return p } // Return the Parse object that owns a Vdbe object. func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79854:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79861:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) ap = va (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3VMPrintf(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zFormat, ap) _ = ap } // Remember the SQL string for a prepared statement. func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79872:21: */ if p == uintptr(0) { return } (*Vdbe)(unsafe.Pointer(p)).FprepFlags = prepFlags if int32(prepFlags)&SQLITE_PREPARE_SAVESQL == 0 { (*Vdbe)(unsafe.Pointer(p)).Fexpmask = U32(0) } (*Vdbe)(unsafe.Pointer(p)).FzSql = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, z, uint64(n)) } // Swap all content between two VDBE structures. func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79922:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr tmp = *(*Vdbe)(unsafe.Pointer(pA)) *(*Vdbe)(unsafe.Pointer(pA)) = *(*Vdbe)(unsafe.Pointer(pB)) *(*Vdbe)(unsafe.Pointer(pB)) = tmp pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpNext (*Vdbe)(unsafe.Pointer(pA)).FpNext = (*Vdbe)(unsafe.Pointer(pB)).FpNext (*Vdbe)(unsafe.Pointer(pB)).FpNext = pTmp pTmp = (*Vdbe)(unsafe.Pointer(pA)).FpPrev (*Vdbe)(unsafe.Pointer(pA)).FpPrev = (*Vdbe)(unsafe.Pointer(pB)).FpPrev (*Vdbe)(unsafe.Pointer(pB)).FpPrev = pTmp zTmp = (*Vdbe)(unsafe.Pointer(pA)).FzSql (*Vdbe)(unsafe.Pointer(pA)).FzSql = (*Vdbe)(unsafe.Pointer(pB)).FzSql (*Vdbe)(unsafe.Pointer(pB)).FzSql = zTmp (*Vdbe)(unsafe.Pointer(pB)).Fexpmask = (*Vdbe)(unsafe.Pointer(pA)).Fexpmask (*Vdbe)(unsafe.Pointer(pB)).FprepFlags = (*Vdbe)(unsafe.Pointer(pA)).FprepFlags libc.Xmemcpy(tls, pB+220, pA+220, uint64(unsafe.Sizeof([9]U32{}))) *(*U32)(unsafe.Pointer(pB + 220 + 5*4))++ } // Resize the Vdbe.aOp array so that it is at least nOp elements larger // than its current size. nOp is guaranteed to be less than or equal // to 1024/sizeof(Op). // // If an out-of-memory error occurs while resizing the array, return // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:79959:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse // The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force // more frequent reallocs and hence provide more opportunities for // simulated OOM faults. SQLITE_TEST_REALLOC_STRESS is generally used // during testing only. With SQLITE_TEST_REALLOC_STRESS grow the op array // by the minimum* amount required until the size reaches 512. Normal // operation (without SQLITE_TEST_REALLOC_STRESS) is to double the current // size of the op array or add 1KB of space, whichever is smaller. var nNew Sqlite3_int64 = func() int64 { if (*Vdbe)(unsafe.Pointer(v)).FnOpAlloc != 0 { return int64(2) * Sqlite3_int64((*Vdbe)(unsafe.Pointer(v)).FnOpAlloc) } return int64(uint64(1024) / uint64(unsafe.Sizeof(Op{}))) }() _ = nOp // Ensure that the size of a VDBE does not grow too large if nNew > Sqlite3_int64(*(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).Fdb + 136 + 5*4))) { Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(p)).Fdb) return SQLITE_NOMEM } pNew = Xsqlite3DbRealloc(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(v)).FaOp, uint64(nNew)*uint64(unsafe.Sizeof(Op{}))) if pNew != 0 { (*Parse)(unsafe.Pointer(p)).FszOpAlloc = Xsqlite3DbMallocSize(tls, (*Parse)(unsafe.Pointer(p)).Fdb, pNew) (*Vdbe)(unsafe.Pointer(v)).FnOpAlloc = int32(uint64((*Parse)(unsafe.Pointer(p)).FszOpAlloc) / uint64(unsafe.Sizeof(Op{}))) (*Vdbe)(unsafe.Pointer(v)).FaOp = pNew } return func() int32 { if pNew != 0 { return SQLITE_OK } return SQLITE_NOMEM }() } // Add a new instruction to the list of instructions current in the // VDBE. Return the address of the new instruction. // // Parameters: // // p Pointer to the VDBE // // op The opcode for this instruction // // p1, p2, p3 Operands // // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80030:28: */ if growOpArray(tls, p, 1) != 0 { return 1 } return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80036:20: */ var i int32 var pOp uintptr i = (*Vdbe)(unsafe.Pointer(p)).FnOp if (*Vdbe)(unsafe.Pointer(p)).FnOpAlloc <= i { return growOp3(tls, p, op, p1, p2, p3) } (*Vdbe)(unsafe.Pointer(p)).FnOp++ pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i)*24 (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(op) (*VdbeOp)(unsafe.Pointer(pOp)).Fp5 = U16(0) (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = p1 (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = p2 (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = p3 *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(P4_NOTUSED) return i } func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80075:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80078:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80081:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80087:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80094:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } // Generate code that initializes multiple registers to string or integer // constants. The registers begin with iDest and increase consecutively. // One register is initialized for each characgter in zTypes[]. For each // "s" character in zTypes[], the register is a string if the argument is // not NULL, or OP_Null if the value is a null pointer. For each "i" character // in zTypes[], the register is initialized to an integer. // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80109:21: */ var ap Va_list _ = ap var i int32 var c int8 var z uintptr ap = va i = 0 __1: if !(int32(libc.AssignInt8(&c, *(*int8)(unsafe.Pointer(zTypes + uintptr(i))))) != 0) { goto __3 } if !(int32(c) == 's') { goto __4 } z = libc.VaUintptr(&ap) Xsqlite3VdbeAddOp4(tls, p, func() int32 { if z == uintptr(0) { return OP_Null } return OP_String8 }(), 0, iDest+i, 0, z, 0) goto __5 __4: if !(int32(c) == 'i') { goto __6 } Xsqlite3VdbeAddOp2(tls, p, OP_Integer, int32(libc.VaInt32(&ap)), iDest+i) goto __7 __6: goto skip_op_resultrow __7: ; __5: ; goto __2 __2: i++ goto __1 goto __3 __3: ; Xsqlite3VdbeAddOp2(tls, p, OP_ResultRow, iDest, i) skip_op_resultrow: _ = ap } // Add an opcode that includes the p4 value as a pointer. func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80132:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr } // Add an OP_Function or OP_PureFunc opcode. // // The eCallCtx argument is information (typically taken from Expr.op2) // that describes the calling context of the function. 0 means a general // function call. NC_IsCheck means called by a check constraint, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80156:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 var pCtx uintptr nByte = int32(uint64(unsafe.Sizeof(Sqlite3_context{})) + uint64(nArg-1)*uint64(unsafe.Sizeof(uintptr(0)))) pCtx = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nByte)) if pCtx == uintptr(0) { freeEphemeralFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pFunc) return 0 } (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc = pFunc (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 0 (*Sqlite3_context)(unsafe.Pointer(pCtx)).Fargc = U8(nArg) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp = Xsqlite3VdbeCurrentAddr(tls, v) addr = Xsqlite3VdbeAddOp4(tls, v, func() int32 { if eCallCtx != 0 { return OP_PureFunc } return OP_Function }(), p1, p2, p3, pCtx, -16) Xsqlite3VdbeChangeP5(tls, v, uint16(eCallCtx&NC_SelfRef)) return addr } // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80193:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint64(8)) } return Xsqlite3VdbeAddOp4(tls, p, op, p1, p2, p3, p4copy, p4type) } // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80212:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 } pOp = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain) return (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 } // Set a debugger breakpoint on the following routine in order to // monitor the EXPLAIN QUERY PLAN code generation. // Add a new OP_Explain opcode. // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80236:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var zMsg uintptr var v uintptr var ap Va_list _ = ap var iThis int32 ap = va zMsg = Xsqlite3VMPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zFmt, ap) _ = ap v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe iThis = (*Vdbe)(unsafe.Pointer(v)).FnOp Xsqlite3VdbeAddOp4(tls, v, OP_Explain, iThis, (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7) if bPush != 0 { (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = iThis } } } // Pop the EXPLAIN QUERY PLAN stack one level. func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80264:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } // Add an OP_ParseSchema opcode. This routine is broken out from // sqlite3VdbeAddOp4() since it needs to also needs to mark all btrees // as having been used. // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80278:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) for j = 0; j < (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnDb; j++ { Xsqlite3VdbeUsesBtree(tls, p, j) } Xsqlite3MayAbort(tls, (*Vdbe)(unsafe.Pointer(p)).FpParse) } // Add an opcode that includes the p4 value as an integer. func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80289:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(-3) *(*int32)(unsafe.Pointer(pOp + 16)) = p4 } return addr } // Insert the end of a co-routine func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80308:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each // co-routine has its own independent set of registers, because co-routines // might expect their registers to be preserved across an OP_Yield, and // that could cause problems if two or more co-routines are using the same // temporary register. (*Parse)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FpParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FpParse)).FnRangeReg = 0 } // Create a new symbolic label for an instruction that has yet to be // coded. The symbolic label is really just a negative number. The // label can be used as the P2 value of an operation. Later, when // the label is resolved to a specific address, the VDBE will scan // through its operation list and change all values of P2 which match // the label into the resolved address. // // The VDBE knows that a P2 value is a label because labels are // always negative and P2 values are suppose to be non-negative. // Hence, a negative P2 value is a label that has yet to be resolved. // (Later:) This is only true for opcodes that have the OPFLG_JUMP // property. // // Variable usage notes: // // Parse.aLabel[x] Stores the address that the x-th label resolves // into. For testing (SQLITE_DEBUG), unresolved // labels stores -1, but that is not required. // Parse.nLabelAlloc Number of slots allocated to Parse.aLabel[] // Parse.nLabel The *negative* of the number of labels that have // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80346:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80355:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(nNewSize)*uint64(unsafe.Sizeof(int32(0)))) if (*Parse)(unsafe.Pointer(p)).FaLabel == uintptr(0) { (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = 0 } else { (*Parse)(unsafe.Pointer(p)).FnLabelAlloc = nNewSize *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80370:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x if (*Parse)(unsafe.Pointer(p)).FnLabelAlloc+(*Parse)(unsafe.Pointer(p)).FnLabel < 0 { resizeResolveLabel(tls, p, v, j) } else { // Labels may only be resolved once *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(p)).FaLabel + uintptr(j)*4)) = (*Vdbe)(unsafe.Pointer(v)).FnOp } } // Mark the VDBE as one that can only be run one time. func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80392:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80399:21: */ libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 5, 0x20) } // This routine is called after all opcodes have been inserted. It loops // through all the opcodes and fixes up some details. // // (1) For each jump instruction with a negative P2 value (a label) // resolve the P2 value to an actual address. // // (2) Compute the maximum number of arguments used by any SQL function // and store that value in *pMaxFuncArgs. // // (3) Update the Vdbe.readOnly and Vdbe.bIsReader flags to accurately // indicate what the prepared statement actually does. // // (4) Initialize the p4.xAdvance pointer on opcodes that use it. // // (5) Reclaim the memory allocated for storing labels. // // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80595:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse var aLabel uintptr = (*Parse)(unsafe.Pointer(pParse)).FaLabel libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 7, 0x80) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 8, 0x100) pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 for 1 != 0 { // Only JUMP opcodes and the short list of special opcodes in the switch // below need to be considered. The mkopcodeh.tcl generator script groups // all these opcodes together near the front of the opcode list. Skip // any opcode that does not need processing by virtual of the fact that // it is larger than SQLITE_MX_JUMP_OPCODE, as a performance optimization. if int32((*Op)(unsafe.Pointer(pOp)).Fopcode) <= SQLITE_MX_JUMP_OPCODE { // NOTE: Be sure to update mkopcodeh.tcl when adding or removing // cases from this switch! switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Transaction: { if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 7, 0x80) } } fallthrough case OP_AutoCommit: fallthrough case OP_Savepoint: { libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 8, 0x100) break } fallthrough case OP_Checkpoint: fallthrough case OP_Vacuum: fallthrough case OP_JournalMode: { libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 7, 0x80) libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 8, 0x100) break } fallthrough case OP_Next: fallthrough case OP_SorterNext: { *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{Xsqlite3BtreeNext})) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-5) // The code generator never codes any of these opcodes as a jump // to a label. They are always coded as a jump backwards to a // known address break } fallthrough case OP_Prev: { *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 }{Xsqlite3BtreePrevious})) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-5) // The code generator never codes any of these opcodes as a jump // to a label. They are always coded as a jump backwards to a // known address break } fallthrough case OP_VUpdate: { if (*Op)(unsafe.Pointer(pOp)).Fp2 > nMaxArgs { nMaxArgs = (*Op)(unsafe.Pointer(pOp)).Fp2 } break } fallthrough case OP_VFilter: { var n int32 n = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if n > nMaxArgs { nMaxArgs = n } } fallthrough default: { if (*Op)(unsafe.Pointer(pOp)).Fp2 < 0 { // The mkopcodeh.tcl script has so arranged things that the only // non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to // have non-negative values for P2. (*Op)(unsafe.Pointer(pOp)).Fp2 = *(*int32)(unsafe.Pointer(aLabel + uintptr(^(*Op)(unsafe.Pointer(pOp)).Fp2)*4)) } break } } // The mkopcodeh.tcl script has so arranged things that the only // non-jump opcodes less than SQLITE_MX_JUMP_CODE are guaranteed to // have non-negative values for P2. } if pOp == (*Vdbe)(unsafe.Pointer(p)).FaOp { break } pOp -= 24 } Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(pParse)).FaLabel) (*Parse)(unsafe.Pointer(pParse)).FaLabel = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FnLabel = 0 *(*int32)(unsafe.Pointer(pMaxFuncArgs)) = nMaxArgs } // Return the address of the next instruction to be inserted. func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80697:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } // Verify that at least N opcode slots are available in p without // having to malloc for more space (except when compiled using // SQLITE_TEST_REALLOC_STRESS). This interface is used during testing // to verify that certain calls to sqlite3VdbeAddOpList() can never // fail due to a OOM fault and hence that the return value from // sqlite3VdbeAddOpList() will always be non-NULL. // Verify that the VM passed as the only argument does not contain // an OP_ResultRow opcode. Fail an assert() if it does. This is used // by code in pragma.c to ensure that the implementation of certain // pragmas comports with the flags specified in the mkpragmatab.tcl // script. // Generate code (a single OP_Abortable opcode) that will // verify that the VDBE program can safely call Abort in the current // context. // This function returns a pointer to the array of opcodes associated with // the Vdbe passed as the first argument. It is the callers responsibility // to arrange for the returned array to be eventually freed using the // vdbeFreeOpArray() function. // // Before returning, *pnOp is set to the number of entries in the returned // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80754:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM resolveP2Values(tls, p, pnMaxArg) *(*int32)(unsafe.Pointer(pnOp)) = (*Vdbe)(unsafe.Pointer(p)).FnOp (*Vdbe)(unsafe.Pointer(p)).FaOp = uintptr(0) return aOp } // Add a whole list of operations to the operation stack. Return a // pointer to the first operation inserted. // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80774:23: */ var i int32 var pOut uintptr var pFirst uintptr if (*Vdbe)(unsafe.Pointer(p)).FnOp+nOp > (*Vdbe)(unsafe.Pointer(p)).FnOpAlloc && growOpArray(tls, p, nOp) != 0 { return uintptr(0) } pFirst = libc.AssignUintptr(&pOut, (*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp)*24) i = 0 __1: if !(i < nOp) { goto __3 } { (*VdbeOp)(unsafe.Pointer(pOut)).Fopcode = (*VdbeOpList)(unsafe.Pointer(aOp)).Fopcode (*VdbeOp)(unsafe.Pointer(pOut)).Fp1 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp1) (*VdbeOp)(unsafe.Pointer(pOut)).Fp2 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp2) if int32(Xsqlite3OpcodeProperty[(*VdbeOpList)(unsafe.Pointer(aOp)).Fopcode])&OPFLG_JUMP != 0 && int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp2) > 0 { *(*int32)(unsafe.Pointer(pOut + 8)) += (*Vdbe)(unsafe.Pointer(p)).FnOp } (*VdbeOp)(unsafe.Pointer(pOut)).Fp3 = int32((*VdbeOpList)(unsafe.Pointer(aOp)).Fp3) (*VdbeOp)(unsafe.Pointer(pOut)).Fp4type = int8(P4_NOTUSED) *(*uintptr)(unsafe.Pointer(pOut + 16)) = uintptr(0) (*VdbeOp)(unsafe.Pointer(pOut)).Fp5 = U16(0) _ = iLineno } goto __2 __2: i++ aOp += 4 pOut += 24 goto __1 goto __3 __3: ; *(*int32)(unsafe.Pointer(p + 152)) += nOp return pFirst } // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80850:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80853:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80856:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80859:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80862:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fp5 = p5 } } // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80871:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } // Change the P2 operand of the jump instruction at addr so that // the jump lands on the next opcode. Or if the jump instruction was // the previous opcode (and is thus a no-op) then simply back up // the next instruction counter by one slot so that the jump is // overwritten by the next inserted opcode. // // This routine is an optimization of sqlite3VdbeJumpHere() that // strives to omit useless byte-code like this: // // 7 Once 0 8 0 // 8 ... func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80888:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- } else { Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } } // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80908:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80917:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80921:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80925:13: */ switch p4type { case -16: { freeP4FuncCtx(tls, db, p4) break } case -13: fallthrough case -14: fallthrough case -7: fallthrough case -17: fallthrough case -15: { Xsqlite3DbFree(tls, db, p4) break } case -9: { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { Xsqlite3KeyInfoUnref(tls, p4) } break } case -8: { freeEphemeralFunction(tls, db, p4) break } case -11: { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { Xsqlite3ValueFree(tls, p4) } else { freeP4Mem(tls, db, p4) } break } case -12: { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { Xsqlite3VtabUnlock(tls, p4) } break } } } // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80974:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*24; pOp >= aOp; pOp -= 24 { if int32((*Op)(unsafe.Pointer(pOp)).Fp4type) <= -7 { freeP4(tls, db, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) } } Xsqlite3DbFreeNN(tls, db, aOp) } } // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:80992:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81000:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81007:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 } pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(P4_NOTUSED) *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Noop) return 1 } // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81023:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { return 0 } return int32(0) } // Change the value of the P4 operand for a specific instruction. // This routine is useful when a large program is loaded from a // static array using sqlite3VdbeAddOpList but we want to make a // few minor changes to the program. // // If n>=0 then the P4 operand is dynamic, meaning that a copy of // the string is made into memory obtained from sqlite3_malloc(). // A value of n==0 means copy bytes of zP4 up to and including the // first null byte. If n>0 then copy n+1 bytes of zP4. // // Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points // to a string or structure that is guaranteed to exist for the lifetime of // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81083:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) *(*uintptr)(unsafe.Pointer(pOp + 16)) = uintptr(0) } if n < 0 { Xsqlite3VdbeChangeP4(tls, p, int32((int64(pOp)-int64((*Vdbe)(unsafe.Pointer(p)).FaOp))/24), zP4, n) } else { if n == 0 { n = Xsqlite3Strlen30(tls, zP4) } *(*uintptr)(unsafe.Pointer(pOp + 16)) = Xsqlite3DbStrNDup(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, zP4, uint64(n)) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) } } func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81102:21: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zP4 var pOp uintptr var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if n != -12 { freeP4(tls, db, n, *(*uintptr)(unsafe.Pointer(bp))) } return } if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 } pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 if n >= 0 || (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { vdbeChangeP4Full(tls, p, pOp, *(*uintptr)(unsafe.Pointer(bp /* zP4 */)), n) return } if n == -3 { // Note: this cast is safe, because the origin data point was an int // that was cast to a (const char *). *(*int32)(unsafe.Pointer(pOp + 16)) = int32(*(*uintptr)(unsafe.Pointer(bp))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-3) } else if *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0) { *(*uintptr)(unsafe.Pointer(pOp + 16)) = *(*uintptr)(unsafe.Pointer(bp /* zP4 */)) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(n) if n == -12 { Xsqlite3VtabLock(tls, *(*uintptr)(unsafe.Pointer(bp /* zP4 */))) } } } // Change the P4 operand of the most recently coded instruction // to the value defined by the arguments. This is a high-speed // version of sqlite3VdbeChangeP4(). // // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81145:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, n, pP4) } else { pOp = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*24 (*VdbeOp)(unsafe.Pointer(pOp)).Fp4type = int8(n) *(*uintptr)(unsafe.Pointer(pOp + 16)) = pP4 } } // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81165:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr pKeyInfo = Xsqlite3KeyInfoOfIndex(tls, pParse, pIdx) if pKeyInfo != 0 { Xsqlite3VdbeAppendP4(tls, v, pKeyInfo, -9) } } // Return the opcode for a given address. If the address is -1, then // return the most recently inserted opcode. // // If a memory allocation error has occurred prior to the calling of this // routine, then a pointer to a dummy VdbeOp will be returned. That opcode // is readable but not writable, though it is cast to a writable value. // The return of a dummy opcode allows the call to continue functioning // after an OOM fault without having to check to see if the return from // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81231:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 } if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return uintptr(unsafe.Pointer(&dummy)) } else { return (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*24 } return uintptr(0) } var dummy VdbeOp /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81234:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81435:21: */ bp := tls.Alloc(176) defer tls.Free(176) var zP4 uintptr = uintptr(0) // var x StrAccum at bp+144, 32 Xsqlite3StrAccumInit(tls, bp+144, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) switch int32((*Op)(unsafe.Pointer(pOp)).Fp4type) { case -9: { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3_str_appendf(tls, bp+144, ts+6242, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(j)*8)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { zColl = ts + 1524 /* "" */ } if libc.Xstrcmp(tls, zColl, ts+1069) == 0 { zColl = ts + 6247 /* "B" */ } Xsqlite3_str_appendf(tls, bp+144, ts+6249, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { return ts + 6235 /* "-" */ } return ts + 1524 /* "" */ }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { return ts + 6257 /* "N." */ } return ts + 1524 /* "" */ }(), zColl)) } Xsqlite3_str_append(tls, bp+144, ts+6260, 1) break } case -2: { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3_str_appendf(tls, bp+144, ts+6262, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break } case -8: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3_str_appendf(tls, bp+144, ts+6271, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -16: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc Xsqlite3_str_appendf(tls, bp+144, ts+6271, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -14: { Xsqlite3_str_appendf(tls, bp+144, ts+1304, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { Xsqlite3_str_appendf(tls, bp+144, ts+6278, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -13: { Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -11: { var pMem uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { Xsqlite3_str_appendf(tls, bp+144, ts+1304, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { Xsqlite3_str_appendf(tls, bp+144, ts+1298, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { zP4 = ts + 1525 /* "NULL" */ } else { zP4 = ts + 6281 /* "(blob)" */ } break } case -12: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab Xsqlite3_str_appendf(tls, bp+144, ts+6288, libc.VaList(bp+120, pVtab)) break } case -15: { var i U32 var ai uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) var n U32 = *(*U32)(unsafe.Pointer(ai)) // The first element of an INTARRAY is always the // count of the number of elements to follow for i = U32(1); i <= n; i++ { Xsqlite3_str_appendf(tls, bp+144, ts+6296, libc.VaList(bp+128, func() int32 { if i == U32(1) { return '[' } return ',' }(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4)))) } Xsqlite3_str_append(tls, bp+144, ts+6301, 1) break } case -4: { zP4 = ts + 6303 /* "program" */ break } case -17: fallthrough case -5: { break } case -6: { zP4 = (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FzName break } default: { zP4 = *(*uintptr)(unsafe.Pointer(pOp + 16)) } } if zP4 != 0 { Xsqlite3_str_appendall(tls, bp+144, zP4) } if int32((*StrAccum)(unsafe.Pointer(bp+144)).FaccError)&SQLITE_NOMEM != 0 { Xsqlite3OomFault(tls, db) } return Xsqlite3StrAccumFinish(tls, bp+144) } var encnames = [4]uintptr{ts + 6311, ts + 6313, ts + 6315, ts + 6320} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81465:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // // The prepared statements need to know in advance the complete set of // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81560:21: */ *(*YDbMask)(unsafe.Pointer(p + 212)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*32)).FpBt) != 0 { *(*YDbMask)(unsafe.Pointer(p + 216)) |= YDbMask(YDbMask(1)) << i } } // If SQLite is compiled to support shared-cache mode and to be threadsafe, // this routine obtains the mutex associated with each BtShared structure // that may be accessed by the VM passed as an argument. In doing so it also // sets the BtShared.db member of each of the BtShared structures, ensuring // that the correct busy-handler callback is invoked if required. // // If SQLite is not threadsafe but does support shared-cache mode, then // sqlite3BtreeEnter() is invoked to set the BtShared.db variables // of all of BtShared structures accessible via the database handle // associated with the VM. // // If SQLite is not threadsafe and does not support shared-cache mode, this // function is a no-op. // // The p->btreeMask field is a bitmask of all btrees that the prepared // statement p will ever use. Let N be the number of bits in p->btreeMask // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81591:21: */ var i int32 var db uintptr var aDb uintptr var nDb int32 if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case db = (*Vdbe)(unsafe.Pointer(p)).Fdb aDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb for i = 0; i < nDb; i++ { if i != 1 && (*Vdbe)(unsafe.Pointer(p)).FlockMask&(YDbMask(YDbMask(1))<<i) != YDbMask(0) && (*Db)(unsafe.Pointer(aDb+uintptr(i)*32)).FpBt != uintptr(0) { Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(aDb+uintptr(i)*32)).FpBt) } } } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). func vdbeLeave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81612:29: */ var i int32 var db uintptr var aDb uintptr var nDb int32 db = (*Vdbe)(unsafe.Pointer(p)).Fdb aDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb for i = 0; i < nDb; i++ { if i != 1 && (*Vdbe)(unsafe.Pointer(p)).FlockMask&(YDbMask(YDbMask(1))<<i) != YDbMask(0) && (*Db)(unsafe.Pointer(aDb+uintptr(i)*32)).FpBt != uintptr(0) { Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(aDb+uintptr(i)*32)).FpBt) } } } func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81626:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case vdbeLeave(tls, p) } // Initialize an array of N Mem element. func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81668:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 p += 56 } } // Release an array of N Mem elements func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81683:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*56 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { for __ccgo := true; __ccgo; __ccgo = libc.PreIncUintptr(&p, 56) < pEnd { if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } } return } for __ccgo1 := true; __ccgo1; __ccgo1 = libc.PreIncUintptr(&p, 56) < pEnd { // This block is really an inlined version of sqlite3VdbeMemRelease() // that takes advantage of the fact that the memory cell value is // being set to NULL after releasing any dynamic resources. // // The justification for duplicating code is that according to // callgrind, this causes a certain test case to hit the CPU 4.7 // percent less (x86 linux, gcc version 4.1.2, -O6) than if // sqlite3MemRelease() were called from here. With -O2, this jumps // to 6.6 percent. The test case is inserting 1000 rows into a table // with no indexes using a single prepared INSERT statement, bind() // and reset(). Inserts are grouped into a transaction. if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { Xsqlite3VdbeMemRelease(tls, p) } else if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFreeNN(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) (*Mem)(unsafe.Pointer(p)).FszMalloc = 0 } (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Undefined) } } } // This is a destructor on a Mem object (which is really an sqlite3_value) // that deletes the Frame object that is attached to it as a blob. // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81745:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame = pFrame } // Locate the next opcode to be displayed in EXPLAIN or EXPLAIN // QUERY PLAN output. // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81760:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes var i int32 // Next instruction address var rc int32 = SQLITE_OK // Result code var aOp uintptr = uintptr(0) // Opcode array var iPc int32 // Rowid. Copy of value in *piPc // When the number of output rows reaches nRow, that means the // listing has finished and sqlite3_step() should return SQLITE_DONE. // nRow is the sum of the number of rows in the main program, plus // the sum of the number of rows in all trigger subprograms encountered // so far. The nRow value will increase as new trigger subprograms are // encountered, but p->pc will eventually catch up to nRow. nRow = (*Vdbe)(unsafe.Pointer(p)).FnOp if pSub != uintptr(0) { if int32((*Mem)(unsafe.Pointer(pSub)).Fflags)&MEM_Blob != 0 { // pSub is initiallly NULL. It is initialized to a BLOB by // the P4_SUBPROGRAM processing logic below nSub = int32(uint64((*Mem)(unsafe.Pointer(pSub)).Fn) / uint64(unsafe.Sizeof(uintptr(0)))) apSub = (*Mem)(unsafe.Pointer(pSub)).Fz } for i = 0; i < nSub; i++ { nRow = nRow + (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(i)*8)))).FnOp } } iPc = *(*int32)(unsafe.Pointer(piPc)) for 1 != 0 { // Loop exits via break i = libc.PostIncInt32(&iPc, 1) if i >= nRow { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK rc = SQLITE_DONE break } if i < (*Vdbe)(unsafe.Pointer(p)).FnOp { // The rowid is small enough that we are still in the // main program. aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp } else { // We are currently listing subprograms. Figure out which one and // pick up the appropriate opcode. var j int32 i = i - (*Vdbe)(unsafe.Pointer(p)).FnOp for j = 0; i >= (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FnOp; j++ { i = i - (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FnOp } aOp = (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)))).FaOp } // When an OP_Program opcode is encounter (the only opcode that has // a P4_SUBPROGRAM argument), expand the size of the array of subprograms // kept in p->aMem[9].z to hold the new program - assuming this subprogram // has not already been seen. if pSub != uintptr(0) && int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fp4type) == -4 { var nByte int32 = int32(uint64(nSub+1) * uint64(unsafe.Sizeof(uintptr(0)))) var j int32 for j = 0; j < nSub; j++ { if *(*uintptr)(unsafe.Pointer(apSub + uintptr(j)*8)) == *(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)) { break } } if j == nSub { (*Vdbe)(unsafe.Pointer(p)).Frc = Xsqlite3VdbeMemGrow(tls, pSub, nByte, libc.Bool32(nSub != 0)) if (*Vdbe)(unsafe.Pointer(p)).Frc != SQLITE_OK { rc = SQLITE_ERROR break } apSub = (*Mem)(unsafe.Pointer(pSub)).Fz *(*uintptr)(unsafe.Pointer(apSub + uintptr(libc.PostIncInt32(&nSub, 1))*8)) = *(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)) (*Mem)(unsafe.Pointer(pSub)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pSub)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) (*Mem)(unsafe.Pointer(pSub)).Fn = int32(uint64(nSub) * uint64(unsafe.Sizeof(uintptr(0)))) nRow = nRow + (*SubProgram)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aOp + uintptr(i)*24 + 16)))).FnOp } } if eMode == 0 { break } { if int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fopcode) == OP_Explain { break } if int32((*Op)(unsafe.Pointer(aOp+uintptr(i)*24)).Fopcode) == OP_Init && iPc > 1 { break } } } *(*int32)(unsafe.Pointer(piPc)) = iPc *(*int32)(unsafe.Pointer(piAddr)) = i *(*uintptr)(unsafe.Pointer(paOp)) = aOp return rc } // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81872:21: */ var i int32 var aMem uintptr = p + 120 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*56 for i = 0; i < (*VdbeFrame)(unsafe.Pointer(p)).FnChildCsr; i++ { Xsqlite3VdbeFreeCursor(tls, (*VdbeFrame)(unsafe.Pointer(p)).Fv, *(*uintptr)(unsafe.Pointer(apCsr + uintptr(i)*8))) } releaseMemArray(tls, aMem, (*VdbeFrame)(unsafe.Pointer(p)).FnChildMem) Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p+72, -1, 0) Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(p)).Fv)).Fdb, p) } // Give a listing of the program in the virtual machine. // // The interface is the same as sqlite3VdbeExec(). But instead of // running the code, it invokes the callback once for each instruction. // This feature is used to implement "EXPLAIN". // // When p->explain==1, each instruction is listed. When // p->explain==2, only OP_Explain instructions are listed and these // are shown in a different format. p->explain==2 is used to implement // EXPLAIN QUERY PLAN. // 2018-04-24: In p->explain==2 mode, the OP_Init opcodes of triggers // are also shown, so that the boundaries between the main program and // each trigger are clear. // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:81904:20: */ bp := tls.Alloc(16) defer tls.Free(16) var pSub uintptr = uintptr(0) // Memory cell hold array of subprogs var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb // The database connection // var i int32 at bp, 4 // Loop counter var rc int32 = SQLITE_OK // Return code var pMem uintptr = (*Vdbe)(unsafe.Pointer(p)).FaMem + 1*56 // First Mem of result set var bListSubprogs int32 = libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 1 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TriggerEQP) != uint64(0)) // var aOp uintptr at bp+8, 8 // Array of opcodes var pOp uintptr // Current opcode // Even though this opcode does not use dynamic strings for // the result, result columns may become dynamic if the user calls // sqlite3_column_text16(), causing a translation to UTF-16 encoding. releaseMemArray(tls, pMem, 8) (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM { // This happens if a malloc() inside a call to sqlite3_column_text() or // sqlite3_column_text16() failed. Xsqlite3OomFault(tls, db) return SQLITE_ERROR } if bListSubprogs != 0 { // The first 8 memory cells are used for the result set. So we will // commandeer the 9th cell to use as storage for an array of pointers // to trigger subprograms. The VDBE is guaranteed to have at least 9 // cells. pSub = (*Vdbe)(unsafe.Pointer(p)).FaMem + 9*56 } else { pSub = uintptr(0) } // Figure out which opcode is next to display rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 2), p+52, bp, bp+8) if rc == SQLITE_OK { pOp = *(*uintptr)(unsafe.Pointer(bp + 8)) + uintptr(*(*int32)(unsafe.Pointer(bp)))*24 if libc.AtomicLoadNInt32(db+432, 0) != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_INTERRUPT rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, Xsqlite3ErrStr(tls, (*Vdbe)(unsafe.Pointer(p)).Frc), 0) } else { var zP4 uintptr = Xsqlite3VdbeDisplayP4(tls, db, pOp) if int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2) == 2 { Xsqlite3VdbeMemSetInt64(tls, pMem, int64((*Op)(unsafe.Pointer(pOp)).Fp1)) Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(1)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp2)) Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(2)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp3)) Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(3)*56, zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(4) } else { Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(0)*56, int64(*(*int32)(unsafe.Pointer(bp /* i */)))) Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(1)*56, Xsqlite3OpcodeName(tls, int32((*Op)(unsafe.Pointer(pOp)).Fopcode)), int64(-1), uint8(SQLITE_UTF8), uintptr(0)) Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(2)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp1)) Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(3)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp2)) Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(4)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp3)) // pMem+5 for p4 is done last Xsqlite3VdbeMemSetInt64(tls, pMem+uintptr(6)*56, int64((*Op)(unsafe.Pointer(pOp)).Fp5)) Xsqlite3VdbeMemSetNull(tls, pMem+uintptr(7)*56) Xsqlite3VdbeMemSetStr(tls, pMem+uintptr(5)*56, zP4, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(8) } (*Vdbe)(unsafe.Pointer(p)).FpResultSet = pMem if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM rc = SQLITE_ERROR } else { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK rc = SQLITE_ROW } } } return rc } // An instance of this object describes bulk memory available for use // by subcomponents of a prepared statement. Space is allocated out // of a ReusableSpace object by the allocSpace() routine below. type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82049:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated // memory on success. If insufficient memory is available in the // ReusableSpace object, increase the ReusableSpace.nNeeded // value by the amount needed and return NULL. // // If pBuf is not initially NULL, that means that the memory has already // been allocated by a prior call to this routine, so just return a copy // of pBuf and leave ReusableSpace unchanged. // // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82069:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) if nByte <= (*ReusableSpace)(unsafe.Pointer(p)).FnFree { *(*Sqlite3_int64)(unsafe.Pointer(p + 8)) -= nByte pBuf = (*ReusableSpace)(unsafe.Pointer(p)).FpSpace + uintptr((*ReusableSpace)(unsafe.Pointer(p)).FnFree) } else { *(*Sqlite3_int64)(unsafe.Pointer(p + 16)) += nByte } } return pBuf } // Rewind the VDBE back to the beginning in preparation for // running it. func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82092:21: */ // There should be at least one opcode. // Set the magic to VDBE_MAGIC_RUN sooner rather than later. (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_RUN) (*Vdbe)(unsafe.Pointer(p)).Fpc = -1 (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) (*Vdbe)(unsafe.Pointer(p)).FcacheCtr = U32(1) (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = U8(255) (*Vdbe)(unsafe.Pointer(p)).FiStatement = 0 (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint = int64(0) } // Prepare a virtual machine for execution for the first time after // creating the virtual machine. This involves things such // as allocating registers and initializing the program counter. // After the VDBE has be prepped, it can be executed by one or more // calls to sqlite3VdbeExec(). // // This function may be called exactly once on each virtual machine. // After this routine is called the VM has been "packaged" and is ready // to run. After this routine is called, further calls to // sqlite3VdbeAddOp() functions are prohibited. This routine disconnects // the Vdbe from the Parse object that helped generate it so that the // the Vdbe becomes an independent entity and the Parse object can be // destroyed. // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82145:21: */ bp := tls.Alloc(32) defer tls.Free(32) var db uintptr // The database connection var nVar int32 // Number of parameters var nMem int32 // Number of VM memory registers var nCursor int32 // Number of cursors required // var nArg int32 at bp, 4 // Number of arguments in subprograms var n int32 // Loop counter // var x ReusableSpace at bp+8, 24 // Reusable bulk memory (*Vdbe)(unsafe.Pointer(p)).FpVList = (*Parse)(unsafe.Pointer(pParse)).FpVList (*Parse)(unsafe.Pointer(pParse)).FpVList = uintptr(0) db = (*Vdbe)(unsafe.Pointer(p)).Fdb nVar = int32((*Parse)(unsafe.Pointer(pParse)).FnVar) nMem = (*Parse)(unsafe.Pointer(pParse)).FnMem nCursor = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(bp /* nArg */)) = (*Parse)(unsafe.Pointer(pParse)).FnMaxArg // Each cursor uses a memory cell. The first cursor (cursor 0) can // use aMem[0] which is not otherwise used by the VDBE program. Allocate // space at the end of aMem[] for cursors 1 and greater. // See also: allocateCursor(). nMem = nMem + nCursor if nCursor == 0 && nMem > 0 { nMem++ } // Space for aMem[0] even if not used // Figure out how much reusable memory is available at the end of the // opcode array. This extra memory will be reallocated for other elements // of the prepared statement. n = int32((uint64(unsafe.Sizeof(Op{}))*uint64((*Vdbe)(unsafe.Pointer(p)).FnOp) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) // Bytes of opcode memory used (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FpSpace = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(n) // Unused opcode memory (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnFree = Sqlite3_int64(((*Parse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & libc.CplInt32(7)) // Bytes of unused memory resolveP2Values(tls, p, bp) libc.SetBitFieldPtr16Uint32(p+208, Bft(U8(libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite != 0 && (*Parse)(unsafe.Pointer(pParse)).FmayAbort != 0))), 6, 0x40) if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 { var iFirst int32 var mx int32 var i int32 if nMem < 10 { nMem = 10 } libc.SetBitFieldPtr16Uint32(p+208, Bft((*Parse)(unsafe.Pointer(pParse)).Fexplain), 2, 0xc) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { Xsqlite3VdbeSetNumCols(tls, p, 4) iFirst = 8 mx = 12 } else { Xsqlite3VdbeSetNumCols(tls, p, 8) iFirst = 0 mx = 8 } for i = iFirst; i < mx; i++ { Xsqlite3VdbeSetColName(tls, p, i-iFirst, COLNAME_NAME, azColName[i], uintptr(0)) } } libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) // Memory for registers, parameters, cursor, etc, is allocated in one or two // passes. On the first pass, we try to reuse unused memory at the // end of the opcode array. If we are unable to satisfy all memory // requirements by reusing the opcode array tail, then the second // pass will fill in the remainder using a fresh memory allocation. // // This two-pass approach that reuses as much memory as possible from // the leftover memory at the end of the opcode array. This can significantly // reduce the amount of memory held by a prepared statement. (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnNeeded = int64(0) (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nMem)*uint64(unsafe.Sizeof(Mem{})))) (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nVar)*uint64(unsafe.Sizeof(Mem{})))) (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+8, uintptr(0), int64(uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(uintptr(0))))) (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+8, uintptr(0), int64(uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0))))) if (*ReusableSpace)(unsafe.Pointer(bp+8)).FnNeeded != 0 { (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FpSpace = libc.AssignPtrUintptr(p+264, Xsqlite3DbMallocRawNN(tls, db, uint64((*ReusableSpace)(unsafe.Pointer(bp+8 /* &x */)).FnNeeded))) (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnFree = (*ReusableSpace)(unsafe.Pointer(bp + 8 /* &x */)).FnNeeded if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FaMem, int64(uint64(nMem)*uint64(unsafe.Sizeof(Mem{})))) (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FaVar, int64(uint64(nVar)*uint64(unsafe.Sizeof(Mem{})))) (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FapArg, int64(uint64(*(*int32)(unsafe.Pointer(bp)))*uint64(unsafe.Sizeof(uintptr(0))))) (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+8, (*Vdbe)(unsafe.Pointer(p)).FapCsr, int64(uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0))))) } } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Vdbe)(unsafe.Pointer(p)).FnVar = int16(0) (*Vdbe)(unsafe.Pointer(p)).FnCursor = 0 (*Vdbe)(unsafe.Pointer(p)).FnMem = 0 } else { (*Vdbe)(unsafe.Pointer(p)).FnCursor = nCursor (*Vdbe)(unsafe.Pointer(p)).FnVar = YnVar(nVar) initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, nVar, db, uint16(MEM_Null)) (*Vdbe)(unsafe.Pointer(p)).FnMem = nMem initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaMem, nMem, db, uint16(MEM_Undefined)) libc.Xmemset(tls, (*Vdbe)(unsafe.Pointer(p)).FapCsr, 0, uint64(nCursor)*uint64(unsafe.Sizeof(uintptr(0)))) } Xsqlite3VdbeRewind(tls, p) } var azColName = [12]uintptr{ ts + 6325, ts + 6330, ts + 6337, ts + 6340, ts + 6343, ts + 6346, ts + 6349, ts + 6352, ts + 6360, ts + 6363, ts + 6370, ts + 6378, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82193:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82270:21: */ if pCx == uintptr(0) { return } switch int32((*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType) { case CURTYPE_SORTER: { Xsqlite3VdbeSorterClose(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, pCx) break } case CURTYPE_BTREE: { Xsqlite3BtreeCloseCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 48))) break } case CURTYPE_VTAB: { var pVCur uintptr = *(*uintptr)(unsafe.Pointer(pCx + 48)) var pModule uintptr = (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FpModule (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur)).FpVtab)).FnRef-- (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxClose})).f(tls, pVCur) break } } } // Close all cursors in the current frame. func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82300:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { var pC uintptr = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(i)*8)) if pC != 0 { Xsqlite3VdbeFreeCursor(tls, p, pC) *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(i)*8)) = uintptr(0) } } } } // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82318:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp (*Vdbe)(unsafe.Pointer(v)).FnOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnOp (*Vdbe)(unsafe.Pointer(v)).FaMem = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaMem (*Vdbe)(unsafe.Pointer(v)).FnMem = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnMem (*Vdbe)(unsafe.Pointer(v)).FapCsr = (*VdbeFrame)(unsafe.Pointer(pFrame)).FapCsr (*Vdbe)(unsafe.Pointer(v)).FnCursor = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnCursor (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).Fdb)).FlastRowid = (*VdbeFrame)(unsafe.Pointer(pFrame)).FlastRowid (*Vdbe)(unsafe.Pointer(v)).FnChange = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnChange (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).Fdb)).FnChange = (*VdbeFrame)(unsafe.Pointer(pFrame)).FnDbChange Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer(v)).Fdb, v+304, -1, 0) (*Vdbe)(unsafe.Pointer(v)).FpAuxData = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpAuxData (*VdbeFrame)(unsafe.Pointer(pFrame)).FpAuxData = uintptr(0) return (*VdbeFrame)(unsafe.Pointer(pFrame)).Fpc } // Close all cursors. // // Also release any dynamic memory held by the VM in the Vdbe.aMem memory // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. func closeAllCursors(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82347:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { } Xsqlite3VdbeFrameRestore(tls, pFrame) (*Vdbe)(unsafe.Pointer(p)).FpFrame = uintptr(0) (*Vdbe)(unsafe.Pointer(p)).FnFrame = 0 } closeCursorsInFrame(tls, p) if (*Vdbe)(unsafe.Pointer(p)).FaMem != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaMem, (*Vdbe)(unsafe.Pointer(p)).FnMem) } for (*Vdbe)(unsafe.Pointer(p)).FpDelFrame != 0 { var pDel uintptr = (*Vdbe)(unsafe.Pointer(p)).FpDelFrame (*Vdbe)(unsafe.Pointer(p)).FpDelFrame = (*VdbeFrame)(unsafe.Pointer(pDel)).FpParent Xsqlite3VdbeFrameDelete(tls, pDel) } // Delete any auxdata allocations made by the VM if (*Vdbe)(unsafe.Pointer(p)).FpAuxData != 0 { Xsqlite3VdbeDeleteAuxData(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, p+304, -1, 0) } } // Set the number of result columns that will be returned by this SQL // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82377:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if (*Vdbe)(unsafe.Pointer(p)).FnResColumn != 0 { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) } n = nResColumn * COLNAME_N (*Vdbe)(unsafe.Pointer(p)).FnResColumn = U16(nResColumn) (*Vdbe)(unsafe.Pointer(p)).FaColName = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Mem{}))*uint64(n)) if (*Vdbe)(unsafe.Pointer(p)).FaColName == uintptr(0) { return } initMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, n, db, uint16(MEM_Null)) } // Set the name of the idx'th column to be returned by the SQL statement. // zName must be a pointer to a nul terminated string. // // This call must be made after a call to sqlite3VdbeSetNumCols(). // // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82402:20: */ var rc int32 var pColName uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return SQLITE_NOMEM } pColName = (*Vdbe)(unsafe.Pointer(p)).FaColName + uintptr(idx+var1*int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn))*56 rc = Xsqlite3VdbeMemSetStr(tls, pColName, zName, int64(-1), uint8(SQLITE_UTF8), xDel) return rc } // A read or write transaction may or may not be active on database handle // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82430:12: */ bp := tls.Alloc(72) defer tls.Free(72) var i int32 var nTrans int32 = 0 // Number of databases with an active write-transaction // that are candidates for a two-phase commit using a // super-journal var rc int32 = SQLITE_OK var needXcommit int32 = 0 // Before doing anything else, call the xSync() callback for any // virtual module tables written in this transaction. This has to // be done before determining whether a super-journal file is // required, as an xSync() callback may add an attached database // to the transaction. rc = Xsqlite3VtabSync(tls, db, p) // This loop determines (a) if the commit hook should be invoked and // (b) how many database files have open write transactions, not // including the temp database. (b) is important because if more than // one database file has an open write transaction, a super-journal // file is required for an atomic commit. for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_WRITE { var pPager uintptr // Pager associated with pBt needXcommit = 1 Xsqlite3BtreeEnter(tls, pBt) pPager = Xsqlite3BtreePager(tls, pBt) if int32((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).Fsafety_level) != PAGER_SYNCHRONOUS_OFF && aMJNeeded[Xsqlite3PagerGetJournalMode(tls, pPager)] != 0 && Xsqlite3PagerIsMemdb(tls, pPager) == 0 { nTrans++ } rc = Xsqlite3PagerExclusiveLock(tls, pPager) Xsqlite3BtreeLeave(tls, pBt) } } if rc != SQLITE_OK { return rc } // If there are any write-transactions at all, invoke the commit hook if needXcommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback != 0 { rc = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCommitCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCommitArg) if rc != 0 { return SQLITE_CONSTRAINT | int32(2)<<8 } } // The simple case - no more than one database file (not counting the // TEMP database) has a transaction active. There is no need for the // super-journal. // // If the return value of sqlite3BtreeGetFilename() is a zero length // string, it means the main database is :memory: or a temp file. In // that case we do not support atomic multi-file commits, so use the // simple case then too. if 0 == Xsqlite3Strlen30(tls, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt)) || nTrans <= 1 { for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { rc = Xsqlite3BtreeCommitPhaseOne(tls, pBt, uintptr(0)) } } // Do the commit only if all databases successfully complete phase 1. // If one of the BtreeCommitPhaseOne() calls fails, this indicates an // IO error while deleting or truncating a journal file. It is unlikely, // but could happen. In this case abandon processing and return the error. for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { rc = Xsqlite3BtreeCommitPhaseTwo(tls, pBt, 0) } } if rc == SQLITE_OK { Xsqlite3VtabCommit(tls, db) } } else { var pVfs uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpVfs var zSuper uintptr = uintptr(0) // File-name for the super-journal var zMainFile uintptr = Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)) = uintptr(0) var offset I64 = int64(0) // var res int32 at bp+60, 4 var retryCount int32 = 0 var nMainFile int32 // Select a super-journal file name nMainFile = Xsqlite3Strlen30(tls, zMainFile) zSuper = Xsqlite3MPrintf(tls, db, ts+6385, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } zSuper += uintptr(4) for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 60)) != 0 { // var iRandom U32 at bp+56, 4 if retryCount != 0 { if retryCount > 100 { Xsqlite3_log(tls, SQLITE_FULL, ts+6397, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { Xsqlite3_log(tls, SQLITE_FULL, ts+6411, libc.VaList(bp+32, zSuper)) } } retryCount++ Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+6426, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) // The antipenultimate character of the super-journal name must // be "9" to avoid name collisions when using 8+3 filenames. rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) } if rc == SQLITE_OK { // Open the super-journal. rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+64, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_SUPER_JOURNAL, uintptr(0)) } if rc != SQLITE_OK { Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) return rc } // Write the name of each database file in the transaction into the new // super-journal file. If an error occurs at this point close // and delete the super-journal file. All the individual journal files // still have 'null' as the super-journal pointer, so they will roll // back independently if a failure occurs. for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_WRITE { var zFile uintptr = Xsqlite3BtreeGetJournalname(tls, pBt) if zFile == uintptr(0) { continue // Ignore TEMP and :memory: databases } rc = Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)), zFile, Xsqlite3Strlen30(tls, zFile)+1, offset) offset = offset + I64(Xsqlite3Strlen30(tls, zFile)+1) if rc != SQLITE_OK { Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) return rc } } } // Sync the super-journal file. If the IOCAP_SEQUENTIAL device // flag is set this is not required. if 0 == Xsqlite3OsDeviceCharacteristics(tls, *(*uintptr)(unsafe.Pointer(bp + 64)))&SQLITE_IOCAP_SEQUENTIAL && SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3OsSync(tls, *(*uintptr)(unsafe.Pointer(bp + 64)), SQLITE_SYNC_NORMAL)) { Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) return rc } // Sync all the db files involved in the transaction. The same call // sets the super-journal pointer in each individual journal. If // an error occurs here, do not delete the super-journal file. // // If the error occurs during the first call to // sqlite3BtreeCommitPhaseOne(), then there is a chance that the // super-journal file will be orphaned. But we cannot delete it, // in case the super-journal file name was written into the journal // file before the failure occurred. for i = 0; rc == SQLITE_OK && i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { rc = Xsqlite3BtreeCommitPhaseOne(tls, pBt, zSuper) } } Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) if rc != SQLITE_OK { Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) return rc } // Delete the super-journal file. This commits the transaction. After // doing this the directory is synced again before any individual // transaction files are deleted. rc = Xsqlite3OsDelete(tls, pVfs, zSuper, 1) Xsqlite3DbFree(tls, db, zSuper-uintptr(4)) zSuper = uintptr(0) if rc != 0 { return rc } // All files and directories have already been synced, so the following // calls to sqlite3BtreeCommitPhaseTwo() are only closing files and // deleting or truncating journals. If something goes wrong while // this is happening we don't really care. The integrity of the // transaction is already guaranteed, but some stray 'cold' journals // may be lying around. Returning an error code won't help matters. Xsqlite3BeginBenignMalloc(tls) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { Xsqlite3BtreeCommitPhaseTwo(tls, pBt, 1) } } Xsqlite3EndBenignMalloc(tls) Xsqlite3VtabCommit(tls, db) } return rc } var aMJNeeded = [6]U8{ /* DELETE */ U8(1), /* PERSIST */ U8(1), /* OFF */ U8(0), /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82465:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are // currently active. An assertion fails if the two counts do not match. // This is an internal self-check only - it is not an essential processing // step. // // This is a no-op if NDEBUG is defined. // If the Vdbe passed as the first argument opened a statement-transaction, // close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or // SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement // transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the // statement transaction is committed. // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82726:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 var iSavepoint int32 = (*Vdbe)(unsafe.Pointer(p)).FiStatement - 1 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var rc2 int32 = SQLITE_OK var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { if eOp == SAVEPOINT_ROLLBACK { rc2 = Xsqlite3BtreeSavepoint(tls, pBt, SAVEPOINT_ROLLBACK, iSavepoint) } if rc2 == SQLITE_OK { rc2 = Xsqlite3BtreeSavepoint(tls, pBt, SAVEPOINT_RELEASE, iSavepoint) } if rc == SQLITE_OK { rc = rc2 } } } (*Sqlite3)(unsafe.Pointer(db)).FnStatement-- (*Vdbe)(unsafe.Pointer(p)).FiStatement = 0 if rc == SQLITE_OK { if eOp == SAVEPOINT_ROLLBACK { rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_ROLLBACK, iSavepoint) } if rc == SQLITE_OK { rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_RELEASE, iSavepoint) } } // If the statement transaction is being rolled back, also restore the // database handles deferred constraint counter to the value it had when // the statement transaction was opened. if eOp == SAVEPOINT_ROLLBACK { (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons } return rc } func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82772:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } return SQLITE_OK } // This function is called when a transaction opened by the database // handle associated with the VM passed as an argument is about to be // committed. If there are outstanding deferred foreign key constraint // violations, return SQLITE_ERROR. Otherwise, SQLITE_OK. // // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82791:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_CONSTRAINT | int32(3)<<8 (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) Xsqlite3VdbeError(tls, p, ts+6439, 0) return SQLITE_ERROR } return SQLITE_OK } // This routine is called the when a VDBE tries to halt. If the VDBE // has made changes and is in autocommit mode, then commit those // changes. If a rollback is needed, then do the rollback. // // This routine is the only way to move the sqlite3eOpenState of a VM from // SQLITE_STATE_RUN to SQLITE_STATE_HALT. It is harmless to // call this on a VM that is in the SQLITE_STATE_HALT state. // // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:82818:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb // This function contains the logic that determines if a statement or // transaction will be committed or rolled back as a result of the // execution of this virtual machine. // // If any of the following errors occur: // // SQLITE_NOMEM // SQLITE_IOERR // SQLITE_FULL // SQLITE_INTERRUPT // // Then the internal cache might have been left in an inconsistent // state. We need to rollback the statement transaction, if there is // one, or the complete transaction if there is no statement transaction. if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) { return SQLITE_OK } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } closeAllCursors(tls, p) // No commit or rollback needed if the program never started or if the // SQL statement does not read or write a database file. if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0 { var mrc int32 // Primary error code from p->rc var eStatementOp int32 = 0 var isSpecialError int32 // Set to true if a 'special' error // Lock all btrees used by the statement Xsqlite3VdbeEnter(tls, p) // Check for one of the special errors if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 { mrc = (*Vdbe)(unsafe.Pointer(p)).Frc & 0xff isSpecialError = libc.Bool32(mrc == SQLITE_NOMEM || mrc == SQLITE_IOERR || mrc == SQLITE_INTERRUPT || mrc == SQLITE_FULL) } else { mrc = libc.AssignInt32(&isSpecialError, 0) } if isSpecialError != 0 { // If the query was read-only and the error code is SQLITE_INTERRUPT, // no rollback is necessary. Otherwise, at least a savepoint // transaction must be rolled back to restore the database to a // consistent state. // // Even if the statement is read-only, it is important to perform // a statement or transaction rollback operation. If the error // occurred while writing to the journal, sub-journal or database // file as part of an effort to free up cache space (see function // pagerStress() in pager.c), the rollback is required to restore // the pager to a consistent state. if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) != 0) || mrc != SQLITE_INTERRUPT { if (mrc == SQLITE_NOMEM || mrc == SQLITE_FULL) && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 { eStatementOp = SAVEPOINT_ROLLBACK } else { // We are forced to roll back the active transaction. Before doing // so, abort any other statements this handle currently has active. Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) Xsqlite3CloseSavepoints(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } } } // Check for immediate foreign key violations. if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail && !(isSpecialError != 0) { Xsqlite3VdbeCheckFk(tls, p, 0) } // If the auto-commit flag is set and this is the only active writer // VM, then we do either a commit or rollback of the current transaction. // // Note: This block also runs if one of the special errors handled // above has occurred. if !((*Sqlite3)(unsafe.Pointer(db)).FnVTrans > 0 && (*Sqlite3)(unsafe.Pointer(db)).FaVTrans == uintptr(0)) && (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite == libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) == 0) { if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail && !(isSpecialError != 0) { rc = Xsqlite3VdbeCheckFk(tls, p, 1) if rc != SQLITE_OK { if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7)) != 0 { Xsqlite3VdbeLeave(tls, p) return SQLITE_ERROR } rc = SQLITE_CONSTRAINT | int32(3)<<8 } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00002))<<32) != 0 { rc = SQLITE_CORRUPT *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(U64(uint64(0x00002)) << 32) } else { // The auto-commit flag is true, the vdbe program was successful // or hit an 'OR FAIL' constraint and there are no deferred foreign // key constraints to hold up the transaction. This means a commit // is required. rc = vdbeCommit(tls, db, p) } if rc == SQLITE_BUSY && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7)) != 0 { Xsqlite3VdbeLeave(tls, p) return SQLITE_BUSY } else if rc != SQLITE_OK { (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3RollbackAll(tls, db, SQLITE_OK) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } else { (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = int64(0) (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = int64(0) *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_DeferFKs)) Xsqlite3CommitInternalChanges(tls, db) } } else { Xsqlite3RollbackAll(tls, db, SQLITE_OK) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } (*Sqlite3)(unsafe.Pointer(db)).FnStatement = 0 } else if eStatementOp == 0 { if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Fail { eStatementOp = SAVEPOINT_RELEASE } else if int32((*Vdbe)(unsafe.Pointer(p)).FerrorAction) == OE_Abort { eStatementOp = SAVEPOINT_ROLLBACK } else { Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) Xsqlite3CloseSavepoints(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } } // If eStatementOp is non-zero, then a statement transaction needs to // be committed or rolled back. Call sqlite3VdbeCloseStatement() to // do so. If this operation returns an error, and the current statement // error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the // current statement error code. if eStatementOp != 0 { rc = Xsqlite3VdbeCloseStatement(tls, p, eStatementOp) if rc != 0 { if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK || (*Vdbe)(unsafe.Pointer(p)).Frc&0xff == SQLITE_CONSTRAINT { (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = uintptr(0) } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) Xsqlite3CloseSavepoints(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } } // If this was an INSERT, UPDATE or DELETE and no statement transaction // has been rolled back, update the database connection change-counter. if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x10>>4)) != 0 { if eStatementOp != SAVEPOINT_ROLLBACK { Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) } else { Xsqlite3VdbeSetChanges(tls, db, int64(0)) } (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) } // Release the locks Xsqlite3VdbeLeave(tls, p) } // We have successfully halted and closed the VM. Record this fact. if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive-- if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) != 0) { (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite-- } if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0 { (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead-- } } (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_HALT) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } // If the auto-commit flag is set to true, then any locks that were held // by connection db have now been released. Call sqlite3ConnectionUnlocked() // to invoke any required unlock-notify callbacks. if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { Xsqlite3ConnectionUnlocked(tls, db) } return func() int32 { if (*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_BUSY { return SQLITE_BUSY } return SQLITE_OK }() } // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83028:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } // Copy the error code and error message belonging to the VDBE passed // as the first argument to its database handle (so that they will be // returned by calls to sqlite3_errcode() and sqlite3_errmsg()). // // This function does not clear the VDBE error code or message, just // copies them to the database handle. func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83040:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { (*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc++ Xsqlite3BeginBenignMalloc(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpErr == uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).FpErr = Xsqlite3ValueNew(tls, db) } Xsqlite3ValueSetStr(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr, -1, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) Xsqlite3EndBenignMalloc(tls) (*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc-- } else if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } (*Sqlite3)(unsafe.Pointer(db)).FerrCode = rc (*Sqlite3)(unsafe.Pointer(db)).FerrByteOffset = -1 return rc } // Clean up a VDBE after execution but do not delete the VDBE just yet. // Write any error messages into *pzErrMsg. Return the result code. // // After this routine is run, the VDBE should be ready to be executed // again. // // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83090:20: */ bp := tls.Alloc(8) defer tls.Free(8) var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb // If the VM did not run to completion or if it encountered an // error, then it might not have been halted properly. So halt // it now. Xsqlite3VdbeHalt(tls, p) // If the VDBE has been run even partially, then transfer the error code // and error message from the VDBE into the main database structure. But // if the VDBE has just been set to run but has not actually executed any // instructions yet, leave the main database error information unchanged. if (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 || (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { Xsqlite3VdbeTransferError(tls, p) } else { (*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*Vdbe)(unsafe.Pointer(p)).Frc } if Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x20>>5)) != 0 { libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) } } else if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0 { // The expired flag was set on the VDBE before the first call // to sqlite3_step(). For consistency (since sqlite3_step() was // called), set the database error in this case as well. Xsqlite3ErrorWithMsg(tls, db, (*Vdbe)(unsafe.Pointer(p)).Frc, func() uintptr { if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { return ts + 4444 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) } // Reset register contents and reclaim error message memory. if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = uintptr(0) } (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) // Save profiling information from this VDBE run. (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_RESET) return (*Vdbe)(unsafe.Pointer(p)).Frc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83187:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) } Xsqlite3VdbeDelete(tls, p) return rc } // If parameter iOp is less than zero, then invoke the destructor for // all auxiliary data pointers currently cached by the VM passed as // the first argument. // // Or, if iOp is greater than or equal to zero, then the destructor is // only invoked for those auxiliary data pointers created by the user // function invoked by the OP_Function opcode at instruction iOp of // VM pVdbe, and only then if: // // * the associated function parameter is the 32nd or later (counting // from left to right), or // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83213:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || (*AuxData)(unsafe.Pointer(pAux)).FiAuxOp == iOp && (*AuxData)(unsafe.Pointer(pAux)).FiAuxArg >= 0 && ((*AuxData)(unsafe.Pointer(pAux)).FiAuxArg > 31 || !(uint32(mask)&(uint32(uint32(1))<<(*AuxData)(unsafe.Pointer(pAux)).FiAuxArg) != 0)) { if (*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAux)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAux)).FpAux) } *(*uintptr)(unsafe.Pointer(pp)) = (*AuxData)(unsafe.Pointer(pAux)).FpNextAux Xsqlite3DbFree(tls, db, pAux) } else { pp = pAux + 24 } } } // Free all memory associated with the Vdbe passed as the second argument, // except for object itself, which is preserved. // // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83241:21: */ var pSub uintptr var pNext uintptr releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName, int32((*Vdbe)(unsafe.Pointer(p)).FnResColumn)*COLNAME_N) for pSub = (*Vdbe)(unsafe.Pointer(p)).FpProgram; pSub != 0; pSub = pNext { pNext = (*SubProgram)(unsafe.Pointer(pSub)).FpNext vdbeFreeOpArray(tls, db, (*SubProgram)(unsafe.Pointer(pSub)).FaOp, (*SubProgram)(unsafe.Pointer(pSub)).FnOp) Xsqlite3DbFree(tls, db, pSub) } if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_INIT) { releaseMemArray(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar, int32((*Vdbe)(unsafe.Pointer(p)).FnVar)) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpVList) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FpFree) } vdbeFreeOpArray(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaOp, (*Vdbe)(unsafe.Pointer(p)).FnOp) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FaColName) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzSql) } // Delete an entire VDBE. func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83282:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3VdbeClearObject(tls, db, p) if (*Vdbe)(unsafe.Pointer(p)).FpPrev != 0 { (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpPrev)).FpNext = (*Vdbe)(unsafe.Pointer(p)).FpNext } else { (*Sqlite3)(unsafe.Pointer(db)).FpVdbe = (*Vdbe)(unsafe.Pointer(p)).FpNext } if (*Vdbe)(unsafe.Pointer(p)).FpNext != 0 { (*Vdbe)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpNext)).FpPrev = (*Vdbe)(unsafe.Pointer(p)).FpPrev } (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic = U32(VDBE_MAGIC_DEAD) (*Vdbe)(unsafe.Pointer(p)).Fdb = uintptr(0) Xsqlite3DbFreeNN(tls, db, p) } // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83308:36: */ bp := tls.Alloc(4) defer tls.Free(4) // var res int32 at bp, 4 var rc int32 rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(p + 48)), (*VdbeCursor)(unsafe.Pointer(p)).FmovetoTarget, 0, bp) if rc != 0 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { return Xsqlite3CorruptError(tls, 83318) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) return SQLITE_OK } // Something has moved cursor "p" out of place. Maybe the row it was // pointed to was deleted out from under it. Or maybe the btree was // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83334:28: */ bp := tls.Alloc(4) defer tls.Free(4) // var isDifferentRow int32 at bp, 4 var rc int32 rc = Xsqlite3BtreeCursorRestore(tls, *(*uintptr)(unsafe.Pointer(p + 48)), bp) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) if *(*int32)(unsafe.Pointer(bp)) != 0 { (*VdbeCursor)(unsafe.Pointer(p)).FnullRow = U8(1) } return rc } // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83349:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) } return SQLITE_OK } // Make sure the cursor p is ready to read or write the row to which it // was last positioned. Return an error code if an OOM fault or I/O error // prevents us from positioning the cursor to its correct position. // // If a MoveTo operation is pending on the given cursor, then do that // MoveTo now. If no move is pending, check to see if the row has been // deleted out from under the cursor and if it has, mark the row as // a NULL row. // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83370:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { var iMap U32 if *(*uintptr)(unsafe.Pointer(p + 16)) != 0 && libc.AssignUint32(&iMap, *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 16)) + uintptr(U32(1)+*(*U32)(unsafe.Pointer(piCol)))*4))) > U32(0) && !(int32((*VdbeCursor)(unsafe.Pointer(p)).FnullRow) != 0) { *(*uintptr)(unsafe.Pointer(pp)) = (*VdbeCursor)(unsafe.Pointer(p)).FpAltCursor *(*U32)(unsafe.Pointer(piCol)) = iMap - U32(1) return SQLITE_OK } return Xsqlite3VdbeFinishMoveto(tls, p) } if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 48))) != 0 { return handleMovedCursor(tls, p) } return SQLITE_OK } // The following functions: // // sqlite3VdbeSerialType() // sqlite3VdbeSerialTypeLen() // sqlite3VdbeSerialLen() // sqlite3VdbeSerialPut() // sqlite3VdbeSerialGet() // // encapsulate the code that serializes values for storage in SQLite // data and index records. Each serialized value consists of a // 'serial-type' and a blob of data. The serial type is an 8-byte unsigned // integer, stored as a varint. // // In an SQLite index record, the serial type is stored directly before // the blob of data that it corresponds to. In a table record, all serial // types are stored at the start of the record, and the blobs of data at // the end. Hence these functions allow the caller to handle the // serial-type and data blob separately. // // The following table describes the various storage classes for data: // // serial type bytes of data type // -------------- --------------- --------------- // 0 0 NULL // 1 1 signed integer // 2 2 signed integer // 3 3 signed integer // 4 4 signed integer // 5 6 signed integer // 6 8 signed integer // 7 8 IEEE float // 8 0 Integer constant 0 // 9 0 Integer constant 1 // 10,11 reserved for expansion // N>=12 and even (N-12)/2 BLOB // N>=13 and odd (N-13)/2 text // // The 8 and 9 types were added in 3.3.0, file format 4. Prior versions // of SQLite will not understand those serial types. // The sizes for serial types less than 128 var sqlite3SmallTypeSizes = [128]U8{ // 0 1 2 3 4 5 6 7 8 9 /* 0 */ U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(8), U8(0), U8(0), /* 10 */ U8(0), U8(0), U8(0), U8(0), U8(1), U8(1), U8(2), U8(2), U8(3), U8(3), /* 20 */ U8(4), U8(4), U8(5), U8(5), U8(6), U8(6), U8(7), U8(7), U8(8), U8(8), /* 30 */ U8(9), U8(9), U8(10), U8(10), U8(11), U8(11), U8(12), U8(12), U8(13), U8(13), /* 40 */ U8(14), U8(14), U8(15), U8(15), U8(16), U8(16), U8(17), U8(17), U8(18), U8(18), /* 50 */ U8(19), U8(19), U8(20), U8(20), U8(21), U8(21), U8(22), U8(22), U8(23), U8(23), /* 60 */ U8(24), U8(24), U8(25), U8(25), U8(26), U8(26), U8(27), U8(27), U8(28), U8(28), /* 70 */ U8(29), U8(29), U8(30), U8(30), U8(31), U8(31), U8(32), U8(32), U8(33), U8(33), /* 80 */ U8(34), U8(34), U8(35), U8(35), U8(36), U8(36), U8(37), U8(37), U8(38), U8(38), /* 90 */ U8(39), U8(39), U8(40), U8(40), U8(41), U8(41), U8(42), U8(42), U8(43), U8(43), /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83507:17 */ // Return the length of the data corresponding to the supplied serial-type. func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83527:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { return U32(sqlite3SmallTypeSizes[serial_type]) } return U32(0) } func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83536:19: */ return sqlite3SmallTypeSizes[serial_type] } // If we are on an architecture with mixed-endian floating // points (ex: ARM7) then swap the lower 4 bytes with the // upper 4 bytes. Return the result. // // For most architectures, this is a no-op. // // (later): It is reported to me that the mixed-endian problem // on ARM7 is an issue with GCC, not with the ARM7 chip. It seems // that early versions of GCC stored the two words of a 64-bit // float in the wrong order. And that error has been propagated // ever since. The blame is not necessarily with GCC, though. // GCC might have just copying the problem from a prior compiler. // I am also told that newer versions of GCC that follow a different // ABI get the byte order right. // // Developers using SQLite on an ARM7 should compile and run their // application using -DSQLITE_DEBUG=1 at least once. With DEBUG // enabled, some asserts below will ensure that the byte order of // floating point values is correct. // // (2007-08-30) Frank van Vugt has studied this problem closely // and has send his findings to the SQLite developers. Frank // writes that some Linux kernels offer floating point hardware // emulation that uses only 32-bit mantissas instead of a full // 48-bits as required by the IEEE standard. (This is the // CONFIG_FPE_FASTFPE option.) On such systems, floating point // byte swapping becomes very complicated. To avoid problems, // the necessary byte swapping is carried out using a 64-bit integer // rather than a 64-bit float. Frank assures us that the code here // works for him. We, the developers, have no way to independently // verify this, but Frank seems to know what he is talking about // so we trust him. // Write the serialized data blob for the value stored in pMem into // buf. It is assumed that the caller has allocated sufficient space. // Return the number of bytes written. // // nBuf is the amount of space left in buf[]. The caller is responsible // for allocating enough space to buf[] to hold the entire field, exclusive // of the pMem->u.nZero bytes for a MEM_Zero value. // // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83607:20: */ bp := tls.Alloc(8) defer tls.Free(8) var len U32 // Integer and Real if serial_type <= U32(7) && serial_type > U32(0) { // var v U64 at bp, 8 var i U32 if serial_type == U32(7) { libc.Xmemcpy(tls, bp, pMem, uint64(unsafe.Sizeof(U64(0)))) } else { *(*U64)(unsafe.Pointer(bp /* v */)) = U64(*(*I64)(unsafe.Pointer(pMem))) } len = libc.AssignUint32(&i, U32(sqlite3SmallTypeSizes[serial_type])) for __ccgo := true; __ccgo; __ccgo = i != 0 { *(*U8)(unsafe.Pointer(buf + uintptr(libc.PreDecUint32(&i, 1)))) = U8(*(*U64)(unsafe.Pointer(bp)) & uint64(0xFF)) *(*U64)(unsafe.Pointer(bp /* v */)) >>= 8 } return len } // String or blob if serial_type >= U32(12) { len = U32((*Mem)(unsafe.Pointer(pMem)).Fn) if len > U32(0) { libc.Xmemcpy(tls, buf, (*Mem)(unsafe.Pointer(pMem)).Fz, uint64(len)) } return len } // NULL or constants 0 or 1 return U32(0) } // Input "x" is a sequence of unsigned characters that represent a // big-endian integer. Return the equivalent native integer // Deserialize the data blob pointed to by buf as serial type serial_type // and store the result in pMem. // // This function is implemented as two separate routines for performance. // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83661:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*U64)(unsafe.Pointer(bp /* x */)) = U64(U32(*(*uint8)(unsafe.Pointer(buf)))<<24 | U32(int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<16) | U32(int32(*(*uint8)(unsafe.Pointer(buf + 2)))<<8) | U32(*(*uint8)(unsafe.Pointer(buf + 3)))) var y U32 = U32(*(*uint8)(unsafe.Pointer(buf + uintptr(4))))<<24 | U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 1)))<<16) | U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 2)))<<8) | U32(*(*uint8)(unsafe.Pointer(buf + uintptr(4) + 3))) *(*U64)(unsafe.Pointer(bp /* x */)) = *(*U64)(unsafe.Pointer(bp))<<32 + U64(y) if serial_type == U32(6) { // EVIDENCE-OF: R-29851-52272 Value is a big-endian 64-bit // twos-complement integer. *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) } else { // EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit // floating point number. libc.Xmemcpy(tls, pMem, bp, uint64(unsafe.Sizeof(U64(0)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = func() uint16 { if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0) { return uint16(MEM_Null) } return uint16(MEM_Real) }() } } func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83696:21: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table // UPDATE no-change flag set (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 *(*int32)(unsafe.Pointer(pMem)) = 0 return } case U32(11): fallthrough // Reserved for future use case U32(0): { // Null // EVIDENCE-OF: R-24078-09375 Value is a NULL. (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) return } case U32(1): { // EVIDENCE-OF: R-44885-25196 Value is an 8-bit twos-complement // integer. *(*I64)(unsafe.Pointer(pMem)) = I64(I8(*(*uint8)(unsafe.Pointer(buf)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } case U32(2): { // 2-byte signed integer // EVIDENCE-OF: R-49794-35026 Value is a big-endian 16-bit // twos-complement integer. *(*I64)(unsafe.Pointer(pMem)) = I64(256*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } case U32(3): { // 3-byte signed integer // EVIDENCE-OF: R-37839-54301 Value is a big-endian 24-bit // twos-complement integer. *(*I64)(unsafe.Pointer(pMem)) = I64(65536*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<8 | int32(*(*uint8)(unsafe.Pointer(buf + 2)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } case U32(4): { // 4-byte signed integer // EVIDENCE-OF: R-01849-26079 Value is a big-endian 32-bit // twos-complement integer. *(*I64)(unsafe.Pointer(pMem)) = I64(16777216*int32(I8(*(*uint8)(unsafe.Pointer(buf)))) | int32(*(*uint8)(unsafe.Pointer(buf + 1)))<<16 | int32(*(*uint8)(unsafe.Pointer(buf + 2)))<<8 | int32(*(*uint8)(unsafe.Pointer(buf + 3)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } case U32(5): { // 6-byte signed integer // EVIDENCE-OF: R-50385-09674 Value is a big-endian 48-bit // twos-complement integer. *(*I64)(unsafe.Pointer(pMem)) = I64(U32(*(*uint8)(unsafe.Pointer(buf + uintptr(2))))<<24|U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 1)))<<16)|U32(int32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 2)))<<8)|U32(*(*uint8)(unsafe.Pointer(buf + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*uint8)(unsafe.Pointer(buf))))|int32(*(*uint8)(unsafe.Pointer(buf + 1)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } case U32(6): fallthrough // 8-byte signed integer case U32(7): { // IEEE floating point // These use local variables, so do them in a separate routine // to avoid having to move the frame pointer in the common case serialGet(tls, buf, serial_type, pMem) return } case U32(8): fallthrough // Integer 0 case U32(9): { // Integer 1 // EVIDENCE-OF: R-12976-22893 Value is the integer 0. // EVIDENCE-OF: R-18143-12121 Value is the integer 1. *(*I64)(unsafe.Pointer(pMem)) = I64(serial_type - U32(8)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) return } default: { (*Mem)(unsafe.Pointer(pMem)).Fz = buf (*Mem)(unsafe.Pointer(pMem)).Fn = int32((serial_type - U32(12)) / U32(2)) (*Mem)(unsafe.Pointer(pMem)).Fflags = aFlag[serial_type&U32(1)] return } } return } var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83779:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if // the first argument is a pointer to KeyInfo structure pKeyInfo. // // The space is either allocated using sqlite3DbMallocRaw() or from within // the unaligned buffer passed via the second and third arguments (presumably // stack space). If the former, then *ppFree is set to a pointer that should // be eventually freed by the caller using sqlite3DbFree(). Or, if the // allocation comes from the pSpace/szSpace buffer, *ppFree is set to NULL // before returning. // // If an OOM error occurs, NULL is returned. func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83802:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint64(unsafe.Sizeof(UnpackedRecord{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) p = Xsqlite3DbMallocRaw(tls, (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb, uint64(nByte)) if !(p != 0) { return uintptr(0) } (*UnpackedRecord)(unsafe.Pointer(p)).FaMem = p + 24 (*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo = pKeyInfo (*UnpackedRecord)(unsafe.Pointer(p)).FnField = U16(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField) + 1) return p } // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:83822:21: */ bp := tls.Alloc(8) defer tls.Free(8) var aKey uintptr = pKey var d U32 var idx U32 // Offset in aKey[] to read from var u U16 // Unsigned loop counter // var szHdr U32 at bp, 4 var pMem uintptr = (*UnpackedRecord)(unsafe.Pointer(p)).FaMem (*UnpackedRecord)(unsafe.Pointer(p)).Fdefault_rc = int8(0) idx = U32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(aKey))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp)) = U32(*(*uint8)(unsafe.Pointer(aKey))); return 1 }()) } return Xsqlite3GetVarint32(tls, aKey, bp) }()) d = *(*U32)(unsafe.Pointer(bp /* szHdr */)) u = U16(0) for idx < *(*U32)(unsafe.Pointer(bp)) && d <= U32(nKey) { // var serial_type U32 at bp+4, 4 idx = idx + U32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(aKey + uintptr(idx)))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*uint8)(unsafe.Pointer(aKey + uintptr(idx)))) return 1 }()) } return Xsqlite3GetVarint32(tls, aKey+uintptr(idx), bp+4) }()) (*Mem)(unsafe.Pointer(pMem)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc (*Mem)(unsafe.Pointer(pMem)).Fdb = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb // pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) Xsqlite3VdbeSerialGet(tls, aKey+uintptr(d), *(*U32)(unsafe.Pointer(bp + 4 /* serial_type */)), pMem) d = d + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4))) pMem += 56 if int32(libc.PreIncUint16(&u, 1)) >= int32((*UnpackedRecord)(unsafe.Pointer(p)).FnField) { break } } if d > U32(nKey) && u != 0 { // In a corrupt record entry, the last pMem might have been set up using // uninitialized memory. Overwrite its value with NULL, to prevent // warnings from MSAN. Xsqlite3VdbeMemSetNull(tls, pMem-uintptr(1)*56) } (*UnpackedRecord)(unsafe.Pointer(p)).FnField = u } // Both *pMem1 and *pMem2 contain string values. Compare the two values // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84019:12: */ bp := tls.Alloc(112) defer tls.Free(112) if int32((*Mem)(unsafe.Pointer(pMem1)).Fenc) == int32((*CollSeq)(unsafe.Pointer(pColl)).Fenc) { // The strings are already in the correct encoding. Call the // comparison function directly return (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(pMem1)).Fn, (*Mem)(unsafe.Pointer(pMem1)).Fz, (*Mem)(unsafe.Pointer(pMem2)).Fn, (*Mem)(unsafe.Pointer(pMem2)).Fz) } else { var rc int32 var v1 uintptr var v2 uintptr // var c1 Mem at bp, 56 // var c2 Mem at bp+56, 56 Xsqlite3VdbeMemInit(tls, bp, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) Xsqlite3VdbeMemInit(tls, bp+56, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) Xsqlite3VdbeMemShallowCopy(tls, bp, pMem1, MEM_Ephem) Xsqlite3VdbeMemShallowCopy(tls, bp+56, pMem2, MEM_Ephem) v1 = Xsqlite3ValueText(tls, bp, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) v2 = Xsqlite3ValueText(tls, bp+56, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) if v1 == uintptr(0) || v2 == uintptr(0) { if prcErr != 0 { *(*U8)(unsafe.Pointer(prcErr)) = U8(SQLITE_NOMEM) } rc = 0 } else { rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(bp /* &c1 */)).Fn, v1, (*Mem)(unsafe.Pointer(bp+56 /* &c2 */)).Fn, v2) } Xsqlite3VdbeMemRelease(tls, bp) Xsqlite3VdbeMemRelease(tls, bp+56) return rc } return int32(0) } // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84056:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { return 0 } } return 1 } // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84069:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn // It is possible to have a Blob value that has some non-zero content // followed by zero content. But that only comes up for Blobs formed // by the OP_MakeRecord opcode, and such Blobs never get passed into // sqlite3MemCompare(). if (int32((*Mem)(unsafe.Pointer(pB1)).Fflags)|int32((*Mem)(unsafe.Pointer(pB2)).Fflags))&MEM_Zero != 0 { if int32((*Mem)(unsafe.Pointer(pB1)).Fflags)&int32((*Mem)(unsafe.Pointer(pB2)).Fflags)&MEM_Zero != 0 { return *(*int32)(unsafe.Pointer(pB1)) - *(*int32)(unsafe.Pointer(pB2)) } else if int32((*Mem)(unsafe.Pointer(pB1)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, (*Mem)(unsafe.Pointer(pB2)).Fz, (*Mem)(unsafe.Pointer(pB2)).Fn) != 0) { return -1 } return *(*int32)(unsafe.Pointer(pB1)) - n2 } else { if !(isAllZero(tls, (*Mem)(unsafe.Pointer(pB1)).Fz, (*Mem)(unsafe.Pointer(pB1)).Fn) != 0) { return +1 } return n1 - *(*int32)(unsafe.Pointer(pB2)) } } c = libc.Xmemcmp(tls, (*Mem)(unsafe.Pointer(pB1)).Fz, (*Mem)(unsafe.Pointer(pB2)).Fz, func() uint64 { if n1 > n2 { return uint64(n2) } return uint64(n1) }()) if c != 0 { return c } return n1 - n2 } // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84102:20: */ if uint64(unsafe.Sizeof(float64(0))) > uint64(8) { var x float64 = float64(i) if x < r { return -1 } if x > r { return +1 } /*NO_TEST*/ // work around bugs in gcov return 0 /*NO_TEST*/ // work around bugs in gcov } else { var y I64 var s float64 if r < -9223372036854775808.0 { return +1 } if r >= 9223372036854775808.0 { return -1 } y = I64(r) if i < y { return -1 } if i > y { return +1 } s = float64(i) if s < r { return -1 } if s > r { return +1 } return 0 } return int32(0) } // Compare the values contained by the two memory cells, returning // negative, zero or positive if pMem1 is less than, equal to, or greater // than pMem2. Sorting order is NULL's first, followed by numbers (integers // and reals) sorted numerically, followed by text ordered by the collating // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84135:20: */ var f1 int32 var f2 int32 var combined_flags int32 f1 = int32((*Mem)(unsafe.Pointer(pMem1)).Fflags) f2 = int32((*Mem)(unsafe.Pointer(pMem2)).Fflags) combined_flags = f1 | f2 // If one value is NULL, it is less than the other. If both values // are NULL, return 0. if combined_flags&MEM_Null != 0 { return f2&MEM_Null - f1&MEM_Null } // At least one of the two values is a number if combined_flags&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { if f1&f2&(MEM_Int|MEM_IntReal) != 0 { if *(*I64)(unsafe.Pointer(pMem1)) < *(*I64)(unsafe.Pointer(pMem2)) { return -1 } if *(*I64)(unsafe.Pointer(pMem1)) > *(*I64)(unsafe.Pointer(pMem2)) { return +1 } return 0 } if f1&f2&MEM_Real != 0 { if *(*float64)(unsafe.Pointer(pMem1)) < *(*float64)(unsafe.Pointer(pMem2)) { return -1 } if *(*float64)(unsafe.Pointer(pMem1)) > *(*float64)(unsafe.Pointer(pMem2)) { return +1 } return 0 } if f1&(MEM_Int|MEM_IntReal) != 0 { if f2&MEM_Real != 0 { return Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pMem1)), *(*float64)(unsafe.Pointer(pMem2))) } else if f2&(MEM_Int|MEM_IntReal) != 0 { if *(*I64)(unsafe.Pointer(pMem1)) < *(*I64)(unsafe.Pointer(pMem2)) { return -1 } if *(*I64)(unsafe.Pointer(pMem1)) > *(*I64)(unsafe.Pointer(pMem2)) { return +1 } return 0 } else { return -1 } } if f1&MEM_Real != 0 { if f2&(MEM_Int|MEM_IntReal) != 0 { return -Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pMem2)), *(*float64)(unsafe.Pointer(pMem1))) } else { return -1 } } return +1 } // If one value is a string and the other is a blob, the string is less. // If both are strings, compare using the collating functions. if combined_flags&MEM_Str != 0 { if f1&MEM_Str == 0 { return 1 } if f2&MEM_Str == 0 { return -1 } // The collation sequence must be defined at this point, even if // the user deletes the collation sequence after the vdbe program is // compiled (this was not always the case). if pColl != 0 { return vdbeCompareMemString(tls, pMem1, pMem2, pColl, uintptr(0)) } // If a NULL pointer was passed as the collate function, fall through // to the blob case and use memcmp(). } // Both values must be blobs. Compare using memcmp(). return Xsqlite3BlobCompare(tls, pMem1, pMem2) } // The first argument passed to this function is a serial-type that // corresponds to an integer - all values between 1 and 9 inclusive // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84234:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var y U32 at bp, 4 switch serial_type { case U32(0): fallthrough case U32(1): return I64(I8(*(*U8)(unsafe.Pointer(aKey)))) case U32(2): return I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))) case U32(3): return I64(65536*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<8 | int32(*(*U8)(unsafe.Pointer(aKey + 2)))) case U32(4): { *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) return I64(*(*int32)(unsafe.Pointer(bp))) } case U32(5): { return I64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey))))|int32(*(*U8)(unsafe.Pointer(aKey + 1)))) } case U32(6): { *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = *(*U64)(unsafe.Pointer(bp + 8))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) return *(*I64)(unsafe.Pointer(bp + 8)) } } return I64(serial_type - U32(8)) } // This function compares the two table rows or index records // specified by {nKey1, pKey1} and pPKey2. It returns a negative, zero // or positive integer if key1 is less than, equal to or // greater than key2. The {nKey1, pKey1} key must be a blob // created by the OP_MakeRecord opcode of the VDBE. The pPKey2 // key must be a parsed key such as obtained from // sqlite3VdbeParseRecord. // // If argument bSkip is non-zero, it is assumed that the caller has already // determined that the first fields of the keys are equal. // // Key1 and Key2 do not have to contain the same number of fields. If all // fields that appear in both keys are equal, then pPKey2->default_rc is // returned. // // If database corruption is discovered, set pPKey2->errCode to // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84289:20: */ bp := tls.Alloc(68) defer tls.Free(68) var d1 U32 // Offset into aKey[] of next data element var i int32 // Index of next field to compare // var szHdr1 U32 at bp+4, 4 // Size of record header in bytes var idx1 U32 // Offset of first type in header var rc int32 = 0 // Return value var pRhs uintptr = (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem // Next field of pPKey2 to compare var pKeyInfo uintptr var aKey1 uintptr = pKey1 // var mem1 Mem at bp+8, 56 // If bSkip is true, then the caller has already determined that the first // two elements in the keys are equal. Fix the various stack variables so // that this routine begins comparing at the second field. if bSkip != 0 { // var s1 U32 at bp, 4 idx1 = U32(1 + int32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(aKey1 + 1))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + 1))); return 1 }()) } return Xsqlite3GetVarint32(tls, aKey1+1, bp) }())) *(*U32)(unsafe.Pointer(bp + 4 /* szHdr1 */)) = U32(*(*uint8)(unsafe.Pointer(aKey1))) d1 = *(*U32)(unsafe.Pointer(bp + 4)) + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp))) i = 1 pRhs += 56 } else { idx1 = U32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(aKey1))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 4)) = U32(*(*uint8)(unsafe.Pointer(aKey1))); return 1 }()) } return Xsqlite3GetVarint32(tls, aKey1, bp+4) }()) d1 = *(*U32)(unsafe.Pointer(bp + 4 /* szHdr1 */)) i = 0 } if d1 > uint32(nKey1) { (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84320)) return 0 // Corruption } for __ccgo := true; __ccgo; __ccgo = idx1 < *(*U32)(unsafe.Pointer(bp + 4)) && d1 <= uint32(nKey1) { // var serial_type U32 at bp+64, 4 // RHS is an integer if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { rc = +1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), bp+8) rc = -Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pRhs)), *(*float64)(unsafe.Pointer(bp + 8))) } else { var lhs I64 = vdbeRecordDecodeInt(tls, *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), aKey1+uintptr(d1)) var rhs I64 = *(*I64)(unsafe.Pointer(pRhs)) if lhs < rhs { rc = -1 } else if lhs > rhs { rc = +1 } } } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Real != 0 { *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(10) { // Serial types 12 or greater are strings and blobs (greater than // numbers). Types 10 and 11 are currently "reserved for future // use", so it doesn't really matter what the results of comparing // them to numberic values are. rc = +1 } else if *(*U32)(unsafe.Pointer(bp + 64)) == U32(0) { rc = -1 } else { Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)), bp+8) if *(*U32)(unsafe.Pointer(bp + 64)) == U32(7) { if *(*float64)(unsafe.Pointer(bp + 8)) < *(*float64)(unsafe.Pointer(pRhs)) { rc = -1 } else if *(*float64)(unsafe.Pointer(bp + 8)) > *(*float64)(unsafe.Pointer(pRhs)) { rc = +1 } } else { rc = Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(pRhs))) } } } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Str != 0 { *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(0x80) { Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+64) } if *(*U32)(unsafe.Pointer(bp + 64)) < U32(12) { rc = -1 } else if !(*(*U32)(unsafe.Pointer(bp + 64))&U32(0x01) != 0) { rc = +1 } else { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fn = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84397)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fdb = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fflags = U16(MEM_Str) (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fz = aKey1 + uintptr(d1) rc = vdbeCompareMemString(tls, bp+8, pRhs, *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)), pPKey2+19) } else { var nCmp int32 = func() int32 { if (*Mem)(unsafe.Pointer(bp+8)).Fn < (*Mem)(unsafe.Pointer(pRhs)).Fn { return (*Mem)(unsafe.Pointer(bp + 8)).Fn } return (*Mem)(unsafe.Pointer(pRhs)).Fn }() rc = libc.Xmemcmp(tls, aKey1+uintptr(d1), (*Mem)(unsafe.Pointer(pRhs)).Fz, uint64(nCmp)) if rc == 0 { rc = (*Mem)(unsafe.Pointer(bp+8)).Fn - (*Mem)(unsafe.Pointer(pRhs)).Fn } } } } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Blob != 0 { *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 64)) >= U32(0x80) { Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+64) } if *(*U32)(unsafe.Pointer(bp + 64)) < U32(12) || *(*U32)(unsafe.Pointer(bp + 64))&U32(0x01) != 0 { rc = -1 } else { var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 64)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84427)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { rc = 1 } else { rc = nStr - *(*int32)(unsafe.Pointer(pRhs)) } } else { var nCmp int32 = func() int32 { if nStr < (*Mem)(unsafe.Pointer(pRhs)).Fn { return nStr } return (*Mem)(unsafe.Pointer(pRhs)).Fn }() rc = libc.Xmemcmp(tls, aKey1+uintptr(d1), (*Mem)(unsafe.Pointer(pRhs)).Fz, uint64(nCmp)) if rc == 0 { rc = nStr - (*Mem)(unsafe.Pointer(pRhs)).Fn } } } } else { *(*U32)(unsafe.Pointer(bp + 64 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) rc = libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) != U32(0)) } if rc != 0 { var sortFlags int32 = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo)).FaSortFlags + uintptr(i)))) if sortFlags != 0 { if sortFlags&KEYINFO_ORDER_BIGNULL == 0 || sortFlags&KEYINFO_ORDER_DESC != libc.Bool32(*(*U32)(unsafe.Pointer(bp + 64)) == U32(0) || int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Null != 0) { rc = -rc } } // See comment below return rc } i++ if i == int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) { break } pRhs += 56 d1 = d1 + Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 64))) idx1 = idx1 + U32(Xsqlite3VarintLen(tls, uint64(*(*U32)(unsafe.Pointer(bp + 64))))) } // No memory allocation is ever used on mem1. Prove this using // the following assert(). If the assert() fails, it indicates a // memory leak and a need to call sqlite3VdbeMemRelease(&mem1). // rc==0 here means that one or both of the keys ran out of fields and // all the fields up to that point were equal. Return the default_rc // value. (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84486:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } // This function is an optimized version of sqlite3VdbeRecordCompare() // that (a) the first field of pPKey2 is an integer, and (b) the // size-of-header varint at the start of (pKey1/nKey1) fits in a single // byte (i.e. is less than 128). // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84503:12: */ bp := tls.Alloc(16) defer tls.Free(16) var aKey uintptr = pKey1 + uintptr(int32(*(*U8)(unsafe.Pointer(pKey1)))&0x3F) var serial_type int32 = int32(*(*U8)(unsafe.Pointer(pKey1 + 1))) var res int32 // var y U32 at bp, 4 // var x U64 at bp+8, 8 var v I64 var lhs I64 switch serial_type { case 1: { // 1-byte signed integer lhs = I64(I8(*(*U8)(unsafe.Pointer(aKey)))) break } case 2: { // 2-byte signed integer lhs = I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))) break } case 3: { // 3-byte signed integer lhs = I64(65536*int32(I8(*(*U8)(unsafe.Pointer(aKey)))) | int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<8 | int32(*(*U8)(unsafe.Pointer(aKey + 2)))) break } case 4: { // 4-byte signed integer *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) lhs = I64(*(*int32)(unsafe.Pointer(bp))) break } case 5: { // 6-byte signed integer lhs = I64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(2) + 3)))) + I64(int64(1))<<32*I64(256*int32(I8(*(*U8)(unsafe.Pointer(aKey))))|int32(*(*U8)(unsafe.Pointer(aKey + 1)))) break } case 6: { // 8-byte signed integer *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) *(*U64)(unsafe.Pointer(bp + 8 /* x */)) = *(*U64)(unsafe.Pointer(bp + 8))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) lhs = *(*I64)(unsafe.Pointer(bp + 8)) break } case 8: lhs = int64(0) break case 9: lhs = int64(1) break // This case could be removed without changing the results of running // this code. Including it causes gcc to generate a faster switch // statement (since the range of switch targets now starts at zero and // is contiguous) but does not cause any duplicate code to be generated // (as gcc is clever enough to combine the two like cases). Other // compilers might be similar. case 0: fallthrough case 7: return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, pPKey2) default: return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, pPKey2) } v = *(*I64)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)) if v > lhs { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) } else if v < lhs { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) } else if int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) > 1 { // The first fields of the two keys are equal. Compare the trailing // fields. res = Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 1) } else { // The first fields of the two keys are equal and there are no trailing // fields. Return pPKey2->default_rc in this case. res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) } return res } // This function is an optimized version of sqlite3VdbeRecordCompare() // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84597:12: */ bp := tls.Alloc(4) defer tls.Free(4) var aKey1 uintptr = pKey1 // var serial_type int32 at bp, 4 var res int32 *(*int32)(unsafe.Pointer(bp /* serial_type */)) = int32(*(*U8)(unsafe.Pointer(aKey1 + 1))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { Xsqlite3GetVarint32(tls, aKey1+1, bp) } if *(*int32)(unsafe.Pointer(bp)) < 12 { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) // (pKey1/nKey1) is a number or a null } else if !(*(*int32)(unsafe.Pointer(bp))&0x01 != 0) { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) // (pKey1/nKey1) is a blob } else { var nCmp int32 var nStr int32 var szHdr int32 = int32(*(*U8)(unsafe.Pointer(aKey1))) nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 84622)) return 0 // Corruption } nCmp = func() int32 { if (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn < nStr { return (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn } return nStr }() res = libc.Xmemcmp(tls, aKey1+uintptr(szHdr), (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fz, uint64(nCmp)) if res > 0 { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) } else if res < 0 { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) } else { res = nStr - (*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FaMem)).Fn if res == 0 { if int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).FnField) > 1 { res = Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 1) } else { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FeqSeen = U8(1) } } else if res > 0 { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr2) } else { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) } } } return res } // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84661:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() // also assumes that it is safe to overread a buffer by at least the // maximum possible legal header size plus 8 bytes. Because there is // guaranteed to be at least 74 (but not 136) bytes of padding following each // buffer passed to varintRecordCompareInt() this makes it convenient to // limit the size of the header to 64 bytes in cases where the first field // is an integer. // // The easiest way to enforce this limit is to consider only records with // 13 fields or less. If the first field is an integer, the maximum legal // header size is (12*5 + 1 + 1) bytes. if int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FnAllField) <= 13 { var flags int32 = int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FaMem)).Fflags) if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FaSortFlags)) != 0 { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo)).FaSortFlags)))&KEYINFO_ORDER_BIGNULL != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 }{Xsqlite3VdbeRecordCompare})) } (*UnpackedRecord)(unsafe.Pointer(p)).Fr1 = int8(1) (*UnpackedRecord)(unsafe.Pointer(p)).Fr2 = int8(-1) } else { (*UnpackedRecord)(unsafe.Pointer(p)).Fr1 = int8(-1) (*UnpackedRecord)(unsafe.Pointer(p)).Fr2 = int8(1) } if flags&MEM_Int != 0 { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 }{vdbeRecordCompareInt})) } if flags&(MEM_Real|MEM_IntReal|MEM_Null|MEM_Blob) == 0 && *(*uintptr)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(p)).FpKeyInfo + 32)) == uintptr(0) { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 }{vdbeRecordCompareString})) } } return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, uintptr) int32 }{Xsqlite3VdbeRecordCompare})) } // pCur points at an index entry created using the OP_MakeRecord opcode. // Read the rowid (the last field in the record) and store it in *rowid. // Return SQLITE_OK if everything works, or an error code otherwise. // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84712:20: */ bp := tls.Alloc(120) defer tls.Free(120) var nCellKey I64 var rc int32 // var szHdr U32 at bp+56, 4 // Size of the header // var typeRowid U32 at bp+60, 4 // Serial type of the rowid var lenRowid U32 // Size of the rowid // var m Mem at bp, 56 // var v Mem at bp+64, 56 nCellKey = int64(0) // Get the size of the index entry. Only indices entries of less // than 2GiB are support - anything large must be database corruption. // Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so // this code can safely assume that nCellKey is 32-bits nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) // Read in the complete content of the index entry Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) if !(rc != 0) { goto __1 } return rc __1: ; // The index entry must begin with a header size *(*U32)(unsafe.Pointer(bp + 56 /* szHdr */)) = U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(bp)).Fz))) if !(*(*U32)(unsafe.Pointer(bp + 56)) >= U32(0x80)) { goto __2 } Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz, bp+56) __2: ; if !(*(*U32)(unsafe.Pointer(bp + 56)) < U32(3) || *(*U32)(unsafe.Pointer(bp + 56)) > uint32((*Mem)(unsafe.Pointer(bp)).Fn)) { goto __3 } goto idx_rowid_corruption __3: ; // The last field of the index should be an integer - the ROWID. // Verify that the last entry really is an integer. *(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */)) = U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(bp)).Fz + uintptr(*(*U32)(unsafe.Pointer(bp + 56))-U32(1))))) if !(*(*U32)(unsafe.Pointer(bp + 60)) >= U32(0x80)) { goto __4 } Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(*(*U32)(unsafe.Pointer(bp + 56))-U32(1)), bp+60) __4: ; if !(*(*U32)(unsafe.Pointer(bp + 60)) < U32(1) || *(*U32)(unsafe.Pointer(bp + 60)) > U32(9) || *(*U32)(unsafe.Pointer(bp + 60)) == U32(7)) { goto __5 } goto idx_rowid_corruption __5: ; lenRowid = U32(sqlite3SmallTypeSizes[*(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */))]) if !(U32((*Mem)(unsafe.Pointer(bp)).Fn) < *(*U32)(unsafe.Pointer(bp + 56))+lenRowid) { goto __6 } goto idx_rowid_corruption __6: ; // Fetch the integer off the end of the index record Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(U32((*Mem)(unsafe.Pointer(bp)).Fn)-lenRowid), *(*U32)(unsafe.Pointer(bp + 60 /* typeRowid */)), bp+64) *(*I64)(unsafe.Pointer(rowid)) = *(*I64)(unsafe.Pointer(bp + 64)) Xsqlite3VdbeMemRelease(tls, bp) return SQLITE_OK // Jump here if database corruption is detected after m has been // allocated. Free the m object and return SQLITE_CORRUPT. idx_rowid_corruption: ; Xsqlite3VdbeMemRelease(tls, bp) return Xsqlite3CorruptError(tls, 84777) } // Compare the key of the index entry that cursor pC is pointing to against // the key string in pUnpacked. Write into *pRes a number // that is negative, zero, or positive if pC is less than, equal to, // or greater than pUnpacked. Return SQLITE_OK on success. // // pUnpacked is either created without a rowid or is truncated so that it // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84791:20: */ bp := tls.Alloc(56) defer tls.Free(56) var nCellKey I64 = int64(0) var rc int32 var pCur uintptr // var m Mem at bp, 56 pCur = *(*uintptr)(unsafe.Pointer(pC + 48)) nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 return Xsqlite3CorruptError(tls, 84810) } Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) if rc != 0 { return rc } *(*int32)(unsafe.Pointer(res)) = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp /* &m */)).Fz, pUnpacked, 0) Xsqlite3VdbeMemRelease(tls, bp) return SQLITE_OK } // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84826:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 128)) += nChange } // Set a flag in the vdbe to update the change counter when it is finalised // or reset. func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84836:21: */ libc.SetBitFieldPtr16Uint32(v+208, Bft(1), 4, 0x10) } // Mark every prepared statement associated with a database connection // as expired. // // An expired statement means that recompilation of the statement is // recommend. Statements expire when things happen that make their // programs obsolete. Removing user-defined functions or collating // sequences, or changing an authorization function are the types of // things that make prepared statements obsolete. // // If iCode is 1, then expiration is advisory. The statement should // be reprepared before being restarted, but if it is already running // it is allowed to run to completion. // // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84858:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+208, Bft(iCode+1), 0, 0x3) } } // Return the database associated with the Vdbe. func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84868:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84875:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } // Return a pointer to an sqlite3_value structure containing the value bound // parameter iVar of VM v. Except, if the value is an SQL NULL, return // 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_* // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84887:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*56 if 0 == int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null { var pRet uintptr = Xsqlite3ValueNew(tls, (*Vdbe)(unsafe.Pointer(v)).Fdb) if pRet != 0 { Xsqlite3VdbeMemCopy(tls, pRet, pMem) Xsqlite3ValueApplyAffinity(tls, pRet, aff, uint8(SQLITE_UTF8)) } return pRet } } return uintptr(0) } // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84909:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 292)) |= 0x80000000 } else { *(*U32)(unsafe.Pointer(v + 292)) |= U32(U32(1)) << (iVar - 1) } } // Cause a function to throw an error if it was call from OP_PureFunc // rather than OP_Function. // // OP_PureFunc means that the function must be deterministic, and should // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84928:20: */ bp := tls.Alloc(16) defer tls.Free(16) var pOp uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { return 1 } pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp)*24 if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_PureFunc { var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { zContext = ts + 6469 /* "a CHECK constrai..." */ } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { zContext = ts + 6488 /* "a generated colu..." */ } else { zContext = ts + 6507 /* "an index" */ } zMsg = Xsqlite3_mprintf(tls, ts+6516, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) return 0 } return 1 } // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84959:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = uintptr(0) } } // If the second argument is not NULL, release any allocations associated // with the memory cells in the p->aMem[] array. Also free the UnpackedRecord // structure itself, using sqlite3DbFree(). // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84980:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { var pMem uintptr = (*UnpackedRecord)(unsafe.Pointer(p)).FaMem + uintptr(i)*56 if (*Mem)(unsafe.Pointer(pMem)).FzMalloc != 0 { Xsqlite3VdbeMemRelease(tls, pMem) } } Xsqlite3DbFreeNN(tls, db, p) } } // Invoke the pre-update hook. If this is an UPDATE or DELETE pre-update call, // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:84999:21: */ bp := tls.Alloc(136) defer tls.Free(136) var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb var iKey2 I64 // var preupdate PreUpdate at bp, 136 var zTbl uintptr = (*Table)(unsafe.Pointer(pTab)).FzName libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(PreUpdate{}))) if libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) == 0 { iKey1 = libc.AssignInt64(&iKey2, int64(0)) (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpPk = Xsqlite3PrimaryKeyIndex(tls, pTab) } else { if op == SQLITE_UPDATE { iKey2 = *(*I64)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + uintptr(iReg)*56)) } else { iKey2 = iKey1 } } (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fv = v (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpCsr = pCsr (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fop = op (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiNewReg = iReg (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.Fdb = db (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.FnKeyField = U16((*Table)(unsafe.Pointer(pTab)).FnCol) (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).Fkeyinfo.FaSortFlags = uintptr(unsafe.Pointer(&fakeSortOrder)) (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey1 = iKey1 (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiKey2 = iKey2 (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpTab = pTab (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FiBlobWrite = iBlobWrite (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = bp /* &preupdate */ (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, Sqlite3_int64, Sqlite3_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg, db, op, zDb, zTbl, iKey1, iKey2) (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate = uintptr(0) Xsqlite3DbFree(tls, db, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FaRecord) vdbeFreeUnpacked(tls, db, int32((*PreUpdate)(unsafe.Pointer(bp)).Fkeyinfo.FnKeyField)+1, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpUnpacked) vdbeFreeUnpacked(tls, db, int32((*PreUpdate)(unsafe.Pointer(bp)).Fkeyinfo.FnKeyField)+1, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpNewUnpacked) if (*PreUpdate)(unsafe.Pointer(bp)).FaNew != 0 { var i int32 for i = 0; i < int32((*VdbeCursor)(unsafe.Pointer(pCsr)).FnField); i++ { Xsqlite3VdbeMemRelease(tls, (*PreUpdate)(unsafe.Pointer(bp)).FaNew+uintptr(i)*56) } Xsqlite3DbFreeNN(tls, db, (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FaNew) } } var fakeSortOrder U8 = U8(0) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85013:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** // 2004 May 26 // // 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 code use to implement APIs that are part of the // VDBE. // #include "sqliteInt.h" // #include "vdbeInt.h" // Return TRUE (non-zero) of the statement supplied as an argument needs // to be recompiled. A statement needs to be recompiled whenever the // execution environment changes in a way that would alter the program // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85092:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) } // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85103:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+6552, 0) return 1 } else { return 0 } return int32(0) } func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85111:12: */ if p == uintptr(0) { Xsqlite3_log(tls, SQLITE_MISUSE, ts+6597, 0) return 1 } else { return vdbeSafety(tls, p) } return int32(0) } // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85125:29: */ bp := tls.Alloc(16) defer tls.Free(16) // var iNow Sqlite3_int64 at bp, 8 // var iElapse Sqlite3_int64 at bp+8, 8 Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, bp) *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)) = (*(*Sqlite3_int64)(unsafe.Pointer(bp)) - (*Vdbe)(unsafe.Pointer(p)).FstartTime) * int64(1000000) if (*Sqlite3)(unsafe.Pointer(db)).FxProfile != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr, U64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProfile})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProfileArg, (*Vdbe)(unsafe.Pointer(p)).FzSql, uint64(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)))) } if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_PROFILE != 0 { (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_PROFILE), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, bp+8 /* &iElapse */) } (*Vdbe)(unsafe.Pointer(p)).FstartTime = int64(0) } // The checkProfileCallback(DB,P) macro checks to see if a profile callback // is needed, and it invokes the callback if it is needed. // The following routine destroys a virtual machine that is created by // the sqlite3_compile() routine. The integer returned is an SQLITE_ // success/failure code that describes the result of executing the virtual // machine. // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85163:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL // pointer is a harmless no-op. rc = SQLITE_OK } else { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { return Xsqlite3MisuseError(tls, 85172) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { invokeProfileCallback(tls, db, v) } rc = Xsqlite3VdbeFinalize(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3LeaveMutexAndCloseZombie(tls, db) } return rc } // Terminate the current execution of an SQL statement and reset it // back to its starting state so that it can be reused. A success code from // the prior execution is returned. // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85190:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK } else { var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { invokeProfileCallback(tls, db, v) } rc = Xsqlite3VdbeReset(tls, v) Xsqlite3VdbeRewind(tls, v) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } return rc } // Set all the parameters in the compiled SQL statement to NULL. func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85211:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt var mutex uintptr = (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pStmt)).Fdb)).Fmutex Xsqlite3_mutex_enter(tls, mutex) for i = 0; i < int32((*Vdbe)(unsafe.Pointer(p)).FnVar); i++ { Xsqlite3VdbeMemRelease(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i)*56) (*Mem)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i)*56)).Fflags = U16(MEM_Null) } if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != 0 { libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) } Xsqlite3_mutex_leave(tls, mutex) return rc } // *************************** sqlite3_value_ ******************************* // // The following routines extract information from a Mem or sqlite3_value // structure. func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85236:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, p) } return 0 }() != SQLITE_OK { return uintptr(0) } *(*U16)(unsafe.Pointer(p + 8)) |= U16(MEM_Blob) if (*Mem)(unsafe.Pointer(p)).Fn != 0 { return (*Mem)(unsafe.Pointer(p)).Fz } return uintptr(0) } else { return Xsqlite3_value_text(tls, pVal) } return uintptr(0) } func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85249:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85252:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85255:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85258:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85261:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85264:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { return uint32((*Mem)(unsafe.Pointer(pMem)).FeSubtype) } return uint32(0) }() } func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85268:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && int32((*Mem)(unsafe.Pointer(p)).FeSubtype) == 'p' && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(p)), zPType) == 0 { return (*Mem)(unsafe.Pointer(p)).Fz } else { return uintptr(0) } return uintptr(0) } func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85281:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85285:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85288:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85291:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85299:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } var aType = [64]U8{ U8(SQLITE_BLOB), // 0x00 (not possible) U8(SQLITE_NULL), // 0x01 NULL U8(SQLITE_TEXT), // 0x02 TEXT U8(SQLITE_NULL), // 0x03 (not possible) U8(SQLITE_INTEGER), // 0x04 INTEGER U8(SQLITE_NULL), // 0x05 (not possible) U8(SQLITE_INTEGER), // 0x06 INTEGER + TEXT U8(SQLITE_NULL), // 0x07 (not possible) U8(SQLITE_FLOAT), // 0x08 FLOAT U8(SQLITE_NULL), // 0x09 (not possible) U8(SQLITE_FLOAT), // 0x0a FLOAT + TEXT U8(SQLITE_NULL), // 0x0b (not possible) U8(SQLITE_INTEGER), // 0x0c (not possible) U8(SQLITE_NULL), // 0x0d (not possible) U8(SQLITE_INTEGER), // 0x0e (not possible) U8(SQLITE_NULL), // 0x0f (not possible) U8(SQLITE_BLOB), // 0x10 BLOB U8(SQLITE_NULL), // 0x11 (not possible) U8(SQLITE_TEXT), // 0x12 (not possible) U8(SQLITE_NULL), // 0x13 (not possible) U8(SQLITE_INTEGER), // 0x14 INTEGER + BLOB U8(SQLITE_NULL), // 0x15 (not possible) U8(SQLITE_INTEGER), // 0x16 (not possible) U8(SQLITE_NULL), // 0x17 (not possible) U8(SQLITE_FLOAT), // 0x18 FLOAT + BLOB U8(SQLITE_NULL), // 0x19 (not possible) U8(SQLITE_FLOAT), // 0x1a (not possible) U8(SQLITE_NULL), // 0x1b (not possible) U8(SQLITE_INTEGER), // 0x1c (not possible) U8(SQLITE_NULL), // 0x1d (not possible) U8(SQLITE_INTEGER), // 0x1e (not possible) U8(SQLITE_NULL), // 0x1f (not possible) U8(SQLITE_FLOAT), // 0x20 INTREAL U8(SQLITE_NULL), // 0x21 (not possible) U8(SQLITE_TEXT), // 0x22 INTREAL + TEXT U8(SQLITE_NULL), // 0x23 (not possible) U8(SQLITE_FLOAT), // 0x24 (not possible) U8(SQLITE_NULL), // 0x25 (not possible) U8(SQLITE_FLOAT), // 0x26 (not possible) U8(SQLITE_NULL), // 0x27 (not possible) U8(SQLITE_FLOAT), // 0x28 (not possible) U8(SQLITE_NULL), // 0x29 (not possible) U8(SQLITE_FLOAT), // 0x2a (not possible) U8(SQLITE_NULL), // 0x2b (not possible) U8(SQLITE_FLOAT), // 0x2c (not possible) U8(SQLITE_NULL), // 0x2d (not possible) U8(SQLITE_FLOAT), // 0x2e (not possible) U8(SQLITE_NULL), // 0x2f (not possible) U8(SQLITE_BLOB), // 0x30 (not possible) U8(SQLITE_NULL), // 0x31 (not possible) U8(SQLITE_TEXT), // 0x32 (not possible) U8(SQLITE_NULL), // 0x33 (not possible) U8(SQLITE_FLOAT), // 0x34 (not possible) U8(SQLITE_NULL), // 0x35 (not possible) U8(SQLITE_FLOAT), // 0x36 (not possible) U8(SQLITE_NULL), // 0x37 (not possible) U8(SQLITE_FLOAT), // 0x38 (not possible) U8(SQLITE_NULL), // 0x39 (not possible) U8(SQLITE_FLOAT), // 0x3a (not possible) U8(SQLITE_NULL), // 0x3b (not possible) U8(SQLITE_FLOAT), // 0x3c (not possible) U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85300:19 */ // Return true if a parameter to xUpdate represents an unchanged column func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85385:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85390:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85396:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) } pNew = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_value{}))) if pNew == uintptr(0) { return uintptr(0) } libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Sqlite3_value{}))) libc.Xmemcpy(tls, pNew, pOrig, uint64(uintptr(0)+24)) *(*U16)(unsafe.Pointer(pNew + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn)) (*Sqlite3_value)(unsafe.Pointer(pNew)).Fdb = uintptr(0) if int32((*Sqlite3_value)(unsafe.Pointer(pNew)).Fflags)&(MEM_Str|MEM_Blob) != 0 { *(*U16)(unsafe.Pointer(pNew + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static | MEM_Dyn)) *(*U16)(unsafe.Pointer(pNew + 8)) |= U16(MEM_Ephem) if Xsqlite3VdbeMemMakeWriteable(tls, pNew) != SQLITE_OK { Xsqlite3ValueFree(tls, pNew) pNew = uintptr(0) } } return pNew } // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85419:17: */ Xsqlite3ValueFree(tls, pOld) } // *************************** sqlite3_result_ ******************************* // // The following routines are used by user-defined functions to specify // the function result. // // The setStrOrError() function calls sqlite3VdbeMemSetStr() to store the // result as a string or blob. Appropriate errors are set if the string/blob // is too big or if an OOM occurs. // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85435:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { Xsqlite3_result_error_toobig(tls, pCtx) } else { // The only errors possible from sqlite3VdbeMemSetStr are // SQLITE_TOOBIG and SQLITE_NOMEM Xsqlite3_result_error_nomem(tls, pCtx) } } } func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85454:12: */ if xDel == uintptr(0) { // noop } else if xDel == libc.UintptrFromInt32(-1) { // noop } else { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, p) } Xsqlite3_result_error_toobig(tls, pCtx) return SQLITE_TOOBIG } func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85470:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85480:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) } else { setResultStrOrError(tls, pCtx, z, int32(n), uint8(0), xDel) } } func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85494:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85498:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85504:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85510:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85514:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85518:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85522:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85534:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85540:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85549:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) } if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) } else { setResultStrOrError(tls, pCtx, z, int32(n), enc, xDel) } } func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85566:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85575:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85584:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85594:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85598:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85602:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 136))) { return SQLITE_TOOBIG } Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, int32(n)) return SQLITE_OK } func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85615:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode } return -1 }() if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Null != 0 { Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, Xsqlite3ErrStr(tls, errCode), int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } } // Force an SQLITE_TOOBIG error. func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85627:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+6637, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } // An SQLITE_NOMEM error. func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85635:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM Xsqlite3OomFault(tls, (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fdb) } // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85647:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) |= U16(MEM_IntReal) } } // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85661:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 { var nEntry int32 Xsqlite3BtreeEnter(tls, pBt) nEntry = Xsqlite3PagerWalCallback(tls, Xsqlite3BtreePager(tls, pBt)) Xsqlite3BtreeLeave(tls, pBt) if nEntry > 0 && (*Sqlite3)(unsafe.Pointer(db)).FxWalCallback != 0 && rc == SQLITE_OK { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxWalCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpWalArg, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, nEntry) } } } return rc } // Execute the statement pStmt, either until a row of data is ready, the // statement is completely executed or an error occurs. // // This routine implements the bulk of the logic behind the sqlite_step() // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85691:12: */ var db uintptr var rc int32 if !((*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN)) { goto __1 } // We used to require that sqlite3_reset() be called before retrying // sqlite3_step() after any error or after SQLITE_DONE. But beginning // with version 3.7.0, we changed this so that sqlite3_reset() would // be called automatically instead of throwing the SQLITE_MISUSE error. // This "automatic-reset" change is not technically an incompatibility, // since any application that receives an SQLITE_MISUSE is broken by // definition. // // Nevertheless, some published applications that were originally written // for version 3.6.23 or earlier do in fact depend on SQLITE_MISUSE // returns, and those were broken by the automatic-reset change. As a // a work-around, the SQLITE_OMIT_AUTORESET compile-time restores the // legacy behavior of returning SQLITE_MISUSE for cases where the // previous sqlite3_step() returned something other than a SQLITE_LOCKED // or SQLITE_BUSY error. Xsqlite3_reset(tls, p) __1: ; // Check that malloc() has not failed. If it has, return early. db = (*Vdbe)(unsafe.Pointer(p)).Fdb if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __2 } (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM return SQLITE_NOMEM __2: ; if !((*Vdbe)(unsafe.Pointer(p)).Fpc < 0 && Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0)) != 0) { goto __3 } (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_SCHEMA rc = SQLITE_ERROR if !(int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { goto __4 } // If this statement was prepared using saved SQL and an // error has occurred, then return the error code in p->rc to the // caller. Set the error code in the database handle to the same value. rc = Xsqlite3VdbeTransferError(tls, p) __4: ; goto end_of_step __3: ; if !((*Vdbe)(unsafe.Pointer(p)).Fpc < 0) { goto __5 } // If there are no other statements currently running, then // reset the interrupt flag. This prevents a call to sqlite3_interrupt // from interrupting a statement that has not yet started. if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive == 0) { goto __6 } libc.AtomicStoreNInt32(db+432, int32(0), 0) __6: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&(SQLITE_TRACE_PROFILE|SQLITE_TRACE_XPROFILE) != 0 && !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && (*Vdbe)(unsafe.Pointer(p)).FzSql != 0) { goto __7 } Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, p+192) goto __8 __7: ; __8: ; (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive++ if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x80>>7) == 0) { goto __9 } (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite++ __9: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x100>>8)) != 0) { goto __10 } (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead++ __10: ; (*Vdbe)(unsafe.Pointer(p)).Fpc = 0 __5: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0xc>>2)) != 0) { goto __11 } rc = Xsqlite3VdbeList(tls, p) goto __12 __11: (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec++ rc = Xsqlite3VdbeExec(tls, p) (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec-- __12: ; if !(rc != SQLITE_ROW) { goto __13 } // If the statement completed successfully, invoke the profile callback if !((*Vdbe)(unsafe.Pointer(p)).FstartTime > int64(0)) { goto __14 } invokeProfileCallback(tls, db, p) __14: ; if !(rc == SQLITE_DONE && (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { goto __15 } (*Vdbe)(unsafe.Pointer(p)).Frc = doWalCallbacks(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc != SQLITE_OK) { goto __17 } rc = SQLITE_ERROR __17: ; goto __16 __15: if !(rc != SQLITE_DONE && int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { goto __18 } // If this statement was prepared using saved SQL and an // error has occurred, then return the error code in p->rc to the // caller. Set the error code in the database handle to the same value. rc = Xsqlite3VdbeTransferError(tls, p) __18: ; __16: ; __13: ; (*Sqlite3)(unsafe.Pointer(db)).FerrCode = rc if !(SQLITE_NOMEM == Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).Frc)) { goto __19 } (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM if !(int32((*Vdbe)(unsafe.Pointer(p)).FprepFlags)&SQLITE_PREPARE_SAVESQL != 0) { goto __20 } rc = (*Vdbe)(unsafe.Pointer(p)).Frc __20: ; __19: ; end_of_step: // There are only a limited number of result codes allowed from the // statements prepared using the legacy sqlite3_prepare() interface ; return rc & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85825:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { return Xsqlite3MisuseError(tls, 85832) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Vdbe)(unsafe.Pointer(v)).FdoingRerun = U8(0) for libc.AssignInt32(&rc, sqlite3Step(tls, v)) == SQLITE_SCHEMA && libc.PostIncInt32(&cnt, 1) < SQLITE_MAX_SCHEMA_RETRY { var savedPc int32 = (*Vdbe)(unsafe.Pointer(v)).Fpc rc = Xsqlite3Reprepare(tls, v) if rc != SQLITE_OK { // This case occurs after failing to recompile an sql statement. // The error message from the SQL compiler has already been loaded // into the database handle. This block copies the error message // from the database handle into the statement and sets the statement // program counter to 0 to ensure that when the statement is // finalized or reset the parser error message is available via // sqlite3_errmsg() and sqlite3_errcode(). var zErr uintptr = Xsqlite3_value_text(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(v)).FzErrMsg) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { (*Vdbe)(unsafe.Pointer(v)).FzErrMsg = Xsqlite3DbStrDup(tls, db, zErr) (*Vdbe)(unsafe.Pointer(v)).Frc = libc.AssignInt32(&rc, Xsqlite3ApiExit(tls, db, rc)) } else { (*Vdbe)(unsafe.Pointer(v)).FzErrMsg = uintptr(0) (*Vdbe)(unsafe.Pointer(v)).Frc = libc.AssignInt32(&rc, SQLITE_NOMEM) } break } Xsqlite3_reset(tls, pStmt) if savedPc >= 0 { (*Vdbe)(unsafe.Pointer(v)).FdoingRerun = U8(1) } } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // Extract the user data from a sqlite3_context structure and return a // pointer to it. func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85874:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } // Extract the user data from a sqlite3_context structure and return a // pointer to it. // // IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface // returns a copy of the pointer to the database connection (the 1st // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85889:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } // If this routine is invoked from within an xColumn method of a virtual // table, then it returns true if and only if the the call is during an // UPDATE operation and the value of the column will not be modified // by the UPDATE. // // If this routine is called from any context other than within the // xColumn method of a virtual table, then the return value is meaningless // and arbitrary. // // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85908:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } // Implementation of sqlite3_vtab_in_first() (if bNext==0) and // sqlite3_vtab_in_next() (if bNext!=0). func valueFromValueList(tls *libc.TLS, pVal uintptr, ppOut uintptr, bNext int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85917:12: */ bp := tls.Alloc(68) defer tls.Free(68) var rc int32 var pRhs uintptr *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) if pVal == uintptr(0) { return SQLITE_MISUSE } pRhs = Xsqlite3_value_pointer(tls, pVal, ts+6660) if pRhs == uintptr(0) { return SQLITE_MISUSE } if bNext != 0 { rc = Xsqlite3BtreeNext(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, 0) } else { *(*int32)(unsafe.Pointer(bp /* dummy */)) = 0 rc = Xsqlite3BtreeFirst(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, bp) if Xsqlite3BtreeEof(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr) != 0 { rc = SQLITE_DONE } } if rc == SQLITE_OK { var sz U32 // Size of current row in bytes // var sMem Mem at bp+8, 56 // Raw content of current row libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Mem{}))) sz = Xsqlite3BtreePayloadSize(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, (*ValueList)(unsafe.Pointer(pRhs)).FpCsr, uint32(int32(sz)), bp+8) if rc == SQLITE_OK { var zBuf uintptr = (*Mem)(unsafe.Pointer(bp + 8 /* &sMem */)).Fz // var iSerial U32 at bp+64, 4 var pOut uintptr = (*ValueList)(unsafe.Pointer(pRhs)).FpOut var iOff int32 = 1 + int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(zBuf + 1))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(bp + 64)) = U32(*(*U8)(unsafe.Pointer(zBuf + 1))); return 1 }()) } return Xsqlite3GetVarint32(tls, zBuf+1, bp+64) }()) Xsqlite3VdbeSerialGet(tls, zBuf+uintptr(iOff), *(*U32)(unsafe.Pointer(bp + 64 /* iSerial */)), pOut) (*Sqlite3_value)(unsafe.Pointer(pOut)).Fenc = (*Sqlite3)(unsafe.Pointer((*Sqlite3_value)(unsafe.Pointer(pOut)).Fdb)).Fenc if int32((*Sqlite3_value)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0 { rc = SQLITE_NOMEM } else { *(*uintptr)(unsafe.Pointer(ppOut)) = pOut } } Xsqlite3VdbeMemRelease(tls, bp+8) } return rc } // Set the iterator value pVal to point to the first value in the set. // Set (*ppOut) to point to this value before returning. func Xsqlite3_vtab_in_first(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85965:16: */ return valueFromValueList(tls, pVal, ppOut, 0) } // Set the iterator value pVal to point to the next value in the set. // Set (*ppOut) to point to this value before returning. func Xsqlite3_vtab_in_next(tls *libc.TLS, pVal uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85973:16: */ return valueFromValueList(tls, pVal, ppOut, 1) } // Return the current time for a statement. If the current time // is requested more than once within the same run of a single prepared // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:85984:30: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 *(*Sqlite3_int64)(unsafe.Pointer(bp /* iTime */)) = int64(0) var piTime uintptr if (*Sqlite3_context)(unsafe.Pointer(p)).FpVdbe != uintptr(0) { piTime = (*Sqlite3_context)(unsafe.Pointer(p)).FpVdbe + 80 } else { piTime = bp /* &iTime */ } if *(*Sqlite3_int64)(unsafe.Pointer(piTime)) == int64(0) { rc = Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb)).FpVfs, piTime) if rc != 0 { *(*Sqlite3_int64)(unsafe.Pointer(piTime)) = int64(0) } } return *(*Sqlite3_int64)(unsafe.Pointer(piTime)) } // Create a new aggregate context for p and return a pointer to // its pMem->z element. func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86004:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { Xsqlite3VdbeMemSetNull(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fz = uintptr(0) } else { Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Agg) *(*uintptr)(unsafe.Pointer(pMem)) = (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc if (*Mem)(unsafe.Pointer(pMem)).Fz != 0 { libc.Xmemset(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, 0, uint64(nByte)) } } return (*Mem)(unsafe.Pointer(pMem)).Fz } // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86026:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) } else { return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fz } return uintptr(0) } // Return the auxiliary data pointer, if any, for the iArg'th argument to // the user-function defined by pCtx. // // The left-most argument is 0. // // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86047:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { return uintptr(0) } for pAuxData = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe)).FpAuxData; pAuxData != 0; pAuxData = (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux { if (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg == iArg && ((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp == (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp || iArg < 0) { return (*AuxData)(unsafe.Pointer(pAuxData)).FpAux } } return uintptr(0) } // Set the auxiliary data pointer and delete function, for the iArg'th // argument to the user-function defined by pCtx. Any previous value is // deleted by calling the delete function specified when it was set. // // The left-most argument is 0. // // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86075:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe if !(pVdbe == uintptr(0)) { goto __1 } goto failed __1: ; pAuxData = (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData __2: if !(pAuxData != 0) { goto __4 } if !((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg == iArg && ((*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp == (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp || iArg < 0)) { goto __5 } goto __4 __5: ; goto __3 __3: pAuxData = (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux goto __2 goto __4 __4: ; if !(pAuxData == uintptr(0)) { goto __6 } pAuxData = Xsqlite3DbMallocZero(tls, (*Vdbe)(unsafe.Pointer(pVdbe)).Fdb, uint64(unsafe.Sizeof(AuxData{}))) if !!(pAuxData != 0) { goto __8 } goto failed __8: ; (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxOp = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp (*AuxData)(unsafe.Pointer(pAuxData)).FiAuxArg = iArg (*AuxData)(unsafe.Pointer(pAuxData)).FpNextAux = (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData (*Vdbe)(unsafe.Pointer(pVdbe)).FpAuxData = pAuxData if !((*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError == 0) { goto __9 } (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = -1 __9: ; goto __7 __6: if !((*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux != 0) { goto __10 } (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux})).f(tls, (*AuxData)(unsafe.Pointer(pAuxData)).FpAux) __10: ; __7: ; (*AuxData)(unsafe.Pointer(pAuxData)).FpAux = pAux (*AuxData)(unsafe.Pointer(pAuxData)).FxDeleteAux = xDelete return failed: if !(xDelete != 0) { goto __11 } (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pAux) __11: } // Return the number of times the Step function of an aggregate has been // called. // // This function is deprecated. Do not use it for new code. It is // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86128:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86137:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) } return 0 } // Return the number of values available from the current row of the // currently executing statement pStmt. func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86146:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 } return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) } // Return a pointer to static memory containing an SQL NULL value. func columnNullValue(tls *libc.TLS) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86155:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86165:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86195:12: */ var pVm uintptr var pOut uintptr pVm = pStmt if pVm == uintptr(0) { return columnNullValue(tls) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pVm)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet != uintptr(0) && i < int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) && i >= 0 { pOut = (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet + uintptr(i)*56 } else { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(pVm)).Fdb, SQLITE_RANGE) pOut = columnNullValue(tls) } return pOut } // This function is called after invoking an sqlite3_value_XXX function on a // column value (i.e. a value returned by evaluating an SQL expression in the // select list of a SELECT statement) that may cause a malloc() failure. If // malloc() has failed, the threads mallocFailed flag is cleared and the result // code of statement pStmt set to SQLITE_NOMEM. // // Specifically, this is called from within: // // sqlite3_column_int() // sqlite3_column_int64() // sqlite3_column_text() // sqlite3_column_text16() // sqlite3_column_real() // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86230:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR // and _finalize() will return NOMEM. var p uintptr = pStmt if p != 0 { (*Vdbe)(unsafe.Pointer(p)).Frc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).Frc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } } // *************************** sqlite3_column_ ******************************* // // The following routines are used to access elements of the current row // in the result set. func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86250:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might // need to call malloc() to expand the result of a zeroblob() // expression. columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86260:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86265:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86270:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86275:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86280:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86285:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86290:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Ephem) } columnMallocFailure(tls, pStmt) return pOut } func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86300:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86306:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType } // Convert the N-th element of pStmt->pColName[] into a string using // xFunc() then return that string. If N is out of range, return 0. // // There are up to 5 names for each column. useType determines which // name is returned. Here are the names: // // 0 The column name as it should be displayed for output // 1 The datatype name for the column // 2 The name of the database that the column derives from // 3 The name of the table that the column derives from // 4 The name of the table column that the result column derives from // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86328:19: */ var ret uintptr var p uintptr var n int32 var db uintptr ret = uintptr(0) p = pStmt db = (*Vdbe)(unsafe.Pointer(p)).Fdb n = Xsqlite3_column_count(tls, pStmt) if N < n && N >= 0 { N = N + useType*n Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if useUtf16 != 0 { ret = Xsqlite3_value_text16(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName+uintptr(N)*56) } else { ret = Xsqlite3_value_text(tls, (*Vdbe)(unsafe.Pointer(p)).FaColName+uintptr(N)*56) } // A malloc may have failed inside of the _text() call. If this // is the case, clear the mallocFailed flag and return NULL. if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3OomClear(tls, db) ret = uintptr(0) } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } return ret } // Return the name of the Nth column of the result set returned by SQL // statement pStmt. func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86377:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86381:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } // Constraint: If you have ENABLE_COLUMN_METADATA then you must // not define OMIT_DECLTYPE. // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86400:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86404:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86416:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86420:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86430:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86434:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86444:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86448:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } // ****************************** sqlite3_bind_ *************************** // // // Routines used to attach values to wildcards in a compiled SQL statement. // Unbind the value bound to variable i in virtual machine p. This is the // the same as binding a NULL value to the column. If the "i" parameter is // out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK. // // A successful evaluation of this routine acquires the mutex on p. // the mutex is released if any kind of error occurs. // // The error code stored in database p->db is overwritten with the return // value in any case. func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86470:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { return Xsqlite3MisuseError(tls, 86473) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, ts+6670, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) return Xsqlite3MisuseError(tls, 86481) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) return SQLITE_RANGE } i-- pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i)*56 Xsqlite3VdbeMemRelease(tls, pVar) (*Mem)(unsafe.Pointer(pVar)).Fflags = U16(MEM_Null) (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FerrCode = SQLITE_OK // If the bit corresponding to this variable in Vdbe.expmask is set, then // binding a new value to this variable invalidates the current query plan. // // IMPLEMENTATION-OF: R-57496-20354 If the specific value bound to a host // parameter in the WHERE clause might influence the choice of query plan // for a statement, then the statement will be automatically recompiled, // as if there had been a schema change, on the first sqlite3_step() call // following any change to the bindings of that parameter. if (*Vdbe)(unsafe.Pointer(p)).Fexpmask != U32(0) && (*Vdbe)(unsafe.Pointer(p)).Fexpmask&func() uint32 { if i >= 31 { return 0x80000000 } return U32(U32(1)) << i }() != U32(0) { libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) } return SQLITE_OK } // Bind a text or BLOB value. func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86513:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { if zData != uintptr(0) { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(i-1)*56 rc = Xsqlite3VdbeMemSetStr(tls, pVar, zData, nData, encoding, xDel) if rc == SQLITE_OK && int32(encoding) != 0 { rc = Xsqlite3VdbeChangeEncoding(tls, pVar, int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fenc)) } if rc != 0 { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) rc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) } } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } else if xDel != uintptr(0) && xDel != libc.UintptrFromInt32(-1) { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDel})).f(tls, zData) } return rc } // Bind a blob value to an SQL statement variable. func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86549:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86561:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86571:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { Xsqlite3VdbeMemSetDouble(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, rValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } return rc } func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86581:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86584:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { Xsqlite3VdbeMemSetInt64(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, iValue) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } return rc } func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86594:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } return rc } func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86603:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { Xsqlite3VdbeMemSetPointer(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, pPtr, zPTtype, xDestructor) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } else if xDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDestructor})).f(tls, pPtr) } return rc } func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86621:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86630:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) } return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86643:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86653:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: { rc = Xsqlite3_bind_int64(tls, pStmt, i, *(*I64)(unsafe.Pointer(pValue))) break } case SQLITE_FLOAT: { rc = Xsqlite3_bind_double(tls, pStmt, i, func() float64 { if int32((*Sqlite3_value)(unsafe.Pointer(pValue)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pValue)) } return float64(*(*I64)(unsafe.Pointer(pValue))) }()) break } case SQLITE_BLOB: { if int32((*Sqlite3_value)(unsafe.Pointer(pValue)).Fflags)&MEM_Zero != 0 { rc = Xsqlite3_bind_zeroblob(tls, pStmt, i, *(*int32)(unsafe.Pointer(pValue))) } else { rc = Xsqlite3_bind_blob(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fn, libc.UintptrFromInt32(-1)) } break } case SQLITE_TEXT: { rc = bindText(tls, pStmt, i, (*Sqlite3_value)(unsafe.Pointer(pValue)).Fz, int64((*Sqlite3_value)(unsafe.Pointer(pValue)).Fn), libc.UintptrFromInt32(-1), (*Sqlite3_value)(unsafe.Pointer(pValue)).Fenc) break } default: { rc = Xsqlite3_bind_null(tls, pStmt, i) break } } return rc } func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86687:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) if rc == SQLITE_OK { Xsqlite3VdbeMemSetZeroBlob(tls, (*Vdbe)(unsafe.Pointer(p)).FaVar+uintptr(i-1)*56, n) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } return rc } func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86701:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if n > U64(*(*int32)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb + 136))) { rc = SQLITE_TOOBIG } else { rc = Xsqlite3_bind_zeroblob(tls, pStmt, i, int32(n)) } rc = Xsqlite3ApiExit(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) return rc } // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86720:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) } return 0 } // Return the name of a wildcard parameter. Return NULL if the index // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86731:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) } return Xsqlite3VListNumToName(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, i) } // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86742:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86746:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86753:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pTo)).Fdb)).Fmutex) for i = 0; i < int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar); i++ { Xsqlite3VdbeMemMove(tls, (*Vdbe)(unsafe.Pointer(pTo)).FaVar+uintptr(i)*56, (*Vdbe)(unsafe.Pointer(pFrom)).FaVar+uintptr(i)*56) } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(pTo)).Fdb)).Fmutex) return SQLITE_OK } // Deprecated external interface. Internal/core SQLite code // should call sqlite3TransferBindings. // // It is misuse to call this routine with statements from different // database connections. But as this is a deprecated interface, we // will not bother to check for that condition. // // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86780:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { return SQLITE_ERROR } if (*Vdbe)(unsafe.Pointer(pTo)).Fexpmask != 0 { libc.SetBitFieldPtr16Uint32(pTo+208, Bft(1), 0, 0x3) } if (*Vdbe)(unsafe.Pointer(pFrom)).Fexpmask != 0 { libc.SetBitFieldPtr16Uint32(pFrom+208, Bft(1), 0, 0x3) } return Xsqlite3TransferBindings(tls, pFromStmt, pToStmt) } // Return the sqlite3* database handle to which the prepared statement given // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86804:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } return uintptr(0) } // Return true if the prepared statement is guaranteed to not modify the // database. func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86812:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0x80 >> 7) } return 1 } // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86820:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 208)) & 0xc >> 2) } return 0 } // Return true if the prepared statement is in need of being reset. func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86827:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } // Return a pointer to the next prepared statement after pStmt associated // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86838:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { pNext = (*Sqlite3)(unsafe.Pointer(pDb)).FpVdbe } else { pNext = (*Vdbe)(unsafe.Pointer(pStmt)).FpNext } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) return pNext } // Return the value of a status counter for a prepared statement func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86859:16: */ bp := tls.Alloc(4) defer tls.Free(4) var pVdbe uintptr = pStmt // var v U32 at bp, 4 if op == SQLITE_STMTSTATUS_MEMUSED { var db uintptr = (*Vdbe)(unsafe.Pointer(pVdbe)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) *(*U32)(unsafe.Pointer(bp /* v */)) = U32(0) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = bp /* &v */ Xsqlite3VdbeClearObject(tls, db, pVdbe) Xsqlite3DbFree(tls, db, pVdbe) (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed = uintptr(0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } else { *(*U32)(unsafe.Pointer(bp /* v */)) = *(*U32)(unsafe.Pointer(pVdbe + 220 + uintptr(op)*4)) if resetFlag != 0 { *(*U32)(unsafe.Pointer(pVdbe + 220 + uintptr(op)*4)) = U32(0) } } return int32(*(*U32)(unsafe.Pointer(bp /* v */))) } // Return the SQL associated with a prepared statement func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86889:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql } return uintptr(0) } // Return the SQL associated with a prepared statement with // bound parameters expanded. Space to hold the returned string is // obtained from sqlite3_malloc(). The caller is responsible for // freeing the returned string by passing it to sqlite3_free(). // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86903:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) z = Xsqlite3VdbeExpandSql(tls, p, zSql) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) } return z } // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86941:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) if pRet != 0 { libc.Xmemset(tls, (*UnpackedRecord)(unsafe.Pointer(pRet)).FaMem, 0, uint64(unsafe.Sizeof(Mem{}))*uint64(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, nKey, pKey, pRet) } return pRet } // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:86960:16: */ var p uintptr var pMem uintptr var rc int32 var nRec U32 var aRec uintptr p = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate rc = SQLITE_OK // Test that this call is being made from within an SQLITE_DELETE or // SQLITE_UPDATE pre-update callback, and that iIdx is within range. if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } rc = Xsqlite3MisuseError(tls, 86968) goto preupdate_old_out __1: ; if !((*PreUpdate)(unsafe.Pointer(p)).FpPk != 0) { goto __2 } iIdx = int32(Xsqlite3TableColumnToIndex(tls, (*PreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) __2: ; if !(iIdx >= int32((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField) || iIdx < 0) { goto __3 } rc = SQLITE_RANGE goto preupdate_old_out __3: ; // If the old.* record has not yet been loaded into memory, do so now. if !((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked == uintptr(0)) { goto __4 } nRec = Xsqlite3BtreePayloadSize(tls, *(*uintptr)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr + 48))) aRec = Xsqlite3DbMallocRaw(tls, db, uint64(nRec)) if !!(aRec != 0) { goto __5 } goto preupdate_old_out __5: ; rc = Xsqlite3BtreePayload(tls, *(*uintptr)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr + 48)), uint32(0), nRec, aRec) if !(rc == SQLITE_OK) { goto __6 } (*PreUpdate)(unsafe.Pointer(p)).FpUnpacked = vdbeUnpackRecord(tls, p+32, int32(nRec), aRec) if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked) != 0) { goto __7 } rc = SQLITE_NOMEM __7: ; __6: ; if !(rc != SQLITE_OK) { goto __8 } Xsqlite3DbFree(tls, db, aRec) goto preupdate_old_out __8: ; (*PreUpdate)(unsafe.Pointer(p)).FaRecord = aRec __4: ; pMem = libc.AssignPtrUintptr(ppValue, (*UnpackedRecord)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked)).FaMem+uintptr(iIdx)*56) if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { goto __9 } Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey1) goto __10 __9: if !(iIdx >= int32((*UnpackedRecord)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpUnpacked)).FnField)) { goto __11 } *(*uintptr)(unsafe.Pointer(ppValue)) = columnNullValue(tls) goto __12 __11: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FaCol+uintptr(iIdx)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __13 } if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { goto __14 } Xsqlite3VdbeMemRealify(tls, pMem) __14: ; __13: ; __12: ; __10: ; preupdate_old_out: Xsqlite3Error(tls, db, rc) return Xsqlite3ApiExit(tls, db, rc) } // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87024:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { return int32((*PreUpdate)(unsafe.Pointer(p)).Fkeyinfo.FnKeyField) } return 0 }() } // This function is designed to be called from within a pre-update callback // only. It returns zero if the change that caused the callback was made // immediately by a user SQL statement. Or, if the change was made by a // trigger program, it returns the number of trigger programs currently // on the stack (1 for a top-level trigger, 2 for a trigger fired by a // top-level trigger etc.). // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87042:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { return (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FnFrame } return 0 }() } // This function is designed to be called from within a pre-update callback // only. func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87053:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { return (*PreUpdate)(unsafe.Pointer(p)).FiBlobWrite } return -1 }() } // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87064:16: */ var p uintptr var rc int32 var pMem uintptr var pData uintptr // For an INSERT, memory cell p->iNewReg contains the serialized record // that is being inserted. Deserialize it. var pUnpack uintptr p = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate rc = SQLITE_OK if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } rc = Xsqlite3MisuseError(tls, 87070) goto preupdate_new_out __1: ; if !((*PreUpdate)(unsafe.Pointer(p)).FpPk != 0 && (*PreUpdate)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE) { goto __2 } iIdx = int32(Xsqlite3TableColumnToIndex(tls, (*PreUpdate)(unsafe.Pointer(p)).FpPk, int16(iIdx))) __2: ; if !(iIdx >= int32((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField) || iIdx < 0) { goto __3 } rc = SQLITE_RANGE goto preupdate_new_out __3: ; if !((*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __4 } // For an INSERT, memory cell p->iNewReg contains the serialized record // that is being inserted. Deserialize it. pUnpack = (*PreUpdate)(unsafe.Pointer(p)).FpNewUnpacked if !!(pUnpack != 0) { goto __6 } pData = (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FaMem + uintptr((*PreUpdate)(unsafe.Pointer(p)).FiNewReg)*56 rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pData) } return 0 }() if !(rc != SQLITE_OK) { goto __7 } goto preupdate_new_out __7: ; pUnpack = vdbeUnpackRecord(tls, p+32, (*Mem)(unsafe.Pointer(pData)).Fn, (*Mem)(unsafe.Pointer(pData)).Fz) if !!(pUnpack != 0) { goto __8 } rc = SQLITE_NOMEM goto preupdate_new_out __8: ; (*PreUpdate)(unsafe.Pointer(p)).FpNewUnpacked = pUnpack __6: ; pMem = (*UnpackedRecord)(unsafe.Pointer(pUnpack)).FaMem + uintptr(iIdx)*56 if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { goto __9 } Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey2) goto __10 __9: if !(iIdx >= int32((*UnpackedRecord)(unsafe.Pointer(pUnpack)).FnField)) { goto __11 } pMem = columnNullValue(tls) __11: ; __10: ; goto __5 __4: // For an UPDATE, memory cell (p->iNewReg+1+iIdx) contains the required // value. Make a copy of the cell contents and return a pointer to it. // It is not safe to return a pointer to the memory cell itself as the // caller may modify the value text encoding. ; if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FaNew) != 0) { goto __12 } (*PreUpdate)(unsafe.Pointer(p)).FaNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))*uint64((*VdbeCursor)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpCsr)).FnField)) if !!(int32((*PreUpdate)(unsafe.Pointer(p)).FaNew) != 0) { goto __13 } rc = SQLITE_NOMEM goto preupdate_new_out __13: ; __12: ; pMem = (*PreUpdate)(unsafe.Pointer(p)).FaNew + uintptr(iIdx)*56 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) == 0) { goto __14 } if !(iIdx == int32((*Table)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).FpTab)).FiPKey)) { goto __15 } Xsqlite3VdbeMemSetInt64(tls, pMem, (*PreUpdate)(unsafe.Pointer(p)).FiKey2) goto __16 __15: rc = Xsqlite3VdbeMemCopy(tls, pMem, (*Vdbe)(unsafe.Pointer((*PreUpdate)(unsafe.Pointer(p)).Fv)).FaMem+uintptr((*PreUpdate)(unsafe.Pointer(p)).FiNewReg+1+iIdx)*56) if !(rc != SQLITE_OK) { goto __17 } goto preupdate_new_out __17: ; __16: ; __14: ; __5: ; *(*uintptr)(unsafe.Pointer(ppValue)) = pMem preupdate_new_out: Xsqlite3Error(tls, db, rc) return Xsqlite3ApiExit(tls, db, rc) } //************* End of vdbeapi.c ******************************************** //************* Begin file vdbetrace.c ************************************** // 2009 November 25 // // 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 code used to insert the values of host parameters // (aka "wildcards") into the SQL text output by sqlite3_trace(). // // The Vdbe parse-tree explainer is also found here. // #include "sqliteInt.h" // #include "vdbeInt.h" // zSql is a zero-terminated string of UTF-8 SQL text. Return the number of // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87234:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var tokenType int32 at bp, 4 var nTotal int32 = 0 var n int32 *(*int32)(unsafe.Pointer(pnToken)) = 0 for *(*int8)(unsafe.Pointer(zSql)) != 0 { n = Xsqlite3GetToken(tls, zSql, bp) if *(*int32)(unsafe.Pointer(bp)) == TK_VARIABLE { *(*int32)(unsafe.Pointer(pnToken)) = n break } nTotal = nTotal + n zSql += uintptr(n) } return nTotal } // This function returns a pointer to a nul-terminated string in memory // obtained from sqlite3DbMalloc(). If sqlite3.nVdbeExec is 1, then the // string contains a copy of zRawSql but with host parameters expanded to // their current bindings. Or, if sqlite3.nVdbeExec is greater than 1, // then the returned string holds a copy of zRawSql with "-- " prepended // to each line of text. // // If the SQLITE_TRACE_SIZE_LIMIT macro is defined to an integer, then // then long strings and blobs are truncated to that many bytes. This // can be used to prevent unreasonably large trace strings when dealing // with large (multi-megabyte) strings and blobs. // // The calling function is responsible for making sure the memory returned // is eventually freed. // // ALGORITHM: Scan the input string looking for host parameters in any of // these forms: ?, ?N, $A, @A, :A. Take care to avoid text within // string literals, quoted identifier names, and comments. For text forms, // the host parameter index is found by scanning the prepared // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87277:21: */ bp := tls.Alloc(144) defer tls.Free(144) var db uintptr // The database connection *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = 0 // Index of a host parameter var nextIndex int32 = 1 // Index of next ? host parameter var n int32 // Length of a token prefix // var nToken int32 at bp+80, 4 // Length of the parameter token var i int32 // Loop counter var pVar uintptr // Value of a host parameter // var out StrAccum at bp+48, 32 // Accumulate the output here // var utf8 Mem at bp+88, 56 // Used to convert UTF16 into UTF8 for display db = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1 { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } Xsqlite3_str_append(tls, bp+48, ts+6710, 3) Xsqlite3_str_append(tls, bp+48, zStart, int32((int64(zRawSql)-int64(zStart))/1)) } } else if int32((*Vdbe)(unsafe.Pointer(p)).FnVar) == 0 { Xsqlite3_str_append(tls, bp+48, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) } else { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { n = findNextHostParameter(tls, zRawSql, bp+80) Xsqlite3_str_append(tls, bp+48, zRawSql, n) zRawSql += uintptr(n) if *(*int32)(unsafe.Pointer(bp + 80)) == 0 { break } if int32(*(*int8)(unsafe.Pointer(zRawSql))) == '?' { if *(*int32)(unsafe.Pointer(bp + 80)) > 1 { Xsqlite3GetInt32(tls, zRawSql+1, bp+84) } else { *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = nextIndex } } else { *(*int32)(unsafe.Pointer(bp + 84 /* idx */)) = Xsqlite3VdbeParameterIndex(tls, p, zRawSql, *(*int32)(unsafe.Pointer(bp + 80 /* nToken */))) } zRawSql += uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* nToken */))) nextIndex = func() int32 { if *(*int32)(unsafe.Pointer(bp + 84))+1 > nextIndex { return *(*int32)(unsafe.Pointer(bp + 84)) + 1 } return nextIndex }() pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 84))-1)*56 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { Xsqlite3_str_append(tls, bp+48, ts+1525, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { Xsqlite3_str_appendf(tls, bp+48, ts+1304, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Real != 0 { Xsqlite3_str_appendf(tls, bp+48, ts+6228, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 // Number of bytes of the string text to include in output var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc if int32(enc) != SQLITE_UTF8 { libc.Xmemset(tls, bp+88, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 88 /* &utf8 */)).Fdb = db Xsqlite3VdbeMemSetStr(tls, bp+88, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+88, SQLITE_UTF8) { (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FaccError = U8(SQLITE_NOMEM) (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FnAlloc = U32(0) } pVar = bp + 88 /* &utf8 */ } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn Xsqlite3_str_appendf(tls, bp+48, ts+6714, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { Xsqlite3VdbeMemRelease(tls, bp+88) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { Xsqlite3_str_appendf(tls, bp+48, ts+6721, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 // Number of bytes of the blob to include in output Xsqlite3_str_append(tls, bp+48, ts+6734, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { Xsqlite3_str_appendf(tls, bp+48, ts+6737, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } Xsqlite3_str_append(tls, bp+48, ts+6742, 1) } } } if (*StrAccum)(unsafe.Pointer(bp+48)).FaccError != 0 { Xsqlite3_str_reset(tls, bp+48) } return Xsqlite3StrAccumFinish(tls, bp+48) } //************* End of vdbetrace.c ****************************************** //************* Begin file vdbe.c ******************************************* // 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. // // // The code in this file implements the function that runs the // bytecode of a prepared statement. // // Various scripts scan this source file in order to generate HTML // documentation, headers files, or other derived files. The formatting // of the code in this file is, therefore, important. See other comments // in this file for details. If in doubt, do not deviate from existing // commenting and indentation practices when changing or adding code. // #include "sqliteInt.h" // #include "vdbeInt.h" // Invoke this macro on memory cells just prior to changing the // value of the cell. This macro verifies that shallow copies are // not misused. A shallow copy of a string or blob just copies a // pointer to the string or blob, not the content. If the original // is changed while the copy is still in use, the string or blob might // be changed out from under the copy. This macro verifies that nothing // like that ever happens. // The following global variable is incremented every time a cursor // moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes. The test // procedures use this information to make sure that indices are // working correctly. This variable has no function other than to // help verify the correct operation of the library. // When this global variable is positive, it gets decremented once before // each instruction in the VDBE. When it reaches zero, the u1.isInterrupted // field of the sqlite3 structure is set in order to simulate an interrupt. // // This facility is used for testing purposes only. It does not function // in an ordinary build. // The next global variable is incremented each type the OP_Sort opcode // is executed. The test procedures use this information to make sure that // sorting is occurring or not occurring at appropriate times. This variable // has no function other than to help verify the correct operation of the // library. // The next global variable records the size of the largest MEM_Blob // or MEM_Str that has been used by a VDBE opcode. The test procedures // use this information to make sure that the zero-blob functionality // is working correctly. This variable has no function other than to // help verify the correct operation of the library. // This macro evaluates to true if either the update hook or the preupdate // hook are enabled for database connect DB. // The next global variable is incremented each time the OP_Found opcode // is executed. This is used to test whether or not the foreign key // operation implemented using OP_FkIsZero is working. This variable // has no function other than to help verify the correct operation of the // library. // Test a register to see if it exceeds the current maximum blob size. // If it does, record the new maximum blob size. // Invoke the VDBE coverage callback, if that callback is defined. This // feature is used for test suite validation only and does not appear an // production builds. // // M is the type of branch. I is the direction taken for this instance of // the branch. // // M: 2 - two-way branch (I=0: fall-thru 1: jump ) // 3 - two-way + NULL (I=0: fall-thru 1: jump 2: NULL ) // 4 - OP_Jump (I=0: jump p1 1: jump p2 2: jump p3) // // In other words, if M is 2, then I is either 0 (for fall-through) or // 1 (for when the branch is taken). If M is 3, the I is 0 for an // ordinary fall-through, I is 1 if the branch was taken, and I is 2 // if the result of comparison is NULL. For M=3, I=2 the jump may or // may not be taken, depending on the SQLITE_JUMPIFNULL flags in p5. // When M is 4, that means that an OP_Jump is being run. I is 0, 1, or 2 // depending on if the operands are less than, equal, or greater than. // // iSrcLine is the source code line (from the __LINE__ macro) that // generated the VDBE instruction combined with flag bits. The source // code line number is in the lower 24 bits of iSrcLine and the upper // 8 bytes are flags. The lower three bits of the flags indicate // values for I that should never occur. For example, if the branch is // always taken, the flags should be 0x05 since the fall-through and // alternate branch are never taken. If a branch is never taken then // flags should be 0x06 since only the fall-through approach is allowed. // // Bit 0x08 of the flags indicates an OP_Jump opcode that is only // interested in equal or not-equal. In other words, I==0 and I==2 // should be treated as equivalent // // Since only a line number is retained, not the filename, this macro // only works for amalgamation builds. But that is ok, since these macros // should be no-ops except for special builds used to measure test coverage. // An ephemeral string value (signified by the MEM_Ephem flag) contains // a pointer to a dynamically allocated string where some other entity // is responsible for deallocating that string. Because the register // does not control the string, it might be deleted without the register // knowing it. // // This routine converts an ephemeral string into a dynamically allocated // string that the register itself controls. In other words, it // converts an MEM_Ephem string into a string with P.z==P.zMalloc. // Return true if the cursor was opened using the OP_OpenSorter opcode. // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, eCurType U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87640:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a // VdbeCursor structure for the following reasons: // // * Sometimes cursor numbers are used for a couple of different // purposes in a vdbe program. The different uses might require // different sized allocations. Memory cells provide growable // allocations. // // * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can // be freed lazily via the sqlite3_release_memory() API. This // minimizes the number of malloc calls made by the system. // // The memory cell for cursor 0 is aMem[0]. The rest are allocated from // the top of the register space. Cursor 1 is at Mem[p->nMem-1]. // Cursor 2 is at Mem[p->nMem-2]. And so forth. var pMem uintptr if iCur > 0 { pMem = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Vdbe)(unsafe.Pointer(p)).FnMem-iCur)*56 } else { pMem = (*Vdbe)(unsafe.Pointer(p)).FaMem } var nByte int32 var pCx uintptr = uintptr(0) nByte = int32((uint64(unsafe.Sizeof(VdbeCursor{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(2)*uint64(unsafe.Sizeof(U32(0)))*uint64(nField) + func() uint64 { if int32(eCurType) == CURTYPE_BTREE { return uint64(Xsqlite3BtreeCursorSize(tls)) } return uint64(0) }()) if *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) != 0 { //OPTIMIZATION-IF-FALSE Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8))) *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = uintptr(0) } // There used to be a call to sqlite3VdbeMemClearAndResize() to make sure // the pMem used to hold space for the cursor has enough storage available // in pMem->zMalloc. But for the special case of the aMem[] entries used // to hold cursors, it is faster to in-line the logic. if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < nByte { if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } (*Mem)(unsafe.Pointer(pMem)).Fz = libc.AssignPtrUintptr(pMem+24, Xsqlite3DbMallocRaw(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, uint64(nByte))) if (*Mem)(unsafe.Pointer(pMem)).FzMalloc == uintptr(0) { (*Mem)(unsafe.Pointer(pMem)).FszMalloc = 0 return uintptr(0) } (*Mem)(unsafe.Pointer(pMem)).FszMalloc = nByte } *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr(iCur)*8)) = libc.AssignUintptr(&pCx, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) libc.Xmemset(tls, pCx, 0, uint64(uintptr(0)+40)) (*VdbeCursor)(unsafe.Pointer(pCx)).FeCurType = eCurType (*VdbeCursor)(unsafe.Pointer(pCx)).FnField = I16(nField) (*VdbeCursor)(unsafe.Pointer(pCx)).FaOffset = pCx + 112 + uintptr(nField)*4 if int32(eCurType) == CURTYPE_BTREE { *(*uintptr)(unsafe.Pointer(pCx + 48)) = (*Mem)(unsafe.Pointer(pMem)).Fz + uintptr((uint64(unsafe.Sizeof(VdbeCursor{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))+uint64(2)*uint64(unsafe.Sizeof(U32(0)))*uint64(nField)) Xsqlite3BtreeCursorZero(tls, *(*uintptr)(unsafe.Pointer(pCx + 48))) } return pCx } // The string in pRec is known to look like an integer and to have a // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87716:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue return 1 } return libc.Bool32(0 == Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, piValue, (*Mem)(unsafe.Pointer(pRec)).Fn, (*Mem)(unsafe.Pointer(pRec)).Fenc)) } // Try to convert a value into a numeric representation if we can // do so without loss of information. In other words, if the string // looks like a number, convert it into a number. If it does not // look like a number, leave it alone. // // If the bTryForInt flag is true, then extra effort is made to give // an integer representation. Strings that look like floating point // values but which have no fractional component (example: '48.00') // will have a MEM_Int representation when bTryForInt is true. // // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87740:13: */ bp := tls.Alloc(8) defer tls.Free(8) // var rValue float64 at bp, 8 var enc U8 = (*Mem)(unsafe.Pointer(pRec)).Fenc var rc int32 rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, bp, (*Mem)(unsafe.Pointer(pRec)).Fn, enc) if rc <= 0 { return } if rc == 1 && alsoAnInt(tls, pRec, *(*float64)(unsafe.Pointer(bp)), pRec) != 0 { *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Int) } else { *(*float64)(unsafe.Pointer(pRec)) = *(*float64)(unsafe.Pointer(bp /* rValue */)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) if bTryForInt != 0 { Xsqlite3VdbeIntegerAffinity(tls, pRec) } } // TEXT->NUMERIC is many->one. Hence, it is important to invalidate the // string representation after computing a numeric equivalent, because the // string representation might not be the canonical representation for the // numeric value. Ticket [343634942dd54ab57b7024] 2018-01-31. *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Str)) } // Processing is determine by the affinity parameter: // // SQLITE_AFF_INTEGER: // SQLITE_AFF_REAL: // SQLITE_AFF_NUMERIC: // Try to convert pRec to an integer representation or a // floating-point representation if an integer representation // is not possible. Note that the integer representation is // always preferred, even if the affinity is REAL, because // an integer representation is more space efficient on disk. // // SQLITE_AFF_TEXT: // Convert pRec to a text representation. // // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87780:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real == 0 { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0 { applyNumericAffinity(tls, pRec, 1) } } else { Xsqlite3VdbeIntegerAffinity(tls, pRec) } } } else if int32(affinity) == SQLITE_AFF_TEXT { // Only attempt the conversion to TEXT if there is an integer or real // representation (blob and NULL do not get converted) but no string // representation. It would be harmless to repeat the conversion if // there is already a string rep, but it is pointless to waste those // CPU cycles. if 0 == int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str { //OPTIMIZATION-IF-FALSE if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Real|MEM_Int|MEM_IntReal) != 0 { Xsqlite3VdbeMemStringify(tls, pRec, enc, uint8(1)) } } *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Real | MEM_Int | MEM_IntReal)) } } // Try to convert the type of a function argument or a result column // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87819:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal applyNumericAffinity(tls, pMem, 0) eType = Xsqlite3_value_type(tls, pVal) } return eType } // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87833:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } // pMem currently only holds a string type (or maybe a BLOB that we can // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87847:28: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var ix Sqlite3_int64 at bp, 8 if func() int32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pMem) } return 0 }() != 0 { *(*I64)(unsafe.Pointer(pMem)) = int64(0) return U16(MEM_Int) } rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) if rc <= 0 { if rc == 0 && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) <= 1 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) return U16(MEM_Int) } else { return U16(MEM_Real) } } else if rc == 1 && Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) == 0 { *(*I64)(unsafe.Pointer(pMem)) = *(*Sqlite3_int64)(unsafe.Pointer(bp /* ix */)) return U16(MEM_Int) } return U16(MEM_Real) } // Return the numeric type for pMem, either MEM_Int or MEM_Real or both or // none. // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. func numericType(tls *libc.TLS, pMem uintptr) U16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:87878:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) } if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { return computeNumericType(tls, pMem) } return U16(0) } // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88053:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88058:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*56 if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { //OPTIMIZATION-IF-FALSE return out2PrereleaseWithClear(tls, pOut) } else { (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } return uintptr(0) } // Compute a bloom filter hash using pOp->p4.i registers from aMem[] beginning // with pOp->p3. Return the hash. func filterHash(tls *libc.TLS, aMem uintptr, pOp uintptr) U64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88076:12: */ var i int32 var mx int32 var h U64 = uint64(0) i = (*Op)(unsafe.Pointer(pOp)).Fp3 mx = i + *(*int32)(unsafe.Pointer(pOp + 16)) for ; i < mx; i++ { var p uintptr = aMem + uintptr(i)*56 if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { h = h + U64(*(*I64)(unsafe.Pointer(p))) } else if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Real != 0 { h = h + U64(Xsqlite3VdbeIntValue(tls, p)) } else if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { h = h + U64((*Mem)(unsafe.Pointer(p)).Fn) if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Zero != 0 { h = h + U64(*(*int32)(unsafe.Pointer(p))) } } } return h } // Return the symbolic name for the data type of a pMem func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88098:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } var azTypes = [5]uintptr{ ts + 1085, ts + 1097, ts + 1102, ts + 1080, ts + 1525, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88099:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88113:20: */ bp := tls.Alloc(976) defer tls.Free(976) var aOp uintptr // Copy of p->aOp var pOp uintptr // Current operation var rc int32 // Value to return var db uintptr // The database var resetSchemaOnFault U8 // Reset schema after an error if positive var encoding U8 // The database encoding var iCompare int32 // Result of last comparison var nVmStep U64 // Number of virtual machine steps var nProgressLimit U64 // Invoke xProgress() when nVmStep reaches this var aMem uintptr // Copy of p->aMem var pIn1 uintptr // 1st input operand var pIn2 uintptr // 2nd input operand var pIn3 uintptr // 3rd input operand var pOut uintptr var iPrior U32 // in1 var pCaller uintptr // in1, jump var pcDest int32 var pFrame uintptr var pcx int32 // out2 var cnt int32 var nullFlag U16 // out2 var pVar uintptr var n int32 // Number of registers left to copy var p1 int32 // Register to copy from var p2 int32 var n1 int32 var pMem uintptr var i int32 // same as TK_CONCAT, in1, in2, out3 var nByte I64 // Total size of the output string or blob var flags1 U16 // Initial flags for P1 var flags2 U16 // same as TK_REM, in1, in2, out3 var flags U16 // Combined MEM_* flags from both inputs var type1 U16 // Numeric type of left operand var type2 U16 // Numeric type of right operand var iA I64 // Integer value of left operand // var iB I64 at bp+208, 8 // Integer value of right operand var rA float64 // Real value of left operand var rB float64 // same as TK_RSHIFT, in1, in2, out3 // var iA1 I64 at bp+224, 8 // var uA U64 at bp+216, 8 var iB1 I64 var op U8 // same as TK_GE, jump, in1, in3 var res int32 var res2 int32 // Result of the comparison of pIn1 against pIn3 var affinity int8 // Affinity to use for comparison var flags11 U16 // Copy of initial value of pIn1->flags var flags3 U16 var n2 int32 var i1 int32 var p11 int32 var p21 int32 var pKeyInfo uintptr var idx U32 var pColl uintptr // Collating sequence to use on this term var bRev int32 // True for DESCENDING sort order var aPermute uintptr // same as TK_OR, in1, in2, out3 var v1 int32 // Left operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL var v2 int32 // jump var iAddr U32 // jump, in1 var c int32 // jump, in1 var c1 int32 // jump, in1 var doTheJump int32 // out3 var pC uintptr // var p22 U32 at bp+240, 4 // column number to retrieve // var pC1 uintptr at bp+232, 8 // The VDBE cursor var pCrsr uintptr // The BTree cursor var aOffset uintptr // aOffset[i] is offset to start of data for i-th column var len int32 // The length of the serialized data for the column var i2 int32 // Loop counter var pDest uintptr // Where to write the extracted value // var sMem Mem at bp+248, 56 // For storing the record being decoded var zData uintptr // Part of the record being decoded var zHdr uintptr // Next unparsed byte of the header var zEndHdr uintptr // Pointer to first byte after the header var offset64 U64 // 64-bit offset // var t U32 at bp+304, 4 // A type code from the record header var pReg uintptr var pTab uintptr var aCol uintptr var i3 int32 var zAffinity uintptr // Figure out whether to use 1, 2, 4, 6 or 8 bytes. var i4 I64 var uu U64 var pRec uintptr // The new record var nData U64 // Number of bytes of data space var nHdr int32 // Number of bytes of header space var nByte1 I64 // Data space required for this record var nZero I64 // Number of zero bytes at the end of the record var nVarint int32 // Number of bytes in a varint var serial_type U32 // Type field var pData0 uintptr // First field to be combined into the record var pLast uintptr // Last field of the record var nField int32 // Number of fields in the record var zAffinity1 uintptr // The affinity string for the record var file_format int32 // File format to use for encoding var len1 U32 // Length of a field var zHdr1 uintptr // Where to write next byte of the header var zPayload uintptr // out2 // var nEntry I64 at bp+312, 8 var pCrsr1 uintptr var isSchemaChange int32 // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. var isTransaction int32 var p12 int32 // Value of P1 operand var zName uintptr // Name of savepoint var nName int32 var pNew uintptr var pSavepoint uintptr var pTmp uintptr var iSavepoint int32 var ii int32 var desiredAutoCommit int32 var iRollback int32 var pBt uintptr // var iMeta int32 at bp+320, 4 // out2 // var iMeta1 int32 at bp+324, 4 var iDb int32 var iCookie int32 var pDb uintptr var nField1 int32 var pKeyInfo1 uintptr var p23 U32 var iDb1 int32 var wrFlag int32 var pX uintptr var pCur uintptr var pDb1 uintptr var pOrig uintptr // The original cursor to be duplicated var pCx uintptr var pCx1 uintptr var pKeyInfo2 uintptr var pCx2 uintptr var pC2 uintptr var pCx3 uintptr var c2 int32 var flags31 U16 var newType U16 // jump, in3, group // var res1 int32 at bp+328, 4 // Comparison result var oc int32 // Opcode var pC3 uintptr // The cursor to seek // var r UnpackedRecord at bp+336, 24 // The key to seek for var nField2 int32 // Number of columns or fields in the key var iKey I64 // The rowid we are to seek to var eqOnly int32 var pC4 uintptr // var res3 int32 at bp+384, 4 var nStep int32 // var r1 UnpackedRecord at bp+360, 24 var pC5 uintptr // jump, in3 var pC6 uintptr // jump, in3 var alreadyExists int32 var takeJump int32 var ii1 int32 var pC7 uintptr // var res4 int32 at bp+416, 4 var pFree uintptr var pIdxKey uintptr // var r2 UnpackedRecord at bp+392, 24 // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted // into an integer without loss of information. Take care to avoid // changing the datatype of pIn3, however, as it is used by other // parts of the prepared statement. // var x Mem at bp+424, 56 // jump, in3 var pC8 uintptr var pCrsr2 uintptr // var res5 int32 at bp+480, 4 var iKey1 U64 // out2 // var v I64 at bp+488, 8 // The new rowid var pC9 uintptr // Cursor of table to get the new rowid // var res6 int32 at bp+484, 4 // Result of an sqlite3BtreeLast() var cnt1 int32 // Counter to limit the number of searches var pMem1 uintptr // Register holding largest rowid for AUTOINCREMENT var pFrame1 uintptr var pData uintptr // MEM cell holding data for the record to be inserted var pKey uintptr // MEM cell holding key for the record var pC10 uintptr // Cursor to table into which insert is written var seekResult int32 // Result of prior seek or 0 if no USESEEKRESULT flag var zDb uintptr // database name - used by the update hook var pTab1 uintptr // Table structure - used by update and pre-update hooks // var x1 BtreePayload at bp+496, 48 var pDest1 uintptr // Cursor to write to var pSrc uintptr // Cursor to read from var iKey2 I64 var pC11 uintptr var zDb1 uintptr var pTab2 uintptr var opflags int32 var pC12 uintptr // var res7 int32 at bp+544, 4 var nKeyCol int32 var pC13 uintptr var pC14 uintptr var pCrsr3 uintptr var n3 U32 // out2 var pC15 uintptr // var v3 I64 at bp+552, 8 var pVtab uintptr var pModule uintptr var pC16 uintptr // jump var pC17 uintptr var pCrsr4 uintptr // var res8 int32 at bp+560, 4 // jump var pC18 uintptr var pCrsr5 uintptr // var res9 int32 at bp+564, 4 var sz I64 // jump var pC19 uintptr var pCrsr6 uintptr // var res10 int32 at bp+568, 4 // jump var pC20 uintptr // in2 var pC21 uintptr // var x2 BtreePayload at bp+576, 48 // in2 var pC22 uintptr var pC23 uintptr var pCrsr7 uintptr // var res11 int32 at bp+648, 4 // var r3 UnpackedRecord at bp+624, 24 // out2 var pC24 uintptr // The P1 index cursor var pTabCur uintptr // The P2 table cursor (OP_DeferredSeek only) // var rowid I64 at bp+656, 8 var pC25 uintptr var nCellKey I64 var pCur1 uintptr // var m Mem at bp+664, 56 // jump var pC26 uintptr var res12 int32 // var r4 UnpackedRecord at bp+720, 24 // out2 // var iMoved int32 at bp+744, 4 var iDb2 int32 // var nChange I64 at bp+752, 8 var pC27 uintptr // out2 // var pgno Pgno at bp+760, 4 var pDb2 uintptr var iDb3 int32 var zSchema uintptr var zSql uintptr // var initData InitData at bp+768, 40 var nRoot int32 // Number of tables to check. (Number of root pages.) var aRoot uintptr // Array of rootpage numbers for tables to be checked // var nErr int32 at bp+808, 4 // Number of errors reported var z uintptr // Text of the error report var pnErr uintptr // jump, in1, out3 // var val I64 at bp+816, 8 // jump, in1, in3 var iSet int32 var exists int32 // jump var nMem int32 // Number of memory registers for sub-program var nByte2 int32 // Bytes of runtime space required for sub-program var pRt uintptr // Register to allocate runtime space var pMem2 uintptr // Used to iterate through memory cells var pEnd uintptr // Last memory cell in new array var pFrame2 uintptr // New vdbe frame to execute in var pProgram uintptr // Sub-program to execute var t1 uintptr // out2 var pFrame3 uintptr var pIn uintptr // in2 var pFrame4 uintptr // in1, out2, in3 // var x3 I64 at bp+824, 8 var n4 int32 var pCtx uintptr var i5 int32 var pCtx1 uintptr var pMem3 uintptr var pMem4 uintptr var i6 int32 // Loop counter // var aRes [3]int32 at bp+832, 12 // Results var pMem5 uintptr // out2 var pBt1 uintptr // Btree to change journal mode of var pPager uintptr // Pager associated with pBt var eNew int32 // New journal mode var eOld int32 // The old journal mode var zFilename uintptr // jump var pBt2 uintptr var pC28 uintptr var pC29 uintptr var z1 uintptr var p13 int32 var isWriteLock U8 var pVTab uintptr // var sMem1 Mem at bp+848, 56 // For storing the record being decoded var zTab uintptr var pCur2 uintptr // var pVCur uintptr at bp+904, 8 var pVtab1 uintptr var pModule1 uintptr // out2 var pC30 uintptr // The cursor containing the RHS values var pRhs uintptr // jump var nArg int32 var iQuery int32 var pModule2 uintptr var pQuery uintptr var pArgc uintptr var pVCur1 uintptr var pVtab2 uintptr var pCur3 uintptr var res13 int32 var i7 int32 var apArg uintptr var pVtab3 uintptr var pModule3 uintptr var pDest2 uintptr // var sContext Sqlite3_context at bp+912, 56 var pCur4 uintptr // jump var pVtab4 uintptr var pModule4 uintptr var res14 int32 var pCur5 uintptr var pVtab5 uintptr var pName uintptr var isLegacy int32 var vtabOnConflict U8 var pVtab6 uintptr var pModule5 uintptr var nArg1 int32 var i8 int32 // var rowid1 Sqlite_int64 at bp+968, 8 var apArg1 uintptr var pX1 uintptr // out2 var newMax uint32 var pBt3 uintptr // group var i9 int32 var pCtx2 uintptr var h U64 // jump var h1 U64 var z2 uintptr var z3 uintptr // jump var i10 int32 var zTrace uintptr aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp pOp = aOp rc = SQLITE_OK db = (*Vdbe)(unsafe.Pointer(p)).Fdb resetSchemaOnFault = U8(0) encoding = (*Sqlite3)(unsafe.Pointer(db)).Fenc iCompare = 0 nVmStep = uint64(0) aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem pIn1 = uintptr(0) pIn2 = uintptr(0) pIn3 = uintptr(0) pOut = uintptr(0) // Output operand //** INSERT STACK UNION HERE ** // sqlite3_step() verifies this Xsqlite3VdbeEnter(tls, p) if !((*Sqlite3)(unsafe.Pointer(db)).FxProgress != 0) { goto __1 } iPrior = *(*U32)(unsafe.Pointer(p + 220 + 4*4)) nProgressLimit = U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps - iPrior%(*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) goto __2 __1: nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 __2: ; if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_NOMEM) { goto __3 } // This happens if a malloc() inside a call to sqlite3_column_text() or // sqlite3_column_text16() failed. goto no_mem __3: ; (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK (*Vdbe)(unsafe.Pointer(p)).FiCurrentTime = int64(0) (*Vdbe)(unsafe.Pointer(p)).FpResultSet = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { goto __4 } goto abort_due_to_interrupt __4: ; pOp = aOp + uintptr((*Vdbe)(unsafe.Pointer(p)).Fpc)*24 __5: if !(1 != 0) { goto __7 } // Errors are detected by individual opcodes, with an immediate // jumps to abort_due_to_error. nVmStep++ // Only allow tracing if SQLITE_DEBUG is defined. // Check to see if we need to simulate an interrupt. This only happens // if we have a special test build. // Sanity checking on other operands switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { // **************************************************************************** // // What follows is a massive switch statement where each case implements a // separate instruction in the virtual machine. If we follow the usual // indentation conventions, each case should be indented by 6 spaces. But // that is a lot of wasted space on the left margin. So the code within // the switch statement will break with convention and be flush-left. Another // big comment (similar to this one) will mark the point in the code where // we transition back to normal indentation. // // The formatting of each case is important. The makefile for SQLite // generates two C files "opcodes.h" and "opcodes.c" by scanning this // file looking for lines that begin with "case OP_". The opcodes.h files // will be filled with #defines that give unique integer values to each // opcode and the opcodes.c file is filled with an array of strings where // each string is the symbolic name for the corresponding opcode. If the // case statement is followed by a comment of the form "/# same as ... #/" // that comment is used to determine the particular value of the opcode. // // Other keywords in the comment that follows each case are used to // construct the OPFLG_INITIALIZER value that initializes opcodeProperty[]. // Keywords include: in1, in2, in3, out2, out3. See // the mkopcodeh.awk script for additional information. // // Documentation about VDBE opcodes is generated by scanning this file // for lines of that contain "Opcode:". That line and all subsequent // comment lines are used in the generation of the opcode.html documentation // file. // // SUMMARY: // // Formatting is important to scripts that scan this file. // Do not deviate from the formatting style currently in use. // // // Opcode: Goto * P2 * * * // // An unconditional jump to address P2. // The next instruction executed will be // the one at index P2 from the beginning of // the program. // // The P1 parameter is not actually used by this opcode. However, it // is sometimes set to 1 instead of 0 as a hint to the command-line shell // that this Goto is the bottom of a loop and that the lines from P2 down // to the current line should be indented for EXPLAIN output. case OP_Goto: goto __9 // Opcode: Gosub P1 P2 * * * // // Write the current address onto register P1 // and then jump to address P2. case OP_Gosub: goto __10 // Opcode: Return P1 * * * * // // Jump to the next instruction after the address in register P1. After // the jump, register P1 becomes undefined. case OP_Return: goto __11 // Opcode: InitCoroutine P1 P2 P3 * * // // Set up register P1 so that it will Yield to the coroutine // located at address P3. // // If P2!=0 then the coroutine implementation immediately follows // this opcode. So jump over the coroutine implementation to // address P2. // // See also: EndCoroutine case OP_InitCoroutine: goto __12 // Opcode: EndCoroutine P1 * * * * // // The instruction at the address in register P1 is a Yield. // Jump to the P2 parameter of that Yield. // After the jump, register P1 becomes undefined. // // See also: InitCoroutine case OP_EndCoroutine: goto __13 // Opcode: Yield P1 P2 * * * // // Swap the program counter with the value in register P1. This // has the effect of yielding to a coroutine. // // If the coroutine that is launched by this instruction ends with // Yield or Return then continue to the next instruction. But if // the coroutine launched by this instruction ends with // EndCoroutine, then jump to P2 rather than continuing with the // next instruction. // // See also: InitCoroutine case OP_Yield: goto __14 // Opcode: HaltIfNull P1 P2 P3 P4 P5 // Synopsis: if r[P3]=null halt // // Check the value in register P3. If it is NULL then Halt using // parameter P1, P2, and P4 as if this were a Halt instruction. If the // value in register P3 is not NULL, then this routine is a no-op. // The P5 parameter should be 1. case OP_HaltIfNull: goto __15 // Opcode: Halt P1 P2 * P4 P5 // // Exit immediately. All open cursors, etc are closed // automatically. // // P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), // or sqlite3_finalize(). For a normal halt, this should be SQLITE_OK (0). // For errors, it can be some other value. If P1!=0 then P2 will determine // whether or not to rollback the current transaction. Do not rollback // if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, // then back out all changes that have occurred during this execution of the // VDBE, but do not rollback the transaction. // // If P4 is not null then it is an error message string. // // P5 is a value between 0 and 4, inclusive, that modifies the P4 string. // // 0: (no change) // 1: NOT NULL contraint failed: P4 // 2: UNIQUE constraint failed: P4 // 3: CHECK constraint failed: P4 // 4: FOREIGN KEY constraint failed: P4 // // If P5 is not zero and P4 is NULL, then everything after the ":" is // omitted. // // There is an implied "Halt 0 0 0" instruction inserted at the very end of // every program. So a jump past the last instruction of the program // is the same as executing Halt. case OP_Halt: goto __16 // Opcode: Integer P1 P2 * * * // Synopsis: r[P2]=P1 // // The 32-bit integer value P1 is written into register P2. case OP_Integer: goto __17 // Opcode: Int64 * P2 * P4 * // Synopsis: r[P2]=P4 // // P4 is a pointer to a 64-bit integer value. // Write that value into register P2. case OP_Int64: goto __18 // Opcode: Real * P2 * P4 * // Synopsis: r[P2]=P4 // // P4 is a pointer to a 64-bit floating point value. // Write that value into register P2. case OP_Real: goto __19 // Opcode: String8 * P2 * P4 * // Synopsis: r[P2]='P4' // // P4 points to a nul terminated UTF-8 string. This opcode is transformed // into a String opcode before it is executed for the first time. During // this transformation, the length of string P4 is computed and stored // as the P1 parameter. case OP_String8: goto __20 // Opcode: String P1 P2 P3 P4 P5 // Synopsis: r[P2]='P4' (len=P1) // // The string value P4 of length P1 (bytes) is stored in register P2. // // If P3 is not zero and the content of register P3 is equal to P5, then // the datatype of the register P2 is converted to BLOB. The content is // the same sequence of bytes, it is merely interpreted as a BLOB instead // of a string, as if it had been CAST. In other words: // // if( P3!=0 and reg[P3]==P5 ) reg[P2] := CAST(reg[P2] as BLOB) case OP_String: goto __21 // Opcode: Null P1 P2 P3 * * // Synopsis: r[P2..P3]=NULL // // Write a NULL into registers P2. If P3 greater than P2, then also write // NULL into register P3 and every register in between P2 and P3. If P3 // is less than P2 (typically P3 is zero) then only register P2 is // set to NULL. // // If the P1 value is non-zero, then also set the MEM_Cleared flag so that // NULL values will not compare equal even if SQLITE_NULLEQ is set on // OP_Ne or OP_Eq. case OP_Null: goto __22 // Opcode: SoftNull P1 * * * * // Synopsis: r[P1]=NULL // // Set register P1 to have the value NULL as seen by the OP_MakeRecord // instruction, but do not free any string or blob memory associated with // the register, so that if the value was a string or blob that was // previously copied using OP_SCopy, the copies will continue to be valid. case OP_SoftNull: goto __23 // Opcode: Blob P1 P2 * P4 * // Synopsis: r[P2]=P4 (len=P1) // // P4 points to a blob of data P1 bytes long. Store this // blob in register P2. If P4 is a NULL pointer, then construct // a zero-filled blob that is P1 bytes long in P2. case OP_Blob: goto __24 // Opcode: Variable P1 P2 * P4 * // Synopsis: r[P2]=parameter(P1,P4) // // Transfer the values of bound parameter P1 into register P2 // // If the parameter is named, then its name appears in P4. // The P4 value is used by sqlite3_bind_parameter_name(). case OP_Variable: goto __25 // Opcode: Move P1 P2 P3 * * // Synopsis: r[P2@P3]=r[P1@P3] // // Move the P3 values in register P1..P1+P3-1 over into // registers P2..P2+P3-1. Registers P1..P1+P3-1 are // left holding a NULL. It is an error for register ranges // P1..P1+P3-1 and P2..P2+P3-1 to overlap. It is an error // for P3 to be less than 1. case OP_Move: goto __26 // Opcode: Copy P1 P2 P3 * * // Synopsis: r[P2@P3+1]=r[P1@P3+1] // // Make a copy of registers P1..P1+P3 into registers P2..P2+P3. // // This instruction makes a deep copy of the value. A duplicate // is made of any string or blob constant. See also OP_SCopy. case OP_Copy: goto __27 // Opcode: SCopy P1 P2 * * * // Synopsis: r[P2]=r[P1] // // Make a shallow copy of register P1 into register P2. // // This instruction makes a shallow copy of the value. If the value // is a string or blob, then the copy is only a pointer to the // original and hence if the original changes so will the copy. // Worse, if the original is deallocated, the copy becomes invalid. // Thus the program must guarantee that the original will not change // during the lifetime of the copy. Use OP_Copy to make a complete // copy. case OP_SCopy: goto __28 // Opcode: IntCopy P1 P2 * * * // Synopsis: r[P2]=r[P1] // // Transfer the integer value held in register P1 into register P2. // // This is an optimized version of SCopy that works only for integer // values. case OP_IntCopy: goto __29 // Opcode: FkCheck * * * * * // // Halt with an SQLITE_CONSTRAINT error if there are any unresolved // foreign key constraint violations. If there are no foreign key // constraint violations, this is a no-op. // // FK constraint violations are also checked when the prepared statement // exits. This opcode is used to raise foreign key constraint errors prior // to returning results such as a row change count or the result of a // RETURNING clause. case OP_FkCheck: goto __30 // Opcode: ResultRow P1 P2 * * * // Synopsis: output=r[P1@P2] // // The registers P1 through P1+P2-1 contain a single row of // results. This opcode causes the sqlite3_step() call to terminate // with an SQLITE_ROW return code and it sets up the sqlite3_stmt // structure to provide access to the r(P1)..r(P1+P2-1) values as // the result row. case OP_ResultRow: goto __31 // Opcode: Concat P1 P2 P3 * * // Synopsis: r[P3]=r[P2]+r[P1] // // Add the text in register P1 onto the end of the text in // register P2 and store the result in register P3. // If either the P1 or P2 text are NULL then store NULL in P3. // // P3 = P2 || P1 // // It is illegal for P1 and P3 to be the same register. Sometimes, // if P3 is the same register as P2, the implementation is able // to avoid a memcpy(). case OP_Concat: goto __32 // Opcode: Add P1 P2 P3 * * // Synopsis: r[P3]=r[P1]+r[P2] // // Add the value in register P1 to the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Multiply P1 P2 P3 * * // Synopsis: r[P3]=r[P1]*r[P2] // // // Multiply the value in register P1 by the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Subtract P1 P2 P3 * * // Synopsis: r[P3]=r[P2]-r[P1] // // Subtract the value in register P1 from the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Divide P1 P2 P3 * * // Synopsis: r[P3]=r[P2]/r[P1] // // Divide the value in register P1 by the value in register P2 // and store the result in register P3 (P3=P2/P1). If the value in // register P1 is zero, then the result is NULL. If either input is // NULL, the result is NULL. // Opcode: Remainder P1 P2 P3 * * // Synopsis: r[P3]=r[P2]%r[P1] // // Compute the remainder after integer register P2 is divided by // register P1 and store the result in register P3. // If the value in register P1 is zero the result is NULL. // If either operand is NULL, the result is NULL. case OP_Add: goto __33 // same as TK_PLUS, in1, in2, out3 case OP_Subtract: goto __34 // same as TK_MINUS, in1, in2, out3 case OP_Multiply: goto __35 // same as TK_STAR, in1, in2, out3 case OP_Divide: goto __36 // same as TK_SLASH, in1, in2, out3 case OP_Remainder: goto __37 // Opcode: CollSeq P1 * * P4 // // P4 is a pointer to a CollSeq object. If the next call to a user function // or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will // be returned. This is used by the built-in min(), max() and nullif() // functions. // // If P1 is not zero, then it is a register that a subsequent min() or // max() aggregate will set to 1 if the current row is not the minimum or // maximum. The P1 register is initialized to 0 by this instruction. // // The interface used by the implementation of the aforementioned functions // to retrieve the collation sequence set by this opcode is not available // publicly. Only built-in functions have access to this feature. case OP_CollSeq: goto __38 // Opcode: BitAnd P1 P2 P3 * * // Synopsis: r[P3]=r[P1]&r[P2] // // Take the bit-wise AND of the values in register P1 and P2 and // store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: BitOr P1 P2 P3 * * // Synopsis: r[P3]=r[P1]|r[P2] // // Take the bit-wise OR of the values in register P1 and P2 and // store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: ShiftLeft P1 P2 P3 * * // Synopsis: r[P3]=r[P2]<<r[P1] // // Shift the integer value in register P2 to the left by the // number of bits specified by the integer in register P1. // Store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: ShiftRight P1 P2 P3 * * // Synopsis: r[P3]=r[P2]>>r[P1] // // Shift the integer value in register P2 to the right by the // number of bits specified by the integer in register P1. // Store the result in register P3. // If either input is NULL, the result is NULL. case OP_BitAnd: goto __39 // same as TK_BITAND, in1, in2, out3 case OP_BitOr: goto __40 // same as TK_BITOR, in1, in2, out3 case OP_ShiftLeft: goto __41 // same as TK_LSHIFT, in1, in2, out3 case OP_ShiftRight: goto __42 // Opcode: AddImm P1 P2 * * * // Synopsis: r[P1]=r[P1]+P2 // // Add the constant P2 to the value in register P1. // The result is always an integer. // // To force any register to be an integer, just add 0. case OP_AddImm: goto __43 // Opcode: MustBeInt P1 P2 * * * // // Force the value in register P1 to be an integer. If the value // in P1 is not an integer and cannot be converted into an integer // without data loss, then jump immediately to P2, or if P2==0 // raise an SQLITE_MISMATCH exception. case OP_MustBeInt: goto __44 // Opcode: RealAffinity P1 * * * * // // If register P1 holds an integer convert it to a real value. // // This opcode is used when extracting information from a column that // has REAL affinity. Such column values may still be stored as // integers, for space efficiency, but after extraction we want them // to have only a real value. case OP_RealAffinity: goto __45 // Opcode: Cast P1 P2 * * * // Synopsis: affinity(r[P1]) // // Force the value in register P1 to be the type defined by P2. // // <ul> // <li> P2=='A' → BLOB // <li> P2=='B' → TEXT // <li> P2=='C' → NUMERIC // <li> P2=='D' → INTEGER // <li> P2=='E' → REAL // </ul> // // A NULL value is not changed by this routine. It remains NULL. case OP_Cast: goto __46 // Opcode: Eq P1 P2 P3 P4 P5 // Synopsis: IF r[P3]==r[P1] // // Compare the values in register P1 and P3. If reg(P3)==reg(P1) then // jump to address P2. // // The SQLITE_AFF_MASK portion of P5 must be an affinity character - // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made // to coerce both inputs according to this affinity before the // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric // affinity is used. Note that the affinity conversions are stored // back into the input registers P1 and P3. So this opcode can cause // persistent changes to registers P1 and P3. // // Once any conversions have taken place, and neither value is NULL, // the values are compared. If both values are blobs then memcmp() is // used to determine the results of the comparison. If both values // are text, then the appropriate collating function specified in // P4 is used to do the comparison. If P4 is not specified then // memcmp() is used to compare text string. If both values are // numeric, then a numeric comparison is used. If the two values // are of different types, then numbers are considered less than // strings and strings are considered less than blobs. // // If SQLITE_NULLEQ is set in P5 then the result of comparison is always either // true or false and is never NULL. If both operands are NULL then the result // of comparison is true. If either operand is NULL then the result is false. // If neither operand is NULL the result is the same as it would be if // the SQLITE_NULLEQ flag were omitted from P5. // // This opcode saves the result of comparison for use by the new // OP_Jump opcode. // Opcode: Ne P1 P2 P3 P4 P5 // Synopsis: IF r[P3]!=r[P1] // // This works just like the Eq opcode except that the jump is taken if // the operands in registers P1 and P3 are not equal. See the Eq opcode for // additional information. // Opcode: Lt P1 P2 P3 P4 P5 // Synopsis: IF r[P3]<r[P1] // // Compare the values in register P1 and P3. If reg(P3)<reg(P1) then // jump to address P2. // // If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or // reg(P3) is NULL then the take the jump. If the SQLITE_JUMPIFNULL // bit is clear then fall through if either operand is NULL. // // The SQLITE_AFF_MASK portion of P5 must be an affinity character - // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made // to coerce both inputs according to this affinity before the // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric // affinity is used. Note that the affinity conversions are stored // back into the input registers P1 and P3. So this opcode can cause // persistent changes to registers P1 and P3. // // Once any conversions have taken place, and neither value is NULL, // the values are compared. If both values are blobs then memcmp() is // used to determine the results of the comparison. If both values // are text, then the appropriate collating function specified in // P4 is used to do the comparison. If P4 is not specified then // memcmp() is used to compare text string. If both values are // numeric, then a numeric comparison is used. If the two values // are of different types, then numbers are considered less than // strings and strings are considered less than blobs. // // This opcode saves the result of comparison for use by the new // OP_Jump opcode. // Opcode: Le P1 P2 P3 P4 P5 // Synopsis: IF r[P3]<=r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is less than or equal to the content of // register P1. See the Lt opcode for additional information. // Opcode: Gt P1 P2 P3 P4 P5 // Synopsis: IF r[P3]>r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is greater than the content of // register P1. See the Lt opcode for additional information. // Opcode: Ge P1 P2 P3 P4 P5 // Synopsis: IF r[P3]>=r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is greater than or equal to the content of // register P1. See the Lt opcode for additional information. case OP_Eq: goto __47 // same as TK_EQ, jump, in1, in3 case OP_Ne: goto __48 // same as TK_NE, jump, in1, in3 case OP_Lt: goto __49 // same as TK_LT, jump, in1, in3 case OP_Le: goto __50 // same as TK_LE, jump, in1, in3 case OP_Gt: goto __51 // same as TK_GT, jump, in1, in3 case OP_Ge: goto __52 // Opcode: ElseEq * P2 * * * // // This opcode must follow an OP_Lt or OP_Gt comparison operator. There // can be zero or more OP_ReleaseReg opcodes intervening, but no other // opcodes are allowed to occur between this instruction and the previous // OP_Lt or OP_Gt. // // If result of an OP_Eq comparison on the same two operands as the // prior OP_Lt or OP_Gt would have been true, then jump to P2. // If the result of an OP_Eq comparison on the two previous // operands would have been false or NULL, then fall through. case OP_ElseEq: goto __53 // Opcode: Permutation * * * P4 * // // Set the permutation used by the OP_Compare operator in the next // instruction. The permutation is stored in the P4 operand. // // The permutation is only valid until the next OP_Compare that has // the OPFLAG_PERMUTE bit set in P5. Typically the OP_Permutation should // occur immediately prior to the OP_Compare. // // The first integer in the P4 integer array is the length of the array // and does not become part of the permutation. case OP_Permutation: goto __54 // Opcode: Compare P1 P2 P3 P4 P5 // Synopsis: r[P1@P3] <-> r[P2@P3] // // Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this // vector "A") and in reg(P2)..reg(P2+P3-1) ("B"). Save the result of // the comparison for use by the next OP_Jump instruct. // // If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is // determined by the most recent OP_Permutation operator. If the // OPFLAG_PERMUTE bit is clear, then register are compared in sequential // order. // // P4 is a KeyInfo structure that defines collating sequences and sort // orders for the comparison. The permutation applies to registers // only. The KeyInfo elements are used sequentially. // // The comparison is a sort comparison, so NULLs compare equal, // NULLs are less than numbers, numbers are less than strings, // and strings are less than blobs. case OP_Compare: goto __55 // Opcode: Jump P1 P2 P3 * * // // Jump to the instruction at address P1, P2, or P3 depending on whether // in the most recent OP_Compare instruction the P1 vector was less than // equal to, or greater than the P2 vector, respectively. case OP_Jump: goto __56 // Opcode: And P1 P2 P3 * * // Synopsis: r[P3]=(r[P1] && r[P2]) // // Take the logical AND of the values in registers P1 and P2 and // write the result into register P3. // // If either P1 or P2 is 0 (false) then the result is 0 even if // the other input is NULL. A NULL and true or two NULLs give // a NULL output. // Opcode: Or P1 P2 P3 * * // Synopsis: r[P3]=(r[P1] || r[P2]) // // Take the logical OR of the values in register P1 and P2 and // store the answer in register P3. // // If either P1 or P2 is nonzero (true) then the result is 1 (true) // even if the other input is NULL. A NULL and false or two NULLs // give a NULL output. case OP_And: goto __57 // same as TK_AND, in1, in2, out3 case OP_Or: goto __58 // Opcode: IsTrue P1 P2 P3 P4 * // Synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 // // This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and // IS NOT FALSE operators. // // Interpret the value in register P1 as a boolean value. Store that // boolean (a 0 or 1) in register P2. Or if the value in register P1 is // NULL, then the P3 is stored in register P2. Invert the answer if P4 // is 1. // // The logic is summarized like this: // // <ul> // <li> If P3==0 and P4==0 then r[P2] := r[P1] IS TRUE // <li> If P3==1 and P4==1 then r[P2] := r[P1] IS FALSE // <li> If P3==0 and P4==1 then r[P2] := r[P1] IS NOT TRUE // <li> If P3==1 and P4==0 then r[P2] := r[P1] IS NOT FALSE // </ul> case OP_IsTrue: goto __59 // Opcode: Not P1 P2 * * * // Synopsis: r[P2]= !r[P1] // // Interpret the value in register P1 as a boolean value. Store the // boolean complement in register P2. If the value in register P1 is // NULL, then a NULL is stored in P2. case OP_Not: goto __60 // Opcode: BitNot P1 P2 * * * // Synopsis: r[P2]= ~r[P1] // // Interpret the content of register P1 as an integer. Store the // ones-complement of the P1 value into register P2. If P1 holds // a NULL then store a NULL in P2. case OP_BitNot: goto __61 // Opcode: Once P1 P2 * * * // // Fall through to the next instruction the first time this opcode is // encountered on each invocation of the byte-code program. Jump to P2 // on the second and all subsequent encounters during the same invocation. // // Top-level programs determine first invocation by comparing the P1 // operand against the P1 operand on the OP_Init opcode at the beginning // of the program. If the P1 values differ, then fall through and make // the P1 of this opcode equal to the P1 of OP_Init. If P1 values are // the same then take the jump. // // For subprograms, there is a bitmask in the VdbeFrame that determines // whether or not the jump should be taken. The bitmask is necessary // because the self-altering code trick does not work for recursive // triggers. case OP_Once: goto __62 // Opcode: If P1 P2 P3 * * // // Jump to P2 if the value in register P1 is true. The value // is considered true if it is numeric and non-zero. If the value // in P1 is NULL then take the jump if and only if P3 is non-zero. case OP_If: goto __63 // Opcode: IfNot P1 P2 P3 * * // // Jump to P2 if the value in register P1 is False. The value // is considered false if it has a numeric value of zero. If the value // in P1 is NULL then take the jump if and only if P3 is non-zero. case OP_IfNot: goto __64 // Opcode: IsNull P1 P2 * * * // Synopsis: if r[P1]==NULL goto P2 // // Jump to P2 if the value in register P1 is NULL. case OP_IsNull: goto __65 // Opcode: IsNullOrType P1 P2 P3 * * // Synopsis: if typeof(r[P1]) IN (P3,5) goto P2 // // Jump to P2 if the value in register P1 is NULL or has a datatype P3. // P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT, // SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT. case OP_IsNullOrType: goto __66 // Opcode: ZeroOrNull P1 P2 P3 * * // Synopsis: r[P2] = 0 OR NULL // // If all both registers P1 and P3 are NOT NULL, then store a zero in // register P2. If either registers P1 or P3 are NULL then put // a NULL in register P2. case OP_ZeroOrNull: goto __67 // Opcode: NotNull P1 P2 * * * // Synopsis: if r[P1]!=NULL goto P2 // // Jump to P2 if the value in register P1 is not NULL. case OP_NotNull: goto __68 // Opcode: IfNullRow P1 P2 P3 * * // Synopsis: if P1.nullRow then r[P3]=NULL, goto P2 // // Check the cursor P1 to see if it is currently pointing at a NULL row. // If it is, then set register P3 to NULL and jump immediately to P2. // If P1 is not on a NULL row, then fall through without making any // changes. case OP_IfNullRow: goto __69 // Opcode: Offset P1 P2 P3 * * // Synopsis: r[P3] = sqlite_offset(P1) // // Store in register r[P3] the byte offset into the database file that is the // start of the payload for the record at which that cursor P1 is currently // pointing. // // P2 is the column number for the argument to the sqlite_offset() function. // This opcode does not use P2 itself, but the P2 value is used by the // code generator. The P1, P2, and P3 operands to this opcode are the // same as for OP_Column. // // This opcode is only available if SQLite is compiled with the // -DSQLITE_ENABLE_OFFSET_SQL_FUNC option. case OP_Offset: goto __70 // Opcode: Column P1 P2 P3 P4 P5 // Synopsis: r[P3]=PX // // Interpret the data that cursor P1 points to as a structure built using // the MakeRecord instruction. (See the MakeRecord opcode for additional // information about the format of the data.) Extract the P2-th column // from this record. If there are less that (P2+1) // values in the record, extract a NULL. // // The value extracted is stored in register P3. // // If the record contains fewer than P2 fields, then extract a NULL. Or, // if the P4 argument is a P4_MEM use the value of the P4 argument as // the result. // // If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 then // the result is guaranteed to only be used as the argument of a length() // or typeof() function, respectively. The loading of large blobs can be // skipped for length() and all content loading can be skipped for typeof(). case OP_Column: goto __71 // Opcode: TypeCheck P1 P2 P3 P4 * // Synopsis: typecheck(r[P1@P2]) // // Apply affinities to the range of P2 registers beginning with P1. // Take the affinities from the Table object in P4. If any value // cannot be coerced into the correct type, then raise an error. // // This opcode is similar to OP_Affinity except that this opcode // forces the register type to the Table column type. This is used // to implement "strict affinity". // // GENERATED ALWAYS AS ... STATIC columns are only checked if P3 // is zero. When P3 is non-zero, no type checking occurs for // static generated columns. Virtual columns are computed at query time // and so they are never checked. // // Preconditions: // // <ul> // <li> P2 should be the number of non-virtual columns in the // table of P4. // <li> Table P4 should be a STRICT table. // </ul> // // If any precondition is false, an assertion fault occurs. case OP_TypeCheck: goto __72 // Opcode: Affinity P1 P2 * P4 * // Synopsis: affinity(r[P1@P2]) // // Apply affinities to a range of P2 registers starting with P1. // // P4 is a string that is P2 characters long. The N-th character of the // string indicates the column affinity that should be used for the N-th // memory cell in the range. case OP_Affinity: goto __73 // Opcode: MakeRecord P1 P2 P3 P4 * // Synopsis: r[P3]=mkrec(r[P1@P2]) // // Convert P2 registers beginning with P1 into the [record format] // use as a data record in a database table or as a key // in an index. The OP_Column opcode can decode the record later. // // P4 may be a string that is P2 characters long. The N-th character of the // string indicates the column affinity that should be used for the N-th // field of the index key. // // The mapping from character to affinity is given by the SQLITE_AFF_ // macros defined in sqliteInt.h. // // If P4 is NULL then all index fields have the affinity BLOB. // // The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM // compile-time option is enabled: // // * If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index // of the right-most table that can be null-trimmed. // // * If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value // OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to // accept no-change records with serial_type 10. This value is // only used inside an assert() and does not affect the end result. case OP_MakeRecord: goto __74 // Opcode: Count P1 P2 P3 * * // Synopsis: r[P2]=count() // // Store the number of entries (an integer value) in the table or index // opened by cursor P1 in register P2. // // If P3==0, then an exact count is obtained, which involves visiting // every btree page of the table. But if P3 is non-zero, an estimate // is returned based on the current cursor position. case OP_Count: goto __75 // Opcode: Savepoint P1 * * P4 * // // Open, release or rollback the savepoint named by parameter P4, depending // on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN). // To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE). // To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK). case OP_Savepoint: goto __76 // Opcode: AutoCommit P1 P2 * * * // // Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll // back any currently active btree transactions. If there are any active // VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if // there are active writing VMs or active VMs that use shared cache. // // This instruction causes the VM to halt. case OP_AutoCommit: goto __77 // Opcode: Transaction P1 P2 P3 P4 P5 // // Begin a transaction on database P1 if a transaction is not already // active. // If P2 is non-zero, then a write-transaction is started, or if a // read-transaction is already active, it is upgraded to a write-transaction. // If P2 is zero, then a read-transaction is started. If P2 is 2 or more // then an exclusive transaction is started. // // P1 is the index of the database file on which the transaction is // started. Index 0 is the main database file and index 1 is the // file used for temporary tables. Indices of 2 or more are used for // attached databases. // // If a write-transaction is started and the Vdbe.usesStmtJournal flag is // true (this flag is set if the Vdbe may modify more than one row and may // throw an ABORT exception), a statement transaction may also be opened. // More specifically, a statement transaction is opened iff the database // connection is currently not in autocommit mode, or if there are other // active statements. A statement transaction allows the changes made by this // VDBE to be rolled back after an error without having to roll back the // entire transaction. If no error is encountered, the statement transaction // will automatically commit when the VDBE halts. // // If P5!=0 then this opcode also checks the schema cookie against P3 // and the schema generation counter against P4. // The cookie changes its value whenever the database schema changes. // This operation is used to detect when that the cookie has changed // and that the current process needs to reread the schema. If the schema // cookie in P3 differs from the schema cookie in the database header or // if the schema generation counter in P4 differs from the current // generation counter, then an SQLITE_SCHEMA error is raised and execution // halts. The sqlite3_step() wrapper function might then reprepare the // statement and rerun it from the beginning. case OP_Transaction: goto __78 // Opcode: ReadCookie P1 P2 P3 * * // // Read cookie number P3 from database P1 and write it into register P2. // P3==1 is the schema version. P3==2 is the database format. // P3==3 is the recommended pager cache size, and so forth. P1==0 is // the main database file and P1==1 is the database file used to store // temporary tables. // // There must be a read-lock on the database (either a transaction // must be started or there must be an open cursor) before // executing this instruction. case OP_ReadCookie: goto __79 // Opcode: SetCookie P1 P2 P3 * P5 // // Write the integer value P3 into cookie number P2 of database P1. // P2==1 is the schema version. P2==2 is the database format. // P2==3 is the recommended pager cache // size, and so forth. P1==0 is the main database file and P1==1 is the // database file used to store temporary tables. // // A transaction must be started before executing this opcode. // // If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal // schema version is set to P3-P5. The "PRAGMA schema_version=N" statement // has P5 set to 1, so that the internal schema version will be different // from the database schema version, resulting in a schema reset. case OP_SetCookie: goto __80 // Opcode: OpenRead P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // Open a read-only cursor for the database table whose root page is // P2 in a database file. The database file is determined by P3. // P3==0 means the main database, P3==1 means the database used for // temporary tables, and P3>1 means used the corresponding attached // database. Give the new cursor an identifier of P1. The P1 // values need not be contiguous but all P1 values should be small integers. // It is an error for P1 to be negative. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // </ul> // // The P4 value may be either an integer (P4_INT32) or a pointer to // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo // object, then table being opened must be an [index b-tree] where the // KeyInfo object defines the content and collating // sequence of that index b-tree. Otherwise, if P4 is an integer // value, then the table being opened must be a [table b-tree] with a // number of columns no less than the value of P4. // // See also: OpenWrite, ReopenIdx // Opcode: ReopenIdx P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // The ReopenIdx opcode works like OP_OpenRead except that it first // checks to see if the cursor on P1 is already open on the same // b-tree and if it is this opcode becomes a no-op. In other words, // if the cursor is already open, do not reopen it. // // The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ // and with P4 being a P4_KEYINFO object. Furthermore, the P3 value must // be the same as every other ReopenIdx or OpenRead for the same cursor // number. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // </ul> // // See also: OP_OpenRead, OP_OpenWrite // Opcode: OpenWrite P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // Open a read/write cursor named P1 on the table or index whose root // page is P2 (or whose root page is held in register P2 if the // OPFLAG_P2ISREG bit is set in P5 - see below). // // The P4 value may be either an integer (P4_INT32) or a pointer to // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo // object, then table being opened must be an [index b-tree] where the // KeyInfo object defines the content and collating // sequence of that index b-tree. Otherwise, if P4 is an integer // value, then the table being opened must be a [table b-tree] with a // number of columns no less than the value of P4. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // <li> <b>0x08 OPFLAG_FORDELETE</b>: This cursor is used only to seek // and subsequently delete entries in an index btree. This is a // hint to the storage engine that the storage engine is allowed to // ignore. The hint is not used by the official SQLite b*tree storage // engine, but is used by COMDB2. // <li> <b>0x10 OPFLAG_P2ISREG</b>: Use the content of register P2 // as the root page, not the value of P2 itself. // </ul> // // This instruction works like OpenRead except that it opens the cursor // in read/write mode. // // See also: OP_OpenRead, OP_ReopenIdx case OP_ReopenIdx: goto __81 // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen case OP_OpenRead: goto __82 case OP_OpenWrite: goto __83 // Opcode: OpenDup P1 P2 * * * // // Open a new cursor P1 that points to the same ephemeral table as // cursor P2. The P2 cursor must have been opened by a prior OP_OpenEphemeral // opcode. Only ephemeral cursors may be duplicated. // // Duplicate ephemeral cursors are used for self-joins of materialized views. case OP_OpenDup: goto __84 // Opcode: OpenEphemeral P1 P2 P3 P4 P5 // Synopsis: nColumn=P2 // // Open a new cursor P1 to a transient table. // The cursor is always opened read/write even if // the main database is read-only. The ephemeral // table is deleted automatically when the cursor is closed. // // If the cursor P1 is already opened on an ephemeral table, the table // is cleared (all content is erased). // // P2 is the number of columns in the ephemeral table. // The cursor points to a BTree table if P4==0 and to a BTree index // if P4 is not 0. If P4 is not NULL, it points to a KeyInfo structure // that defines the format of keys in the index. // // The P5 parameter can be a mask of the BTREE_* flags defined // in btree.h. These flags control aspects of the operation of // the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are // added automatically. // // If P3 is positive, then reg[P3] is modified slightly so that it // can be used as zero-length data for OP_Insert. This is an optimization // that avoids an extra OP_Blob opcode to initialize that register. // Opcode: OpenAutoindex P1 P2 * P4 * // Synopsis: nColumn=P2 // // This opcode works the same as OP_OpenEphemeral. It has a // different name to distinguish its use. Tables created using // by this opcode will be used for automatically created transient // indices in joins. case OP_OpenAutoindex: goto __85 case OP_OpenEphemeral: goto __86 // Opcode: SorterOpen P1 P2 P3 P4 * // // This opcode works like OP_OpenEphemeral except that it opens // a transient index that is specifically designed to sort large // tables using an external merge-sort algorithm. // // If argument P3 is non-zero, then it indicates that the sorter may // assume that a stable sort considering the first P3 fields of each // key is sufficient to produce the required results. case OP_SorterOpen: goto __87 // Opcode: SequenceTest P1 P2 * * * // Synopsis: if( cursor[P1].ctr++ ) pc = P2 // // P1 is a sorter cursor. If the sequence counter is currently zero, jump // to P2. Regardless of whether or not the jump is taken, increment the // the sequence value. case OP_SequenceTest: goto __88 // Opcode: OpenPseudo P1 P2 P3 * * // Synopsis: P3 columns in r[P2] // // Open a new cursor that points to a fake table that contains a single // row of data. The content of that one row is the content of memory // register P2. In other words, cursor P1 becomes an alias for the // MEM_Blob content contained in register P2. // // A pseudo-table created by this opcode is used to hold a single // row output from the sorter so that the row can be decomposed into // individual columns using the OP_Column opcode. The OP_Column opcode // is the only cursor opcode that works with a pseudo-table. // // P3 is the number of fields in the records that will be stored by // the pseudo-table. case OP_OpenPseudo: goto __89 // Opcode: Close P1 * * * * // // Close a cursor previously opened as P1. If P1 is not // currently open, this instruction is a no-op. case OP_Close: goto __90 // Opcode: SeekGE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as the key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the smallest entry that // is greater than or equal to the key value. If there are no records // greater than or equal to the key and P2 is not zero, then jump to P2. // // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this // opcode will either land on a record that exactly matches the key, or // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, // this opcode must be followed by an IdxLE opcode with the same arguments. // The IdxGT opcode will be skipped if this opcode succeeds, but the // IdxGT opcode will be used on subsequent loop iterations. The // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this // is an equality search. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. // // See also: Found, NotFound, SeekLt, SeekGt, SeekLe // Opcode: SeekGT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the smallest entry that // is greater than the key value. If there are no records greater than // the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. // // See also: Found, NotFound, SeekLt, SeekGe, SeekLe // Opcode: SeekLT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the largest entry that // is less than the key value. If there are no records less than // the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. // // See also: Found, NotFound, SeekGt, SeekGe, SeekLe // Opcode: SeekLE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the largest entry that // is less than or equal to the key value. If there are no records // less than or equal to the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. // // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this // opcode will either land on a record that exactly matches the key, or // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, // this opcode must be followed by an IdxLE opcode with the same arguments. // The IdxGE opcode will be skipped if this opcode succeeds, but the // IdxGE opcode will be used on subsequent loop iterations. The // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this // is an equality search. // // See also: Found, NotFound, SeekGt, SeekGe, SeekLt case OP_SeekLT: goto __91 // jump, in3, group case OP_SeekLE: goto __92 // jump, in3, group case OP_SeekGE: goto __93 // jump, in3, group case OP_SeekGT: goto __94 // Opcode: SeekScan P1 P2 * * * // Synopsis: Scan-ahead up to P1 rows // // This opcode is a prefix opcode to OP_SeekGE. In other words, this // opcode must be immediately followed by OP_SeekGE. This constraint is // checked by assert() statements. // // This opcode uses the P1 through P4 operands of the subsequent // OP_SeekGE. In the text that follows, the operands of the subsequent // OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4. Only // the P1 and P2 operands of this opcode are also used, and are called // This.P1 and This.P2. // // This opcode helps to optimize IN operators on a multi-column index // where the IN operator is on the later terms of the index by avoiding // unnecessary seeks on the btree, substituting steps to the next row // of the b-tree instead. A correct answer is obtained if this opcode // is omitted or is a no-op. // // The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which // is the desired entry that we want the cursor SeekGE.P1 to be pointing // to. Call this SeekGE.P4/P5 row the "target". // // If the SeekGE.P1 cursor is not currently pointing to a valid row, // then this opcode is a no-op and control passes through into the OP_SeekGE. // // If the SeekGE.P1 cursor is pointing to a valid row, then that row // might be the target row, or it might be near and slightly before the // target row. This opcode attempts to position the cursor on the target // row by, perhaps by invoking sqlite3BtreeStep() on the cursor // between 0 and This.P1 times. // // There are three possible outcomes from this opcode:<ol> // // <li> If after This.P1 steps, the cursor is still pointing to a place that // is earlier in the btree than the target row, then fall through // into the subsquence OP_SeekGE opcode. // // <li> If the cursor is successfully moved to the target row by 0 or more // sqlite3BtreeNext() calls, then jump to This.P2, which will land just // past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE. // // <li> If the cursor ends up past the target row (indicating the the target // row does not exist in the btree) then jump to SeekOP.P2. // </ol> case OP_SeekScan: goto __95 // Opcode: SeekHit P1 P2 P3 * * // Synopsis: set P2<=seekHit<=P3 // // Increase or decrease the seekHit value for cursor P1, if necessary, // so that it is no less than P2 and no greater than P3. // // The seekHit integer represents the maximum of terms in an index for which // there is known to be at least one match. If the seekHit value is smaller // than the total number of equality terms in an index lookup, then the // OP_IfNoHope opcode might run to see if the IN loop can be abandoned // early, thus saving work. This is part of the IN-early-out optimization. // // P1 must be a valid b-tree cursor. case OP_SeekHit: goto __96 // Opcode: IfNotOpen P1 P2 * * * // Synopsis: if( !csr[P1] ) goto P2 // // If cursor P1 is not open, jump to instruction P2. Otherwise, fall through. case OP_IfNotOpen: goto __97 // Opcode: Found P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // is a prefix of any entry in P1 then a jump is made to P2 and // P1 is left pointing at the matching entry. // // This operation leaves the cursor in a state where it can be // advanced in the forward direction. The Next instruction will work, // but not the Prev instruction. // // See also: NotFound, NoConflict, NotExists. SeekGe // Opcode: NotFound P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // is not the prefix of any entry in P1 then a jump is made to P2. If P1 // does contain an entry whose prefix matches the P3/P4 record then control // falls through to the next instruction and P1 is left pointing at the // matching entry. // // This operation leaves the cursor in a state where it cannot be // advanced in either direction. In other words, the Next and Prev // opcodes do not work after this operation. // // See also: Found, NotExists, NoConflict, IfNoHope // Opcode: IfNoHope P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // Register P3 is the first of P4 registers that form an unpacked // record. Cursor P1 is an index btree. P2 is a jump destination. // In other words, the operands to this opcode are the same as the // operands to OP_NotFound and OP_IdxGT. // // This opcode is an optimization attempt only. If this opcode always // falls through, the correct answer is still obtained, but extra works // is performed. // // A value of N in the seekHit flag of cursor P1 means that there exists // a key P3:N that will match some record in the index. We want to know // if it is possible for a record P3:P4 to match some record in the // index. If it is not possible, we can skips some work. So if seekHit // is less than P4, attempt to find out if a match is possible by running // OP_NotFound. // // This opcode is used in IN clause processing for a multi-column key. // If an IN clause is attached to an element of the key other than the // left-most element, and if there are no matches on the most recent // seek over the whole key, then it might be that one of the key element // to the left is prohibiting a match, and hence there is "no hope" of // any match regardless of how many IN clause elements are checked. // In such a case, we abandon the IN clause search early, using this // opcode. The opcode name comes from the fact that the // jump is taken if there is "no hope" of achieving a match. // // See also: NotFound, SeekHit // Opcode: NoConflict P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // contains any NULL value, jump immediately to P2. If all terms of the // record are not-NULL then a check is done to determine if any row in the // P1 index btree has a matching key prefix. If there are no matches, jump // immediately to P2. If there is a match, fall through and leave the P1 // cursor pointing to the matching row. // // This opcode is similar to OP_NotFound with the exceptions that the // branch is always taken if any part of the search key input is NULL. // // This operation leaves the cursor in a state where it cannot be // advanced in either direction. In other words, the Next and Prev // opcodes do not work after this operation. // // See also: NotFound, Found, NotExists case OP_IfNoHope: goto __98 case OP_NoConflict: goto __99 // jump, in3 case OP_NotFound: goto __100 // jump, in3 case OP_Found: goto __101 // Opcode: SeekRowid P1 P2 P3 * * // Synopsis: intkey=r[P3] // // P1 is the index of a cursor open on an SQL table btree (with integer // keys). If register P3 does not contain an integer or if P1 does not // contain a record with rowid P3 then jump immediately to P2. // Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain // a record with rowid P3 then // leave the cursor pointing at that record and fall through to the next // instruction. // // The OP_NotExists opcode performs the same operation, but with OP_NotExists // the P3 register must be guaranteed to contain an integer value. With this // opcode, register P3 might not contain an integer. // // The OP_NotFound opcode performs the same operation on index btrees // (with arbitrary multi-value keys). // // This opcode leaves the cursor in a state where it cannot be advanced // in either direction. In other words, the Next and Prev opcodes will // not work following this opcode. // // See also: Found, NotFound, NoConflict, SeekRowid // Opcode: NotExists P1 P2 P3 * * // Synopsis: intkey=r[P3] // // P1 is the index of a cursor open on an SQL table btree (with integer // keys). P3 is an integer rowid. If P1 does not contain a record with // rowid P3 then jump immediately to P2. Or, if P2 is 0, raise an // SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then // leave the cursor pointing at that record and fall through to the next // instruction. // // The OP_SeekRowid opcode performs the same operation but also allows the // P3 register to contain a non-integer value, in which case the jump is // always taken. This opcode requires that P3 always contain an integer. // // The OP_NotFound opcode performs the same operation on index btrees // (with arbitrary multi-value keys). // // This opcode leaves the cursor in a state where it cannot be advanced // in either direction. In other words, the Next and Prev opcodes will // not work following this opcode. // // See also: Found, NotFound, NoConflict, SeekRowid case OP_SeekRowid: goto __102 case OP_NotExists: goto __103 // Opcode: Sequence P1 P2 * * * // Synopsis: r[P2]=cursor[P1].ctr++ // // Find the next available sequence number for cursor P1. // Write the sequence number into register P2. // The sequence number on the cursor is incremented after this // instruction. case OP_Sequence: goto __104 // Opcode: NewRowid P1 P2 P3 * * // Synopsis: r[P2]=rowid // // Get a new integer record number (a.k.a "rowid") used as the key to a table. // The record number is not previously used as a key in the database // table that cursor P1 points to. The new record number is written // written to register P2. // // If P3>0 then P3 is a register in the root frame of this VDBE that holds // the largest previously generated record number. No new record numbers are // allowed to be less than this value. When this value reaches its maximum, // an SQLITE_FULL error is generated. The P3 register is updated with the ' // generated record number. This P3 mechanism is used to help implement the // AUTOINCREMENT feature. case OP_NewRowid: goto __105 // Opcode: Insert P1 P2 P3 P4 P5 // Synopsis: intkey=r[P3] data=r[P2] // // Write an entry into the table of cursor P1. A new entry is // created if it doesn't already exist or the data for an existing // entry is overwritten. The data is the value MEM_Blob stored in register // number P2. The key is stored in register P3. The key must // be a MEM_Int. // // If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is // incremented (otherwise not). If the OPFLAG_LASTROWID flag of P5 is set, // then rowid is stored for subsequent return by the // sqlite3_last_insert_rowid() function (otherwise it is unmodified). // // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might // run faster by avoiding an unnecessary seek on cursor P1. However, // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior // seeks on the cursor or if the most recent seek used a key equal to P3. // // If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an // UPDATE operation. Otherwise (if the flag is clear) then this opcode // is part of an INSERT operation. The difference is only important to // the update hook. // // Parameter P4 may point to a Table structure, or may be NULL. If it is // not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked // following a successful insert. // // (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically // allocated, then ownership of P2 is transferred to the pseudo-cursor // and register P2 becomes ephemeral. If the cursor is changed, the // value of register P2 will then change. Make sure this does not // cause any problems.) // // This instruction only works on tables. The equivalent instruction // for indices is OP_IdxInsert. case OP_Insert: goto __106 // Opcode: RowCell P1 P2 P3 * * // // P1 and P2 are both open cursors. Both must be opened on the same type // of table - intkey or index. This opcode is used as part of copying // the current row from P2 into P1. If the cursors are opened on intkey // tables, register P3 contains the rowid to use with the new record in // P1. If they are opened on index tables, P3 is not used. // // This opcode must be followed by either an Insert or InsertIdx opcode // with the OPFLAG_PREFORMAT flag set to complete the insert operation. case OP_RowCell: goto __107 // Opcode: Delete P1 P2 P3 P4 P5 // // Delete the record at which the P1 cursor is currently pointing. // // If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then // the cursor will be left pointing at either the next or the previous // record in the table. If it is left pointing at the next record, then // the next Next instruction will be a no-op. As a result, in this case // it is ok to delete a record from within a Next loop. If // OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be // left in an undefined state. // // If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this // delete one of several associated with deleting a table row and all its // associated index entries. Exactly one of those deletes is the "primary" // delete. The others are all on OPFLAG_FORDELETE cursors or else are // marked with the AUXDELETE flag. // // If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row // change count is incremented (otherwise not). // // P1 must not be pseudo-table. It has to be a real table with // multiple rows. // // If P4 is not NULL then it points to a Table object. In this case either // the update or pre-update hook, or both, may be invoked. The P1 cursor must // have been positioned using OP_NotFound prior to invoking this opcode in // this case. Specifically, if one is configured, the pre-update hook is // invoked if P4 is not NULL. The update-hook is invoked if one is configured, // P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2. // // If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address // of the memory cell that contains the value that the rowid of the row will // be set to by the update. case OP_Delete: goto __108 // Opcode: ResetCount * * * * * // // The value of the change counter is copied to the database handle // change counter (returned by subsequent calls to sqlite3_changes()). // Then the VMs internal change counter resets to 0. // This is used by trigger programs. case OP_ResetCount: goto __109 // Opcode: SorterCompare P1 P2 P3 P4 // Synopsis: if key(P1)!=trim(r[P3],P4) goto P2 // // P1 is a sorter cursor. This instruction compares a prefix of the // record blob in register P3 against a prefix of the entry that // the sorter cursor currently points to. Only the first P4 fields // of r[P3] and the sorter record are compared. // // If either P3 or the sorter contains a NULL in one of their significant // fields (not counting the P4 fields at the end which are ignored) then // the comparison is assumed to be equal. // // Fall through to next instruction if the two records compare equal to // each other. Jump to P2 if they are different. case OP_SorterCompare: goto __110 // Opcode: SorterData P1 P2 P3 * * // Synopsis: r[P2]=data // // Write into register P2 the current sorter data for sorter cursor P1. // Then clear the column header cache on cursor P3. // // This opcode is normally use to move a record out of the sorter and into // a register that is the source for a pseudo-table cursor created using // OpenPseudo. That pseudo-table cursor is the one that is identified by // parameter P3. Clearing the P3 column cache as part of this opcode saves // us from having to issue a separate NullRow instruction to clear that cache. case OP_SorterData: goto __111 // Opcode: RowData P1 P2 P3 * * // Synopsis: r[P2]=data // // Write into register P2 the complete row content for the row at // which cursor P1 is currently pointing. // There is no interpretation of the data. // It is just copied onto the P2 register exactly as // it is found in the database file. // // If cursor P1 is an index, then the content is the key of the row. // If cursor P2 is a table, then the content extracted is the data. // // If the P1 cursor must be pointing to a valid row (not a NULL row) // of a real table, not a pseudo-table. // // If P3!=0 then this opcode is allowed to make an ephemeral pointer // into the database page. That means that the content of the output // register will be invalidated as soon as the cursor moves - including // moves caused by other cursors that "save" the current cursors // position in order that they can write to the same table. If P3==0 // then a copy of the data is made into memory. P3!=0 is faster, but // P3==0 is safer. // // If P3!=0 then the content of the P2 register is unsuitable for use // in OP_Result and any OP_Result will invalidate the P2 register content. // The P2 register content is invalidated by opcodes like OP_Function or // by any use of another cursor pointing to the same table. case OP_RowData: goto __112 // Opcode: Rowid P1 P2 * * * // Synopsis: r[P2]=rowid // // Store in register P2 an integer which is the key of the table entry that // P1 is currently point to. // // P1 can be either an ordinary table or a virtual table. There used to // be a separate OP_VRowid opcode for use with virtual tables, but this // one opcode now works for both table types. case OP_Rowid: goto __113 // Opcode: NullRow P1 * * * * // // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. // // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) // just reset the cache for that cursor. This causes the row of // content held by the pseudo-cursor to be reparsed. case OP_NullRow: goto __114 // Opcode: SeekEnd P1 * * * * // // Position cursor P1 at the end of the btree for the purpose of // appending a new entry onto the btree. // // It is assumed that the cursor is used only for appending and so // if the cursor is valid, then the cursor must already be pointing // at the end of the btree and so no changes are made to // the cursor. // Opcode: Last P1 P2 * * * // // The next use of the Rowid or Column or Prev instruction for P1 // will refer to the last entry in the database table or index. // If the table or index is empty and P2>0, then jump immediately to P2. // If P2 is 0 or if the table or index is not empty, fall through // to the following instruction. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. case OP_SeekEnd: goto __115 case OP_Last: goto __116 // Opcode: IfSmaller P1 P2 P3 * * // // Estimate the number of rows in the table P1. Jump to P2 if that // estimate is less than approximately 2**(0.1*P3). case OP_IfSmaller: goto __117 // Opcode: SorterSort P1 P2 * * * // // After all records have been inserted into the Sorter object // identified by P1, invoke this opcode to actually do the sorting. // Jump to P2 if there are no records to be sorted. // // This opcode is an alias for OP_Sort and OP_Rewind that is used // for Sorter objects. // Opcode: Sort P1 P2 * * * // // This opcode does exactly the same thing as OP_Rewind except that // it increments an undocumented global variable used for testing. // // Sorting is accomplished by writing records into a sorting index, // then rewinding that index and playing it back from beginning to // end. We use the OP_Sort opcode instead of OP_Rewind to do the // rewinding so that the global variable will be incremented and // regression tests can determine whether or not the optimizer is // correctly optimizing out sorts. case OP_SorterSort: goto __118 // jump case OP_Sort: goto __119 // Opcode: Rewind P1 P2 * * * // // The next use of the Rowid or Column or Next instruction for P1 // will refer to the first entry in the database table or index. // If the table or index is empty, jump immediately to P2. // If the table or index is not empty, fall through to the following // instruction. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. case OP_Rewind: goto __120 // Opcode: Next P1 P2 P3 P4 P5 // // Advance cursor P1 so that it points to the next key/data pair in its // table or index. If there are no more key/value pairs then fall through // to the following instruction. But if the cursor advance was successful, // jump immediately to P2. // // The Next opcode is only valid following an SeekGT, SeekGE, or // OP_Rewind opcode used to position the cursor. Next is not allowed // to follow SeekLT, SeekLE, or OP_Last. // // The P1 cursor must be for a real table, not a pseudo-table. P1 must have // been opened prior to this opcode or the program will segfault. // // The P3 value is a hint to the btree implementation. If P3==1, that // means P1 is an SQL index and that this instruction could have been // omitted if that index had been unique. P3 is usually 0. P3 is // always either 0 or 1. // // P4 is always of type P4_ADVANCE. The function pointer points to // sqlite3BtreeNext(). // // If P5 is positive and the jump is taken, then event counter // number P5-1 in the prepared statement is incremented. // // See also: Prev // Opcode: Prev P1 P2 P3 P4 P5 // // Back up cursor P1 so that it points to the previous key/data pair in its // table or index. If there is no previous key/value pairs then fall through // to the following instruction. But if the cursor backup was successful, // jump immediately to P2. // // // The Prev opcode is only valid following an SeekLT, SeekLE, or // OP_Last opcode used to position the cursor. Prev is not allowed // to follow SeekGT, SeekGE, or OP_Rewind. // // The P1 cursor must be for a real table, not a pseudo-table. If P1 is // not open then the behavior is undefined. // // The P3 value is a hint to the btree implementation. If P3==1, that // means P1 is an SQL index and that this instruction could have been // omitted if that index had been unique. P3 is usually 0. P3 is // always either 0 or 1. // // P4 is always of type P4_ADVANCE. The function pointer points to // sqlite3BtreePrevious(). // // If P5 is positive and the jump is taken, then event counter // number P5-1 in the prepared statement is incremented. // Opcode: SorterNext P1 P2 * * P5 // // This opcode works just like OP_Next except that P1 must be a // sorter object for which the OP_SorterSort opcode has been // invoked. This opcode advances the cursor to the next sorted // record, or jumps to P2 if there are no more sorted records. case OP_SorterNext: goto __121 case OP_Prev: goto __122 // jump case OP_Next: goto __123 // Opcode: IdxInsert P1 P2 P3 P4 P5 // Synopsis: key=r[P2] // // Register P2 holds an SQL index key made using the // MakeRecord instructions. This opcode writes that key // into the index P1. Data for the entry is nil. // // If P4 is not zero, then it is the number of values in the unpacked // key of reg(P2). In that case, P3 is the index of the first register // for the unpacked key. The availability of the unpacked key can sometimes // be an optimization. // // If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer // that this insert is likely to be an append. // // If P5 has the OPFLAG_NCHANGE bit set, then the change counter is // incremented by this instruction. If the OPFLAG_NCHANGE bit is clear, // then the change counter is unchanged. // // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might // run faster by avoiding an unnecessary seek on cursor P1. However, // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior // seeks on the cursor or if the most recent seek used a key equivalent // to P2. // // This instruction only works for indices. The equivalent instruction // for tables is OP_Insert. case OP_IdxInsert: goto __124 // Opcode: SorterInsert P1 P2 * * * // Synopsis: key=r[P2] // // Register P2 holds an SQL index key made using the // MakeRecord instructions. This opcode writes that key // into the sorter P1. Data for the entry is nil. case OP_SorterInsert: goto __125 // Opcode: IdxDelete P1 P2 P3 * P5 // Synopsis: key=r[P2@P3] // // The content of P3 registers starting at register P2 form // an unpacked index key. This opcode removes that entry from the // index opened by cursor P1. // // If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error // if no matching index entry is found. This happens when running // an UPDATE or DELETE statement and the index entry to be updated // or deleted is not found. For some uses of IdxDelete // (example: the EXCEPT operator) it does not matter that no matching // entry is found. For those cases, P5 is zero. Also, do not raise // this (self-correcting and non-critical) error if in writable_schema mode. case OP_IdxDelete: goto __126 // Opcode: DeferredSeek P1 * P3 P4 * // Synopsis: Move P3 to P1.rowid if needed // // P1 is an open index cursor and P3 is a cursor on the corresponding // table. This opcode does a deferred seek of the P3 table cursor // to the row that corresponds to the current row of P1. // // This is a deferred seek. Nothing actually happens until // the cursor is used to read a record. That way, if no reads // occur, no unnecessary I/O happens. // // P4 may be an array of integers (type P4_INTARRAY) containing // one entry for each column in the P3 table. If array entry a(i) // is non-zero, then reading column a(i)-1 from cursor P3 is // equivalent to performing the deferred seek and then reading column i // from P1. This information is stored in P3 and used to redirect // reads against P3 over to P1, thus possibly avoiding the need to // seek and read cursor P3. // Opcode: IdxRowid P1 P2 * * * // Synopsis: r[P2]=rowid // // Write into register P2 an integer which is the last entry in the record at // the end of the index key pointed to by cursor P1. This integer should be // the rowid of the table entry to which this index entry points. // // See also: Rowid, MakeRecord. case OP_DeferredSeek: goto __127 case OP_IdxRowid: goto __128 // Opcode: FinishSeek P1 * * * * // // If cursor P1 was previously moved via OP_DeferredSeek, complete that // seek operation now, without further delay. If the cursor seek has // already occurred, this instruction is a no-op. case OP_FinishSeek: goto __129 // Opcode: IdxGE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY. Compare this key value against the index // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID // fields at the end. // // If the P1 index entry is greater than or equal to the key value // then jump to P2. Otherwise fall through to the next instruction. // Opcode: IdxGT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY. Compare this key value against the index // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID // fields at the end. // // If the P1 index entry is greater than the key value // then jump to P2. Otherwise fall through to the next instruction. // Opcode: IdxLT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY or ROWID. Compare this key value against // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or // ROWID on the P1 index. // // If the P1 index entry is less than the key value then jump to P2. // Otherwise fall through to the next instruction. // Opcode: IdxLE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY or ROWID. Compare this key value against // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or // ROWID on the P1 index. // // If the P1 index entry is less than or equal to the key value then jump // to P2. Otherwise fall through to the next instruction. case OP_IdxLE: goto __130 // jump case OP_IdxGT: goto __131 // jump case OP_IdxLT: goto __132 // jump case OP_IdxGE: goto __133 // Opcode: Destroy P1 P2 P3 * * // // Delete an entire database table or index whose root page in the database // file is given by P1. // // The table being destroyed is in the main database file if P3==0. If // P3==1 then the table to be clear is in the auxiliary database file // that is used to store tables create using CREATE TEMPORARY TABLE. // // If AUTOVACUUM is enabled then it is possible that another root page // might be moved into the newly deleted root page in order to keep all // root pages contiguous at the beginning of the database. The former // value of the root page that moved - its value before the move occurred - // is stored in register P2. If no page movement was required (because the // table being dropped was already the last one in the database) then a // zero is stored in register P2. If AUTOVACUUM is disabled then a zero // is stored in register P2. // // This opcode throws an error if there are any active reader VMs when // it is invoked. This is done to avoid the difficulty associated with // updating existing cursors when a root page is moved in an AUTOVACUUM // database. This error is thrown even if the database is not an AUTOVACUUM // db in order to avoid introducing an incompatibility between autovacuum // and non-autovacuum modes. // // See also: Clear case OP_Destroy: goto __134 // Opcode: Clear P1 P2 P3 // // Delete all contents of the database table or index whose root page // in the database file is given by P1. But, unlike Destroy, do not // remove the table or index from the database file. // // The table being clear is in the main database file if P2==0. If // P2==1 then the table to be clear is in the auxiliary database file // that is used to store tables create using CREATE TEMPORARY TABLE. // // If the P3 value is non-zero, then the row change count is incremented // by the number of rows in the table being cleared. If P3 is greater // than zero, then the value stored in register P3 is also incremented // by the number of rows in the table being cleared. // // See also: Destroy case OP_Clear: goto __135 // Opcode: ResetSorter P1 * * * * // // Delete all contents from the ephemeral table or sorter // that is open on cursor P1. // // This opcode only works for cursors used for sorting and // opened with OP_OpenEphemeral or OP_SorterOpen. case OP_ResetSorter: goto __136 // Opcode: CreateBtree P1 P2 P3 * * // Synopsis: r[P2]=root iDb=P1 flags=P3 // // Allocate a new b-tree in the main database file if P1==0 or in the // TEMP database file if P1==1 or in an attached database if // P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table // it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table. // The root page number of the new b-tree is stored in register P2. case OP_CreateBtree: goto __137 // Opcode: SqlExec * * * P4 * // // Run the SQL statement or statements specified in the P4 string. case OP_SqlExec: goto __138 // Opcode: ParseSchema P1 * * P4 * // // Read and parse all entries from the schema table of database P1 // that match the WHERE clause P4. If P4 is a NULL pointer, then the // entire schema for P1 is reparsed. // // This opcode invokes the parser to create a new virtual machine, // then runs the new virtual machine. It is thus a re-entrant opcode. case OP_ParseSchema: goto __139 // Opcode: LoadAnalysis P1 * * * * // // Read the sqlite_stat1 table for database P1 and load the content // of that table into the internal index hash table. This will cause // the analysis to be used when preparing all subsequent queries. case OP_LoadAnalysis: goto __140 // Opcode: DropTable P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the table named P4 in database P1. This is called after a table // is dropped from disk (using the Destroy opcode) in order to keep // the internal representation of the // schema consistent with what is on disk. case OP_DropTable: goto __141 // Opcode: DropIndex P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the index named P4 in database P1. This is called after an index // is dropped from disk (using the Destroy opcode) // in order to keep the internal representation of the // schema consistent with what is on disk. case OP_DropIndex: goto __142 // Opcode: DropTrigger P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the trigger named P4 in database P1. This is called after a trigger // is dropped from disk (using the Destroy opcode) in order to keep // the internal representation of the // schema consistent with what is on disk. case OP_DropTrigger: goto __143 // Opcode: IntegrityCk P1 P2 P3 P4 P5 // // Do an analysis of the currently open database. Store in // register P1 the text of an error message describing any problems. // If no problems are found, store a NULL in register P1. // // The register P3 contains one less than the maximum number of allowed errors. // At most reg(P3) errors will be reported. // In other words, the analysis stops as soon as reg(P1) errors are // seen. Reg(P1) is updated with the number of errors remaining. // // The root page numbers of all tables in the database are integers // stored in P4_INTARRAY argument. // // If P5 is not zero, the check is done on the auxiliary database // file, not the main database file. // // This opcode is used to implement the integrity_check pragma. case OP_IntegrityCk: goto __144 // Opcode: RowSetAdd P1 P2 * * * // Synopsis: rowset(P1)=r[P2] // // Insert the integer value held by register P2 into a RowSet object // held in register P1. // // An assertion fails if P2 is not an integer. case OP_RowSetAdd: goto __145 // Opcode: RowSetRead P1 P2 P3 * * // Synopsis: r[P3]=rowset(P1) // // Extract the smallest value from the RowSet object in P1 // and put that value into register P3. // Or, if RowSet object P1 is initially empty, leave P3 // unchanged and jump to instruction P2. case OP_RowSetRead: goto __146 // Opcode: RowSetTest P1 P2 P3 P4 // Synopsis: if r[P3] in rowset(P1) goto P2 // // Register P3 is assumed to hold a 64-bit integer value. If register P1 // contains a RowSet object and that RowSet object contains // the value held in P3, jump to register P2. Otherwise, insert the // integer in P3 into the RowSet and continue on to the // next opcode. // // The RowSet object is optimized for the case where sets of integers // are inserted in distinct phases, which each set contains no duplicates. // Each set is identified by a unique P4 value. The first set // must have P4==0, the final set must have P4==-1, and for all other sets // must have P4>0. // // This allows optimizations: (a) when P4==0 there is no need to test // the RowSet object for P3, as it is guaranteed not to contain it, // (b) when P4==-1 there is no need to insert the value, as it will // never be tested for, and (c) when a value that is part of set X is // inserted, there is no need to search to see if the same value was // previously inserted as part of set X (only if it was previously // inserted as part of some other set). case OP_RowSetTest: goto __147 // Opcode: Program P1 P2 P3 P4 P5 // // Execute the trigger program passed as P4 (type P4_SUBPROGRAM). // // P1 contains the address of the memory cell that contains the first memory // cell in an array of values used as arguments to the sub-program. P2 // contains the address to jump to if the sub-program throws an IGNORE // exception using the RAISE() function. Register P3 contains the address // of a memory cell in this (the parent) VM that is used to allocate the // memory required by the sub-vdbe at runtime. // // P4 is a pointer to the VM containing the trigger program. // // If P5 is non-zero, then recursive program invocation is enabled. case OP_Program: goto __148 // Opcode: Param P1 P2 * * * // // This opcode is only ever present in sub-programs called via the // OP_Program instruction. Copy a value currently stored in a memory // cell of the calling (parent) frame to cell P2 in the current frames // address space. This is used by trigger programs to access the new.* // and old.* values. // // The address of the cell in the parent frame is determined by adding // the value of the P1 argument to the value of the P1 argument to the // calling OP_Program instruction. case OP_Param: goto __149 // Opcode: FkCounter P1 P2 * * * // Synopsis: fkctr[P1]+=P2 // // Increment a "constraint counter" by P2 (P2 may be negative or positive). // If P1 is non-zero, the database constraint counter is incremented // (deferred foreign key constraints). Otherwise, if P1 is zero, the // statement counter is incremented (immediate foreign key constraints). case OP_FkCounter: goto __150 // Opcode: FkIfZero P1 P2 * * * // Synopsis: if fkctr[P1]==0 goto P2 // // This opcode tests if a foreign key constraint-counter is currently zero. // If so, jump to instruction P2. Otherwise, fall through to the next // instruction. // // If P1 is non-zero, then the jump is taken if the database constraint-counter // is zero (the one that counts deferred constraint violations). If P1 is // zero, the jump is taken if the statement constraint-counter is zero // (immediate foreign key constraint violations). case OP_FkIfZero: goto __151 // Opcode: MemMax P1 P2 * * * // Synopsis: r[P1]=max(r[P1],r[P2]) // // P1 is a register in the root frame of this VM (the root frame is // different from the current frame if this instruction is being executed // within a sub-program). Set the value of register P1 to the maximum of // its current value and the value in register P2. // // This instruction throws an error if the memory cell is not initially // an integer. case OP_MemMax: goto __152 // Opcode: IfPos P1 P2 P3 * * // Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 // // Register P1 must contain an integer. // If the value of register P1 is 1 or greater, subtract P3 from the // value in P1 and jump to P2. // // If the initial value of register P1 is less than 1, then the // value is unchanged and control passes through to the next instruction. case OP_IfPos: goto __153 // Opcode: OffsetLimit P1 P2 P3 * * // Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) // // This opcode performs a commonly used computation associated with // LIMIT and OFFSET process. r[P1] holds the limit counter. r[P3] // holds the offset counter. The opcode computes the combined value // of the LIMIT and OFFSET and stores that value in r[P2]. The r[P2] // value computed is the total number of rows that will need to be // visited in order to complete the query. // // If r[P3] is zero or negative, that means there is no OFFSET // and r[P2] is set to be the value of the LIMIT, r[P1]. // // if r[P1] is zero or negative, that means there is no LIMIT // and r[P2] is set to -1. // // Otherwise, r[P2] is set to the sum of r[P1] and r[P3]. case OP_OffsetLimit: goto __154 // Opcode: IfNotZero P1 P2 * * * // Synopsis: if r[P1]!=0 then r[P1]--, goto P2 // // Register P1 must contain an integer. If the content of register P1 is // initially greater than zero, then decrement the value in register P1. // If it is non-zero (negative or positive) and then also jump to P2. // If register P1 is initially zero, leave it unchanged and fall through. case OP_IfNotZero: goto __155 // Opcode: DecrJumpZero P1 P2 * * * // Synopsis: if (--r[P1])==0 goto P2 // // Register P1 must hold an integer. Decrement the value in P1 // and jump to P2 if the new value is exactly zero. case OP_DecrJumpZero: goto __156 // Opcode: AggStep * P2 P3 P4 P5 // Synopsis: accum=r[P3] step(r[P2@P5]) // // Execute the xStep function for an aggregate. // The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // Opcode: AggInverse * P2 P3 P4 P5 // Synopsis: accum=r[P3] inverse(r[P2@P5]) // // Execute the xInverse function for an aggregate. // The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // Opcode: AggStep1 P1 P2 P3 P4 P5 // Synopsis: accum=r[P3] step(r[P2@P5]) // // Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an // aggregate. The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // // This opcode is initially coded as OP_AggStep0. On first evaluation, // the FuncDef stored in P4 is converted into an sqlite3_context and // the opcode is changed. In this way, the initialization of the // sqlite3_context only happens once, instead of on each call to the // step function. case OP_AggInverse: goto __157 case OP_AggStep: goto __158 case OP_AggStep1: goto __159 // Opcode: AggFinal P1 P2 * P4 * // Synopsis: accum=r[P1] N=P2 // // P1 is the memory location that is the accumulator for an aggregate // or window function. Execute the finalizer function // for an aggregate and store the result in P1. // // P2 is the number of arguments that the step function takes and // P4 is a pointer to the FuncDef for this function. The P2 // argument is not used by this opcode. It is only there to disambiguate // functions that can take varying numbers of arguments. The // P4 argument is only needed for the case where // the step function was not previously called. // Opcode: AggValue * P2 P3 P4 * // Synopsis: r[P3]=value N=P2 // // Invoke the xValue() function and store the result in register P3. // // P2 is the number of arguments that the step function takes and // P4 is a pointer to the FuncDef for this function. The P2 // argument is not used by this opcode. It is only there to disambiguate // functions that can take varying numbers of arguments. The // P4 argument is only needed for the case where // the step function was not previously called. case OP_AggValue: goto __160 case OP_AggFinal: goto __161 // Opcode: Checkpoint P1 P2 P3 * * // // Checkpoint database P1. This is a no-op if P1 is not currently in // WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL, // RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns // SQLITE_BUSY or not, respectively. Write the number of pages in the // WAL after the checkpoint into mem[P3+1] and the number of pages // in the WAL that have been checkpointed after the checkpoint // completes into mem[P3+2]. However on an error, mem[P3+1] and // mem[P3+2] are initialized to -1. case OP_Checkpoint: goto __162 // Opcode: JournalMode P1 P2 P3 * * // // Change the journal mode of database P1 to P3. P3 must be one of the // PAGER_JOURNALMODE_XXX values. If changing between the various rollback // modes (delete, truncate, persist, off and memory), this is a simple // operation. No IO is required. // // If changing into or out of WAL mode the procedure is more complicated. // // Write a string containing the final journal-mode to register P2. case OP_JournalMode: goto __163 // Opcode: Vacuum P1 P2 * * * // // Vacuum the entire database P1. P1 is 0 for "main", and 2 or more // for an attached database. The "temp" database may not be vacuumed. // // If P2 is not zero, then it is a register holding a string which is // the file into which the result of vacuum should be written. When // P2 is zero, the vacuum overwrites the original database. case OP_Vacuum: goto __164 // Opcode: IncrVacuum P1 P2 * * * // // Perform a single step of the incremental vacuum procedure on // the P1 database. If the vacuum has finished, jump to instruction // P2. Otherwise, fall through to the next instruction. case OP_IncrVacuum: goto __165 // Opcode: Expire P1 P2 * * * // // Cause precompiled statements to expire. When an expired statement // is executed using sqlite3_step() it will either automatically // reprepare itself (if it was originally created using sqlite3_prepare_v2()) // or it will fail with SQLITE_SCHEMA. // // If P1 is 0, then all SQL statements become expired. If P1 is non-zero, // then only the currently executing statement is expired. // // If P2 is 0, then SQL statements are expired immediately. If P2 is 1, // then running SQL statements are allowed to continue to run to completion. // The P2==1 case occurs when a CREATE INDEX or similar schema change happens // that might help the statement run faster but which does not affect the // correctness of operation. case OP_Expire: goto __166 // Opcode: CursorLock P1 * * * * // // Lock the btree to which cursor P1 is pointing so that the btree cannot be // written by an other cursor. case OP_CursorLock: goto __167 // Opcode: CursorUnlock P1 * * * * // // Unlock the btree to which cursor P1 is pointing so that it can be // written by other cursors. case OP_CursorUnlock: goto __168 // Opcode: TableLock P1 P2 P3 P4 * // Synopsis: iDb=P1 root=P2 write=P3 // // Obtain a lock on a particular table. This instruction is only used when // the shared-cache feature is enabled. // // P1 is the index of the database in sqlite3.aDb[] of the database // on which the lock is acquired. A readlock is obtained if P3==0 or // a write lock if P3==1. // // P2 contains the root-page of the table to lock. // // P4 contains a pointer to the name of the table being locked. This is only // used to generate an error message if the lock cannot be obtained. case OP_TableLock: goto __169 // Opcode: VBegin * * * P4 * // // P4 may be a pointer to an sqlite3_vtab structure. If so, call the // xBegin method for that table. // // Also, whether or not P4 is set, check that this is not being called from // within a callback to a virtual table xSync() method. If it is, the error // code will be set to SQLITE_LOCKED. case OP_VBegin: goto __170 // Opcode: VCreate P1 P2 * * * // // P2 is a register that holds the name of a virtual table in database // P1. Call the xCreate method for that table. case OP_VCreate: goto __171 // Opcode: VDestroy P1 * * P4 * // // P4 is the name of a virtual table in database P1. Call the xDestroy method // of that table. case OP_VDestroy: goto __172 // Opcode: VOpen P1 * * P4 * // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // P1 is a cursor number. This opcode opens a cursor to the virtual // table and stores that cursor in P1. case OP_VOpen: goto __173 // Opcode: VInitIn P1 P2 P3 * * // Synopsis: r[P2]=ValueList(P1,P3) // // Set register P2 to be a pointer to a ValueList object for cursor P1 // with cache register P3 and output register P3+1. This ValueList object // can be used as the first argument to sqlite3_vtab_in_first() and // sqlite3_vtab_in_next() to extract all of the values stored in the P1 // cursor. Register P3 is used to hold the values returned by // sqlite3_vtab_in_first() and sqlite3_vtab_in_next(). case OP_VInitIn: goto __174 // Opcode: VFilter P1 P2 P3 P4 * // Synopsis: iplan=r[P3] zplan='P4' // // P1 is a cursor opened using VOpen. P2 is an address to jump to if // the filtered result set is empty. // // P4 is either NULL or a string that was generated by the xBestIndex // method of the module. The interpretation of the P4 string is left // to the module implementation. // // This opcode invokes the xFilter method on the virtual table specified // by P1. The integer query plan parameter to xFilter is stored in register // P3. Register P3+1 stores the argc parameter to be passed to the // xFilter method. Registers P3+2..P3+1+argc are the argc // additional parameters which are passed to // xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter. // // A jump is made to P2 if the result set after filtering would be empty. case OP_VFilter: goto __175 // Opcode: VColumn P1 P2 P3 * P5 // Synopsis: r[P3]=vcolumn(P2) // // Store in register P3 the value of the P2-th column of // the current row of the virtual-table of cursor P1. // // If the VColumn opcode is being used to fetch the value of // an unchanging column during an UPDATE operation, then the P5 // value is OPFLAG_NOCHNG. This will cause the sqlite3_vtab_nochange() // function to return true inside the xColumn method of the virtual // table implementation. The P5 column might also contain other // bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are // unused by OP_VColumn. case OP_VColumn: goto __176 // Opcode: VNext P1 P2 * * * // // Advance virtual table P1 to the next row in its result set and // jump to instruction P2. Or, if the virtual table has reached // the end of its result set, then fall through to the next instruction. case OP_VNext: goto __177 // Opcode: VRename P1 * * P4 * // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // This opcode invokes the corresponding xRename method. The value // in register P1 is passed as the zName argument to the xRename method. case OP_VRename: goto __178 // Opcode: VUpdate P1 P2 P3 P4 P5 // Synopsis: data=r[P3@P2] // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // This opcode invokes the corresponding xUpdate method. P2 values // are contiguous memory cells starting at P3 to pass to the xUpdate // invocation. The value in register (P3+P2-1) corresponds to the // p2th element of the argv array passed to xUpdate. // // The xUpdate method will do a DELETE or an INSERT or both. // The argv[0] element (which corresponds to memory cell P3) // is the rowid of a row to delete. If argv[0] is NULL then no // deletion occurs. The argv[1] element is the rowid of the new // row. This can be NULL to have the virtual table select the new // rowid for itself. The subsequent elements in the array are // the values of columns in the new row. // // If P2==1 then no insert is performed. argv[0] is the rowid of // a row to delete. // // P1 is a boolean flag. If it is set to true and the xUpdate call // is successful, then the value returned by sqlite3_last_insert_rowid() // is set to the value of the rowid for the row just inserted. // // P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to // apply in the case of a constraint failure on an insert or update. case OP_VUpdate: goto __179 // Opcode: Pagecount P1 P2 * * * // // Write the current number of pages in database P1 to memory cell P2. case OP_Pagecount: goto __180 // Opcode: MaxPgcnt P1 P2 P3 * * // // Try to set the maximum page count for database P1 to the value in P3. // Do not let the maximum page count fall below the current page count and // do not change the maximum page count value if P3==0. // // Store the maximum page count after the change in register P2. case OP_MaxPgcnt: goto __181 // Opcode: Function P1 P2 P3 P4 * // Synopsis: r[P3]=func(r[P2@NP]) // // Invoke a user function (P4 is a pointer to an sqlite3_context object that // contains a pointer to the function to be run) with arguments taken // from register P2 and successors. The number of arguments is in // the sqlite3_context object that P4 points to. // The result of the function is stored // in register P3. Register P3 must not be one of the function inputs. // // P1 is a 32-bit bitmask indicating whether or not each argument to the // function was determined to be constant at compile time. If the first // argument was constant then bit 0 of P1 is set. This is used to determine // whether meta data associated with a user function argument using the // sqlite3_set_auxdata() API may be safely retained until the next // invocation of this opcode. // // See also: AggStep, AggFinal, PureFunc // Opcode: PureFunc P1 P2 P3 P4 * // Synopsis: r[P3]=func(r[P2@NP]) // // Invoke a user function (P4 is a pointer to an sqlite3_context object that // contains a pointer to the function to be run) with arguments taken // from register P2 and successors. The number of arguments is in // the sqlite3_context object that P4 points to. // The result of the function is stored // in register P3. Register P3 must not be one of the function inputs. // // P1 is a 32-bit bitmask indicating whether or not each argument to the // function was determined to be constant at compile time. If the first // argument was constant then bit 0 of P1 is set. This is used to determine // whether meta data associated with a user function argument using the // sqlite3_set_auxdata() API may be safely retained until the next // invocation of this opcode. // // This opcode works exactly like OP_Function. The only difference is in // its name. This opcode is used in places where the function must be // purely non-deterministic. Some built-in date/time functions can be // either determinitic of non-deterministic, depending on their arguments. // When those function are used in a non-deterministic way, they will check // to see if they were called using OP_PureFunc instead of OP_Function, and // if they were, they throw an error. // // See also: AggStep, AggFinal, Function case OP_PureFunc: goto __182 // group case OP_Function: goto __183 // Opcode: FilterAdd P1 * P3 P4 * // Synopsis: filter(P1) += key(P3@P4) // // Compute a hash on the P4 registers starting with r[P3] and // add that hash to the bloom filter contained in r[P1]. case OP_FilterAdd: goto __184 // Opcode: Filter P1 P2 P3 P4 * // Synopsis: if key(P3@P4) not in filter(P1) goto P2 // // Compute a hash on the key contained in the P4 registers starting // with r[P3]. Check to see if that hash is found in the // bloom filter hosted by register P1. If it is not present then // maybe jump to P2. Otherwise fall through. // // False negatives are harmless. It is always safe to fall through, // even if the value is in the bloom filter. A false negative causes // more CPU cycles to be used, but it should still yield the correct // answer. However, an incorrect answer may well arise from a // false positive - if the jump is taken when it should fall through. case OP_Filter: goto __185 // Opcode: Trace P1 P2 * P4 * // // Write P4 on the statement trace output if statement tracing is // enabled. // // Operand P1 must be 0x7fffffff and P2 must positive. // Opcode: Init P1 P2 P3 P4 * // Synopsis: Start at P2 // // Programs contain a single instance of this opcode as the very first // opcode. // // If tracing is enabled (by the sqlite3_trace()) interface, then // the UTF-8 string contained in P4 is emitted on the trace callback. // Or if P4 is blank, use the string returned by sqlite3_sql(). // // If P2 is not zero, jump to instruction P2. // // Increment the value of P1 so that OP_Once opcodes will jump the // first time they are evaluated for this run. // // If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT // error is encountered. case OP_Trace: goto __186 case OP_Init: goto __187 // Opcode: Noop * * * * * // // Do nothing. This instruction is often useful as a jump // destination. // The magic Explain opcode are only inserted when explain==2 (which // is to say when the EXPLAIN QUERY PLAN syntax is used.) // This opcode records information from the optimizer. It is the // the same as a no-op. This opcodesnever appears in a real VM program. default: goto __188 } goto __8 // **************************************************************************** // // What follows is a massive switch statement where each case implements a // separate instruction in the virtual machine. If we follow the usual // indentation conventions, each case should be indented by 6 spaces. But // that is a lot of wasted space on the left margin. So the code within // the switch statement will break with convention and be flush-left. Another // big comment (similar to this one) will mark the point in the code where // we transition back to normal indentation. // // The formatting of each case is important. The makefile for SQLite // generates two C files "opcodes.h" and "opcodes.c" by scanning this // file looking for lines that begin with "case OP_". The opcodes.h files // will be filled with #defines that give unique integer values to each // opcode and the opcodes.c file is filled with an array of strings where // each string is the symbolic name for the corresponding opcode. If the // case statement is followed by a comment of the form "/# same as ... #/" // that comment is used to determine the particular value of the opcode. // // Other keywords in the comment that follows each case are used to // construct the OPFLG_INITIALIZER value that initializes opcodeProperty[]. // Keywords include: in1, in2, in3, out2, out3. See // the mkopcodeh.awk script for additional information. // // Documentation about VDBE opcodes is generated by scanning this file // for lines of that contain "Opcode:". That line and all subsequent // comment lines are used in the generation of the opcode.html documentation // file. // // SUMMARY: // // Formatting is important to scripts that scan this file. // Do not deviate from the formatting style currently in use. // // // Opcode: Goto * P2 * * * // // An unconditional jump to address P2. // The next instruction executed will be // the one at index P2 from the beginning of // the program. // // The P1 parameter is not actually used by this opcode. However, it // is sometimes set to 1 instead of 0 as a hint to the command-line shell // that this Goto is the bottom of a loop and that the lines from P2 down // to the current line should be indented for EXPLAIN output. __9: // jump jump_to_p2_and_check_for_interrupt: pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 // Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev, // OP_VNext, or OP_SorterNext) all jump here upon // completion. Check to see if sqlite3_interrupt() has been called // or if the progress callback needs to be invoked. // // This code uses unstructured "goto" statements and does not look clean. // But that is not due to sloppy coding habits. The code is written this // way for performance, to avoid having to run the interrupt and progress // checks on every opcode. This helps sqlite3_step() to run about 1.5% // faster according to "valgrind --tool=cachegrind" check_for_interrupt: if !(libc.AtomicLoadNInt32(db+432, 0) != 0) { goto __189 } goto abort_due_to_interrupt __189: ; // Call the progress callback if it is configured and the required number // of VDBE ops have been executed (either since this invocation of // sqlite3VdbeExec() or since last time the progress callback was called). // If the progress callback returns non-zero, exit the virtual machine with // a return code SQLITE_ABORT. __190: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { goto __191 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { goto __192 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error __192: ; goto __190 __191: ; goto __8 // Opcode: Gosub P1 P2 * * * // // Write the current address onto register P1 // and then jump to address P2. __10: // jump ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pIn1)) = I64(int32((int64(pOp) - int64(aOp)) / 24)) // Most jump operations do a goto to this spot in order to update // the pOp pointer. jump_to_p2: ; // There are never any jumps to instruction 0 // Jumps must be in range pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 goto __8 // Opcode: Return P1 * * * * // // Jump to the next instruction after the address in register P1. After // the jump, register P1 becomes undefined. __11: // in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOp = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) goto __8 // Opcode: InitCoroutine P1 P2 P3 * * // // Set up register P1 so that it will Yield to the coroutine // located at address P3. // // If P2!=0 then the coroutine implementation immediately follows // this opcode. So jump over the coroutine implementation to // address P2. // // See also: EndCoroutine __12: // jump ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp3 - 1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) { goto __193 } goto jump_to_p2 __193: ; goto __8 // Opcode: EndCoroutine P1 * * * * // // The instruction at the address in register P1 is a Yield. // Jump to the P2 parameter of that Yield. // After the jump, register P1 becomes undefined. // // See also: InitCoroutine __13: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pCaller = aOp + uintptr(*(*I64)(unsafe.Pointer(pIn1)))*24 pOp = aOp + uintptr((*VdbeOp)(unsafe.Pointer(pCaller)).Fp2-1)*24 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Undefined) goto __8 // Opcode: Yield P1 P2 * * * // // Swap the program counter with the value in register P1. This // has the effect of yielding to a coroutine. // // If the coroutine that is launched by this instruction ends with // Yield or Return then continue to the next instruction. But if // the coroutine launched by this instruction ends with // EndCoroutine, then jump to P2 rather than continuing with the // next instruction. // // See also: InitCoroutine __14: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(MEM_Int) pcDest = int32(*(*I64)(unsafe.Pointer(pIn1))) *(*I64)(unsafe.Pointer(pIn1)) = I64(int32((int64(pOp) - int64(aOp)) / 24)) pOp = aOp + uintptr(pcDest)*24 goto __8 // Opcode: HaltIfNull P1 P2 P3 P4 P5 // Synopsis: if r[P3]=null halt // // Check the value in register P3. If it is NULL then Halt using // parameter P1, P2, and P4 as if this were a Halt instruction. If the // value in register P3 is not NULL, then this routine is a no-op. // The P5 parameter should be 1. __15: // in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Null == 0) { goto __194 } goto __8 __194: ; // Opcode: Halt P1 P2 * P4 P5 // // Exit immediately. All open cursors, etc are closed // automatically. // // P1 is the result code returned by sqlite3_exec(), sqlite3_reset(), // or sqlite3_finalize(). For a normal halt, this should be SQLITE_OK (0). // For errors, it can be some other value. If P1!=0 then P2 will determine // whether or not to rollback the current transaction. Do not rollback // if P2==OE_Fail. Do the rollback if P2==OE_Rollback. If P2==OE_Abort, // then back out all changes that have occurred during this execution of the // VDBE, but do not rollback the transaction. // // If P4 is not null then it is an error message string. // // P5 is a value between 0 and 4, inclusive, that modifies the P4 string. // // 0: (no change) // 1: NOT NULL contraint failed: P4 // 2: UNIQUE constraint failed: P4 // 3: CHECK constraint failed: P4 // 4: FOREIGN KEY constraint failed: P4 // // If P5 is not zero and P4 is NULL, then everything after the ":" is // omitted. // // There is an implied "Halt 0 0 0" instruction inserted at the very end of // every program. So a jump past the last instruction of the program // is the same as executing Halt. __16: pcx = int32((int64(pOp) - int64(aOp)) / 24) if !((*Op)(unsafe.Pointer(pOp)).Fp1 == SQLITE_OK && (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { goto __195 } // Halt the sub-program. Return control to the parent frame. pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame (*Vdbe)(unsafe.Pointer(p)).FpFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent (*Vdbe)(unsafe.Pointer(p)).FnFrame-- Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) pcx = Xsqlite3VdbeFrameRestore(tls, pFrame) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == OE_Ignore) { goto __196 } // Instruction pcx is the OP_Program that invoked the sub-program // currently being halted. If the p2 instruction of this OP_Halt // instruction is set to OE_Ignore, then the sub-program is throwing // an IGNORE exception. In this case jump to the address specified // as the p2 of the calling OP_Program. pcx = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(pcx)*24)).Fp2 - 1 __196: ; aOp = (*Vdbe)(unsafe.Pointer(p)).FaOp aMem = (*Vdbe)(unsafe.Pointer(p)).FaMem pOp = aOp + uintptr(pcx)*24 goto __8 __195: ; (*Vdbe)(unsafe.Pointer(p)).Frc = (*Op)(unsafe.Pointer(pOp)).Fp1 (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8((*Op)(unsafe.Pointer(pOp)).Fp2) (*Vdbe)(unsafe.Pointer(p)).Fpc = pcx if !((*Vdbe)(unsafe.Pointer(p)).Frc != 0) { goto __197 } if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { goto __198 } Xsqlite3VdbeError(tls, p, ts+6744, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __200 } (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+6765, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __200: ; goto __199 __198: Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __199: ; Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+6772, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __197: ; rc = Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_BUSY) { goto __201 } (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_BUSY goto __202 __201: ; if (*Vdbe)(unsafe.Pointer(p)).Frc != 0 { rc = SQLITE_ERROR } else { rc = SQLITE_DONE } __202: ; goto vdbe_return // Opcode: Integer P1 P2 * * * // Synopsis: r[P2]=P1 // // The 32-bit integer value P1 is written into register P2. __17: // out2 pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64((*Op)(unsafe.Pointer(pOp)).Fp1) goto __8 // Opcode: Int64 * P2 * P4 * // Synopsis: r[P2]=P4 // // P4 is a pointer to a 64-bit integer value. // Write that value into register P2. __18: // out2 pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) goto __8 // Opcode: Real * P2 * P4 * // Synopsis: r[P2]=P4 // // P4 is a pointer to a 64-bit floating point value. // Write that value into register P2. __19: // same as TK_FLOAT, out2 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Real) *(*float64)(unsafe.Pointer(pOut)) = *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))) goto __8 // Opcode: String8 * P2 * P4 * // Synopsis: r[P2]='P4' // // P4 points to a nul terminated UTF-8 string. This opcode is transformed // into a String opcode before it is executed for the first time. During // this transformation, the length of string P4 is computed and stored // as the P1 parameter. __20: // same as TK_STRING, out2 ; pOut = out2Prerelease(tls, p, pOp) (*Op)(unsafe.Pointer(pOp)).Fp1 = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pOp + 16))) if !(int32(encoding) != SQLITE_UTF8) { goto __203 } rc = Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64(-1), uint8(SQLITE_UTF8), uintptr(0)) if !(rc != 0) { goto __204 } goto too_big __204: ; if !(SQLITE_OK != Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding))) { goto __205 } goto no_mem __205: ; (*Mem)(unsafe.Pointer(pOut)).FszMalloc = 0 *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Static) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -7) { goto __206 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16))) __206: ; (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-7) *(*uintptr)(unsafe.Pointer(pOp + 16)) = (*Mem)(unsafe.Pointer(pOut)).Fz (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Mem)(unsafe.Pointer(pOut)).Fn __203: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 > *(*int32)(unsafe.Pointer(db + 136))) { goto __207 } goto too_big __207: ; (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_String) // Opcode: String P1 P2 P3 P4 P5 // Synopsis: r[P2]='P4' (len=P1) // // The string value P4 of length P1 (bytes) is stored in register P2. // // If P3 is not zero and the content of register P3 is equal to P5, then // the datatype of the register P2 is converted to BLOB. The content is // the same sequence of bytes, it is merely interpreted as a BLOB instead // of a string, as if it had been CAST. In other words: // // if( P3!=0 and reg[P3]==P5 ) reg[P2] := CAST(reg[P2] as BLOB) __21: // out2 ; pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Str | MEM_Static | MEM_Term) (*Mem)(unsafe.Pointer(pOut)).Fz = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*Mem)(unsafe.Pointer(pOut)).Fn = (*Op)(unsafe.Pointer(pOp)).Fp1 (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding goto __8 // Opcode: Null P1 P2 P3 * * // Synopsis: r[P2..P3]=NULL // // Write a NULL into registers P2. If P3 greater than P2, then also write // NULL into register P3 and every register in between P2 and P3. If P3 // is less than P2 (typically P3 is zero) then only register P2 is // set to NULL. // // If the P1 value is non-zero, then also set the MEM_Cleared flag so that // NULL values will not compare equal even if SQLITE_NULLEQ is set on // OP_Ne or OP_Eq. __22: pOut = out2Prerelease(tls, p, pOp) cnt = (*Op)(unsafe.Pointer(pOp)).Fp3 - (*Op)(unsafe.Pointer(pOp)).Fp2 (*Mem)(unsafe.Pointer(pOut)).Fflags = libc.AssignUint16(&nullFlag, func() uint16 { if (*Op)(unsafe.Pointer(pOp)).Fp1 != 0 { return uint16(MEM_Null | MEM_Cleared) } return uint16(MEM_Null) }()) (*Mem)(unsafe.Pointer(pOut)).Fn = 0 __208: if !(cnt > 0) { goto __209 } pOut += 56 Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = nullFlag (*Mem)(unsafe.Pointer(pOut)).Fn = 0 cnt-- goto __208 __209: ; goto __8 // Opcode: SoftNull P1 * * * * // Synopsis: r[P1]=NULL // // Set register P1 to have the value NULL as seen by the OP_MakeRecord // instruction, but do not free any string or blob memory associated with // the register, so that if the value was a string or blob that was // previously copied using OP_SCopy, the copies will continue to be valid. __23: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_Undefined|MEM_AffMask) | MEM_Null) goto __8 // Opcode: Blob P1 P2 * P4 * // Synopsis: r[P2]=P4 (len=P1) // // P4 points to a blob of data P1 bytes long. Store this // blob in register P2. If P4 is a NULL pointer, then construct // a zero-filled blob that is P1 bytes long in P2. __24: // out2 ; pOut = out2Prerelease(tls, p, pOp) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { goto __210 } Xsqlite3VdbeMemSetZeroBlob(tls, pOut, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(Xsqlite3VdbeMemExpandBlob(tls, pOut) != 0) { goto __212 } goto no_mem __212: ; goto __211 __210: Xsqlite3VdbeMemSetStr(tls, pOut, *(*uintptr)(unsafe.Pointer(pOp + 16)), int64((*Op)(unsafe.Pointer(pOp)).Fp1), uint8(0), uintptr(0)) __211: ; (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding goto __8 // Opcode: Variable P1 P2 * P4 * // Synopsis: r[P2]=parameter(P1,P4) // // Transfer the values of bound parameter P1 into register P2 // // If the parameter is named, then its name appears in P4. // The P4 value is used by sqlite3_bind_parameter_name(). __25: // Value being transferred ; pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*56 if !(Xsqlite3VdbeMemTooBig(tls, pVar) != 0) { goto __213 } goto too_big __213: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { goto __214 } Xsqlite3VdbeMemSetNull(tls, pOut) __214: ; libc.Xmemcpy(tls, pOut, pVar, uint64(uintptr(0)+24)) *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Dyn | MEM_Ephem)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Static | MEM_FromBind) goto __8 // Opcode: Move P1 P2 P3 * * // Synopsis: r[P2@P3]=r[P1@P3] // // Move the P3 values in register P1..P1+P3-1 over into // registers P2..P2+P3-1. Registers P1..P1+P3-1 are // left holding a NULL. It is an error for register ranges // P1..P1+P3-1 and P2..P2+P3-1 to overlap. It is an error // for P3 to be less than 1. __26: // Register to copy to n = (*Op)(unsafe.Pointer(pOp)).Fp3 p1 = (*Op)(unsafe.Pointer(pOp)).Fp1 p2 = (*Op)(unsafe.Pointer(pOp)).Fp2 pIn1 = aMem + uintptr(p1)*56 pOut = aMem + uintptr(p2)*56 __215: ; Xsqlite3VdbeMemMove(tls, pOut, pIn1) if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { goto __218 } goto no_mem __218: ; pIn1 += 56 pOut += 56 goto __216 __216: if libc.PreDecInt32(&n, 1) != 0 { goto __215 } goto __217 __217: ; goto __8 // Opcode: Copy P1 P2 P3 * * // Synopsis: r[P2@P3+1]=r[P1@P3+1] // // Make a copy of registers P1..P1+P3 into registers P2..P2+P3. // // This instruction makes a deep copy of the value. A duplicate // is made of any string or blob constant. See also OP_SCopy. __27: n1 = (*Op)(unsafe.Pointer(pOp)).Fp3 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 __219: if !(1 != 0) { goto __220 } Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { goto __221 } goto no_mem __221: ; if !(libc.PostDecInt32(&n1, 1) == 0) { goto __222 } goto __220 __222: ; pOut += 56 pIn1 += 56 goto __219 __220: ; goto __8 // Opcode: SCopy P1 P2 * * * // Synopsis: r[P2]=r[P1] // // Make a shallow copy of register P1 into register P2. // // This instruction makes a shallow copy of the value. If the value // is a string or blob, then the copy is only a pointer to the // original and hence if the original changes so will the copy. // Worse, if the original is deallocated, the copy becomes invalid. // Thus the program must guarantee that the original will not change // during the lifetime of the copy. Use OP_Copy to make a complete // copy. __28: // out2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn1, MEM_Ephem) goto __8 // Opcode: IntCopy P1 P2 * * * // Synopsis: r[P2]=r[P1] // // Transfer the integer value held in register P1 into register P2. // // This is an optimized version of SCopy that works only for integer // values. __29: // out2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetInt64(tls, pOut, *(*I64)(unsafe.Pointer(pIn1))) goto __8 // Opcode: FkCheck * * * * * // // Halt with an SQLITE_CONSTRAINT error if there are any unresolved // foreign key constraint violations. If there are no foreign key // constraint violations, this is a no-op. // // FK constraint violations are also checked when the prepared statement // exits. This opcode is used to raise foreign key constraint errors prior // to returning results such as a row change count or the result of a // RETURNING clause. __30: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 0)) != SQLITE_OK) { goto __223 } goto abort_due_to_error __223: ; goto __8 // Opcode: ResultRow P1 P2 * * * // Synopsis: output=r[P1@P2] // // The registers P1 through P1+P2-1 contain a single row of // results. This opcode causes the sqlite3_step() call to terminate // with an SQLITE_ROW return code and it sets up the sqlite3_stmt // structure to provide access to the r(P1)..r(P1+P2-1) values as // the result row. __31: ; // Invalidate all ephemeral cursor row caches (*Vdbe)(unsafe.Pointer(p)).FcacheCtr = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + U32(2) | U32(1) // Make sure the results of the current row are \000 terminated // and have an assigned type. The results are de-ephemeralized as // a side effect. pMem = libc.AssignPtrUintptr(p+168, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56) i = 0 __224: if !(i < (*Op)(unsafe.Pointer(pOp)).Fp2) { goto __226 } if !(int32((*Mem)(unsafe.Pointer(pMem+uintptr(i)*56)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pMem+uintptr(i)*56) != 0) { goto __227 } goto no_mem __227: ; Xsqlite3VdbeMemNulTerminate(tls, pMem+uintptr(i)*56) goto __225 __225: i++ goto __224 goto __226 __226: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __228 } goto no_mem __228: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_ROW != 0) { goto __229 } (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_ROW), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, uintptr(0)) __229: ; // Return SQLITE_ROW (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp)-int64(aOp))/24) + 1 rc = SQLITE_ROW goto vdbe_return // Opcode: Concat P1 P2 P3 * * // Synopsis: r[P3]=r[P2]+r[P1] // // Add the text in register P1 onto the end of the text in // register P2 and store the result in register P3. // If either the P1 or P2 text are NULL then store NULL in P3. // // P3 = P2 || P1 // // It is illegal for P1 and P3 to be the same register. Sometimes, // if P3 is the same register as P2, the implementation is able // to avoid a memcpy(). __32: // Initial flags for P2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags1 = (*Mem)(unsafe.Pointer(pIn1)).Fflags if !((int32(flags1)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { goto __230 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 __230: ; if !(int32(flags1)&(MEM_Str|MEM_Blob) == 0) { goto __231 } if !(Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(0)) != 0) { goto __233 } goto no_mem __233: ; flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) goto __232 __231: if !(int32(flags1)&MEM_Zero != 0) { goto __234 } if !(Xsqlite3VdbeMemExpandBlob(tls, pIn1) != 0) { goto __235 } goto no_mem __235: ; flags1 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & libc.CplInt32(MEM_Str)) __234: ; __232: ; flags2 = (*Mem)(unsafe.Pointer(pIn2)).Fflags if !(int32(flags2)&(MEM_Str|MEM_Blob) == 0) { goto __236 } if !(Xsqlite3VdbeMemStringify(tls, pIn2, encoding, uint8(0)) != 0) { goto __238 } goto no_mem __238: ; flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) goto __237 __236: if !(int32(flags2)&MEM_Zero != 0) { goto __239 } if !(Xsqlite3VdbeMemExpandBlob(tls, pIn2) != 0) { goto __240 } goto no_mem __240: ; flags2 = U16(int32((*Mem)(unsafe.Pointer(pIn2)).Fflags) & libc.CplInt32(MEM_Str)) __239: ; __237: ; nByte = I64((*Mem)(unsafe.Pointer(pIn1)).Fn + (*Mem)(unsafe.Pointer(pIn2)).Fn) if !(nByte > I64(*(*int32)(unsafe.Pointer(db + 136)))) { goto __241 } goto too_big __241: ; if !(Xsqlite3VdbeMemGrow(tls, pOut, int32(nByte)+3, libc.Bool32(pOut == pIn2)) != 0) { goto __242 } goto no_mem __242: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Str) if !(pOut != pIn2) { goto __243 } libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, (*Mem)(unsafe.Pointer(pIn2)).Fz, uint64((*Mem)(unsafe.Pointer(pIn2)).Fn)) (*Mem)(unsafe.Pointer(pIn2)).Fflags = flags2 __243: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz+uintptr((*Mem)(unsafe.Pointer(pIn2)).Fn), (*Mem)(unsafe.Pointer(pIn1)).Fz, uint64((*Mem)(unsafe.Pointer(pIn1)).Fn)) (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags1 *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(1)))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fz + uintptr(nByte+int64(2)))) = int8(0) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Term) (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte) (*Mem)(unsafe.Pointer(pOut)).Fenc = encoding goto __8 // Opcode: Add P1 P2 P3 * * // Synopsis: r[P3]=r[P1]+r[P2] // // Add the value in register P1 to the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Multiply P1 P2 P3 * * // Synopsis: r[P3]=r[P1]*r[P2] // // // Multiply the value in register P1 by the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Subtract P1 P2 P3 * * // Synopsis: r[P3]=r[P2]-r[P1] // // Subtract the value in register P1 from the value in register P2 // and store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: Divide P1 P2 P3 * * // Synopsis: r[P3]=r[P2]/r[P1] // // Divide the value in register P1 by the value in register P2 // and store the result in register P3 (P3=P2/P1). If the value in // register P1 is zero, then the result is NULL. If either input is // NULL, the result is NULL. // Opcode: Remainder P1 P2 P3 * * // Synopsis: r[P3]=r[P2]%r[P1] // // Compute the remainder after integer register P2 is divided by // register P1 and store the result in register P3. // If the value in register P1 is zero the result is NULL. // If either operand is NULL, the result is NULL. __33: // same as TK_PLUS, in1, in2, out3 __34: // same as TK_MINUS, in1, in2, out3 __35: // same as TK_STAR, in1, in2, out3 __36: // same as TK_SLASH, in1, in2, out3 __37: // Real value of right operand pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 type1 = numericType(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 type2 = numericType(tls, pIn2) pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) | int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)) if !(int32(type1)&int32(type2)&MEM_Int != 0) { goto __244 } iA = *(*I64)(unsafe.Pointer(pIn1)) *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) = *(*I64)(unsafe.Pointer(pIn2)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: goto __247 case OP_Subtract: goto __248 case OP_Multiply: goto __249 case OP_Divide: goto __250 default: goto __251 } goto __246 __247: if !(Xsqlite3AddInt64(tls, bp+208, iA) != 0) { goto __252 } goto fp_math __252: ; goto __246 __248: if !(Xsqlite3SubInt64(tls, bp+208, iA) != 0) { goto __253 } goto fp_math __253: ; goto __246 __249: if !(Xsqlite3MulInt64(tls, bp+208, iA) != 0) { goto __254 } goto fp_math __254: ; goto __246 __250: if !(iA == int64(0)) { goto __255 } goto arithmetic_result_is_null __255: ; if !(iA == int64(-1) && *(*I64)(unsafe.Pointer(bp + 208)) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { goto __256 } goto fp_math __256: ; *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) /= iA goto __246 __251: if !(iA == int64(0)) { goto __257 } goto arithmetic_result_is_null __257: ; if !(iA == int64(-1)) { goto __258 } iA = int64(1) __258: ; *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) %= iA goto __246 __246: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __245 __244: if !(int32(flags)&MEM_Null != 0) { goto __259 } goto arithmetic_result_is_null goto __260 __259: fp_math: rA = Xsqlite3VdbeRealValue(tls, pIn1) rB = Xsqlite3VdbeRealValue(tls, pIn2) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: goto __262 case OP_Subtract: goto __263 case OP_Multiply: goto __264 case OP_Divide: goto __265 default: goto __266 } goto __261 __262: rB = rB + rA goto __261 __263: rB = rB - rA goto __261 __264: rB = rB * rA goto __261 __265: // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... if !(rA == float64(0)) { goto __267 } goto arithmetic_result_is_null __267: ; rB = rB / rA goto __261 __266: iA = Xsqlite3VdbeIntValue(tls, pIn1) *(*I64)(unsafe.Pointer(bp + 208 /* iB */)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { goto __268 } goto arithmetic_result_is_null __268: ; if !(iA == int64(-1)) { goto __269 } iA = int64(1) __269: ; rB = float64(*(*I64)(unsafe.Pointer(bp + 208)) % iA) goto __261 __261: ; if !(Xsqlite3IsNaN(tls, rB) != 0) { goto __270 } goto arithmetic_result_is_null __270: ; *(*float64)(unsafe.Pointer(pOut)) = rB (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) __260: ; __245: ; goto __8 arithmetic_result_is_null: Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 // Opcode: CollSeq P1 * * P4 // // P4 is a pointer to a CollSeq object. If the next call to a user function // or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will // be returned. This is used by the built-in min(), max() and nullif() // functions. // // If P1 is not zero, then it is a register that a subsequent min() or // max() aggregate will set to 1 if the current row is not the minimum or // maximum. The P1 register is initialized to 0 by this instruction. // // The interface used by the implementation of the aforementioned functions // to retrieve the collation sequence set by this opcode is not available // publicly. Only built-in functions have access to this feature. __38: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __271 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, int64(0)) __271: ; goto __8 // Opcode: BitAnd P1 P2 P3 * * // Synopsis: r[P3]=r[P1]&r[P2] // // Take the bit-wise AND of the values in register P1 and P2 and // store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: BitOr P1 P2 P3 * * // Synopsis: r[P3]=r[P1]|r[P2] // // Take the bit-wise OR of the values in register P1 and P2 and // store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: ShiftLeft P1 P2 P3 * * // Synopsis: r[P3]=r[P2]<<r[P1] // // Shift the integer value in register P2 to the left by the // number of bits specified by the integer in register P1. // Store the result in register P3. // If either input is NULL, the result is NULL. // Opcode: ShiftRight P1 P2 P3 * * // Synopsis: r[P3]=r[P2]>>r[P1] // // Shift the integer value in register P2 to the right by the // number of bits specified by the integer in register P1. // Store the result in register P3. // If either input is NULL, the result is NULL. __39: // same as TK_BITAND, in1, in2, out3 __40: // same as TK_BITOR, in1, in2, out3 __41: // same as TK_LSHIFT, in1, in2, out3 __42: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)|int32((*Mem)(unsafe.Pointer(pIn2)).Fflags))&MEM_Null != 0) { goto __272 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __8 __272: ; *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { goto __273 } *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) &= iB1 goto __274 __273: if !(int32(op) == OP_BitOr) { goto __275 } *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) |= iB1 goto __276 __275: if !(iB1 != int64(0)) { goto __277 } // If shifting by a negative amount, shift in the other direction if !(iB1 < int64(0)) { goto __278 } op = U8(2*OP_ShiftLeft + 1 - int32(op)) if iB1 > int64(-64) { iB1 = -iB1 } else { iB1 = int64(64) } __278: ; if !(iB1 >= int64(64)) { goto __279 } if *(*I64)(unsafe.Pointer(bp + 224)) >= int64(0) || int32(op) == OP_ShiftLeft { *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = int64(0) } else { *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) = int64(-1) } goto __280 __279: libc.Xmemcpy(tls, bp+216, bp+224, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { goto __281 } *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) <<= iB1 goto __282 __281: *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) >>= iB1 // Sign-extend on a right shift of a negative number if !(*(*I64)(unsafe.Pointer(bp + 224)) < int64(0)) { goto __283 } *(*U64)(unsafe.Pointer(bp + 216 /* uA */)) |= U64(U64(uint64(0xffffffff))<<32|uint64(0xffffffff)) << (int64(64) - iB1) __283: ; __282: ; libc.Xmemcpy(tls, bp+224, bp+216, uint64(unsafe.Sizeof(I64(0)))) __280: ; __277: ; __276: ; __274: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 224 /* iA1 */)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 // Opcode: AddImm P1 P2 * * * // Synopsis: r[P1]=r[P1]+P2 // // Add the constant P2 to the value in register P1. // The result is always an integer. // // To force any register to be an integer, just add 0. __43: // in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 Xsqlite3VdbeMemIntegerify(tls, pIn1) *(*I64)(unsafe.Pointer(pIn1)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) goto __8 // Opcode: MustBeInt P1 P2 * * * // // Force the value in register P1 to be an integer. If the value // in P1 is not an integer and cannot be converted into an integer // without data loss, then jump immediately to P2, or if P2==0 // raise an SQLITE_MISMATCH exception. __44: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { goto __284 } applyAffinity(tls, pIn1, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { goto __285 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { goto __286 } rc = SQLITE_MISMATCH goto abort_due_to_error goto __287 __286: goto jump_to_p2 __287: ; __285: ; __284: ; (*Mem)(unsafe.Pointer(pIn1)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) goto __8 // Opcode: RealAffinity P1 * * * * // // If register P1 holds an integer convert it to a real value. // // This opcode is used when extracting information from a column that // has REAL affinity. Such column values may still be stored as // integers, for space efficiency, but after extraction we want them // to have only a real value. __45: // in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { goto __288 } Xsqlite3VdbeMemRealify(tls, pIn1) __288: ; goto __8 // Opcode: Cast P1 P2 * * * // Synopsis: affinity(r[P1]) // // Force the value in register P1 to be the type defined by P2. // // <ul> // <li> P2=='A' → BLOB // <li> P2=='B' → TEXT // <li> P2=='C' → NUMERIC // <li> P2=='D' → INTEGER // <li> P2=='E' → REAL // </ul> // // A NULL value is not changed by this routine. It remains NULL. __46: // in1 ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pIn1) } return 0 }() if !(rc != 0) { goto __289 } goto abort_due_to_error __289: ; rc = Xsqlite3VdbeMemCast(tls, pIn1, uint8((*Op)(unsafe.Pointer(pOp)).Fp2), encoding) if !(rc != 0) { goto __290 } goto abort_due_to_error __290: ; goto __8 // Opcode: Eq P1 P2 P3 P4 P5 // Synopsis: IF r[P3]==r[P1] // // Compare the values in register P1 and P3. If reg(P3)==reg(P1) then // jump to address P2. // // The SQLITE_AFF_MASK portion of P5 must be an affinity character - // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made // to coerce both inputs according to this affinity before the // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric // affinity is used. Note that the affinity conversions are stored // back into the input registers P1 and P3. So this opcode can cause // persistent changes to registers P1 and P3. // // Once any conversions have taken place, and neither value is NULL, // the values are compared. If both values are blobs then memcmp() is // used to determine the results of the comparison. If both values // are text, then the appropriate collating function specified in // P4 is used to do the comparison. If P4 is not specified then // memcmp() is used to compare text string. If both values are // numeric, then a numeric comparison is used. If the two values // are of different types, then numbers are considered less than // strings and strings are considered less than blobs. // // If SQLITE_NULLEQ is set in P5 then the result of comparison is always either // true or false and is never NULL. If both operands are NULL then the result // of comparison is true. If either operand is NULL then the result is false. // If neither operand is NULL the result is the same as it would be if // the SQLITE_NULLEQ flag were omitted from P5. // // This opcode saves the result of comparison for use by the new // OP_Jump opcode. // Opcode: Ne P1 P2 P3 P4 P5 // Synopsis: IF r[P3]!=r[P1] // // This works just like the Eq opcode except that the jump is taken if // the operands in registers P1 and P3 are not equal. See the Eq opcode for // additional information. // Opcode: Lt P1 P2 P3 P4 P5 // Synopsis: IF r[P3]<r[P1] // // Compare the values in register P1 and P3. If reg(P3)<reg(P1) then // jump to address P2. // // If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or // reg(P3) is NULL then the take the jump. If the SQLITE_JUMPIFNULL // bit is clear then fall through if either operand is NULL. // // The SQLITE_AFF_MASK portion of P5 must be an affinity character - // SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made // to coerce both inputs according to this affinity before the // comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric // affinity is used. Note that the affinity conversions are stored // back into the input registers P1 and P3. So this opcode can cause // persistent changes to registers P1 and P3. // // Once any conversions have taken place, and neither value is NULL, // the values are compared. If both values are blobs then memcmp() is // used to determine the results of the comparison. If both values // are text, then the appropriate collating function specified in // P4 is used to do the comparison. If P4 is not specified then // memcmp() is used to compare text string. If both values are // numeric, then a numeric comparison is used. If the two values // are of different types, then numbers are considered less than // strings and strings are considered less than blobs. // // This opcode saves the result of comparison for use by the new // OP_Jump opcode. // Opcode: Le P1 P2 P3 P4 P5 // Synopsis: IF r[P3]<=r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is less than or equal to the content of // register P1. See the Lt opcode for additional information. // Opcode: Gt P1 P2 P3 P4 P5 // Synopsis: IF r[P3]>r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is greater than the content of // register P1. See the Lt opcode for additional information. // Opcode: Ge P1 P2 P3 P4 P5 // Synopsis: IF r[P3]>=r[P1] // // This works just like the Lt opcode except that the jump is taken if // the content of register P3 is greater than or equal to the content of // register P1. See the Lt opcode for additional information. __47: // same as TK_EQ, jump, in1, in3 __48: // same as TK_NE, jump, in1, in3 __49: // same as TK_LT, jump, in1, in3 __50: // same as TK_LE, jump, in1, in3 __51: // same as TK_GT, jump, in1, in3 __52: // Copy of initial value of pIn3->flags pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags11 = (*Mem)(unsafe.Pointer(pIn1)).Fflags flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags11)&int32(flags3)&MEM_Int != 0) { goto __291 } // Common case of comparison of two integers if !(*(*I64)(unsafe.Pointer(pIn3)) > *(*I64)(unsafe.Pointer(pIn1))) { goto __292 } iCompare = +1 if !(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __294 } goto jump_to_p2 __294: ; goto __293 __292: if !(*(*I64)(unsafe.Pointer(pIn3)) < *(*I64)(unsafe.Pointer(pIn1))) { goto __295 } iCompare = -1 if !(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __297 } goto jump_to_p2 __297: ; goto __296 __295: iCompare = 0 if !(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode))) != 0) { goto __298 } goto jump_to_p2 __298: ; __296: ; __293: ; goto __8 __291: ; if !((int32(flags11)|int32(flags3))&MEM_Null != 0) { goto __299 } // One or both operands are NULL if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_NULLEQ != 0) { goto __301 } // If SQLITE_NULLEQ is set (which will only happen if the operator is // OP_Eq or OP_Ne) then take the jump or not depending on whether // or not both operands are null. if !(int32(flags11)&int32(flags3)&MEM_Null != 0 && int32(flags3)&MEM_Cleared == 0) { goto __303 } res = 0 // Operands are equal goto __304 __303: res = func() int32 { if int32(flags3)&MEM_Null != 0 { return -1 } return +1 }() // Operands are not equal __304: ; goto __302 __301: // SQLITE_NULLEQ is clear and at least one operand is NULL, // then the result is always NULL. // The jump is taken if the SQLITE_JUMPIFNULL bit is set. iCompare = 1 // Operands are not equal if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&SQLITE_JUMPIFNULL != 0) { goto __305 } goto jump_to_p2 __305: ; goto __8 __302: ; goto __300 __299: // Neither operand is NULL and we couldn't do the special high-speed // integer comparison case. So do a general-case comparison. affinity = int8(int32((*Op)(unsafe.Pointer(pOp)).Fp5) & SQLITE_AFF_MASK) if !(int32(affinity) >= SQLITE_AFF_NUMERIC) { goto __306 } if !((int32(flags11)|int32(flags3))&MEM_Str != 0) { goto __308 } if !(int32(flags11)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __309 } applyNumericAffinity(tls, pIn1, 0) flags3 = (*Mem)(unsafe.Pointer(pIn3)).Fflags __309: ; if !(int32(flags3)&(MEM_Int|MEM_IntReal|MEM_Real|MEM_Str) == MEM_Str) { goto __310 } applyNumericAffinity(tls, pIn3, 0) __310: ; __308: ; goto __307 __306: if !(int32(affinity) == SQLITE_AFF_TEXT) { goto __311 } if !(int32(flags11)&MEM_Str == 0 && int32(flags11)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { goto __312 } Xsqlite3VdbeMemStringify(tls, pIn1, encoding, uint8(1)) flags11 = U16(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags11)&MEM_TypeMask) if !(pIn1 == pIn3) { goto __313 } flags3 = U16(int32(flags11) | MEM_Str) __313: ; __312: ; if !(int32(flags3)&MEM_Str == 0 && int32(flags3)&(MEM_Int|MEM_Real|MEM_IntReal) != 0) { goto __314 } Xsqlite3VdbeMemStringify(tls, pIn3, encoding, uint8(1)) flags3 = U16(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&libc.CplInt32(MEM_TypeMask) | int32(flags3)&MEM_TypeMask) __314: ; __311: ; __307: ; res = Xsqlite3MemCompare(tls, pIn3, pIn1, *(*uintptr)(unsafe.Pointer(pOp + 16))) __300: ; // At this point, res is negative, zero, or positive if reg[P1] is // less than, equal to, or greater than reg[P3], respectively. Compute // the answer to this operator in res2, depending on what the comparison // operator actually is. The next block of code depends on the fact // that the 6 comparison operators are consecutive integers in this // order: NE, EQ, GT, LE, LT, GE if !(res < 0) { goto __315 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aLTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) goto __316 __315: if !(res == 0) { goto __317 } res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aEQb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) goto __318 __317: res2 = int32(*(*uint8)(unsafe.Pointer(Xsqlite3aGTb + uintptr((*Op)(unsafe.Pointer(pOp)).Fopcode)))) __318: ; __316: ; iCompare = res // Undo any changes made by applyAffinity() to the input registers. (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags3 (*Mem)(unsafe.Pointer(pIn1)).Fflags = flags11 if !(res2 != 0) { goto __319 } goto jump_to_p2 __319: ; goto __8 // Opcode: ElseEq * P2 * * * // // This opcode must follow an OP_Lt or OP_Gt comparison operator. There // can be zero or more OP_ReleaseReg opcodes intervening, but no other // opcodes are allowed to occur between this instruction and the previous // OP_Lt or OP_Gt. // // If result of an OP_Eq comparison on the same two operands as the // prior OP_Lt or OP_Gt would have been true, then jump to P2. // If the result of an OP_Eq comparison on the two previous // operands would have been false or NULL, then fall through. __53: // same as TK_ESCAPE, jump ; if !(iCompare == 0) { goto __320 } goto jump_to_p2 __320: ; goto __8 // Opcode: Permutation * * * P4 * // // Set the permutation used by the OP_Compare operator in the next // instruction. The permutation is stored in the P4 operand. // // The permutation is only valid until the next OP_Compare that has // the OPFLAG_PERMUTE bit set in P5. Typically the OP_Permutation should // occur immediately prior to the OP_Compare. // // The first integer in the P4 integer array is the length of the array // and does not become part of the permutation. __54: ; goto __8 // Opcode: Compare P1 P2 P3 P4 P5 // Synopsis: r[P1@P3] <-> r[P2@P3] // // Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this // vector "A") and in reg(P2)..reg(P2+P3-1) ("B"). Save the result of // the comparison for use by the next OP_Jump instruct. // // If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is // determined by the most recent OP_Permutation operator. If the // OPFLAG_PERMUTE bit is clear, then register are compared in sequential // order. // // P4 is a KeyInfo structure that defines collating sequences and sort // orders for the comparison. The permutation applies to registers // only. The KeyInfo elements are used sequentially. // // The comparison is a sort comparison, so NULLs compare equal, // NULLs are less than numbers, numbers are less than strings, // and strings are less than blobs. __55: // The permutation if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_PERMUTE == 0) { goto __321 } aPermute = uintptr(0) goto __322 __321: ; aPermute = *(*uintptr)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24 + 16)) + uintptr(1)*4 __322: ; n2 = (*Op)(unsafe.Pointer(pOp)).Fp3 pKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) p11 = (*Op)(unsafe.Pointer(pOp)).Fp1 p21 = (*Op)(unsafe.Pointer(pOp)).Fp2 i1 = 0 __323: if !(i1 < n2) { goto __325 } if aPermute != 0 { idx = *(*U32)(unsafe.Pointer(aPermute + uintptr(i1)*4)) } else { idx = U32(i1) } pColl = *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i1)*8)) bRev = int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i1)))) & KEYINFO_ORDER_DESC iCompare = Xsqlite3MemCompare(tls, aMem+uintptr(U32(p11)+idx)*56, aMem+uintptr(U32(p21)+idx)*56, pColl) if !(iCompare != 0) { goto __326 } if !(int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(i1))))&KEYINFO_ORDER_BIGNULL != 0 && (int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p11)+idx)*56)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr(U32(p21)+idx)*56)).Fflags)&MEM_Null != 0)) { goto __327 } iCompare = -iCompare __327: ; if !(bRev != 0) { goto __328 } iCompare = -iCompare __328: ; goto __325 __326: ; goto __324 __324: i1++ goto __323 goto __325 __325: ; goto __8 // Opcode: Jump P1 P2 P3 * * // // Jump to the instruction at address P1, P2, or P3 depending on whether // in the most recent OP_Compare instruction the P1 vector was less than // equal to, or greater than the P2 vector, respectively. __56: // jump if !(iCompare < 0) { goto __329 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1-1)*24 goto __330 __329: if !(iCompare == 0) { goto __331 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2-1)*24 goto __332 __331: ; pOp = aOp + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3-1)*24 __332: ; __330: ; goto __8 // Opcode: And P1 P2 P3 * * // Synopsis: r[P3]=(r[P1] && r[P2]) // // Take the logical AND of the values in registers P1 and P2 and // write the result into register P3. // // If either P1 or P2 is 0 (false) then the result is 0 even if // the other input is NULL. A NULL and true or two NULLs give // a NULL output. // Opcode: Or P1 P2 P3 * * // Synopsis: r[P3]=(r[P1] || r[P2]) // // Take the logical OR of the values in register P1 and P2 and // store the answer in register P3. // // If either P1 or P2 is nonzero (true) then the result is 1 (true) // even if the other input is NULL. A NULL and false or two NULLs // give a NULL output. __57: // same as TK_AND, in1, in2, out3 __58: // Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL v1 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, 2) v2 = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, 2) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_And) { goto __333 } v1 = int32(and_logic[v1*3+v2]) goto __334 __333: v1 = int32(or_logic[v1*3+v2]) __334: ; pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(v1 == 2) { goto __335 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) goto __336 __335: *(*I64)(unsafe.Pointer(pOut)) = I64(v1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) __336: ; goto __8 // Opcode: IsTrue P1 P2 P3 P4 * // Synopsis: r[P2] = coalesce(r[P1]==TRUE,P3) ^ P4 // // This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and // IS NOT FALSE operators. // // Interpret the value in register P1 as a boolean value. Store that // boolean (a 0 or 1) in register P2. Or if the value in register P1 is // NULL, then the P3 is stored in register P2. Invert the answer if P4 // is 1. // // The logic is summarized like this: // // <ul> // <li> If P3==0 and P4==0 then r[P2] := r[P1] IS TRUE // <li> If P3==1 and P4==1 then r[P2] := r[P1] IS FALSE // <li> If P3==0 and P4==1 then r[P2] := r[P1] IS NOT TRUE // <li> If P3==1 and P4==0 then r[P2] := r[P1] IS NOT FALSE // </ul> __59: // in1, out2 ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3)^*(*int32)(unsafe.Pointer(pOp + 16)))) goto __8 // Opcode: Not P1 P2 * * * // Synopsis: r[P2]= !r[P1] // // Interpret the value in register P1 as a boolean value. Store the // boolean complement in register P2. If the value in register P1 is // NULL, then a NULL is stored in P2. __60: // same as TK_NOT, in1, out2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { goto __337 } Xsqlite3VdbeMemSetInt64(tls, pOut, libc.BoolInt64(!(Xsqlite3VdbeBooleanValue(tls, pIn1, 0) != 0))) goto __338 __337: Xsqlite3VdbeMemSetNull(tls, pOut) __338: ; goto __8 // Opcode: BitNot P1 P2 * * * // Synopsis: r[P2]= ~r[P1] // // Interpret the content of register P1 as an integer. Store the // ones-complement of the P1 value into register P2. If P1 holds // a NULL then store a NULL in P2. __61: // same as TK_BITNOT, in1, out2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemSetNull(tls, pOut) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { goto __339 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = ^Xsqlite3VdbeIntValue(tls, pIn1) __339: ; goto __8 // Opcode: Once P1 P2 * * * // // Fall through to the next instruction the first time this opcode is // encountered on each invocation of the byte-code program. Jump to P2 // on the second and all subsequent encounters during the same invocation. // // Top-level programs determine first invocation by comparing the P1 // operand against the P1 operand on the OP_Init opcode at the beginning // of the program. If the P1 values differ, then fall through and make // the P1 of this opcode equal to the P1 of OP_Init. If P1 values are // the same then take the jump. // // For subprograms, there is a bitmask in the VdbeFrame that determines // whether or not the jump should be taken. The bitmask is necessary // because the self-altering code trick does not work for recursive // triggers. __62: // Address of this instruction ; if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { goto __340 } iAddr = U32(int32((int64(pOp) - int64((*Vdbe)(unsafe.Pointer(p)).FaOp)) / 24)) if !(int32(*(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))))&(int32(1)<<(iAddr&U32(7))) != 0) { goto __342 } goto jump_to_p2 __342: ; *(*U8)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FpFrame)).FaOnce + uintptr(iAddr/U32(8)))) |= U8(int32(1) << (iAddr & U32(7))) goto __341 __340: if !((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 == (*Op)(unsafe.Pointer(pOp)).Fp1) { goto __343 } goto jump_to_p2 __343: ; __341: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp)).Fp1 goto __8 // Opcode: If P1 P2 P3 * * // // Jump to P2 if the value in register P1 is true. The value // is considered true if it is numeric and non-zero. If the value // in P1 is NULL then take the jump if and only if P3 is non-zero. __63: c = Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(c != 0) { goto __344 } goto jump_to_p2 __344: ; goto __8 // Opcode: IfNot P1 P2 P3 * * // // Jump to P2 if the value in register P1 is False. The value // is considered false if it has a numeric value of zero. If the value // in P1 is NULL then take the jump if and only if P3 is non-zero. __64: c1 = libc.BoolInt32(!(Xsqlite3VdbeBooleanValue(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56, libc.BoolInt32(!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0))) != 0)) if !(c1 != 0) { goto __345 } goto jump_to_p2 __345: ; goto __8 // Opcode: IsNull P1 P2 * * * // Synopsis: if r[P1]==NULL goto P2 // // Jump to P2 if the value in register P1 is NULL. __65: // same as TK_ISNULL, jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0) { goto __346 } goto jump_to_p2 __346: ; goto __8 // Opcode: IsNullOrType P1 P2 P3 * * // Synopsis: if typeof(r[P1]) IN (P3,5) goto P2 // // Jump to P2 if the value in register P1 is NULL or has a datatype P3. // P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT, // SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT. __66: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 doTheJump = libc.Bool32(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null != 0 || Xsqlite3_value_type(tls, pIn1) == (*Op)(unsafe.Pointer(pOp)).Fp3) if !(doTheJump != 0) { goto __347 } goto jump_to_p2 __347: ; goto __8 // Opcode: ZeroOrNull P1 P2 P3 * * // Synopsis: r[P2] = 0 OR NULL // // If all both registers P1 and P3 are NOT NULL, then store a zero in // register P2. If either registers P1 or P3 are NULL then put // a NULL in register P2. __67: // in1, in2, out2, in3 if !(int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56)).Fflags)&MEM_Null != 0 || int32((*Mem)(unsafe.Pointer(aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fflags)&MEM_Null != 0) { goto __348 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) goto __349 __348: Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56, int64(0)) __349: ; goto __8 // Opcode: NotNull P1 P2 * * * // Synopsis: if r[P1]!=NULL goto P2 // // Jump to P2 if the value in register P1 is not NULL. __68: // same as TK_NOTNULL, jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { goto __350 } goto jump_to_p2 __350: ; goto __8 // Opcode: IfNullRow P1 P2 P3 * * // Synopsis: if P1.nullRow then r[P3]=NULL, goto P2 // // Check the cursor P1 to see if it is currently pointing at a NULL row. // If it is, then set register P3 to NULL and jump immediately to P2. // If P1 is not on a NULL row, then fall through without making any // changes. __69: // jump ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FnullRow != 0) { goto __351 } Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) goto jump_to_p2 __351: ; goto __8 // Opcode: Offset P1 P2 P3 * * // Synopsis: r[P3] = sqlite_offset(P1) // // Store in register r[P3] the byte offset into the database file that is the // start of the payload for the record at which that cursor P1 is currently // pointing. // // P2 is the column number for the argument to the sqlite_offset() function. // This opcode does not use P2 itself, but the P2 value is used by the // code generator. The P1, P2, and P3 operands to this opcode are the // same as for OP_Column. // // This opcode is only available if SQLite is compiled with the // -DSQLITE_ENABLE_OFFSET_SQL_FUNC option. __70: // The VDBE cursor ; pC = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(pC == uintptr(0) || int32((*VdbeCursor)(unsafe.Pointer(pC)).FeCurType) != CURTYPE_BTREE) { goto __352 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __353 __352: if !((*VdbeCursor)(unsafe.Pointer(pC)).FdeferredMoveto != 0) { goto __354 } rc = Xsqlite3VdbeFinishMoveto(tls, pC) if !(rc != 0) { goto __355 } goto abort_due_to_error __355: ; __354: ; if !(Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC + 48))) != 0) { goto __356 } Xsqlite3VdbeMemSetNull(tls, pOut) goto __357 __356: Xsqlite3VdbeMemSetInt64(tls, pOut, Xsqlite3BtreeOffset(tls, *(*uintptr)(unsafe.Pointer(pC + 48)))) __357: ; __353: ; goto __8 // Opcode: Column P1 P2 P3 P4 P5 // Synopsis: r[P3]=PX // // Interpret the data that cursor P1 points to as a structure built using // the MakeRecord instruction. (See the MakeRecord opcode for additional // information about the format of the data.) Extract the P2-th column // from this record. If there are less that (P2+1) // values in the record, extract a NULL. // // The value extracted is stored in register P3. // // If the record contains fewer than P2 fields, then extract a NULL. Or, // if the P4 argument is a P4_MEM use the value of the P4 argument as // the result. // // If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 then // the result is guaranteed to only be used as the argument of a length() // or typeof() function, respectively. The loading of large blobs can be // skipped for length() and all content loading can be skipped for typeof(). __71: // PseudoTable input register ; *(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)) = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*U32)(unsafe.Pointer(bp + 240 /* p22 */)) = U32((*Op)(unsafe.Pointer(pOp)).Fp2) // If the cursor cache is stale (meaning it is not currently point at // the correct row) then bring it up-to-date by doing the necessary // B-Tree seek. rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+240) if !(rc != 0) { goto __358 } goto abort_due_to_error __358: ; pDest = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaOffset if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { goto __359 } //OPTIMIZATION-IF-FALSE if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnullRow != 0) { goto __360 } if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FeCurType) == CURTYPE_PSEUDO) { goto __362 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record pReg = aMem + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FseekResult)*56 (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+108, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz goto __363 __362: Xsqlite3VdbeMemSetNull(tls, pDest) goto op_column_out __363: ; goto __361 __360: pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, *(*uintptr)(unsafe.Pointer(bp + 232))+108) // Maximum page size is 64KiB if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer(db + 136)))) { goto __364 } goto too_big __364: ; __361: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { if int32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow))) < int32(U8(0x80)) { return uint8(func() int32 { *(*U32)(unsafe.Pointer(aOffset)) = U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow))) return 1 }()) } return Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow, aOffset) }()) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(0) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { goto __365 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain // the complete header, then set it to zero, forcing the header to be // dynamically allocated. (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow = uintptr(0) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FszRow = U32(0) // Make sure a corrupt database has not given us an oversize header. // Do this now to avoid an oversize memory allocation. // // Type entries can be between 1 and 5 bytes each. But 4 and 5 byte // types use so much data space that there can only be 4096 and 32 of // them, respectively. So the maximum header length results from a // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. if !(*(*U32)(unsafe.Pointer(aOffset)) > U32(98307) || *(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize) { goto __367 } goto op_column_corrupt __367: ; goto __366 __365: // This is an optimization. By skipping over the first few tests // (ex: pC->nHdrParsed<=p2) in the next section, we achieve a // measurable performance gain. // // This branch is taken even if aOffset[0]==0. Such a record is never // generated by SQLite, and could be considered corruption, but we // accept it for historical reasons. When aOffset[0]==0, the code this // branch jumps to reads past the end of the record, but never more // than a few bytes. Even if the record occurs at the end of the page // content area, the "page header" comes after the page content and so // this overread is harmless. Similar overreads can occur for a corrupt // database file. zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow // Conditional skipped goto op_column_read_header __366: ; __359: ; // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { goto __368 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { goto __370 } // Make sure zData points to enough of the record to cover the header. if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __372 } libc.Xmemset(tls, bp+248, 0, uint64(unsafe.Sizeof(Mem{}))) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset)), bp+248) if !(rc != SQLITE_OK) { goto __374 } goto abort_due_to_error __374: ; zData = (*Mem)(unsafe.Pointer(bp + 248 /* &sMem */)).Fz goto __373 __372: zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FaRow __373: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. op_column_read_header: i2 = int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i2)*4))) zHdr = zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FiHdrOffset) zEndHdr = zData + uintptr(*(*U32)(unsafe.Pointer(aOffset))) __375: if !(libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 232))+112+uintptr(i2)*4, libc.AssignPtrUint32(bp+304, U32(*(*U8)(unsafe.Pointer(zHdr))))) < U32(0x80)) { goto __378 } zHdr++ offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 304))))) goto __379 __378: zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+304)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 304 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304)))) __379: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = U32(offset64 & uint64(0xffffffff)) goto __376 __376: if U32(i2) <= *(*U32)(unsafe.Pointer(bp + 240)) && zHdr < zEndHdr { goto __375 } goto __377 __377: ; // The record is corrupt if any of the following are true: // (1) the bytes of the header extend past the declared header size // (2) the entire header was used but not all data was used // (3) the end of the data extends beyond the end of the record. if !(zHdr >= zEndHdr && (zHdr > zEndHdr || offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) || offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FpayloadSize)) { goto __380 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { goto __381 } i2 = 0 zHdr = zEndHdr goto __382 __381: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __383 } Xsqlite3VdbeMemRelease(tls, bp+248) __383: ; goto op_column_corrupt __382: ; __380: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FnHdrParsed = U16(i2) (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232 /* pC1 */)))).FiHdrOffset = U32((int64(zHdr) - int64(zData)) / 1) if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __384 } Xsqlite3VdbeMemRelease(tls, bp+248) __384: ; goto __371 __370: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = U32(0) __371: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 240))) { goto __385 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -11) { goto __386 } Xsqlite3VdbeMemShallowCopy(tls, pDest, *(*uintptr)(unsafe.Pointer(pOp + 16)), MEM_Static) goto __387 __386: Xsqlite3VdbeMemSetNull(tls, pDest) __387: ; goto op_column_out __385: ; goto __369 __368: *(*U32)(unsafe.Pointer(bp + 304 /* t */)) = *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 112 + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)) __369: ; // Extract the content for the p2+1-th column. Control can only // reach this point if aOffset[p2], aOffset[p2+1], and pC->aType[p2] are // all valid. if !(int32((*Mem)(unsafe.Pointer(pDest)).Fflags)&(MEM_Agg|MEM_Dyn) != 0) { goto __388 } Xsqlite3VdbeMemSetNull(tls, pDest) __388: ; if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240))+U32(1))*4))) { goto __389 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240)))*4))) if !(*(*U32)(unsafe.Pointer(bp + 304)) < U32(12)) { goto __391 } Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) goto __392 __391: (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, int32((*(*U32)(unsafe.Pointer(bp + 304))-U32(12))/U32(2))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < len+2) { goto __393 } (*Mem)(unsafe.Pointer(pDest)).Fflags = U16(MEM_Null) if !(Xsqlite3VdbeMemGrow(tls, pDest, len+2, 0) != 0) { goto __395 } goto no_mem __395: ; goto __394 __393: (*Mem)(unsafe.Pointer(pDest)).Fz = (*Mem)(unsafe.Pointer(pDest)).FzMalloc __394: ; libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len+1))) = int8(0) (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[*(*U32)(unsafe.Pointer(bp + 304))&U32(1)] __392: ; goto __390 __389: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG) != 0 && (*(*U32)(unsafe.Pointer(bp + 304)) >= U32(12) && *(*U32)(unsafe.Pointer(bp + 304))&U32(1) == U32(0) || int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_TYPEOFARG != 0) || libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 304))))) == 0) { goto __396 } // Content is irrelevant for // 1. the typeof() function, // 2. the length(X) function if X is a blob, and // 3. if the content length is zero. // So we might as well use bogus content rather than reading // content from disk. // // Although sqlite3VdbeSerialGet() may read at most 8 bytes from the // buffer passed to it, debugging function VdbeMemPrettyPrint() may // read more. Use the global constant sqlite3CtypeMap[] as the array, // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) goto __397 __396: rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 48)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 240 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { goto __398 } goto abort_due_to_error __398: ; Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 304 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Ephem)) __397: ; __390: ; op_column_out: ; goto __8 op_column_corrupt: if !((*Op)(unsafe.Pointer(aOp)).Fp3 > 0) { goto __399 } pOp = aOp + uintptr((*Op)(unsafe.Pointer(aOp)).Fp3-1)*24 goto __8 goto __400 __399: rc = Xsqlite3CorruptError(tls, 90333) goto abort_due_to_error __400: ; // Opcode: TypeCheck P1 P2 P3 P4 * // Synopsis: typecheck(r[P1@P2]) // // Apply affinities to the range of P2 registers beginning with P1. // Take the affinities from the Table object in P4. If any value // cannot be coerced into the correct type, then raise an error. // // This opcode is similar to OP_Affinity except that this opcode // forces the register type to the Table column type. This is used // to implement "strict affinity". // // GENERATED ALWAYS AS ... STATIC columns are only checked if P3 // is zero. When P3 is non-zero, no type checking occurs for // static generated columns. Virtual columns are computed at query time // and so they are never checked. // // Preconditions: // // <ul> // <li> P2 should be the number of non-virtual columns in the // table of P4. // <li> Table P4 should be a STRICT table. // </ul> // // If any precondition is false, an assertion fault occurs. __72: ; pTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) aCol = (*Table)(unsafe.Pointer(pTab)).FaCol pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 i3 = 0 __401: if !(i3 < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __403 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { goto __404 } if !(int32((*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { goto __405 } goto __402 __405: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __406 } pIn1 += 56 goto __402 __406: ; __404: ; applyAffinity(tls, pIn1, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).Faffinity, encoding) if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Null == 0) { goto __407 } switch int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8)) & 0xf0 >> 4) { case COLTYPE_BLOB: goto __409 case COLTYPE_INTEGER: goto __410 case COLTYPE_INT: goto __411 case COLTYPE_TEXT: goto __412 case COLTYPE_REAL: goto __413 default: goto __414 } goto __408 __409: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { goto __415 } goto vdbe_type_error __415: ; goto __408 __410: __411: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int == 0) { goto __416 } goto vdbe_type_error __416: ; goto __408 __412: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Str == 0) { goto __417 } goto vdbe_type_error __417: ; goto __408 __413: ; if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { goto __418 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal // so that we keep the high-resolution integer value but know that // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { goto __420 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) goto __421 __420: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) __421: ; goto __419 __418: if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&(MEM_Real|MEM_IntReal) == 0) { goto __422 } goto vdbe_type_error __422: ; __419: ; goto __408 __414: // COLTYPE_ANY. Accept anything. goto __408 __408: ; __407: ; pIn1 += 56 goto __402 __402: i3++ goto __401 goto __403 __403: ; goto __8 vdbe_type_error: Xsqlite3VdbeError(tls, p, ts+6796, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*24 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 goto abort_due_to_error // Opcode: Affinity P1 P2 * P4 * // Synopsis: affinity(r[P1@P2]) // // Apply affinities to a range of P2 registers starting with P1. // // P4 is a string that is P2 characters long. The N-th character of the // string indicates the column affinity that should be used for the N-th // memory cell in the range. __73: // The affinity to be applied zAffinity = *(*uintptr)(unsafe.Pointer(pOp + 16)) pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 __423: if !(1 != 0) { goto __424 } applyAffinity(tls, pIn1, *(*int8)(unsafe.Pointer(zAffinity)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Int != 0) { goto __425 } // When applying REAL affinity, if the result is still an MEM_Int // that will fit in 6 bytes, then change the type to MEM_IntReal // so that we keep the high-resolution integer value but know that // the type really wants to be REAL. if !(*(*I64)(unsafe.Pointer(pIn1)) <= 140737488355327 && *(*I64)(unsafe.Pointer(pIn1)) >= -140737488355328) { goto __426 } *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) goto __427 __426: *(*float64)(unsafe.Pointer(pIn1)) = float64(*(*I64)(unsafe.Pointer(pIn1))) *(*U16)(unsafe.Pointer(pIn1 + 8)) |= U16(MEM_Real) *(*U16)(unsafe.Pointer(pIn1 + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) __427: ; __425: ; zAffinity++ if !(int32(*(*int8)(unsafe.Pointer(zAffinity))) == 0) { goto __428 } goto __424 __428: ; pIn1 += 56 goto __423 __424: ; goto __8 // Opcode: MakeRecord P1 P2 P3 P4 * // Synopsis: r[P3]=mkrec(r[P1@P2]) // // Convert P2 registers beginning with P1 into the [record format] // use as a data record in a database table or as a key // in an index. The OP_Column opcode can decode the record later. // // P4 may be a string that is P2 characters long. The N-th character of the // string indicates the column affinity that should be used for the N-th // field of the index key. // // The mapping from character to affinity is given by the SQLITE_AFF_ // macros defined in sqliteInt.h. // // If P4 is NULL then all index fields have the affinity BLOB. // // The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM // compile-time option is enabled: // // * If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index // of the right-most table that can be null-trimmed. // // * If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value // OPFLAG_NOCHNG_MAGIC if the OP_MakeRecord opcode is allowed to // accept no-change records with serial_type 10. This value is // only used inside an assert() and does not affect the end result. __74: // Where to write next byte of the payload // Assuming the record contains N fields, the record format looks // like this: // // ------------------------------------------------------------------------ // | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 | // ------------------------------------------------------------------------ // // Data(0) is taken from register P1. Data(1) comes from register P1+1 // and so forth. // // Each type field is a varint representing the serial type of the // corresponding data element (see sqlite3VdbeSerialType()). The // hdr-size field is also a varint which is the offset from the beginning // of the record to data0. nData = uint64(0) // Number of bytes of data space nHdr = 0 // Number of bytes of header space nZero = int64(0) // Number of zero bytes at the end of the record nField = (*Op)(unsafe.Pointer(pOp)).Fp1 zAffinity1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) pData0 = aMem + uintptr(nField)*56 nField = (*Op)(unsafe.Pointer(pOp)).Fp2 pLast = pData0 + uintptr(nField-1)*56 file_format = int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat) // Identify the output register pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 // Apply the requested affinity to all inputs if !(zAffinity1 != 0) { goto __429 } pRec = pData0 __430: applyAffinity(tls, pRec, *(*int8)(unsafe.Pointer(zAffinity1)), encoding) if !(int32(*(*int8)(unsafe.Pointer(zAffinity1))) == SQLITE_AFF_REAL && int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int != 0) { goto __433 } *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_IntReal) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) __433: ; zAffinity1++ pRec += 56 goto __431 __431: if *(*int8)(unsafe.Pointer(zAffinity1)) != 0 { goto __430 } goto __432 __432: ; __429: ; // Loop through the elements that will make up the record to figure // out how much space is required for the new record. After this loop, // the Mem.uTemp field of each term should hold the serial-type that will // be used for that term in the generated record: // // Mem.uTemp value type // --------------- --------------- // 0 NULL // 1 1-byte signed integer // 2 2-byte signed integer // 3 3-byte signed integer // 4 4-byte signed integer // 5 6-byte signed integer // 6 8-byte signed integer // 7 IEEE float // 8 Integer constant 0 // 9 Integer constant 1 // 10,11 reserved for expansion // N>=12 and even BLOB // N>=13 and odd text // // The following additional values are computed: // nHdr Number of bytes needed for the record header // nData Number of bytes of data space needed for the record // nZero Zero bytes at the end of the record pRec = pLast __434: ; if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Null != 0) { goto __437 } if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { goto __439 } // Values with MEM_Null and MEM_Zero are created by xColumn virtual // table methods that never invoke sqlite3_result_xxxxx() while // computing an unchanging column value in an UPDATE statement. // Give such values a special internal-use-only serial-type of 10 // so that they can be passed through to xUpdate and have // a true sqlite3_value_nochange(). (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(10) goto __440 __439: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(0) __440: ; nHdr++ goto __438 __437: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&(MEM_Int|MEM_IntReal) != 0) { goto __441 } // Figure out whether to use 1, 2, 4, 6 or 8 bytes. i4 = *(*I64)(unsafe.Pointer(pRec)) if !(i4 < int64(0)) { goto __443 } uu = U64(^i4) goto __444 __443: uu = U64(i4) __444: ; nHdr++ if !(uu <= uint64(127)) { goto __445 } if !(i4&int64(1) == i4 && file_format >= 4) { goto __447 } (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(8) + U32(uu) goto __448 __447: nData++ (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(1) __448: ; goto __446 __445: if !(uu <= uint64(32767)) { goto __449 } nData = nData + uint64(2) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(2) goto __450 __449: if !(uu <= uint64(8388607)) { goto __451 } nData = nData + uint64(3) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(3) goto __452 __451: if !(uu <= uint64(2147483647)) { goto __453 } nData = nData + uint64(4) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(4) goto __454 __453: if !(uu <= uint64(140737488355327)) { goto __455 } nData = nData + uint64(6) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(5) goto __456 __455: nData = nData + uint64(8) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_IntReal != 0) { goto __457 } // If the value is IntReal and is going to take up 8 bytes to store // as an integer, then we might as well make it an 8-byte floating // point value *(*float64)(unsafe.Pointer(pRec)) = float64(*(*I64)(unsafe.Pointer(pRec))) *(*U16)(unsafe.Pointer(pRec + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_IntReal)) *(*U16)(unsafe.Pointer(pRec + 8)) |= U16(MEM_Real) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) goto __458 __457: (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(6) __458: ; __456: ; __454: ; __452: ; __450: ; __446: ; goto __442 __441: if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Real != 0) { goto __459 } nHdr++ nData = nData + uint64(8) (*Mem)(unsafe.Pointer(pRec)).FuTemp = U32(7) goto __460 __459: ; len1 = U32((*Mem)(unsafe.Pointer(pRec)).Fn) serial_type = len1*U32(2) + U32(12) + U32(libc.Bool32(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Str != 0)) if !(int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Zero != 0) { goto __461 } serial_type = serial_type + U32(*(*int32)(unsafe.Pointer(pRec))*2) if !(nData != 0) { goto __462 } if !(Xsqlite3VdbeMemExpandBlob(tls, pRec) != 0) { goto __464 } goto no_mem __464: ; len1 = len1 + U32(*(*int32)(unsafe.Pointer(pRec))) goto __463 __462: nZero = nZero + I64(*(*int32)(unsafe.Pointer(pRec))) __463: ; __461: ; nData = nData + U64(len1) nHdr = nHdr + Xsqlite3VarintLen(tls, uint64(serial_type)) (*Mem)(unsafe.Pointer(pRec)).FuTemp = serial_type __460: ; __442: ; __438: ; if !(pRec == pData0) { goto __465 } goto __436 __465: ; pRec -= 56 goto __435 __435: if 1 != 0 { goto __434 } goto __436 __436: ; // EVIDENCE-OF: R-22564-11647 The header begins with a single varint // which determines the total number of bytes in the header. The varint // value is the size of the header in bytes including the size varint // itself. if !(nHdr <= 126) { goto __466 } // The common case nHdr = nHdr + 1 goto __467 __466: // Rare case of a really large header nVarint = Xsqlite3VarintLen(tls, uint64(nHdr)) nHdr = nHdr + nVarint if !(nVarint < Xsqlite3VarintLen(tls, uint64(nHdr))) { goto __468 } nHdr++ __468: ; __467: ; nByte1 = I64(U64(nHdr) + nData) // Make sure the output register has a buffer large enough to store // the new record. The output register (pOp->p3) is not allowed to // be one of the input registers (because the following call to // sqlite3VdbeMemClearAndResize() could clobber the value before it is used). if !(nByte1+nZero <= I64((*Mem)(unsafe.Pointer(pOut)).FszMalloc)) { goto __469 } // The output register is already large enough to hold the record. // No error checks or buffer enlargement is required (*Mem)(unsafe.Pointer(pOut)).Fz = (*Mem)(unsafe.Pointer(pOut)).FzMalloc goto __470 __469: // Need to make sure that the output is not too big and then enlarge // the output register to hold the full result if !(nByte1+nZero > I64(*(*int32)(unsafe.Pointer(db + 136)))) { goto __471 } goto too_big __471: ; if !(Xsqlite3VdbeMemClearAndResize(tls, pOut, int32(nByte1)) != 0) { goto __472 } goto no_mem __472: ; __470: ; (*Mem)(unsafe.Pointer(pOut)).Fn = int32(nByte1) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Blob) if !(nZero != 0) { goto __473 } *(*int32)(unsafe.Pointer(pOut)) = int32(nZero) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Zero) __473: ; zHdr1 = (*Mem)(unsafe.Pointer(pOut)).Fz zPayload = zHdr1 + uintptr(nHdr) // Write the record zHdr1 += uintptr(func() uint8 { if U32(nHdr) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(zHdr1)) = uint8(nHdr); return 1 }()) } return uint8(Xsqlite3PutVarint(tls, zHdr1, uint64(nHdr))) }()) pRec = pData0 __474: serial_type = (*Mem)(unsafe.Pointer(pRec)).FuTemp // EVIDENCE-OF: R-06529-47362 Following the size varint are one or more // additional varints, one per column. zHdr1 += uintptr(func() uint8 { if serial_type < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(zHdr1)) = uint8(serial_type); return 1 }()) } return uint8(Xsqlite3PutVarint(tls, zHdr1, uint64(serial_type))) }()) // serial type // EVIDENCE-OF: R-64536-51728 The values for each column in the record // immediately follow the header. zPayload += uintptr(Xsqlite3VdbeSerialPut(tls, zPayload, pRec, serial_type)) // content goto __475 __475: if libc.PreIncUintptr(&pRec, 56) <= pLast { goto __474 } goto __476 __476: ; goto __8 // Opcode: Count P1 P2 P3 * * // Synopsis: r[P2]=count() // // Store the number of entries (an integer value) in the table or index // opened by cursor P1 in register P2. // // If P3==0, then an exact count is obtained, which involves visiting // every btree page of the table. But if P3 is non-zero, an estimate // is returned based on the current cursor position. __75: ; pCrsr1 = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + 48)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __477 } *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) goto __478 __477: *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+312) if !(rc != 0) { goto __479 } goto abort_due_to_error __479: ; __478: ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 312 /* nEntry */)) goto check_for_interrupt // Opcode: Savepoint P1 * * P4 * // // Open, release or rollback the savepoint named by parameter P4, depending // on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN). // To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE). // To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK). __76: p12 = (*Op)(unsafe.Pointer(pOp)).Fp1 zName = *(*uintptr)(unsafe.Pointer(pOp + 16)) // Assert that the p1 parameter is valid. Also that if there is no open // transaction, then there cannot be any savepoints. if !(p12 == SAVEPOINT_BEGIN) { goto __480 } if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { goto __482 } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). Xsqlite3VdbeError(tls, p, ts+6837, 0) rc = SQLITE_BUSY goto __483 __482: nName = Xsqlite3Strlen30(tls, zName) // This call is Ok even if this savepoint is actually a transaction // savepoint (and therefore should not prompt xSavepoint()) callbacks. // If this is a transaction savepoint being opened, it is guaranteed // that the db->aVTrans[] array is empty. rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Sqlite3)(unsafe.Pointer(db)).FnStatement+(*Sqlite3)(unsafe.Pointer(db)).FnSavepoint) if !(rc != SQLITE_OK) { goto __484 } goto abort_due_to_error __484: ; // Create a new savepoint structure. pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Savepoint{}))+uint64(nName)+uint64(1)) if !(pNew != 0) { goto __485 } (*Savepoint)(unsafe.Pointer(pNew)).FzName = pNew + 1*32 libc.Xmemcpy(tls, (*Savepoint)(unsafe.Pointer(pNew)).FzName, zName, uint64(nName+1)) // If there is no open transaction, then mark this as a special // "transaction savepoint". if !((*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0) { goto __486 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(1) goto __487 __486: (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint++ __487: ; // Link the new savepoint into the database handle's list. (*Savepoint)(unsafe.Pointer(pNew)).FpNext = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = pNew (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Savepoint)(unsafe.Pointer(pNew)).FnDeferredImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons __485: ; __483: ; goto __481 __480: ; iSavepoint = 0 // Find the named savepoint. If there is no such savepoint, then an // an error is returned to the user. pSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint __488: if !(pSavepoint != 0 && Xsqlite3StrICmp(tls, (*Savepoint)(unsafe.Pointer(pSavepoint)).FzName, zName) != 0) { goto __490 } iSavepoint++ goto __489 __489: pSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext goto __488 goto __490 __490: ; if !!(pSavepoint != 0) { goto __491 } Xsqlite3VdbeError(tls, p, ts+6888, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR goto __492 __491: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0 && p12 == SAVEPOINT_RELEASE) { goto __493 } // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, ts+6910, 0) rc = SQLITE_BUSY goto __494 __493: // Determine whether or not this is a transaction savepoint. If so, // and this is a RELEASE command, then the current transaction // is committed. isTransaction = libc.Bool32((*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint != 0) if !(isTransaction != 0 && p12 == SAVEPOINT_RELEASE) { goto __495 } if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { goto __497 } goto vdbe_return __497: ; (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { goto __498 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return __498: ; rc = (*Vdbe)(unsafe.Pointer(p)).Frc if !(rc != 0) { goto __499 } (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(0) goto __500 __499: (*Sqlite3)(unsafe.Pointer(db)).FisTransactionSavepoint = U8(0) __500: ; goto __496 __495: iSavepoint = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint - iSavepoint - 1 if !(p12 == SAVEPOINT_ROLLBACK) { goto __501 } isSchemaChange = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != U32(0)) ii = 0 __503: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __505 } rc = Xsqlite3BtreeTripAllCursors(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, SQLITE_ABORT|int32(2)<<8, libc.Bool32(isSchemaChange == 0)) if !(rc != SQLITE_OK) { goto __506 } goto abort_due_to_error __506: ; goto __504 __504: ii++ goto __503 goto __505 __505: ; goto __502 __501: ; isSchemaChange = 0 __502: ; ii = 0 __507: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __509 } rc = Xsqlite3BtreeSavepoint(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __510 } goto abort_due_to_error __510: ; goto __508 __508: ii++ goto __507 goto __509 __509: ; if !(isSchemaChange != 0) { goto __511 } Xsqlite3ExpirePreparedStatements(tls, db, 0) Xsqlite3ResetAllSchemasOfConnection(tls, db) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) __511: ; __496: ; if !(rc != 0) { goto __512 } goto abort_due_to_error __512: ; // Regardless of whether this is a RELEASE or ROLLBACK, destroy all // savepoints nested inside of the savepoint being operated on. __513: if !((*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != pSavepoint) { goto __514 } pTmp = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext Xsqlite3DbFree(tls, db, pTmp) (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- goto __513 __514: ; // If it is a RELEASE, then destroy the savepoint being operated on // too. If it is a ROLLBACK TO, then set the number of deferred // constraint violations present in the database to the value stored // when the savepoint was created. if !(p12 == SAVEPOINT_RELEASE) { goto __515 } (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pSavepoint)).FpNext Xsqlite3DbFree(tls, db, pSavepoint) if !!(isTransaction != 0) { goto __517 } (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint-- __517: ; goto __516 __515: ; (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredCons (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = (*Savepoint)(unsafe.Pointer(pSavepoint)).FnDeferredImmCons __516: ; if !(!(isTransaction != 0) || p12 == SAVEPOINT_ROLLBACK) { goto __518 } rc = Xsqlite3VtabSavepoint(tls, db, p12, iSavepoint) if !(rc != SQLITE_OK) { goto __519 } goto abort_due_to_error __519: ; __518: ; __494: ; __492: ; __481: ; if !(rc != 0) { goto __520 } goto abort_due_to_error __520: ; goto __8 // Opcode: AutoCommit P1 P2 * * * // // Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll // back any currently active btree transactions. If there are any active // VMs (apart from this one), then a ROLLBACK fails. A COMMIT fails if // there are active writing VMs or active VMs that use shared cache. // // This instruction causes the VM to halt. __77: desiredAutoCommit = (*Op)(unsafe.Pointer(pOp)).Fp1 iRollback = (*Op)(unsafe.Pointer(pOp)).Fp2 // At least this one VM is active if !(desiredAutoCommit != int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit)) { goto __521 } if !(iRollback != 0) { goto __523 } Xsqlite3RollbackAll(tls, db, SQLITE_ABORT|int32(2)<<8) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1) goto __524 __523: if !(desiredAutoCommit != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeWrite > 0) { goto __525 } // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. Xsqlite3VdbeError(tls, p, ts+6964, 0) rc = SQLITE_BUSY goto abort_due_to_error goto __526 __525: if !(libc.AssignInt32(&rc, Xsqlite3VdbeCheckFk(tls, p, 1)) != SQLITE_OK) { goto __527 } goto vdbe_return goto __528 __527: (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(desiredAutoCommit) __528: ; __526: ; __524: ; if !(Xsqlite3VdbeHalt(tls, p) == SQLITE_BUSY) { goto __529 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3)(unsafe.Pointer(db)).FautoCommit = U8(1 - desiredAutoCommit) (*Vdbe)(unsafe.Pointer(p)).Frc = libc.AssignInt32(&rc, SQLITE_BUSY) goto vdbe_return __529: ; Xsqlite3CloseSavepoints(tls, db) if !((*Vdbe)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __530 } rc = SQLITE_DONE goto __531 __530: rc = SQLITE_ERROR __531: ; goto vdbe_return goto __522 __521: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { return ts + 7019 /* "cannot start a t..." */ } return func() uintptr { if iRollback != 0 { return ts + 7067 /* "cannot rollback ..." */ } return ts + 7110 /* "cannot commit - ..." */ }() }(), 0) rc = SQLITE_ERROR goto abort_due_to_error __522: ; /*NOTREACHED*/ // Opcode: Transaction P1 P2 P3 P4 P5 // // Begin a transaction on database P1 if a transaction is not already // active. // If P2 is non-zero, then a write-transaction is started, or if a // read-transaction is already active, it is upgraded to a write-transaction. // If P2 is zero, then a read-transaction is started. If P2 is 2 or more // then an exclusive transaction is started. // // P1 is the index of the database file on which the transaction is // started. Index 0 is the main database file and index 1 is the // file used for temporary tables. Indices of 2 or more are used for // attached databases. // // If a write-transaction is started and the Vdbe.usesStmtJournal flag is // true (this flag is set if the Vdbe may modify more than one row and may // throw an ABORT exception), a statement transaction may also be opened. // More specifically, a statement transaction is opened iff the database // connection is currently not in autocommit mode, or if there are other // active statements. A statement transaction allows the changes made by this // VDBE to be rolled back after an error without having to roll back the // entire transaction. If no error is encountered, the statement transaction // will automatically commit when the VDBE halts. // // If P5!=0 then this opcode also checks the schema cookie against P3 // and the schema generation counter against P4. // The cookie changes its value whenever the database schema changes. // This operation is used to detect when that the cookie has changed // and that the current process needs to reread the schema. If the schema // cookie in P3 differs from the schema cookie in the database header or // if the schema generation counter in P4 differs from the current // generation counter, then an SQLITE_SCHEMA error is raised and execution // halts. The sqlite3_step() wrapper function might then reprepare the // statement and rerun it from the beginning. __78: *(*int32)(unsafe.Pointer(bp + 320 /* iMeta */)) = 0 if !((*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&(uint64(SQLITE_QueryOnly)|U64(uint64(0x00002))<<32) != uint64(0)) { goto __532 } if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_QueryOnly) != 0) { goto __533 } // Writes prohibited by the "PRAGMA query_only=TRUE" statement rc = SQLITE_READONLY goto __534 __533: // Writes prohibited due to a prior SQLITE_CORRUPT in the current // transaction rc = SQLITE_CORRUPT __534: ; goto abort_due_to_error __532: ; pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt if !(pBt != 0) { goto __535 } rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+320) if !(rc != SQLITE_OK) { goto __536 } if !(rc&0xff == SQLITE_BUSY) { goto __537 } (*Vdbe)(unsafe.Pointer(p)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*Vdbe)(unsafe.Pointer(p)).Frc = rc goto vdbe_return __537: ; goto abort_due_to_error __536: ; if !(Bft(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x40>>6)) != 0 && (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 && (int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0 || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1)) { goto __538 } if !((*Vdbe)(unsafe.Pointer(p)).FiStatement == 0) { goto __539 } (*Sqlite3)(unsafe.Pointer(db)).FnStatement++ (*Vdbe)(unsafe.Pointer(p)).FiStatement = (*Sqlite3)(unsafe.Pointer(db)).FnSavepoint + (*Sqlite3)(unsafe.Pointer(db)).FnStatement __539: ; rc = Xsqlite3VtabSavepoint(tls, db, SAVEPOINT_BEGIN, (*Vdbe)(unsafe.Pointer(p)).FiStatement-1) if !(rc == SQLITE_OK) { goto __540 } rc = Xsqlite3BtreeBeginStmt(tls, pBt, (*Vdbe)(unsafe.Pointer(p)).FiStatement) __540: ; // Store the current value of the database handles deferred constraint // counter. If the statement transaction needs to be rolled back, // the value of this counter needs to be restored too. (*Vdbe)(unsafe.Pointer(p)).FnStmtDefCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons (*Vdbe)(unsafe.Pointer(p)).FnStmtDefImmCons = (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons __538: ; __535: ; if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && (*(*int32)(unsafe.Pointer(bp + 320)) != (*Op)(unsafe.Pointer(pOp)).Fp3 || (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16)))) { goto __541 } // IMPLEMENTATION-OF: R-03189-51135 As each SQL statement runs, the schema // version is checked to ensure that the schema has not changed since the // SQL statement was prepared. Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+7151) // If the schema-cookie from the database file matches the cookie // stored with the in-memory representation of the schema, do // not reload the schema from the database file. // // If virtual-tables are in use, this is not just an optimization. // Often, v-tables store their data in other SQLite tables, which // are queried from within xNext() and other v-table methods using // prepared queries. If such a query is out-of-date, we do not want to // discard the database schema, as the user code implementing the // v-table would have to be ready for the sqlite3_vtab structure itself // to be invalidated whenever sqlite3_step() is called from within // a v-table method. if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 320))) { goto __542 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) __542: ; libc.SetBitFieldPtr16Uint32(p+208, Bft(1), 0, 0x3) rc = SQLITE_SCHEMA __541: ; if !(rc != 0) { goto __543 } goto abort_due_to_error __543: ; goto __8 // Opcode: ReadCookie P1 P2 P3 * * // // Read cookie number P3 from database P1 and write it into register P2. // P3==1 is the schema version. P3==2 is the database format. // P3==3 is the recommended pager cache size, and so forth. P1==0 is // the main database file and P1==1 is the database file used to store // temporary tables. // // There must be a read-lock on the database (either a transaction // must be started or there must be an open cursor) before // executing this instruction. __79: ; iDb = (*Op)(unsafe.Pointer(pOp)).Fp1 iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3 Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt, iCookie, bp+324) pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 324 /* iMeta1 */))) goto __8 // Opcode: SetCookie P1 P2 P3 * P5 // // Write the integer value P3 into cookie number P2 of database P1. // P2==1 is the schema version. P2==2 is the database format. // P2==3 is the recommended pager cache // size, and so forth. P1==0 is the main database file and P1==1 is the // database file used to store temporary tables. // // A transaction must be started before executing this opcode. // // If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal // schema version is set to P3-P5. The "PRAGMA schema_version=N" statement // has P5 set to 1, so that the internal schema version will be different // from the database schema version, resulting in a schema reset. __80: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 // See note about index shifting on OP_ReadCookie rc = Xsqlite3BtreeUpdateMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_SCHEMA_VERSION) { goto __544 } // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) goto __545 __544: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { goto __546 } // Record changes in the file format (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8((*Op)(unsafe.Pointer(pOp)).Fp3) __546: ; __545: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 == 1) { goto __547 } // Invalidate all prepared statements whenever the TEMP database // schema is changed. Ticket #1644 Xsqlite3ExpirePreparedStatements(tls, db, 0) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) __547: ; if !(rc != 0) { goto __548 } goto abort_due_to_error __548: ; goto __8 // Opcode: OpenRead P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // Open a read-only cursor for the database table whose root page is // P2 in a database file. The database file is determined by P3. // P3==0 means the main database, P3==1 means the database used for // temporary tables, and P3>1 means used the corresponding attached // database. Give the new cursor an identifier of P1. The P1 // values need not be contiguous but all P1 values should be small integers. // It is an error for P1 to be negative. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // </ul> // // The P4 value may be either an integer (P4_INT32) or a pointer to // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo // object, then table being opened must be an [index b-tree] where the // KeyInfo object defines the content and collating // sequence of that index b-tree. Otherwise, if P4 is an integer // value, then the table being opened must be a [table b-tree] with a // number of columns no less than the value of P4. // // See also: OpenWrite, ReopenIdx // Opcode: ReopenIdx P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // The ReopenIdx opcode works like OP_OpenRead except that it first // checks to see if the cursor on P1 is already open on the same // b-tree and if it is this opcode becomes a no-op. In other words, // if the cursor is already open, do not reopen it. // // The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ // and with P4 being a P4_KEYINFO object. Furthermore, the P3 value must // be the same as every other ReopenIdx or OpenRead for the same cursor // number. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // </ul> // // See also: OP_OpenRead, OP_OpenWrite // Opcode: OpenWrite P1 P2 P3 P4 P5 // Synopsis: root=P2 iDb=P3 // // Open a read/write cursor named P1 on the table or index whose root // page is P2 (or whose root page is held in register P2 if the // OPFLAG_P2ISREG bit is set in P5 - see below). // // The P4 value may be either an integer (P4_INT32) or a pointer to // a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo // object, then table being opened must be an [index b-tree] where the // KeyInfo object defines the content and collating // sequence of that index b-tree. Otherwise, if P4 is an integer // value, then the table being opened must be a [table b-tree] with a // number of columns no less than the value of P4. // // Allowed P5 bits: // <ul> // <li> <b>0x02 OPFLAG_SEEKEQ</b>: This cursor will only be used for // equality lookups (implemented as a pair of opcodes OP_SeekGE/OP_IdxGT // of OP_SeekLE/OP_IdxLT) // <li> <b>0x08 OPFLAG_FORDELETE</b>: This cursor is used only to seek // and subsequently delete entries in an index btree. This is a // hint to the storage engine that the storage engine is allowed to // ignore. The hint is not used by the official SQLite b*tree storage // engine, but is used by COMDB2. // <li> <b>0x10 OPFLAG_P2ISREG</b>: Use the content of register P2 // as the root page, not the value of P2 itself. // </ul> // // This instruction works like OpenRead except that it opens the cursor // in read/write mode. // // See also: OP_OpenRead, OP_ReopenIdx __81: ; pCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCur != 0 && (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot == U32((*Op)(unsafe.Pointer(pOp)).Fp2)) { goto __549 } // Guaranteed by the code generator Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pCur + 48))) goto open_cursor_set_hints __549: ; // If the cursor is not currently open or is open on a different // index, then fall through into OP_OpenRead to force a reopen __82: __83: ; if !(int32(*(*uint16)(unsafe.Pointer(p + 208))&0x3>>0) == 1) { goto __550 } rc = SQLITE_ABORT | int32(2)<<8 goto abort_due_to_error __550: ; nField1 = 0 pKeyInfo1 = uintptr(0) p23 = U32((*Op)(unsafe.Pointer(pOp)).Fp2) iDb1 = (*Op)(unsafe.Pointer(pOp)).Fp3 pDb1 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb1)*32 pX = (*Db)(unsafe.Pointer(pDb1)).FpBt if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenWrite) { goto __551 } wrFlag = BTREE_WRCSR | int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_FORDELETE if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format) < int32((*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat)) { goto __553 } (*Vdbe)(unsafe.Pointer(p)).FminWriteFileFormat = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb1)).FpSchema)).Ffile_format __553: ; goto __552 __551: wrFlag = 0 __552: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_P2ISREG != 0) { goto __554 } pIn2 = aMem + uintptr(p23)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) p23 = U32(int32(*(*I64)(unsafe.Pointer(pIn2)))) // The p2 value always comes from a prior OP_CreateBtree opcode and // that opcode will always set the p2 value to 2 or more or else fail. // If there were a failure, the prepared statement would have halted // before reaching this instruction. __554: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -9) { goto __555 } pKeyInfo1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) nField1 = int32((*KeyInfo)(unsafe.Pointer(pKeyInfo1)).FnAllField) goto __556 __555: if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -3) { goto __557 } nField1 = *(*int32)(unsafe.Pointer(pOp + 16)) __557: ; __556: ; // Table with INTEGER PRIMARY KEY and nothing else pCur = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, nField1, uint8(CURTYPE_BTREE)) if !(pCur == uintptr(0)) { goto __558 } goto no_mem __558: ; (*VdbeCursor)(unsafe.Pointer(pCur)).FiDb = I8(iDb1) (*VdbeCursor)(unsafe.Pointer(pCur)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCur+8, Bool(1), 2, 0x4) (*VdbeCursor)(unsafe.Pointer(pCur)).FpgnoRoot = p23 rc = Xsqlite3BtreeCursor(tls, pX, p23, wrFlag, pKeyInfo1, *(*uintptr)(unsafe.Pointer(pCur + 48))) (*VdbeCursor)(unsafe.Pointer(pCur)).FpKeyInfo = pKeyInfo1 // Set the VdbeCursor.isTable variable. Previous versions of // SQLite used to check if the root-page flags were sane at this point // and report database corruption if they were not, but this check has // since moved into the btree layer. (*VdbeCursor)(unsafe.Pointer(pCur)).FisTable = U8(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) != -9)) open_cursor_set_hints: ; Xsqlite3BtreeCursorHintFlags(tls, *(*uintptr)(unsafe.Pointer(pCur + 48)), uint32(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_BULKCSR|OPFLAG_SEEKEQ))) if !(rc != 0) { goto __559 } goto abort_due_to_error __559: ; goto __8 // Opcode: OpenDup P1 P2 * * * // // Open a new cursor P1 that points to the same ephemeral table as // cursor P2. The P2 cursor must have been opened by a prior OP_OpenEphemeral // opcode. Only ephemeral cursors may be duplicated. // // Duplicate ephemeral cursors are used for self-joins of materialized views. __84: // The new cursor pOrig = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) // Only ephemeral cursors can be duplicated pCx = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, int32((*VdbeCursor)(unsafe.Pointer(pOrig)).FnField), uint8(CURTYPE_BTREE)) if !(pCx == uintptr(0)) { goto __560 } goto no_mem __560: ; (*VdbeCursor)(unsafe.Pointer(pCx)).FnullRow = U8(1) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 0, 0x1) (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpKeyInfo (*VdbeCursor)(unsafe.Pointer(pCx)).FisTable = (*VdbeCursor)(unsafe.Pointer(pOrig)).FisTable (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot = (*VdbeCursor)(unsafe.Pointer(pOrig)).FpgnoRoot libc.SetBitFieldPtr8Uint32(pCx+8, Bool(int32(*(*uint8)(unsafe.Pointer(pOrig + 8))&0x4>>2)), 2, 0x4) *(*uintptr)(unsafe.Pointer(pCx + 16)) = *(*uintptr)(unsafe.Pointer(pOrig + 16)) libc.SetBitFieldPtr8Uint32(pCx+8, Bool(1), 3, 0x8) libc.SetBitFieldPtr8Uint32(pOrig+8, Bool(1), 3, 0x8) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx + 16)), (*VdbeCursor)(unsafe.Pointer(pCx)).FpgnoRoot, BTREE_WRCSR, (*VdbeCursor)(unsafe.Pointer(pCx)).FpKeyInfo, *(*uintptr)(unsafe.Pointer(pCx + 48))) // The sqlite3BtreeCursor() routine can only fail for the first cursor // opened for a database. Since there is already an open cursor when this // opcode is run, the sqlite3BtreeCursor() cannot fail goto __8 // Opcode: OpenEphemeral P1 P2 P3 P4 P5 // Synopsis: nColumn=P2 // // Open a new cursor P1 to a transient table. // The cursor is always opened read/write even if // the main database is read-only. The ephemeral // table is deleted automatically when the cursor is closed. // // If the cursor P1 is already opened on an ephemeral table, the table // is cleared (all content is erased). // // P2 is the number of columns in the ephemeral table. // The cursor points to a BTree table if P4==0 and to a BTree index // if P4 is not 0. If P4 is not NULL, it points to a KeyInfo structure // that defines the format of keys in the index. // // The P5 parameter can be a mask of the BTREE_* flags defined // in btree.h. These flags control aspects of the operation of // the btree. The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are // added automatically. // // If P3 is positive, then reg[P3] is modified slightly so that it // can be used as zero-length data for OP_Insert. This is an optimization // that avoids an extra OP_Blob opcode to initialize that register. // Opcode: OpenAutoindex P1 P2 * P4 * // Synopsis: nColumn=P2 // // This opcode works the same as OP_OpenEphemeral. It has a // different name to distinguish its use. Tables created using // by this opcode will be used for automatically created transient // indices in joins. __85: __86: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { goto __561 } // Make register reg[P3] into a value that can be used as the data // form sqlite3BtreeInsert() where the length of the data is zero. // Only used when number of columns is zero (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fn = 0 (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)).Fz = ts + 1524 /* "" */ __561: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(pCx1 != 0 && !(int32(*(*uint8)(unsafe.Pointer(pCx1 + 8))&0x8>>3) != 0) && (*Op)(unsafe.Pointer(pOp)).Fp2 <= int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FnField)) { goto __562 } // If the ephermeral table is already open and has no duplicates from // OP_OpenDup, then erase all existing content so that the table is // empty again, rather than creating a new table. (*VdbeCursor)(unsafe.Pointer(pCx1)).FseqCount = int64(0) (*VdbeCursor)(unsafe.Pointer(pCx1)).FcacheStatus = U32(CACHE_STALE) rc = Xsqlite3BtreeClearTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), int32((*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot), uintptr(0)) goto __563 __562: pCx1 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_BTREE)) if !(pCx1 == uintptr(0)) { goto __564 } goto no_mem __564: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(1), 0, 0x1) rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, pCx1+16, BTREE_OMIT_JOURNAL|BTREE_SINGLE|int32((*Op)(unsafe.Pointer(pOp)).Fp5), vfsFlags) if !(rc == SQLITE_OK) { goto __565 } rc = Xsqlite3BtreeBeginTrans(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), 1, uintptr(0)) if !(rc == SQLITE_OK) { goto __566 } // If a transient index is required, create it by calling // sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before // opening it. If a transient table is required, just use the // automatically created table with root-page 1 (an BLOB_INTKEY table). if !(libc.AssignPtrUintptr(pCx1+56, libc.AssignUintptr(&pKeyInfo2, *(*uintptr)(unsafe.Pointer(pOp + 16)))) != uintptr(0)) { goto __567 } rc = Xsqlite3BtreeCreateTable(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), pCx1+68, BTREE_BLOBKEY|int32((*Op)(unsafe.Pointer(pOp)).Fp5)) if !(rc == SQLITE_OK) { goto __569 } rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot, BTREE_WRCSR, pKeyInfo2, *(*uintptr)(unsafe.Pointer(pCx1 + 48))) __569: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(0) goto __568 __567: (*VdbeCursor)(unsafe.Pointer(pCx1)).FpgnoRoot = Pgno(SCHEMA_ROOT) rc = Xsqlite3BtreeCursor(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16)), uint32(SCHEMA_ROOT), BTREE_WRCSR, uintptr(0), *(*uintptr)(unsafe.Pointer(pCx1 + 48))) (*VdbeCursor)(unsafe.Pointer(pCx1)).FisTable = U8(1) __568: ; __566: ; libc.SetBitFieldPtr8Uint32(pCx1+8, Bool(libc.Bool32(int32((*Op)(unsafe.Pointer(pOp)).Fp5) != BTREE_UNORDERED)), 2, 0x4) if !(rc != 0) { goto __570 } Xsqlite3BtreeClose(tls, *(*uintptr)(unsafe.Pointer(pCx1 + 16))) __570: ; __565: ; __563: ; if !(rc != 0) { goto __571 } goto abort_due_to_error __571: ; (*VdbeCursor)(unsafe.Pointer(pCx1)).FnullRow = U8(1) goto __8 // Opcode: SorterOpen P1 P2 P3 P4 * // // This opcode works like OP_OpenEphemeral except that it opens // a transient index that is specifically designed to sort large // tables using an external merge-sort algorithm. // // If argument P3 is non-zero, then it indicates that the sorter may // assume that a stable sort considering the first P3 fields of each // key is sufficient to produce the required results. __87: ; pCx2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, uint8(CURTYPE_SORTER)) if !(pCx2 == uintptr(0)) { goto __572 } goto no_mem __572: ; (*VdbeCursor)(unsafe.Pointer(pCx2)).FpKeyInfo = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VdbeSorterInit(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp3, pCx2) if !(rc != 0) { goto __573 } goto abort_due_to_error __573: ; goto __8 // Opcode: SequenceTest P1 P2 * * * // Synopsis: if( cursor[P1].ctr++ ) pc = P2 // // P1 is a sorter cursor. If the sequence counter is currently zero, jump // to P2. Regardless of whether or not the jump is taken, increment the // the sequence value. __88: ; pC2 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(pC2)).FseqCount, 1) == int64(0)) { goto __574 } goto jump_to_p2 __574: ; goto __8 // Opcode: OpenPseudo P1 P2 P3 * * // Synopsis: P3 columns in r[P2] // // Open a new cursor that points to a fake table that contains a single // row of data. The content of that one row is the content of memory // register P2. In other words, cursor P1 becomes an alias for the // MEM_Blob content contained in register P2. // // A pseudo-table created by this opcode is used to hold a single // row output from the sorter so that the row can be decomposed into // individual columns using the OP_Column opcode. The OP_Column opcode // is the only cursor opcode that works with a pseudo-table. // // P3 is the number of fields in the records that will be stored by // the pseudo-table. __89: ; pCx3 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp3, uint8(CURTYPE_PSEUDO)) if !(pCx3 == uintptr(0)) { goto __575 } goto no_mem __575: ; (*VdbeCursor)(unsafe.Pointer(pCx3)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pCx3)).FseekResult = (*Op)(unsafe.Pointer(pOp)).Fp2 (*VdbeCursor)(unsafe.Pointer(pCx3)).FisTable = U8(1) // Give this pseudo-cursor a fake BtCursor pointer so that pCx // can be safely passed to sqlite3VdbeCursorMoveto(). This avoids a test // for pCx->eCurType==CURTYPE_BTREE inside of sqlite3VdbeCursorMoveto() // which is a performance optimization *(*uintptr)(unsafe.Pointer(pCx3 + 48)) = Xsqlite3BtreeFakeValidCursor(tls) goto __8 // Opcode: Close P1 * * * * // // Close a cursor previously opened as P1. If P1 is not // currently open, this instruction is a no-op. __90: ; Xsqlite3VdbeFreeCursor(tls, p, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) = uintptr(0) goto __8 // Opcode: SeekGE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as the key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the smallest entry that // is greater than or equal to the key value. If there are no records // greater than or equal to the key and P2 is not zero, then jump to P2. // // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this // opcode will either land on a record that exactly matches the key, or // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, // this opcode must be followed by an IdxLE opcode with the same arguments. // The IdxGT opcode will be skipped if this opcode succeeds, but the // IdxGT opcode will be used on subsequent loop iterations. The // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this // is an equality search. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. // // See also: Found, NotFound, SeekLt, SeekGt, SeekLe // Opcode: SeekGT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the smallest entry that // is greater than the key value. If there are no records greater than // the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. // // See also: Found, NotFound, SeekLt, SeekGe, SeekLe // Opcode: SeekLT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the largest entry that // is less than the key value. If there are no records less than // the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. // // See also: Found, NotFound, SeekGt, SeekGe, SeekLe // Opcode: SeekLE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If cursor P1 refers to an SQL table (B-Tree that uses integer keys), // use the value in register P3 as a key. If cursor P1 refers // to an SQL index, then P3 is the first in an array of P4 registers // that are used as an unpacked index key. // // Reposition cursor P1 so that it points to the largest entry that // is less than or equal to the key value. If there are no records // less than or equal to the key and P2 is not zero, then jump to P2. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. // // If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this // opcode will either land on a record that exactly matches the key, or // else it will cause a jump to P2. When the cursor is OPFLAG_SEEKEQ, // this opcode must be followed by an IdxLE opcode with the same arguments. // The IdxGE opcode will be skipped if this opcode succeeds, but the // IdxGE opcode will be used on subsequent loop iterations. The // OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this // is an equality search. // // See also: Found, NotFound, SeekGt, SeekGe, SeekLt __91: // jump, in3, group __92: // jump, in3, group __93: // jump, in3, group __94: // Only interested in == results ; pC3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) oc = int32((*Op)(unsafe.Pointer(pOp)).Fopcode) eqOnly = 0 (*VdbeCursor)(unsafe.Pointer(pC3)).FnullRow = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC3)).FcacheStatus = U32(CACHE_STALE) if !((*VdbeCursor)(unsafe.Pointer(pC3)).FisTable != 0) { goto __576 } // The OPFLAG_SEEKEQ/BTREE_SEEK_EQ flag is only set on index cursors // The input value in P3 might be of any type: integer, real, string, // blob, or NULL. But it needs to be an integer before we can do // the seek, so convert it. pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 flags31 = (*Mem)(unsafe.Pointer(pIn3)).Fflags if !(int32(flags31)&(MEM_Int|MEM_Real|MEM_IntReal|MEM_Str) == MEM_Str) { goto __578 } applyNumericAffinity(tls, pIn3, 0) __578: ; iKey = Xsqlite3VdbeIntValue(tls, pIn3) // Get the integer key value newType = (*Mem)(unsafe.Pointer(pIn3)).Fflags // Record the type after applying numeric affinity (*Mem)(unsafe.Pointer(pIn3)).Fflags = flags31 // But convert the type back to its original // If the P3 value could not be converted into an integer without // loss of information, then special processing is required... if !(int32(newType)&(MEM_Int|MEM_IntReal) == 0) { goto __579 } if !(int32(newType)&MEM_Real == 0) { goto __580 } if !(int32(newType)&MEM_Null != 0 || oc >= OP_SeekGE) { goto __581 } goto jump_to_p2 goto __582 __581: rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+328) if !(rc != SQLITE_OK) { goto __583 } goto abort_due_to_error __583: ; goto seek_not_found __582: ; __580: ; c2 = Xsqlite3IntFloatCompare(tls, iKey, *(*float64)(unsafe.Pointer(pIn3))) // If the approximation iKey is larger than the actual real search // term, substitute >= for > and < for <=. e.g. if the search term // is 4.9 and the integer approximation 5: // // (x > 4.9) -> (x >= 5) // (x <= 4.9) -> (x < 5) if !(c2 > 0) { goto __584 } if !(oc&0x0001 == OP_SeekGT&0x0001) { goto __586 } oc-- __586: ; goto __585 __584: if !(c2 < 0) { goto __587 } if !(oc&0x0001 == OP_SeekLT&0x0001) { goto __588 } oc++ __588: ; __587: ; __585: ; __579: ; rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), int64(U64(iKey)), 0, bp+328) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { goto __589 } goto abort_due_to_error __589: ; goto __577 __576: // For a cursor with the OPFLAG_SEEKEQ/BTREE_SEEK_EQ hint, only the // OP_SeekGE and OP_SeekLE opcodes are allowed, and these must be // immediately followed by an OP_IdxGT or OP_IdxLT opcode, respectively, // with the same key. if !(Xsqlite3BtreeCursorHasHint(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), uint32(BTREE_SEEK_EQ)) != 0) { goto __590 } eqOnly = 1 __590: ; nField2 = *(*int32)(unsafe.Pointer(pOp + 16)) (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FnField = U16(nField2) // The next line of code computes as follows, only faster: // if( oc==OP_SeekGT || oc==OP_SeekLE ){ // r.default_rc = -1; // }else{ // r.default_rc = +1; // } (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).Fdefault_rc = func() int8 { if 1&(oc-OP_SeekLT) != 0 { return int8(-1) } return +int8(1) }() (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*UnpackedRecord)(unsafe.Pointer(bp + 336 /* &r */)).FeqSeen = U8(0) rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), bp+336, bp+328) if !(rc != SQLITE_OK) { goto __591 } goto abort_due_to_error __591: ; if !(eqOnly != 0 && int32((*UnpackedRecord)(unsafe.Pointer(bp+336)).FeqSeen) == 0) { goto __592 } goto seek_not_found __592: ; __577: ; if !(oc >= OP_SeekGE) { goto __593 } if !(*(*int32)(unsafe.Pointer(bp + 328)) < 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekGT) { goto __595 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { goto __597 } if !(rc == SQLITE_DONE) { goto __598 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 goto __599 __598: goto abort_due_to_error __599: ; __597: ; goto __596 __595: *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 __596: ; goto __594 __593: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) > 0 || *(*int32)(unsafe.Pointer(bp + 328)) == 0 && oc == OP_SeekLT) { goto __600 } *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48)), 0) if !(rc != SQLITE_OK) { goto __602 } if !(rc == SQLITE_DONE) { goto __603 } rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = 1 goto __604 __603: goto abort_due_to_error __604: ; __602: ; goto __601 __600: // res might be negative because the table is empty. Check to // see if this is the case. *(*int32)(unsafe.Pointer(bp + 328 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 48))) __601: ; __594: ; seek_not_found: ; if !(*(*int32)(unsafe.Pointer(bp + 328)) != 0) { goto __605 } goto jump_to_p2 goto __606 __605: if !(eqOnly != 0) { goto __607 } pOp += 24 // Skip the OP_IdxLt or OP_IdxGT that follows __607: ; __606: ; goto __8 // Opcode: SeekScan P1 P2 * * * // Synopsis: Scan-ahead up to P1 rows // // This opcode is a prefix opcode to OP_SeekGE. In other words, this // opcode must be immediately followed by OP_SeekGE. This constraint is // checked by assert() statements. // // This opcode uses the P1 through P4 operands of the subsequent // OP_SeekGE. In the text that follows, the operands of the subsequent // OP_SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4. Only // the P1 and P2 operands of this opcode are also used, and are called // This.P1 and This.P2. // // This opcode helps to optimize IN operators on a multi-column index // where the IN operator is on the later terms of the index by avoiding // unnecessary seeks on the btree, substituting steps to the next row // of the b-tree instead. A correct answer is obtained if this opcode // is omitted or is a no-op. // // The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which // is the desired entry that we want the cursor SeekGE.P1 to be pointing // to. Call this SeekGE.P4/P5 row the "target". // // If the SeekGE.P1 cursor is not currently pointing to a valid row, // then this opcode is a no-op and control passes through into the OP_SeekGE. // // If the SeekGE.P1 cursor is pointing to a valid row, then that row // might be the target row, or it might be near and slightly before the // target row. This opcode attempts to position the cursor on the target // row by, perhaps by invoking sqlite3BtreeStep() on the cursor // between 0 and This.P1 times. // // There are three possible outcomes from this opcode:<ol> // // <li> If after This.P1 steps, the cursor is still pointing to a place that // is earlier in the btree than the target row, then fall through // into the subsquence OP_SeekGE opcode. // // <li> If the cursor is successfully moved to the target row by 0 or more // sqlite3BtreeNext() calls, then jump to This.P2, which will land just // past the OP_IdxGT or OP_IdxGE opcode that follows the OP_SeekGE. // // <li> If the cursor ends up past the target row (indicating the the target // row does not exist in the btree) then jump to SeekOP.P2. // </ol> __95: ; // pOp->p2 points to the first instruction past the OP_IdxGT that // follows the OP_SeekGE. pC4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp1)*8)) if !!(Xsqlite3BtreeCursorIsValidNN(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48))) != 0) { goto __608 } goto __8 __608: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r1 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56 *(*int32)(unsafe.Pointer(bp + 384 /* res3 */)) = 0 // Not needed. Only used to silence a warning. __609: if !(1 != 0) { goto __610 } rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+360, bp+384) if !(rc != 0) { goto __611 } goto abort_due_to_error __611: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) > 0) { goto __612 } seekscan_search_fail: ; pOp += 24 goto jump_to_p2 __612: ; if !(*(*int32)(unsafe.Pointer(bp + 384)) == 0) { goto __613 } goto jump_to_p2 goto __610 __613: ; if !(nStep <= 0) { goto __614 } goto __610 __614: ; nStep-- rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC4 + 48)), 0) if !(rc != 0) { goto __615 } if !(rc == SQLITE_DONE) { goto __616 } rc = SQLITE_OK goto seekscan_search_fail goto __617 __616: goto abort_due_to_error __617: ; __615: ; goto __609 __610: ; goto __8 // Opcode: SeekHit P1 P2 P3 * * // Synopsis: set P2<=seekHit<=P3 // // Increase or decrease the seekHit value for cursor P1, if necessary, // so that it is no less than P2 and no greater than P3. // // The seekHit integer represents the maximum of terms in an index for which // there is known to be at least one match. If the seekHit value is smaller // than the total number of equality terms in an index lookup, then the // OP_IfNoHope opcode might run to see if the IN loop can be abandoned // early, thus saving work. This is part of the IN-early-out optimization. // // P1 must be a valid b-tree cursor. __96: ; pC5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) < (*Op)(unsafe.Pointer(pOp)).Fp2) { goto __618 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp2) goto __619 __618: if !(int32((*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit) > (*Op)(unsafe.Pointer(pOp)).Fp3) { goto __620 } (*VdbeCursor)(unsafe.Pointer(pC5)).FseekHit = U16((*Op)(unsafe.Pointer(pOp)).Fp3) __620: ; __619: ; goto __8 // Opcode: IfNotOpen P1 P2 * * * // Synopsis: if( !csr[P1] ) goto P2 // // If cursor P1 is not open, jump to instruction P2. Otherwise, fall through. __97: // jump ; if !!(int32(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8))) != 0) { goto __621 } goto jump_to_p2_and_check_for_interrupt __621: ; goto __8 // Opcode: Found P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // is a prefix of any entry in P1 then a jump is made to P2 and // P1 is left pointing at the matching entry. // // This operation leaves the cursor in a state where it can be // advanced in the forward direction. The Next instruction will work, // but not the Prev instruction. // // See also: NotFound, NoConflict, NotExists. SeekGe // Opcode: NotFound P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // is not the prefix of any entry in P1 then a jump is made to P2. If P1 // does contain an entry whose prefix matches the P3/P4 record then control // falls through to the next instruction and P1 is left pointing at the // matching entry. // // This operation leaves the cursor in a state where it cannot be // advanced in either direction. In other words, the Next and Prev // opcodes do not work after this operation. // // See also: Found, NotExists, NoConflict, IfNoHope // Opcode: IfNoHope P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // Register P3 is the first of P4 registers that form an unpacked // record. Cursor P1 is an index btree. P2 is a jump destination. // In other words, the operands to this opcode are the same as the // operands to OP_NotFound and OP_IdxGT. // // This opcode is an optimization attempt only. If this opcode always // falls through, the correct answer is still obtained, but extra works // is performed. // // A value of N in the seekHit flag of cursor P1 means that there exists // a key P3:N that will match some record in the index. We want to know // if it is possible for a record P3:P4 to match some record in the // index. If it is not possible, we can skips some work. So if seekHit // is less than P4, attempt to find out if a match is possible by running // OP_NotFound. // // This opcode is used in IN clause processing for a multi-column key. // If an IN clause is attached to an element of the key other than the // left-most element, and if there are no matches on the most recent // seek over the whole key, then it might be that one of the key element // to the left is prohibiting a match, and hence there is "no hope" of // any match regardless of how many IN clause elements are checked. // In such a case, we abandon the IN clause search early, using this // opcode. The opcode name comes from the fact that the // jump is taken if there is "no hope" of achieving a match. // // See also: NotFound, SeekHit // Opcode: NoConflict P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // If P4==0 then register P3 holds a blob constructed by MakeRecord. If // P4>0 then register P3 is the first of P4 registers that form an unpacked // record. // // Cursor P1 is on an index btree. If the record identified by P3 and P4 // contains any NULL value, jump immediately to P2. If all terms of the // record are not-NULL then a check is done to determine if any row in the // P1 index btree has a matching key prefix. If there are no matches, jump // immediately to P2. If there is a match, fall through and leave the P1 // cursor pointing to the matching row. // // This opcode is similar to OP_NotFound with the exceptions that the // branch is always taken if any part of the search key input is NULL. // // This operation leaves the cursor in a state where it cannot be // advanced in either direction. In other words, the Next and Prev // opcodes do not work after this operation. // // See also: NotFound, Found, NotExists __98: ; pC6 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC6)).FseekHit) >= *(*int32)(unsafe.Pointer(pOp + 16))) { goto __622 } goto __8 __622: ; __99: // jump, in3 __100: // jump, in3 __101: ; pC7 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(*(*int32)(unsafe.Pointer(pOp + 16)) > 0) { goto __623 } (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) (*UnpackedRecord)(unsafe.Pointer(bp + 392 /* &r2 */)).FaMem = pIn3 pIdxKey = bp + 392 /* &r2 */ pFree = uintptr(0) goto __624 __623: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pIn3) } return 0 }() if !(rc != 0) { goto __625 } goto no_mem __625: ; pFree = libc.AssignUintptr(&pIdxKey, Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo)) if !(pIdxKey == uintptr(0)) { goto __626 } goto no_mem __626: ; Xsqlite3VdbeRecordUnpack(tls, (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo, (*Mem)(unsafe.Pointer(pIn3)).Fn, (*Mem)(unsafe.Pointer(pIn3)).Fz, pIdxKey) __624: ; (*UnpackedRecord)(unsafe.Pointer(pIdxKey)).Fdefault_rc = int8(0) takeJump = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_NoConflict) { goto __627 } // For the OP_NoConflict opcode, take the jump if any of the // input fields are NULL, since any key with a NULL will not // conflict ii1 = 0 __628: if !(ii1 < int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField)) { goto __630 } if !(int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FaMem+uintptr(ii1)*56)).Fflags)&MEM_Null != 0) { goto __631 } takeJump = 1 goto __630 __631: ; goto __629 __629: ii1++ goto __628 goto __630 __630: ; __627: ; rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 48)), pIdxKey, bp+416) if !(pFree != 0) { goto __632 } Xsqlite3DbFreeNN(tls, db, pFree) __632: ; if !(rc != SQLITE_OK) { goto __633 } goto abort_due_to_error __633: ; (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 416 /* res4 */)) alreadyExists = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 416)) == 0) (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = U8(1 - alreadyExists) (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Found) { goto __634 } if !(alreadyExists != 0) { goto __636 } goto jump_to_p2 __636: ; goto __635 __634: ; if !(takeJump != 0 || !(alreadyExists != 0)) { goto __637 } goto jump_to_p2 __637: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_IfNoHope) { goto __638 } (*VdbeCursor)(unsafe.Pointer(pC7)).FseekHit = U16(*(*int32)(unsafe.Pointer(pOp + 16))) __638: ; __635: ; goto __8 // Opcode: SeekRowid P1 P2 P3 * * // Synopsis: intkey=r[P3] // // P1 is the index of a cursor open on an SQL table btree (with integer // keys). If register P3 does not contain an integer or if P1 does not // contain a record with rowid P3 then jump immediately to P2. // Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain // a record with rowid P3 then // leave the cursor pointing at that record and fall through to the next // instruction. // // The OP_NotExists opcode performs the same operation, but with OP_NotExists // the P3 register must be guaranteed to contain an integer value. With this // opcode, register P3 might not contain an integer. // // The OP_NotFound opcode performs the same operation on index btrees // (with arbitrary multi-value keys). // // This opcode leaves the cursor in a state where it cannot be advanced // in either direction. In other words, the Next and Prev opcodes will // not work following this opcode. // // See also: Found, NotFound, NoConflict, SeekRowid // Opcode: NotExists P1 P2 P3 * * // Synopsis: intkey=r[P3] // // P1 is the index of a cursor open on an SQL table btree (with integer // keys). P3 is an integer rowid. If P1 does not contain a record with // rowid P3 then jump immediately to P2. Or, if P2 is 0, raise an // SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then // leave the cursor pointing at that record and fall through to the next // instruction. // // The OP_SeekRowid opcode performs the same operation but also allows the // P3 register to contain a non-integer value, in which case the jump is // always taken. This opcode requires that P3 always contain an integer. // // The OP_NotFound opcode performs the same operation on index btrees // (with arbitrary multi-value keys). // // This opcode leaves the cursor in a state where it cannot be advanced // in either direction. In other words, the Next and Prev opcodes will // not work following this opcode. // // See also: Found, NotFound, NoConflict, SeekRowid __102: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !(int32((*Mem)(unsafe.Pointer(pIn3)).Fflags)&(MEM_Int|MEM_IntReal) == 0) { goto __639 } // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted // into an integer without loss of information. Take care to avoid // changing the datatype of pIn3, however, as it is used by other // parts of the prepared statement. *(*Mem)(unsafe.Pointer(bp + 424 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) applyAffinity(tls, bp+424, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+424)).Fflags)&MEM_Int == 0) { goto __640 } goto jump_to_p2 __640: ; iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 424))) goto notExistsWithKey __639: ; __103: // jump, in3 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 iKey1 = U64(*(*I64)(unsafe.Pointer(pIn3))) notExistsWithKey: pC8 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 48)) *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) = 0 rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+480) (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) // Used by OP_Delete (*VdbeCursor)(unsafe.Pointer(pC8)).FnullRow = U8(0) (*VdbeCursor)(unsafe.Pointer(pC8)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC8)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 480 /* res5 */)) if !(*(*int32)(unsafe.Pointer(bp + 480)) != 0) { goto __641 } if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { goto __642 } rc = Xsqlite3CorruptError(tls, 92480) goto __643 __642: goto jump_to_p2 __643: ; __641: ; if !(rc != 0) { goto __644 } goto abort_due_to_error __644: ; goto __8 // Opcode: Sequence P1 P2 * * * // Synopsis: r[P2]=cursor[P1].ctr++ // // Find the next available sequence number for cursor P1. // Write the sequence number into register P2. // The sequence number on the cursor is incremented after this // instruction. __104: // out2 ; pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = libc.PostIncInt64(&(*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)))).FseqCount, 1) goto __8 // Opcode: NewRowid P1 P2 P3 * * // Synopsis: r[P2]=rowid // // Get a new integer record number (a.k.a "rowid") used as the key to a table. // The record number is not previously used as a key in the database // table that cursor P1 points to. The new record number is written // written to register P2. // // If P3>0 then P3 is a register in the root frame of this VDBE that holds // the largest previously generated record number. No new record numbers are // allowed to be less than this value. When this value reaches its maximum, // an SQLITE_FULL error is generated. The P3 register is updated with the ' // generated record number. This P3 mechanism is used to help implement the // AUTOINCREMENT feature. __105: // Root frame of VDBE *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(0) *(*int32)(unsafe.Pointer(bp + 484 /* res6 */)) = 0 pOut = out2Prerelease(tls, p, pOp) pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) // The next rowid or record number (different terms for the same // thing) is obtained in a two-step algorithm. // // First we attempt to find the largest existing rowid and add one // to that. But if the largest existing rowid is already the maximum // positive integer, we have to fall through to the second // probabilistic algorithm // // The second algorithm is to select a rowid at random and see if // it already exists in the table. If it does not exist, we have // succeeded. If the random rowid does exist, we select a new one // and try again, up to 100 times. // Some compilers complain about constants of the form 0x7fffffffffffffff. // Others complain about 0x7ffffffffffffffffLL. The following macro seems // to provide the constant while making all compilers happy. if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { goto __645 } rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), bp+484) if !(rc != SQLITE_OK) { goto __646 } goto abort_due_to_error __646: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) != 0) { goto __647 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = int64(1) // IMP: R-61914-48074 goto __648 __647: ; *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48))) if !(*(*I64)(unsafe.Pointer(bp + 488)) >= int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) { goto __649 } libc.SetBitFieldPtr8Uint32(pC9+8, Bool(1), 1, 0x2) goto __650 __649: *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // IMP: R-29538-34987 __650: ; __648: ; __645: ; if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __651 } // Assert that P3 is a valid memory cell. if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { goto __652 } pFrame1 = (*Vdbe)(unsafe.Pointer(p)).FpFrame __654: if !((*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent != 0) { goto __656 } goto __655 __655: pFrame1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FpParent goto __654 goto __656 __656: ; // Assert that P3 is a valid memory cell. pMem1 = (*VdbeFrame)(unsafe.Pointer(pFrame1)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 goto __653 __652: // Assert that P3 is a valid memory cell. ; pMem1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 __653: ; Xsqlite3VdbeMemIntegerify(tls, pMem1) // mem(P3) holds an integer if !(*(*I64)(unsafe.Pointer(pMem1)) == int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff)) || Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { goto __657 } rc = SQLITE_FULL // IMP: R-17817-00630 goto abort_due_to_error __657: ; if !(*(*I64)(unsafe.Pointer(bp + 488)) < *(*I64)(unsafe.Pointer(pMem1))+int64(1)) { goto __658 } *(*I64)(unsafe.Pointer(bp + 488 /* v */)) = *(*I64)(unsafe.Pointer(pMem1)) + int64(1) __658: ; *(*I64)(unsafe.Pointer(pMem1)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) __651: ; if !(Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1)) != 0) { goto __659 } // IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the // largest possible integer (9223372036854775807) then the database // engine starts picking positive candidate ROWIDs at random until // it finds one that is not previously used. // We cannot be in random rowid mode if this is // an AUTOINCREMENT table. cnt1 = 0 __660: Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+488) *(*I64)(unsafe.Pointer(bp + 488 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 488 /* v */))++ // Ensure that v is greater than zero goto __661 __661: if libc.AssignInt32(&rc, Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC9 + 48)), int64(U64(*(*I64)(unsafe.Pointer(bp + 488)))), 0, bp+484)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 484)) == 0 && libc.PreIncInt32(&cnt1, 1) < 100 { goto __660 } goto __662 __662: ; if !(rc != 0) { goto __663 } goto abort_due_to_error __663: ; if !(*(*int32)(unsafe.Pointer(bp + 484)) == 0) { goto __664 } rc = SQLITE_FULL // IMP: R-38219-53002 goto abort_due_to_error __664: ; // EV: R-40812-03570 __659: ; (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 488 /* v */)) goto __8 // Opcode: Insert P1 P2 P3 P4 P5 // Synopsis: intkey=r[P3] data=r[P2] // // Write an entry into the table of cursor P1. A new entry is // created if it doesn't already exist or the data for an existing // entry is overwritten. The data is the value MEM_Blob stored in register // number P2. The key is stored in register P3. The key must // be a MEM_Int. // // If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is // incremented (otherwise not). If the OPFLAG_LASTROWID flag of P5 is set, // then rowid is stored for subsequent return by the // sqlite3_last_insert_rowid() function (otherwise it is unmodified). // // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might // run faster by avoiding an unnecessary seek on cursor P1. However, // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior // seeks on the cursor or if the most recent seek used a key equal to P3. // // If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an // UPDATE operation. Otherwise (if the flag is clear) then this opcode // is part of an INSERT operation. The difference is only important to // the update hook. // // Parameter P4 may point to a Table structure, or may be NULL. If it is // not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked // following a successful insert. // // (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically // allocated, then ownership of P2 is transferred to the pseudo-cursor // and register P2 becomes ephemeral. If the cursor is changed, the // value of register P2 will then change. Make sure this does not // cause any problems.) // // This instruction only works on tables. The equivalent instruction // for indices is OP_IdxInsert. __106: // Payload to be inserted pData = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pC10 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pKey = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { goto __665 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC10)).FiDb)*32)).FzDbSName pTab1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) goto __666 __665: pTab1 = uintptr(0) zDb = uintptr(0) __666: ; // Invoke the pre-update hook, if any if !(pTab1 != 0) { goto __667 } if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0)) { goto __668 } Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab1, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) __668: ; if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0) || (*Table)(unsafe.Pointer(pTab1)).FaCol == uintptr(0)) { goto __669 } // Prevent post-update hook from running in cases when it should not pTab1 = uintptr(0) __669: ; __667: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISNOOP != 0) { goto __670 } goto __8 __670: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { goto __671 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ __671: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_LASTROWID != 0) { goto __672 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnKey __672: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnData = (*Mem)(unsafe.Pointer(pData)).Fn seekResult = func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { return (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult } return 0 }() if !(int32((*Mem)(unsafe.Pointer(pData)).Fflags)&MEM_Zero != 0) { goto __673 } (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData)) goto __674 __673: (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FnZero = 0 __674: ; (*BtreePayload)(unsafe.Pointer(bp + 496 /* &x1 */)).FpKey = uintptr(0) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 48)), bp+496, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), seekResult) (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC10)).FcacheStatus = U32(CACHE_STALE) // Invoke the update-hook if required. if !(rc != 0) { goto __675 } goto abort_due_to_error __675: ; if !(pTab1 != 0) { goto __676 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_INSERT }(), zDb, (*Table)(unsafe.Pointer(pTab1)).FzName, (*BtreePayload)(unsafe.Pointer(bp+496 /* &x1 */)).FnKey) __676: ; goto __8 // Opcode: RowCell P1 P2 P3 * * // // P1 and P2 are both open cursors. Both must be opened on the same type // of table - intkey or index. This opcode is used as part of copying // the current row from P2 into P1. If the cursors are opened on intkey // tables, register P3 contains the rowid to use with the new record in // P1. If they are opened on index tables, P3 is not used. // // This opcode must be followed by either an Insert or InsertIdx opcode // with the OPFLAG_PREFORMAT flag set to complete the insert operation. __107: // Rowid value to insert with ; pDest1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pSrc = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*8)) if (*Op)(unsafe.Pointer(pOp)).Fp3 != 0 { iKey2 = *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) } else { iKey2 = int64(0) } rc = Xsqlite3BtreeTransferRow(tls, *(*uintptr)(unsafe.Pointer(pDest1 + 48)), *(*uintptr)(unsafe.Pointer(pSrc + 48)), iKey2) if !(rc != SQLITE_OK) { goto __677 } goto abort_due_to_error __677: ; goto __8 // Opcode: Delete P1 P2 P3 P4 P5 // // Delete the record at which the P1 cursor is currently pointing. // // If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then // the cursor will be left pointing at either the next or the previous // record in the table. If it is left pointing at the next record, then // the next Next instruction will be a no-op. As a result, in this case // it is ok to delete a record from within a Next loop. If // OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be // left in an undefined state. // // If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this // delete one of several associated with deleting a table row and all its // associated index entries. Exactly one of those deletes is the "primary" // delete. The others are all on OPFLAG_FORDELETE cursors or else are // marked with the AUXDELETE flag. // // If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row // change count is incremented (otherwise not). // // P1 must not be pseudo-table. It has to be a real table with // multiple rows. // // If P4 is not NULL then it points to a Table object. In this case either // the update or pre-update hook, or both, may be invoked. The P1 cursor must // have been positioned using OP_NotFound prior to invoking this opcode in // this case. Specifically, if one is configured, the pre-update hook is // invoked if P4 is not NULL. The update-hook is invoked if one is configured, // P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2. // // If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address // of the memory cell that contains the value that the rowid of the row will // be set to by the update. __108: opflags = (*Op)(unsafe.Pointer(pOp)).Fp2 pC11 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) // If the update-hook or pre-update-hook will be invoked, set zDb to // the name of the db to pass as to it. Also set local pTab to a copy // of p4.pTab. Finally, if p5 is true, indicating that this cursor was // last moved with OP_Next or OP_Prev, not Seek or NotFound, set // VdbeCursor.movetoTarget to the current rowid. if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == -6 && ((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 || (*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0)) { goto __678 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*VdbeCursor)(unsafe.Pointer(pC11)).FiDb)*32)).FzDbSName pTab2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_SAVEPOSITION != 0 && (*VdbeCursor)(unsafe.Pointer(pC11)).FisTable != 0) { goto __680 } (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48))) __680: ; goto __679 __678: zDb1 = uintptr(0) pTab2 = uintptr(0) __679: ; // Invoke the pre-update-hook if required. if !((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 && pTab2 != 0) { goto __681 } Xsqlite3VdbePreUpdateHook(tls, p, pC11, func() int32 { if opflags&OPFLAG_ISUPDATE != 0 { return SQLITE_UPDATE } return SQLITE_DELETE }(), zDb1, pTab2, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget, (*Op)(unsafe.Pointer(pOp)).Fp3, -1) __681: ; if !(opflags&OPFLAG_ISNOOP != 0) { goto __682 } goto __8 __682: ; // Only flags that can be set are SAVEPOISTION and AUXDELETE rc = Xsqlite3BtreeDelete(tls, *(*uintptr)(unsafe.Pointer(pC11 + 48)), uint8((*Op)(unsafe.Pointer(pOp)).Fp5)) (*VdbeCursor)(unsafe.Pointer(pC11)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC11)).FseekResult = 0 if !(rc != 0) { goto __683 } goto abort_due_to_error __683: ; // Invoke the update-hook if required. if !(opflags&OPFLAG_NCHANGE != 0) { goto __684 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ if !((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback != 0 && pTab2 != uintptr(0) && (*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __685 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, Sqlite_int64) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpUpdateArg, SQLITE_DELETE, zDb1, (*Table)(unsafe.Pointer(pTab2)).FzName, (*VdbeCursor)(unsafe.Pointer(pC11)).FmovetoTarget) __685: ; __684: ; goto __8 // Opcode: ResetCount * * * * * // // The value of the change counter is copied to the database handle // change counter (returned by subsequent calls to sqlite3_changes()). // Then the VMs internal change counter resets to 0. // This is used by trigger programs. __109: Xsqlite3VdbeSetChanges(tls, db, (*Vdbe)(unsafe.Pointer(p)).FnChange) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) goto __8 // Opcode: SorterCompare P1 P2 P3 P4 // Synopsis: if key(P1)!=trim(r[P3],P4) goto P2 // // P1 is a sorter cursor. This instruction compares a prefix of the // record blob in register P3 against a prefix of the entry that // the sorter cursor currently points to. Only the first P4 fields // of r[P3] and the sorter record are compared. // // If either P3 or the sorter contains a NULL in one of their significant // fields (not counting the P4 fields at the end which are ignored) then // the comparison is assumed to be equal. // // Fall through to next instruction if the two records compare equal to // each other. Jump to P2 if they are different. __110: pC12 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 544 /* res7 */)) = 0 rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+544) if !(rc != 0) { goto __686 } goto abort_due_to_error __686: ; if !(*(*int32)(unsafe.Pointer(bp + 544)) != 0) { goto __687 } goto jump_to_p2 __687: ; goto __8 // Opcode: SorterData P1 P2 P3 * * // Synopsis: r[P2]=data // // Write into register P2 the current sorter data for sorter cursor P1. // Then clear the column header cache on cursor P3. // // This opcode is normally use to move a record out of the sorter and into // a register that is the source for a pseudo-table cursor created using // OpenPseudo. That pseudo-table cursor is the one that is identified by // parameter P3. Clearing the P3 column cache as part of this opcode saves // us from having to issue a separate NullRow instruction to clear that cache. __111: pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 pC13 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3VdbeSorterRowkey(tls, pC13, pOut) if !(rc != 0) { goto __688 } goto abort_due_to_error __688: ; (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)))).FcacheStatus = U32(CACHE_STALE) goto __8 // Opcode: RowData P1 P2 P3 * * // Synopsis: r[P2]=data // // Write into register P2 the complete row content for the row at // which cursor P1 is currently pointing. // There is no interpretation of the data. // It is just copied onto the P2 register exactly as // it is found in the database file. // // If cursor P1 is an index, then the content is the key of the row. // If cursor P2 is a table, then the content extracted is the data. // // If the P1 cursor must be pointing to a valid row (not a NULL row) // of a real table, not a pseudo-table. // // If P3!=0 then this opcode is allowed to make an ephemeral pointer // into the database page. That means that the content of the output // register will be invalidated as soon as the cursor moves - including // moves caused by other cursors that "save" the current cursors // position in order that they can write to the same table. If P3==0 // then a copy of the data is made into memory. P3!=0 is faster, but // P3==0 is safer. // // If P3!=0 then the content of the P2 register is unsuitable for use // in OP_Result and any OP_Result will invalidate the P2 register content. // The P2 register content is invalidated by opcodes like OP_Function or // by any use of another cursor pointing to the same table. __112: pOut = out2Prerelease(tls, p, pOp) pC14 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr3 = *(*uintptr)(unsafe.Pointer(pC14 + 48)) // The OP_RowData opcodes always follow OP_NotExists or // OP_SeekRowid or OP_Rewind/Op_Next with no intervening instructions // that might invalidate the cursor. // If this where not the case, on of the following assert()s // would fail. Should this ever change (because of changes in the code // generator) then the fix would be to insert a call to // sqlite3VdbeCursorMoveto(). n3 = Xsqlite3BtreePayloadSize(tls, pCrsr3) if !(n3 > U32(*(*int32)(unsafe.Pointer(db + 136)))) { goto __689 } goto too_big __689: ; rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCrsr3, n3, pOut) if !(rc != 0) { goto __690 } goto abort_due_to_error __690: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __691 } if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Ephem != 0 && Xsqlite3VdbeMemMakeWriteable(tls, pOut) != 0) { goto __692 } goto no_mem __692: ; __691: ; goto __8 // Opcode: Rowid P1 P2 * * * // Synopsis: r[P2]=rowid // // Store in register P2 an integer which is the key of the table entry that // P1 is currently point to. // // P1 can be either an ordinary table or a virtual table. There used to // be a separate OP_VRowid opcode for use with virtual tables, but this // one opcode now works for both table types. __113: pOut = out2Prerelease(tls, p, pOp) pC15 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { goto __693 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 goto __694 __693: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { goto __695 } *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget goto __696 __695: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { goto __697 } pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 48)))).FpVtab pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule)).FxRowid})).f(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48 /* &.uc */)), bp+552 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __699 } goto abort_due_to_error __699: ; goto __698 __697: ; rc = Xsqlite3VdbeCursorRestore(tls, pC15) if !(rc != 0) { goto __700 } goto abort_due_to_error __700: ; if !((*VdbeCursor)(unsafe.Pointer(pC15)).FnullRow != 0) { goto __701 } (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) goto __8 __701: ; *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 48))) __698: ; __696: ; __694: ; *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 552 /* v3 */)) goto __8 // Opcode: NullRow P1 * * * * // // Move the cursor P1 to a null row. Any OP_Column operations // that occur while the cursor is on the null row will always // write a NULL. // // Or, if P1 is a Pseudo-Cursor (a cursor opened using OP_OpenPseudo) // just reset the cache for that cursor. This causes the row of // content held by the pseudo-cursor to be reparsed. __114: ; pC16 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*VdbeCursor)(unsafe.Pointer(pC16)).FnullRow = U8(1) (*VdbeCursor)(unsafe.Pointer(pC16)).FcacheStatus = U32(CACHE_STALE) if !(int32((*VdbeCursor)(unsafe.Pointer(pC16)).FeCurType) == CURTYPE_BTREE) { goto __702 } Xsqlite3BtreeClearCursor(tls, *(*uintptr)(unsafe.Pointer(pC16 + 48))) __702: ; goto __8 // Opcode: SeekEnd P1 * * * * // // Position cursor P1 at the end of the btree for the purpose of // appending a new entry onto the btree. // // It is assumed that the cursor is used only for appending and so // if the cursor is valid, then the cursor must already be pointing // at the end of the btree and so no changes are made to // the cursor. // Opcode: Last P1 P2 * * * // // The next use of the Rowid or Column or Prev instruction for P1 // will refer to the last entry in the database table or index. // If the table or index is empty and P2>0, then jump immediately to P2. // If P2 is 0 or if the table or index is not empty, fall through // to the following instruction. // // This opcode leaves the cursor configured to move in reverse order, // from the end toward the beginning. In other words, the cursor is // configured to use Prev, not Next. __115: __116: ; pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 48)) *(*int32)(unsafe.Pointer(bp + 560 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { goto __703 } (*VdbeCursor)(unsafe.Pointer(pC17)).FseekResult = -1 if !(Xsqlite3BtreeCursorIsValidNN(tls, pCrsr4) != 0) { goto __704 } goto __8 __704: ; __703: ; rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+560) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 560 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { goto __705 } goto abort_due_to_error __705: ; if !((*Op)(unsafe.Pointer(pOp)).Fp2 > 0) { goto __706 } if !(*(*int32)(unsafe.Pointer(bp + 560)) != 0) { goto __707 } goto jump_to_p2 __707: ; __706: ; goto __8 // Opcode: IfSmaller P1 P2 P3 * * // // Estimate the number of rows in the table P1. Jump to P2 if that // estimate is less than approximately 2**(0.1*P3). __117: ; pC18 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+564) if !(rc != 0) { goto __708 } goto abort_due_to_error __708: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) == 0) { goto __709 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !(sz >= int64(0) && int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3) { goto __710 } *(*int32)(unsafe.Pointer(bp + 564 /* res9 */)) = 1 __710: ; __709: ; if !(*(*int32)(unsafe.Pointer(bp + 564)) != 0) { goto __711 } goto jump_to_p2 __711: ; goto __8 // Opcode: SorterSort P1 P2 * * * // // After all records have been inserted into the Sorter object // identified by P1, invoke this opcode to actually do the sorting. // Jump to P2 if there are no records to be sorted. // // This opcode is an alias for OP_Sort and OP_Rewind that is used // for Sorter objects. // Opcode: Sort P1 P2 * * * // // This opcode does exactly the same thing as OP_Rewind except that // it increments an undocumented global variable used for testing. // // Sorting is accomplished by writing records into a sorting index, // then rewinding that index and playing it back from beginning to // end. We use the OP_Sort opcode instead of OP_Rewind to do the // rewinding so that the global variable will be incremented and // regression tests can determine whether or not the optimizer is // correctly optimizing out sorts. __118: // jump __119: // jump *(*U32)(unsafe.Pointer(p + 220 + 2*4))++ // Opcode: Rewind P1 P2 * * * // // The next use of the Rowid or Column or Next instruction for P1 // will refer to the first entry in the database table or index. // If the table or index is empty, jump immediately to P2. // If the table or index is not empty, fall through to the following // instruction. // // This opcode leaves the cursor configured to move in forward order, // from the beginning toward the end. In other words, the cursor is // configured to use Next, not Prev. __120: ; pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) *(*int32)(unsafe.Pointer(bp + 568 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { goto __712 } rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+568) goto __713 __712: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 48)) rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+568) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) __713: ; if !(rc != 0) { goto __714 } goto abort_due_to_error __714: ; (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 568 /* res10 */))) if !(*(*int32)(unsafe.Pointer(bp + 568)) != 0) { goto __715 } goto jump_to_p2 __715: ; goto __8 // Opcode: Next P1 P2 P3 P4 P5 // // Advance cursor P1 so that it points to the next key/data pair in its // table or index. If there are no more key/value pairs then fall through // to the following instruction. But if the cursor advance was successful, // jump immediately to P2. // // The Next opcode is only valid following an SeekGT, SeekGE, or // OP_Rewind opcode used to position the cursor. Next is not allowed // to follow SeekLT, SeekLE, or OP_Last. // // The P1 cursor must be for a real table, not a pseudo-table. P1 must have // been opened prior to this opcode or the program will segfault. // // The P3 value is a hint to the btree implementation. If P3==1, that // means P1 is an SQL index and that this instruction could have been // omitted if that index had been unique. P3 is usually 0. P3 is // always either 0 or 1. // // P4 is always of type P4_ADVANCE. The function pointer points to // sqlite3BtreeNext(). // // If P5 is positive and the jump is taken, then event counter // number P5-1 in the prepared statement is incremented. // // See also: Prev // Opcode: Prev P1 P2 P3 P4 P5 // // Back up cursor P1 so that it points to the previous key/data pair in its // table or index. If there is no previous key/value pairs then fall through // to the following instruction. But if the cursor backup was successful, // jump immediately to P2. // // // The Prev opcode is only valid following an SeekLT, SeekLE, or // OP_Last opcode used to position the cursor. Prev is not allowed // to follow SeekGT, SeekGE, or OP_Rewind. // // The P1 cursor must be for a real table, not a pseudo-table. If P1 is // not open then the behavior is undefined. // // The P3 value is a hint to the btree implementation. If P3==1, that // means P1 is an SQL index and that this instruction could have been // omitted if that index had been unique. P3 is usually 0. P3 is // always either 0 or 1. // // P4 is always of type P4_ADVANCE. The function pointer points to // sqlite3BtreePrevious(). // // If P5 is positive and the jump is taken, then event counter // number P5-1 in the prepared statement is incremented. // Opcode: SorterNext P1 P2 * * P5 // // This opcode works just like OP_Next except that P1 must be a // sorter object for which the OP_SorterSort opcode has been // invoked. This opcode advances the cursor to the next sorted // record, or jumps to P2 if there are no more sorted records. __121: pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) rc = Xsqlite3VdbeSorterNext(tls, db, pC20) goto next_tail __122: // jump __123: // jump ; pC20 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) // The Next opcode is only used after SeekGT, SeekGE, Rewind, and Found. // The Prev opcode is only used after SeekLT, SeekLE, and Last. rc = (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */))})).f(tls, *(*uintptr)(unsafe.Pointer(pC20 + 48 /* &.uc */)), (*Op)(unsafe.Pointer(pOp)).Fp3) next_tail: (*VdbeCursor)(unsafe.Pointer(pC20)).FcacheStatus = U32(CACHE_STALE) if !(rc == SQLITE_OK) { goto __716 } (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(0) *(*U32)(unsafe.Pointer(p + 220 + uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*4))++ goto jump_to_p2_and_check_for_interrupt __716: ; if !(rc != SQLITE_DONE) { goto __717 } goto abort_due_to_error __717: ; rc = SQLITE_OK (*VdbeCursor)(unsafe.Pointer(pC20)).FnullRow = U8(1) goto check_for_interrupt // Opcode: IdxInsert P1 P2 P3 P4 P5 // Synopsis: key=r[P2] // // Register P2 holds an SQL index key made using the // MakeRecord instructions. This opcode writes that key // into the index P1. Data for the entry is nil. // // If P4 is not zero, then it is the number of values in the unpacked // key of reg(P2). In that case, P3 is the index of the first register // for the unpacked key. The availability of the unpacked key can sometimes // be an optimization. // // If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer // that this insert is likely to be an append. // // If P5 has the OPFLAG_NCHANGE bit set, then the change counter is // incremented by this instruction. If the OPFLAG_NCHANGE bit is clear, // then the change counter is unchanged. // // If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might // run faster by avoiding an unnecessary seek on cursor P1. However, // the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior // seeks on the cursor or if the most recent seek used a key equivalent // to P2. // // This instruction only works for indices. The equivalent instruction // for tables is OP_Insert. __124: ; pC21 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NCHANGE != 0) { goto __718 } (*Vdbe)(unsafe.Pointer(p)).FnChange++ __718: ; rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pIn2) } return 0 }() if !(rc != 0) { goto __719 } goto abort_due_to_error __719: ; (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 (*BtreePayload)(unsafe.Pointer(bp + 576 /* &x2 */)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 48)), bp+576, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { return (*VdbeCursor)(unsafe.Pointer(pC21)).FseekResult } return 0 }()) (*VdbeCursor)(unsafe.Pointer(pC21)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { goto __720 } goto abort_due_to_error __720: ; goto __8 // Opcode: SorterInsert P1 P2 * * * // Synopsis: key=r[P2] // // Register P2 holds an SQL index key made using the // MakeRecord instructions. This opcode writes that key // into the sorter P1. Data for the entry is nil. __125: ; pC22 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = func() int32 { if int32((*Mem)(unsafe.Pointer(pIn2)).Fflags)&MEM_Zero != 0 { return Xsqlite3VdbeMemExpandBlob(tls, pIn2) } return 0 }() if !(rc != 0) { goto __721 } goto abort_due_to_error __721: ; rc = Xsqlite3VdbeSorterWrite(tls, pC22, pIn2) if !(rc != 0) { goto __722 } goto abort_due_to_error __722: ; goto __8 // Opcode: IdxDelete P1 P2 P3 * P5 // Synopsis: key=r[P2@P3] // // The content of P3 registers starting at register P2 form // an unpacked index key. This opcode removes that entry from the // index opened by cursor P1. // // If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error // if no matching index entry is found. This happens when running // an UPDATE or DELETE statement and the index entry to be updated // or deleted is not found. For some uses of IdxDelete // (example: the EXCEPT operator) it does not matter that no matching // entry is found. For those cases, P5 is zero. Also, do not raise // this (self-correcting and non-critical) error if in writable_schema mode. __126: ; pC23 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 48)) (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 624 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+624, bp+648) if !(rc != 0) { goto __723 } goto abort_due_to_error __723: ; if !(*(*int32)(unsafe.Pointer(bp + 648)) == 0) { goto __724 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) if !(rc != 0) { goto __726 } goto abort_due_to_error __726: ; goto __725 __724: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __727 } rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 93536, ts+7179) goto abort_due_to_error __727: ; __725: ; (*VdbeCursor)(unsafe.Pointer(pC23)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC23)).FseekResult = 0 goto __8 // Opcode: DeferredSeek P1 * P3 P4 * // Synopsis: Move P3 to P1.rowid if needed // // P1 is an open index cursor and P3 is a cursor on the corresponding // table. This opcode does a deferred seek of the P3 table cursor // to the row that corresponds to the current row of P1. // // This is a deferred seek. Nothing actually happens until // the cursor is used to read a record. That way, if no reads // occur, no unnecessary I/O happens. // // P4 may be an array of integers (type P4_INTARRAY) containing // one entry for each column in the P3 table. If array entry a(i) // is non-zero, then reading column a(i)-1 from cursor P3 is // equivalent to performing the deferred seek and then reading column i // from P1. This information is stored in P3 and used to redirect // reads against P3 over to P1, thus possibly avoiding the need to // seek and read cursor P3. // Opcode: IdxRowid P1 P2 * * * // Synopsis: r[P2]=rowid // // Write into register P2 an integer which is the last entry in the record at // the end of the index key pointed to by cursor P1. This integer should be // the rowid of the table entry to which this index entry points. // // See also: Rowid, MakeRecord. __127: __128: // Rowid that P1 current points to ; pC24 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) // The IdxRowid and Seek opcodes are combined because of the commonality // of sqlite3VdbeCursorRestore() and sqlite3VdbeIdxRowid(). rc = Xsqlite3VdbeCursorRestore(tls, pC24) // sqlite3VbeCursorRestore() can only fail if the record has been deleted // out from under the cursor. That will never happens for an IdxRowid // or Seek opcode if !(rc != SQLITE_OK) { goto __728 } goto abort_due_to_error __728: ; if !!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0) { goto __729 } *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 48)), bp+656) if !(rc != SQLITE_OK) { goto __731 } goto abort_due_to_error __731: ; if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_DeferredSeek) { goto __732 } pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FnullRow = U8(0) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FmovetoTarget = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FdeferredMoveto = U8(1) *(*uintptr)(unsafe.Pointer(pTabCur + 16)) = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FpAltCursor = pC24 goto __733 __732: pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 656 /* rowid */)) __733: ; goto __730 __729: ; Xsqlite3VdbeMemSetNull(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) __730: ; goto __8 // Opcode: FinishSeek P1 * * * * // // If cursor P1 was previously moved via OP_DeferredSeek, complete that // seek operation now, without further delay. If the cursor seek has // already occurred, this instruction is a no-op. __129: // The P1 index cursor ; pC25 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pC25)).FdeferredMoveto != 0) { goto __734 } rc = Xsqlite3VdbeFinishMoveto(tls, pC25) if !(rc != 0) { goto __735 } goto abort_due_to_error __735: ; __734: ; goto __8 // Opcode: IdxGE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY. Compare this key value against the index // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID // fields at the end. // // If the P1 index entry is greater than or equal to the key value // then jump to P2. Otherwise fall through to the next instruction. // Opcode: IdxGT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY. Compare this key value against the index // that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID // fields at the end. // // If the P1 index entry is greater than the key value // then jump to P2. Otherwise fall through to the next instruction. // Opcode: IdxLT P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY or ROWID. Compare this key value against // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or // ROWID on the P1 index. // // If the P1 index entry is less than the key value then jump to P2. // Otherwise fall through to the next instruction. // Opcode: IdxLE P1 P2 P3 P4 * // Synopsis: key=r[P3@P4] // // The P4 register values beginning with P3 form an unpacked index // key that omits the PRIMARY KEY or ROWID. Compare this key value against // the index that P1 is currently pointing to, ignoring the PRIMARY KEY or // ROWID on the P1 index. // // If the P1 index entry is less than or equal to the key value then jump // to P2. Otherwise fall through to the next instruction. __130: // jump __131: // jump __132: // jump __133: ; pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { goto __736 } (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(-1) goto __737 __736: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).Fdefault_rc = int8(0) __737: ; (*UnpackedRecord)(unsafe.Pointer(bp + 720 /* &r4 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 /* Inlined version of sqlite3VdbeIdxKeyCompare() */ nCellKey = int64(0) pCur1 = *(*uintptr)(unsafe.Pointer(pC26 + 48)) nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur1)) // nCellKey will always be between 0 and 0xffffffff because of the way // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { goto __738 } rc = Xsqlite3CorruptError(tls, 93740) goto abort_due_to_error __738: ; Xsqlite3VdbeMemInit(tls, bp+664, db, uint16(0)) rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+664) if !(rc != 0) { goto __739 } goto abort_due_to_error __739: ; res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+664 /* &m */)).Fz, bp+720, 0) Xsqlite3VdbeMemRelease(tls, bp+664) // End of inlined sqlite3VdbeIdxKeyCompare() if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode)&1 == OP_IdxLT&1) { goto __740 } res12 = -res12 goto __741 __740: ; res12++ __741: ; if !(res12 > 0) { goto __742 } goto jump_to_p2 __742: ; goto __8 // Opcode: Destroy P1 P2 P3 * * // // Delete an entire database table or index whose root page in the database // file is given by P1. // // The table being destroyed is in the main database file if P3==0. If // P3==1 then the table to be clear is in the auxiliary database file // that is used to store tables create using CREATE TEMPORARY TABLE. // // If AUTOVACUUM is enabled then it is possible that another root page // might be moved into the newly deleted root page in order to keep all // root pages contiguous at the beginning of the database. The former // value of the root page that moved - its value before the move occurred - // is stored in register P2. If no page movement was required (because the // table being dropped was already the last one in the database) then a // zero is stored in register P2. If AUTOVACUUM is disabled then a zero // is stored in register P2. // // This opcode throws an error if there are any active reader VMs when // it is invoked. This is done to avoid the difficulty associated with // updating existing cursors when a root page is moved in an AUTOVACUUM // database. This error is thrown even if the database is not an AUTOVACUUM // db in order to avoid introducing an incompatibility between autovacuum // and non-autovacuum modes. // // See also: Clear __134: ; pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy+1) { goto __743 } rc = SQLITE_LOCKED (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) goto abort_due_to_error goto __744 __743: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 744 /* iMoved */)) = 0 // Not needed. Only to silence a warning. rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+744) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))) if !(rc != 0) { goto __745 } goto abort_due_to_error __745: ; if !(*(*int32)(unsafe.Pointer(bp + 744)) != 0) { goto __746 } Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 744 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = U8(iDb2 + 1) __746: ; __744: ; goto __8 // Opcode: Clear P1 P2 P3 // // Delete all contents of the database table or index whose root page // in the database file is given by P1. But, unlike Destroy, do not // remove the table or index from the database file. // // The table being clear is in the main database file if P2==0. If // P2==1 then the table to be clear is in the auxiliary database file // that is used to store tables create using CREATE TEMPORARY TABLE. // // If the P3 value is non-zero, then the row change count is incremented // by the number of rows in the table being cleared. If P3 is greater // than zero, then the value stored in register P3 is also incremented // by the number of rows in the table being cleared. // // See also: Destroy __135: ; *(*I64)(unsafe.Pointer(bp + 752 /* nChange */)) = int64(0) rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+752) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __747 } *(*I64)(unsafe.Pointer(p + 64)) += *(*I64)(unsafe.Pointer(bp + 752)) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { goto __748 } *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56)) += *(*I64)(unsafe.Pointer(bp + 752)) __748: ; __747: ; if !(rc != 0) { goto __749 } goto abort_due_to_error __749: ; goto __8 // Opcode: ResetSorter P1 * * * * // // Delete all contents from the ephemeral table or sorter // that is open on cursor P1. // // This opcode only works for cursors used for sorting and // opened with OP_OpenEphemeral or OP_SorterOpen. __136: ; pC27 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !(int32((*VdbeCursor)(unsafe.Pointer(pC27)).FeCurType) == CURTYPE_SORTER) { goto __750 } Xsqlite3VdbeSorterReset(tls, db, *(*uintptr)(unsafe.Pointer(pC27 + 48))) goto __751 __750: ; rc = Xsqlite3BtreeClearTableOfCursor(tls, *(*uintptr)(unsafe.Pointer(pC27 + 48))) if !(rc != 0) { goto __752 } goto abort_due_to_error __752: ; __751: ; goto __8 // Opcode: CreateBtree P1 P2 P3 * * // Synopsis: r[P2]=root iDb=P1 flags=P3 // // Allocate a new b-tree in the main database file if P1==0 or in the // TEMP database file if P1==1 or in an attached database if // P1>1. The P3 argument must be 1 (BTREE_INTKEY) for a rowid table // it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table. // The root page number of the new b-tree is stored in register P2. __137: ; pOut = out2Prerelease(tls, p, pOp) *(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */)) = Pgno(0) pDb2 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32 rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+760, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { goto __753 } goto abort_due_to_error __753: ; *(*I64)(unsafe.Pointer(pOut)) = I64(*(*Pgno)(unsafe.Pointer(bp + 760 /* pgno */))) goto __8 // Opcode: SqlExec * * * P4 * // // Run the SQL statement or statements specified in the P4 string. __138: ; (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec++ rc = Xsqlite3_exec(tls, db, *(*uintptr)(unsafe.Pointer(pOp + 16)), uintptr(0), uintptr(0), uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FnSqlExec-- if !(rc != 0) { goto __754 } goto abort_due_to_error __754: ; goto __8 // Opcode: ParseSchema P1 * * P4 * // // Read and parse all entries from the schema table of database P1 // that match the WHERE clause P4. If P4 is a NULL pointer, then the // entire schema for P1 is reparsed. // // This opcode invokes the parser to create a new virtual machine, // then runs the new virtual machine. It is thus a re-entrant opcode. __139: // Any prepared statement that invokes this opcode will hold mutexes // on every btree. This is a prerequisite for invoking // sqlite3InitCallback(). iDb3 = (*Op)(unsafe.Pointer(pOp)).Fp1 if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) == uintptr(0)) { goto __755 } Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpSchema) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) rc = Xsqlite3InitOne(tls, db, iDb3, p+176, uint32((*Op)(unsafe.Pointer(pOp)).Fp5)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) goto __756 __755: zSchema = ts + 7196 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FpzErrMsg = p + 176 (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, ts+7210, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { goto __757 } rc = SQLITE_NOMEM goto __758 __757: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc = SQLITE_OK (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).FnInitRow = U32(0) rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+768 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { goto __759 } rc = (*InitData)(unsafe.Pointer(bp + 768 /* &initData */)).Frc __759: ; if !(rc == SQLITE_OK && (*InitData)(unsafe.Pointer(bp+768)).FnInitRow == U32(0)) { goto __760 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. rc = Xsqlite3CorruptError(tls, 93992) __760: ; Xsqlite3DbFreeNN(tls, db, zSql) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) __758: ; __756: ; if !(rc != 0) { goto __761 } Xsqlite3ResetAllSchemasOfConnection(tls, db) if !(rc == SQLITE_NOMEM) { goto __762 } goto no_mem __762: ; goto abort_due_to_error __761: ; goto __8 // Opcode: LoadAnalysis P1 * * * * // // Read the sqlite_stat1 table for database P1 and load the content // of that table into the internal index hash table. This will cause // the analysis to be used when preparing all subsequent queries. __140: ; rc = Xsqlite3AnalysisLoad(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) if !(rc != 0) { goto __763 } goto abort_due_to_error __763: ; goto __8 // Opcode: DropTable P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the table named P4 in database P1. This is called after a table // is dropped from disk (using the Destroy opcode) in order to keep // the internal representation of the // schema consistent with what is on disk. __141: ; Xsqlite3UnlinkAndDeleteTable(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) goto __8 // Opcode: DropIndex P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the index named P4 in database P1. This is called after an index // is dropped from disk (using the Destroy opcode) // in order to keep the internal representation of the // schema consistent with what is on disk. __142: ; Xsqlite3UnlinkAndDeleteIndex(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) goto __8 // Opcode: DropTrigger P1 * * P4 * // // Remove the internal (in-memory) data structures that describe // the trigger named P4 in database P1. This is called after a trigger // is dropped from disk (using the Destroy opcode) in order to keep // the internal representation of the // schema consistent with what is on disk. __143: ; Xsqlite3UnlinkAndDeleteTrigger(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) goto __8 // Opcode: IntegrityCk P1 P2 P3 P4 P5 // // Do an analysis of the currently open database. Store in // register P1 the text of an error message describing any problems. // If no problems are found, store a NULL in register P1. // // The register P3 contains one less than the maximum number of allowed errors. // At most reg(P3) errors will be reported. // In other words, the analysis stops as soon as reg(P1) errors are // seen. Reg(P1) is updated with the number of errors remaining. // // The root page numbers of all tables in the database are integers // stored in P4_INTARRAY argument. // // If P5 is not zero, the check is done on the auxiliary database // file, not the main database file. // // This opcode is used to implement the integrity_check pragma. __144: // Register keeping track of errors remaining ; nRoot = (*Op)(unsafe.Pointer(pOp)).Fp2 aRoot = *(*uintptr)(unsafe.Pointer(pOp + 16)) pnErr = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*32)).FpBt, aRoot+1*4, nRoot, int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+808) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 808)) == 0) { goto __764 } goto __765 __764: if !(z == uintptr(0)) { goto __766 } goto no_mem goto __767 __766: *(*I64)(unsafe.Pointer(pnErr)) -= I64(*(*int32)(unsafe.Pointer(bp + 808)) - 1) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) __767: ; __765: ; Xsqlite3VdbeChangeEncoding(tls, pIn1, int32(encoding)) goto check_for_interrupt // Opcode: RowSetAdd P1 P2 * * * // Synopsis: rowset(P1)=r[P2] // // Insert the integer value held by register P2 into a RowSet object // held in register P1. // // An assertion fails if P2 is not an integer. __145: // in1, in2 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { goto __768 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { goto __769 } goto no_mem __769: ; __768: ; Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn2))) goto __8 // Opcode: RowSetRead P1 P2 P3 * * // Synopsis: r[P3]=rowset(P1) // // Extract the smallest value from the RowSet object in P1 // and put that value into register P3. // Or, if RowSet object P1 is initially empty, leave P3 // unchanged and jump to instruction P2. __146: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0 || Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+816) == 0) { goto __770 } // The boolean index is empty Xsqlite3VdbeMemSetNull(tls, pIn1) goto jump_to_p2_and_check_for_interrupt goto __771 __770: // A value was pulled from the index ; Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*I64)(unsafe.Pointer(bp + 816 /* val */))) __771: ; goto check_for_interrupt // Opcode: RowSetTest P1 P2 P3 P4 // Synopsis: if r[P3] in rowset(P1) goto P2 // // Register P3 is assumed to hold a 64-bit integer value. If register P1 // contains a RowSet object and that RowSet object contains // the value held in P3, jump to register P2. Otherwise, insert the // integer in P3 into the RowSet and continue on to the // next opcode. // // The RowSet object is optimized for the case where sets of integers // are inserted in distinct phases, which each set contains no duplicates. // Each set is identified by a unique P4 value. The first set // must have P4==0, the final set must have P4==-1, and for all other sets // must have P4>0. // // This allows optimizations: (a) when P4==0 there is no need to test // the RowSet object for P3, as it is guaranteed not to contain it, // (b) when P4==-1 there is no need to insert the value, as it will // never be tested for, and (c) when a value that is part of set X is // inserted, there is no need to search to see if the same value was // previously inserted as part of set X (only if it was previously // inserted as part of some other set). __147: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 iSet = *(*int32)(unsafe.Pointer(pOp + 16)) // If there is anything other than a rowset object in memory cell P1, // delete it now and initialize P1 with an empty rowset if !(int32((*Mem)(unsafe.Pointer(pIn1)).Fflags)&MEM_Blob == 0) { goto __772 } if !(Xsqlite3VdbeMemSetRowSet(tls, pIn1) != 0) { goto __773 } goto no_mem __773: ; __772: ; if !(iSet != 0) { goto __774 } exists = Xsqlite3RowSetTest(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, iSet, *(*I64)(unsafe.Pointer(pIn3))) if !(exists != 0) { goto __775 } goto jump_to_p2 __775: ; __774: ; if !(iSet >= 0) { goto __776 } Xsqlite3RowSetInsert(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, *(*I64)(unsafe.Pointer(pIn3))) __776: ; goto __8 // Opcode: Program P1 P2 P3 P4 P5 // // Execute the trigger program passed as P4 (type P4_SUBPROGRAM). // // P1 contains the address of the memory cell that contains the first memory // cell in an array of values used as arguments to the sub-program. P2 // contains the address to jump to if the sub-program throws an IGNORE // exception using the RAISE() function. Register P3 contains the address // of a memory cell in this (the parent) VM that is used to allocate the // memory required by the sub-vdbe at runtime. // // P4 is a pointer to the VM containing the trigger program. // // If P5 is non-zero, then recursive program invocation is enabled. __148: // Token identifying trigger pProgram = *(*uintptr)(unsafe.Pointer(pOp + 16)) pRt = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 // If the p5 flag is clear, then recursive invocation of triggers is // disabled for backwards compatibility (p5 is set if this sub-program // is really a trigger, not a foreign key action, and the flag set // and cleared by the "PRAGMA recursive_triggers" command is clear). // // It is recursive invocation of triggers, at the SQL level, that is // disabled. In some cases a single trigger may generate more than one // SubProgram (if the trigger may be executed with more than one different // ON CONFLICT algorithm). SubProgram structures associated with a // single trigger all have the same value for the SubProgram.token // variable. if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) { goto __777 } t1 = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pFrame2 = (*Vdbe)(unsafe.Pointer(p)).FpFrame __778: if !(pFrame2 != 0 && (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken != t1) { goto __780 } goto __779 __779: pFrame2 = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent goto __778 goto __780 __780: ; if !(pFrame2 != 0) { goto __781 } goto __8 __781: ; __777: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFrame >= *(*int32)(unsafe.Pointer(db + 136 + 10*4))) { goto __782 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+7253, 0) goto abort_due_to_error __782: ; // Register pRt is used to store the memory required to save the state // of the current program, and the memory required at runtime to execute // the trigger program. If this trigger has been fired before, then pRt // is already allocated. Otherwise, it must be initialized. if !(int32((*Mem)(unsafe.Pointer(pRt)).Fflags)&MEM_Blob == 0) { goto __783 } // SubProgram.nMem is set to the number of memory cells used by the // program stored in SubProgram.aOp. As well as these, one memory // cell is required for each cursor used by the program. Set local // variable nMem (and later, VdbeFrame.nChildMem) to this value. nMem = (*SubProgram)(unsafe.Pointer(pProgram)).FnMem + (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr if !((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr == 0) { goto __785 } nMem++ __785: ; nByte2 = int32((uint64(unsafe.Sizeof(VdbeFrame{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + uint64(nMem)*uint64(unsafe.Sizeof(Mem{})) + uint64((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr)*uint64(unsafe.Sizeof(uintptr(0))) + uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) pFrame2 = Xsqlite3DbMallocZero(tls, db, uint64(nByte2)) if !!(pFrame2 != 0) { goto __786 } goto no_mem __786: ; Xsqlite3VdbeMemRelease(tls, pRt) (*Mem)(unsafe.Pointer(pRt)).Fflags = U16(MEM_Blob | MEM_Dyn) (*Mem)(unsafe.Pointer(pRt)).Fz = pFrame2 (*Mem)(unsafe.Pointer(pRt)).Fn = nByte2 (*Mem)(unsafe.Pointer(pRt)).FxDel = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3VdbeFrameMemDel})) (*VdbeFrame)(unsafe.Pointer(pFrame2)).Fv = p (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem = nMem (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildCsr = (*SubProgram)(unsafe.Pointer(pProgram)).FnCsr (*VdbeFrame)(unsafe.Pointer(pFrame2)).Fpc = int32((int64(pOp) - int64(aOp)) / 24) (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaMem = (*Vdbe)(unsafe.Pointer(p)).FaMem (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnMem = (*Vdbe)(unsafe.Pointer(p)).FnMem (*VdbeFrame)(unsafe.Pointer(pFrame2)).FapCsr = (*Vdbe)(unsafe.Pointer(p)).FapCsr (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnCursor = (*Vdbe)(unsafe.Pointer(p)).FnCursor (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOp = (*Vdbe)(unsafe.Pointer(p)).FaOp (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnOp = (*Vdbe)(unsafe.Pointer(p)).FnOp (*VdbeFrame)(unsafe.Pointer(pFrame2)).Ftoken = (*SubProgram)(unsafe.Pointer(pProgram)).Ftoken pEnd = pFrame2 + 120 + uintptr((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem)*56 pMem2 = pFrame2 + 120 __787: if !(pMem2 != pEnd) { goto __789 } (*Mem)(unsafe.Pointer(pMem2)).Fflags = U16(MEM_Undefined) (*Mem)(unsafe.Pointer(pMem2)).Fdb = db goto __788 __788: pMem2 += 56 goto __787 goto __789 __789: ; goto __784 __783: pFrame2 = (*Mem)(unsafe.Pointer(pRt)).Fz __784: ; (*Vdbe)(unsafe.Pointer(p)).FnFrame++ (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpParent = (*Vdbe)(unsafe.Pointer(p)).FpFrame (*VdbeFrame)(unsafe.Pointer(pFrame2)).FlastRowid = (*Sqlite3)(unsafe.Pointer(db)).FlastRowid (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChange = (*Vdbe)(unsafe.Pointer(p)).FnChange (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnDbChange = (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnChange (*VdbeFrame)(unsafe.Pointer(pFrame2)).FpAuxData = (*Vdbe)(unsafe.Pointer(p)).FpAuxData (*Vdbe)(unsafe.Pointer(p)).FpAuxData = uintptr(0) (*Vdbe)(unsafe.Pointer(p)).FnChange = int64(0) (*Vdbe)(unsafe.Pointer(p)).FpFrame = pFrame2 (*Vdbe)(unsafe.Pointer(p)).FaMem = libc.AssignUintptr(&aMem, pFrame2+120) (*Vdbe)(unsafe.Pointer(p)).FnMem = (*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildMem (*Vdbe)(unsafe.Pointer(p)).FnCursor = int32(U16((*VdbeFrame)(unsafe.Pointer(pFrame2)).FnChildCsr)) (*Vdbe)(unsafe.Pointer(p)).FapCsr = aMem + uintptr((*Vdbe)(unsafe.Pointer(p)).FnMem)*56 (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOnce = (*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*SubProgram)(unsafe.Pointer(pProgram)).FnCsr)*8 libc.Xmemset(tls, (*VdbeFrame)(unsafe.Pointer(pFrame2)).FaOnce, 0, uint64(((*SubProgram)(unsafe.Pointer(pProgram)).FnOp+7)/8)) (*Vdbe)(unsafe.Pointer(p)).FaOp = libc.AssignUintptr(&aOp, (*SubProgram)(unsafe.Pointer(pProgram)).FaOp) (*Vdbe)(unsafe.Pointer(p)).FnOp = (*SubProgram)(unsafe.Pointer(pProgram)).FnOp pOp = aOp + libc.UintptrFromInt32(-1)*24 goto check_for_interrupt // Opcode: Param P1 P2 * * * // // This opcode is only ever present in sub-programs called via the // OP_Program instruction. Copy a value currently stored in a memory // cell of the calling (parent) frame to cell P2 in the current frames // address space. This is used by trigger programs to access the new.* // and old.* values. // // The address of the cell in the parent frame is determined by adding // the value of the P1 argument to the value of the P1 argument to the // calling OP_Program instruction. __149: pOut = out2Prerelease(tls, p, pOp) pFrame3 = (*Vdbe)(unsafe.Pointer(p)).FpFrame pIn = (*VdbeFrame)(unsafe.Pointer(pFrame3)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1+(*Op)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame3)).FaOp+uintptr((*VdbeFrame)(unsafe.Pointer(pFrame3)).Fpc)*24)).Fp1)*56 Xsqlite3VdbeMemShallowCopy(tls, pOut, pIn, MEM_Ephem) goto __8 // Opcode: FkCounter P1 P2 * * * // Synopsis: fkctr[P1]+=P2 // // Increment a "constraint counter" by P2 (P2 may be negative or positive). // If P1 is non-zero, the database constraint counter is incremented // (deferred foreign key constraints). Otherwise, if P1 is zero, the // statement counter is incremented (immediate foreign key constraints). __150: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) { goto __790 } *(*I64)(unsafe.Pointer(db + 784)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) goto __791 __790: if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __792 } *(*I64)(unsafe.Pointer(db + 776)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) goto __793 __792: *(*I64)(unsafe.Pointer(p + 88)) += I64((*Op)(unsafe.Pointer(pOp)).Fp2) __793: ; __791: ; goto __8 // Opcode: FkIfZero P1 P2 * * * // Synopsis: if fkctr[P1]==0 goto P2 // // This opcode tests if a foreign key constraint-counter is currently zero. // If so, jump to instruction P2. Otherwise, fall through to the next // instruction. // // If P1 is non-zero, then the jump is taken if the database constraint-counter // is zero (the one that counts deferred constraint violations). If P1 is // zero, the jump is taken if the statement constraint-counter is zero // (immediate foreign key constraint violations). __151: // jump if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __794 } if !((*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { goto __796 } goto jump_to_p2 __796: ; goto __795 __794: ; if !((*Vdbe)(unsafe.Pointer(p)).FnFkConstraint == int64(0) && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons == int64(0)) { goto __797 } goto jump_to_p2 __797: ; __795: ; goto __8 // Opcode: MemMax P1 P2 * * * // Synopsis: r[P1]=max(r[P1],r[P2]) // // P1 is a register in the root frame of this VM (the root frame is // different from the current frame if this instruction is being executed // within a sub-program). Set the value of register P1 to the maximum of // its current value and the value in register P2. // // This instruction throws an error if the memory cell is not initially // an integer. __152: if !((*Vdbe)(unsafe.Pointer(p)).FpFrame != 0) { goto __798 } pFrame4 = (*Vdbe)(unsafe.Pointer(p)).FpFrame __800: if !((*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent != 0) { goto __802 } goto __801 __801: pFrame4 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FpParent goto __800 goto __802 __802: ; pIn1 = (*VdbeFrame)(unsafe.Pointer(pFrame4)).FaMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 goto __799 __798: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 __799: ; Xsqlite3VdbeMemIntegerify(tls, pIn1) pIn2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 Xsqlite3VdbeMemIntegerify(tls, pIn2) if !(*(*I64)(unsafe.Pointer(pIn1)) < *(*I64)(unsafe.Pointer(pIn2))) { goto __803 } *(*I64)(unsafe.Pointer(pIn1)) = *(*I64)(unsafe.Pointer(pIn2)) __803: ; goto __8 // Opcode: IfPos P1 P2 P3 * * // Synopsis: if r[P1]>0 then r[P1]-=P3, goto P2 // // Register P1 must contain an integer. // If the value of register P1 is 1 or greater, subtract P3 from the // value in P1 and jump to P2. // // If the initial value of register P1 is less than 1, then the // value is unchanged and control passes through to the next instruction. __153: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { goto __804 } *(*I64)(unsafe.Pointer(pIn1)) -= I64((*Op)(unsafe.Pointer(pOp)).Fp3) goto jump_to_p2 __804: ; goto __8 // Opcode: OffsetLimit P1 P2 P3 * * // Synopsis: if r[P1]>0 then r[P2]=r[P1]+max(0,r[P3]) else r[P2]=(-1) // // This opcode performs a commonly used computation associated with // LIMIT and OFFSET process. r[P1] holds the limit counter. r[P3] // holds the offset counter. The opcode computes the combined value // of the LIMIT and OFFSET and stores that value in r[P2]. The r[P2] // value computed is the total number of rows that will need to be // visited in order to complete the query. // // If r[P3] is zero or negative, that means there is no OFFSET // and r[P2] is set to be the value of the LIMIT, r[P1]. // // if r[P1] is zero or negative, that means there is no LIMIT // and r[P2] is set to -1. // // Otherwise, r[P2] is set to the sum of r[P1] and r[P3]. __154: pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) = *(*I64)(unsafe.Pointer(pIn1)) if !(*(*I64)(unsafe.Pointer(bp + 824)) <= int64(0) || Xsqlite3AddInt64(tls, bp+824, func() int64 { if *(*I64)(unsafe.Pointer(pIn3)) > int64(0) { return *(*I64)(unsafe.Pointer(pIn3)) } return int64(0) }()) != 0) { goto __805 } // If the LIMIT is less than or equal to zero, loop forever. This // is documented. But also, if the LIMIT+OFFSET exceeds 2^63 then // also loop forever. This is undocumented. In fact, one could argue // that the loop should terminate. But assuming 1 billion iterations // per second (far exceeding the capabilities of any current hardware) // it would take nearly 300 years to actually reach the limit. So // looping forever is a reasonable approximation. *(*I64)(unsafe.Pointer(pOut)) = int64(-1) goto __806 __805: *(*I64)(unsafe.Pointer(pOut)) = *(*I64)(unsafe.Pointer(bp + 824 /* x3 */)) __806: ; goto __8 // Opcode: IfNotZero P1 P2 * * * // Synopsis: if r[P1]!=0 then r[P1]--, goto P2 // // Register P1 must contain an integer. If the content of register P1 is // initially greater than zero, then decrement the value in register P1. // If it is non-zero (negative or positive) and then also jump to P2. // If register P1 is initially zero, leave it unchanged and fall through. __155: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) != 0) { goto __807 } if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(0)) { goto __808 } *(*I64)(unsafe.Pointer(pIn1))-- __808: ; goto jump_to_p2 __807: ; goto __8 // Opcode: DecrJumpZero P1 P2 * * * // Synopsis: if (--r[P1])==0 goto P2 // // Register P1 must hold an integer. Decrement the value in P1 // and jump to P2 if the new value is exactly zero. __156: // jump, in1 pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !(*(*I64)(unsafe.Pointer(pIn1)) > int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32)) { goto __809 } *(*I64)(unsafe.Pointer(pIn1))-- __809: ; if !(*(*I64)(unsafe.Pointer(pIn1)) == int64(0)) { goto __810 } goto jump_to_p2 __810: ; goto __8 // Opcode: AggStep * P2 P3 P4 P5 // Synopsis: accum=r[P3] step(r[P2@P5]) // // Execute the xStep function for an aggregate. // The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // Opcode: AggInverse * P2 P3 P4 P5 // Synopsis: accum=r[P3] inverse(r[P2@P5]) // // Execute the xInverse function for an aggregate. // The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // Opcode: AggStep1 P1 P2 P3 P4 P5 // Synopsis: accum=r[P3] step(r[P2@P5]) // // Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an // aggregate. The function has P5 arguments. P4 is a pointer to the // FuncDef structure that specifies the function. Register P3 is the // accumulator. // // The P5 arguments are taken from register P2 and its // successors. // // This opcode is initially coded as OP_AggStep0. On first evaluation, // the FuncDef stored in P4 is converted into an sqlite3_context and // the opcode is changed. In this way, the initialization of the // sqlite3_context only happens once, instead of on each call to the // step function. __157: __158: ; n4 = int32((*Op)(unsafe.Pointer(pOp)).Fp5) pCtx = Xsqlite3DbMallocRawNN(tls, db, uint64(n4)*uint64(unsafe.Sizeof(uintptr(0)))+(uint64(unsafe.Sizeof(Sqlite3_context{}))+uint64(unsafe.Sizeof(Mem{}))-uint64(unsafe.Sizeof(uintptr(0))))) if !(pCtx == uintptr(0)) { goto __811 } goto no_mem __811: ; (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpMem = uintptr(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut = pCtx + 48 + uintptr(n4)*8 Xsqlite3VdbeMemInit(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, db, uint16(MEM_Null)) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc = *(*uintptr)(unsafe.Pointer(pOp + 16)) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FiOp = int32((int64(pOp) - int64(aOp)) / 24) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx)).FskipFlag = U8(0) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = 0 (*Sqlite3_context)(unsafe.Pointer(pCtx)).Fargc = U8(n4) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(-16) *(*uintptr)(unsafe.Pointer(pOp + 16)) = pCtx // OP_AggInverse must have P1==1 and OP_AggStep must have P1==0 (*Op)(unsafe.Pointer(pOp)).Fopcode = U8(OP_AggStep1) __159: ; pCtx1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) pMem3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 // If this function is inside of a trigger, the register array in aMem[] // might change from one evaluation to the next. The next block of code // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem != pMem3) { goto __812 } (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpMem = pMem3 i5 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc) - 1 __813: if !(i5 >= 0) { goto __815 } *(*uintptr)(unsafe.Pointer(pCtx1 + 48 + uintptr(i5)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i5)*56 goto __814 __814: i5-- goto __813 goto __815 __815: ; __812: ; (*Mem)(unsafe.Pointer(pMem3)).Fn++ if !((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __816 } (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxInverse})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) goto __817 __816: (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpFunc)).FxSFunc})).f(tls, pCtx1, int32((*Sqlite3_context)(unsafe.Pointer(pCtx1)).Fargc), pCtx1+48 /* &.argv */) __817: ; // IMP: R-24505-23230 if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError != 0) { goto __818 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { goto __819 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError __819: ; if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag != 0) { goto __820 } i5 = (*Op)(unsafe.Pointer(pOp + libc.UintptrFromInt32(-1)*24)).Fp1 if !(i5 != 0) { goto __821 } Xsqlite3VdbeMemSetInt64(tls, aMem+uintptr(i5)*56, int64(1)) __821: ; (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FskipFlag = U8(0) __820: ; Xsqlite3VdbeMemRelease(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut) (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut)).Fflags = U16(MEM_Null) (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError = 0 if !(rc != 0) { goto __822 } goto abort_due_to_error __822: ; __818: ; goto __8 // Opcode: AggFinal P1 P2 * P4 * // Synopsis: accum=r[P1] N=P2 // // P1 is the memory location that is the accumulator for an aggregate // or window function. Execute the finalizer function // for an aggregate and store the result in P1. // // P2 is the number of arguments that the step function takes and // P4 is a pointer to the FuncDef for this function. The P2 // argument is not used by this opcode. It is only there to disambiguate // functions that can take varying numbers of arguments. The // P4 argument is only needed for the case where // the step function was not previously called. // Opcode: AggValue * P2 P3 P4 * // Synopsis: r[P3]=value N=P2 // // Invoke the xValue() function and store the result in register P3. // // P2 is the number of arguments that the step function takes and // P4 is a pointer to the FuncDef for this function. The P2 // argument is not used by this opcode. It is only there to disambiguate // functions that can take varying numbers of arguments. The // P4 argument is only needed for the case where // the step function was not previously called. __160: __161: ; pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __823 } rc = Xsqlite3VdbeMemAggValue(tls, pMem4, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56, *(*uintptr)(unsafe.Pointer(pOp + 16))) pMem4 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 goto __824 __823: rc = Xsqlite3VdbeMemFinalize(tls, pMem4, *(*uintptr)(unsafe.Pointer(pOp + 16))) __824: ; if !(rc != 0) { goto __825 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error __825: ; Xsqlite3VdbeChangeEncoding(tls, pMem4, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pMem4) != 0) { goto __826 } goto too_big __826: ; goto __8 // Opcode: Checkpoint P1 P2 P3 * * // // Checkpoint database P1. This is a no-op if P1 is not currently in // WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL, // RESTART, or TRUNCATE. Write 1 or 0 into mem[P3] if the checkpoint returns // SQLITE_BUSY or not, respectively. Write the number of pages in the // WAL after the checkpoint into mem[P3+1] and the number of pages // in the WAL that have been checkpointed after the checkpoint // completes into mem[P3+2]. However on an error, mem[P3+1] and // mem[P3+2] are initialized to -1. __162: // Write results here ; *(*int32)(unsafe.Pointer(bp + 832)) = 0 *(*int32)(unsafe.Pointer(bp + 832 + 1*4)) = libc.AssignPtrInt32(bp+832+2*4, -1) rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+832+1*4, bp+832+2*4) if !(rc != 0) { goto __827 } if !(rc != SQLITE_BUSY) { goto __828 } goto abort_due_to_error __828: ; rc = SQLITE_OK *(*int32)(unsafe.Pointer(bp + 832)) = 1 __827: ; i6 = 0 pMem5 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 __829: if !(i6 < 3) { goto __831 } Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 832 + uintptr(i6)*4)))) goto __830 __830: i6++ pMem5 += 56 goto __829 goto __831 __831: ; goto __8 // Opcode: JournalMode P1 P2 P3 * * // // Change the journal mode of database P1 to P3. P3 must be one of the // PAGER_JOURNALMODE_XXX values. If changing between the various rollback // modes (delete, truncate, persist, off and memory), this is a simple // operation. No IO is required. // // If changing into or out of WAL mode the procedure is more complicated. // // Write a string containing the final journal-mode to register P2. __163: // Name of database file for pPager pOut = out2Prerelease(tls, p, pOp) eNew = (*Op)(unsafe.Pointer(pOp)).Fp3 pBt1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt pPager = Xsqlite3BtreePager(tls, pBt1) eOld = Xsqlite3PagerGetJournalMode(tls, pPager) if !(eNew == -1) { goto __832 } eNew = eOld __832: ; if !!(Xsqlite3PagerOkToChangeJournalMode(tls, pPager) != 0) { goto __833 } eNew = eOld __833: ; zFilename = Xsqlite3PagerFilename(tls, pPager, 1) // Do not allow a transition to journal_mode=WAL for a database // in temporary storage or if the VFS does not support shared memory if !(eNew == PAGER_JOURNALMODE_WAL && (Xsqlite3Strlen30(tls, zFilename) == 0 || !(Xsqlite3PagerWalSupported(tls, pPager) != 0))) { goto __834 } eNew = eOld __834: ; if !(eNew != eOld && (eOld == PAGER_JOURNALMODE_WAL || eNew == PAGER_JOURNALMODE_WAL)) { goto __835 } if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || (*Sqlite3)(unsafe.Pointer(db)).FnVdbeRead > 1) { goto __836 } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+7290, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { return ts + 7342 /* "into" */ } return ts + 7347 /* "out of" */ }())) goto abort_due_to_error goto __837 __836: if !(eOld == PAGER_JOURNALMODE_WAL) { goto __838 } // If leaving WAL mode, close the log file. If successful, the call // to PagerCloseWal() checkpoints and deletes the write-ahead-log // file. An EXCLUSIVE lock may still be held on the database file // after a successful return. rc = Xsqlite3PagerCloseWal(tls, pPager, db) if !(rc == SQLITE_OK) { goto __840 } Xsqlite3PagerSetJournalMode(tls, pPager, eNew) __840: ; goto __839 __838: if !(eOld == PAGER_JOURNALMODE_MEMORY) { goto __841 } // Cannot transition directly from MEMORY to WAL. Use mode OFF // as an intermediate Xsqlite3PagerSetJournalMode(tls, pPager, PAGER_JOURNALMODE_OFF) __841: ; __839: ; // Open a transaction on the database file. Regardless of the journal // mode, this transaction always uses a rollback journal. if !(rc == SQLITE_OK) { goto __842 } rc = Xsqlite3BtreeSetVersion(tls, pBt1, func() int32 { if eNew == PAGER_JOURNALMODE_WAL { return 2 } return 1 }()) __842: ; __837: ; __835: ; if !(rc != 0) { goto __843 } eNew = eOld __843: ; eNew = Xsqlite3PagerSetJournalMode(tls, pPager, eNew) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Str | MEM_Static | MEM_Term) (*Mem)(unsafe.Pointer(pOut)).Fz = Xsqlite3JournalModename(tls, eNew) (*Mem)(unsafe.Pointer(pOut)).Fn = Xsqlite3Strlen30(tls, (*Mem)(unsafe.Pointer(pOut)).Fz) (*Mem)(unsafe.Pointer(pOut)).Fenc = U8(SQLITE_UTF8) Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(rc != 0) { goto __844 } goto abort_due_to_error __844: ; goto __8 // Opcode: Vacuum P1 P2 * * * // // Vacuum the entire database P1. P1 is 0 for "main", and 2 or more // for an attached database. The "temp" database may not be vacuumed. // // If P2 is not zero, then it is a register holding a string which is // the file into which the result of vacuum should be written. When // P2 is zero, the vacuum overwrites the original database. __164: ; rc = Xsqlite3RunVacuum(tls, p+176, db, (*Op)(unsafe.Pointer(pOp)).Fp1, func() uintptr { if (*Op)(unsafe.Pointer(pOp)).Fp2 != 0 { return aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56 } return uintptr(0) }()) if !(rc != 0) { goto __845 } goto abort_due_to_error __845: ; goto __8 // Opcode: IncrVacuum P1 P2 * * * // // Perform a single step of the incremental vacuum procedure on // the P1 database. If the vacuum has finished, jump to instruction // P2. Otherwise, fall through to the next instruction. __165: ; pBt2 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt rc = Xsqlite3BtreeIncrVacuum(tls, pBt2) if !(rc != 0) { goto __846 } if !(rc != SQLITE_DONE) { goto __847 } goto abort_due_to_error __847: ; rc = SQLITE_OK goto jump_to_p2 __846: ; goto __8 // Opcode: Expire P1 P2 * * * // // Cause precompiled statements to expire. When an expired statement // is executed using sqlite3_step() it will either automatically // reprepare itself (if it was originally created using sqlite3_prepare_v2()) // or it will fail with SQLITE_SCHEMA. // // If P1 is 0, then all SQL statements become expired. If P1 is non-zero, // then only the currently executing statement is expired. // // If P2 is 0, then SQL statements are expired immediately. If P2 is 1, // then running SQL statements are allowed to continue to run to completion. // The P2==1 case occurs when a CREATE INDEX or similar schema change happens // that might help the statement run faster but which does not affect the // correctness of operation. __166: ; if !!((*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __848 } Xsqlite3ExpirePreparedStatements(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp2) goto __849 __848: libc.SetBitFieldPtr16Uint32(p+208, Bft((*Op)(unsafe.Pointer(pOp)).Fp2+1), 0, 0x3) __849: ; goto __8 // Opcode: CursorLock P1 * * * * // // Lock the btree to which cursor P1 is pointing so that the btree cannot be // written by an other cursor. __167: ; pC28 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) Xsqlite3BtreeCursorPin(tls, *(*uintptr)(unsafe.Pointer(pC28 + 48))) goto __8 // Opcode: CursorUnlock P1 * * * * // // Unlock the btree to which cursor P1 is pointing so that it can be // written by other cursors. __168: ; pC29 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) Xsqlite3BtreeCursorUnpin(tls, *(*uintptr)(unsafe.Pointer(pC29 + 48))) goto __8 // Opcode: TableLock P1 P2 P3 P4 * // Synopsis: iDb=P1 root=P2 write=P3 // // Obtain a lock on a particular table. This instruction is only used when // the shared-cache feature is enabled. // // P1 is the index of the database in sqlite3.aDb[] of the database // on which the lock is acquired. A readlock is obtained if P3==0 or // a write lock if P3==1. // // P2 contains the root-page of the table to lock. // // P4 contains a pointer to the name of the table being locked. This is only // used to generate an error message if the lock cannot be obtained. __169: isWriteLock = U8((*Op)(unsafe.Pointer(pOp)).Fp3) if !(isWriteLock != 0 || uint64(0) == (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ReadUncommit)) { goto __850 } p13 = (*Op)(unsafe.Pointer(pOp)).Fp1 rc = Xsqlite3BtreeLockTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(p13)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp2, isWriteLock) if !(rc != 0) { goto __851 } if !(rc&0xFF == SQLITE_LOCKED) { goto __852 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) Xsqlite3VdbeError(tls, p, ts+7354, libc.VaList(bp+144, z1)) __852: ; goto abort_due_to_error __851: ; __850: ; goto __8 // Opcode: VBegin * * * P4 * // // P4 may be a pointer to an sqlite3_vtab structure. If so, call the // xBegin method for that table. // // Also, whether or not P4 is set, check that this is not being called from // within a callback to a virtual table xSync() method. If it is, the error // code will be set to SQLITE_LOCKED. __170: pVTab = *(*uintptr)(unsafe.Pointer(pOp + 16)) rc = Xsqlite3VtabBegin(tls, db, pVTab) if !(pVTab != 0) { goto __853 } Xsqlite3VtabImportErrmsg(tls, p, (*VTable)(unsafe.Pointer(pVTab)).FpVtab) __853: ; if !(rc != 0) { goto __854 } goto abort_due_to_error __854: ; goto __8 // Opcode: VCreate P1 P2 * * * // // P2 is a register that holds the name of a virtual table in database // P1. Call the xCreate method for that table. __171: // Name of the virtual table libc.Xmemset(tls, bp+848, 0, uint64(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 848 /* &sMem1 */)).Fdb = db // Because P2 is always a static string, it is impossible for the // sqlite3VdbeMemCopy() to fail rc = Xsqlite3VdbeMemCopy(tls, bp+848, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) zTab = Xsqlite3_value_text(tls, bp+848) if !(zTab != 0) { goto __855 } rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+176) __855: ; Xsqlite3VdbeMemRelease(tls, bp+848) if !(rc != 0) { goto __856 } goto abort_due_to_error __856: ; goto __8 // Opcode: VDestroy P1 * * P4 * // // P4 is the name of a virtual table in database P1. Call the xDestroy method // of that table. __172: (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy++ rc = Xsqlite3VtabCallDestroy(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Sqlite3)(unsafe.Pointer(db)).FnVDestroy-- if !(rc != 0) { goto __857 } goto abort_due_to_error __857: ; goto __8 // Opcode: VOpen P1 * * P4 * // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // P1 is a cursor number. This opcode opens a cursor to the virtual // table and stores that cursor in P1. __173: ; pCur2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab1 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0)) { goto __858 } rc = SQLITE_LOCKED goto abort_due_to_error __858: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxOpen})).f(tls, pVtab1, bp+904 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { goto __859 } goto abort_due_to_error __859: ; // Initialize sqlite3_vtab_cursor base class (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)))).FpVtab = pVtab1 // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { goto __860 } *(*uintptr)(unsafe.Pointer(pCur2 + 48)) = *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ goto __861 __860: ; (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule1)).FxClose})).f(tls, *(*uintptr)(unsafe.Pointer(bp + 904 /* pVCur */))) goto no_mem __861: ; goto __8 // Opcode: VInitIn P1 P2 P3 * * // Synopsis: r[P2]=ValueList(P1,P3) // // Set register P2 to be a pointer to a ValueList object for cursor P1 // with cache register P3 and output register P3+1. This ValueList object // can be used as the first argument to sqlite3_vtab_in_first() and // sqlite3_vtab_in_next() to extract all of the values stored in the P1 // cursor. Register P3 is used to hold the values returned by // sqlite3_vtab_in_first() and sqlite3_vtab_in_next(). __174: // New ValueList object to put in reg[P2] pC30 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pRhs = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(ValueList{}))) if !(pRhs == uintptr(0)) { goto __862 } goto no_mem __862: ; (*ValueList)(unsafe.Pointer(pRhs)).FpCsr = *(*uintptr)(unsafe.Pointer(pC30 + 48)) (*ValueList)(unsafe.Pointer(pRhs)).FpOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pOut = out2Prerelease(tls, p, pOp) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Null) Xsqlite3VdbeMemSetPointer(tls, pOut, pRhs, ts+6660, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) goto __8 // Opcode: VFilter P1 P2 P3 P4 * // Synopsis: iplan=r[P3] zplan='P4' // // P1 is a cursor opened using VOpen. P2 is an address to jump to if // the filtered result set is empty. // // P4 is either NULL or a string that was generated by the xBestIndex // method of the module. The interpretation of the P4 string is left // to the module implementation. // // This opcode invokes the xFilter method on the virtual table specified // by P1. The integer query plan parameter to xFilter is stored in register // P3. Register P3+1 stores the argc parameter to be passed to the // xFilter method. Registers P3+2..P3+1+argc are the argc // additional parameters which are passed to // xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter. // // A jump is made to P2 if the result set after filtering would be empty. __175: pQuery = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 pArgc = pQuery + 1*56 pCur3 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pVCur1 = *(*uintptr)(unsafe.Pointer(pCur3 + 48)) pVtab2 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVCur1)).FpVtab pModule2 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab2)).FpModule // Grab the index number and argc parameters nArg = int32(*(*I64)(unsafe.Pointer(pArgc))) iQuery = int32(*(*I64)(unsafe.Pointer(pQuery))) // Invoke the xFilter method apArg = (*Vdbe)(unsafe.Pointer(p)).FapArg i7 = 0 __863: if !(i7 < nArg) { goto __865 } *(*uintptr)(unsafe.Pointer(apArg + uintptr(i7)*8)) = pArgc + uintptr(i7+1)*56 goto __864 __864: i7++ goto __863 goto __865 __865: ; rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxFilter})).f(tls, pVCur1, iQuery, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)), nArg, apArg) Xsqlite3VtabImportErrmsg(tls, p, pVtab2) if !(rc != 0) { goto __866 } goto abort_due_to_error __866: ; res13 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule2)).FxEof})).f(tls, pVCur1) (*VdbeCursor)(unsafe.Pointer(pCur3)).FnullRow = U8(0) if !(res13 != 0) { goto __867 } goto jump_to_p2 __867: ; goto __8 // Opcode: VColumn P1 P2 P3 * P5 // Synopsis: r[P3]=vcolumn(P2) // // Store in register P3 the value of the P2-th column of // the current row of the virtual-table of cursor P1. // // If the VColumn opcode is being used to fetch the value of // an unchanging column during an UPDATE operation, then the P5 // value is OPFLAG_NOCHNG. This will cause the sqlite3_vtab_nochange() // function to return true inside the xColumn method of the virtual // table implementation. The P5 column might also contain other // bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are // unused by OP_VColumn. __176: pCur4 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pDest2 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*VdbeCursor)(unsafe.Pointer(pCur4)).FnullRow != 0) { goto __868 } Xsqlite3VdbeMemSetNull(tls, pDest2) goto __8 __868: ; pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 48)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule libc.Xmemset(tls, bp+912, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { goto __869 } Xsqlite3VdbeMemSetNull(tls, pDest2) (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(MEM_Null | MEM_Zero) *(*int32)(unsafe.Pointer(pDest2)) = 0 goto __870 __869: (*Mem)(unsafe.Pointer(pDest2)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pDest2)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) __870: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule3)).FxColumn})).f(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 48 /* &.uc */)), bp+912 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) if !((*Sqlite3_context)(unsafe.Pointer(bp+912)).FisError > 0) { goto __871 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 912 /* &sContext */)).FisError __871: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pDest2) != 0) { goto __872 } goto too_big __872: ; if !(rc != 0) { goto __873 } goto abort_due_to_error __873: ; goto __8 // Opcode: VNext P1 P2 * * * // // Advance virtual table P1 to the next row in its result set and // jump to instruction P2. Or, if the virtual table has reached // the end of its result set, then fall through to the next instruction. __177: pCur5 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) if !((*VdbeCursor)(unsafe.Pointer(pCur5)).FnullRow != 0) { goto __874 } goto __8 __874: ; pVtab4 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur5 + 48)))).FpVtab pModule4 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab4)).FpModule // Invoke the xNext() method of the module. There is no way for the // underlying implementation to return an error if one occurs during // xNext(). Instead, if an error occurs, true is returned (indicating that // data is available) and the error code returned when xColumn or // some other method is next invoked on the save virtual table cursor. rc = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxNext})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) Xsqlite3VtabImportErrmsg(tls, p, pVtab4) if !(rc != 0) { goto __875 } goto abort_due_to_error __875: ; res14 = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule4)).FxEof})).f(tls, *(*uintptr)(unsafe.Pointer(pCur5 + 48 /* &.uc */))) if !!(res14 != 0) { goto __876 } // If there is data, jump to P2 goto jump_to_p2_and_check_for_interrupt __876: ; goto check_for_interrupt // Opcode: VRename P1 * * P4 * // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // This opcode invokes the corresponding xRename method. The value // in register P1 is passed as the zName argument to the xRename method. __178: isLegacy = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LegacyAlter) pVtab5 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab pName = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 rc = Xsqlite3VdbeChangeEncoding(tls, pName, SQLITE_UTF8) if !(rc != 0) { goto __877 } goto abort_due_to_error __877: ; rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer(pVtab5)).FpModule)).FxRename})).f(tls, pVtab5, (*Mem)(unsafe.Pointer(pName)).Fz) if !(isLegacy == 0) { goto __878 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyAlter)) __878: ; Xsqlite3VtabImportErrmsg(tls, p, pVtab5) libc.SetBitFieldPtr16Uint32(p+208, Bft(0), 0, 0x3) if !(rc != 0) { goto __879 } goto abort_due_to_error __879: ; goto __8 // Opcode: VUpdate P1 P2 P3 P4 P5 // Synopsis: data=r[P3@P2] // // P4 is a pointer to a virtual table object, an sqlite3_vtab structure. // This opcode invokes the corresponding xUpdate method. P2 values // are contiguous memory cells starting at P3 to pass to the xUpdate // invocation. The value in register (P3+P2-1) corresponds to the // p2th element of the argv array passed to xUpdate. // // The xUpdate method will do a DELETE or an INSERT or both. // The argv[0] element (which corresponds to memory cell P3) // is the rowid of a row to delete. If argv[0] is NULL then no // deletion occurs. The argv[1] element is the rowid of the new // row. This can be NULL to have the virtual table select the new // rowid for itself. The subsequent elements in the array are // the values of columns in the new row. // // If P2==1 then no insert is performed. argv[0] is the rowid of // a row to delete. // // P1 is a boolean flag. If it is set to true and the xUpdate call // is successful, then the value returned by sqlite3_last_insert_rowid() // is set to the value of the rowid for the row just inserted. // // P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to // apply in the case of a constraint failure on an insert or update. __179: *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) = int64(0) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __880 } goto no_mem __880: ; pVtab6 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab if !(pVtab6 == uintptr(0) || (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule == uintptr(0)) { goto __881 } rc = SQLITE_LOCKED goto abort_due_to_error __881: ; pModule5 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab6)).FpModule nArg1 = (*Op)(unsafe.Pointer(pOp)).Fp2 if !((*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate != 0) { goto __882 } vtabOnConflict = (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict apArg1 = (*Vdbe)(unsafe.Pointer(p)).FapArg pX1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 i8 = 0 __883: if !(i8 < nArg1) { goto __885 } *(*uintptr)(unsafe.Pointer(apArg1 + uintptr(i8)*8)) = pX1 pX1 += 56 goto __884 __884: i8++ goto __883 goto __885 __885: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer(pModule5)).FxUpdate})).f(tls, pVtab6, nArg1, apArg1, bp+968 /* &rowid1 */) (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !(rc == SQLITE_OK && (*Op)(unsafe.Pointer(pOp)).Fp1 != 0) { goto __886 } (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 968 /* rowid1 */)) __886: ; if !(rc&0xff == SQLITE_CONSTRAINT && (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FbConstraint != 0) { goto __887 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Ignore) { goto __889 } rc = SQLITE_OK goto __890 __889: (*Vdbe)(unsafe.Pointer(p)).FerrorAction = func() uint8 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5) == OE_Replace { return uint8(OE_Abort) } return uint8((*Op)(unsafe.Pointer(pOp)).Fp5) }() __890: ; goto __888 __887: (*Vdbe)(unsafe.Pointer(p)).FnChange++ __888: ; if !(rc != 0) { goto __891 } goto abort_due_to_error __891: ; __882: ; goto __8 // Opcode: Pagecount P1 P2 * * * // // Write the current number of pages in database P1 to memory cell P2. __180: // out2 pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt)) goto __8 // Opcode: MaxPgcnt P1 P2 P3 * * // // Try to set the maximum page count for database P1 to the value in P3. // Do not let the maximum page count fall below the current page count and // do not change the maximum page count value if P3==0. // // Store the maximum page count after the change in register P2. __181: pOut = out2Prerelease(tls, p, pOp) pBt3 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpBt newMax = uint32(0) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __892 } newMax = Xsqlite3BtreeLastPage(tls, pBt3) if !(newMax < uint32((*Op)(unsafe.Pointer(pOp)).Fp3)) { goto __893 } newMax = uint32((*Op)(unsafe.Pointer(pOp)).Fp3) __893: ; __892: ; *(*I64)(unsafe.Pointer(pOut)) = I64(Xsqlite3BtreeMaxPageCount(tls, pBt3, newMax)) goto __8 // Opcode: Function P1 P2 P3 P4 * // Synopsis: r[P3]=func(r[P2@NP]) // // Invoke a user function (P4 is a pointer to an sqlite3_context object that // contains a pointer to the function to be run) with arguments taken // from register P2 and successors. The number of arguments is in // the sqlite3_context object that P4 points to. // The result of the function is stored // in register P3. Register P3 must not be one of the function inputs. // // P1 is a 32-bit bitmask indicating whether or not each argument to the // function was determined to be constant at compile time. If the first // argument was constant then bit 0 of P1 is set. This is used to determine // whether meta data associated with a user function argument using the // sqlite3_set_auxdata() API may be safely retained until the next // invocation of this opcode. // // See also: AggStep, AggFinal, PureFunc // Opcode: PureFunc P1 P2 P3 P4 * // Synopsis: r[P3]=func(r[P2@NP]) // // Invoke a user function (P4 is a pointer to an sqlite3_context object that // contains a pointer to the function to be run) with arguments taken // from register P2 and successors. The number of arguments is in // the sqlite3_context object that P4 points to. // The result of the function is stored // in register P3. Register P3 must not be one of the function inputs. // // P1 is a 32-bit bitmask indicating whether or not each argument to the // function was determined to be constant at compile time. If the first // argument was constant then bit 0 of P1 is set. This is used to determine // whether meta data associated with a user function argument using the // sqlite3_set_auxdata() API may be safely retained until the next // invocation of this opcode. // // This opcode works exactly like OP_Function. The only difference is in // its name. This opcode is used in places where the function must be // purely non-deterministic. Some built-in date/time functions can be // either determinitic of non-deterministic, depending on their arguments. // When those function are used in a non-deterministic way, they will check // to see if they were called using OP_PureFunc instead of OP_Function, and // if they were, they throw an error. // // See also: AggStep, AggFinal, Function __182: // group __183: ; pCtx2 = *(*uintptr)(unsafe.Pointer(pOp + 16)) // If this function is inside of a trigger, the register array in aMem[] // might change from one evaluation to the next. The next block of code // checks to see if the register array has changed, and if so it // reinitializes the relavant parts of the sqlite3_context object pOut = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut != pOut) { goto __894 } (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpVdbe = p (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpOut = pOut i9 = int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc) - 1 __895: if !(i9 >= 0) { goto __897 } *(*uintptr)(unsafe.Pointer(pCtx2 + 48 + uintptr(i9)*8)) = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2+i9)*56 goto __896 __896: i9-- goto __895 goto __897 __897: ; __894: ; (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Null) (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FpFunc)).FxSFunc})).f(tls, pCtx2, int32((*Sqlite3_context)(unsafe.Pointer(pCtx2)).Fargc), pCtx2+48 /* &.argv */) // IMP: R-24505-23230 // If the function returned an error, throw an exception if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError != 0) { goto __898 } if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { goto __899 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError __899: ; Xsqlite3VdbeDeleteAuxData(tls, db, p+304, (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FiOp, (*Op)(unsafe.Pointer(pOp)).Fp1) (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError = 0 if !(rc != 0) { goto __900 } goto abort_due_to_error __900: ; __898: ; // Copy the result of the function into register P3 if !(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&(MEM_Str|MEM_Blob) != 0) { goto __901 } Xsqlite3VdbeChangeEncoding(tls, pOut, int32(encoding)) if !(Xsqlite3VdbeMemTooBig(tls, pOut) != 0) { goto __902 } goto too_big __902: ; __901: ; goto __8 // Opcode: FilterAdd P1 * P3 P4 * // Synopsis: filter(P1) += key(P3@P4) // // Compute a hash on the P4 registers starting with r[P3] and // add that hash to the bloom filter contained in r[P1]. __184: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 h = filterHash(tls, aMem, pOp) h = h % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h/uint64(8)))) |= int8(int32(1) << (h & uint64(7))) goto __8 // Opcode: Filter P1 P2 P3 P4 * // Synopsis: if key(P3@P4) not in filter(P1) goto P2 // // Compute a hash on the key contained in the P4 registers starting // with r[P3]. Check to see if that hash is found in the // bloom filter hosted by register P1. If it is not present then // maybe jump to P2. Otherwise fall through. // // False negatives are harmless. It is always safe to fall through, // even if the value is in the bloom filter. A false negative causes // more CPU cycles to be used, but it should still yield the correct // answer. However, an incorrect answer may well arise from a // false positive - if the jump is taken when it should fall through. __185: ; pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56 h1 = filterHash(tls, aMem, pOp) h1 = h1 % U64((*Mem)(unsafe.Pointer(pIn1)).Fn) if !(int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pIn1)).Fz + uintptr(h1/uint64(8)))))&(int32(1)<<(h1&uint64(7))) == 0) { goto __903 } *(*U32)(unsafe.Pointer(p + 220 + 8*4))++ goto jump_to_p2 goto __904 __903: *(*U32)(unsafe.Pointer(p + 220 + 7*4))++ __904: ; goto __8 // Opcode: Trace P1 P2 * P4 * // // Write P4 on the statement trace output if statement tracing is // enabled. // // Operand P1 must be 0x7fffffff and P2 must positive. // Opcode: Init P1 P2 P3 P4 * // Synopsis: Start at P2 // // Programs contain a single instance of this opcode as the very first // opcode. // // If tracing is enabled (by the sqlite3_trace()) interface, then // the UTF-8 string contained in P4 is emitted on the trace callback. // Or if P4 is blank, use the string returned by sqlite3_sql(). // // If P2 is not zero, jump to instruction P2. // // Increment the value of P1 so that OP_Once opcodes will jump the // first time they are evaluated for this run. // // If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT // error is encountered. __186: __187: // If the P4 argument is not NULL, then it must be an SQL comment string. // The "--" string is broken up to prevent false-positives with srcck1.c. // // This assert() provides evidence for: // EVIDENCE-OF: R-50676-09860 The callback can compute the same text that // would have been returned by the legacy sqlite3_trace() interface by // using the X argument when X begins with "--" and invoking // sqlite3_expanded_sql(P) otherwise. ; // OP_Init is always instruction 0 if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&(SQLITE_TRACE_STMT|SQLITE_TRACE_LEGACY) != 0 && !(int32((*Vdbe)(unsafe.Pointer(p)).FdoingRerun) != 0) && libc.AssignUintptr(&zTrace, func() uintptr { if *(*uintptr)(unsafe.Pointer(pOp + 16)) != 0 { return *(*uintptr)(unsafe.Pointer(pOp + 16)) } return (*Vdbe)(unsafe.Pointer(p)).FzSql }()) != uintptr(0)) { goto __905 } if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_LEGACY != 0) { goto __906 } z2 = Xsqlite3VdbeExpandSql(tls, p, zTrace) (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, z2) Xsqlite3_free(tls, z2) goto __907 __906: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { goto __908 } z3 = Xsqlite3MPrintf(tls, db, ts+7383, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) goto __909 __908: (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 248 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, zTrace) __909: ; __907: ; __905: ; if !((*Op)(unsafe.Pointer(pOp)).Fp1 >= Xsqlite3Config.FiOnceResetThreshold) { goto __910 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_Trace) { goto __911 } goto __8 __911: ; i10 = 1 __912: if !(i10 < (*Vdbe)(unsafe.Pointer(p)).FnOp) { goto __914 } if !(int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr(i10)*24)).Fopcode) == OP_Once) { goto __915 } (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(i10)*24)).Fp1 = 0 __915: ; goto __913 __913: i10++ goto __912 goto __914 __914: ; (*Op)(unsafe.Pointer(pOp)).Fp1 = 0 __910: ; (*Op)(unsafe.Pointer(pOp)).Fp1++ *(*U32)(unsafe.Pointer(p + 220 + 6*4))++ goto jump_to_p2 // Opcode: Noop * * * * * // // Do nothing. This instruction is often useful as a jump // destination. // The magic Explain opcode are only inserted when explain==2 (which // is to say when the EXPLAIN QUERY PLAN syntax is used.) // This opcode records information from the optimizer. It is the // the same as a no-op. This opcodesnever appears in a real VM program. __188: // This is really OP_Noop, OP_Explain ; goto __8 // **************************************************************************** // // The cases of the switch statement above this line should all be indented // by 6 spaces. But the left-most 6 spaces have been removed to improve the // readability. From this point on down, the normal indentation rules are // restored. // __8: ; // The following code adds nothing to the actual functionality // of the program. It is only here for testing and debugging. // On the other hand, it does burn CPU cycles every time through // the evaluator loop. So we can leave it out when NDEBUG is defined. goto __6 __6: pOp += 24 goto __5 goto __7 __7: ; // The end of the for(;;) loop the loops through opcodes // If we reach this point, it means that execution is finished with // an error of some kind. abort_due_to_error: if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __916 } rc = SQLITE_NOMEM goto __917 __916: if !(rc == SQLITE_IOERR|int32(33)<<8) { goto __918 } rc = Xsqlite3CorruptError(tls, 95929) __918: ; __917: ; if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { goto __919 } Xsqlite3VdbeError(tls, p, ts+4444, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) __919: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) Xsqlite3_log(tls, rc, ts+7389, libc.VaList(bp+184, int32((int64(pOp)-int64(aOp))/24), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { goto __920 } Xsqlite3OomFault(tls, db) __920: ; if !(rc == SQLITE_CORRUPT && int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { goto __921 } *(*U64)(unsafe.Pointer(db + 48)) |= U64(uint64(0x00002)) << 32 __921: ; rc = SQLITE_ERROR if !(int32(resetSchemaOnFault) > 0) { goto __922 } Xsqlite3ResetOneSchema(tls, db, int32(resetSchemaOnFault)-1) __922: ; // This is the only way out of this procedure. We have to // release the mutexes on btrees that were acquired at the // top. vdbe_return: __923: if !(nVmStep >= nProgressLimit && (*Sqlite3)(unsafe.Pointer(db)).FxProgress != uintptr(0)) { goto __924 } nProgressLimit = nProgressLimit + U64((*Sqlite3)(unsafe.Pointer(db)).FnProgressOps) if !((*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxProgress})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpProgressArg) != 0) { goto __925 } nProgressLimit = uint64(0xffffffff) | U64(uint64(0xffffffff))<<32 rc = SQLITE_INTERRUPT goto abort_due_to_error __925: ; goto __923 __924: ; *(*U32)(unsafe.Pointer(p + 220 + 4*4)) += U32(int32(nVmStep)) Xsqlite3VdbeLeave(tls, p) return rc // Jump to here if a string or blob larger than SQLITE_MAX_LENGTH // is encountered. too_big: Xsqlite3VdbeError(tls, p, ts+6637, 0) rc = SQLITE_TOOBIG goto abort_due_to_error // Jump to here if a malloc() fails. no_mem: Xsqlite3OomFault(tls, db) Xsqlite3VdbeError(tls, p, ts+1460, 0) rc = SQLITE_NOMEM goto abort_due_to_error // Jump to here if the sqlite3_interrupt() API sets the interrupt // flag. abort_due_to_interrupt: ; rc = SQLITE_INTERRUPT goto abort_due_to_error return int32(0) } var azType = [4]uintptr{ts + 7421, ts + 7430, ts + 7437, ts + 7443} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:88560:25 */ var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:89784:32 */ var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:89787:32 */ var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:90280:24 */ var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* testdata/sqlite-amalgamation-3380500/sqlite3.c:91535:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** // 2007 May 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. // // // // This file contains code used to implement incremental BLOB I/O. // #include "sqliteInt.h" // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. type Incrblob1 = struct { FnByte int32 FiOffset int32 FiCol U16 F__ccgo_pad1 [6]byte FpCsr uintptr FpStmt uintptr Fdb uintptr FzDb uintptr FpTab uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96034:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** // 2007 May 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. // // // // This file contains code used to implement incremental BLOB I/O. // #include "sqliteInt.h" // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. type Incrblob = Incrblob1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96034:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. // If successful, SQLITE_OK is returned and subsequent calls to // sqlite3_blob_read() or sqlite3_blob_write() access the specified row. // // If an error occurs, or if the specified row does not exist or does not // contain a value of type TEXT or BLOB in the column nominated when the // blob handle was opened, then an error code is returned and *pzErr may // be set to point to a buffer containing an error message. It is the // responsibility of the caller to free the error message buffer using // sqlite3DbFree(). // // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96064:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // Error code var zErr uintptr = uintptr(0) // Error message var v uintptr = (*Incrblob)(unsafe.Pointer(p)).FpStmt // Set the value of register r[1] in the SQL statement to integer iRow. // This is done directly as a performance optimization (*Mem)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + 1*56)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FaMem + 1*56)) = iRow // If the statement has been run before (and is paused at the OP_ResultRow) // then back it up to the point where it does the OP_NotExists. This could // have been down with an extra OP_Goto, but simply setting the program // counter is faster. if (*Vdbe)(unsafe.Pointer(v)).Fpc > 4 { (*Vdbe)(unsafe.Pointer(v)).Fpc = 4 rc = Xsqlite3VdbeExec(tls, v) } else { rc = Xsqlite3_step(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) } if rc == SQLITE_ROW { var pC uintptr = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)) var type1 U32 if int32((*VdbeCursor)(unsafe.Pointer(pC)).FnHdrParsed) > int32((*Incrblob)(unsafe.Pointer(p)).FiCol) { type1 = *(*U32)(unsafe.Pointer(pC + 112 + uintptr((*Incrblob)(unsafe.Pointer(p)).FiCol)*4)) } else { type1 = uint32(0) } if type1 < U32(12) { zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7455, libc.VaList(bp, func() uintptr { if type1 == U32(0) { return ts + 7484 /* "null" */ } return func() uintptr { if type1 == U32(7) { return ts + 7489 /* "real" */ } return ts + 7494 /* "integer" */ }() }())) rc = SQLITE_ERROR Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) } else { (*Incrblob)(unsafe.Pointer(p)).FiOffset = int32(*(*U32)(unsafe.Pointer(pC + 112 + uintptr(int32((*Incrblob)(unsafe.Pointer(p)).FiCol)+int32((*VdbeCursor)(unsafe.Pointer(pC)).FnField))*4))) (*Incrblob)(unsafe.Pointer(p)).FnByte = int32(Xsqlite3VdbeSerialTypeLen(tls, type1)) (*Incrblob)(unsafe.Pointer(p)).FpCsr = *(*uintptr)(unsafe.Pointer(pC + 48)) Xsqlite3BtreeIncrblobCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) } } if rc == SQLITE_ROW { rc = SQLITE_OK } else if (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) if rc == SQLITE_OK { zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+7502, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+4444, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } *(*uintptr)(unsafe.Pointer(pzErr)) = zErr return rc } // Open a blob handle. func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96132:16: */ bp := tls.Alloc(464) defer tls.Free(464) var nAttempt int32 var iCol int32 // Index of zColumn in row-record var rc int32 // var zErr uintptr at bp+456, 8 var pTab uintptr var pBlob uintptr // var sParse Parse at bp+48, 408 var j int32 // Check that the column is not part of an FK child key definition. It // is not necessary to check if it is part of a parent key, as parent // key columns must be indexed. The check below will pick up this // case. var pFKey uintptr var j1 int32 var zFault uintptr var pIdx uintptr var v uintptr var iDb int32 var aOp uintptr nAttempt = 0 rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) wrFlag = libc.BoolInt32(!!(wrFlag != 0)) // wrFlag = (wrFlag ? 1 : 0); Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pBlob = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Incrblob{}))) __1: if !(1 != 0) { goto __2 } Xsqlite3ParseObjectInit(tls, bp+48, db) if !!(pBlob != 0) { goto __3 } goto blob_open_out __3: ; Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __4 } pTab = uintptr(0) Xsqlite3ErrorMsg(tls, bp+48, ts+7522, libc.VaList(bp, zTable)) __4: ; if !(pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __5 } pTab = uintptr(0) Xsqlite3ErrorMsg(tls, bp+48, ts+7552, libc.VaList(bp+8, zTable)) __5: ; if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __6 } pTab = uintptr(0) Xsqlite3ErrorMsg(tls, bp+48, ts+7588, libc.VaList(bp+16, zTable)) __6: ; if !!(pTab != 0) { goto __7 } if !((*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0) { goto __8 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg = uintptr(0) __8: ; rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out __7: ; (*Incrblob)(unsafe.Pointer(pBlob)).FpTab = pTab (*Incrblob)(unsafe.Pointer(pBlob)).FzDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema))*32)).FzDbSName // Now search pTab for the exact column. iCol = 0 __9: if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __11 } if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName, zColumn) == 0) { goto __12 } goto __11 __12: ; goto __10 __10: iCol++ goto __9 goto __11 __11: ; if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __13 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+7609, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out __13: ; // If the value is being opened for writing, check that the // column is not indexed, and that it is not part of a foreign key. if !(wrFlag != 0) { goto __14 } zFault = uintptr(0) if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) { goto __15 } pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)) __16: if !(pFKey != 0) { goto __18 } j = 0 __19: if !(j < (*FKey)(unsafe.Pointer(pFKey)).FnCol) { goto __21 } if !((*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FiFrom == iCol) { goto __22 } zFault = ts + 7630 /* "foreign key" */ __22: ; goto __20 __20: j++ goto __19 goto __21 __21: ; goto __17 __17: pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom goto __16 goto __18 __18: ; __15: ; pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __23: if !(pIdx != 0) { goto __25 } j1 = 0 __26: if !(j1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { goto __28 } // FIXME: Be smarter about indexes that use expressions if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -2) { goto __29 } zFault = ts + 7642 /* "indexed" */ __29: ; goto __27 __27: j1++ goto __26 goto __28 __28: ; goto __24 __24: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __23 goto __25 __25: ; if !(zFault != 0) { goto __30 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+7650, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out __30: ; __14: ; (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+48) if !((*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { goto __31 } v = (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3VdbeAddOp4Int(tls, v, OP_Transaction, iDb, wrFlag, (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema)).Fschema_cookie, (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema)).FiGeneration) Xsqlite3VdbeChangeP5(tls, v, uint16(1)) aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(openBlob))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&openBlob)), iLn) // Make sure a mutex is held on the table to be accessed Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { goto __32 } // Configure the OP_TableLock instruction (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).Ftnum) (*VdbeOp)(unsafe.Pointer(aOp)).Fp3 = wrFlag Xsqlite3VdbeChangeP4(tls, v, 2, (*Table)(unsafe.Pointer(pTab)).FzName, P4_TRANSIENT) __32: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { goto __33 } // Remove either the OP_OpenWrite or OpenRead. Set the P2 // parameter of the other to pTab->tnum. if !(wrFlag != 0) { goto __34 } (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fopcode = U8(OP_OpenWrite) __34: ; (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).Ftnum) (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp3 = iDb // Configure the number of columns. Configure the cursor to // think that the table has one more column than it really // does. An OP_Column to retrieve this imaginary column will // always return an SQL NULL. This is useful because it means // we can invoke OP_Column to fill in the vdbe cursors type // and offset cache without causing any IO. (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp4type = int8(-3) *(*int32)(unsafe.Pointer(aOp + 1*24 + 16)) = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1 (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).FnCol) (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnVar = int16(0) (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnMem = 1 (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnTab = 1 Xsqlite3VdbeMakeReady(tls, v, bp+48) __33: ; __31: ; (*Incrblob)(unsafe.Pointer(pBlob)).FiCol = U16(iCol) (*Incrblob)(unsafe.Pointer(pBlob)).Fdb = db Xsqlite3BtreeLeaveAll(tls, db) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __35 } goto blob_open_out __35: ; rc = blobSeekToRow(tls, pBlob, iRow, bp+456) if !(libc.PreIncInt32(&nAttempt, 1) >= SQLITE_MAX_SCHEMA_RETRY || rc != SQLITE_SCHEMA) { goto __36 } goto __2 __36: ; Xsqlite3ParseObjectReset(tls, bp+48) goto __1 __2: ; blob_open_out: if !(rc == SQLITE_OK && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { goto __37 } *(*uintptr)(unsafe.Pointer(ppBlob)) = pBlob goto __38 __37: if !(pBlob != 0 && (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { goto __39 } Xsqlite3VdbeFinalize(tls, (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt) __39: ; Xsqlite3DbFree(tls, db, pBlob) __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 456)) != 0 { return ts + 4444 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) Xsqlite3ParseObjectReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } var iLn int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96275:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor // blobSeekToRow() will initialize r[1] to the desired rowid {Fopcode: U8(OP_NotExists), Fp2: int8(5), Fp3: int8(1)}, // 2: Seek the cursor to rowid=r[1] {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96276:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96367:16: */ var p uintptr = pBlob var rc int32 var db uintptr if p != 0 { var pStmt uintptr = (*Incrblob)(unsafe.Pointer(p)).FpStmt db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3DbFree(tls, db, p) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = Xsqlite3_finalize(tls, pStmt) } else { rc = SQLITE_OK } return rc } // Perform a read or write operation on a blob func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96388:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { return Xsqlite3MisuseError(tls, 96400) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) v = (*Incrblob)(unsafe.Pointer(p)).FpStmt if n < 0 || iOffset < 0 || Sqlite3_int64(iOffset)+Sqlite3_int64(n) > Sqlite3_int64((*Incrblob)(unsafe.Pointer(p)).FnByte) { // Request is out of range. Return a transient error. rc = SQLITE_ERROR } else if v == uintptr(0) { // If there is no statement handle, then the blob-handle has // already been invalidated. Return SQLITE_ABORT in this case. rc = SQLITE_ABORT } else { // Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is // returned, clean-up the statement handle. Xsqlite3BtreeEnterCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) if xCall == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData})) && (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { // If a pre-update hook is registered and this is a write cursor, // invoke it here. // // TODO: The preupdate-hook is passed SQLITE_DELETE, even though this // operation should really be an SQLITE_UPDATE. This is probably // incorrect, but is convenient because at this point the new.* values // are not easily obtainable. And for the sessions module, an // SQLITE_UPDATE where the PK columns do not change is handled in the // same way as an SQLITE_DELETE (the SQLITE_DELETE code is actually // slightly more efficient). Since you cannot write to a PK column // using the incremental-blob API, this works. For the sessions module // anyhow. var iKey Sqlite3_int64 iKey = Xsqlite3BtreeIntegerKey(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) Xsqlite3VdbePreUpdateHook(tls, v, *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(v)).FapCsr)), SQLITE_DELETE, (*Incrblob)(unsafe.Pointer(p)).FzDb, (*Incrblob)(unsafe.Pointer(p)).FpTab, iKey, -1, int32((*Incrblob)(unsafe.Pointer(p)).FiCol)) } rc = (*struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xCall})).f(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr, uint32(iOffset+(*Incrblob)(unsafe.Pointer(p)).FiOffset), uint32(n), z) Xsqlite3BtreeLeaveCursor(tls, (*Incrblob)(unsafe.Pointer(p)).FpCsr) if rc == SQLITE_ABORT { Xsqlite3VdbeFinalize(tls, v) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) } else { (*Vdbe)(unsafe.Pointer(v)).Frc = rc } } Xsqlite3Error(tls, db, rc) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // Read data from a blob handle. func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96463:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96470:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) } // Query a blob handle for the size of the data. // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96480:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte } return 0 } // Move an existing blob handle to point to a different row of the same // database table. // // If an error occurs, or if the specified row does not exist or does not // contain a blob or text value, then an error code is returned and the // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96495:16: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 var p uintptr = pBlob var db uintptr if p == uintptr(0) { return Xsqlite3MisuseError(tls, 96500) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Incrblob)(unsafe.Pointer(p)).FpStmt == uintptr(0) { // If there is no statement handle, then the blob-handle has // already been invalidated. Return SQLITE_ABORT in this case. rc = SQLITE_ABORT } else { // var zErr uintptr at bp+8, 8 (*Vdbe)(unsafe.Pointer((*Incrblob)(unsafe.Pointer(p)).FpStmt)).Frc = SQLITE_OK rc = blobSeekToRow(tls, p, iRow, bp+8) if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { return ts + 4444 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) } } rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** // 2011-07-09 // // 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 code for the VdbeSorter object, used in concert with // a VdbeCursor to sort large numbers of keys for CREATE INDEX statements // or by SELECT statements with ORDER BY clauses that cannot be satisfied // using indexes and without LIMIT clauses. // // The VdbeSorter object implements a multi-threaded external merge sort // algorithm that is efficient even if the number of elements being sorted // exceeds the available memory. // // Here is the (internal, non-API) interface between this module and the // rest of the SQLite system: // // sqlite3VdbeSorterInit() Create a new VdbeSorter object. // // sqlite3VdbeSorterWrite() Add a single new row to the VdbeSorter // object. The row is a binary blob in the // OP_MakeRecord format that contains both // the ORDER BY key columns and result columns // in the case of a SELECT w/ ORDER BY, or // the complete record for an index entry // in the case of a CREATE INDEX. // // sqlite3VdbeSorterRewind() Sort all content previously added. // Position the read cursor on the // first sorted element. // // sqlite3VdbeSorterNext() Advance the read cursor to the next sorted // element. // // sqlite3VdbeSorterRowkey() Return the complete binary blob for the // row currently under the read cursor. // // sqlite3VdbeSorterCompare() Compare the binary blob for the row // currently under the read cursor against // another binary blob X and report if // X is strictly less than the read cursor. // Used to enforce uniqueness in a // CREATE UNIQUE INDEX statement. // // sqlite3VdbeSorterClose() Close the VdbeSorter object and reclaim // all resources. // // sqlite3VdbeSorterReset() Refurbish the VdbeSorter for reuse. This // is like Close() followed by Init() only // much faster. // // The interfaces above must be called in a particular order. Write() can // only occur in between Init()/Reset() and Rewind(). Next(), Rowkey(), and // Compare() can only occur in between Rewind() and Close()/Reset(). i.e. // // Init() // for each record: Write() // Rewind() // Rowkey()/Compare() // Next() // Close() // // Algorithm: // // Records passed to the sorter via calls to Write() are initially held // unsorted in main memory. Assuming the amount of memory used never exceeds // a threshold, when Rewind() is called the set of records is sorted using // an in-memory merge sort. In this case, no temporary files are required // and subsequent calls to Rowkey(), Next() and Compare() read records // directly from main memory. // // If the amount of space used to store records in main memory exceeds the // threshold, then the set of records currently in memory are sorted and // written to a temporary file in "Packed Memory Array" (PMA) format. // A PMA created at this point is known as a "level-0 PMA". Higher levels // of PMAs may be created by merging existing PMAs together - for example // merging two or more level-0 PMAs together creates a level-1 PMA. // // The threshold for the amount of main memory to use before flushing // records to a PMA is roughly the same as the limit configured for the // page-cache of the main database. Specifically, the threshold is set to // the value returned by "PRAGMA main.page_size" multipled by // that returned by "PRAGMA main.cache_size", in bytes. // // If the sorter is running in single-threaded mode, then all PMAs generated // are appended to a single temporary file. Or, if the sorter is running in // multi-threaded mode then up to (N+1) temporary files may be opened, where // N is the configured number of worker threads. In this case, instead of // sorting the records and writing the PMA to a temporary file itself, the // calling thread usually launches a worker thread to do so. Except, if // there are already N worker threads running, the main thread does the work // itself. // // The sorter is running in multi-threaded mode if (a) the library was built // with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater // than zero, and (b) worker threads have been enabled at runtime by calling // "PRAGMA threads=N" with some value of N greater than 0. // // When Rewind() is called, any data remaining in memory is flushed to a // final PMA. So at this point the data is stored in some number of sorted // PMAs within temporary files on disk. // // If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the // sorter is running in single-threaded mode, then these PMAs are merged // incrementally as keys are retreived from the sorter by the VDBE. The // MergeEngine object, described in further detail below, performs this // merge. // // Or, if running in multi-threaded mode, then a background thread is // launched to merge the existing PMAs. Once the background thread has // merged T bytes of data into a single sorted PMA, the main thread // begins reading keys from that PMA while the background thread proceeds // with merging the next T bytes of data. And so on. // // Parameter T is set to half the value of the memory threshold used // by Write() above to determine when to create a new PMA. // // If there are more than SORTER_MAX_MERGE_COUNT PMAs in total when // Rewind() is called, then a hierarchy of incremental-merges is used. // First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on // disk are merged together. Then T bytes of data from the second set, and // so on, such that no operation ever merges more than SORTER_MAX_MERGE_COUNT // PMAs at a time. This done is to improve locality. // // If running in multi-threaded mode and there are more than // SORTER_MAX_MERGE_COUNT PMAs on disk when Rewind() is called, then more // than one background thread may be created. Specifically, there may be // one background thread for each temporary file on disk, and one background // thread to merge the output of each of the others to a single PMA for // the main thread to read from. // #include "sqliteInt.h" // #include "vdbeInt.h" // If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various // messages to stderr that may be helpful in understanding the performance // characteristics of the sorter in multi-threaded mode. // Hard-coded maximum amount of data to accumulate in memory before flushing // to a level 0 PMA. The purpose of this limit is to prevent various integer // overflows. 512MiB. // Private objects used by the sorter type MergeEngine1 = struct { FnTree int32 F__ccgo_pad1 [4]byte FpTask uintptr FaTree uintptr FaReadr uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** // 2011-07-09 // // 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 code for the VdbeSorter object, used in concert with // a VdbeCursor to sort large numbers of keys for CREATE INDEX statements // or by SELECT statements with ORDER BY clauses that cannot be satisfied // using indexes and without LIMIT clauses. // // The VdbeSorter object implements a multi-threaded external merge sort // algorithm that is efficient even if the number of elements being sorted // exceeds the available memory. // // Here is the (internal, non-API) interface between this module and the // rest of the SQLite system: // // sqlite3VdbeSorterInit() Create a new VdbeSorter object. // // sqlite3VdbeSorterWrite() Add a single new row to the VdbeSorter // object. The row is a binary blob in the // OP_MakeRecord format that contains both // the ORDER BY key columns and result columns // in the case of a SELECT w/ ORDER BY, or // the complete record for an index entry // in the case of a CREATE INDEX. // // sqlite3VdbeSorterRewind() Sort all content previously added. // Position the read cursor on the // first sorted element. // // sqlite3VdbeSorterNext() Advance the read cursor to the next sorted // element. // // sqlite3VdbeSorterRowkey() Return the complete binary blob for the // row currently under the read cursor. // // sqlite3VdbeSorterCompare() Compare the binary blob for the row // currently under the read cursor against // another binary blob X and report if // X is strictly less than the read cursor. // Used to enforce uniqueness in a // CREATE UNIQUE INDEX statement. // // sqlite3VdbeSorterClose() Close the VdbeSorter object and reclaim // all resources. // // sqlite3VdbeSorterReset() Refurbish the VdbeSorter for reuse. This // is like Close() followed by Init() only // much faster. // // The interfaces above must be called in a particular order. Write() can // only occur in between Init()/Reset() and Rewind(). Next(), Rowkey(), and // Compare() can only occur in between Rewind() and Close()/Reset(). i.e. // // Init() // for each record: Write() // Rewind() // Rowkey()/Compare() // Next() // Close() // // Algorithm: // // Records passed to the sorter via calls to Write() are initially held // unsorted in main memory. Assuming the amount of memory used never exceeds // a threshold, when Rewind() is called the set of records is sorted using // an in-memory merge sort. In this case, no temporary files are required // and subsequent calls to Rowkey(), Next() and Compare() read records // directly from main memory. // // If the amount of space used to store records in main memory exceeds the // threshold, then the set of records currently in memory are sorted and // written to a temporary file in "Packed Memory Array" (PMA) format. // A PMA created at this point is known as a "level-0 PMA". Higher levels // of PMAs may be created by merging existing PMAs together - for example // merging two or more level-0 PMAs together creates a level-1 PMA. // // The threshold for the amount of main memory to use before flushing // records to a PMA is roughly the same as the limit configured for the // page-cache of the main database. Specifically, the threshold is set to // the value returned by "PRAGMA main.page_size" multipled by // that returned by "PRAGMA main.cache_size", in bytes. // // If the sorter is running in single-threaded mode, then all PMAs generated // are appended to a single temporary file. Or, if the sorter is running in // multi-threaded mode then up to (N+1) temporary files may be opened, where // N is the configured number of worker threads. In this case, instead of // sorting the records and writing the PMA to a temporary file itself, the // calling thread usually launches a worker thread to do so. Except, if // there are already N worker threads running, the main thread does the work // itself. // // The sorter is running in multi-threaded mode if (a) the library was built // with pre-processor symbol SQLITE_MAX_WORKER_THREADS set to a value greater // than zero, and (b) worker threads have been enabled at runtime by calling // "PRAGMA threads=N" with some value of N greater than 0. // // When Rewind() is called, any data remaining in memory is flushed to a // final PMA. So at this point the data is stored in some number of sorted // PMAs within temporary files on disk. // // If there are fewer than SORTER_MAX_MERGE_COUNT PMAs in total and the // sorter is running in single-threaded mode, then these PMAs are merged // incrementally as keys are retreived from the sorter by the VDBE. The // MergeEngine object, described in further detail below, performs this // merge. // // Or, if running in multi-threaded mode, then a background thread is // launched to merge the existing PMAs. Once the background thread has // merged T bytes of data into a single sorted PMA, the main thread // begins reading keys from that PMA while the background thread proceeds // with merging the next T bytes of data. And so on. // // Parameter T is set to half the value of the memory threshold used // by Write() above to determine when to create a new PMA. // // If there are more than SORTER_MAX_MERGE_COUNT PMAs in total when // Rewind() is called, then a hierarchy of incremental-merges is used. // First, T bytes of data from the first SORTER_MAX_MERGE_COUNT PMAs on // disk are merged together. Then T bytes of data from the second set, and // so on, such that no operation ever merges more than SORTER_MAX_MERGE_COUNT // PMAs at a time. This done is to improve locality. // // If running in multi-threaded mode and there are more than // SORTER_MAX_MERGE_COUNT PMAs on disk when Rewind() is called, then more // than one background thread may be created. Specifically, there may be // one background thread for each temporary file on disk, and one background // thread to merge the output of each of the others to a single PMA for // the main thread to read from. // #include "sqliteInt.h" // #include "vdbeInt.h" // If SQLITE_DEBUG_SORTER_THREADS is defined, this module outputs various // messages to stderr that may be helpful in understanding the performance // characteristics of the sorter in multi-threaded mode. // Hard-coded maximum amount of data to accumulate in memory before flushing // to a level 0 PMA. The purpose of this limit is to prevent various integer // overflows. 512MiB. // Private objects used by the sorter type MergeEngine = MergeEngine1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96689:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 FnAlloc int32 FnKey int32 FpFd uintptr FaAlloc uintptr FaKey uintptr FaBuffer uintptr FnBuffer int32 F__ccgo_pad1 [4]byte FaMap uintptr FpIncr uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // Merge PMAs together type PmaReader = PmaReader1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96690:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 F__ccgo_pad1 [4]byte FaBuffer uintptr FnBuffer int32 FiBufStart int32 FiBufEnd int32 F__ccgo_pad2 [4]byte FiWriteOff I64 FpFd uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96691:9 */ // Incrementally read one PMA type PmaWriter = PmaWriter1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96691:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 F__ccgo_pad1 [4]byte Fu struct{ FpNext uintptr } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // Incrementally write one PMA type SorterRecord = SorterRecord1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96692:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 F__ccgo_pad1 [4]byte FpSorter uintptr FpUnpacked uintptr Flist SorterList FnPMA int32 F__ccgo_pad2 [4]byte FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // A record being sorted type SortSubtask = SortSubtask1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96693:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // A sub-task in the sort process type SorterFile = SorterFile1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96694:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // Temporary file object wrapper type SorterList = SorterList1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96695:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr FiStartOff I64 FmxSz int32 FbEof int32 FbUseThread int32 F__ccgo_pad1 [4]byte FaFile [2]SorterFile } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:22083:9 */ // In-memory list of records type IncrMerger = IncrMerger1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96696:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated // as part of each VdbeSorter object. Instances are never allocated any // other way. VdbeSorter.nTask is set to the number of worker threads allowed // (see SQLITE_CONFIG_WORKER_THREADS) plus one (the main thread). Thus for // single-threaded operation, there is exactly one instance of this object // and for multi-threaded operation there are two or more instances. // // Essentially, this structure contains all those fields of the VdbeSorter // structure for which each thread requires a separate instance. For example, // each thread requries its own UnpackedRecord object to unpack records in // as part of comparison operations. // // Before a background thread is launched, variable bDone is set to 0. Then, // right before it exits, the thread itself sets bDone to 1. This is used for // two purposes: // // 1. When flushing the contents of memory to a level-0 PMA on disk, to // attempt to select a SortSubtask for which there is not already an // active background thread (since doing so causes the main thread // to block until it finishes). // // 2. If SQLITE_DEBUG_SORTER_THREADS is defined, to determine if a call // to sqlite3ThreadJoin() is likely to block. Cases that are likely to // block provoke debugging output. // // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. type SorterCompare = uintptr /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96823:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:96998:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { Xsqlite3OsUnfetch(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, int64(0), (*PmaReader)(unsafe.Pointer(pReadr)).FaMap) } vdbeIncrFree(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr) libc.Xmemset(tls, pReadr, 0, uint64(unsafe.Sizeof(PmaReader{}))) } // Read the next nByte bytes of data from the PMA p. // If successful, set *ppOut to point to a buffer containing the data // and return SQLITE_OK. Otherwise, if an error occurs, return an SQLite // error code. // // The buffer returned in *ppOut is only valid until the // next call to this function. func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97015:12: */ bp := tls.Alloc(8) defer tls.Free(8) var iBuf int32 // Offset within buffer to read from var nAvail int32 // Bytes of data available in buffer if (*PmaReader)(unsafe.Pointer(p)).FaMap != 0 { *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaMap + uintptr((*PmaReader)(unsafe.Pointer(p)).FiReadOff) *(*I64)(unsafe.Pointer(p)) += I64(nByte) return SQLITE_OK } // If there is no more data to be read from the buffer, read the next // p->nBuffer bytes of data from the file into it. Or, if there are less // than p->nBuffer bytes remaining in the PMA, read all remaining data. iBuf = int32((*PmaReader)(unsafe.Pointer(p)).FiReadOff % I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer)) if iBuf == 0 { var nRead int32 // Bytes to read from disk var rc int32 // sqlite3OsRead() return code // Determine how many bytes of data to read. if (*PmaReader)(unsafe.Pointer(p)).FiEof-(*PmaReader)(unsafe.Pointer(p)).FiReadOff > I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer) { nRead = (*PmaReader)(unsafe.Pointer(p)).FnBuffer } else { nRead = int32((*PmaReader)(unsafe.Pointer(p)).FiEof - (*PmaReader)(unsafe.Pointer(p)).FiReadOff) } // Readr data from the file. Return early if an error occurs. rc = Xsqlite3OsRead(tls, (*PmaReader)(unsafe.Pointer(p)).FpFd, (*PmaReader)(unsafe.Pointer(p)).FaBuffer, nRead, (*PmaReader)(unsafe.Pointer(p)).FiReadOff) if rc != SQLITE_OK { return rc } } nAvail = (*PmaReader)(unsafe.Pointer(p)).FnBuffer - iBuf if nByte <= nAvail { // The requested data is available in the in-memory buffer. In this // case there is no need to make a copy of the data, just return a // pointer into the buffer to the caller. *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaBuffer + uintptr(iBuf) *(*I64)(unsafe.Pointer(p)) += I64(nByte) } else { // The requested data is not all available in the in-memory buffer. // In this case, allocate space at p->aAlloc[] to copy the requested // range into. Then return a copy of pointer p->aAlloc to the caller. var nRem int32 // Bytes remaining to copy // Extend the p->aAlloc[] allocation if required. if (*PmaReader)(unsafe.Pointer(p)).FnAlloc < nByte { var aNew uintptr var nNew Sqlite3_int64 = func() int64 { if int64(128) > int64(2)*Sqlite3_int64((*PmaReader)(unsafe.Pointer(p)).FnAlloc) { return int64(128) } return int64(2) * Sqlite3_int64((*PmaReader)(unsafe.Pointer(p)).FnAlloc) }() for Sqlite3_int64(nByte) > nNew { nNew = nNew * int64(2) } aNew = Xsqlite3Realloc(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc, uint64(nNew)) if !(aNew != 0) { return SQLITE_NOMEM } (*PmaReader)(unsafe.Pointer(p)).FnAlloc = int32(nNew) (*PmaReader)(unsafe.Pointer(p)).FaAlloc = aNew } // Copy as much data as is available in the buffer into the start of // p->aAlloc[]. libc.Xmemcpy(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc, (*PmaReader)(unsafe.Pointer(p)).FaBuffer+uintptr(iBuf), uint64(nAvail)) *(*I64)(unsafe.Pointer(p)) += I64(nAvail) nRem = nByte - nAvail // The following loop copies up to p->nBuffer bytes per iteration into // the p->aAlloc[] buffer. for nRem > 0 { var rc int32 // vdbePmaReadBlob() return code var nCopy int32 // Number of bytes to copy // var aNext uintptr at bp, 8 // Pointer to buffer to copy data from nCopy = nRem if nRem > (*PmaReader)(unsafe.Pointer(p)).FnBuffer { nCopy = (*PmaReader)(unsafe.Pointer(p)).FnBuffer } rc = vdbePmaReadBlob(tls, p, nCopy, bp) if rc != SQLITE_OK { return rc } libc.Xmemcpy(tls, (*PmaReader)(unsafe.Pointer(p)).FaAlloc+uintptr(nByte-nRem), *(*uintptr)(unsafe.Pointer(bp /* aNext */)), uint64(nCopy)) nRem = nRem - nCopy } *(*uintptr)(unsafe.Pointer(ppOut)) = (*PmaReader)(unsafe.Pointer(p)).FaAlloc } return SQLITE_OK } // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97109:12: */ bp := tls.Alloc(24) defer tls.Free(24) var iBuf int32 if (*PmaReader)(unsafe.Pointer(p)).FaMap != 0 { *(*I64)(unsafe.Pointer(p)) += I64(Xsqlite3GetVarint(tls, (*PmaReader)(unsafe.Pointer(p)).FaMap+uintptr((*PmaReader)(unsafe.Pointer(p)).FiReadOff), pnOut)) } else { iBuf = int32((*PmaReader)(unsafe.Pointer(p)).FiReadOff % I64((*PmaReader)(unsafe.Pointer(p)).FnBuffer)) if iBuf != 0 && (*PmaReader)(unsafe.Pointer(p)).FnBuffer-iBuf >= 9 { *(*I64)(unsafe.Pointer(p)) += I64(Xsqlite3GetVarint(tls, (*PmaReader)(unsafe.Pointer(p)).FaBuffer+uintptr(iBuf), pnOut)) } else { // var aVarint [16]U8 at bp+8, 16 // var a uintptr at bp, 8 var i int32 = 0 var rc int32 for __ccgo := true; __ccgo; __ccgo = int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))&0x80 != 0 { rc = vdbePmaReadBlob(tls, p, 1, bp) if rc != 0 { return rc } *(*U8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&i, 1)&0xf))) = *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))) } Xsqlite3GetVarint(tls, bp+8, pnOut) } } return SQLITE_OK } // Attempt to memory map file pFile. If successful, set *pp to point to the // new mapping and return SQLITE_OK. If the mapping is not attempted // (because the file is too large or the VFS layer is configured not to use // mmap), return SQLITE_OK and set *pp to NULL. // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97142:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd if (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FiVersion >= 3 { rc = Xsqlite3OsFetch(tls, pFd, int64(0), int32((*SorterFile)(unsafe.Pointer(pFile)).FiEof), pp) } } return rc } // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97159:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { return SQLITE_IOERR | int32(1)<<8 } if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { Xsqlite3OsUnfetch(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, int64(0), (*PmaReader)(unsafe.Pointer(pReadr)).FaMap) (*PmaReader)(unsafe.Pointer(pReadr)).FaMap = uintptr(0) } (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff = iOff (*PmaReader)(unsafe.Pointer(pReadr)).FiEof = (*SorterFile)(unsafe.Pointer(pFile)).FiEof (*PmaReader)(unsafe.Pointer(pReadr)).FpFd = (*SorterFile)(unsafe.Pointer(pFile)).FpFd rc = vdbeSorterMapFile(tls, pTask, pFile, pReadr+64) if rc == SQLITE_OK && (*PmaReader)(unsafe.Pointer(pReadr)).FaMap == uintptr(0) { var pgsz int32 = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz var iBuf int32 = int32((*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff % I64(pgsz)) if (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer == uintptr(0) { (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer = Xsqlite3Malloc(tls, uint64(pgsz)) if (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer == uintptr(0) { rc = SQLITE_NOMEM } (*PmaReader)(unsafe.Pointer(pReadr)).FnBuffer = pgsz } if rc == SQLITE_OK && iBuf != 0 { var nRead int32 = pgsz - iBuf if (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff+I64(nRead) > (*PmaReader)(unsafe.Pointer(pReadr)).FiEof { nRead = int32((*PmaReader)(unsafe.Pointer(pReadr)).FiEof - (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) } rc = Xsqlite3OsRead(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpFd, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer+uintptr(iBuf), nRead, (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) } } return rc } // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97206:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // Return Code *(*U64)(unsafe.Pointer(bp /* nRec */)) = uint64(0) // Size of record in bytes if (*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff >= (*PmaReader)(unsafe.Pointer(pReadr)).FiEof { var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var bEof int32 = 1 if pIncr != 0 { rc = vdbeIncrSwap(tls, pIncr) if rc == SQLITE_OK && (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof == 0 { rc = vdbePmaReaderSeek(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, pReadr, pIncr+40, (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff) bEof = 0 } } if bEof != 0 { // This is an EOF condition vdbePmaReaderClear(tls, pReadr) return rc } } if rc == SQLITE_OK { rc = vdbePmaReadVarint(tls, pReadr, bp) } if rc == SQLITE_OK { (*PmaReader)(unsafe.Pointer(pReadr)).FnKey = int32(*(*U64)(unsafe.Pointer(bp /* nRec */))) rc = vdbePmaReadBlob(tls, pReadr, int32(*(*U64)(unsafe.Pointer(bp /* nRec */))), pReadr+40) } return rc } // Initialize PmaReader pReadr to scan through the PMA stored in file pFile // starting at offset iStart and ending at offset iEof-1. This function // leaves the PmaReader pointing to the first key in the PMA (or EOF if the // PMA is empty). // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97253:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 rc = vdbePmaReaderSeek(tls, pTask, pReadr, pFile, iStart) if rc == SQLITE_OK { *(*U64)(unsafe.Pointer(bp /* nByte */)) = uint64(0) // Size of PMA in bytes rc = vdbePmaReadVarint(tls, pReadr, bp) (*PmaReader)(unsafe.Pointer(pReadr)).FiEof = I64(U64((*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) + *(*U64)(unsafe.Pointer(bp))) *(*I64)(unsafe.Pointer(pnByte)) += I64(*(*U64)(unsafe.Pointer(bp))) } if rc == SQLITE_OK { rc = vdbePmaReaderNext(tls, pReadr) } return rc } // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97286:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) *(*int32)(unsafe.Pointer(pbKey2Cached)) = 1 } return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, r2, 1) } // Compare key1 (buffer pKey1, size nKey1 bytes) with key2 (buffer pKey2, // size nKey2 bytes). Use (pTask->pKeyInfo) for the collation sequences // used by the comparison. Return the result of the comparison. // // If IN/OUT parameter *pbKey2Cached is true when this function is called, // it is assumed that (pTask->pUnpacked) contains the unpacked version // of key2. If it is false, (pTask->pUnpacked) is populated with the unpacked // version of key2 and *pbKey2Cached set to true before returning. // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97313:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) *(*int32)(unsafe.Pointer(pbKey2Cached)) = 1 } return Xsqlite3VdbeRecordCompare(tls, nKey1, pKey1, r2) } // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97332:12: */ bp := tls.Alloc(8) defer tls.Free(8) var p1 uintptr = pKey1 var p2 uintptr = pKey2 var v1 uintptr = p1 + uintptr(*(*U8)(unsafe.Pointer(p1))) // Pointer to value 1 var v2 uintptr = p2 + uintptr(*(*U8)(unsafe.Pointer(p2))) // Pointer to value 2 // var n1 int32 at bp, 4 // var n2 int32 at bp+4, 4 var res int32 *(*int32)(unsafe.Pointer(bp /* n1 */)) = int32(U32(*(*U8)(unsafe.Pointer(p1 + 1)))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { Xsqlite3GetVarint32(tls, p1+1, bp) } *(*int32)(unsafe.Pointer(bp + 4 /* n2 */)) = int32(U32(*(*U8)(unsafe.Pointer(p2 + 1)))) if *(*int32)(unsafe.Pointer(bp + 4)) >= 0x80 { Xsqlite3GetVarint32(tls, p2+1, bp+4) } res = libc.Xmemcmp(tls, v1, v2, uint64((func() int32 { if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 4)) { return *(*int32)(unsafe.Pointer(bp)) } return *(*int32)(unsafe.Pointer(bp + 4)) }()-13)/2)) if res == 0 { res = *(*int32)(unsafe.Pointer(bp)) - *(*int32)(unsafe.Pointer(bp + 4)) } if res == 0 { if int32((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField) > 1 { res = vdbeSorterCompareTail(tls, pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2) } } else { if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FaSortFlags)) != 0 { res = res * -1 } } return res } // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97374:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type var s2 int32 = int32(*(*U8)(unsafe.Pointer(p2 + 1))) // Right hand serial type var v1 uintptr = p1 + uintptr(*(*U8)(unsafe.Pointer(p1))) // Pointer to value 1 var v2 uintptr = p2 + uintptr(*(*U8)(unsafe.Pointer(p2))) // Pointer to value 2 var res int32 // Return value if s1 == s2 { var n U8 = aLen[s1] var i int32 res = 0 for i = 0; i < int32(n); i++ { if libc.AssignInt32(&res, int32(*(*U8)(unsafe.Pointer(v1 + uintptr(i))))-int32(*(*U8)(unsafe.Pointer(v2 + uintptr(i))))) != 0 { if (int32(*(*U8)(unsafe.Pointer(v1)))^int32(*(*U8)(unsafe.Pointer(v2))))&0x80 != 0 { if int32(*(*U8)(unsafe.Pointer(v1)))&0x80 != 0 { res = -1 } else { res = +1 } } break } } } else if s1 > 7 && s2 > 7 { res = s1 - s2 } else { if s2 > 7 { res = +1 } else if s1 > 7 { res = -1 } else { res = s1 - s2 } if res > 0 { if int32(*(*U8)(unsafe.Pointer(v1)))&0x80 != 0 { res = -1 } } else { if int32(*(*U8)(unsafe.Pointer(v2)))&0x80 != 0 { res = +1 } } } if res == 0 { if int32((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField) > 1 { res = vdbeSorterCompareTail(tls, pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2) } } else if *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FaSortFlags)) != 0 { res = res * -1 } return res } var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97393:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // // Usually, the sorter module uses the value of (pCsr->pKeyInfo->nKeyField) // to determine the number of fields that should be compared from the // records being sorted. However, if the value passed as argument nField // is non-zero and the sorter is able to guarantee a stable sort, nField // is used instead. This is used when sorting records for a CREATE INDEX // statement. In this case, keys are always delivered to the sorter in // order of the primary key, which happens to be make up the final part // of the records being sorted. So if the sort is stable, there is never // any reason to compare PK fields and they can be ignored for a small // performance boost. // // The sorter can guarantee a stable sort when running in single-threaded // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97457:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter var pKeyInfo uintptr // Copy of pCsr->pKeyInfo with db==0 var szKeyInfo int32 // Size of pCsr->pKeyInfo in bytes var sz int32 // Size of pSorter in bytes var rc int32 = SQLITE_OK var nWorker int32 // Initialize the upper limit on the number of worker threads if Xsqlite3TempInMemory(tls, db) != 0 || int32(Xsqlite3Config.FbCoreMutex) == 0 { nWorker = 0 } else { nWorker = *(*int32)(unsafe.Pointer(db + 136 + 11*4)) } // Do not allow the total number of threads (main thread + all workers) // to exceed the maximum merge count szKeyInfo = int32(uint64(unsafe.Sizeof(KeyInfo{})) + uint64(int32((*KeyInfo)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo)).FnKeyField)-1)*uint64(unsafe.Sizeof(uintptr(0)))) sz = int32(uint64(unsafe.Sizeof(VdbeSorter{})) + uint64(nWorker)*uint64(unsafe.Sizeof(SortSubtask{}))) pSorter = Xsqlite3DbMallocZero(tls, db, uint64(sz+szKeyInfo)) *(*uintptr)(unsafe.Pointer(pCsr + 48)) = pSorter if pSorter == uintptr(0) { rc = SQLITE_NOMEM } else { var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt (*VdbeSorter)(unsafe.Pointer(pSorter)).FpKeyInfo = libc.AssignUintptr(&pKeyInfo, pSorter+uintptr(sz)) libc.Xmemcpy(tls, pKeyInfo, (*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo, uint64(szKeyInfo)) (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fdb = uintptr(0) if nField != 0 && nWorker == 0 { (*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField = U16(nField) } Xsqlite3BtreeEnter(tls, pBt) (*VdbeSorter)(unsafe.Pointer(pSorter)).Fpgsz = libc.AssignInt32(&pgsz, Xsqlite3BtreeGetPageSize(tls, pBt)) Xsqlite3BtreeLeave(tls, pBt) (*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask = U8(nWorker + 1) (*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev = U8(nWorker - 1) (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads = U8(libc.Bool32(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) > 1)) (*VdbeSorter)(unsafe.Pointer(pSorter)).Fdb = db for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { var pTask uintptr = pSorter + 96 + uintptr(i)*104 (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter = pSorter } if !(Xsqlite3TempInMemory(tls, db) != 0) { var mxCache I64 // Cache size in bytes var szPma U32 = Xsqlite3Config.FszPma (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize = int32(szPma * U32(pgsz)) mxCache = I64((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fcache_size) if mxCache < int64(0) { // A negative cache-size value C indicates that the cache is abs(C) // KiB in size. mxCache = mxCache * int64(-1024) } else { mxCache = mxCache * I64(pgsz) } mxCache = func() int64 { if mxCache < int64(int32(1)<<29) { return mxCache } return int64(int32(1) << 29) }() (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize = func() int32 { if (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize > int32(mxCache) { return (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize } return int32(mxCache) }() // Avoid large memory allocations if the application has requested // SQLITE_CONFIG_SMALL_MALLOC. if int32(Xsqlite3Config.FbSmallMalloc) == 0 { (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = pgsz (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = Xsqlite3Malloc(tls, uint64(pgsz)) if !(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) != 0) { rc = SQLITE_NOMEM } } } if int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) < 13 && (*(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) == (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl) && int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags)))&KEYINFO_ORDER_BIGNULL == 0 { (*VdbeSorter)(unsafe.Pointer(pSorter)).FtypeMask = U8(SORTER_TYPE_INTEGER | SORTER_TYPE_TEXT) } } return rc } // Free the list of sorted records starting at pRecord. func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97563:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { pNext = *(*uintptr)(unsafe.Pointer(p + 8)) Xsqlite3DbFree(tls, db, p) } } // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97576:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 if (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory != 0 { Xsqlite3_free(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory) } else { vdbeSorterRecordFree(tls, uintptr(0), (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FpList) } if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd != 0 { Xsqlite3OsCloseFree(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd) } if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd != 0 { Xsqlite3OsCloseFree(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd) } libc.Xmemset(tls, pTask, 0, uint64(unsafe.Sizeof(SortSubtask{}))) } // Join thread pTask->thread. func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97642:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK if (*SortSubtask)(unsafe.Pointer(pTask)).FpThread != 0 { *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(int64(SQLITE_ERROR)) Xsqlite3ThreadJoin(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpThread, bp) rc = int32(*(*uintptr)(unsafe.Pointer(bp))) (*SortSubtask)(unsafe.Pointer(pTask)).FbDone = 0 (*SortSubtask)(unsafe.Pointer(pTask)).FpThread = uintptr(0) } return rc } // Launch a background thread to run xTask(pIn). func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97663:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97676:12: */ var rc int32 = rcin var i int32 // This function is always called by the main user thread. // // If this function is being called after SorterRewind() has been called, // it is possible that thread pSorter->aTask[pSorter->nTask-1].pThread // is currently attempt to join one of the other threads. To avoid a race // condition where this thread also attempts to join the same object, join // thread pSorter->aTask[pSorter->nTask-1].pThread first. for i = int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) - 1; i >= 0; i-- { var pTask uintptr = pSorter + 96 + uintptr(i)*104 var rc2 int32 = vdbeSorterJoinThread(tls, pTask) if rc == SQLITE_OK { rc = rc2 } } return rc } // Allocate a new MergeEngine object capable of handling up to // nReader PmaReader inputs. // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97706:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return for N < nReader { N = N + N } nByte = int32(uint64(unsafe.Sizeof(MergeEngine{})) + uint64(N)*(uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(PmaReader{})))) if Xsqlite3FaultSim(tls, 100) != 0 { pNew = uintptr(0) } else { pNew = Xsqlite3MallocZero(tls, uint64(nByte)) } if pNew != 0 { (*MergeEngine)(unsafe.Pointer(pNew)).FnTree = N (*MergeEngine)(unsafe.Pointer(pNew)).FpTask = uintptr(0) (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr = pNew + 1*32 (*MergeEngine)(unsafe.Pointer(pNew)).FaTree = (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr + uintptr(N)*80 } return pNew } // Free the MergeEngine object passed as the only argument. func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97729:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { vdbePmaReaderClear(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(i)*80) } } Xsqlite3_free(tls, pMerger) } // Free all resources associated with the IncrMerger object indicated by // the first argument. func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97743:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) if (*SorterFile)(unsafe.Pointer(pIncr+40)).FpFd != 0 { Xsqlite3OsCloseFree(tls, (*SorterFile)(unsafe.Pointer(pIncr+40)).FpFd) } if (*SorterFile)(unsafe.Pointer(pIncr+40+1*16)).FpFd != 0 { Xsqlite3OsCloseFree(tls, (*SorterFile)(unsafe.Pointer(pIncr+40+1*16)).FpFd) } } vdbeMergeEngineFree(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger) Xsqlite3_free(tls, pIncr) } } // Reset a sorting cursor back to its original empty state. func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97760:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) if (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader != 0 { vdbePmaReaderClear(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) Xsqlite3DbFree(tls, db, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader = uintptr(0) } vdbeMergeEngineFree(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger) (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger = uintptr(0) for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { var pTask uintptr = pSorter + 96 + uintptr(i)*104 vdbeSortSubtaskCleanup(tls, db, pTask) (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter = pSorter } if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory == uintptr(0) { vdbeSorterRecordFree(tls, uintptr(0), (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) } (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = uintptr(0) (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA = U8(0) (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory = 0 (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize = 0 Xsqlite3DbFree(tls, db, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked) (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked = uintptr(0) } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97793:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) if pSorter != 0 { Xsqlite3VdbeSorterReset(tls, db, pSorter) Xsqlite3_free(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) Xsqlite3DbFree(tls, db, pSorter) *(*uintptr)(unsafe.Pointer(pCsr + 48)) = uintptr(0) } } // The first argument is a file-handle open on a temporary file. The file // is guaranteed to be nByte bytes or smaller in size. This function // attempts to extend the file to nByte bytes in size and to ensure that // the VFS has memory mapped it. // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97815:13: */ bp := tls.Alloc(24) defer tls.Free(24) *(*I64)(unsafe.Pointer(bp + 8)) = nByte if *(*I64)(unsafe.Pointer(bp + 8)) <= I64((*Sqlite3)(unsafe.Pointer(db)).FnMaxSorterMmap) && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FiVersion >= 3 { *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp /* chunksize */)) = 4 * 1024 Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_CHUNK_SIZE, bp) Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_SIZE_HINT, bp+8) Xsqlite3OsFetch(tls, pFd, int64(0), int32(*(*I64)(unsafe.Pointer(bp + 8 /* nByte */))), bp+16) if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { Xsqlite3OsUnfetch(tls, pFd, int64(0), *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) } } } // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97834:12: */ bp := tls.Alloc(16) defer tls.Free(16) // var rc int32 at bp, 4 if Xsqlite3FaultSim(tls, 202) != 0 { return SQLITE_IOERR | int32(13)<<8 } *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3OsOpenMalloc(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), ppFd, SQLITE_OPEN_TEMP_JOURNAL|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_DELETEONCLOSE, bp) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*I64)(unsafe.Pointer(bp + 8 /* max */)) = int64(SQLITE_MAX_MMAP_SIZE) Xsqlite3OsFileControlHint(tls, *(*uintptr)(unsafe.Pointer(ppFd)), SQLITE_FCNTL_MMAP_SIZE, bp+8) if nExtend > int64(0) { vdbeSorterExtendFile(tls, db, *(*uintptr)(unsafe.Pointer(ppFd)), nExtend) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97861:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { return SQLITE_NOMEM } (*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FnField = (*KeyInfo)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo)).FnKeyField (*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode = U8(0) } return SQLITE_OK } // Merge the two sorted lists p1 and p2 into a single list. func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97875:21: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp /* pFinal */)) = uintptr(0) var pp uintptr = bp /* &pFinal */ *(*int32)(unsafe.Pointer(bp + 8 /* bCached */)) = 0 for { var res int32 res = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, pTask, bp+8, p1+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p1)).FnVal, p2+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p2)).FnVal) if res <= 0 { *(*uintptr)(unsafe.Pointer(pp)) = p1 pp = p1 + 8 p1 = *(*uintptr)(unsafe.Pointer(p1 + 8)) if p1 == uintptr(0) { *(*uintptr)(unsafe.Pointer(pp)) = p2 break } } else { *(*uintptr)(unsafe.Pointer(pp)) = p2 pp = p2 + 8 p2 = *(*uintptr)(unsafe.Pointer(p2 + 8)) *(*int32)(unsafe.Pointer(bp + 8 /* bCached */)) = 0 if p2 == uintptr(0) { *(*uintptr)(unsafe.Pointer(pp)) = p1 break } } } return *(*uintptr)(unsafe.Pointer(bp /* pFinal */)) } // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97917:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 }{vdbeSorterCompareInt})) } else if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_TEXT { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 }{vdbeSorterCompareText})) } return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 }{vdbeSorterCompare})) } // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97931:12: */ bp := tls.Alloc(512) defer tls.Free(512) var i int32 var p uintptr var rc int32 // var aSlot [64]uintptr at bp, 512 rc = vdbeSortAllocUnpacked(tls, pTask) if rc != SQLITE_OK { return rc } p = (*SorterList)(unsafe.Pointer(pList)).FpList (*SortSubtask)(unsafe.Pointer(pTask)).FxCompare = vdbeSorterGetCompare(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof([64]uintptr{}))) for p != 0 { var pNext uintptr if (*SorterList)(unsafe.Pointer(pList)).FaMemory != 0 { if p == (*SorterList)(unsafe.Pointer(pList)).FaMemory { pNext = uintptr(0) } else { pNext = (*SorterList)(unsafe.Pointer(pList)).FaMemory + uintptr(*(*int32)(unsafe.Pointer(p + 8))) } } else { pNext = *(*uintptr)(unsafe.Pointer(p + 8)) } *(*uintptr)(unsafe.Pointer(p + 8)) = uintptr(0) for i = 0; *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*8)) != 0; i++ { p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = uintptr(0) } *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) = p p = pNext } p = uintptr(0) for i = 0; i < int32(uint64(unsafe.Sizeof([64]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))); i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) == uintptr(0) { continue } if p != 0 { p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8))) } else { p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*8)) } } (*SorterList)(unsafe.Pointer(pList)).FpList = p return int32((*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode) } // Initialize a PMA-writer object. func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:97982:13: */ libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = SQLITE_NOMEM } else { (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd = libc.AssignPtrInt32(p+20, int32(iStart%I64(nBuf))) (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff = iStart - I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart) (*PmaWriter)(unsafe.Pointer(p)).FnBuffer = nBuf (*PmaWriter)(unsafe.Pointer(p)).FpFd = pFd } } // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98004:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem if nCopy > (*PmaWriter)(unsafe.Pointer(p)).FnBuffer-(*PmaWriter)(unsafe.Pointer(p)).FiBufEnd { nCopy = (*PmaWriter)(unsafe.Pointer(p)).FnBuffer - (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd } libc.Xmemcpy(tls, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufEnd), pData+uintptr(nData-nRem), uint64(nCopy)) *(*int32)(unsafe.Pointer(p + 24)) += nCopy if (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd == (*PmaWriter)(unsafe.Pointer(p)).FnBuffer { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufStart), (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd-(*PmaWriter)(unsafe.Pointer(p)).FiBufStart, (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff+I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart)) (*PmaWriter)(unsafe.Pointer(p)).FiBufStart = libc.AssignPtrInt32(p+24, 0) *(*I64)(unsafe.Pointer(p + 32)) += I64((*PmaWriter)(unsafe.Pointer(p)).FnBuffer) } nRem = nRem - nCopy } } // Flush any buffered data to disk and clean up the PMA-writer object. // The results of using the PMA-writer after this call are undefined. // Return SQLITE_OK if flushing the buffered data succeeds or is not // required. Otherwise, return an SQLite error code. // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98037:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer+uintptr((*PmaWriter)(unsafe.Pointer(p)).FiBufStart), (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd-(*PmaWriter)(unsafe.Pointer(p)).FiBufStart, (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff+I64((*PmaWriter)(unsafe.Pointer(p)).FiBufStart)) } *(*I64)(unsafe.Pointer(piEof)) = (*PmaWriter)(unsafe.Pointer(p)).FiWriteOff + I64((*PmaWriter)(unsafe.Pointer(p)).FiBufEnd) Xsqlite3_free(tls, (*PmaWriter)(unsafe.Pointer(p)).FaBuffer) rc = (*PmaWriter)(unsafe.Pointer(p)).FeFWErr libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(PmaWriter{}))) return rc } // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98056:13: */ bp := tls.Alloc(10) defer tls.Free(10) var nByte int32 // var aByte [10]U8 at bp, 10 nByte = Xsqlite3PutVarint(tls, bp, iVal) vdbePmaWriteBlob(tls, p, bp, nByte) } // Write the current contents of in-memory linked-list pList to a level-0 // PMA in the temp file belonging to sub-task pTask. Return SQLITE_OK if // successful, or an SQLite error code otherwise. // // The format of a PMA is: // // * A varint. This varint contains the total number of bytes of content // in the PMA (not including the varint itself). // // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98077:12: */ bp := tls.Alloc(48) defer tls.Free(48) var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb var rc int32 = SQLITE_OK // Return code // var writer PmaWriter at bp, 48 // Object used to write to the file libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(PmaWriter{}))) // If the first temporary PMA file has not been opened, open it now. if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd == uintptr(0) { rc = vdbeSorterOpenTempFile(tls, db, int64(0), pTask+72) } // Try to get the file to memory map if rc == SQLITE_OK { vdbeSorterExtendFile(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FiEof+I64((*SorterList)(unsafe.Pointer(pList)).FszPMA)+int64(9)) } // Sort the list if rc == SQLITE_OK { rc = vdbeSorterSort(tls, pTask, pList) } if rc == SQLITE_OK { var p uintptr var pNext uintptr = uintptr(0) vdbePmaWriterInit(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FiEof) (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA++ vdbePmaWriteVarint(tls, bp, uint64((*SorterList)(unsafe.Pointer(pList)).FszPMA)) for p = (*SorterList)(unsafe.Pointer(pList)).FpList; p != 0; p = pNext { pNext = *(*uintptr)(unsafe.Pointer(p + 8)) vdbePmaWriteVarint(tls, bp, uint64((*SorterRecord)(unsafe.Pointer(p)).FnVal)) vdbePmaWriteBlob(tls, bp, p+uintptr(1)*16, (*SorterRecord)(unsafe.Pointer(p)).FnVal) if (*SorterList)(unsafe.Pointer(pList)).FaMemory == uintptr(0) { Xsqlite3_free(tls, p) } } (*SorterList)(unsafe.Pointer(pList)).FpList = p rc = vdbePmaWriterFinish(tls, bp, pTask+72+8) } return rc } // Advance the MergeEngine to its next entry. // Set *pbEof to true there is no next entry because // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98141:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 var iPrev int32 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + 1*4)) // Index of PmaReader to advance var pTask uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask // Advance the current PmaReader rc = vdbePmaReaderNext(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(iPrev)*80) // Update contents of aTree[] if rc == SQLITE_OK { var i int32 // Index of aTree[] to recalculate var pReadr1 uintptr // First PmaReader to compare var pReadr2 uintptr // Second PmaReader to compare *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 // Find the first two PmaReaders to compare. The one that was just // advanced (iPrev) and the one next to it in the array. pReadr1 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(iPrev&0xFFFE)*80 pReadr2 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(iPrev|0x0001)*80 for i = ((*MergeEngine)(unsafe.Pointer(pMerger)).FnTree + iPrev) / 2; i > 0; i = i / 2 { // Compare pReadr1 and pReadr2. Store the result in variable iRes. var iRes int32 if (*PmaReader)(unsafe.Pointer(pReadr1)).FpFd == uintptr(0) { iRes = +1 } else if (*PmaReader)(unsafe.Pointer(pReadr2)).FpFd == uintptr(0) { iRes = -1 } else { iRes = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, pTask, bp, /* &bCached */ (*PmaReader)(unsafe.Pointer(pReadr1)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr1)).FnKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FaKey, (*PmaReader)(unsafe.Pointer(pReadr2)).FnKey) } // If pReadr1 contained the smaller value, set aTree[i] to its index. // Then set pReadr2 to the next PmaReader to compare to pReadr1. In this // case there is no cache of pReadr2 in pTask->pUnpacked, so set // pKey2 to point to the record belonging to pReadr2. // // Alternatively, if pReadr2 contains the smaller of the two values, // set aTree[i] to its index and update pReadr1. If vdbeSorterCompare() // was actually called above, then pTask->pUnpacked now contains // a value equivalent to pReadr2. So set pKey2 to NULL to prevent // vdbeSorterCompare() from decoding pReadr2 again. // // If the two values were equal, then the value from the oldest // PMA should be considered smaller. The VdbeSorter.aReadr[] array // is sorted from oldest to newest, so pReadr1 contains older values // than pReadr2 iff (pReadr1<pReadr2). if iRes < 0 || iRes == 0 && pReadr1 < pReadr2 { *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(i)*4)) = int32((int64(pReadr1) - int64((*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr)) / 80) pReadr2 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(i^0x0001)*4)))*80 *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 } else { if (*PmaReader)(unsafe.Pointer(pReadr1)).FpFd != 0 { *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 } *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(i)*4)) = int32((int64(pReadr2) - int64((*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr)) / 80) pReadr1 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(i^0x0001)*4)))*80 } } *(*int32)(unsafe.Pointer(pbEof)) = libc.Bool32((*PmaReader)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + 1*4)))*80)).FpFd == uintptr(0)) } return func() int32 { if rc == SQLITE_OK { return int32((*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode) } return rc }() } // The main routine for background threads that write level-0 PMAs. func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98212:13: */ var pTask uintptr = pCtx var rc int32 // Return code rc = vdbeSorterListToPMA(tls, pTask, pTask+32) (*SortSubtask)(unsafe.Pointer(pTask)).FbDone = 1 return uintptr(int64(rc)) } // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98226:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA var nWorker int32 = int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) - 1 // Set the flag to indicate that at least one PMA has been written. // Or will be, anyhow. (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA = U8(1) // Select a sub-task to sort and flush the current list of in-memory // records to disk. If the sorter is running in multi-threaded mode, // round-robin between the first (pSorter->nTask-1) tasks. Except, if // the background thread from a sub-tasks previous turn is still running, // skip it. If the first (pSorter->nTask-1) sub-tasks are all still busy, // fall back to using the final sub-task. The first (pSorter->nTask-1) // sub-tasks are prefered as they use background threads - the final // sub-task uses the main thread. for i = 0; i < nWorker; i++ { var iTest int32 = (int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev) + i + 1) % nWorker pTask = pSorter + 96 + uintptr(iTest)*104 if (*SortSubtask)(unsafe.Pointer(pTask)).FbDone != 0 { rc = vdbeSorterJoinThread(tls, pTask) } if rc != SQLITE_OK || (*SortSubtask)(unsafe.Pointer(pTask)).FpThread == uintptr(0) { break } } if rc == SQLITE_OK { if i == nWorker { // Use the foreground thread for this operation rc = vdbeSorterListToPMA(tls, pSorter+96+uintptr(nWorker)*104, pSorter+56) } else { // Launch a background thread for this operation var aMem uintptr var pCtx uintptr aMem = (*SortSubtask)(unsafe.Pointer(pTask)).Flist.FaMemory pCtx = pTask (*VdbeSorter)(unsafe.Pointer(pSorter)).FiPrev = U8(int64((pTask - (pSorter + 96)) / 104)) (*SortSubtask)(unsafe.Pointer(pTask)).Flist = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = uintptr(0) (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 if aMem != 0 { (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = aMem (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = Xsqlite3MallocSize(tls, aMem) } else if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = Xsqlite3Malloc(tls, uint64((*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory)) if !(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory) != 0) { return SQLITE_NOMEM } } rc = vdbeSorterCreateThread(tls, pTask, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{vdbeSorterFlushThread})), pCtx) } } return rc } // Add a record to the sorter. func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98296:20: */ bp := tls.Alloc(4) defer tls.Free(4) var pSorter uintptr var rc int32 = SQLITE_OK // Return Code var pNew uintptr // New list element var bFlush int32 // True to flush contents of memory to PMA var nReq int32 // Bytes of memory required var nPMA int32 // Bytes of PMA space required // var t int32 at bp, 4 // serial type of first record field pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) *(*int32)(unsafe.Pointer(bp /* t */)) = int32(U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVal)).Fz + 1)))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(pVal)).Fz+1, bp) } if *(*int32)(unsafe.Pointer(bp)) > 0 && *(*int32)(unsafe.Pointer(bp)) < 10 && *(*int32)(unsafe.Pointer(bp)) != 7 { *(*U8)(unsafe.Pointer(pSorter + 92)) &= U8(SORTER_TYPE_INTEGER) } else if *(*int32)(unsafe.Pointer(bp)) > 10 && *(*int32)(unsafe.Pointer(bp))&0x01 != 0 { *(*U8)(unsafe.Pointer(pSorter + 92)) &= U8(SORTER_TYPE_TEXT) } else { (*VdbeSorter)(unsafe.Pointer(pSorter)).FtypeMask = U8(0) } // Figure out whether or not the current contents of memory should be // flushed to a PMA before continuing. If so, do so. // // If using the single large allocation mode (pSorter->aMemory!=0), then // flush the contents of memory to a new PMA if (a) at least one value is // already in memory and (b) the new value will not fit in memory. // // Or, if using separate allocations for each record, flush the contents // of memory to a PMA if either of the following are true: // // * The total memory allocated for the in-memory list is greater // than (page-size * cache-size), or // // * The total memory allocated for the in-memory list is greater // than (page-size * 10) and sqlite3HeapNearlyFull() returns true. nReq = int32(uint64((*Mem)(unsafe.Pointer(pVal)).Fn) + uint64(unsafe.Sizeof(SorterRecord{}))) nPMA = (*Mem)(unsafe.Pointer(pVal)).Fn + Xsqlite3VarintLen(tls, uint64((*Mem)(unsafe.Pointer(pVal)).Fn)) if (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize != 0 { if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { bFlush = libc.Bool32((*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory != 0 && (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory+nReq > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) } else { bFlush = libc.Bool32((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize || (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmnPmaSize && Xsqlite3HeapNearlyFull(tls) != 0) } if bFlush != 0 { rc = vdbeSorterFlushPMA(tls, pSorter) (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FszPMA = 0 (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory = 0 } } *(*int32)(unsafe.Pointer(pSorter + 56 + 16)) += nPMA if nPMA > (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize { (*VdbeSorter)(unsafe.Pointer(pSorter)).FmxKeysize = nPMA } if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory != 0 { var nMin int32 = (*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory + nReq if nMin > (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory { var aNew uintptr var nNew Sqlite3_int64 = int64(2) * Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory) var iListOff int32 = -1 if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { iListOff = int32((int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) - int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory)) / 1) } for nNew < Sqlite3_int64(nMin) { nNew = nNew * int64(2) } if nNew > Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) { nNew = Sqlite3_int64((*VdbeSorter)(unsafe.Pointer(pSorter)).FmxPmaSize) } if nNew < Sqlite3_int64(nMin) { nNew = Sqlite3_int64(nMin) } aNew = Xsqlite3Realloc(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory, uint64(nNew)) if !(aNew != 0) { return SQLITE_NOMEM } if iListOff >= 0 { (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = aNew + uintptr(iListOff) } (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory = aNew (*VdbeSorter)(unsafe.Pointer(pSorter)).FnMemory = int32(nNew) } pNew = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory + uintptr((*VdbeSorter)(unsafe.Pointer(pSorter)).FiMemory) *(*int32)(unsafe.Pointer(pSorter + 80)) += (nReq + 7) & libc.CplInt32(7) if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { *(*int32)(unsafe.Pointer(pNew + 8)) = int32((int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList) - int64((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory)) / 1) } } else { pNew = Xsqlite3Malloc(tls, uint64(nReq)) if pNew == uintptr(0) { return SQLITE_NOMEM } *(*uintptr)(unsafe.Pointer(pNew + 8)) = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList } libc.Xmemcpy(tls, pNew+uintptr(1)*16, (*Mem)(unsafe.Pointer(pVal)).Fz, uint64((*Mem)(unsafe.Pointer(pVal)).Fn)) (*SorterRecord)(unsafe.Pointer(pNew)).FnVal = (*Mem)(unsafe.Pointer(pVal)).Fn (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = pNew return rc } // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98408:12: */ bp := tls.Alloc(52) defer tls.Free(52) var rc int32 = SQLITE_OK var rc2 int32 var iStart I64 = (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff var pOut uintptr = pIncr + 40 + 1*16 var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask var pMerger uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger // var writer PmaWriter at bp, 48 vdbePmaWriterInit(tls, (*SorterFile)(unsafe.Pointer(pOut)).FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, iStart) for rc == SQLITE_OK { // var dummy int32 at bp+48, 4 var pReader uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + 1*4)))*80 var nKey int32 = (*PmaReader)(unsafe.Pointer(pReader)).FnKey var iEof I64 = (*PmaWriter)(unsafe.Pointer(bp)).FiWriteOff + I64((*PmaWriter)(unsafe.Pointer(bp)).FiBufEnd) // Check if the output file is full or if the input has been exhausted. // In either case exit the loop. if (*PmaReader)(unsafe.Pointer(pReader)).FpFd == uintptr(0) { break } if iEof+I64(nKey)+I64(Xsqlite3VarintLen(tls, uint64(nKey))) > iStart+I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) { break } // Write the next key to the output. vdbePmaWriteVarint(tls, bp, uint64(nKey)) vdbePmaWriteBlob(tls, bp, (*PmaReader)(unsafe.Pointer(pReader)).FaKey, nKey) rc = vdbeMergeEngineStep(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, bp+48) } rc2 = vdbePmaWriterFinish(tls, bp, pOut+8) if rc == SQLITE_OK { rc = rc2 } return rc } // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98450:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(int64(vdbeIncrPopulate(tls, pIncr))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 return pRet } // Launch a background thread to populate aFile[1] of pIncr. func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98460:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{vdbeIncrPopulateThread})), p) } // This function is called when the PmaReader corresponding to pIncr has // finished reading the contents of aFile[0]. Its purpose is to "refill" // aFile[0] such that the PmaReader should start rereading it from the // beginning. // // For single-threaded objects, this is accomplished by literally reading // keys from pIncr->pMerger and repopulating aFile[0]. // // For multi-threaded objects, all that is required is to wait until the // background thread is finished (if it is not already) and then swap // aFile[0] and aFile[1] in place. If the contents of pMerger have not // been exhausted, this function also launches a new background thread // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98484:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { rc = vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) if rc == SQLITE_OK { var f0 = *(*SorterFile)(unsafe.Pointer(pIncr + 40)) *(*SorterFile)(unsafe.Pointer(pIncr + 40)) = *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) = f0 } if rc == SQLITE_OK { if (*SorterFile)(unsafe.Pointer(pIncr+40)).FiEof == (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff { (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof = 1 } else { rc = vdbeIncrBgPopulate(tls, pIncr) } } } else { rc = vdbeIncrPopulate(tls, pIncr) *(*SorterFile)(unsafe.Pointer(pIncr + 40)) = *(*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)) if (*SorterFile)(unsafe.Pointer(pIncr+40)).FiEof == (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff { (*IncrMerger)(unsafe.Pointer(pIncr)).FbEof = 1 } } return rc } // Allocate and return a new IncrMerger object to read data from pMerger. // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98523:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { return uintptr(0) } return Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(IncrMerger{}))) }()) if pIncr != 0 { (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger = pMerger (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask = pTask (*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz = func() int32 { if (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxKeysize+9 > (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxPmaSize/2 { return (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxKeysize + 9 } return (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FmxPmaSize / 2 }() *(*I64)(unsafe.Pointer(pTask + 88 + 8)) += I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } else { vdbeMergeEngineFree(tls, pMerger) rc = SQLITE_NOMEM } return rc } // Set the "use-threads" flag on object pIncr. func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98548:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 88 + 8)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98561:13: */ bp := tls.Alloc(4) defer tls.Free(4) var i1 int32 var i2 int32 var iRes int32 var p1 uintptr var p2 uintptr if iOut >= (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree/2 { i1 = (iOut - (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree/2) * 2 i2 = i1 + 1 } else { i1 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut*2)*4)) i2 = *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut*2+1)*4)) } p1 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(i1)*80 p2 = (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr + uintptr(i2)*80 if (*PmaReader)(unsafe.Pointer(p1)).FpFd == uintptr(0) { iRes = i2 } else if (*PmaReader)(unsafe.Pointer(p2)).FpFd == uintptr(0) { iRes = i1 } else { var pTask uintptr = (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask *(*int32)(unsafe.Pointer(bp /* bCached */)) = 0 var res int32 // from vdbeSortSubtaskMain() res = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, pTask, bp, (*PmaReader)(unsafe.Pointer(p1)).FaKey, (*PmaReader)(unsafe.Pointer(p1)).FnKey, (*PmaReader)(unsafe.Pointer(p2)).FaKey, (*PmaReader)(unsafe.Pointer(p2)).FnKey) if res <= 0 { iRes = i1 } else { iRes = i2 } } *(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(pMerger)).FaTree + uintptr(iOut)*4)) = iRes } // Initialize the MergeEngine object passed as the second argument. Once this // function returns, the first key of merged data may be read from the // MergeEngine object in the usual fashion. // // If argument eMode is INCRINIT_ROOT, then it is assumed that any IncrMerge // objects attached to the PmaReader objects that the merger reads from have // already been populated, but that they have not yet populated aFile[0] and // set the PmaReader objects up to read from it. In this case all that is // required is to call vdbePmaReaderNext() on each PmaReader to point it at // its first key. // // Otherwise, if eMode is any value other than INCRINIT_ROOT, then use // vdbePmaReaderIncrMergeInit() to initialize each PmaReader that feeds data // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98643:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge // Failure to allocate the merge would have been detected prior to // invoking this routine // eMode is always INCRINIT_NORMAL in single-threaded mode // Verify that the MergeEngine is assigned to a single thread (*MergeEngine)(unsafe.Pointer(pMerger)).FpTask = pTask nTree = (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree for i = 0; i < nTree; i++ { if SQLITE_MAX_WORKER_THREADS > 0 && eMode == INCRINIT_ROOT { // PmaReaders should be normally initialized in order, as if they are // reading from the same temp file this makes for more linear file IO. // However, in the INCRINIT_ROOT case, if PmaReader aReadr[nTask-1] is // in use it will block the vdbePmaReaderNext() call while it uses // the main thread to fill its buffer. So calling PmaReaderNext() // on this PmaReader before any of the multi-threaded PmaReaders takes // better advantage of multi-processor hardware. rc = vdbePmaReaderNext(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(nTree-i-1)*80) } else { rc = vdbePmaReaderIncrInit(tls, (*MergeEngine)(unsafe.Pointer(pMerger)).FaReadr+uintptr(i)*80, INCRINIT_NORMAL) } if rc != SQLITE_OK { return rc } } for i = (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree - 1; i > 0; i-- { vdbeMergeEngineCompare(tls, pMerger, i) } return int32((*UnpackedRecord)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked)).FerrCode) } // The PmaReader passed as the first argument is guaranteed to be an // incremental-reader (pReadr->pIncr!=0). This function serves to open // and/or initialize the temp file related fields of the IncrMerge // object at (pReadr->pIncr). // // If argument eMode is set to INCRINIT_NORMAL, then all PmaReaders // in the sub-tree headed by pReadr are also initialized. Data is then // loaded into the buffers belonging to pReadr and it is set to point to // the first key in its range. // // If argument eMode is set to INCRINIT_TASK, then pReadr is guaranteed // to be a multi-threaded PmaReader and this function is being called in a // background thread. In this case all PmaReaders in the sub-tree are // initialized as for INCRINIT_NORMAL and the aFile[1] buffer belonging to // pReadr is populated. However, pReadr itself is not set up to point // to its first key. A call to vdbePmaReaderNext() is still required to do // that. // // The reason this function does not call vdbePmaReaderNext() immediately // in the INCRINIT_TASK case is that vdbePmaReaderNext() assumes that it has // to block on thread (pTask->thread) before accessing aFile[1]. But, since // this entire function is being run by thread (pTask->thread), that will // lead to the current background thread attempting to join itself. // // Finally, if argument eMode is set to INCRINIT_ROOT, it may be assumed // that pReadr->pIncr is a multi-threaded IncrMerge objects, and that all // child-trees have already been initialized using IncrInit(INCRINIT_TASK). // In this case vdbePmaReaderNext() is called on all child PmaReaders and // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98719:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb // eMode is always INCRINIT_NORMAL in single-threaded mode rc = vdbeMergeEngineInit(tls, pTask, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, eMode) // Set up the required files for pIncr. A multi-theaded IncrMerge object // requires two temp files to itself, whereas a single-threaded object // only requires a region of pTask->file2. if rc == SQLITE_OK { var mxSz int32 = (*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { rc = vdbeSorterOpenTempFile(tls, db, int64(mxSz), pIncr+40) if rc == SQLITE_OK { rc = vdbeSorterOpenTempFile(tls, db, int64(mxSz), pIncr+40+1*16) } } else { if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd == uintptr(0) { rc = vdbeSorterOpenTempFile(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof, pTask+88) (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof = int64(0) } if rc == SQLITE_OK { (*SorterFile)(unsafe.Pointer(pIncr + 40 + 1*16)).FpFd = (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FpFd (*IncrMerger)(unsafe.Pointer(pIncr)).FiStartOff = (*SortSubtask)(unsafe.Pointer(pTask)).Ffile2.FiEof *(*I64)(unsafe.Pointer(pTask + 88 + 8)) += I64(mxSz) } } } if rc == SQLITE_OK && (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { // Use the current thread to populate aFile[1], even though this // PmaReader is multi-threaded. If this is an INCRINIT_TASK object, // then this function is already running in background thread // pIncr->pTask->thread. // // If this is the INCRINIT_ROOT object, then it is running in the // main VDBE thread. But that is Ok, as that thread cannot return // control to the VDBE or proceed with anything useful until the // first results are ready from this merger object anyway. rc = vdbeIncrPopulate(tls, pIncr) } if rc == SQLITE_OK && (SQLITE_MAX_WORKER_THREADS == 0 || eMode != INCRINIT_TASK) { rc = vdbePmaReaderNext(tls, pReadr) } return rc } // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98786:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(int64(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK))) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 return pRet } // If the PmaReader passed as the first argument is not an incremental-reader // (if pReadr->pIncr==0), then this function is a no-op. Otherwise, it invokes // the vdbePmaReaderIncrMergeInit() function with the parameters passed to // this routine to initialize the incremental merge. // // If the IncrMerger object is multi-threaded (IncrMerger.bUseThread==1), // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98807:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { var pCtx uintptr = pReadr rc = vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{vdbePmaReaderBgIncrInit})), pCtx) } else { rc = vdbePmaReaderIncrMergeInit(tls, pReadr, eMode) } } return rc } // Allocate a new MergeEngine object to merge the contents of nPMA level-0 // PMAs from pTask->file. If no error occurs, set *ppOut to point to // the new object and return SQLITE_OK. Or, if an error does occur, set *ppOut // to NULL and return an SQLite error code. // // When this function is called, *piOffset is set to the offset of the // first PMA to read from pTask->file. Assuming no error occurs, it is // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98837:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pNew uintptr // Merge engine to return var iOff I64 = *(*I64)(unsafe.Pointer(piOffset)) var i int32 var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(ppOut)) = libc.AssignUintptr(&pNew, vdbeMergeEngineNew(tls, nPMA)) if pNew == uintptr(0) { rc = SQLITE_NOMEM } for i = 0; i < nPMA && rc == SQLITE_OK; i++ { *(*I64)(unsafe.Pointer(bp /* nDummy */)) = int64(0) var pReadr uintptr = (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr + uintptr(i)*80 rc = vdbePmaReaderInit(tls, pTask, pTask+72, iOff, pReadr, bp) iOff = (*PmaReader)(unsafe.Pointer(pReadr)).FiEof } if rc != SQLITE_OK { vdbeMergeEngineFree(tls, pNew) *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) } *(*I64)(unsafe.Pointer(piOffset)) = iOff return rc } // Return the depth of a tree comprising nPMA PMAs, assuming a fanout of // SORTER_MAX_MERGE_COUNT. The returned value does not include leaf nodes. // // i.e. // // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98876:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { nDiv = nDiv * int64(SORTER_MAX_MERGE_COUNT) nDepth++ } return nDepth } // pRoot is the root of an incremental merge-tree with depth nDepth (according // to vdbeSorterTreeDepth()). pLeaf is the iSeq'th leaf to be added to the // tree, counting from zero. This function adds pLeaf to the tree. // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98894:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK var nDiv int32 = 1 var i int32 var p uintptr = pRoot // var pIncr uintptr at bp, 8 rc = vdbeIncrMergerNew(tls, pTask, pLeaf, bp) for i = 1; i < nDepth; i++ { nDiv = nDiv * SORTER_MAX_MERGE_COUNT } for i = 1; i < nDepth && rc == SQLITE_OK; i++ { var iIter int32 = iSeq / nDiv % SORTER_MAX_MERGE_COUNT var pReadr uintptr = (*MergeEngine)(unsafe.Pointer(p)).FaReadr + uintptr(iIter)*80 if (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr == uintptr(0) { var pNew uintptr = vdbeMergeEngineNew(tls, SORTER_MAX_MERGE_COUNT) if pNew == uintptr(0) { rc = SQLITE_NOMEM } else { rc = vdbeIncrMergerNew(tls, pTask, pNew, pReadr+72) } } if rc == SQLITE_OK { p = (*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReadr)).FpIncr)).FpMerger nDiv = nDiv / SORTER_MAX_MERGE_COUNT } } if rc == SQLITE_OK { (*PmaReader)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(p)).FaReadr + uintptr(iSeq%SORTER_MAX_MERGE_COUNT)*80)).FpIncr = *(*uintptr)(unsafe.Pointer(bp /* pIncr */)) } else { vdbeIncrFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pIncr */))) } return rc } // This function is called as part of a SorterRewind() operation on a sorter // that has already written two or more level-0 PMAs to one or more temp // files. It builds a tree of MergeEngine/IncrMerger/PmaReader objects that // can be used to incrementally merge all PMAs on disk. // // If successful, SQLITE_OK is returned and *ppOut set to point to the // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:98950:12: */ bp := tls.Alloc(24) defer tls.Free(24) var pMain uintptr = uintptr(0) var rc int32 = SQLITE_OK var iTask int32 // If the sorter uses more than one task, then create the top-level // MergeEngine here. This MergeEngine will read data from exactly // one PmaReader per sub-task. if int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask) > 1 { pMain = vdbeMergeEngineNew(tls, int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)) if pMain == uintptr(0) { rc = SQLITE_NOMEM } } for iTask = 0; rc == SQLITE_OK && iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); iTask++ { var pTask uintptr = pSorter + 96 + uintptr(iTask)*104 if SQLITE_MAX_WORKER_THREADS == 0 || (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA != 0 { *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) = uintptr(0) // Root node of tree for this task var nDepth int32 = vdbeSorterTreeDepth(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA) *(*I64)(unsafe.Pointer(bp /* iReadOff */)) = int64(0) if (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA <= SORTER_MAX_MERGE_COUNT { rc = vdbeMergeEngineLevel0(tls, pTask, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA, bp, bp+8) } else { var i int32 var iSeq int32 = 0 *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) = vdbeMergeEngineNew(tls, SORTER_MAX_MERGE_COUNT) if *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) { rc = SQLITE_NOMEM } for i = 0; i < (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA && rc == SQLITE_OK; i = i + SORTER_MAX_MERGE_COUNT { *(*uintptr)(unsafe.Pointer(bp + 16 /* pMerger */)) = uintptr(0) // New level-0 PMA merger var nReader int32 // Number of level-0 PMAs to merge nReader = func() int32 { if (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA-i < SORTER_MAX_MERGE_COUNT { return (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA - i } return SORTER_MAX_MERGE_COUNT }() rc = vdbeMergeEngineLevel0(tls, pTask, nReader, bp, bp+16) if rc == SQLITE_OK { rc = vdbeSorterAddToTree(tls, pTask, nDepth, libc.PostIncInt32(&iSeq, 1), *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pMerger */))) } } } if rc == SQLITE_OK { if pMain != uintptr(0) { rc = vdbeIncrMergerNew(tls, pTask, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)), (*MergeEngine)(unsafe.Pointer(pMain)).FaReadr+uintptr(iTask)*80+72) } else { pMain = *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)) } } else { vdbeMergeEngineFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */))) } } } if rc != SQLITE_OK { vdbeMergeEngineFree(tls, pMain) pMain = uintptr(0) } *(*uintptr)(unsafe.Pointer(ppOut)) = pMain return rc } // This function is called as part of an sqlite3VdbeSorterRewind() operation // on a sorter that has written two or more PMAs to temporary files. It sets // up either VdbeSorter.pMerger (for single threaded sorters) or pReader // (for multi-threaded sorters) so that it can be used to iterate through // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99029:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // Return code var pTask0 uintptr = pSorter + 96 *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) var db uintptr = (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask0)).FpSorter)).Fdb var i int32 var xCompare SorterCompare = vdbeSorterGetCompare(tls, pSorter) for i = 0; i < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); i++ { (*SortSubtask)(unsafe.Pointer(pSorter + 96 + uintptr(i)*104)).FxCompare = xCompare } rc = vdbeSorterMergeTreeBuild(tls, pSorter, bp) if rc == SQLITE_OK { if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { var iTask int32 var pReadr uintptr = uintptr(0) var pLast uintptr = pSorter + 96 + uintptr(int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)-1)*104 rc = vdbeSortAllocUnpacked(tls, pLast) if rc == SQLITE_OK { pReadr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(PmaReader{}))) (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader = pReadr if pReadr == uintptr(0) { rc = SQLITE_NOMEM } } if rc == SQLITE_OK { rc = vdbeIncrMergerNew(tls, pLast, *(*uintptr)(unsafe.Pointer(bp /* pMain */)), pReadr+72) if rc == SQLITE_OK { vdbeIncrMergerSetThreads(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr) for iTask = 0; iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask)-1; iTask++ { var pIncr uintptr if libc.AssignUintptr(&pIncr, (*PmaReader)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaReadr+uintptr(iTask)*80)).FpIncr) != 0 { vdbeIncrMergerSetThreads(tls, pIncr) } } for iTask = 0; rc == SQLITE_OK && iTask < int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FnTask); iTask++ { // Check that: // // a) The incremental merge object is configured to use the // right task, and // b) If it is using task (nTask-1), it is configured to run // in single-threaded mode. This is important, as the // root merge (INCRINIT_ROOT) will be using the same task // object. var p uintptr = (*MergeEngine)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaReadr + uintptr(iTask)*80 rc = vdbePmaReaderIncrInit(tls, p, INCRINIT_TASK) } } *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) } if rc == SQLITE_OK { rc = vdbePmaReaderIncrMergeInit(tls, pReadr, INCRINIT_ROOT) } } else { rc = vdbeMergeEngineInit(tls, pTask0, *(*uintptr)(unsafe.Pointer(bp /* pMain */)), INCRINIT_NORMAL) (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger = *(*uintptr)(unsafe.Pointer(bp /* pMain */)) *(*uintptr)(unsafe.Pointer(bp /* pMain */)) = uintptr(0) } } if rc != SQLITE_OK { vdbeMergeEngineFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pMain */))) } return rc } // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99111:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) // If no data has been written to disk, then do not do so now. Instead, // sort the VdbeSorter.pRecord list. The vdbe layer will read data directly // from the in-memory list. if int32((*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA) == 0 { if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { *(*int32)(unsafe.Pointer(pbEof)) = 0 rc = vdbeSorterSort(tls, pSorter+96, pSorter+56) } else { *(*int32)(unsafe.Pointer(pbEof)) = 1 } return rc } // Write the current in-memory list to a PMA. When the VdbeSorterWrite() // function flushes the contents of memory to disk, it immediately always // creates a new list consisting of a single key immediately afterwards. // So the list is never empty at this point. rc = vdbeSorterFlushPMA(tls, pSorter) // Join all threads rc = vdbeSorterJoinAll(tls, pSorter, rc) // Assuming no errors have occurred, set up a merger structure to // incrementally read and merge all remaining PMAs. if rc == SQLITE_OK { rc = vdbeSorterSetupMerge(tls, pSorter) *(*int32)(unsafe.Pointer(pbEof)) = 0 } return rc } // Advance to the next element in the sorter. Return value: // // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99163:20: */ bp := tls.Alloc(4) defer tls.Free(4) var pSorter uintptr var rc int32 // Return code pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { rc = vdbePmaReaderNext(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader) if rc == SQLITE_OK && (*PmaReader)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader)).FpFd == uintptr(0) { rc = SQLITE_DONE } } else { *(*int32)(unsafe.Pointer(bp /* res */)) = 0 rc = vdbeMergeEngineStep(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger, bp) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { rc = SQLITE_DONE } } } else { var pFree uintptr = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList = *(*uintptr)(unsafe.Pointer(pFree + 8)) *(*uintptr)(unsafe.Pointer(pFree + 8)) = uintptr(0) if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FaMemory == uintptr(0) { vdbeSorterRecordFree(tls, db, pFree) } if (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList != 0 { rc = SQLITE_OK } else { rc = SQLITE_DONE } } return rc } // Return a pointer to a buffer owned by the sorter that contains the // current key. func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99201:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { pReader = (*VdbeSorter)(unsafe.Pointer(pSorter)).FpReader } else { pReader = (*MergeEngine)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger)).FaReadr + uintptr(*(*int32)(unsafe.Pointer((*MergeEngine)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger)).FaTree + 1*4)))*80 } *(*int32)(unsafe.Pointer(pnKey)) = (*PmaReader)(unsafe.Pointer(pReader)).FnKey pKey = (*PmaReader)(unsafe.Pointer(pReader)).FaKey } else { *(*int32)(unsafe.Pointer(pnKey)) = (*SorterRecord)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList)).FnVal pKey = (*VdbeSorter)(unsafe.Pointer(pSorter)).Flist.FpList + uintptr(1)*16 } return pKey } // Copy the current sorter key into the memory cell pOut. func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99228:20: */ bp := tls.Alloc(4) defer tls.Free(4) var pSorter uintptr var pKey uintptr // var nKey int32 at bp, 4 // Sorter key to copy into pOut pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) pKey = vdbeSorterRowkey(tls, pSorter, bp) if Xsqlite3VdbeMemClearAndResize(tls, pOut, *(*int32)(unsafe.Pointer(bp))) != 0 { return SQLITE_NOMEM } (*Mem)(unsafe.Pointer(pOut)).Fn = *(*int32)(unsafe.Pointer(bp /* nKey */)) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Blob) libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pOut)).Fz, pKey, uint64(*(*int32)(unsafe.Pointer(bp /* nKey */)))) return SQLITE_OK } // Compare the key in memory cell pVal with the key that the sorter cursor // passed as the first argument currently points to. For the purposes of // the comparison, ignore the rowid field at the end of each record. // // If the sorter cursor key contains any NULL values, consider it to be // less than pVal. Even if pVal also contains NULL values. // // If an error occurs, return an SQLite error code (i.e. SQLITE_NOMEM). // Otherwise, set *pRes to a negative, zero or positive value if the // key in pVal is smaller than, equal to or larger than the current sorter // key. // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99261:20: */ bp := tls.Alloc(4) defer tls.Free(4) var pSorter uintptr var r2 uintptr var pKeyInfo uintptr var i int32 var pKey uintptr // var nKey int32 at bp, 4 // Sorter key to compare pVal with pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 48)) r2 = (*VdbeSorter)(unsafe.Pointer(pSorter)).FpUnpacked pKeyInfo = (*VdbeCursor)(unsafe.Pointer(pCsr)).FpKeyInfo if r2 == uintptr(0) { r2 = libc.AssignPtrUintptr(pSorter+48, Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo)) if r2 == uintptr(0) { return SQLITE_NOMEM } (*UnpackedRecord)(unsafe.Pointer(r2)).FnField = U16(nKeyCol) } pKey = vdbeSorterRowkey(tls, pSorter, bp) Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, *(*int32)(unsafe.Pointer(bp /* nKey */)), pKey, r2) for i = 0; i < nKeyCol; i++ { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(r2)).FaMem+uintptr(i)*56)).Fflags)&MEM_Null != 0 { *(*int32)(unsafe.Pointer(pRes)) = -1 return SQLITE_OK } } *(*int32)(unsafe.Pointer(pRes)) = Xsqlite3VdbeRecordCompare(tls, (*Mem)(unsafe.Pointer(pVal)).Fn, (*Mem)(unsafe.Pointer(pVal)).Fz, r2) return SQLITE_OK } //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** // 2020-03-23 // // 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 virtual-tables for examining the bytecode content // of a prepared statement. // #include "sqliteInt.h" //************* End of vdbevtab.c ******************************************* //************* Begin file memjournal.c ************************************* // 2008 October 7 // // 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 code use to implement an in-memory rollback journal. // The in-memory rollback journal is used to journal transactions for // ":memory:" databases and when the journal_mode=MEMORY pragma is used. // // Update: The in-memory journal is also used to temporarily cache // smaller journals that are not critical for power-loss recovery. // For example, statement journals that are not too big will be held // entirely in memory, thus reducing the number of file I/O calls, and // more importantly, reducing temporary file creation events. If these // journals become too large for memory, they are spilled to disk. But // in the common case, they are usually small and no file I/O needs to // occur. // #include "sqliteInt.h" // Forward references to internal structures type MemJournal1 = struct { FpMethod uintptr FnChunkSize int32 FnSpill int32 FpFirst uintptr Fendpoint FilePoint Freadpoint FilePoint Fflags int32 F__ccgo_pad1 [4]byte FpVfs uintptr FzJournal uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99754:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** // 2020-03-23 // // 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 virtual-tables for examining the bytecode content // of a prepared statement. // #include "sqliteInt.h" //************* End of vdbevtab.c ******************************************* //************* Begin file memjournal.c ************************************* // 2008 October 7 // // 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 code use to implement an in-memory rollback journal. // The in-memory rollback journal is used to journal transactions for // ":memory:" databases and when the journal_mode=MEMORY pragma is used. // // Update: The in-memory journal is also used to temporarily cache // smaller journals that are not critical for power-loss recovery. // For example, statement journals that are not too big will be held // entirely in memory, thus reducing the number of file I/O calls, and // more importantly, reducing temporary file creation events. If these // journals become too large for memory, they are spilled to disk. But // in the common case, they are usually small and no file I/O needs to // occur. // #include "sqliteInt.h" // Forward references to internal structures type MemJournal = MemJournal1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99754:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99754:9 */ type FilePoint = FilePoint1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99755:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99754:9 */ type FileChunk = FileChunk1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99756:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99811:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt var iChunkOffset int32 var pChunk uintptr if Sqlite_int64(iAmt)+iOfst > (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { return SQLITE_IOERR | int32(2)<<8 } if (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset != iOfst || iOfst == int64(0) { var iOff Sqlite3_int64 = int64(0) for pChunk = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pChunk != 0 && iOff+Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) <= iOfst; pChunk = (*FileChunk)(unsafe.Pointer(pChunk)).FpNext { iOff = iOff + Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) } } else { pChunk = (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk } iChunkOffset = int32(iOfst % Sqlite_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)) for __ccgo := true; __ccgo; __ccgo = nRead >= 0 && libc.AssignUintptr(&pChunk, (*FileChunk)(unsafe.Pointer(pChunk)).FpNext) != uintptr(0) && nRead > 0 { var iSpace int32 = (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset var nCopy int32 = func() int32 { if nRead < (*MemJournal)(unsafe.Pointer(p)).FnChunkSize-iChunkOffset { return nRead } return (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset }() libc.Xmemcpy(tls, zOut, pChunk+8+uintptr(iChunkOffset), uint64(nCopy)) zOut += uintptr(nCopy) nRead = nRead - iSpace iChunkOffset = 0 } (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = func() int64 { if pChunk != 0 { return iOfst + Sqlite_int64(iAmt) } return int64(0) }() (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = pChunk return SQLITE_OK } // Free the list of FileChunk structures headed at MemJournal.pFirst. func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99858:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { pNext = (*FileChunk)(unsafe.Pointer(pIter)).FpNext Xsqlite3_free(tls, pIter) } } // Flush the contents of memory to a real file on disk. func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99870:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemJournal{}))) rc = Xsqlite3OsOpen(tls, copy.FpVfs, copy.FzJournal, pReal, copy.Fflags, uintptr(0)) if rc == SQLITE_OK { var nChunk int32 = copy.FnChunkSize var iOff I64 = int64(0) var pIter uintptr for pIter = copy.FpFirst; pIter != 0; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { if iOff+I64(nChunk) > copy.Fendpoint.FiOffset { nChunk = int32(copy.Fendpoint.FiOffset - iOff) } rc = Xsqlite3OsWrite(tls, pReal, pIter+8 /* &.zChunk */, nChunk, iOff) if rc != 0 { break } iOff = iOff + I64(nChunk) } if rc == SQLITE_OK { // No error has occurred. Free the in-memory buffers. memjrnlFreeChunks(tls, copy.FpFirst) } } if rc != SQLITE_OK { // If an error occurred while creating or writing to the file, restore // the original before returning. This way, SQLite uses the in-memory // journal data to roll back changes made to the internal page-cache // before this function was called. Xsqlite3OsClose(tls, pReal) *(*MemJournal)(unsafe.Pointer(p)) = copy } return rc } // Write data to the file. func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99912:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf // If the file should be created now, create it and write the new data // into the file on disk. if (*MemJournal)(unsafe.Pointer(p)).FnSpill > 0 && Sqlite_int64(iAmt)+iOfst > Sqlite_int64((*MemJournal)(unsafe.Pointer(p)).FnSpill) { var rc int32 = memjrnlCreateFile(tls, p) if rc == SQLITE_OK { rc = Xsqlite3OsWrite(tls, pJfd, zBuf, iAmt, iOfst) } return rc } else { // An in-memory journal file should only ever be appended to. Random // access writes are not required. The only exception to this is when // the in-memory journal is being used by a connection using the // atomic-write optimization. In this case the first 28 bytes of the // journal file may be written as part of committing the transaction. if iOfst > int64(0) && iOfst != (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { memjrnlTruncate(tls, pJfd, iOfst) } if iOfst == int64(0) && (*MemJournal)(unsafe.Pointer(p)).FpFirst != 0 { libc.Xmemcpy(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst+8 /* &.zChunk */, zBuf, uint64(iAmt)) } else { for nWrite > 0 { var pChunk uintptr = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk var iChunkOffset int32 = int32((*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset % Sqlite3_int64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize)) var iSpace int32 = func() int32 { if nWrite < (*MemJournal)(unsafe.Pointer(p)).FnChunkSize-iChunkOffset { return nWrite } return (*MemJournal)(unsafe.Pointer(p)).FnChunkSize - iChunkOffset }() if iChunkOffset == 0 { // New chunk is required to extend the file. var pNew uintptr = Xsqlite3_malloc(tls, int32(uint64(unsafe.Sizeof(FileChunk{}))+uint64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize-8))) if !(pNew != 0) { return SQLITE_IOERR | int32(12)<<8 } (*FileChunk)(unsafe.Pointer(pNew)).FpNext = uintptr(0) if pChunk != 0 { (*FileChunk)(unsafe.Pointer(pChunk)).FpNext = pNew } else { (*MemJournal)(unsafe.Pointer(p)).FpFirst = pNew } pChunk = libc.AssignPtrUintptr(p+24+8, pNew) } libc.Xmemcpy(tls, pChunk+8+uintptr(iChunkOffset), zWrite, uint64(iSpace)) zWrite += uintptr(iSpace) nWrite = nWrite - iSpace *(*Sqlite3_int64)(unsafe.Pointer(p + 24)) += Sqlite3_int64(iSpace) } } } return SQLITE_OK } // Truncate the in-memory file. func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:99985:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { var pIter uintptr = uintptr(0) if size == int64(0) { memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) (*MemJournal)(unsafe.Pointer(p)).FpFirst = uintptr(0) } else { var iOff I64 = I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pIter != 0 && iOff < size; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { iOff = iOff + I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) } if pIter != 0 { memjrnlFreeChunks(tls, (*FileChunk)(unsafe.Pointer(pIter)).FpNext) (*FileChunk)(unsafe.Pointer(pIter)).FpNext = uintptr(0) } } (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FpChunk = pIter (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset = size (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FpChunk = uintptr(0) (*MemJournal)(unsafe.Pointer(p)).Freadpoint.FiOffset = int64(0) } return SQLITE_OK } // Close the file. func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100015:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK } // Sync the file. // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100027:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100035:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK } // Table of methods for MemJournal sqlite3_file object. var sMemJournalMethods = sqlite3_io_methods{ FiVersion: 1, // iVersion FxClose: 0, // xClose FxRead: 0, // xRead FxWrite: 0, // xWrite FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100044:40 */ // Open a journal file. // // The behaviour of the journal file depends on the value of parameter // nSpill. If nSpill is 0, then the journal file is always create and // accessed using the underlying VFS. If nSpill is less than zero, then // all content is always stored in main-memory. Finally, if nSpill is a // positive value, then the journal file is initially created in-memory // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100078:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize // it using the sqlite3OsOpen() function of the underlying VFS. In this // case none of the code in this module is executed as a result of calls // made on the journal file-handle. libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(MemJournal{}))) if nSpill == 0 { return Xsqlite3OsOpen(tls, pVfs, zName, pJfd, flags, uintptr(0)) } if nSpill > 0 { (*MemJournal)(unsafe.Pointer(p)).FnChunkSize = nSpill } else { (*MemJournal)(unsafe.Pointer(p)).FnChunkSize = int32(uint64(8+MEMJOURNAL_DFLT_FILECHUNKSIZE) - uint64(unsafe.Sizeof(FileChunk{}))) } (*Sqlite3_file)(unsafe.Pointer(pJfd)).FpMethods = uintptr(unsafe.Pointer(&sMemJournalMethods)) (*MemJournal)(unsafe.Pointer(p)).FnSpill = nSpill (*MemJournal)(unsafe.Pointer(p)).Fflags = flags (*MemJournal)(unsafe.Pointer(p)).FzJournal = zName (*MemJournal)(unsafe.Pointer(p)).FpVfs = pVfs return SQLITE_OK } // Open an in-memory journal file. func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100114:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100153:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100161:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile } return int32(unsafe.Sizeof(MemJournal{})) }() } //************* End of memjournal.c ***************************************** //************* Begin file walker.c ***************************************** // 2008 August 16 // // 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 routines used for walking the parser tree for // an SQL statement. // #include "sqliteInt.h" // #include <stdlib.h> // #include <string.h> // Walk all expressions linked into the list of Window objects passed // as the second argument. func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100191:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 rc = Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) if rc != 0 { return WRC_Abort } rc = Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpPartition) if rc != 0 { return WRC_Abort } rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpFilter) if rc != 0 { return WRC_Abort } rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpStart) if rc != 0 { return WRC_Abort } rc = Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpEnd) if rc != 0 { return WRC_Abort } if bOneOnly != 0 { break } } return WRC_Continue } // Walk an expression tree. Invoke the callback once for each node // of the expression, while descending. (In other words, the callback // is invoked before visiting children.) // // The return value from the callback should be one of the WRC_* // constants to specify how to proceed with the walk. // // WRC_Continue Continue descending down the tree. // // WRC_Prune Do not descend into child nodes, but allow // the walk to continue with sibling nodes. // // WRC_Abort Do no more callbacks. Unwind the stack and // return from the top-level walk call. // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100230:28: */ var rc int32 for 1 != 0 { rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxExprCallback})).f(tls, pWalker, pExpr) if rc != 0 { return rc & WRC_Abort } if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { if (*Expr)(unsafe.Pointer(pExpr)).FpLeft != 0 && walkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0 { return WRC_Abort } if (*Expr)(unsafe.Pointer(pExpr)).FpRight != 0 { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpRight continue } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { if Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0 { return WRC_Abort } } else { if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != 0 { if Xsqlite3WalkExprList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0 { return WRC_Abort } } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { if walkWindowList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 64)), 1) != 0 { return WRC_Abort } } } } break } return WRC_Continue } func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100262:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } return WRC_Continue } // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100270:20: */ var i int32 var pItem uintptr if p != 0 { i = (*ExprList)(unsafe.Pointer(p)).FnExpr pItem = p + 8 /* &.a */ __1: if !(i > 0) { goto __3 } { if Xsqlite3WalkExpr(tls, pWalker, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) != 0 { return WRC_Abort } } goto __2 __2: i-- pItem += 32 goto __1 goto __3 __3: } return WRC_Continue } // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100285:21: */ _ = pWalker _ = p // No-op } // Walk all expressions associated with SELECT statement p. Do // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100297:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpWhere) != 0 { return WRC_Abort } if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpGroupBy) != 0 { return WRC_Abort } if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { return WRC_Abort } if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpOrderBy) != 0 { return WRC_Abort } if Xsqlite3WalkExpr(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 { return WRC_Abort } if (*Select)(unsafe.Pointer(p)).FpWinDefn != 0 { var pParse uintptr if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3WalkWinDefnDummyCallback})) || libc.AssignUintptr(&pParse, (*Walker)(unsafe.Pointer(pWalker)).FpParse) != uintptr(0) && int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME || (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3SelectPopWith})) { // The following may return WRC_Abort if there are unresolvable // symbols (e.g. a table that does not exist) in a window definition. var rc int32 = walkWindowList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpWinDefn, 0) return rc } } return WRC_Continue } // Walk the parse trees associated with all subqueries in the // FROM clause of SELECT statement p. Do not invoke the select // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100330:20: */ var pSrc uintptr var i int32 var pItem uintptr pSrc = (*Select)(unsafe.Pointer(p)).FpSrc if pSrc != 0 { i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc pItem = pSrc + 8 /* &.a */ __1: if !(i > 0) { goto __3 } { if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect) != 0 { return WRC_Abort } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 && Xsqlite3WalkExprList(tls, pWalker, *(*uintptr)(unsafe.Pointer(pItem + 96))) != 0 { return WRC_Abort } } goto __2 __2: i-- pItem += 112 goto __1 goto __3 __3: } return WRC_Continue } // Call sqlite3WalkExpr() for every expression in Select statement p. // Invoke sqlite3WalkSelect() for subqueries in the FROM clause and // on the compound select chain, p->pPrior. // // If it is not NULL, the xSelectCallback() callback is invoked before // the walk of the expressions and FROM clause. The xSelectCallback2() // method is invoked following the walk of the expressions and FROM clause, // but only if both xSelectCallback and xSelectCallback2 are both non-NULL // and if the expressions and FROM clause both return WRC_Continue; // // Return WRC_Continue under normal conditions. Return WRC_Abort if // there is an abort request. // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100368:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue } if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback == uintptr(0) { return WRC_Continue } for __ccgo := true; __ccgo; __ccgo = p != uintptr(0) { rc = (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback})).f(tls, pWalker, p) if rc != 0 { return rc & WRC_Abort } if Xsqlite3WalkSelectExpr(tls, pWalker, p) != 0 || Xsqlite3WalkSelectFrom(tls, pWalker, p) != 0 { return WRC_Abort } if (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2 != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback2})).f(tls, pWalker, p) } p = (*Select)(unsafe.Pointer(p)).FpPrior } return WRC_Continue } // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100391:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100396:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } // No-op routine for the parse-tree walker. // // When this routine is the Walker.xExprCallback then expression trees // are walked without any actions being taken at each node. Presumably, // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100411:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue } // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100420:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue } //************* End of walker.c ********************************************* //************* Begin file resolve.c **************************************** // 2008 August 18 // // 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 routines used for walking the parser tree and // resolve all identifiers by associating them with a particular // table and column. // #include "sqliteInt.h" // Magic table number to mean the EXCLUDED table in an UPSERT statement. // Walk the expression tree pExpr and increase the aggregate function // depth (the Expr.op2 field) by N on every TK_AGG_FUNCTION node. // This needs to occur when copying a TK_AGG_FUNCTION node from an // outer query into an inner subquery. // // incrAggFunctionDepth(pExpr,n) is the main routine. incrAggDepth(..) // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100461:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 40))) } return WRC_Continue } func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100465:13: */ bp := tls.Alloc(48) defer tls.Free(48) if N > 0 { // var w Walker at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{incrAggDepth})) *(*int32)(unsafe.Pointer(bp + 40)) = N Xsqlite3WalkExpr(tls, bp, pExpr) } } // Turn the pExpr expression into an alias for the iCol-th column of the // result set in pEList. // // If the reference is followed by a COLLATE operator, then make sure // the COLLATE operator is preserved. For example: // // SELECT a+b, c+d FROM t1 ORDER BY 1 COLLATE nocase; // // Should be transformed into: // // SELECT a+b, c+d FROM t1 ORDER BY (a+b) COLLATE nocase; // // The nSubquery parameter specifies how many levels of subquery the // alias is removed from the original expression. The usual value is // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100494:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(iCol)*32)).FpExpr db = (*Parse)(unsafe.Pointer(pParse)).Fdb pDup = Xsqlite3ExprDup(tls, db, pOrig, 0) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pDup) pDup = uintptr(0) } else { incrAggFunctionDepth(tls, pDup, nSubquery) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE { pDup = Xsqlite3ExprAddCollateString(tls, pParse, pDup, *(*uintptr)(unsafe.Pointer(pExpr + 8))) } // Before calling sqlite3ExprDelete(), set the EP_Static flag. This // prevents ExprDelete() from deleting the Expr structure itself, // allowing it to be repopulated by the memcpy() on the following line. // The pExpr->u.zToken might point into memory that will be freed by the // sqlite3DbFree(db, pDup) on the last line of this block, so be sure to // make a copy of the token before doing the sqlite3DbFree(). *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Static) Xsqlite3ExprDelete(tls, db, pExpr) libc.Xmemcpy(tls, pExpr, pDup, uint64(unsafe.Sizeof(Expr{}))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(pExpr + 8)) != uintptr(0) { *(*uintptr)(unsafe.Pointer(pExpr + 8)) = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(pExpr + 8))) *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_MemToken) } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { if *(*uintptr)(unsafe.Pointer(pExpr + 64)) != uintptr(0) { (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpOwner = pExpr } } Xsqlite3DbFree(tls, db, pDup) } } // Return TRUE if the name zCol occurs anywhere in the USING clause. // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100551:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { if Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pUsing)).Fa+uintptr(k)*16)).FzName, zCol) == 0 { return 1 } } } return 0 } // Subqueries stores the original database, table and column names for their // result sets in ExprList.a[].zSpan, in the form "DATABASE.TABLE.COLUMN". // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100568:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x3>>0) != ENAME_TAB { return 0 } zSpan = (*ExprList_item)(unsafe.Pointer(pItem)).FzEName for n = 0; *(*int8)(unsafe.Pointer(zSpan + uintptr(n))) != 0 && int32(*(*int8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'; n++ { } if zDb != 0 && (Xsqlite3_strnicmp(tls, zSpan, zDb, n) != 0 || int32(*(*int8)(unsafe.Pointer(zDb + uintptr(n)))) != 0) { return 0 } zSpan += uintptr(n + 1) for n = 0; *(*int8)(unsafe.Pointer(zSpan + uintptr(n))) != 0 && int32(*(*int8)(unsafe.Pointer(zSpan + uintptr(n)))) != '.'; n++ { } if zTab != 0 && (Xsqlite3_strnicmp(tls, zSpan, zTab, n) != 0 || int32(*(*int8)(unsafe.Pointer(zTab + uintptr(n)))) != 0) { return 0 } zSpan += uintptr(n + 1) if zCol != 0 && Xsqlite3StrICmp(tls, zSpan, zCol) != 0 { return 0 } return 1 } // Return TRUE if the double-quoted string mis-feature should be supported. func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100597:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas if (*NameContext)(unsafe.Pointer(pTopNC)).FncFlags&NC_IsDDL != 0 { // Currently parsing a DDL statement if Xsqlite3WritableSchema(tls, db) != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDML) != uint64(0) { return 1 } return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDDL) != uint64(0)) } else { // Currently parsing a DML statement return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DqsDML) != uint64(0)) } return int32(0) } // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100615:24: */ var n int32 var pExTab uintptr n = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pExTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if (*Table)(unsafe.Pointer(pExTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pExTab)).FaCol+uintptr(n)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { if int32((*Table)(unsafe.Pointer(pExTab)).FnCol) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { return libc.Uint64(libc.Uint64FromInt32(-1)) } return Bitmask(uint64(1))<<int32((*Table)(unsafe.Pointer(pExTab)).FnCol) - uint64(1) } else { if n >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { n = int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1 } return Bitmask(uint64(1)) << n } return Bitmask(0) } // Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up // that name in the set of source tables in pSrcList and make the pExpr // expression node refer back to that source column. The following changes // are made to pExpr: // // pExpr->iDb Set the index in db->aDb[] of the database X // (even if X is implied). // pExpr->iTable Set to the cursor number for the table obtained // from pSrcList. // pExpr->y.pTab Points to the Table structure of X.Y (even if // X and/or Y are implied.) // pExpr->iColumn Set to the column number within the table. // pExpr->op Set to TK_COLUMN. // pExpr->pLeft Any expression this points to is deleted // pExpr->pRight Any expression this points to is deleted. // // The zDb variable is the name of the database (the "X"). This value may be // NULL meaning that name is of the form Y.Z or Z. Any available database // can be used. The zTable variable is the name of the table (the "Y"). This // value can be NULL if zDb is also NULL. If zTable is NULL it // means that the form of the name is Z and that columns from any table // can be used. // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:100664:12: */ bp := tls.Alloc(96) defer tls.Free(96) var i int32 var j int32 // Loop counters var cnt int32 // Number of matching column names var cntTab int32 // Number of matching table names var nSubquery int32 // How many levels of subquery var db uintptr // The database connection var pItem uintptr // Use for looping over pSrcList items var pMatch uintptr // The matching pSrcList item var pTopNC uintptr // First namecontext in the list var pSchema uintptr // Schema of the expression var eNewExprOp int32 // New value for pExpr->op on success var pTab uintptr // Table hold the row var pCol uintptr var hit int32 var zTabName uintptr var hCol U8 var op int32 var pUpsert uintptr var iCol int32 var hCol1 U8 var pOrig uintptr var zAs uintptr var pEList uintptr var pSrcList uintptr var zErr uintptr cnt = 0 cntTab = 0 nSubquery = 0 db = (*Parse)(unsafe.Pointer(pParse)).Fdb pMatch = uintptr(0) pTopNC = pNC pSchema = uintptr(0) eNewExprOp = TK_COLUMN pTab = uintptr(0) // A column of pTab // the name context cannot be NULL. // The Z in X.Y.Z cannot be NULL // Initialize the node to no-match (*Expr)(unsafe.Pointer(pExpr)).FiTable = -1 // Translate the schema name in zDb into a pointer to the corresponding // schema. If not found, pSchema will remain NULL and nothing will match // resulting in an appropriate error message toward the end of this routine if !(zDb != 0) { goto __1 } if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_PartIdx|NC_IsCheck) != 0) { goto __2 } // Silently ignore database qualifiers inside CHECK constraints and // partial indices. Do not raise errors because that might break // legacy and because it does not hurt anything to just ignore the // database name. zDb = uintptr(0) goto __3 __2: i = 0 __4: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __6 } if !(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName, zDb) == 0) { goto __7 } pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpSchema goto __6 __7: ; goto __5 __5: i++ goto __4 goto __6 __6: ; if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+7684, zDb) == 0) { goto __8 } // This branch is taken when the main database has been renamed // using SQLITE_DBCONFIG_MAINDBNAME. pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName __8: ; __3: ; __1: ; // Start at the inner-most context and move outward until a match is found __9: pSrcList = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList if !(pSrcList != 0) { goto __12 } i = 0 pItem = pSrcList + 8 /* &.a */ __13: if !(i < (*SrcList)(unsafe.Pointer(pSrcList)).FnSrc) { goto __15 } pTab = (*SrcItem)(unsafe.Pointer(pItem)).FpTab if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselFlags&U32(SF_NestedFrom) != U32(0)) { goto __16 } hit = 0 pEList = (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FpEList j = 0 __17: if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { goto __19 } if !(Xsqlite3MatchEName(tls, pEList+8+uintptr(j)*32, zCol, zTab, zDb) != 0) { goto __20 } cnt++ cntTab = 2 pMatch = pItem (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(j) hit = 1 __20: ; goto __18 __18: j++ goto __17 goto __19 __19: ; if !(hit != 0 || zTab == uintptr(0)) { goto __21 } goto __14 __21: ; __16: ; if !(zDb != 0) { goto __22 } if !((*Table)(unsafe.Pointer(pTab)).FpSchema != pSchema) { goto __23 } goto __14 __23: ; if !(pSchema == uintptr(0) && libc.Xstrcmp(tls, zDb, ts+7689) != 0) { goto __24 } goto __14 __24: ; __22: ; if !(zTab != 0) { goto __25 } if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { zTabName = (*SrcItem)(unsafe.Pointer(pItem)).FzAlias } else { zTabName = (*Table)(unsafe.Pointer(pTab)).FzName } if !(Xsqlite3StrICmp(tls, zTabName, zTab) != 0) { goto __26 } goto __14 __26: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0) { goto __27 } Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) __27: ; __25: ; hCol = Xsqlite3StrIHash(tls, zCol) j = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol __28: if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __30 } if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { goto __31 } // If there has been exactly one prior match and this match // is for the right-hand table of a NATURAL JOIN or is in a // USING clause, then skip this match. if !(cnt == 1) { goto __32 } if !(int32((*SrcItem)(unsafe.Pointer(pItem)).Ffg.Fjointype)&JT_NATURAL != 0) { goto __33 } goto __29 __33: ; if !(nameInUsingClause(tls, (*SrcItem)(unsafe.Pointer(pItem)).FpUsing, zCol) != 0) { goto __34 } goto __29 __34: ; __32: ; cnt++ pMatch = pItem // Substitute the rowid (column -1) for the INTEGER PRIMARY KEY (*Expr)(unsafe.Pointer(pExpr)).FiColumn = func() int16 { if j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { return int16(-1) } return I16(j) }() goto __30 __31: ; goto __29 __29: j++ pCol += 24 goto __28 goto __30 __30: ; if !(0 == cnt && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { goto __35 } cntTab++ pMatch = pItem __35: ; goto __14 __14: i++ pItem += 112 goto __13 goto __15 __15: ; if !(pMatch != 0) { goto __36 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pMatch)).FiCursor *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*SrcItem)(unsafe.Pointer(pMatch)).FpTab // RIGHT JOIN not (yet) supported if !(int32((*SrcItem)(unsafe.Pointer(pMatch)).Ffg.Fjointype)&JT_LEFT != 0) { goto __37 } *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_CanBeNull) __37: ; pSchema = (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpSchema __36: ; __12: ; // if( pSrcList ) // If we have not already resolved the name, then maybe // it is a new.* or old.* trigger argument reference. Or // maybe it is an excluded.* from an upsert. Or maybe it is // a reference in the RETURNING clause to a table being modified. if !(cnt == 0 && zDb == uintptr(0)) { goto __38 } pTab = uintptr(0) if !((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != uintptr(0)) { goto __39 } op = int32((*Parse)(unsafe.Pointer(pParse)).FeTriggerOp) if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { goto __40 } if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UBaseReg != 0 && (zTab == uintptr(0) || Xsqlite3StrICmp(tls, zTab, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab)).FzName) == 0)) { goto __42 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.Bool32(op != TK_DELETE) pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab __42: ; goto __41 __40: if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+7691, zTab) == 0) { goto __43 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __44 __43: if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+7695, zTab) == 0) { goto __45 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab __45: ; __44: ; __41: ; __39: ; if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UUpsert != 0 && zTab != uintptr(0)) { goto __46 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 16)) if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+7699, zTab) == 0) { goto __47 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab (*Expr)(unsafe.Pointer(pExpr)).FiTable = EXCLUDED_TABLE_NUMBER __47: ; __46: ; if !(pTab != 0) { goto __48 } hCol1 = Xsqlite3StrIHash(tls, zCol) pSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema cntTab++ iCol = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol __49: if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __51 } if !(int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(hCol1) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0) { goto __52 } if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { goto __53 } iCol = -1 __53: ; goto __51 __52: ; goto __50 __50: iCol++ pCol += 24 goto __49 goto __51 __51: ; if !(iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) && Xsqlite3IsRowid(tls, zCol) != 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { goto __54 } // IMP: R-51414-32910 iCol = -1 __54: ; if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __55 } cnt++ pMatch = uintptr(0) if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == EXCLUDED_TABLE_NUMBER) { goto __56 } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __58 } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = YnVar(iCol) *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab eNewExprOp = TK_COLUMN goto __59 __58: (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*Upsert)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNC + 16)))).FregData + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) eNewExprOp = TK_REGISTER __59: ; goto __57 __56: ; *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab if !((*Parse)(unsafe.Pointer(pParse)).FbReturning != 0) { goto __60 } eNewExprOp = TK_REGISTER (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8(TK_COLUMN) (*Expr)(unsafe.Pointer(pExpr)).FiTable = *(*int32)(unsafe.Pointer(pNC + 16)) + (int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)*(*Expr)(unsafe.Pointer(pExpr)).FiTable + int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) + 1 goto __61 __60: (*Expr)(unsafe.Pointer(pExpr)).FiColumn = I16(iCol) eNewExprOp = TK_TRIGGER if !(iCol < 0) { goto __62 } (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) goto __63 __62: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable == 0) { goto __64 } *(*U32)(unsafe.Pointer(pParse + 204)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } return U32(U32(1)) << iCol }() goto __65 __64: ; *(*U32)(unsafe.Pointer(pParse + 208)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } return U32(U32(1)) << iCol }() __65: ; __63: ; __61: ; __57: ; __55: ; __48: ; __38: ; // Perhaps the name is a reference to the ROWID if !(cnt == 0 && cntTab == 1 && pMatch != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) == 0 && Xsqlite3IsRowid(tls, zCol) != 0 && (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pMatch)).FpTab)).FtabFlags&U32(TF_NoVisibleRowid) == U32(0)) { goto __66 } cnt = 1 (*Expr)(unsafe.Pointer(pExpr)).FiColumn = int16(-1) (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) __66: ; // If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z // might refer to an result-set alias. This happens, for example, when // we are resolving names in the WHERE clause of the following command: // // SELECT a+b AS x FROM table WHERE x<10; // // In cases like this, replace pExpr with a copy of the expression that // forms the result set entry ("a+b" in the example) and return immediately. // Note that the expression in the result set should have already been // resolved by the time the WHERE clause is resolved. // // The ability to use an output result-set column in the WHERE, GROUP BY, // or HAVING clauses, or as part of a larger expression in the ORDER BY // clause is not standard SQL. This is a (goofy) SQLite extension, that // is supported for backwards compatibility only. Hence, we issue a warning // on sqlite3_log() whenever the capability is used. if !(cnt == 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_UEList != 0 && zTab == uintptr(0)) { goto __67 } pEList = *(*uintptr)(unsafe.Pointer(pNC + 16)) j = 0 __68: if !(j < (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { goto __70 } zAs = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FzEName if !(int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(j)*32 + 20))&0x3>>0) == ENAME_NAME && Xsqlite3_stricmp(tls, zAs, zCol) == 0) { goto __71 } pOrig = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(j)*32)).FpExpr if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __72 } Xsqlite3ErrorMsg(tls, pParse, ts+7708, libc.VaList(bp, zAs)) return WRC_Abort __72: ; if !((*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Win) != U32(0) && ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __73 } Xsqlite3ErrorMsg(tls, pParse, ts+7739, libc.VaList(bp+8, zAs)) return WRC_Abort __73: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __74 } Xsqlite3ErrorMsg(tls, pParse, ts+7776, 0) return WRC_Abort __74: ; resolveAlias(tls, pParse, pEList, j, pExpr, nSubquery) cnt = 1 pMatch = uintptr(0) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __75 } Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) __75: ; goto lookupname_end __71: ; goto __69 __69: j++ goto __68 goto __70 __70: ; __67: ; // Advance to the next name context. The loop will exit when either // we have a match (cnt>0) or when we run out of name contexts. if !(cnt != 0) { goto __76 } goto __11 __76: ; pNC = (*NameContext)(unsafe.Pointer(pNC)).FpNext nSubquery++ goto __10 __10: if pNC != 0 { goto __9 } goto __11 __11: ; // If X and Y are NULL (in other words if only the column name Z is // supplied) and the value of Z is enclosed in double-quotes, then // Z is a string literal if it doesn't match any column names. In that // case, we need to return right away and not make any changes to // pExpr. // // Because no reference was made to outer contexts, the pNC->nRef // fields are not changed in any context. if !(cnt == 0 && zTab == uintptr(0)) { goto __77 } if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != U32(0) && areDoubleQuotedStringsEnabled(tls, db, pTopNC) != 0) { goto __78 } // If a double-quoted identifier does not match any known column name, // then treat it as a string. // // This hack was added in the early days of SQLite in a misguided attempt // to be compatible with MySQL 3.x, which used double-quotes for strings. // I now sorely regret putting in this hack. The effect of this hack is // that misspelled identifier names are silently converted into strings // rather than causing an error, to the frustration of countless // programmers. To all those frustrated programmers, my apologies. // // Someday, I hope to get rid of this hack. Unfortunately there is // a huge amount of legacy SQL that uses it. So for now, we just // issue a warning. Xsqlite3_log(tls, SQLITE_WARNING, ts+7794, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+64, 0, uint64(unsafe.Sizeof(struct{ FpTab uintptr }{}))) return WRC_Prune __78: ; if !(Xsqlite3ExprIdToTrueFalse(tls, pExpr) != 0) { goto __79 } return WRC_Prune __79: ; __77: ; // cnt==0 means there was not match. cnt>1 means there were two or // more matches. Either way, we have an error. if !(cnt != 1) { goto __80 } if cnt == 0 { zErr = ts + 7829 /* "no such column" */ } else { zErr = ts + 7844 /* "ambiguous column..." */ } if !(zDb != 0) { goto __81 } Xsqlite3ErrorMsg(tls, pParse, ts+7866, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __82 __81: if !(zTab != 0) { goto __83 } Xsqlite3ErrorMsg(tls, pParse, ts+7879, libc.VaList(bp+56, zErr, zTab, zCol)) goto __84 __83: Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp+80, zErr, zCol)) __84: ; __82: ; Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) (*NameContext)(unsafe.Pointer(pTopNC)).FnNcErr++ __80: ; // If a column from a table in pSrcList is referenced, then record // this fact in the pSrcList.a[].colUsed bitmask. Column 0 causes // bit 0 to be set. Column 1 sets bit 1. And so forth. Bit 63 is // set if the 63rd or any subsequent column is used. // // The colUsed mask is an optimization used to help determine if an // index is a covering index. The correct answer is still obtained // if the mask contains extra set bits. However, it is important to // avoid setting bits beyond the maximum column number of the table. // (See ticket [b92e5e8ec2cdbaa1]). // // If a generated column is referenced, set bits for every column // of the table. if !(int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 && pMatch != uintptr(0)) { goto __85 } *(*Bitmask)(unsafe.Pointer(pMatch + 88)) |= Xsqlite3ExprColUsed(tls, pExpr) __85: ; // Clean up and return if !!((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { goto __86 } Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpRight) (*Expr)(unsafe.Pointer(pExpr)).FpRight = uintptr(0) __86: ; (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(eNewExprOp) *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Leaf) lookupname_end: if !(cnt == 1) { goto __87 } if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FxAuth != 0 && (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER)) { goto __89 } Xsqlite3AuthRead(tls, pParse, pExpr, pSchema, (*NameContext)(unsafe.Pointer(pNC)).FpSrcList) __89: ; // Increment the nRef value on all name contexts from TopNC up to // the point where the name matched. __90: ; (*NameContext)(unsafe.Pointer(pTopNC)).FnRef++ if !(pTopNC == pNC) { goto __93 } goto __92 __93: ; pTopNC = (*NameContext)(unsafe.Pointer(pTopNC)).FpNext goto __91 __91: goto __90 goto __92 __92: ; return WRC_Prune goto __88 __87: return WRC_Abort __88: ; return int32(0) } // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101110:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*112 var pTab uintptr pTab = libc.AssignPtrUintptr(p+64, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) (*Expr)(unsafe.Pointer(p)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor if int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FiPKey) == iCol { (*Expr)(unsafe.Pointer(p)).FiColumn = int16(-1) } else { (*Expr)(unsafe.Pointer(p)).FiColumn = YnVar(iCol) if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { (*SrcItem)(unsafe.Pointer(pItem)).FcolUsed = func() uint64 { if int32((*Table)(unsafe.Pointer(pTab)).FnCol) >= 64 { return libc.Uint64(libc.Uint64FromInt32(-1)) } return Bitmask(uint64(1))<<int32((*Table)(unsafe.Pointer(pTab)).FnCol) - uint64(1) }() } else { *(*Bitmask)(unsafe.Pointer(pItem + 88)) |= Bitmask(uint64(1)) << func() int32 { if iCol >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) { return int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8)) - 1 } return iCol }() } } } return p } // Report an error that an expression is not valid for some set of // pNC->ncFlags values determined by validMask. // // static void notValid( // Parse *pParse, // Leave error message here // NameContext *pNC, // The name context // const char *zMsg, // Type of error // int validMask, // Set of contexts for which prohibited // Expr *pExpr // Invalidate this expression on error // ){...} // // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr, pError uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101154:13: */ bp := tls.Alloc(16) defer tls.Free(16) var zIn uintptr = ts + 7896 /* "partial index WH..." */ if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { zIn = ts + 7924 /* "index expression..." */ } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { zIn = ts + 7942 /* "CHECK constraint..." */ } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { zIn = ts + 7960 /* "generated column..." */ } Xsqlite3ErrorMsg(tls, pParse, ts+7978, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. func exprProbability(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101182:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*float64)(unsafe.Pointer(bp /* r */)) = -1.0 if int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_FLOAT { return -1 } Xsqlite3AtoF(tls, *(*uintptr)(unsafe.Pointer(p + 8)), bp, Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))), uint8(SQLITE_UTF8)) if *(*float64)(unsafe.Pointer(bp)) > 1.0 { return -1 } return libc.Int32FromFloat64(*(*float64)(unsafe.Pointer(bp)) * 134217728.0) } // This routine is callback for sqlite3WalkExpr(). // // Resolve symbolic names into TK_COLUMN operators for the current // node in the expression tree. Return 0 to continue the search down // the tree or 2 to abort the tree walk. // // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101203:12: */ bp := tls.Alloc(96) defer tls.Free(96) var pNC uintptr var pParse uintptr pNC = *(*uintptr)(unsafe.Pointer(pWalker + 40)) pParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { // The special operator TK_ROW means use the rowid for the first // column in the FROM clause. This is used by the LIMIT and ORDER BY // clause processing on UPDATE and DELETE statements, and by // UPDATE ... FROM statement processing. case TK_ROW: { var pSrcList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList var pItem uintptr pItem = pSrcList + 8 /* &.a */ (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_COLUMN) *(*uintptr)(unsafe.Pointer(pExpr + 64)) = (*SrcItem)(unsafe.Pointer(pItem)).FpTab (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor (*Expr)(unsafe.Pointer(pExpr)).FiColumn-- (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) break } // An optimization: Attempt to convert // // "expr IS NOT NULL" --> "TRUE" // "expr IS NULL" --> "FALSE" // // if we can prove that "expr" is never NULL. Call this the // "NOT NULL strength reduction optimization". // // If this optimization occurs, also restore the NameContext ref-counts // to the state they where in before the "column" LHS expression was // resolved. This prevents "column" from being counted as having been // referenced, which might prevent a SELECT from being erroneously // marked as correlated. case TK_NOTNULL: fallthrough case TK_ISNULL: { // var anRef [8]int32 at bp+64, 32 var p uintptr var i int32 i = 0 p = pNC __1: if !(p != 0 && i < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { goto __3 } { *(*int32)(unsafe.Pointer(bp + 64 + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef } goto __2 __2: p = (*NameContext)(unsafe.Pointer(p)).FpNext i++ goto __1 goto __3 __3: ; Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if 0 == Xsqlite3ExprCanBeNull(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 7998 /* "true" */ *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 8003 /* "false" */ *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) i = 0 p = pNC __4: if !(p != 0 && i < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { goto __6 } { (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 64 + uintptr(i)*4)) } goto __5 __5: p = (*NameContext)(unsafe.Pointer(p)).FpNext i++ goto __4 goto __6 __6: ; Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) (*Expr)(unsafe.Pointer(pExpr)).FpLeft = uintptr(0) } return WRC_Prune } // A column name: ID // Or table name and column name: ID.ID // Or a database, table and column: ID.ID.ID // // The TK_ID and TK_OUT cases are combined so that there will only // be one call to lookupName(). Then the compiler will in-line // lookupName() for a size reduction and performance increase. case TK_ID: fallthrough case TK_DOT: { var zColumn uintptr var zTable uintptr var zDb uintptr var pRight uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_ID { zDb = uintptr(0) zTable = uintptr(0) zColumn = *(*uintptr)(unsafe.Pointer(pExpr + 8)) } else { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { notValidImpl(tls, pParse, pNC, ts+8009, uintptr(0), pExpr) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight if int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_ID { zDb = uintptr(0) } else { zDb = *(*uintptr)(unsafe.Pointer(pLeft + 8)) pLeft = (*Expr)(unsafe.Pointer(pRight)).FpLeft pRight = (*Expr)(unsafe.Pointer(pRight)).FpRight } zTable = *(*uintptr)(unsafe.Pointer(pLeft + 8)) zColumn = *(*uintptr)(unsafe.Pointer(pRight + 8)) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameTokenRemap(tls, pParse, pExpr, pRight) Xsqlite3RenameTokenRemap(tls, pParse, pExpr+64, pLeft) } } return lookupName(tls, pParse, zDb, zTable, zColumn, pNC, pExpr) } // Resolve function names case TK_FUNCTION: { var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) // The argument list var n int32 if pList != 0 { n = (*ExprList)(unsafe.Pointer(pList)).FnExpr } else { n = 0 } // Number of arguments var no_such_func int32 = 0 // True if no such function exists var wrong_num_args int32 = 0 // True if wrong number of arguments var is_agg int32 = 0 // True if is an aggregate function var zId uintptr // The function name. var pDef uintptr // Information about the function var enc U8 = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc // The database encoding var savedAllowFlags int32 = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_AllowAgg | NC_AllowWin) var pWin uintptr = func() uintptr { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) && int32((*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FeFrmType) != TK_FILTER { return *(*uintptr)(unsafe.Pointer(pExpr + 64)) } return uintptr(0) }() zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) pDef = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zId, n, enc, uint8(0)) if pDef == uintptr(0) { pDef = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zId, -2, enc, uint8(0)) if pDef == uintptr(0) { no_such_func = 1 } else { wrong_num_args = 1 } } else { is_agg = libc.Bool32((*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_UNLIKELY) != 0 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Unlikely) if n == 2 { (*Expr)(unsafe.Pointer(pExpr)).FiTable = exprProbability(tls, (*ExprList_item)(unsafe.Pointer(pList+8+1*32)).FpExpr) if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8026, libc.VaList(bp, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { // EVIDENCE-OF: R-61304-29449 The unlikely(X) function is // equivalent to likelihood(X, 0.0625). // EVIDENCE-OF: R-01283-11636 The unlikely(X) function is // short-hand for likelihood(X,0.0625). // EVIDENCE-OF: R-36850-34127 The likely(X) function is short-hand // for likelihood(X,0.9375). // EVIDENCE-OF: R-53436-40973 The likely(X) function is equivalent // to likelihood(X,0.9375). // TUNING: unlikely() probability is 0.0625. likely() is 0.9375 (*Expr)(unsafe.Pointer(pExpr)).FiTable = func() int32 { if int32(*(*int8)(unsafe.Pointer((*FuncDef)(unsafe.Pointer(pDef)).FzName))) == 'u' { return 8388608 } return 125829120 }() } } { var auth int32 = Xsqlite3AuthCheck(tls, pParse, SQLITE_FUNCTION, uintptr(0), (*FuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0)) if auth != SQLITE_OK { if auth == SQLITE_DENY { Xsqlite3ErrorMsg(tls, pParse, ts+8090, libc.VaList(bp+8, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) return WRC_Prune } } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT|SQLITE_FUNC_SLOCHNG) != 0 { // For the purposes of the EP_ConstFunc flag, date and time // functions and other functions that change slowly are considered // constant because they are constant for the duration of one query. // This allows them to be factored out of inner loops. *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_ConstFunc) } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CONSTANT) == U32(0) { // Clearly non-deterministic functions like random(), but also // date/time functions that use 'now', and other functions like // sqlite_version() that might change over time cannot be used // in an index or generated column. Curiously, they can be used // in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all // all this. if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { notValidImpl(tls, pParse, pNC, ts+8126, uintptr(0), pExpr) } } else { // Must fit in 8 bits (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_SelfRef) if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_FromDDL != 0 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) } } if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INTERNAL) != U32(0) && int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&U32(DBFLAG_InternalFunc) == U32(0) { // Internal-use-only functions are disallowed unless the // SQL is being compiled using sqlite3NestedParse() or // the SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test-control has be // used to activate internal functions for testing purposes no_such_func = 1 pDef = uintptr(0) } else if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) != U32(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) } } if 0 == libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { if pDef != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8154, libc.VaList(bp+16, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 || is_agg != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || is_agg != 0 && pWin != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 { var zType uintptr if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 { zType = ts + 8197 /* "window" */ } else { zType = ts + 8204 /* "aggregate" */ } Xsqlite3ErrorMsg(tls, pParse, ts+8214, libc.VaList(bp+24, zType, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ is_agg = 0 } else if no_such_func != 0 && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8242, libc.VaList(bp+40, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8264, libc.VaList(bp+48, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg == 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, ts+8308, libc.VaList(bp+56, pExpr)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } if is_agg != 0 { // Window functions may not be arguments of aggregate functions. // Or arguments of other window functions. But aggregate functions // may be arguments for window functions. *(*int32)(unsafe.Pointer(pNC + 40)) &= ^(NC_AllowWin | func() int32 { if !(pWin != 0) { return NC_AllowAgg } return 0 }()) } } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { is_agg = 1 } Xsqlite3WalkExprList(tls, pWalker, pList) if is_agg != 0 { if pWin != 0 { var pSel uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpWinSelect if libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) == 0 { Xsqlite3WindowUpdate(tls, pParse, func() uintptr { if pSel != 0 { return (*Select)(unsafe.Pointer(pSel)).FpWinDefn } return uintptr(0) }(), pWin, pDef) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { break } } Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpPartition) Xsqlite3WalkExprList(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(pWin)).FpFilter) Xsqlite3WindowLink(tls, pSel, pWin) *(*int32)(unsafe.Pointer(pNC + 40)) |= NC_HasWin } else { var pNC2 uintptr // For looping up thru outer contexts (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_FUNCTION) (*Expr)(unsafe.Pointer(pExpr)).Fop2 = U8(0) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, pWalker, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) } pNC2 = pNC for pNC2 != 0 && Xsqlite3ReferencesSrcList(tls, pParse, pExpr, (*NameContext)(unsafe.Pointer(pNC2)).FpSrcList) == 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ pNC2 = (*NameContext)(unsafe.Pointer(pNC2)).FpNext } if pNC2 != 0 && pDef != 0 { *(*int32)(unsafe.Pointer(pNC2 + 40)) |= int32(U32(NC_HasAgg) | ((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags^U32(SQLITE_FUNC_ANYORDER))& U32(SQLITE_FUNC_MINMAX|SQLITE_FUNC_ANYORDER)) } } *(*int32)(unsafe.Pointer(pNC + 40)) |= savedAllowFlags } // FIX ME: Compute pExpr->affinity based on the expected return // type of the function return WRC_Prune } case TK_SELECT: fallthrough case TK_EXISTS: fallthrough case TK_IN: { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { notValidImpl(tls, pParse, pNC, ts+8356, pExpr, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } if nRef != (*NameContext)(unsafe.Pointer(pNC)).FnRef { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_VarSelect) *(*int32)(unsafe.Pointer(pNC + 40)) |= NC_VarSelect } } break } case TK_VARIABLE: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { notValidImpl(tls, pParse, pNC, ts+8367, pExpr, pExpr) } break } case TK_IS: fallthrough case TK_ISNOT: { var pRight uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) // Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE", // and "x IS NOT FALSE". if pRight != 0 && (int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_ID || int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_TRUEFALSE) { var rc int32 = resolveExprStep(tls, pWalker, pRight) if rc == WRC_Abort { return WRC_Abort } if int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_TRUEFALSE { (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUTH) return WRC_Continue } } } fallthrough case TK_BETWEEN: fallthrough case TK_EQ: fallthrough case TK_NE: fallthrough case TK_LT: fallthrough case TK_LE: fallthrough case TK_GT: fallthrough case TK_GE: { var nLeft int32 var nRight int32 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { break } nLeft = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_BETWEEN { nRight = Xsqlite3ExprVectorSize(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) if nRight == nLeft { nRight = Xsqlite3ExprVectorSize(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8+1*32)).FpExpr) } } else { nRight = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } if nLeft != nRight { Xsqlite3ErrorMsg(tls, pParse, ts+7776, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } break } } if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return WRC_Abort } return WRC_Continue } // pEList is a list of expressions which are really the result set of the // a SELECT statement. pE is a term in an ORDER BY or GROUP BY clause. // This routine checks to see if pE is a simple identifier which corresponds // to the AS-name of one of the terms of the expression list. If it is, // this routine return an integer between 1 and N where N is the number of // elements in pEList, corresponding to the matching entry. If there is // no match, or if pE is not a simple identifier, then this routine // return 0. // // pEList has been resolved. pE has not. func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101661:12: */ var i int32 // Loop counter _ = pParse if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_ID { var zCol uintptr zCol = *(*uintptr)(unsafe.Pointer(pE + 8)) for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME && Xsqlite3_stricmp(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName, zCol) == 0 { return i + 1 } } } return 0 } // pE is a pointer to an expression which is a single term in the // ORDER BY of a compound SELECT. The expression has not been // name resolved. // // At the point this routine is called, we already know that the // ORDER BY term is not an integer index into the result set. That // case is handled by the calling routine. // // Attempt to match pE against result set columns in the left-most // SELECT statement. Return the index i of the matching column, // as an indication to the caller that it should sort by the i-th column. // The left-most column is 1. In other words, the value returned is the // same integer value that would be used in the SQL statement to indicate // the column. // // If there is no match, return 0. Return -1 if an error occurs. func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101703:12: */ bp := tls.Alloc(56) defer tls.Free(56) var i int32 // Loop counter var pEList uintptr // The columns of the result set // var nc NameContext at bp, 56 // Name context for resolving pE var db uintptr // Database connection var rc int32 // Return code from subprocedures var savedSuppErr U8 // Saved value of db->suppressErr pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList // Resolve all names in the ORDER BY term expression libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc *(*uintptr)(unsafe.Pointer(bp + 16)) = pEList (*NameContext)(unsafe.Pointer(bp /* &nc */)).FncFlags = NC_AllowAgg | NC_UEList | NC_NoSelect (*NameContext)(unsafe.Pointer(bp /* &nc */)).FnNcErr = 0 db = (*Parse)(unsafe.Pointer(pParse)).Fdb savedSuppErr = (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = U8(1) rc = Xsqlite3ResolveExprNames(tls, bp, pE) (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = savedSuppErr if rc != 0 { return 0 } // Try to match the ORDER BY expression against an expression // in the result set. Return an 1-based index of the matching // result-set entry. for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr, pE, -1) < 2 { return i + 1 } } // If no match, return 0. return 0 } // Generate an ORDER BY or GROUP BY term out-of-range error. func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32, pError uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101750:13: */ bp := tls.Alloc(24) defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, ts+8378, libc.VaList(bp, i, zType, mx)) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pError) } // Analyze the ORDER BY clause in a compound SELECT statement. Modify // each term of the ORDER BY clause is a constant integer between 1 // and N where N is the number of columns in the compound SELECT. // // ORDER BY terms that are already an integer between 1 and N are // unmodified. ORDER BY terms that are integers outside the range of // 1 through N generate an error. ORDER BY terms that are expressions // are matched against result set expressions of compound SELECT // beginning with the left-most SELECT and working toward the right. // At the first match, the ORDER BY expression is transformed into // the integer column number. // // Return the number of errors seen. func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101778:12: */ bp := tls.Alloc(12) defer tls.Free(12) var i int32 var pOrderBy uintptr var pEList uintptr var db uintptr var moreToDo int32 = 1 pOrderBy = (*Select)(unsafe.Pointer(pSelect)).FpOrderBy if pOrderBy == uintptr(0) { return 0 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { Xsqlite3ErrorMsg(tls, pParse, ts+8434, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { libc.SetBitFieldPtr8Uint32(pOrderBy+8+uintptr(i)*32+20, uint32(0), 2, 0x4) } (*Select)(unsafe.Pointer(pSelect)).FpNext = uintptr(0) for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { (*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpPrior)).FpNext = pSelect pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior } for pSelect != 0 && moreToDo != 0 { var pItem uintptr moreToDo = 0 pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList i = 0 pItem = pOrderBy + 8 /* &.a */ __1: if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { goto __3 } { *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = -1 var pE uintptr var pDup uintptr if uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x4>>2)) != 0 { goto __2 } pE = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) if pE == uintptr(0) { goto __2 } if Xsqlite3ExprIsInteger(tls, pE, bp+8) != 0 { if *(*int32)(unsafe.Pointer(bp + 8)) <= 0 || *(*int32)(unsafe.Pointer(bp + 8)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { resolveOutOfRangeError(tls, pParse, ts+8468, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pE) return 1 } } else { *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveAsName(tls, pParse, pEList, pE) if *(*int32)(unsafe.Pointer(bp + 8)) == 0 { // Now test if expression pE matches one of the values returned // by pSelect. In the usual case this is done by duplicating the // expression, resolving any symbols in it, and then comparing // it against each expression returned by the SELECT statement. // Once the comparisons are finished, the duplicate expression // is deleted. // // If this is running as part of an ALTER TABLE operation and // the symbols resolve successfully, also resolve the symbols in the // actual expression. This allows the code in alter.c to modify // column references within the ORDER BY expression as required. pDup = Xsqlite3ExprDup(tls, db, pE, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveOrderByTermToExprList(tls, pParse, pSelect, pDup) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*int32)(unsafe.Pointer(bp + 8)) > 0 { resolveOrderByTermToExprList(tls, pParse, pSelect, pE) } } Xsqlite3ExprDelete(tls, db, pDup) } } if *(*int32)(unsafe.Pointer(bp + 8)) > 0 { // Convert the ORDER BY term into an integer column number iCol, // taking care to preserve the COLLATE clause if it exists. if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0)) if pNew == uintptr(0) { return 1 } *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue) *(*int32)(unsafe.Pointer(pNew + 8)) = *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) if (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr == pE { (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pNew } else { var pParent uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr for int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pParent)).FpLeft)).Fop) == TK_COLLATE { pParent = (*Expr)(unsafe.Pointer(pParent)).FpLeft } (*Expr)(unsafe.Pointer(pParent)).FpLeft = pNew } Xsqlite3ExprDelete(tls, db, pE) *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp + 8 /* iCol */))) } libc.SetBitFieldPtr8Uint32(pItem+20, uint32(1), 2, 0x4) } else { moreToDo = 1 } } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: ; pSelect = (*Select)(unsafe.Pointer(pSelect)).FpNext } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint8)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32 + 20))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8474, libc.VaList(bp, i+1)) return 1 } } return 0 } // Check every term in the ORDER BY or GROUP BY clause pOrderBy of // the SELECT statement pSelect. If any term is reference to a // result set expression (as determined by the ExprList.a.u.x.iOrderByCol // field) then convert that term into a copy of the corresponding result set // column. // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101891:20: */ bp := tls.Alloc(8) defer tls.Free(8) var i int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr var pItem uintptr if pOrderBy == uintptr(0) || (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { Xsqlite3ErrorMsg(tls, pParse, ts+8535, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList // sqlite3SelectNew() guarantees this i = 0 pItem = pOrderBy + 8 /* &.a */ __1: if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { goto __3 } { if *(*U16)(unsafe.Pointer(pItem + 24)) != 0 { if int32(*(*U16)(unsafe.Pointer(pItem + 24))) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { resolveOutOfRangeError(tls, pParse, zType, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, uintptr(0)) return 1 } resolveAlias(tls, pParse, pEList, int32(*(*U16)(unsafe.Pointer(pItem + 24)))-1, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, 0) } } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: ; return 0 } // Walker callback for windowRemoveExprFromSelect(). func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101925:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) Xsqlite3WindowUnlinkFromSelect(tls, pWin) } return WRC_Continue } // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101938:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*Select)(unsafe.Pointer(pSelect)).FpWin != 0 { // var sWalker Walker at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveRemoveWindowsCb})) *(*uintptr)(unsafe.Pointer(bp + 40)) = pSelect Xsqlite3WalkExpr(tls, bp, pExpr) } } // pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect. // The Name context of the SELECT statement is pNC. zType is either // "ORDER" or "GROUP" depending on which type of clause pOrderBy is. // // This routine resolves each term of the clause into an expression. // If the order-by term is an integer I between 1 and N (where N is the // number of columns in the result set of the SELECT) then the expression // in the resolution is a copy of the I-th result-set expression. If // the order-by term is an identifier that corresponds to the AS-name of // a result-set expression, then the term resolves to a copy of the // result-set expression. Otherwise, the expression is resolved in // the usual way - using sqlite3ResolveExprNames(). // // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:101969:12: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 var j int32 // Loop counters // var iCol int32 at bp, 4 // Column number var pItem uintptr // A term of the ORDER BY clause var pParse uintptr // Parsing context var nResult int32 // Number of terms in the result set nResult = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr pParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse i = 0 pItem = pOrderBy + 8 /* &.a */ __1: if !(i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr) { goto __3 } { var pE uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pE) if pE2 == uintptr(0) { goto __2 } if int32(*(*int8)(unsafe.Pointer(zType))) != 'G' { *(*int32)(unsafe.Pointer(bp /* iCol */)) = resolveAsName(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pE2) if *(*int32)(unsafe.Pointer(bp)) > 0 { // If an AS-name match is found, mark this ORDER BY column as being // a copy of the iCol-th result-set column. The subsequent call to // sqlite3ResolveOrderGroupBy() will convert the expression to a // copy of the iCol-th result-set expression. *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp /* iCol */))) goto __2 } } if Xsqlite3ExprIsInteger(tls, pE2, bp) != 0 { // The ORDER BY term is an integer constant. Again, set the column // number so that sqlite3ResolveOrderGroupBy() will convert the // order-by term to a copy of the result-set expression if *(*int32)(unsafe.Pointer(bp)) < 1 || *(*int32)(unsafe.Pointer(bp)) > 0xffff { resolveOutOfRangeError(tls, pParse, zType, i+1, nResult, pE2) return 1 } *(*U16)(unsafe.Pointer(pItem + 24)) = U16(*(*int32)(unsafe.Pointer(bp /* iCol */))) goto __2 } // Otherwise, treat the ORDER BY term as an ordinary expression *(*U16)(unsafe.Pointer(pItem + 24)) = U16(0) if Xsqlite3ResolveExprNames(tls, pNC, pE) != 0 { return 1 } for j = 0; j < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr; j++ { if Xsqlite3ExprCompare(tls, uintptr(0), pE, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList+8+uintptr(j)*32)).FpExpr, -1) == 0 { // Since this expresion is being changed into a reference // to an identical expression in the result set, remove all Window // objects belonging to the expression from the Select.pWin list. windowRemoveExprFromSelect(tls, pSelect, pE) *(*U16)(unsafe.Pointer(pItem + 24)) = U16(j + 1) } } } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: ; return Xsqlite3ResolveOrderGroupBy(tls, pParse, pSelect, pOrderBy, zType) } // Resolve names in the SELECT statement p and all of its descendants. func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102032:12: */ bp := tls.Alloc(56) defer tls.Free(56) var pOuterNC uintptr // Context that contains this SELECT // var sNC NameContext at bp, 56 // Name context of this SELECT var isCompound int32 // True if p is a compound select var nCompound int32 // Number of compound terms processed so far var pParse uintptr // Parsing context var i int32 // Loop counter var pGroupBy uintptr // The GROUP BY clause var pLeftmost uintptr // Left-most of SELECT of a compound var db uintptr // Database connection if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Resolved) != 0 { return WRC_Prune } pOuterNC = *(*uintptr)(unsafe.Pointer(pWalker + 40)) pParse = (*Walker)(unsafe.Pointer(pWalker)).FpParse db = (*Parse)(unsafe.Pointer(pParse)).Fdb // Normally sqlite3SelectExpand() will be called first and will have // already expanded this SELECT. However, if this is a subquery within // an expression, sqlite3ResolveExprNames() will be called without a // prior call to sqlite3SelectExpand(). When that happens, let // sqlite3SelectPrep() do all of the processing for this SELECT. // sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and // this routine in the correct order. if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Expanded) == U32(0) { Xsqlite3SelectPrep(tls, pParse, p, pOuterNC) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return WRC_Abort } return WRC_Prune } isCompound = libc.Bool32((*Select)(unsafe.Pointer(p)).FpPrior != uintptr(0)) nCompound = 0 pLeftmost = p for p != 0 { // SF_Resolved not set if errors suppressed *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Resolved) // Resolve the expressions in the LIMIT and OFFSET clauses. These // are not allowed to refer to any names, so pass an empty NameContext. libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpWinSelect = p if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 { return WRC_Abort } // If the SF_Converted flags is set, then this Select object was // was created by the convertCompoundSelectToSubquery() function. // In this case the ORDER BY clause (p->pOrderBy) should be resolved // as if it were part of the sub-query, not the parent. This block // moves the pOrderBy down to the sub-query. It will be moved back // after the names have been resolved. if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Converted) != 0 { var pSub uintptr = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect (*Select)(unsafe.Pointer(pSub)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) } // Recursively resolve names in all subqueries in the FROM clause for i = 0; i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc; i++ { var pItem uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + uintptr(i)*112 if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 && (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselFlags&U32(SF_Resolved) == U32(0) { var nRef int32 if pOuterNC != 0 { nRef = (*NameContext)(unsafe.Pointer(pOuterNC)).FnRef } else { nRef = 0 } var zSavedContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext if (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0 { (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = (*SrcItem)(unsafe.Pointer(pItem)).FzName } Xsqlite3ResolveSelectNames(tls, pParse, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect, pOuterNC) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedContext if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return WRC_Abort } // If the number of references to the outer context changed when // expressions in the sub-select were resolved, the sub-select // is correlated. It is not required to check the refcount on any // but the innermost outer context object, as lookupName() increments // the refcount on all contexts between the current one and the // context containing the column when it resolves a name. if pOuterNC != 0 { libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(libc.Bool32((*NameContext)(unsafe.Pointer(pOuterNC)).FnRef > nRef)), 3, 0x8) } } } // Set up the local name-context to pass to sqlite3ResolveExprNames() to // resolve the result-set expression list. (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_AllowAgg | NC_AllowWin (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(p)).FpSrc (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = pOuterNC // Resolve names in the result set. if Xsqlite3ResolveExprListNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowWin) // If there are no aggregate functions in the result-set, and no GROUP BY // expression, do not allow aggregates in any of the other expressions. pGroupBy = (*Select)(unsafe.Pointer(p)).FpGroupBy if pGroupBy != 0 || (*NameContext)(unsafe.Pointer(bp)).FncFlags&NC_HasAgg != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_Aggregate | (*NameContext)(unsafe.Pointer(bp)).FncFlags&(NC_MinMaxAgg|NC_OrderAgg)) } else { *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowAgg) } // Add the output column list to the name-context before parsing the // other expressions in the SELECT statement. This is so that // expressions in the WHERE clause (etc.) can refer to expressions by // aliases in the result set. // // Minor point: If this is the case, then the expression will be // re-evaluated for each reference to it. *(*uintptr)(unsafe.Pointer(bp + 16)) = (*Select)(unsafe.Pointer(p)).FpEList *(*int32)(unsafe.Pointer(bp + 40)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if !(pGroupBy != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+8566, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { return WRC_Abort } } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpWhere) != 0 { return WRC_Abort } // Resolve names in table-valued-function arguments for i = 0; i < (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc)).FnSrc; i++ { var pItem uintptr = (*Select)(unsafe.Pointer(p)).FpSrc + 8 + uintptr(i)*112 if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 && Xsqlite3ResolveExprListNames(tls, bp, *(*uintptr)(unsafe.Pointer(pItem + 96))) != 0 { return WRC_Abort } } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { var pWin uintptr for pWin = (*Select)(unsafe.Pointer(p)).FpWinDefn; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { if Xsqlite3ResolveExprListNames(tls, bp, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) != 0 || Xsqlite3ResolveExprListNames(tls, bp, (*Window)(unsafe.Pointer(pWin)).FpPartition) != 0 { return WRC_Abort } } } // The ORDER BY and GROUP BY clauses may not refer to terms in // outer queries (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = uintptr(0) *(*int32)(unsafe.Pointer(bp + 40)) |= NC_AllowAgg | NC_AllowWin // If this is a converted compound query, move the ORDER BY clause from // the sub-query back to the parent query. At this point each term // within the ORDER BY clause has been transformed to an integer value. // These integers will be replaced by copies of the corresponding result // set expressions by the call to resolveOrderGroupBy() below. if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Converted) != 0 { var pSub uintptr = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpSelect (*Select)(unsafe.Pointer(p)).FpOrderBy = (*Select)(unsafe.Pointer(pSub)).FpOrderBy (*Select)(unsafe.Pointer(pSub)).FpOrderBy = uintptr(0) } // Process the ORDER BY clause for singleton SELECT statements. // The ORDER BY clause for compounds SELECT statements is handled // below, after all of the result-sets for all of the elements of // the compound have been resolved. // // If there is an ORDER BY clause on a term of a compound-select other // than the right-most term, then that is a syntax error. But the error // is not detected until much later, and so we need to go ahead and // resolve those symbols on the incorrect ORDER BY for consistency. if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8468) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } *(*int32)(unsafe.Pointer(bp + 40)) &= libc.CplInt32(NC_AllowWin) // Resolve the GROUP BY clause. At the same time, make sure // the GROUP BY clause does not contain aggregate functions. if pGroupBy != 0 { var pItem uintptr if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+8610) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 pItem = pGroupBy + 8 /* &.a */ __1: if !(i < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { goto __3 } { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, ts+8616, 0) return WRC_Abort } } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: } // If this is part of a compound SELECT, check that it has the right // number of expressions in the select list. if (*Select)(unsafe.Pointer(p)).FpNext != 0 && (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpNext)).FpEList)).FnExpr { Xsqlite3SelectWrongNumTermsError(tls, pParse, (*Select)(unsafe.Pointer(p)).FpNext) return WRC_Abort } // Advance to the next term of the compound p = (*Select)(unsafe.Pointer(p)).FpPrior nCompound++ } // Resolve the ORDER BY on a compound SELECT after all terms of // the compound have been resolved. if isCompound != 0 && resolveCompoundOrderBy(tls, pParse, pLeftmost) != 0 { return WRC_Abort } return WRC_Prune } // This routine walks an expression tree and resolves references to // table columns and result-set columns. At the same time, do error // checking on function usage and set a flag if any aggregate functions // are seen. // // To resolve table columns references we look for nodes (or subtrees) of the // form X.Y.Z or Y.Z or just Z where // // X: The name of a database. Ex: "main" or "temp" or // the symbolic name assigned to an ATTACH-ed database. // // Y: The name of a table in a FROM clause. Or in a trigger // one of the special names "old" or "new". // // Z: The name of a column in table Y. // // The node at the root of the subtree is modified as follows: // // Expr.op Changed to TK_COLUMN // Expr.pTab Points to the Table object for X.Y // Expr.iColumn The column index in X.Y. -1 for the rowid. // Expr.iTable The VDBE cursor number for X.Y // // // To resolve result-set references, look for expression nodes of the // form Z (with no X and Y prefix) where the Z matches the right-hand // size of an AS clause in the result-set of a SELECT. The Z expression // is replaced by a copy of the left-hand side of the result-set expression. // Table-name and function resolution occurs on the substituted expression // tree. For example, in: // // SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x; // // The "x" term of the order by is replaced by "a+b" to render: // // SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b; // // Function calls are checked to make sure that the function is // defined and that the correct number of arguments are specified. // If the function is an aggregate function, then the NC_HasAgg flag is // set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION. // If an expression contains aggregate functions then the EP_Agg // property on the expression is set. // // An error message is left in pParse if anything is amiss. The number // if errors is returned. func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102320:20: */ bp := tls.Alloc(48) defer tls.Free(48) var savedHasAgg int32 // var w Walker at bp, 48 if pExpr == uintptr(0) { return SQLITE_OK } savedHasAgg = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveExprStep})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = func() uintptr { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_NoSelect != 0 { return uintptr(0) } return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveSelectStep})) }() (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return SQLITE_ERROR } Xsqlite3WalkExpr(tls, bp, pExpr) *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 40)) |= savedHasAgg return libc.Bool32((*NameContext)(unsafe.Pointer(pNC)).FnNcErr > 0 || (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnErr > 0) } // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102359:20: */ bp := tls.Alloc(48) defer tls.Free(48) var i int32 var savedHasAgg int32 = 0 // var w Walker at bp, 48 if pList == uintptr(0) { return WRC_Continue } (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveExprStep})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveSelectStep})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC savedHasAgg = (*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr if pExpr == uintptr(0) { continue } *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return WRC_Abort } Xsqlite3WalkExpr(tls, bp, pExpr) *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 300)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) != 0 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) savedHasAgg = savedHasAgg | (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) *(*int32)(unsafe.Pointer(pNC + 40)) &= libc.CplInt32(NC_HasAgg | NC_MinMaxAgg | NC_HasWin | NC_OrderAgg) } if (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnErr > 0 { return WRC_Abort } } *(*int32)(unsafe.Pointer(pNC + 40)) |= savedHasAgg return WRC_Continue } // Resolve all names in all expressions of a SELECT and in all // decendents of the SELECT, including compounds off of p->pPrior, // subqueries in expressions, and subqueries used as FROM clause // terms. // // See sqlite3ResolveExprNames() for a description of the kinds of // transformations that occur. // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102415:21: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveExprStep})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveSelectStep})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse *(*uintptr)(unsafe.Pointer(bp + 40)) = pOuterNC Xsqlite3WalkSelect(tls, bp, p) } // Resolve names in expressions that can only reference a single table // or which cannot reference any tables at all. Examples: // // "type" flag // ------------ // (1) CHECK constraints NC_IsCheck // (2) WHERE clauses on partial indices NC_PartIdx // (3) Expressions in indexes on expressions NC_IdxExpr // (4) Expression arguments to VACUUM INTO. 0 // (5) GENERATED ALWAYS as expressions NC_GenCol // // In all cases except (4), the Expr.iTable value for Expr.op==TK_COLUMN // nodes of the expression is set to -1 and the Expr.iColumn value is // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102449:20: */ bp := tls.Alloc(176) defer tls.Free(176) // var sSrc SrcList at bp+56, 120 // Fake SrcList for pParse->pNewTable // var sNC NameContext at bp, 56 // Name context for pParse->pNewTable var rc int32 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) libc.Xmemset(tls, bp+56, 0, uint64(unsafe.Sizeof(SrcList{}))) if pTab != 0 { (*SrcList)(unsafe.Pointer(bp + 56 /* &sSrc */)).FnSrc = 1 (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FzName = (*Table)(unsafe.Pointer(pTab)).FzName (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FpTab = pTab (*SrcItem)(unsafe.Pointer(bp + 56 + 8)).FiCursor = -1 if (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+1*32)).FpSchema { // Cause EP_FromDDL to be set on TK_FUNCTION nodes of non-TEMP // schema elements type1 = type1 | NC_FromDDL } } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = bp + 56 /* &sSrc */ (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = type1 | NC_IsDDL if libc.AssignInt32(&rc, Xsqlite3ResolveExprNames(tls, bp, pExpr)) != SQLITE_OK { return rc } if pList != 0 { rc = Xsqlite3ResolveExprListNames(tls, bp, pList) } return rc } // Return the affinity character for a single column of a table. func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102509:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).Faffinity } // Return the 'affinity' of the expression pExpr if any. // // If pExpr is a column, a reference to a column via an 'AS' alias, // or a sub-select with a column as the return value, then the // affinity of that column is returned. Otherwise, 0x00 is returned, // indicating no affinity for the expression. // // i.e. the WHERE clause expressions in the following statements all // have an affinity: // // CREATE TABLE t1(a); // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102530:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_REGISTER { op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) } if op == TK_COLUMN || op == TK_AGG_COLUMN { if *(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0 { return Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) } } if op == TK_SELECT { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr) } if op == TK_CAST { return Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)) } if op == TK_SELECT_COLUMN { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft + 32)))).FpEList+8+uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr) } if op == TK_VECTOR { return Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32))+8)).FpExpr) } return (*Expr)(unsafe.Pointer(pExpr)).FaffExpr } // Set the collating sequence for expression pExpr to be the collating // sequence named by pToken. Return a pointer to a new Expr node that // implements the COLLATE operator. // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102583:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { (*Expr)(unsafe.Pointer(pNew)).FpLeft = pExpr *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_Collate | EP_Skip) pExpr = pNew } } return pExpr } func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102599:21: */ bp := tls.Alloc(16) defer tls.Free(16) // var s Token at bp, 16 Xsqlite3TokenInit(tls, bp, zC) return Xsqlite3ExprAddCollateToken(tls, pParse, pExpr, bp, 0) } // Skip over any TK_COLLATE operators. func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102613:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } return pExpr } // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102626:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { pExpr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr } else { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft } } return pExpr } // Return the collation sequence for the expression pExpr. If // there is no defined collating sequence, return NULL. // // See also: sqlite3ExprNNCollSeq() // // The sqlite3ExprNNCollSeq() works the same exact that it returns the // default collation if pExpr has no defined collation. // // The collating sequence might be determined by a COLLATE operator // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102655:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr for p != 0 { var op int32 = int32((*Expr)(unsafe.Pointer(p)).Fop) if op == TK_REGISTER { op = int32((*Expr)(unsafe.Pointer(p)).Fop2) } if op == TK_AGG_COLUMN || op == TK_COLUMN || op == TK_TRIGGER { if *(*uintptr)(unsafe.Pointer(p + 64)) != uintptr(0) { // op==TK_REGISTER && p->y.pTab!=0 happens when pExpr was originally // a TK_COLUMN but was previously evaluated and cached in a register var j int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) if j >= 0 { var zColl uintptr = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol+uintptr(j)*24) pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) } break } } if op == TK_CAST || op == TK_UPLUS { p = (*Expr)(unsafe.Pointer(p)).FpLeft continue } if op == TK_VECTOR { p = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32)) + 8)).FpExpr continue } if op == TK_COLLATE { pColl = Xsqlite3GetCollSeq(tls, pParse, (*Sqlite3)(unsafe.Pointer(db)).Fenc, uintptr(0), *(*uintptr)(unsafe.Pointer(p + 8))) break } if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Collate) != 0 { if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 && (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fflags&U32(EP_Collate) != U32(0) { p = (*Expr)(unsafe.Pointer(p)).FpLeft } else { var pNext uintptr = (*Expr)(unsafe.Pointer(p)).FpRight // The Expr.x union is never used at the same time as Expr.pRight if *(*uintptr)(unsafe.Pointer(p + 32)) != uintptr(0) && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr)).Fflags&U32(EP_Collate) != U32(0) { pNext = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32)) + 8 + uintptr(i)*32)).FpExpr break } } } p = pNext } } else { break } } if Xsqlite3CheckCollSeq(tls, pParse, pColl) != 0 { pColl = uintptr(0) } return pColl } // Return the collation sequence for the expression pExpr. If // there is no defined collating sequence, return a pointer to the // defautl collation sequence. // // See also: sqlite3ExprCollSeq() // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102728:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl } return p } // Return TRUE if the two expressions have equivalent collating sequences. func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102738:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) } // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102749:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric // affinity, use that. Otherwise use no affinity. if int32(aff1) >= SQLITE_AFF_NUMERIC || int32(aff2) >= SQLITE_AFF_NUMERIC { return int8(SQLITE_AFF_NUMERIC) } else { return int8(SQLITE_AFF_BLOB) } } else { // One side is a column, the other is not. Use the columns affinity. return int8(func() int32 { if int32(aff1) <= SQLITE_AFF_NONE { return int32(aff2) } return int32(aff1) }() | SQLITE_AFF_NONE) } return int8(0) } // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102771:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if (*Expr)(unsafe.Pointer(pExpr)).FpRight != 0 { aff = Xsqlite3CompareAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight, aff) } else if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { aff = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList+8)).FpExpr, aff) } else if int32(aff) == 0 { aff = int8(SQLITE_AFF_BLOB) } return aff } // pExpr is a comparison expression, eg. '=', '<', IN(...) etc. // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102794:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 } if int32(aff) == SQLITE_AFF_TEXT { return libc.Bool32(int32(idx_affinity) == SQLITE_AFF_TEXT) } return libc.Bool32(int32(idx_affinity) >= SQLITE_AFF_NUMERIC) } // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102809:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff } // Return a pointer to the collation sequence that should be used by // a binary comparison operator comparing pLeft and pRight. // // If the left hand expression has a collating sequence type, then it is // used. Otherwise the collation sequence for the right hand expression // is used, or the default (BINARY) if neither expression has a collating // type. // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102831:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { pColl = Xsqlite3ExprCollSeq(tls, pParse, pLeft) } else if pRight != 0 && (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_Collate) != U32(0) { pColl = Xsqlite3ExprCollSeq(tls, pParse, pRight) } else { pColl = Xsqlite3ExprCollSeq(tls, pParse, pLeft) if !(pColl != 0) { pColl = Xsqlite3ExprCollSeq(tls, pParse, pRight) } } return pColl } // Expresssion p is a comparison operator. Return a collation sequence // appropriate for the comparison operator. // // This is normally just a wrapper around sqlite3BinaryCompareCollSeq(). // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102859:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, (*Expr)(unsafe.Pointer(p)).FpRight) } return uintptr(0) } // Generate code for a comparison operator. func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102870:12: */ var p5 int32 var addr int32 var p4 uintptr if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return 0 } if isCommuted != 0 { p4 = Xsqlite3BinaryCompareCollSeq(tls, pParse, pRight, pLeft) } else { p4 = Xsqlite3BinaryCompareCollSeq(tls, pParse, pLeft, pRight) } p5 = int32(binaryCompareP5(tls, pLeft, pRight, jumpIfNull)) addr = Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, opcode, in2, dest, in1, p4, -2) Xsqlite3VdbeChangeP5(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, uint16(U8(p5))) return addr } // Return true if expression pExpr is a vector, or false otherwise. // // A vector is defined as any expression that results in two or more // columns of result. Every TK_VECTOR node is an vector because the // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102906:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } // If the expression passed as the only argument is of type TK_VECTOR // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102916:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 } if int32(op) == TK_VECTOR { return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr } else if int32(op) == TK_SELECT { return (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr } else { return 1 } return int32(0) } // Return a pointer to a subexpression of pVector that is the i-th // column of the vector (numbered starting with 0). The caller must // ensure that i is within range. // // If pVector is really a scalar (and "scalar" here includes subqueries // that return a single column!) then return pVector unmodified. // // pVector retains ownership of the returned subexpression. // // If the vector is a (SELECT ...) then the expression returned is // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102945:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT || int32((*Expr)(unsafe.Pointer(pVector)).Fop2) == TK_SELECT { return (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)))).FpEList + 8 + uintptr(i)*32)).FpExpr } else { return (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(i)*32)).FpExpr } } return pVector } // Compute and return a new Expr object which when passed to // sqlite3ExprCode() will generate all necessary code to compute // the iField-th column of the vector expression pVector. // // It is ok for pVector to be a scalar (as long as iField==0). // In that case, this routine works like sqlite3ExprDup(). // // The caller owns the returned Expr object and is responsible for // ensuring that the returned value eventually gets freed. // // The caller retains ownership of pVector. If pVector is a TK_SELECT, // then the returned object will reference pVector and so pVector must remain // valid for the life of the returned object. If pVector is a TK_VECTOR // or a scalar expression, then it can be deleted as soon as this routine // returns. // // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:102981:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { // The TK_SELECT_COLUMN Expr node: // // pLeft: pVector containing TK_SELECT. Not deleted. // pRight: not used. But recursively deleted. // iColumn: Index of a column in pVector // iTable: 0 or the number of columns on the LHS of an assignment // pLeft->iTable: First in an array of register holding result, or 0 // if the result is not yet computed. // // sqlite3ExprDelete() specifically skips the recursive delete of // pLeft on TK_SELECT_COLUMN nodes. But pRight is followed, so pVector // can be attached to pRight to cause this node to take ownership of // pVector. Typically there will be multiple TK_SELECT_COLUMN nodes // with the same pLeft pointer to the pVector, but only one of them // will own the pVector. pRet = Xsqlite3PExpr(tls, pParse, TK_SELECT_COLUMN, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiTable = nField (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iField) (*Expr)(unsafe.Pointer(pRet)).FpLeft = pVector } } else { if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_VECTOR { var ppVector uintptr ppVector = *(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(iField)*32 pVector = *(*uintptr)(unsafe.Pointer(ppVector)) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { // This must be a vector UPDATE inside a trigger *(*uintptr)(unsafe.Pointer(ppVector)) = uintptr(0) return pVector } } pRet = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pVector, 0) } return pRet } // If expression pExpr is of type TK_SELECT, generate code to evaluate // it. Return the register in which the result is stored (or, if the // sub-select returns more than one column, the first in an array // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103037:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) } return reg } // Argument pVector points to a vector expression - either a TK_VECTOR // or TK_SELECT that returns more than one column. This function returns // the register number of a register that contains the value of // element iField of the vector. // // If pVector is a TK_SELECT expression, then code for it must have // already been generated using the exprCodeSubselect() routine. In this // case parameter regSelect should be the first in an array of registers // containing the results of the sub-select. // // If pVector is of type TK_VECTOR, then code for the requested field // is generated. In this case (*pRegFree) may be set to the number of // a temporary register to be freed by the caller before returning. // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103065:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { *(*uintptr)(unsafe.Pointer(ppExpr)) = Xsqlite3VectorFieldSubexpr(tls, pVector, iField) return (*Expr)(unsafe.Pointer(pVector)).FiTable + iField } if int32(op) == TK_SELECT { *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)))).FpEList + 8 + uintptr(iField)*32)).FpExpr return regSelect + iField } if int32(op) == TK_VECTOR { *(*uintptr)(unsafe.Pointer(ppExpr)) = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pVector + 32)) + 8 + uintptr(iField)*32)).FpExpr return Xsqlite3ExprCodeTemp(tls, pParse, *(*uintptr)(unsafe.Pointer(ppExpr)), pRegFree) } return 0 } // Expression pExpr is a comparison between two vector values. Compute // the result of the comparison (1, 0, or NULL) and write that // result into register dest. // // The caller must satisfy the following preconditions: // // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103103:13: */ bp := tls.Alloc(28) defer tls.Free(28) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight var nLeft int32 = Xsqlite3ExprVectorSize(tls, pLeft) var i int32 var regLeft int32 = 0 var regRight int32 = 0 var opx U8 = op var addrCmp int32 = 0 var addrDone int32 = Xsqlite3VdbeMakeLabel(tls, pParse) var isCommuted int32 = libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0)) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { Xsqlite3ErrorMsg(tls, pParse, ts+7776, 0) return } if int32(op) == TK_LE { opx = U8(TK_LT) } if int32(op) == TK_GE { opx = U8(TK_GT) } if int32(op) == TK_NE { opx = U8(TK_EQ) } regLeft = exprCodeSubselect(tls, pParse, pLeft) regRight = exprCodeSubselect(tls, pParse, pRight) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, dest) for i = 0; 1 != 0; i++ { *(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */)) = 0 *(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */)) = 0 *(*uintptr)(unsafe.Pointer(bp /* pL */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)) = uintptr(0) var r1 int32 var r2 int32 if addrCmp != 0 { Xsqlite3VdbeJumpHere(tls, v, addrCmp) } r1 = exprVectorRegister(tls, pParse, pLeft, i, regLeft, bp, bp+8) r2 = exprVectorRegister(tls, pParse, pRight, i, regRight, bp+16, bp+24) addrCmp = Xsqlite3VdbeCurrentAddr(tls, v) codeCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pL */)), *(*uintptr)(unsafe.Pointer(bp + 16 /* pR */)), int32(opx), r1, r2, addrDone, int32(p5), isCommuted) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 8 /* regFree1 */))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 24 /* regFree2 */))) if (int32(opx) == TK_LT || int32(opx) == TK_GT) && i < nLeft-1 { addrCmp = Xsqlite3VdbeAddOp0(tls, v, OP_ElseEq) } if int32(p5) == SQLITE_NULLEQ { Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, dest) } else { Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, dest, r2) } if i == nLeft-1 { break } if int32(opx) == TK_EQ { Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, dest, addrDone) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrDone) if i == nLeft-2 { opx = op } } } Xsqlite3VdbeJumpHere(tls, v, addrCmp) Xsqlite3VdbeResolveLabel(tls, v, addrDone) if int32(op) == TK_NE { Xsqlite3VdbeAddOp2(tls, v, OP_Not, dest, dest) } } // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103198:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, ts+8675, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc } // The following three functions, heightOfExpr(), heightOfExprList() // and heightOfSelect(), are used to determine the maximum height // of any expression tree referenced by the structure passed as the // first argument. // // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103219:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight } } } func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103226:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { heightOfExpr(tls, (*ExprList_item)(unsafe.Pointer(p+8+uintptr(i)*32)).FpExpr, pnHeight) } } } func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103234:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpHaving, pnHeight) heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpLimit, pnHeight) heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpEList, pnHeight) heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpGroupBy, pnHeight) heightOfExprList(tls, (*Select)(unsafe.Pointer(p)).FpOrderBy, pnHeight) } } // Set the Expr.nHeight variable in the structure passed as an // argument. An expression with no children, Expr.pList or // Expr.pSelect member has a height of 1. Any other expression // has a height equal to the maximum height of any other // referenced Expr plus one. // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. func exprSetHeight(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103256:13: */ bp := tls.Alloc(4) defer tls.Free(4) if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { *(*int32)(unsafe.Pointer(bp /* nHeight */)) = (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).FnHeight } else { *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 } if (*Expr)(unsafe.Pointer(p)).FpRight != 0 && (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpRight)).FnHeight > *(*int32)(unsafe.Pointer(bp)) { *(*int32)(unsafe.Pointer(bp /* nHeight */)) = (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpRight)).FnHeight } if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { heightOfSelect(tls, *(*uintptr)(unsafe.Pointer(p + 32)), bp) } else if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { heightOfExprList(tls, *(*uintptr)(unsafe.Pointer(p + 32)), bp) *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & Xsqlite3ExprListFlags(tls, *(*uintptr)(unsafe.Pointer(p + 32))) } (*Expr)(unsafe.Pointer(p)).FnHeight = *(*int32)(unsafe.Pointer(bp)) + 1 } // Set the Expr.nHeight variable using the exprSetHeight() function. If // the height is greater than the maximum allowed expression depth, // leave an error in pParse. // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103276:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } exprSetHeight(tls, p) Xsqlite3ExprCheckHeight(tls, pParse, (*Expr)(unsafe.Pointer(p)).FnHeight) } // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103286:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 heightOfSelect(tls, p, bp) return *(*int32)(unsafe.Pointer(bp /* nHeight */)) } // This routine is the core allocator for Expr nodes. // // Construct a new expression node and return a pointer to it. Memory // for this node and for the pToken argument is a single allocation // obtained from sqlite3DbMalloc(). The calling function // is responsible for making sure the node eventually gets freed. // // If dequote is true, then the token (if it exists) is dequoted. // If dequote is false, no dequoting is performed. The deQuote // parameter is ignored if pToken is NULL or if the token does not // appear to be quoted. If the quotes were of the form "..." (double-quotes) // then the EP_DblQuoted flag is set on the expression node. // // Special case: If op==TK_INTEGER and pToken points to a string that // can be translated into a 32-bit integer, then the token is not // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103325:21: */ bp := tls.Alloc(4) defer tls.Free(4) var pNew uintptr var nExtra int32 = 0 *(*int32)(unsafe.Pointer(bp /* iValue */)) = 0 if pToken != 0 { if op != TK_INTEGER || (*Token)(unsafe.Pointer(pToken)).Fz == uintptr(0) || Xsqlite3GetInt32(tls, (*Token)(unsafe.Pointer(pToken)).Fz, bp) == 0 { nExtra = int32((*Token)(unsafe.Pointer(pToken)).Fn + uint32(1)) } } pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Expr{}))+uint64(nExtra)) if pNew != 0 { libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(pNew)).Fop = U8(op) (*Expr)(unsafe.Pointer(pNew)).FiAgg = int16(-1) if pToken != 0 { if nExtra == 0 { *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue | EP_Leaf | func() int32 { if *(*int32)(unsafe.Pointer(bp)) != 0 { return EP_IsTrue } return EP_IsFalse }()) *(*int32)(unsafe.Pointer(pNew + 8)) = *(*int32)(unsafe.Pointer(bp /* iValue */)) } else { *(*uintptr)(unsafe.Pointer(pNew + 8)) = pNew + 1*72 if (*Token)(unsafe.Pointer(pToken)).Fn != 0 { libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(pNew + 8)), (*Token)(unsafe.Pointer(pToken)).Fz, uint64((*Token)(unsafe.Pointer(pToken)).Fn)) } *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8)) + uintptr((*Token)(unsafe.Pointer(pToken)).Fn))) = int8(0) if dequote != 0 && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNew + 8)))))])&0x80 != 0 { Xsqlite3DequoteExpr(tls, pNew) } } } (*Expr)(unsafe.Pointer(pNew)).FnHeight = 1 } return pNew } // Allocate a new expression node from a zero-terminated token that has // already been dequoted. func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103373:21: */ bp := tls.Alloc(16) defer tls.Free(16) // var x Token at bp, 16 (*Token)(unsafe.Pointer(bp /* &x */)).Fz = zToken (*Token)(unsafe.Pointer(bp /* &x */)).Fn = uint32(Xsqlite3Strlen30(tls, zToken)) return Xsqlite3ExprAlloc(tls, db, op, bp, 0) } // Attach subtrees pLeft and pRight to the Expr node pRoot. // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103390:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) Xsqlite3ExprDelete(tls, db, pRight) } else { if pRight != 0 { (*Expr)(unsafe.Pointer(pRoot)).FpRight = pRight *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pRight)).Fflags } if pLeft != 0 { (*Expr)(unsafe.Pointer(pRoot)).FpLeft = pLeft *(*U32)(unsafe.Pointer(pRoot + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & (*Expr)(unsafe.Pointer(pLeft)).Fflags } exprSetHeight(tls, pRoot) } } // Allocate an Expr node which joins as many as two subtrees. // // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103420:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { libc.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(p)).Fop = U8(op & 0xff) (*Expr)(unsafe.Pointer(p)).FiAgg = int16(-1) Xsqlite3ExprAttachSubtrees(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p, pLeft, pRight) Xsqlite3ExprCheckHeight(tls, pParse, (*Expr)(unsafe.Pointer(p)).FnHeight) } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pLeft) Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pRight) } return p } // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103445:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 32)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) Xsqlite3ExprSetHeightAndFlags(tls, pParse, pExpr) } else { Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSelect) } } // Expression list pEList is a list of vector values. This function // converts the contents of pEList to a VALUES(...) Select statement // returning 1 row for each element of the list. For example, the // expression list: // // ( (1,2), (3,4) (5,6) ) // // is translated to the equivalent of: // // VALUES(1,2), (3,4), (5,6) // // Each of the vector values in pEList must contain exactly nElem terms. // If a list element that is not a vector or does not contain nElem terms, // an error message is left in pParse. // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103475:23: */ bp := tls.Alloc(24) defer tls.Free(24) var ii int32 var pRet uintptr = uintptr(0) for ii = 0; ii < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; ii++ { var pSel uintptr var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(ii)*32)).FpExpr var nExprElem int32 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VECTOR { nExprElem = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr } else { nExprElem = 1 } if nExprElem != nElem { Xsqlite3ErrorMsg(tls, pParse, ts+8723, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { return ts + 8767 /* "s" */ } return ts + 1524 /* "" */ }(), nElem)) break } pSel = Xsqlite3SelectNew(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 32)), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(SF_Values), uintptr(0)) *(*uintptr)(unsafe.Pointer(pExpr + 32)) = uintptr(0) if pSel != 0 { if pRet != 0 { (*Select)(unsafe.Pointer(pSel)).Fop = U8(TK_ALL) (*Select)(unsafe.Pointer(pSel)).FpPrior = pRet } pRet = pSel } } if pRet != 0 && (*Select)(unsafe.Pointer(pRet)).FpPrior != 0 { *(*U32)(unsafe.Pointer(pRet + 4)) |= U32(SF_MultiValue) } Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pEList) return pRet } // Join two expressions using an AND operator. If either expression is // NULL, then just return the other expression. // // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103522:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight } else if pRight == uintptr(0) { return pLeft } else if ((*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) || (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) return Xsqlite3Expr(tls, db, TK_INTEGER, ts+8769) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } return uintptr(0) } // Construct a new expression node for a function with multiple // arguments. func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103543:21: */ bp := tls.Alloc(8) defer tls.Free(8) var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pNew = Xsqlite3ExprAlloc(tls, db, TK_FUNCTION, pToken, 1) if pNew == uintptr(0) { Xsqlite3ExprListDelete(tls, db, pList) // Avoid memory leak when malloc fails return uintptr(0) } *(*int32)(unsafe.Pointer(pNew + 52)) = int32((int64((*Token)(unsafe.Pointer(pToken)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FzTail)) / 1) if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+8771, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 32)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) Xsqlite3ExprSetHeightAndFlags(tls, pParse, pNew) if eDistinct == SF_Distinct { *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_Distinct) } return pNew } // Check to see if a function is usable according to current access // rules: // // SQLITE_FUNC_DIRECT - Only usable from top-level SQL // // SQLITE_FUNC_UNSAFE - Usable if TRUSTED_SCHEMA or from // top-level SQL // // If the function is not usable, create an error. func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103583:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromDDL) != U32(0) { if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT) != U32(0) || (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_TrustedSchema) == uint64(0) { // Functions prohibited in triggers and views if: // (1) tagged with SQLITE_DIRECTONLY // (2) not tagged with SQLITE_INNOCUOUS (which means it // is tagged with SQLITE_FUNC_UNSAFE) and // SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning // that the schema is possibly tainted). Xsqlite3ErrorMsg(tls, pParse, ts+8805, libc.VaList(bp, pExpr)) } } } // Assign a variable number to an expression that encodes a wildcard // in the original SQL statement. // // Wildcards consisting of a single "?" are assigned the next sequential // variable number. // // Wildcards of the form "?nnn" are assigned the number "nnn". We make // sure "nnn" is not too big to avoid a denial of service attack when // the SQL statement comes from an external source. // // Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103622:21: */ bp := tls.Alloc(16) defer tls.Free(16) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var z uintptr var x YnVar if pExpr == uintptr(0) { return } z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) if int32(*(*int8)(unsafe.Pointer(z + 1))) == 0 { // Wildcard of the form "?". Assign the next variable number x = libc.PreIncInt16(&(*Parse)(unsafe.Pointer(pParse)).FnVar, 1) } else { var doAdd int32 = 0 if int32(*(*int8)(unsafe.Pointer(z))) == '?' { // Wildcard of the form "?nnn". Convert "nnn" to an integer and // use it as the variable number // var i I64 at bp+8, 8 var bOk int32 if n == U32(2) { //OPTIMIZATION-IF-TRUE *(*I64)(unsafe.Pointer(bp + 8 /* i */)) = I64(int32(*(*int8)(unsafe.Pointer(z + 1))) - '0') // The common case of ?N for a single digit N bOk = 1 } else { bOk = libc.Bool32(0 == Xsqlite3Atoi64(tls, z+1, bp+8, int32(n-U32(1)), uint8(SQLITE_UTF8))) } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 136 + 9*4))) { Xsqlite3ErrorMsg(tls, pParse, ts+8825, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 9*4)))) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) return } x = YnVar(*(*I64)(unsafe.Pointer(bp + 8 /* i */))) if int32(x) > int32((*Parse)(unsafe.Pointer(pParse)).FnVar) { (*Parse)(unsafe.Pointer(pParse)).FnVar = YnVar(int32(x)) doAdd = 1 } else if Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32(x)) == uintptr(0) { doAdd = 1 } } else { // Wildcards like ":aaa", "$aaa" or "@aaa". Reuse the same variable // number as the prior appearance of the same name, or if the name // has never appeared before, reuse the same variable number x = YnVar(Xsqlite3VListNameToNum(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, z, int32(n))) if int32(x) == 0 { x = libc.PreIncInt16(&(*Parse)(unsafe.Pointer(pParse)).FnVar, 1) doAdd = 1 } } if doAdd != 0 { (*Parse)(unsafe.Pointer(pParse)).FpVList = Xsqlite3VListAdd(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpVList, z, int32(n), int32(x)) } } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 136 + 9*4)) { Xsqlite3ErrorMsg(tls, pParse, ts+8868, 0) Xsqlite3RecordErrorOffsetOfExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } } // Recursively delete an expression tree. func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103692:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 && int32((*Expr)(unsafe.Pointer(p)).Fop) != TK_SELECT_COLUMN { sqlite3ExprDeleteNN(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft) } if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { sqlite3ExprDeleteNN(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight) } else if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SelectDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 32))) } else { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 32))) if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WindowDelete(tls, db, *(*uintptr)(unsafe.Pointer(p + 64))) } } } if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_MemToken) != U32(0) { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 8))) } if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Static) != U32(0)) { Xsqlite3DbFreeNN(tls, db, p) } } func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103733:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } } // Arrange to cause pExpr to be deleted when the pParse is deleted. // This is similar to sqlite3ExprDelete() except that the delete is // deferred untilthe pParse is deleted. // // The pExpr might be deleted immediately on an OOM error. // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103748:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103756:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) } sqlite3ExprDeleteNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p) } } // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103770:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 16) } if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Reduced) != U32(0) { return int32(uintptr(0) + 44) } return int32(unsafe.Sizeof(Expr{})) } // The dupedExpr*Size() routines each return the number of bytes required // to store a copy of an expression or expression tree. They differ in // how much of the tree is measured. // // dupedExprStructSize() Size of only the Expr structure // dupedExprNodeSize() Size of Expr + space for token // dupedExprSize() Expr + token + subtree components // // // // The dupedExprStructSize() function returns two values OR-ed together: // (1) the space required for a copy of the Expr structure only and // (2) the EP_xxx flags that indicate what the structure size should be. // The return values is always one of: // // EXPR_FULLSIZE // EXPR_REDUCEDSIZE | EP_Reduced // EXPR_TOKENONLYSIZE | EP_TokenOnly // // The size of the structure can be found by masking the return value // of this routine with 0xfff. The flags can be found by masking the // return value with EP_Reduced|EP_TokenOnly. // // Note that with flags==EXPRDUP_REDUCE, this routines works on full-size // (unreduced) Expr objects as they or originally constructed by the parser. // During expression analysis, extra information is computed and moved into // later parts of the Expr object and that extra information might get chopped // off if the expression is reduced. Note also that it does not work to // make an EXPRDUP_REDUCE copy of a reduced expression. It is only legal // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103810:12: */ var nSize int32 // Only one flag value allowed if 0 == flags || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_SELECT_COLUMN || (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { nSize = int32(unsafe.Sizeof(Expr{})) } else { if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 || *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { nSize = int32(uint64(uintptr(0)+44) | uint64(EP_Reduced)) } else { nSize = int32(uint64(uintptr(0)+16) | uint64(EP_TokenOnly)) } } return nSize } // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103841:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&uint64(0x3fffffff) + uint64(1))) } return (nByte + 7) & libc.CplInt32(7) } // Return the number of bytes required to create a duplicate of the // expression passed as the first argument. The second argument is a // mask containing EXPRDUP_XXX flags. // // The value returned includes space to create a copy of the Expr struct // itself and the buffer referred to by Expr.u.zToken, if any. // // If the EXPRDUP_REDUCE flag is set, then the return value includes // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103862:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) if flags&EXPRDUP_REDUCE != 0 { nByte = nByte + (dupedExprSize(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, flags) + dupedExprSize(tls, (*Expr)(unsafe.Pointer(p)).FpRight, flags)) } } return nByte } // This function is similar to sqlite3ExprDup(), except that if pzBuffer // is not NULL then *pzBuffer is assumed to point to a buffer large enough // to store the copy of expression p, the copies of p->u.zToken // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103881:13: */ bp := tls.Alloc(8) defer tls.Free(8) var pNew uintptr // Value to return // var zAlloc uintptr at bp, 8 // Memory space from which to build Expr object var staticFlag U32 // EP_Static if space not obtained from malloc // Figure out where to write the new Expr structure. if pzBuffer != 0 { *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = *(*uintptr)(unsafe.Pointer(pzBuffer)) staticFlag = U32(EP_Static) } else { *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) = Xsqlite3DbMallocRawNN(tls, db, uint64(dupedExprSize(tls, p, dupFlags))) staticFlag = U32(0) } pNew = *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) if pNew != 0 { // Set nNewSize to the size allocated for the structure pointed to // by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or // EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed // by the copy of the p->u.zToken string (if any). var nStructSize uint32 = uint32(dupedExprStructSize(tls, p, dupFlags)) var nNewSize int32 = int32(nStructSize & uint32(0xfff)) var nToken int32 if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nToken = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))) + 1 } else { nToken = 0 } if dupFlags != 0 { libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)), p, uint64(nNewSize)) } else { var nSize U32 = U32(exprStructSize(tls, p)) libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)), p, uint64(nSize)) if uint64(nSize) < uint64(unsafe.Sizeof(Expr{})) { libc.Xmemset(tls, *(*uintptr)(unsafe.Pointer(bp))+uintptr(nSize), 0, uint64(unsafe.Sizeof(Expr{}))-uint64(nSize)) } } // Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. *(*U32)(unsafe.Pointer(pNew + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Reduced | EP_TokenOnly | EP_Static | EP_MemToken)) *(*U32)(unsafe.Pointer(pNew + 4)) |= nStructSize & uint32(EP_Reduced|EP_TokenOnly) *(*U32)(unsafe.Pointer(pNew + 4)) |= staticFlag if dupFlags != 0 { } // Copy the p->u.zToken string, if any. if nToken != 0 { var zToken uintptr = libc.AssignPtrUintptr(pNew+8, *(*uintptr)(unsafe.Pointer(bp))+uintptr(nNewSize)) libc.Xmemcpy(tls, zToken, *(*uintptr)(unsafe.Pointer(p + 8)), uint64(nToken)) } if U32(0) == ((*Expr)(unsafe.Pointer(p)).Fflags|(*Expr)(unsafe.Pointer(pNew)).Fflags)&U32(EP_TokenOnly|EP_Leaf) { // Fill in the pNew->x.pSelect or pNew->x.pList member. if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { *(*uintptr)(unsafe.Pointer(pNew + 32)) = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(p + 32)), dupFlags) } else { *(*uintptr)(unsafe.Pointer(pNew + 32)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(p + 32)), dupFlags) } } // Fill in pNew->pLeft and pNew->pRight. if (*Expr)(unsafe.Pointer(pNew)).Fflags&U32(EP_Reduced|EP_TokenOnly|EP_WinFunc) != U32(0) { *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) += uintptr(dupedExprNodeSize(tls, p, dupFlags)) if !((*Expr)(unsafe.Pointer(pNew)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { (*Expr)(unsafe.Pointer(pNew)).FpLeft = func() uintptr { if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, EXPRDUP_REDUCE, bp) } return uintptr(0) }() (*Expr)(unsafe.Pointer(pNew)).FpRight = func() uintptr { if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, EXPRDUP_REDUCE, bp) } return uintptr(0) }() } if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_WinFunc) != U32(0) { *(*uintptr)(unsafe.Pointer(pNew + 64)) = Xsqlite3WindowDup(tls, db, pNew, *(*uintptr)(unsafe.Pointer(p + 64))) } if pzBuffer != 0 { *(*uintptr)(unsafe.Pointer(pzBuffer)) = *(*uintptr)(unsafe.Pointer(bp /* zAlloc */)) } } else { if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { if int32((*Expr)(unsafe.Pointer(pNew)).Fop) == TK_SELECT_COLUMN { (*Expr)(unsafe.Pointer(pNew)).FpLeft = (*Expr)(unsafe.Pointer(p)).FpLeft } else { (*Expr)(unsafe.Pointer(pNew)).FpLeft = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, 0) } (*Expr)(unsafe.Pointer(pNew)).FpRight = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, 0) } } } return pNew } // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:103991:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(p)).FnCte-1)) pRet = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if pRet != 0 { var i int32 (*With)(unsafe.Pointer(pRet)).FnCte = (*With)(unsafe.Pointer(p)).FnCte for i = 0; i < (*With)(unsafe.Pointer(p)).FnCte; i++ { (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FpSelect = Xsqlite3SelectDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FpSelect, 0) (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FpCols = Xsqlite3ExprListDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FpCols, 0) (*Cte)(unsafe.Pointer(pRet + 16 + uintptr(i)*48)).FzName = Xsqlite3DbStrDup(tls, db, (*Cte)(unsafe.Pointer(p+16+uintptr(i)*48)).FzName) } } } return pRet } // The gatherSelectWindows() procedure and its helper routine // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104019:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) Xsqlite3WindowLink(tls, pSelect, pWin) } return WRC_Continue } func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104030:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } return WRC_Prune } func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104033:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{gatherSelectWindowsCallback})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{gatherSelectWindowsSelectCallback})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = p Xsqlite3WalkSelect(tls, bp, p) } // The following group of routines make deep copies of expressions, // expression lists, ID lists, and select statements. The copies can // be deleted (by being passed to their respective ...Delete() routines) // without effecting the originals. // // The expression list, ID, and source lists return by sqlite3ExprListDup(), // sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded // by subsequent calls to sqlite*ListAppend() routines. // // Any tables that the SrcList might point to are not duplicated. // // The flags parameter contains a combination of the EXPRDUP_XXX flags. // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104062:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) } return uintptr(0) } func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104066:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr var i int32 var pPriorSelectColOld uintptr = uintptr(0) var pPriorSelectColNew uintptr = uintptr(0) if p == uintptr(0) { return uintptr(0) } pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(Xsqlite3DbMallocSize(tls, db, p))) if pNew == uintptr(0) { return uintptr(0) } (*ExprList)(unsafe.Pointer(pNew)).FnExpr = (*ExprList)(unsafe.Pointer(p)).FnExpr (*ExprList)(unsafe.Pointer(pNew)).FnAlloc = (*ExprList)(unsafe.Pointer(p)).FnAlloc pItem = pNew + 8 /* &.a */ pOldItem = p + 8 /* &.a */ i = 0 __1: if !(i < (*ExprList)(unsafe.Pointer(p)).FnExpr) { goto __3 } { var pOldExpr uintptr = (*ExprList_item)(unsafe.Pointer(pOldItem)).FpExpr var pNewExpr uintptr (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = Xsqlite3ExprDup(tls, db, pOldExpr, flags) if pOldExpr != 0 && int32((*Expr)(unsafe.Pointer(pOldExpr)).Fop) == TK_SELECT_COLUMN && libc.AssignUintptr(&pNewExpr, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) != uintptr(0) { if (*Expr)(unsafe.Pointer(pNewExpr)).FpRight != 0 { pPriorSelectColOld = (*Expr)(unsafe.Pointer(pOldExpr)).FpRight pPriorSelectColNew = (*Expr)(unsafe.Pointer(pNewExpr)).FpRight (*Expr)(unsafe.Pointer(pNewExpr)).FpLeft = (*Expr)(unsafe.Pointer(pNewExpr)).FpRight } else { if (*Expr)(unsafe.Pointer(pOldExpr)).FpLeft != pPriorSelectColOld { pPriorSelectColOld = (*Expr)(unsafe.Pointer(pOldExpr)).FpLeft pPriorSelectColNew = Xsqlite3ExprDup(tls, db, pPriorSelectColOld, flags) (*Expr)(unsafe.Pointer(pNewExpr)).FpRight = pPriorSelectColNew } (*Expr)(unsafe.Pointer(pNewExpr)).FpLeft = pPriorSelectColNew } } (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer(pOldItem)).FzEName) (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = (*ExprList_item)(unsafe.Pointer(pOldItem)).FsortFlags libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x3>>0)), 0, 0x3) libc.SetBitFieldPtr8Uint32(pItem+20, uint32(0), 2, 0x4) libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x20>>5)), 5, 0x20) libc.SetBitFieldPtr8Uint32(pItem+20, uint32(int32(*(*uint8)(unsafe.Pointer(pOldItem + 20))&0x10>>4)), 4, 0x10) (*ExprList_item)(unsafe.Pointer(pItem)).Fu = (*ExprList_item)(unsafe.Pointer(pOldItem)).Fu } goto __2 __2: i++ pItem += 32 pOldItem += 32 goto __1 goto __3 __3: ; return pNew } // If cursors, triggers, views and subqueries are all omitted from // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104121:24: */ var pNew uintptr var i int32 var nByte int32 if p == uintptr(0) { return uintptr(0) } nByte = int32(uint64(unsafe.Sizeof(SrcList{})) + func() uint64 { if (*SrcList)(unsafe.Pointer(p)).FnSrc > 0 { return uint64(unsafe.Sizeof(SrcItem{})) * uint64((*SrcList)(unsafe.Pointer(p)).FnSrc-1) } return uint64(0) }()) pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(nByte)) if pNew == uintptr(0) { return uintptr(0) } (*SrcList)(unsafe.Pointer(pNew)).FnSrc = int32(libc.AssignPtrUint32(pNew+4, U32((*SrcList)(unsafe.Pointer(p)).FnSrc))) for i = 0; i < (*SrcList)(unsafe.Pointer(p)).FnSrc; i++ { var pNewItem uintptr = pNew + 8 + uintptr(i)*112 var pOldItem uintptr = p + 8 + uintptr(i)*112 var pTab uintptr (*SrcItem)(unsafe.Pointer(pNewItem)).FpSchema = (*SrcItem)(unsafe.Pointer(pOldItem)).FpSchema (*SrcItem)(unsafe.Pointer(pNewItem)).FzDatabase = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzDatabase) (*SrcItem)(unsafe.Pointer(pNewItem)).FzName = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzName) (*SrcItem)(unsafe.Pointer(pNewItem)).FzAlias = Xsqlite3DbStrDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FzAlias) (*SrcItem)(unsafe.Pointer(pNewItem)).Ffg = (*SrcItem)(unsafe.Pointer(pOldItem)).Ffg (*SrcItem)(unsafe.Pointer(pNewItem)).FiCursor = (*SrcItem)(unsafe.Pointer(pOldItem)).FiCursor (*SrcItem)(unsafe.Pointer(pNewItem)).FaddrFillSub = (*SrcItem)(unsafe.Pointer(pOldItem)).FaddrFillSub (*SrcItem)(unsafe.Pointer(pNewItem)).FregReturn = (*SrcItem)(unsafe.Pointer(pOldItem)).FregReturn if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x2>>1)) != 0 { *(*uintptr)(unsafe.Pointer(pNewItem + 96)) = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96))) } (*SrcItem)(unsafe.Pointer(pNewItem)).Fu2 = (*SrcItem)(unsafe.Pointer(pOldItem)).Fu2 if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x80>>7)) != 0 { (*CteUse)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNewItem + 104)))).FnUse++ } if uint32(int32(*(*uint16)(unsafe.Pointer(pNewItem + 60 + 4))&0x4>>2)) != 0 { *(*uintptr)(unsafe.Pointer(pNewItem + 96)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(pOldItem + 96)), flags) } pTab = libc.AssignPtrUintptr(pNewItem+32, (*SrcItem)(unsafe.Pointer(pOldItem)).FpTab) if pTab != 0 { (*Table)(unsafe.Pointer(pTab)).FnTabRef++ } (*SrcItem)(unsafe.Pointer(pNewItem)).FpSelect = Xsqlite3SelectDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpSelect, flags) (*SrcItem)(unsafe.Pointer(pNewItem)).FpOn = Xsqlite3ExprDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpOn, flags) (*SrcItem)(unsafe.Pointer(pNewItem)).FpUsing = Xsqlite3IdListDup(tls, db, (*SrcItem)(unsafe.Pointer(pOldItem)).FpUsing) (*SrcItem)(unsafe.Pointer(pNewItem)).FcolUsed = (*SrcItem)(unsafe.Pointer(pOldItem)).FcolUsed } return pNew } func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104165:23: */ var pNew uintptr var i int32 if p == uintptr(0) { return uintptr(0) } pNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(IdList{}))) if pNew == uintptr(0) { return uintptr(0) } (*IdList)(unsafe.Pointer(pNew)).FnId = (*IdList)(unsafe.Pointer(p)).FnId (*IdList)(unsafe.Pointer(pNew)).Fa = Xsqlite3DbMallocRawNN(tls, db, uint64((*IdList)(unsafe.Pointer(p)).FnId)*uint64(unsafe.Sizeof(IdList_item{}))) if (*IdList)(unsafe.Pointer(pNew)).Fa == uintptr(0) { Xsqlite3DbFreeNN(tls, db, pNew) return uintptr(0) } // Note that because the size of the allocation for p->a[] is not // necessarily a power of two, sqlite3IdListAppend() may not be called // on the duplicate created by this function. for i = 0; i < (*IdList)(unsafe.Pointer(p)).FnId; i++ { var pNewItem uintptr = (*IdList)(unsafe.Pointer(pNew)).Fa + uintptr(i)*16 var pOldItem uintptr = (*IdList)(unsafe.Pointer(p)).Fa + uintptr(i)*16 (*IdList_item)(unsafe.Pointer(pNewItem)).FzName = Xsqlite3DbStrDup(tls, db, (*IdList_item)(unsafe.Pointer(pOldItem)).FzName) (*IdList_item)(unsafe.Pointer(pNewItem)).Fidx = (*IdList_item)(unsafe.Pointer(pOldItem)).Fidx } return pNew } func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104189:23: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(0) var pNext uintptr = uintptr(0) var pp uintptr = bp /* &pRet */ var p uintptr for p = pDup; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { var pNew uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Select{}))) if pNew == uintptr(0) { break } (*Select)(unsafe.Pointer(pNew)).FpEList = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpEList, flags) (*Select)(unsafe.Pointer(pNew)).FpSrc = Xsqlite3SrcListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpSrc, flags) (*Select)(unsafe.Pointer(pNew)).FpWhere = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWhere, flags) (*Select)(unsafe.Pointer(pNew)).FpGroupBy = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpGroupBy, flags) (*Select)(unsafe.Pointer(pNew)).FpHaving = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpHaving, flags) (*Select)(unsafe.Pointer(pNew)).FpOrderBy = Xsqlite3ExprListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpOrderBy, flags) (*Select)(unsafe.Pointer(pNew)).Fop = (*Select)(unsafe.Pointer(p)).Fop (*Select)(unsafe.Pointer(pNew)).FpNext = pNext (*Select)(unsafe.Pointer(pNew)).FpPrior = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpLimit = Xsqlite3ExprDup(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit, flags) (*Select)(unsafe.Pointer(pNew)).FiLimit = 0 (*Select)(unsafe.Pointer(pNew)).FiOffset = 0 (*Select)(unsafe.Pointer(pNew)).FselFlags = (*Select)(unsafe.Pointer(p)).FselFlags & libc.Uint32FromInt32(libc.CplInt32(SF_UsesEphemeral)) *(*int32)(unsafe.Pointer(pNew + 20)) = -1 *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -1 (*Select)(unsafe.Pointer(pNew)).FnSelectRow = (*Select)(unsafe.Pointer(p)).FnSelectRow (*Select)(unsafe.Pointer(pNew)).FpWith = Xsqlite3WithDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWith) (*Select)(unsafe.Pointer(pNew)).FpWin = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpWinDefn = Xsqlite3WindowListDup(tls, db, (*Select)(unsafe.Pointer(p)).FpWinDefn) if (*Select)(unsafe.Pointer(p)).FpWin != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { gatherSelectWindows(tls, pNew) } (*Select)(unsafe.Pointer(pNew)).FselId = (*Select)(unsafe.Pointer(p)).FselId if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { // Any prior OOM might have left the Select object incomplete. // Delete the whole thing rather than allow an incomplete Select // to be used by the code generator. (*Select)(unsafe.Pointer(pNew)).FpNext = uintptr(0) Xsqlite3SelectDelete(tls, db, pNew) break } *(*uintptr)(unsafe.Pointer(pp)) = pNew pp = pNew + 80 pNext = pNew } return *(*uintptr)(unsafe.Pointer(bp /* pRet */)) } // Add a new element to the end of an expression list. If pList is // initially NULL, then create a new expression list. // // The pList argument must be either NULL or a pointer to an ExprList // obtained from a prior call to sqlite3ExprListAppend(). This routine // may not be used with an ExprList obtained from sqlite3ExprListDup(). // Reason: This routine assumes that the number of slots in pList->a[] // is a power of two. That is true for sqlite3ExprListAppend() returns // but is not necessarily true from the return value of sqlite3ExprListDup(). // // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. var zeroItem = ExprList_item{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104260:35 */ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104261:41: */ var pItem uintptr var pList uintptr pList = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(ExprList{}))+uint64(unsafe.Sizeof(ExprList_item{}))*uint64(4)) if pList == uintptr(0) { Xsqlite3ExprDelete(tls, db, pExpr) return uintptr(0) } (*ExprList)(unsafe.Pointer(pList)).FnAlloc = 4 (*ExprList)(unsafe.Pointer(pList)).FnExpr = 1 pItem = pList + 8 *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr return pList } func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104280:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 pNew = Xsqlite3DbRealloc(tls, db, pList, uint64(unsafe.Sizeof(ExprList{}))+uint64((*ExprList)(unsafe.Pointer(pList)).FnAlloc-1)*uint64(unsafe.Sizeof(ExprList_item{}))) if pNew == uintptr(0) { Xsqlite3ExprListDelete(tls, db, pList) Xsqlite3ExprDelete(tls, db, pExpr) return uintptr(0) } else { pList = pNew } pItem = pList + 8 + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32 *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr return pList } func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104302:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } if (*ExprList)(unsafe.Pointer(pList)).FnAlloc < (*ExprList)(unsafe.Pointer(pList)).FnExpr+1 { return Xsqlite3ExprListAppendGrow(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList, pExpr) } pItem = pList + 8 + uintptr(libc.PostIncInt32(&(*ExprList)(unsafe.Pointer(pList)).FnExpr, 1))*32 *(*ExprList_item)(unsafe.Pointer(pItem)) = zeroItem (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pExpr return pList } // pColumns and pExpr form a vector assignment which is part of the SET // clause of an UPDATE statement. Like this: // // (a,b,c) = (expr1,expr2,expr3) // Or: (a,b,c) = (SELECT x,y,z FROM ....) // // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104331:25: */ bp := tls.Alloc(16) defer tls.Free(16) var db uintptr var n int32 var i int32 var iFirst int32 var pSubExpr uintptr var pFirst uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { iFirst = (*ExprList)(unsafe.Pointer(pList)).FnExpr } else { iFirst = 0 } // pColumns can only be NULL due to an OOM but an OOM will cause an // exit prior to this routine being invoked if !(pColumns == uintptr(0)) { goto __1 } goto vector_append_error __1: ; if !(pExpr == uintptr(0)) { goto __2 } goto vector_append_error __2: ; // If the RHS is a vector, then we can immediately check to see that // the size of the RHS and LHS match. But if the RHS is a SELECT, // wildcards ("*") in the result set of the SELECT must be expanded before // we can do the size check, so defer the size check until code generation. if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT && (*IdList)(unsafe.Pointer(pColumns)).FnId != libc.AssignInt32(&n, Xsqlite3ExprVectorSize(tls, pExpr))) { goto __3 } Xsqlite3ErrorMsg(tls, pParse, ts+8891, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: ; i = 0 __4: if !(i < (*IdList)(unsafe.Pointer(pColumns)).FnId) { goto __6 } pSubExpr = Xsqlite3ExprForVectorField(tls, pParse, pExpr, i, (*IdList)(unsafe.Pointer(pColumns)).FnId) if !(pSubExpr == uintptr(0)) { goto __7 } goto __5 __7: ; pList = Xsqlite3ExprListAppend(tls, pParse, pList, pSubExpr) if !(pList != 0) { goto __8 } (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32)).FzEName = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumns)).Fa + uintptr(i)*16)).FzName (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumns)).Fa + uintptr(i)*16)).FzName = uintptr(0) __8: ; goto __5 __5: i++ goto __4 goto __6 __6: ; if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT && pList != uintptr(0)) { goto __9 } pFirst = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(iFirst)*32)).FpExpr // Store the SELECT statement in pRight so it will be deleted when // sqlite3ExprListDelete() is called (*Expr)(unsafe.Pointer(pFirst)).FpRight = pExpr pExpr = uintptr(0) // Remember the size of the LHS in iTable so that we can check that // the RHS and LHS sizes match during code generation. (*Expr)(unsafe.Pointer(pFirst)).FiTable = (*IdList)(unsafe.Pointer(pColumns)).FnId __9: ; vector_append_error: Xsqlite3ExprUnmapAndDelete(tls, pParse, pExpr) Xsqlite3IdListDelete(tls, db, pColumns) return pList } // Set the sort order for the last element on the given ExprList. func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104393:21: */ var pItem uintptr if p == uintptr(0) { return } pItem = p + 8 + uintptr((*ExprList)(unsafe.Pointer(p)).FnExpr-1)*32 if iSortOrder == -1 { iSortOrder = SQLITE_SO_ASC } (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags = U8(iSortOrder) if eNulls != -1 { libc.SetBitFieldPtr8Uint32(pItem+20, uint32(1), 5, 0x20) if iSortOrder != eNulls { *(*U8)(unsafe.Pointer(pItem + 16)) |= U8(KEYINFO_ORDER_BIGNULL) } } } // Set the ExprList.a[].zEName element of the most recently added item // on the expression list. // // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104431:21: */ if pList != 0 { var pItem uintptr pItem = pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32 (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) if dequote != 0 { // If dequote==0, then pName->z does not point to part of a DDL // statement handled by the parser. And so no token need be added // to the token-map. Xsqlite3Dequote(tls, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameTokenMap(tls, pParse, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName, pName) } } } } // Set the ExprList.a[].zSpan element of the most recently added item // on the expression list. // // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104466:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { var pItem uintptr = pList + 8 + uintptr((*ExprList)(unsafe.Pointer(pList)).FnExpr-1)*32 if (*ExprList_item)(unsafe.Pointer(pItem)).FzEName == uintptr(0) { (*ExprList_item)(unsafe.Pointer(pItem)).FzEName = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) libc.SetBitFieldPtr8Uint32(pItem+20, uint32(ENAME_SPAN), 0, 0x3) } } } // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104488:21: */ bp := tls.Alloc(8) defer tls.Free(8) var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { Xsqlite3ErrorMsg(tls, pParse, ts+8921, libc.VaList(bp, zObject)) } } // Delete an entire expression list. func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104504:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ for __ccgo := true; __ccgo; __ccgo = libc.PreDecInt32(&i, 1) > 0 { Xsqlite3ExprDelete(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pItem)).FzEName) pItem += 32 } Xsqlite3DbFreeNN(tls, db, pList) } func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104515:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } } // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104523:20: */ var i int32 var m U32 = U32(0) for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr m = m | (*Expr)(unsafe.Pointer(pExpr)).Fflags } return m } // This is a SELECT-node callback for the expression walker that // always "fails". By "fail" in this case, we mean set // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104542:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort } // Check the input string to see if it is "true" or "false" (in any case). // // If the string is.... Return // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104556:20: */ if Xsqlite3StrICmp(tls, zIn, ts+7998) == 0 { return U32(EP_IsTrue) } if Xsqlite3StrICmp(tls, zIn, ts+8003) == 0 { return U32(EP_IsFalse) } return U32(0) } // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104568:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && libc.AssignUint32(&v, Xsqlite3IsTrueOrFalse(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) != U32(0) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) *(*U32)(unsafe.Pointer(pExpr + 4)) |= v return 1 } return 0 } // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104585:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) } // If pExpr is an AND or OR expression, try to simplify it by eliminating // terms that are always true or false. Return the simplified expression. // Or return the original expression if no simplification is possible. // // Examples: // // (x<10) AND true => (x<10) // (x<10) AND false => false // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104607:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) var pLeft uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue) || (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND { pExpr = pRight } else { pExpr = pLeft } } else if (*Expr)(unsafe.Pointer(pRight)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue) || (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse) { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND { pExpr = pLeft } else { pExpr = pRight } } } return pExpr } // These routines are Walker callbacks used to check expressions to // see if they are "constant" for some definition of constant. The // Walker.eCode value determines the type of "constant" we are looking // for. // // These callback routines are used to implement the following: // // sqlite3ExprIsConstant() pWalker->eCode==1 // sqlite3ExprIsConstantNotJoin() pWalker->eCode==2 // sqlite3ExprIsTableConstant() pWalker->eCode==3 // sqlite3ExprIsConstantOrFunction() pWalker->eCode==4 or 5 // // In all cases, the callbacks set Walker.eCode=0 and abort if the expression // is found to not be a constant. // // The sqlite3ExprIsConstantOrFunction() is used for evaluating DEFAULT // expressions in a CREATE TABLE statement. The Walker.eCode value is 5 // when parsing an existing schema out of the sqlite_schema table and 4 // when processing a new CREATE TABLE statement. A bound parameter raises // an error for new statements, but is silently converted // to NULL for existing schemas. This allows sqlite_schema tables that // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104648:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression // from being considered constant. if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 2 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort } switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { // Consider functions to be constant if all their arguments are constant // and either pWalker->eCode==4 or 5 or the function has the // SQLITE_FUNC_CONST flag. case TK_FUNCTION: if (int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) >= 4 || (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 5 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) } return WRC_Continue } else { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort } fallthrough case TK_ID: // Convert "true" or "false" in a DEFAULT clause into the // appropriate TK_TRUEFALSE operator if Xsqlite3ExprIdToTrueFalse(tls, pExpr) != 0 { return WRC_Prune } fallthrough case TK_COLUMN: fallthrough case TK_AGG_FUNCTION: fallthrough case TK_AGG_COLUMN: if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0) && int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) != 2 { return WRC_Continue } if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 3 && (*Expr)(unsafe.Pointer(pExpr)).FiTable == *(*int32)(unsafe.Pointer(pWalker + 40)) { return WRC_Continue } fallthrough case TK_IF_NULL_ROW: fallthrough case TK_REGISTER: fallthrough case TK_DOT: (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort case TK_VARIABLE: if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 5 { // Silently convert bound parameters that appear inside of CREATE // statements into a NULL when parsing the CREATE statement text out // of the sqlite_schema table (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 4 { // A bound parameter in a CREATE statement that originates from // sqlite3_prepare() causes an error (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort } fallthrough default: // sqlite3SelectWalkFail() disallows // sqlite3SelectWalkFail() disallows return WRC_Continue } return int32(0) } func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104720:12: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(initFlag) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprNodeIsConstant})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkFail})) *(*int32)(unsafe.Pointer(bp + 40)) = iCur Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } // Walk an expression tree. Return non-zero if the expression is constant // and 0 if it involves variables or function calls. // // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104741:20: */ return exprIsConst(tls, p, 1, 0) } // Walk an expression tree. Return non-zero if // // (1) the expression is constant, and // (2) the expression does originate in the ON or USING clause // of a LEFT JOIN, and // (3) the expression does not contain any EP_FixedCol TK_COLUMN // operands created by the constant propagation optimization. // // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104758:20: */ return exprIsConst(tls, p, 2, 0) } // Walk an expression tree. Return non-zero if the expression is constant // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104768:20: */ return exprIsConst(tls, p, 3, iCur) } // Check pExpr to see if it is an invariant constraint on data source pSrc. // This is an optimization. False negatives will perhaps cause slower // queries, but false positives will yield incorrect answers. So when in // double, return 0. // // To be an invariant constraint, the following must be true: // // (1) pExpr cannot refer to any table other than pSrc->iCursor. // // (2) pExpr cannot use subqueries or non-deterministic functions. // // (*) ** Not applicable to this branch ** // // (4) If pSrc is the right operand of a LEFT JOIN, then... // (4a) pExpr must come from an ON clause.. // (4b) and specifically the ON clause associated with the LEFT JOIN. // // (5) If pSrc is not the right operand of a LEFT JOIN or the left // operand of a RIGHT JOIN, then pExpr must be from the WHERE // clause, not an ON clause. func Xsqlite3ExprIsTableConstraint(tls *libc.TLS, pExpr uintptr, pSrc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104794:20: */ if int32((*SrcItem)(unsafe.Pointer(pSrc)).Ffg.Fjointype)&JT_LEFT != 0 { if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0)) { return 0 } // rule (4a) if *(*int32)(unsafe.Pointer(pExpr + 52)) != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 } // rule (4b) } else { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return 0 } // rule (5) } return Xsqlite3ExprIsTableConstant(tls, pExpr, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor) // rules (1), (2) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104808:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var i int32 // Check if pExpr is identical to any GROUP BY term. If so, consider // it constant. for i = 0; i < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr; i++ { var p uintptr = (*ExprList_item)(unsafe.Pointer(pGroupBy + 8 + uintptr(i)*32)).FpExpr if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, p, -1) < 2 { var pColl uintptr = Xsqlite3ExprNNCollSeq(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p) if Xsqlite3IsBinary(tls, pColl) != 0 { return WRC_Prune } } } // Check if pExpr is a sub-select. If so, consider it variable. if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort } return exprNodeIsConstant(tls, pWalker, pExpr) } // Walk the expression tree passed as the first argument. Return non-zero // if the expression consists entirely of constants or copies of terms // in pGroupBy that sort with the BINARY collation sequence. // // This routine is used to determine if a term of the HAVING clause can // be promoted into the WHERE clause. In order for such a promotion to work, // the value of the HAVING clause term must be the same for all members of // a "group". The requirement that the GROUP BY term must be BINARY // assumes that no other collating sequence will have a finer-grained // grouping than binary. In other words (A=B COLLATE binary) implies // A=B in every other collating sequence. The requirement that the // GROUP BY be BINARY is stricter than necessary. It would also work // to promote HAVING clauses that use the same alternative collating // sequence as the GROUP BY term, but that is much harder to check, // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104852:20: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(1) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprNodeIsConstantOrGroupBy})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40)) = pGroupBy (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } // Walk an expression tree for the DEFAULT field of a column definition // in a CREATE TABLE statement. Return non-zero if the expression is // acceptable for use as a DEFAULT. That is to say, return non-zero if // the expression is constant or a function call with constant arguments. // Return and 0 if there are any variables. // // isInit is true when parsing from sqlite_schema. isInit is false when // processing a new CREATE TABLE statement. When isInit is true, parameters // (such as ? or $abc) in the expression are converted into NULL. When // isInit is false, parameters raise an error. Parameters should not be // allowed in a CREATE TABLE statement, but some legacy versions of SQLite // allowed it, so we need to support it when reading sqlite_schema for // backwards compatibility. // // If isInit is true, set EP_FromDDL on every TK_FUNCTION node. // // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104884:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } // If the expression p codes a constant integer that is small enough // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104913:20: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = 0 if p == uintptr(0) { return 0 } // Used to only happen following on OOM // If an expression is an integer literal that fits in a signed 32-bit // integer, then the EP_IntValue flag will have already been set if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != 0 { *(*int32)(unsafe.Pointer(pValue)) = *(*int32)(unsafe.Pointer(p + 8)) return 1 } switch int32((*Expr)(unsafe.Pointer(p)).Fop) { case TK_UPLUS: { rc = Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, pValue) break } case TK_UMINUS: { *(*int32)(unsafe.Pointer(bp /* v */)) = 0 if Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, bp) != 0 { *(*int32)(unsafe.Pointer(pValue)) = -*(*int32)(unsafe.Pointer(bp /* v */)) rc = 1 } break } default: break } return rc } // Return FALSE if there is no chance that the expression can be NULL. // // If the expression might be NULL or if the expression is too complex // to tell return TRUE. // // This routine is used as an optimization, to skip OP_IsNull opcodes // when we know that a value cannot be NULL. Hence, a false positive // (returning TRUE when in fact the expression can never be NULL) might // be a small performance hit but is otherwise harmless. On the other // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104959:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { p = (*Expr)(unsafe.Pointer(p)).FpLeft } op = (*Expr)(unsafe.Pointer(p)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(p)).Fop2 } switch int32(op) { case TK_INTEGER: fallthrough case TK_STRING: fallthrough case TK_FLOAT: fallthrough case TK_BLOB: return 0 case TK_COLUMN: return libc.Bool32((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_CanBeNull) != U32(0) || *(*uintptr)(unsafe.Pointer(p + 64)) == uintptr(0) || int32((*Expr)(unsafe.Pointer(p)).FiColumn) >= 0 && (*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol != uintptr(0) && int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 64)))).FaCol + uintptr((*Expr)(unsafe.Pointer(p)).FiColumn)*24 + 8))&0xf>>0) == 0) default: return 1 } return int32(0) } // Return TRUE if the given expression is a constant which would be // unchanged by OP_Affinity with the affinity given in the second // argument. // // This routine is used to determine if the OP_Affinity operation // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:104996:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { return 1 } for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { unaryMinus = 1 } p = (*Expr)(unsafe.Pointer(p)).FpLeft } op = (*Expr)(unsafe.Pointer(p)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(p)).Fop2 } switch int32(op) { case TK_INTEGER: { return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC) } case TK_FLOAT: { return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC) } case TK_STRING: { return libc.Bool32(!(unaryMinus != 0) && int32(aff) == SQLITE_AFF_TEXT) } case TK_BLOB: { return libc.BoolInt32(!(unaryMinus != 0)) } case TK_COLUMN: { // p cannot be part of a CHECK constraint return libc.Bool32(int32(aff) >= SQLITE_AFF_NUMERIC && int32((*Expr)(unsafe.Pointer(p)).FiColumn) < 0) } default: { return 0 } } return int32(0) } // Return TRUE if the given string is a row-id column name. func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105032:20: */ if Xsqlite3StrICmp(tls, z, ts+8944) == 0 { return 1 } if Xsqlite3StrICmp(tls, z, ts+8952) == 0 { return 1 } if Xsqlite3StrICmp(tls, z, ts+8958) == 0 { return 1 } return 0 } // pX is the RHS of an IN operator. If pX is a SELECT statement // that can be simplified to a direct table access, then return // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105047:15: */ var p uintptr var pSrc uintptr var pEList uintptr var pTab uintptr var i int32 if !((*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0)) { return uintptr(0) } // Not a subquery if (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_VarSelect) != U32(0) { return uintptr(0) } // Correlated subq p = *(*uintptr)(unsafe.Pointer(pX + 32)) if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { return uintptr(0) } // Not a compound SELECT if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct|SF_Aggregate) != 0 { return uintptr(0) // No DISTINCT keyword and no aggregate functions } // Has no GROUP BY clause if (*Select)(unsafe.Pointer(p)).FpLimit != 0 { return uintptr(0) } // Has no LIMIT clause if (*Select)(unsafe.Pointer(p)).FpWhere != 0 { return uintptr(0) } // Has no WHERE clause pSrc = (*Select)(unsafe.Pointer(p)).FpSrc if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc != 1 { return uintptr(0) } // Single term in FROM clause if (*SrcItem)(unsafe.Pointer(pSrc+8)).FpSelect != 0 { return uintptr(0) } // FROM is not a subquery or view pTab = (*SrcItem)(unsafe.Pointer(pSrc + 8)).FpTab // FROM clause is not a view if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return uintptr(0) } // FROM clause not a virtual table pEList = (*Select)(unsafe.Pointer(p)).FpEList // All SELECT results must be columns. for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { var pRes uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr if int32((*Expr)(unsafe.Pointer(pRes)).Fop) != TK_COLUMN { return uintptr(0) } // Not a correlated subquery } return p } // Generate code that checks the left-most column of index table iCur to see if // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105092:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iCur, 0, regHasNull) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) Xsqlite3VdbeJumpHere(tls, v, addr1) } // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105109:12: */ var pLHS uintptr var res int32 pLHS = (*Expr)(unsafe.Pointer(pIn)).FpLeft (*Expr)(unsafe.Pointer(pIn)).FpLeft = uintptr(0) res = Xsqlite3ExprIsConstant(tls, pIn) (*Expr)(unsafe.Pointer(pIn)).FpLeft = pLHS return res } // This function is used by the implementation of the IN (...) operator. // The pX parameter is the expression on the RHS of the IN operator, which // might be either a list of expressions or a subquery. // // The job of this routine is to find or create a b-tree object that can // be used either to test for membership in the RHS set or to iterate through // all members of the RHS set, skipping duplicates. // // A cursor is opened on the b-tree object that is the RHS of the IN operator // and pX->iTable is set to the index of that cursor. // // The returned value of this function indicates the b-tree type, as follows: // // IN_INDEX_ROWID - The cursor was opened on a database table. // IN_INDEX_INDEX_ASC - The cursor was opened on an ascending index. // IN_INDEX_INDEX_DESC - The cursor was opened on a descending index. // IN_INDEX_EPH - The cursor was opened on a specially created and // populated epheremal table. // IN_INDEX_NOOP - No cursor was allocated. The IN operator must be // implemented as a sequence of comparisons. // // An existing b-tree might be used if the RHS expression pX is a simple // subquery such as: // // SELECT <column1>, <column2>... FROM <table> // // If the RHS of the IN operator is a list or a more complex subquery, then // an ephemeral table might need to be generated from the RHS and then // pX->iTable made to point to the ephemeral table instead of an // existing table. // // The inFlags parameter must contain, at a minimum, one of the bits // IN_INDEX_MEMBERSHIP or IN_INDEX_LOOP but not both. If inFlags contains // IN_INDEX_MEMBERSHIP, then the generated table will be used for a fast // membership test. When the IN_INDEX_LOOP bit is set, the IN index will // be used to loop over all values of the RHS of the IN operator. // // When IN_INDEX_LOOP is used (and the b-tree will be used to iterate // through the set members) then the b-tree must not contain duplicates. // An epheremal table will be created unless the selected columns are guaranteed // to be unique - either because it is an INTEGER PRIMARY KEY or due to // a UNIQUE constraint or index. // // When IN_INDEX_MEMBERSHIP is used (and the b-tree will be used // for fast set membership tests) then an epheremal table must // be used unless <columns> is a single INTEGER PRIMARY KEY column or an // index can be found with the specified <columns> as its left-most. // // If the IN_INDEX_NOOP_OK and IN_INDEX_MEMBERSHIP are both set and // if the RHS of the IN operator is a list (not a subquery) then this // routine might decide that creating an ephemeral b-tree for membership // testing is too expensive and return IN_INDEX_NOOP. In that case, the // calling routine should implement the IN operator using a sequence // of Eq or Ne comparison operations. // // When the b-tree is being used for membership tests, the calling function // might need to know whether or not the RHS side of the IN operator // contains a NULL. If prRhsHasNull is not a NULL pointer and // if there is any chance that the (...) might contain a NULL value at // runtime, then a register is allocated and the register number written // to *prRhsHasNull. If there is no chance that the (...) contains a // NULL value, then *prRhsHasNull is left unchanged. // // If a register is allocated and its location stored in *prRhsHasNull, then // the value in that register will be NULL if the b-tree contains one or more // NULL values, and it will be some non-NULL value if the b-tree contains no // NULL values. // // If the aiMap parameter is not NULL, it must point to an array containing // one element for each column returned by the SELECT statement on the RHS // of the IN(...) operator. The i'th entry of the array is populated with the // offset of the index column that matches the i'th column returned by the // SELECT. For example, if the expression and selected index are: // // (?,?,?) IN (SELECT a, b, c FROM t1) // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105202:20: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr // SELECT to the right of IN operator var eType int32 = 0 // Type of RHS table. IN_INDEX_* var iTab int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Cursor of the RHS table var mustBeUnique int32 // True if RHS must be unique var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Virtual machine being coded mustBeUnique = libc.Bool32(inFlags&U32(IN_INDEX_LOOP) != U32(0)) // If the RHS of this IN(...) operator is a SELECT, and if it matters // whether or not the SELECT result contains NULL values, check whether // or not NULL is actually possible (it may not be, for example, due // to NOT NULL constraints in the schema). If no NULL values are possible, // set prRhsHasNull to 0 before continuing. if prRhsHasNull != 0 && (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0) { var i int32 var pEList uintptr = (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pX + 32)))).FpEList for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) != 0 { break } } if i == (*ExprList)(unsafe.Pointer(pEList)).FnExpr { prRhsHasNull = uintptr(0) } } // Check to see if an existing table or index can be used to // satisfy the query. This is preferable to generating a new // ephemeral table. if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && libc.AssignUintptr(&p, isCandidateForInOpt(tls, pX)) != uintptr(0) { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection var pTab uintptr // Table <table>. var iDb int32 // Database idx for pTab var pEList uintptr = (*Select)(unsafe.Pointer(p)).FpEList var nExpr int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr // Because of isCandidateForInOpt(p) // Because of isCandidateForInOpt(p) // Because of isCandidateForInOpt(p) pTab = (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab // Code an OP_Transaction and OP_TableLock for <table>. iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3CodeVerifySchema(tls, pParse, iDb) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) // sqlite3GetVdbe() has always been previously called if nExpr == 1 && int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr)).FiColumn) < 0 { // The "x IN (SELECT rowid FROM table)" case var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8962, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr // Iterator variable var affinity_ok int32 = 1 var i int32 // Check that the affinity that will be used to perform each // comparison is the same as the affinity of each column in table // on the RHS of the IN operator. If it not, it is not possible to // use any index of the RHS table. for i = 0; i < nExpr && affinity_ok != 0; i++ { var pLhs uintptr = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft, i) var iCol int32 = int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr)).FiColumn) var idxaff int8 = Xsqlite3TableColumnAffinity(tls, pTab, iCol) // RHS table var cmpaff int8 = Xsqlite3CompareAffinity(tls, pLhs, idxaff) switch int32(cmpaff) { case SQLITE_AFF_BLOB: break fallthrough case SQLITE_AFF_TEXT: // sqlite3CompareAffinity() only returns TEXT if one side or the // other has no affinity and the other side is TEXT. Hence, // the only way for cmpaff to be TEXT is for idxaff to be TEXT // and for the term on the LHS of the IN to have no affinity. break fallthrough default: affinity_ok = libc.Bool32(int32(idxaff) >= SQLITE_AFF_NUMERIC) } } if affinity_ok != 0 { // Search for an existing index that will work for this IN operator for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && eType == 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { var colUsed Bitmask // Columns of the index used var mCol Bitmask // Mask for the current column if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) < nExpr { continue } if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != uintptr(0) { continue } // Maximum nColumn is BMS-2, not BMS-1, so that we can compute // BITMASK(nExpr) without overflowing if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { continue } if mustBeUnique != 0 { if int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) > nExpr || int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) > nExpr && !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None) { continue // This index is not unique over the IN RHS columns } } colUsed = uint64(0) // Columns of index used so far for i = 0; i < nExpr; i++ { var pLhs uintptr = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft, i) var pRhs uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr var pReq uintptr = Xsqlite3BinaryCompareCollSeq(tls, pParse, pLhs, pRhs) var j int32 for j = 0; j < nExpr; j++ { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) != int32((*Expr)(unsafe.Pointer(pRhs)).FiColumn) { continue } if pReq != uintptr(0) && Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pReq)).FzName, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8))) != 0 { continue } break } if j == nExpr { break } mCol = Bitmask(uint64(1)) << j if mCol&colUsed != 0 { break } // Each column used only once colUsed = colUsed | mCol if aiMap != 0 { *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) = j } } if colUsed == Bitmask(uint64(1))<<nExpr-uint64(1) { // If we reach this point, that means the index pIdx is usable var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9009, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iTab, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) eType = IN_INDEX_INDEX_ASC + int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder))) if prRhsHasNull != 0 { *(*int32)(unsafe.Pointer(prRhsHasNull)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if nExpr == 1 { sqlite3SetHasNullFlag(tls, v, iTab, *(*int32)(unsafe.Pointer(prRhsHasNull))) } } Xsqlite3VdbeJumpHere(tls, v, iAddr) } } // End loop over indexes } // End if( affinity_ok ) } // End if not an rowid index } // End attempt to optimize using an index // If no preexisting index is available for the IN clause // and IN_INDEX_NOOP is an allowed reply // and the RHS of the IN operator is a list, not a subquery // and the RHS is not constant or has two or fewer terms, // then it is not worth creating an ephemeral table to evaluate // the IN operator so return IN_INDEX_NOOP. if eType == 0 && inFlags&U32(IN_INDEX_NOOP_OK) != 0 && (*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) == U32(0) && (!(sqlite3InRhsIsConstant(tls, pX) != 0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pX + 32)))).FnExpr <= 2) { eType = IN_INDEX_NOOP } if eType == 0 { // Could not find an existing table or index to use as the RHS b-tree. // We will have to generate an ephemeral table to do the job. var savedNQueryLoop U32 = (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop var rMayHaveNull int32 = 0 eType = IN_INDEX_EPH if inFlags&U32(IN_INDEX_LOOP) != 0 { (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = U32(0) } else if prRhsHasNull != 0 { *(*int32)(unsafe.Pointer(prRhsHasNull)) = libc.AssignInt32(&rMayHaveNull, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) } Xsqlite3CodeRhsOfIN(tls, pParse, pX, iTab) if rMayHaveNull != 0 { sqlite3SetHasNullFlag(tls, v, iTab, rMayHaveNull) } (*Parse)(unsafe.Pointer(pParse)).FnQueryLoop = savedNQueryLoop } if aiMap != 0 && eType != IN_INDEX_INDEX_ASC && eType != IN_INDEX_INDEX_DESC { var i int32 var n int32 n = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pX)).FpLeft) for i = 0; i < n; i++ { *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) = i } } *(*int32)(unsafe.Pointer(piTab)) = iTab return eType } // Argument pExpr is an (?, ?...) IN(...) expression. This // function allocates and returns a nul-terminated string containing // the affinities to be used for each column of the comparison. // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105425:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { pSelect = *(*uintptr)(unsafe.Pointer(pExpr + 32)) } else { pSelect = uintptr(0) } var zRet uintptr zRet = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nVal+1)) if zRet != 0 { var i int32 for i = 0; i < nVal; i++ { var pA uintptr = Xsqlite3VectorFieldSubexpr(tls, pLeft, i) var a int8 = Xsqlite3ExprAffinity(tls, pA) if pSelect != 0 { *(*int8)(unsafe.Pointer(zRet + uintptr(i))) = Xsqlite3CompareAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList+8+uintptr(i)*32)).FpExpr, a) } else { *(*int8)(unsafe.Pointer(zRet + uintptr(i))) = a } } *(*int8)(unsafe.Pointer(zRet + uintptr(nVal))) = int8(0) } return zRet } // Load the Parse object passed as the first argument with an error // message of the form: // // "sub-select returns N columns - expected M" func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105457:21: */ bp := tls.Alloc(16) defer tls.Free(16) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { var zFmt uintptr = ts + 9040 /* "sub-select retur..." */ Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect)) } } // Expression pExpr is a vector that has been used in a context where // it is not permitted. If pExpr is a sub-select vector, this routine // loads the Parse object with a message of the form: // // "sub-select returns N columns - expected 1" // // Or, if it is a regular scalar vector: // // "row value misused" func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105476:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr, 1) } else { Xsqlite3ErrorMsg(tls, pParse, ts+7776, 0) } } // Generate code that will construct an ephemeral table containing all terms // in the RHS of an IN operator. The IN operator can be in either of two // forms: // // x IN (4,5,11) -- IN operator with list on right-hand side // x IN (SELECT a FROM b) -- IN operator with subquery on the right // // The pExpr parameter is the IN operator. The cursor number for the // constructed ephermeral table is returned. The first time the ephemeral // table is computed, the cursor number is also stored in pExpr->iTable, // however the cursor number returned might not be the same, as it might // have been duplicated using OP_OpenDup. // // If the LHS expression ("x" in the examples) is a column value, or // the SELECT statement returns a column value, then the affinity of that // column is used to build the index keys. If both 'x' and the // SELECT... statement are columns, then numeric affinity is used // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105510:21: */ bp := tls.Alloc(65) defer tls.Free(65) var addrOnce int32 = 0 // Address of the OP_Once instruction at top var addr int32 // Address of OP_OpenEphemeral instruction var pLeft uintptr // the LHS of the IN operator var pKeyInfo uintptr = uintptr(0) // Key information var nVal int32 // Size of vector pLeft var v uintptr // The prepared statement under construction v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The evaluation of the IN must be repeated every time it // is encountered if any of the following is true: // // * The right-hand side is a correlated subquery // * The right-hand side is an expression list containing variables // * We are inside a trigger // // If all of the above are false, then we can compute the RHS just once // and reuse it many names. if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_VarSelect) != U32(0)) && (*Parse)(unsafe.Pointer(pParse)).FiSelfTab == 0 { // Reuse of the RHS is allowed // If this routine has already been coded, but the previous code // might not have been invoked yet, so invoke it now as a subroutine. if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9084, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FselId)) } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)), *(*int32)(unsafe.Pointer(pExpr + 64))) Xsqlite3VdbeAddOp2(tls, v, OP_OpenDup, iTab, (*Expr)(unsafe.Pointer(pExpr)).FiTable) Xsqlite3VdbeJumpHere(tls, v, addrOnce) return } // Begin coding the subroutine *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Subrtn) *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) *(*int32)(unsafe.Pointer(pExpr + 64)) = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 + 4))) + 1 addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } // Check to see if this is a vector IN operator pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft nVal = Xsqlite3ExprVectorSize(tls, pLeft) // Construct the ephemeral table that will contain the content of // RHS of the IN operator. (*Expr)(unsafe.Pointer(pExpr)).FiTable = iTab addr = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Expr)(unsafe.Pointer(pExpr)).FiTable, nVal) pKeyInfo = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nVal, 1) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { // Case 1: expr IN (SELECT ...) // // Generate code to write the results of the select into the temporary // table allocated and opened above. var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+9107, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1524 /* "" */ } return ts + 9126 /* "CORRELATED " */ }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) // If the LHS and RHS of the IN operator do not match, that // error will have been caught long before we reach this point. if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { var pCopy uintptr // var dest SelectDest at bp+24, 40 var i int32 var rc int32 Xsqlite3SelectDestInit(tls, bp+24, SRT_Set, iTab) (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr) (*Select)(unsafe.Pointer(pSelect)).FiLimit = 0 // Caused by OOM in sqlite3KeyInfoAlloc() pCopy = Xsqlite3SelectDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSelect, 0) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { rc = 1 } else { rc = Xsqlite3Select(tls, pParse, pCopy, bp+24) } Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCopy) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst) if rc != 0 { Xsqlite3KeyInfoUnref(tls, pKeyInfo) return } // OOM will cause exit after sqlite3Select() for i = 0; i < nVal; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pLeft, i) *(*uintptr)(unsafe.Pointer(pKeyInfo + 32 + uintptr(i)*8)) = Xsqlite3BinaryCompareCollSeq(tls, pParse, p, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) } } } else if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != uintptr(0) { // Case 2: expr IN (exprlist) // // For each expression, build an index key from the evaluation and // store it in the temporary table. If <expr> is a column, then use // that columns affinity when building index keys. If <expr> is not // a column, use numeric affinity. // var affinity int8 at bp+64, 1 // Affinity of the LHS of the IN var i int32 var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32)) var pItem uintptr var r1 int32 var r2 int32 *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft) if int32(*(*int8)(unsafe.Pointer(bp + 64))) <= SQLITE_AFF_NONE { *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_BLOB) } else if int32(*(*int8)(unsafe.Pointer(bp + 64))) == SQLITE_AFF_REAL { *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_NUMERIC) } if pKeyInfo != 0 { *(*uintptr)(unsafe.Pointer(pKeyInfo + 32)) = Xsqlite3ExprCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) } // Loop through each expression in <exprlist>. r1 = Xsqlite3GetTempReg(tls, pParse) r2 = Xsqlite3GetTempReg(tls, pParse) i = (*ExprList)(unsafe.Pointer(pList)).FnExpr pItem = pList + 8 /* &.a */ __1: if !(i > 0) { goto __3 } { var pE2 uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr // If the expression is not constant then we will need to // disable the test that was generated above that makes sure // this code only executes once. Because for a non-constant // expression we need to rerun this code each time. if addrOnce != 0 && !(Xsqlite3ExprIsConstant(tls, pE2) != 0) { Xsqlite3VdbeChangeToNoop(tls, v, addrOnce) *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Subrtn)) addrOnce = 0 } // Evaluate the expression and insert it into the temp table Xsqlite3ExprCode(tls, pParse, pE2, r1) Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+64, 1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r2, r1, 1) } goto __2 __2: i-- pItem += 32 goto __1 goto __3 __3: ; Xsqlite3ReleaseTempReg(tls, pParse, r1) Xsqlite3ReleaseTempReg(tls, pParse, r2) } if pKeyInfo != 0 { Xsqlite3VdbeChangeP4(tls, v, addr, pKeyInfo, -9) } if addrOnce != 0 { Xsqlite3VdbeJumpHere(tls, v, addrOnce) // Subroutine return Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */))) Xsqlite3VdbeChangeP1(tls, v, *(*int32)(unsafe.Pointer(pExpr + 64))-1, Xsqlite3VdbeCurrentAddr(tls, v)-1) Xsqlite3ClearTempRegCache(tls, pParse) } } // Generate code for scalar subqueries used as a subquery expression // or EXISTS operator: // // (SELECT a FROM b) -- subquery // EXISTS (SELECT a FROM b) -- EXISTS subquery // // The pExpr parameter is the SELECT or EXISTS operator to be coded. // // Return the register that holds the result. For a multi-column SELECT, // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105705:20: */ bp := tls.Alloc(64) defer tls.Free(64) var addrOnce int32 = 0 // Address of OP_Once at top of subroutine var rReg int32 = 0 // Register storing resulting var pSel uintptr // SELECT statement to encode // var dest SelectDest at bp+24, 40 // How to deal with SELECT result var nReg int32 // Registers to allocate var pLimit uintptr // New limit expression var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return 0 } pSel = *(*uintptr)(unsafe.Pointer(pExpr + 32)) // If this routine has already been coded, then invoke it as a // subroutine. if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+9138, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)), *(*int32)(unsafe.Pointer(pExpr + 64))) return (*Expr)(unsafe.Pointer(pExpr)).FiTable } // Begin coding the subroutine *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_Subrtn) *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) *(*int32)(unsafe.Pointer(pExpr + 64)) = Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, *(*int32)(unsafe.Pointer(pExpr + 64 + 4))) + 1 // The evaluation of the EXISTS/SELECT must be repeated every time it // is encountered if any of the following is true: // // * The right-hand side is a correlated subquery // * The right-hand side is an expression list containing variables // * We are inside a trigger // // If all of the above are false, then we can run this code just once // save the results, and reuse the same result on subsequent invocations. if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_VarSelect) != U32(0)) { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } // For a SELECT, generate code to put the values for all columns of // the first row into an array of registers and return the index of // the first register. // // If this is an EXISTS, write an integer 0 (not exists) or 1 (exists) // into a register and return that register number. // // In both cases, the query is augmented with "LIMIT 1". Any // preexisting limit is discarded in place of the new LIMIT 1. Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+9156, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 1524 /* "" */ } return ts + 9126 /* "CORRELATED " */ }(), (*Select)(unsafe.Pointer(pSel)).FselId)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr } else { nReg = 1 } Xsqlite3SelectDestInit(tls, bp+24, 0, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) *(*int32)(unsafe.Pointer(pParse + 56)) += nReg if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Mem) (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSDParm (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FnSdst = nReg Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm, (*SelectDest)(unsafe.Pointer(bp+24)).FiSDParm+nReg-1) } else { (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Exists) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) } if (*Select)(unsafe.Pointer(pSel)).FpLimit != 0 { // The subquery already has a limit. If the pre-existing limit is X // then make the new limit X<>0 so that the new limit is either 1 or 0 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+8769) if pLimit != 0 { (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC) pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft, 0), pLimit) } Xsqlite3ExprDelete(tls, db, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft) (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit } else { // If there is no pre-existing limit add a limit of 1 pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+9177) (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 if Xsqlite3Select(tls, pParse, pSel, bp+24) != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_ERROR) return 0 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.AssignInt32(&rReg, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) if addrOnce != 0 { Xsqlite3VdbeJumpHere(tls, v, addrOnce) } // Subroutine return Xsqlite3VdbeAddOp1(tls, v, OP_Return, *(*int32)(unsafe.Pointer(pExpr + 64 + 4 /* &.regReturn */))) Xsqlite3VdbeChangeP1(tls, v, *(*int32)(unsafe.Pointer(pExpr + 64))-1, Xsqlite3VdbeCurrentAddr(tls, v)-1) Xsqlite3ClearTempRegCache(tls, pParse) return rReg } // Expr pIn is an IN(...) expression. This function checks that the // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105827:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 32)))).FpEList)).FnExpr, nVector) return 1 } } else if nVector != 1 { Xsqlite3VectorErrorMsg(tls, pParse, (*Expr)(unsafe.Pointer(pIn)).FpLeft) return 1 } return 0 } // Generate code for an IN expression. // // x IN (SELECT ...) // x IN (value, value, ...) // // The left-hand side (LHS) is a scalar or vector expression. The // right-hand side (RHS) is an array of zero or more scalar values, or a // subquery. If the RHS is a subquery, the number of result columns must // match the number of columns in the vector on the LHS. If the RHS is // a list of values, the LHS must be a scalar. // // The IN operator is true if the LHS value is contained within the RHS. // The result is false if the LHS is definitely not in the RHS. The // result is NULL if the presence of the LHS in the RHS cannot be // determined due to NULLs. // // This routine generates code that jumps to destIfFalse if the LHS is not // contained within the RHS. If due to NULLs we cannot determine if the LHS // is contained in the RHS then jump to destIfNull. If the LHS is contained // within the RHS then fall through. // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:105868:13: */ bp := tls.Alloc(16) defer tls.Free(16) // var rRhsHasNull int32 at bp, 4 // Register that is true if RHS contains NULL values var eType int32 // Type of the RHS var rLhs int32 // Register(s) holding the LHS values var rLhsOrig int32 // LHS values prior to reordering by aiMap[] var v uintptr // Statement under construction var aiMap uintptr // Map from vector field to index column var zAff uintptr // Affinity string for comparisons var nVector int32 // Size of vectors for this IN operator // var iDummy int32 at bp+8, 4 // Dummy parameter to exprCodeVector() var pLeft uintptr // The LHS of the IN operator var i int32 // loop counter var destStep2 int32 // Where to jump when NULLs seen in step 2 var destStep6 int32 // Start of code for Step 6 var addrTruthOp int32 // Address of opcode that determines the IN is true var destNotNull int32 // Jump here if a comparison is not true in step 6 var addrTop int32 // Top of the step-6 loop // var iTab int32 at bp+4, 4 // Index to use var okConstFactor U8 var op int32 var op1 int32 var pList uintptr var pColl uintptr var labelOk int32 var r2 int32 // var regToFree int32 at bp+12, 4 var regCkNull int32 var ii int32 var p uintptr var p1 uintptr var pColl1 uintptr var r3 int32 *(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)) = 0 aiMap = uintptr(0) zAff = uintptr(0) destStep6 = 0 *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)) = 0 okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprCheckIN(tls, pParse, pExpr) != 0) { goto __1 } return __1: ; zAff = exprINAffinity(tls, pParse, pExpr) nVector = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) aiMap = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nVector)*(uint64(unsafe.Sizeof(int32(0)))+uint64(unsafe.Sizeof(int8(0))))+uint64(1)) if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __2 } goto sqlite3ExprCodeIN_oom_error __2: ; // Attempt to compute the RHS. After this step, if anything other than // IN_INDEX_NOOP is returned, the table opened with cursor iTab // contains the values that make up the RHS. If IN_INDEX_NOOP is returned, // the RHS has not yet been coded. v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // OOM detected prior to this routine eType = Xsqlite3FindInIndex(tls, pParse, pExpr, uint32(IN_INDEX_MEMBERSHIP|IN_INDEX_NOOP_OK), func() uintptr { if destIfFalse == destIfNull { return uintptr(0) } return bp /* &rRhsHasNull */ }(), aiMap, bp+4 /* &iTab */) // Code the LHS, the <expr> from "<expr> IN (...)". If the LHS is a // vector, then it is stored in an array of nVector registers starting // at r1. // // sqlite3FindInIndex() might have reordered the fields of the LHS vector // so that the fields are in the same order as an existing index. The // aiMap[] array contains a mapping from the original LHS field order to // the field order that matches the RHS index. // // Avoid factoring the LHS of the IN(...) expression out of the loop, // even if it is constant, as OP_Affinity may be used on the register // by code generated below. (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) rLhsOrig = exprCodeVector(tls, pParse, pLeft, bp+8) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor i = 0 __3: if !(i < nVector && *(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)) == i) { goto __5 } goto __4 __4: i++ goto __3 goto __5 __5: ; // Are LHS fields reordered? if !(i == nVector) { goto __6 } // LHS fields are not reordered rLhs = rLhsOrig goto __7 __6: // Need to reorder the LHS fields according to aiMap rLhs = Xsqlite3GetTempRange(tls, pParse, nVector) i = 0 __8: if !(i < nVector) { goto __10 } Xsqlite3VdbeAddOp3(tls, v, OP_Copy, rLhsOrig+i, rLhs+*(*int32)(unsafe.Pointer(aiMap + uintptr(i)*4)), 0) goto __9 __9: i++ goto __8 goto __10 __10: ; __7: ; // If sqlite3FindInIndex() did not find or create an index that is // suitable for evaluating the IN operator, then evaluate using a // sequence of comparisons. // // This is step (1) in the in-operator.md optimized algorithm. if !(eType == IN_INDEX_NOOP) { goto __11 } labelOk = Xsqlite3VdbeMakeLabel(tls, pParse) regCkNull = 0 pList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) pColl = Xsqlite3ExprCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if !(destIfNull != destIfFalse) { goto __12 } regCkNull = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_BitAnd, rLhs, rLhs, regCkNull) __12: ; ii = 0 __13: if !(ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { goto __15 } r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr, bp+12) if !(regCkNull != 0 && Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*32)).FpExpr) != 0) { goto __16 } Xsqlite3VdbeAddOp3(tls, v, OP_BitAnd, regCkNull, r2, regCkNull) __16: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 12 /* regToFree */))) if !(ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr-1 || destIfNull != destIfFalse) { goto __17 } if rLhs != r2 { op = OP_Eq } else { op = OP_NotNull } Xsqlite3VdbeAddOp4(tls, v, op, rLhs, labelOk, r2, pColl, -2) Xsqlite3VdbeChangeP5(tls, v, uint16(*(*int8)(unsafe.Pointer(zAff)))) goto __18 __17: if rLhs != r2 { op1 = OP_Ne } else { op1 = OP_IsNull } Xsqlite3VdbeAddOp4(tls, v, op1, rLhs, destIfFalse, r2, pColl, -2) Xsqlite3VdbeChangeP5(tls, v, uint16(int32(*(*int8)(unsafe.Pointer(zAff)))|SQLITE_JUMPIFNULL)) __18: ; goto __14 __14: ii++ goto __13 goto __15 __15: ; if !(regCkNull != 0) { goto __19 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regCkNull, destIfNull) Xsqlite3VdbeGoto(tls, v, destIfFalse) __19: ; Xsqlite3VdbeResolveLabel(tls, v, labelOk) Xsqlite3ReleaseTempReg(tls, pParse, regCkNull) goto sqlite3ExprCodeIN_finished __11: ; // Step 2: Check to see if the LHS contains any NULL columns. If the // LHS does contain NULLs then the result must be either FALSE or NULL. // We will then skip the binary search of the RHS. if !(destIfNull == destIfFalse) { goto __20 } destStep2 = destIfFalse goto __21 __20: destStep2 = libc.AssignInt32(&destStep6, Xsqlite3VdbeMakeLabel(tls, pParse)) __21: ; i = 0 __22: if !(i < nVector) { goto __24 } p = Xsqlite3VectorFieldSubexpr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, i) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __25 } goto sqlite3ExprCodeIN_oom_error __25: ; if !(Xsqlite3ExprCanBeNull(tls, p) != 0) { goto __26 } Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, rLhs+i, destStep2) __26: ; goto __23 __23: i++ goto __22 goto __24 __24: ; // Step 3. The LHS is now known to be non-NULL. Do the binary search // of the RHS using the LHS as a probe. If found, the result is // true. if !(eType == IN_INDEX_ROWID) { goto __27 } // In this case, the RHS is the ROWID of table b-tree and so we also // know that the RHS is non-NULL. Hence, we combine steps 3 and 4 // into a single opcode. Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse, rLhs) addrTruthOp = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) // Return True goto __28 __27: Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, rLhs, nVector, 0, zAff, nVector) if !(destIfFalse == destIfNull) { goto __29 } // Combine Step 3 and Step 5 into a single opcode Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse, rLhs, nVector) goto sqlite3ExprCodeIN_finished __29: ; // Ordinary Step 3, for the case where FALSE and NULL are distinct addrTruthOp = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), 0, rLhs, nVector) __28: ; // Step 4. If the RHS is known to be non-NULL and we did not find // an match on the search above, then the result must be FALSE. if !(*(*int32)(unsafe.Pointer(bp)) != 0 && nVector == 1) { goto __30 } Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, *(*int32)(unsafe.Pointer(bp /* rRhsHasNull */)), destIfFalse) __30: ; // Step 5. If we do not care about the difference between NULL and // FALSE, then just return false. if !(destIfFalse == destIfNull) { goto __31 } Xsqlite3VdbeGoto(tls, v, destIfFalse) __31: ; // Step 6: Loop through rows of the RHS. Compare each row to the LHS. // If any comparison is NULL, then the result is NULL. If all // comparisons are FALSE then the final result is FALSE. // // For a scalar LHS, it is sufficient to check just the first row // of the RHS. if !(destStep6 != 0) { goto __32 } Xsqlite3VdbeResolveLabel(tls, v, destStep6) __32: ; addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), destIfFalse) if !(nVector > 1) { goto __33 } destNotNull = Xsqlite3VdbeMakeLabel(tls, pParse) goto __34 __33: // For nVector==1, combine steps 6 and 7 by immediately returning // FALSE if the first comparison is not NULL destNotNull = destIfFalse __34: ; i = 0 __35: if !(i < nVector) { goto __37 } r3 = Xsqlite3GetTempReg(tls, pParse) p1 = Xsqlite3VectorFieldSubexpr(tls, pLeft, i) pColl1 = Xsqlite3ExprCollSeq(tls, pParse, p1) Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), i, r3) Xsqlite3VdbeAddOp4(tls, v, OP_Ne, rLhs+i, destNotNull, r3, pColl1, -2) Xsqlite3ReleaseTempReg(tls, pParse, r3) goto __36 __36: i++ goto __35 goto __37 __37: ; Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfNull) if !(nVector > 1) { goto __38 } Xsqlite3VdbeResolveLabel(tls, v, destNotNull) Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 4 /* iTab */)), addrTop+1) // Step 7: If we reach this point, we know that the result must // be false. Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, destIfFalse) __38: ; // Jumps here in order to return true. Xsqlite3VdbeJumpHere(tls, v, addrTruthOp) sqlite3ExprCodeIN_finished: if !(rLhs != rLhsOrig) { goto __39 } Xsqlite3ReleaseTempReg(tls, pParse, rLhs) __39: ; sqlite3ExprCodeIN_oom_error: Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiMap) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zAff) } // Generate an instruction that will put the floating point // value described by z[0..n-1] into register iMem. // // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106126:13: */ bp := tls.Alloc(8) defer tls.Free(8) if z != uintptr(0) { // var value float64 at bp, 8 Xsqlite3AtoF(tls, z, bp, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) // The new AtoF never returns NaN if negateFlag != 0 { *(*float64)(unsafe.Pointer(bp /* value */)) = -*(*float64)(unsafe.Pointer(bp /* value */)) } Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Real, 0, iMem, 0, bp, -13) } } // Generate an instruction that will put the integer describe by // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106144:13: */ bp := tls.Alloc(24) defer tls.Free(24) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_IntValue) != 0 { var i int32 = *(*int32)(unsafe.Pointer(pExpr + 8)) if negFlag != 0 { i = -i } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, i, iMem) } else { var c int32 // var value I64 at bp+16, 8 var z uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 8)) c = Xsqlite3DecOrHexToI64(tls, z, bp+16) if c == 3 && !(negFlag != 0) || c == 2 || negFlag != 0 && *(*I64)(unsafe.Pointer(bp + 16)) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { if Xsqlite3_strnicmp(tls, z, ts+9179, 2) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+9182, libc.VaList(bp, func() uintptr { if negFlag != 0 { return ts + 6235 /* "-" */ } return ts + 1524 /* "" */ }(), pExpr)) } else { codeReal(tls, v, z, negFlag, iMem) } } else { if negFlag != 0 { if c == 3 { *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) } else { *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = -*(*I64)(unsafe.Pointer(bp + 16 /* value */)) } } Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+16, -14) } } } // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106182:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iTabCur + 1 Xsqlite3ExprCodeCopy(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(iIdxCol)*32)).FpExpr, regOut) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } else { Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, (*Index)(unsafe.Pointer(pIdx)).FpTable, iTabCur, int32(iTabCol), regOut) } } // Generate code that will compute the value of generated column pCol // and store the result in register regOut func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106207:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if (*Parse)(unsafe.Pointer(pParse)).FiSelfTab > 0 { iAddr = Xsqlite3VdbeAddOp3(tls, v, OP_IfNullRow, (*Parse)(unsafe.Pointer(pParse)).FiSelfTab-1, 0, regOut) } else { iAddr = 0 } Xsqlite3ExprCodeCopy(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, pCol), regOut) if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) >= SQLITE_AFF_TEXT { Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, regOut, 1, 0, pCol+10, 1) } if iAddr != 0 { Xsqlite3VdbeJumpHere(tls, v, iAddr) } } // Generate code to extract the value of the iCol-th column of a table. func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106233:21: */ bp := tls.Alloc(8) defer tls.Free(8) var pCol uintptr if pTab == uintptr(0) { Xsqlite3VdbeAddOp3(tls, v, OP_Column, iTabCur, iCol, regOut) return } if iCol < 0 || iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iTabCur, regOut) } else { var op int32 var x int32 if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { op = OP_VColumn x = iCol } else if int32((*Column)(unsafe.Pointer(libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24))).FcolFlags)&COLFLAG_VIRTUAL != 0 { var pParse uintptr = Xsqlite3VdbeParser(tls, v) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_BUSY != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+9209, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else { var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_BUSY) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iTabCur + 1 Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab, pCol, regOut) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = savedSelfTab *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY)) } return } else if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { x = int32(Xsqlite3TableColumnToIndex(tls, Xsqlite3PrimaryKeyIndex(tls, pTab), int16(iCol))) op = OP_Column } else { x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) op = OP_Column } Xsqlite3VdbeAddOp3(tls, v, op, iTabCur, x, regOut) Xsqlite3ColumnDefault(tls, v, pTab, iCol, regOut) } } // Generate code that will extract the iColumn-th column from // table pTab and store the column value in register iReg. // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106291:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { var pOp uintptr = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Column { (*VdbeOp)(unsafe.Pointer(pOp)).Fp5 = U16(p5) } } return iReg } // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106312:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106321:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return } (*Expr)(unsafe.Pointer(p)).Fop2 = (*Expr)(unsafe.Pointer(p)).Fop (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_REGISTER) (*Expr)(unsafe.Pointer(p)).FiTable = iReg *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Skip)) } // Evaluate an expression (either a vector or a scalar expression) and store // the result in continguous temporary registers. Return the index of // the first register used to store the result. // // If the returned result register is a temporary scalar, then also write // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106340:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { iResult = Xsqlite3ExprCodeTemp(tls, pParse, p, piFreeable) } else { *(*int32)(unsafe.Pointer(piFreeable)) = 0 if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_SELECT { iResult = Xsqlite3CodeSubselect(tls, pParse, p) } else { var i int32 iResult = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nResult for i = 0; i < nResult; i++ { Xsqlite3ExprCodeFactorable(tls, pParse, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, i+iResult) } } } return iResult } // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106370:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } } // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106380:12: */ bp := tls.Alloc(112) defer tls.Free(112) var nFarg int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe nFarg = (*ExprList)(unsafe.Pointer(pFarg)).FnExpr // All in-line functions have at least one argument switch iFuncId { case INLINEFUNC_coalesce: { // Attempt a direct implementation of the built-in COALESCE() and // IFNULL() functions. This avoids unnecessary evaluation of // arguments past the first non-NULL argument. var endCoalesce int32 = Xsqlite3VdbeMakeLabel(tls, pParse) var i int32 Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, target) for i = 1; i < nFarg; i++ { Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, target, endCoalesce) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr, target) } setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endCoalesce) break } case INLINEFUNC_iif: { // var caseExpr Expr at bp, 72 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp /* &caseExpr */)).Fop = U8(TK_CASE) *(*uintptr)(unsafe.Pointer(bp + 32)) = pFarg return Xsqlite3ExprCodeTarget(tls, pParse, bp, target) } default: { // The UNLIKELY() function is a no-op. The result is the value // of the first argument. target = Xsqlite3ExprCodeTarget(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, target) break } // ********************************************************************** // // Test-only SQL functions that are only usable if enabled // via SQLITE_TESTCTRL_INTERNAL_FUNCTIONS case INLINEFUNC_expr_compare: { // Compare two expressions using sqlite3ExprCompare() Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr, -1), target) break } case INLINEFUNC_expr_implies_expr: { // Compare two expressions using sqlite3ExprImpliesExpr() Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprImpliesExpr(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr, -1), target) break } case INLINEFUNC_implies_nonnull_row: { // REsult of sqlite3ExprImpliesNonNullRow() var pA1 uintptr pA1 = (*ExprList_item)(unsafe.Pointer(pFarg + 8 + 1*32)).FpExpr if int32((*Expr)(unsafe.Pointer(pA1)).Fop) == TK_COLUMN { Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprImpliesNonNullRow(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr, (*Expr)(unsafe.Pointer(pA1)).FiTable), target) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) } break } case INLINEFUNC_affinity: { // The AFFINITY() function evaluates to a string that describes // the type affinity of the argument. This is used for testing of // the SQLite type logic. *(*[5]uintptr)(unsafe.Pointer(bp + 72 /* azAff */)) = [5]uintptr{ts + 9239, ts + 9244, ts + 9249, ts + 7494, ts + 7489} var aff int8 aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) Xsqlite3VdbeLoadString(tls, v, target, func() uintptr { if int32(aff) <= SQLITE_AFF_NONE { return ts + 9257 /* "none" */ } return *(*uintptr)(unsafe.Pointer(bp + 72 /* &azAff[0] */ + uintptr(int32(aff)-SQLITE_AFF_BLOB)*8)) }()) break } } return target } // Generate code into the current Vdbe to evaluate the given // expression. Attempt to store the results in register "target". // Return the register where results are stored. // // With this routine, there is no guarantee that results will // be stored in target. The result might be stored in some other // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106496:20: */ bp := tls.Alloc(192) defer tls.Free(192) var v uintptr // The VM under construction var op int32 // The opcode being coded var inReg int32 // Results stored in register inReg // var regFree1 int32 at bp+40, 4 // If non-zero free this temporary register // var regFree2 int32 at bp+44, 4 // If non-zero free this temporary register var r1 int32 var r2 int32 // Various register numbers // var tempX Expr at bp+48, 72 // Temporary expression node var p5 int32 var pTab uintptr var pAggInfo uintptr var pCol uintptr // This COLUMN expression is really a constant due to WHERE clause // constraints, and that constant is coded by the pExpr->pLeft // expresssion. However, make sure the constant has the correct // datatype by applying the Affinity of the table column to the // constant. var aff int32 // Other columns in the same row for CHECK constraints or // generated columns or for inserting into partial index. // The row is unpacked into registers beginning at // 0-(pParse->iSelfTab). The rowid (if any) is in a register // immediately prior to the first column. var pCol1 uintptr var pTab1 uintptr var iSrc int32 var iCol int32 var iTab int32 var iReg int32 var n int32 var z uintptr var zBlob uintptr var z1 uintptr var pLeft uintptr var pLeft1 uintptr var isTrue int32 // IS TRUE or IS NOT TRUE var bNormal int32 var addr int32 var pInfo uintptr var exprOp U8 var pArg uintptr var pFarg uintptr // List of function arguments var nFarg int32 // Number of function arguments var pDef uintptr // The function definition object var zId uintptr // The function name var constMask U32 // Mask of function arguments that are constant var i int32 // Loop counter var db uintptr // The database connection var enc U8 // The text encoding used by this database var pColl uintptr var nCol int32 var n1 int32 var destIfFalse int32 var destIfNull int32 // If the opcode is TK_TRIGGER, then the expression is a reference // to a column in the new.* or old.* pseudo-tables available to // trigger programs. In this case Expr.iTable is set to 1 for the // new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn // is set to the column of the pseudo-table to read, or to -1 to // read the rowid field. // // The expression is implemented using an OP_Param opcode. The p1 // parameter is set to 0 for an old.rowid reference, or to (i+1) // to reference another column of the old.* pseudo-table, where // i is the index of the column. For a new.rowid reference, p1 is // set to (n+1), where n is the number of columns in each pseudo-table. // For a reference to any other column in the new.* pseudo-table, p1 // is set to (n+2+i), where n and i are as defined previously. For // example, if the table on which triggers are being fired is // declared as: // // CREATE TABLE t1(a, b); // // Then p1 is interpreted as follows: // // p1==0 -> old.rowid p1==3 -> new.rowid // p1==1 -> old.a p1==4 -> new.a // p1==2 -> old.b p1==5 -> new.b var pTab2 uintptr var iCol1 int32 var p1 int32 var addrINR int32 var okConstFactor U8 var endLabel int32 // GOTO label for end of CASE stmt var nextCase int32 // GOTO label for next WHEN clause var nExpr int32 // 2x number of WHEN terms var i1 int32 // Loop counter var pEList uintptr // List of WHEN terms var aListelem uintptr // Array of WHEN terms // var opCompare Expr at bp+120, 72 // The X==Ei expression var pX uintptr // The X expression var pTest uintptr // X==Ei (form A) or just Ei (form B) var pDel uintptr var db1 uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe inReg = target *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */)) = 0 p5 = 0 expr_code_doover: if !(pExpr == uintptr(0)) { goto __1 } op = TK_NULL goto __2 __1: ; op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) __2: ; switch op { case TK_AGG_COLUMN: goto __4 case TK_COLUMN: goto __5 case TK_INTEGER: goto __6 case TK_TRUEFALSE: goto __7 case TK_FLOAT: goto __8 case TK_STRING: goto __9 default: goto __10 case TK_BLOB: goto __11 case TK_VARIABLE: goto __12 case TK_REGISTER: goto __13 case TK_CAST: goto __14 case TK_IS: goto __15 case TK_ISNOT: goto __16 // fall-through case TK_LT: goto __17 case TK_LE: goto __18 case TK_GT: goto __19 case TK_GE: goto __20 case TK_NE: goto __21 case TK_EQ: goto __22 case TK_AND: goto __23 case TK_OR: goto __24 case TK_PLUS: goto __25 case TK_STAR: goto __26 case TK_MINUS: goto __27 case TK_REM: goto __28 case TK_BITAND: goto __29 case TK_BITOR: goto __30 case TK_SLASH: goto __31 case TK_LSHIFT: goto __32 case TK_RSHIFT: goto __33 case TK_CONCAT: goto __34 case TK_UMINUS: goto __35 case TK_BITNOT: goto __36 case TK_NOT: goto __37 case TK_TRUTH: goto __38 case TK_ISNULL: goto __39 case TK_NOTNULL: goto __40 case TK_AGG_FUNCTION: goto __41 case TK_FUNCTION: goto __42 case TK_EXISTS: goto __43 case TK_SELECT: goto __44 case TK_SELECT_COLUMN: goto __45 case TK_IN: goto __46 // x BETWEEN y AND z // // This is equivalent to // // x>=y AND x<=z // // X is stored in pExpr->pLeft. // Y is stored in pExpr->pList->a[0].pExpr. // Z is stored in pExpr->pList->a[1].pExpr. case TK_BETWEEN: goto __47 case TK_SPAN: goto __48 case TK_COLLATE: goto __49 case TK_UPLUS: goto __50 case TK_TRIGGER: goto __51 case TK_VECTOR: goto __52 // TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions // that derive from the right-hand table of a LEFT JOIN. The // Expr.iTable value is the table number for the right-hand table. // The expression is only evaluated if that table is not currently // on a LEFT JOIN NULL row. case TK_IF_NULL_ROW: goto __53 // Form A: // CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END // // Form B: // CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END // // Form A is can be transformed into the equivalent form B as follows: // CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ... // WHEN x=eN THEN rN ELSE y END // // X (if it exists) is in pExpr->pLeft. // Y is in the last element of pExpr->x.pList if pExpr->x.pList->nExpr is // odd. The Y is also optional. If the number of elements in x.pList // is even, then Y is omitted and the "otherwise" result is NULL. // Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1]. // // The result of the expression is the Ri for the first matching Ei, // or if there is no matching Ei, the ELSE term Y, or if there is // no ELSE term, NULL. case TK_CASE: goto __54 case TK_RAISE: goto __55 } goto __3 __4: pAggInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32 if !!(int32((*AggInfo)(unsafe.Pointer(pAggInfo)).FdirectMode) != 0) { goto __56 } return (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem goto __57 __56: if !((*AggInfo)(unsafe.Pointer(pAggInfo)).FuseSortingIdx != 0) { goto __58 } pTab = (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*AggInfo)(unsafe.Pointer(pAggInfo)).FsortingIdxPTab, int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn), target) if !(int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) < 0) { goto __59 } goto __60 __59: ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __61 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __61: ; __60: ; return target __58: ; __57: ; __5: iTab = (*Expr)(unsafe.Pointer(pExpr)).FiTable if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { goto __62 } iReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) != 0) { goto __63 } aff = int32(Xsqlite3TableColumnAffinity(tls, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn))) goto __64 __63: aff = int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) __64: ; if !(aff > SQLITE_AFF_BLOB) { goto __65 } Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, 1, 0, uintptr(unsafe.Pointer(&zAff))+uintptr((aff-'B')*2), -1) __65: ; return iReg __62: ; if !(iTab < 0) { goto __66 } if !((*Parse)(unsafe.Pointer(pParse)).FiSelfTab < 0) { goto __67 } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) pTab1 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) if !(iCol < 0) { goto __69 } return -1 - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab __69: ; pCol1 = (*Table)(unsafe.Pointer(pTab1)).FaCol + uintptr(iCol)*24 iSrc = int32(Xsqlite3TableColumnToStorage(tls, pTab1, int16(iCol))) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_GENERATED != 0) { goto __70 } if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { goto __72 } Xsqlite3ErrorMsg(tls, pParse, ts+9209, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 __72: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) |= U16(COLFLAG_BUSY) if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_NOTAVAIL != 0) { goto __73 } Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab1, pCol1, iSrc) __73: ; *(*U16)(unsafe.Pointer(pCol1 + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY | COLFLAG_NOTAVAIL)) return iSrc goto __71 __70: if !(int32((*Column)(unsafe.Pointer(pCol1)).Faffinity) == SQLITE_AFF_REAL) { goto __74 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, iSrc, target) Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) return target goto __75 __74: return iSrc __75: ; __71: ; goto __68 __67: // Coding an expression that is part of an index where column names // in the index refer to the table to which the index belongs iTab = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab - 1 __68: ; __66: ; iReg = Xsqlite3ExprCodeGetColumn(tls, pParse, *(*uintptr)(unsafe.Pointer(pExpr + 64)), int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), iTab, target, (*Expr)(unsafe.Pointer(pExpr)).Fop2) if !(*(*uintptr)(unsafe.Pointer(pExpr + 64)) == uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == SQLITE_AFF_REAL) { goto __76 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, iReg) __76: ; return iReg __6: codeInteger(tls, pParse, pExpr, 0, target) return target __7: Xsqlite3VdbeAddOp2(tls, v, OP_Integer, Xsqlite3ExprTruthValue(tls, pExpr), target) return target __8: ; codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0, target) return target __9: ; Xsqlite3VdbeLoadString(tls, v, target, *(*uintptr)(unsafe.Pointer(pExpr + 8))) return target __10: // Make NULL the default case so that if a bug causes an illegal // Expr node to be passed into this function, it will be handled // sanely and not crash. But keep the assert() to bring the problem // to the attention of the developers. ; Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) return target __11: ; z = *(*uintptr)(unsafe.Pointer(pExpr + 8)) + 2 n = Xsqlite3Strlen30(tls, z) - 1 zBlob = Xsqlite3HexToBlob(tls, Xsqlite3VdbeDb(tls, v), z, n) Xsqlite3VdbeAddOp4(tls, v, OP_Blob, n/2, target, 0, zBlob, -7) return target __12: ; Xsqlite3VdbeAddOp2(tls, v, OP_Variable, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn), target) if !(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 1))) != 0) { goto __77 } z1 = Xsqlite3VListNumToName(tls, (*Parse)(unsafe.Pointer(pParse)).FpVList, int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) *(*VList)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FpVList)) = 0 // Indicate VList may no longer be enlarged Xsqlite3VdbeAppendP4(tls, v, z1, -1) __77: ; return target __13: return (*Expr)(unsafe.Pointer(pExpr)).FiTable __14: // Expressions of the form: CAST(pLeft AS token) inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) if !(inReg != target) { goto __78 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, inReg, target) inReg = target __78: ; Xsqlite3VdbeAddOp2(tls, v, OP_Cast, target, int32(Xsqlite3AffinityType(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)), uintptr(0)))) return inReg __15: __16: if op == TK_IS { op = TK_EQ } else { op = TK_NE } p5 = SQLITE_NULLEQ // fall-through __17: __18: __19: __20: __21: __22: pLeft = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(Xsqlite3ExprIsVector(tls, pLeft) != 0) { goto __79 } codeVectorCompare(tls, pParse, pExpr, target, uint8(op), uint8(p5)) goto __80 __79: r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg) codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, Xsqlite3VdbeCurrentAddr(tls, v)+2, p5, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) if !(p5 == SQLITE_NULLEQ) { goto __81 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, inReg) goto __82 __81: Xsqlite3VdbeAddOp3(tls, v, OP_ZeroOrNull, r1, inReg, r2) __82: ; __80: ; goto __3 __23: __24: __25: __26: __27: __28: __29: __30: __31: __32: __33: __34: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp3(tls, v, op, r2, r1, target) goto __3 __35: pLeft1 = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_INTEGER) { goto __83 } codeInteger(tls, pParse, pLeft1, 1, target) return target goto __84 __83: if !(int32((*Expr)(unsafe.Pointer(pLeft1)).Fop) == TK_FLOAT) { goto __85 } codeReal(tls, v, *(*uintptr)(unsafe.Pointer(pLeft1 + 8)), 1, target) return target goto __86 __85: (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fop = U8(TK_INTEGER) (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fflags = U32(EP_IntValue | EP_TokenOnly) *(*int32)(unsafe.Pointer(bp + 48 + 8)) = 0 r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+48, bp+40) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44) Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target) __86: ; __84: ; goto __3 __36: __37: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) goto __3 __38: // IS TRUE or IS FALSE r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) bNormal = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_IS) Xsqlite3VdbeAddOp4Int(tls, v, OP_IsTrue, r1, inReg, libc.BoolInt32(!(isTrue != 0)), isTrue^bNormal) goto __3 __39: __40: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) addr = Xsqlite3VdbeAddOp1(tls, v, op, r1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, target) Xsqlite3VdbeJumpHere(tls, v, addr) goto __3 __41: pInfo = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo if !(pInfo == uintptr(0) || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) < 0 || int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) >= (*AggInfo)(unsafe.Pointer(pInfo)).FnFunc) { goto __87 } Xsqlite3ErrorMsg(tls, pParse, ts+9262, libc.VaList(bp+8, pExpr)) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem __88: ; goto __3 __42: // The function name constMask = U32(0) // Loop counter db = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection enc = (*Sqlite3)(unsafe.Pointer(db)).Fenc // The text encoding used by this database pColl = uintptr(0) // A collating sequence if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __89 } return (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FregResult __89: ; if !((*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0) { goto __90 } // SQL functions can be expensive. So try to avoid running them // multiple times if we know they always give the same result return Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1) __90: ; pFarg = *(*uintptr)(unsafe.Pointer(pExpr + 32)) if pFarg != 0 { nFarg = (*ExprList)(unsafe.Pointer(pFarg)).FnExpr } else { nFarg = 0 } zId = *(*uintptr)(unsafe.Pointer(pExpr + 8)) pDef = Xsqlite3FindFunction(tls, db, zId, nFarg, enc, uint8(0)) if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } Xsqlite3ErrorMsg(tls, pParse, ts+9289, libc.VaList(bp+16, pExpr)) goto __3 __91: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_INLINE) != 0) { goto __92 } return exprCodeInlineFunction(tls, pParse, pFarg, int32((*FuncDef)(unsafe.Pointer(pDef)).FpUserData), target) goto __93 __92: if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_DIRECT|SQLITE_FUNC_UNSAFE) != 0) { goto __94 } Xsqlite3ExprFunctionUsable(tls, pParse, pExpr, pDef) __94: ; __93: ; i = 0 __95: if !(i < nFarg) { goto __97 } if !(i < 32 && Xsqlite3ExprIsConstant(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr) != 0) { goto __98 } constMask = constMask | uint32(uint32(1))<<i __98: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != U32(0) && !(pColl != 0)) { goto __99 } pColl = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pFarg+8+uintptr(i)*32)).FpExpr) __99: ; goto __96 __96: i++ goto __95 goto __97 __97: ; if !(pFarg != 0) { goto __100 } if !(constMask != 0) { goto __102 } r1 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nFarg goto __103 __102: r1 = Xsqlite3GetTempRange(tls, pParse, nFarg) __103: ; // For length() and typeof() functions with a column argument, // set the P5 parameter to the OP_Column opcode to OPFLAG_LENGTHARG // or OPFLAG_TYPEOFARG respectively, to avoid unnecessary data // loading. if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_LENGTH|SQLITE_FUNC_TYPEOF) != U32(0)) { goto __104 } exprOp = (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr)).Fop if !(int32(exprOp) == TK_COLUMN || int32(exprOp) == TK_AGG_COLUMN) { goto __105 } (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr)).Fop2 = U8((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(OPFLAG_LENGTHARG|OPFLAG_TYPEOFARG)) __105: ; __104: ; Xsqlite3ExprCodeExprList(tls, pParse, pFarg, r1, 0, uint8(SQLITE_ECEL_DUP|SQLITE_ECEL_FACTOR)) goto __101 __100: r1 = 0 __101: ; // Possibly overload the function if the first argument is // a virtual table column. // // For infix functions (LIKE, GLOB, REGEXP, and MATCH) use the // second argument, not the first, as the argument to test to // see if it is a column in a virtual table. This is done because // the left operand of infix functions (the operand we want to // control overloading) ends up as the second argument to the // function. The expression "A glob B" is equivalent to // "glob(B,A). We want to use the A in "A glob B" to test // for function overloading. But we use the B term in "glob(B,A)". if !(nFarg >= 2 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_InfixFunc) != U32(0)) { goto __106 } pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8+1*32)).FpExpr) goto __107 __106: if !(nFarg > 0) { goto __108 } pDef = Xsqlite3VtabOverloadFunction(tls, db, pDef, nFarg, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) __108: ; __107: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_NEEDCOLL) != 0) { goto __109 } if !!(pColl != 0) { goto __110 } pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl __110: ; Xsqlite3VdbeAddOp4(tls, v, OP_CollSeq, 0, 0, 0, pColl, -2) __109: ; if !((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_OFFSET) != U32(0) && pFarg != uintptr(0)) { goto __111 } pArg = (*ExprList_item)(unsafe.Pointer(pFarg + 8)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pArg)).Fop) == TK_COLUMN) { goto __113 } Xsqlite3VdbeAddOp3(tls, v, OP_Offset, (*Expr)(unsafe.Pointer(pArg)).FiTable, int32((*Expr)(unsafe.Pointer(pArg)).FiColumn), target) goto __114 __113: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) __114: ; goto __112 __111: Xsqlite3VdbeAddFunctionCall(tls, pParse, int32(constMask), r1, target, nFarg, pDef, int32((*Expr)(unsafe.Pointer(pExpr)).Fop2)) __112: ; if !(nFarg != 0) { goto __115 } if !(constMask == U32(0)) { goto __116 } Xsqlite3ReleaseTempRange(tls, pParse, r1, nFarg) goto __117 __116: ; __117: ; __115: ; return target __43: __44: ; if !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0) { goto __118 } return 0 goto __119 __118: if !(op == TK_SELECT && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) && libc.AssignInt32(&nCol, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FpEList)).FnExpr) != 1) { goto __120 } Xsqlite3SubselectError(tls, pParse, nCol, 1) goto __121 __120: return Xsqlite3CodeSubselect(tls, pParse, pExpr) __121: ; __119: ; goto __3 __45: if !((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable == 0) { goto __122 } (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable = Xsqlite3CodeSubselect(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) __122: ; n1 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __123 } Xsqlite3ErrorMsg(tls, pParse, ts+8891, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __123: ; return (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) __46: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) sqlite3ExprCodeIN(tls, pParse, pExpr, destIfFalse, destIfNull) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) Xsqlite3VdbeResolveLabel(tls, v, destIfFalse) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, target, 0) Xsqlite3VdbeResolveLabel(tls, v, destIfNull) return target // x BETWEEN y AND z // // This is equivalent to // // x>=y AND x<=z // // X is stored in pExpr->pLeft. // Y is stored in pExpr->pList->a[0].pExpr. // Z is stored in pExpr->pList->a[1].pExpr. __47: exprCodeBetween(tls, pParse, pExpr, target, uintptr(0), 0) return target __48: __49: __50: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft goto expr_code_doover // 2018-04-28: Prevent deep recursion. OSSFuzz. __51: ; pTab2 = *(*uintptr)(unsafe.Pointer(pExpr + 64)) iCol1 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) p1 = (*Expr)(unsafe.Pointer(pExpr)).FiTable*(int32((*Table)(unsafe.Pointer(pTab2)).FnCol)+1) + 1 + int32(Xsqlite3TableColumnToStorage(tls, pTab2, int16(iCol1))) Xsqlite3VdbeAddOp2(tls, v, OP_Param, p1, target) // If the column has REAL affinity, it may currently be stored as an // integer. Use OP_RealAffinity to make sure it is really real. // // EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to // floating point when extracting it from the record. if !(iCol1 >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab2)).FaCol+uintptr(iCol1)*24)).Faffinity) == SQLITE_AFF_REAL) { goto __124 } Xsqlite3VdbeAddOp1(tls, v, OP_RealAffinity, target) __124: ; goto __3 __52: Xsqlite3ErrorMsg(tls, pParse, ts+7776, 0) goto __3 // TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions // that derive from the right-hand table of a LEFT JOIN. The // Expr.iTable value is the table number for the right-hand table. // The expression is only evaluated if that table is not currently // on a LEFT JOIN NULL row. __53: okConstFactor = (*Parse)(unsafe.Pointer(pParse)).FokConstFactor addrINR = Xsqlite3VdbeAddOp1(tls, v, OP_IfNullRow, (*Expr)(unsafe.Pointer(pExpr)).FiTable) // Temporarily disable factoring of constant expressions, since // even though expressions may appear to be constant, they are not // really constant because they originate from the right-hand side // of a LEFT JOIN. (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) inReg = Xsqlite3ExprCodeTarget(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, target) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor Xsqlite3VdbeJumpHere(tls, v, addrINR) Xsqlite3VdbeChangeP3(tls, v, addrINR, inReg) goto __3 // Form A: // CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END // // Form B: // CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END // // Form A is can be transformed into the equivalent form B as follows: // CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ... // WHEN x=eN THEN rN ELSE y END // // X (if it exists) is in pExpr->pLeft. // Y is in the last element of pExpr->x.pList if pExpr->x.pList->nExpr is // odd. The Y is also optional. If the number of elements in x.pList // is even, then Y is omitted and the "otherwise" result is NULL. // Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1]. // // The result of the expression is the Ri for the first matching Ei, // or if there is no matching Ei, the ELSE term Y, or if there is // no ELSE term, NULL. __54: // The X expression pTest = uintptr(0) // X==Ei (form A) or just Ei (form B) pDel = uintptr(0) db1 = (*Parse)(unsafe.Pointer(pParse)).Fdb pEList = *(*uintptr)(unsafe.Pointer(pExpr + 32)) aListelem = pEList + 8 /* &.a */ nExpr = (*ExprList)(unsafe.Pointer(pEList)).FnExpr endLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if !(libc.AssignUintptr(&pX, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != uintptr(0)) { goto __125 } pDel = Xsqlite3ExprDup(tls, db1, pX, 0) if !((*Sqlite3)(unsafe.Pointer(db1)).FmallocFailed != 0) { goto __126 } Xsqlite3ExprDelete(tls, db1, pDel) goto __3 __126: ; exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) libc.Xmemset(tls, bp+120, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).Fop = U8(TK_EQ) (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpLeft = pDel pTest = bp + 120 /* &opCompare */ // Ticket b351d95f9cd5ef17e9d9dbae18f5ca8611190001: // The value in regFree1 might get SCopy-ed into the file result. // So make sure that the regFree1 register is not reused for other // purposes and possibly overwritten. *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 __125: ; i1 = 0 __127: if !(i1 < nExpr-1) { goto __129 } if !(pX != 0) { goto __130 } (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr goto __131 __130: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr __131: ; nextCase = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3ExprIfFalse(tls, pParse, pTest, nextCase, SQLITE_JUMPIFNULL) Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(aListelem+uintptr(i1+1)*32)).FpExpr, target) Xsqlite3VdbeGoto(tls, v, endLabel) Xsqlite3VdbeResolveLabel(tls, v, nextCase) goto __128 __128: i1 = i1 + 2 goto __127 goto __129 __129: ; if !(nExpr&1 != 0) { goto __132 } Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(nExpr-1)*32)).FpExpr, target) goto __133 __132: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, target) __133: ; Xsqlite3ExprDelete(tls, db1, pDel) setDoNotMergeFlagOnCopy(tls, v) Xsqlite3VdbeResolveLabel(tls, v, endLabel) goto __3 __55: ; if !(!(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0)) { goto __134 } Xsqlite3ErrorMsg(tls, pParse, ts+9313, 0) return 0 __134: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Abort) { goto __135 } Xsqlite3MayAbort(tls, pParse) __135: ; if !(int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr) == OE_Ignore) { goto __136 } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_OK, OE_Ignore, 0, *(*uintptr)(unsafe.Pointer(pExpr + 8)), 0) goto __137 __136: Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { return SQLITE_CONSTRAINT | int32(7)<<8 } return SQLITE_ERROR }(), int32((*Expr)(unsafe.Pointer(pExpr)).FaffExpr), *(*uintptr)(unsafe.Pointer(pExpr + 8)), int8(0), uint8(0)) __137: ; goto __3 __3: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */))) return inReg } var zAff = *(*[8]int8)(unsafe.Pointer(ts + 9363)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:106563:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. // // If the expression uses functions (that might throw an exception) then // guard them with an OP_Once opcode to ensure that the code is only executed // once. If no functions are involved, then factor the code out and put it at // the end of the prepared statement in the initialization section. // // If regDest>=0 then the result is always stored in that register and the // result is not reusable. If regDest<0 then this routine is free to // store the value whereever it wants. The register where the expression // is stored is returned. When regDest<0, two identical expressions might // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107270:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr if regDest < 0 && p != 0 { var pItem uintptr var i int32 pItem = p + 8 /* &.a */ i = (*ExprList)(unsafe.Pointer(p)).FnExpr __1: if !(i > 0) { goto __3 } { if uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20))&0x8>>3)) != 0 && Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr, pExpr, -1) == 0 { return *(*int32)(unsafe.Pointer(pItem + 24)) } } goto __2 __2: pItem += 32 i-- goto __1 goto __3 __3: } pExpr = Xsqlite3ExprDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, 0) if pExpr != uintptr(0) && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_HasFunc) != U32(0) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var addr int32 addr = Xsqlite3VdbeAddOp0(tls, v, OP_Once) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) if !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if regDest < 0 { regDest = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } Xsqlite3ExprCode(tls, pParse, pExpr, regDest) } (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(1) Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) Xsqlite3VdbeJumpHere(tls, v, addr) } else { p = Xsqlite3ExprListAppend(tls, pParse, p, pExpr) if p != 0 { var pItem uintptr = p + 8 + uintptr((*ExprList)(unsafe.Pointer(p)).FnExpr-1)*32 libc.SetBitFieldPtr8Uint32(pItem+20, uint32(libc.Bool32(regDest < 0)), 3, 0x8) if regDest < 0 { regDest = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } *(*int32)(unsafe.Pointer(pItem + 24)) = regDest } (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = p } return regDest } // Generate code to evaluate an expression and store the results // into a register. Return the register number where the results // are stored. // // If the register is a temporary register that can be deallocated, // then write its number into *pReg. If the result register is not // a temporary, then set *pReg to zero. // // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107327:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && pExpr != uintptr(0) && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_REGISTER && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { *(*int32)(unsafe.Pointer(pReg)) = 0 r2 = Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, -1) } else { var r1 int32 = Xsqlite3GetTempReg(tls, pParse) r2 = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, r1) if r2 == r1 { *(*int32)(unsafe.Pointer(pReg)) = r1 } else { Xsqlite3ReleaseTempReg(tls, pParse, r1) *(*int32)(unsafe.Pointer(pReg)) = 0 } } return r2 } // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107355:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { return } inReg = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, target) if inReg != target { var op U8 if pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subquery) != U32(0) { op = U8(OP_Copy) } else { op = U8(OP_SCopy) } Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, int32(op), inReg, target) } } // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107379:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { Xsqlite3ExprCode(tls, pParse, pExpr, target) } Xsqlite3ExprDelete(tls, db, pExpr) } // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107392:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { Xsqlite3ExprCodeCopy(tls, pParse, pExpr, target) } } // Generate code that pushes the value of every element of the given // expression list into a sequence of registers beginning at target. // // Return the number of elements evaluated. The number returned will // usually be pList->nExpr but might be reduced if SQLITE_ECEL_OMITREF // is defined. // // The SQLITE_ECEL_DUP flag prevents the arguments from being // filled using OP_SCopy. OP_Copy must be used instead. // // The SQLITE_ECEL_FACTOR argument allows constant arguments to be // factored out into initialization code. // // The SQLITE_ECEL_REF flag means that expressions in the list with // ExprList.a[].u.x.iOrderByCol>0 have already been evaluated and stored // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107420:20: */ var pItem uintptr var i int32 var j int32 var n int32 var copyOp U8 if int32(flags)&SQLITE_ECEL_DUP != 0 { copyOp = uint8(OP_Copy) } else { copyOp = uint8(OP_SCopy) } var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Never gets this far otherwise n = (*ExprList)(unsafe.Pointer(pList)).FnExpr if !(int32((*Parse)(unsafe.Pointer(pParse)).FokConstFactor) != 0) { flags = libc.Uint8FromInt32(int32(flags) & libc.CplInt32(SQLITE_ECEL_FACTOR)) } pItem = pList + 8 /* &.a */ i = 0 __1: if !(i < n) { goto __3 } { var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr if int32(flags)&SQLITE_ECEL_REF != 0 && libc.AssignInt32(&j, int32(*(*U16)(unsafe.Pointer(pItem + 24)))) > 0 { if int32(flags)&SQLITE_ECEL_OMITREF != 0 { i-- n-- } else { Xsqlite3VdbeAddOp2(tls, v, int32(copyOp), j+srcReg-1, target+i) } } else if int32(flags)&SQLITE_ECEL_FACTOR != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target+i) } else { var inReg int32 = Xsqlite3ExprCodeTarget(tls, pParse, pExpr, target+i) if inReg != target+i { var pOp uintptr if int32(copyOp) == OP_Copy && int32((*VdbeOp)(unsafe.Pointer(libc.AssignUintptr(&pOp, Xsqlite3VdbeGetOp(tls, v, -1)))).Fopcode) == OP_Copy && (*VdbeOp)(unsafe.Pointer(pOp)).Fp1+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == inReg && (*VdbeOp)(unsafe.Pointer(pOp)).Fp2+(*VdbeOp)(unsafe.Pointer(pOp)).Fp3+1 == target+i && int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5) == 0 { (*VdbeOp)(unsafe.Pointer(pOp)).Fp3++ } else { Xsqlite3VdbeAddOp2(tls, v, int32(copyOp), inReg, target+i) } } } } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: ; return n } // Generate code for a BETWEEN operator. // // x BETWEEN y AND z // // The above is equivalent to // // x>=y AND x<=z // // Code it as such, taking care to do the common subexpression // elimination of x. // // The xJumpIf parameter determines details: // // NULL: Store the boolean result in reg[dest] // sqlite3ExprIfTrue: Jump to dest if true // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107495:13: */ bp := tls.Alloc(220) defer tls.Free(220) // var exprAnd Expr at bp+144, 72 // The AND operator in x>=y AND x<=z // var compLeft Expr at bp, 72 // The x>=y term // var compRight Expr at bp+72, 72 // The x<=z term *(*int32)(unsafe.Pointer(bp + 216 /* regFree1 */)) = 0 // Temporary use register var pDel uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) libc.Xmemset(tls, bp+72, 0, uint64(unsafe.Sizeof(Expr{}))) libc.Xmemset(tls, bp+144, 0, uint64(unsafe.Sizeof(Expr{}))) pDel = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).Fop = U8(TK_AND) (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).FpLeft = bp /* &compLeft */ (*Expr)(unsafe.Pointer(bp + 144 /* &exprAnd */)).FpRight = bp + 72 /* &compRight */ (*Expr)(unsafe.Pointer(bp /* &compLeft */)).Fop = U8(TK_GE) (*Expr)(unsafe.Pointer(bp /* &compLeft */)).FpLeft = pDel (*Expr)(unsafe.Pointer(bp /* &compLeft */)).FpRight = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8)).FpExpr (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).Fop = U8(TK_LE) (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).FpLeft = pDel (*Expr)(unsafe.Pointer(bp + 72 /* &compRight */)).FpRight = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8 + 1*32)).FpExpr exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+216)) if xJump != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr, int32, int32) })(unsafe.Pointer(&struct{ uintptr }{xJump})).f(tls, pParse, bp+144 /* &exprAnd */, dest, jumpIfNull) } else { // Mark the expression is being from the ON or USING clause of a join // so that the sqlite3ExprCodeTarget() routine will not attempt to move // it into the Parse.pConstExpr list. We should use a new bit for this, // for clarity, but we are out of bits in the Expr.flags field so we // have to reuse the EP_FromJoin bit. Bummer. *(*U32)(unsafe.Pointer(pDel + 4)) |= U32(EP_FromJoin) Xsqlite3ExprCodeTarget(tls, pParse, bp+144, dest) } Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 216 /* regFree1 */))) } Xsqlite3ExprDelete(tls, db, pDel) // Ensure adequate test coverage } // Generate code for a boolean expression such that a jump is made // to the label "dest" if the expression is true but execution // continues straight thru if the expression is false. // // If the expression evaluates to NULL (neither true nor false), then // take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL. // // This code depends on the fact that certain token values (ex: TK_EQ) // are the same as opcode values (ex: OP_Eq) that implement the corresponding // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107567:21: */ bp := tls.Alloc(8) defer tls.Free(8) var v uintptr var op int32 // var regFree1 int32 at bp, 4 // var regFree2 int32 at bp+4, 4 var r1 int32 var r2 int32 var d2 int32 var pAlt uintptr var isNot int32 // IS NOT TRUE or IS NOT FALSE var isTrue int32 var destIfFalse int32 var destIfNull int32 v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe op = 0 *(*int32)(unsafe.Pointer(bp /* regFree1 */)) = 0 *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */)) = 0 if !(v == uintptr(0)) { goto __1 } return __1: ; // Existence of VDBE checked by caller if !(pExpr == uintptr(0)) { goto __2 } return __2: ; // No way this can happen op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) switch op { case TK_AND: goto __4 case TK_OR: goto __5 case TK_NOT: goto __6 case TK_TRUTH: goto __7 case TK_IS: goto __8 case TK_ISNOT: goto __9 case TK_LT: goto __10 case TK_LE: goto __11 case TK_GT: goto __12 case TK_GE: goto __13 case TK_NE: goto __14 case TK_EQ: goto __15 case TK_ISNULL: goto __16 case TK_NOTNULL: goto __17 case TK_BETWEEN: goto __18 case TK_IN: goto __19 default: goto __20 } goto __3 __4: __5: pAlt = Xsqlite3ExprSimplifiedAndOr(tls, pExpr) if !(pAlt != pExpr) { goto __21 } Xsqlite3ExprIfTrue(tls, pParse, pAlt, dest, jumpIfNull) goto __22 __21: if !(op == TK_AND) { goto __23 } d2 = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, d2, jumpIfNull^SQLITE_JUMPIFNULL) Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) Xsqlite3VdbeResolveLabel(tls, v, d2) goto __24 __23: ; Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) __24: ; __22: ; goto __3 __6: ; Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) goto __3 __7: // IS TRUE or IS NOT TRUE ; isNot = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_ISNOT) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) if !(isTrue^isNot != 0) { goto __25 } Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, func() int32 { if isNot != 0 { return SQLITE_JUMPIFNULL } return 0 }()) goto __26 __25: Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, func() int32 { if isNot != 0 { return SQLITE_JUMPIFNULL } return 0 }()) __26: ; goto __3 __8: __9: ; if op == TK_IS { op = TK_EQ } else { op = TK_NE } jumpIfNull = SQLITE_NULLEQ __10: __11: __12: __13: __14: __15: if !(Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0) { goto __27 } goto default_expr __27: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) goto __3 __16: __17: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 __18: ; exprCodeBetween(tls, pParse, pExpr, dest, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, int32) }{Xsqlite3ExprIfTrue})), jumpIfNull) goto __3 __19: destIfFalse = Xsqlite3VdbeMakeLabel(tls, pParse) if jumpIfNull != 0 { destIfNull = dest } else { destIfNull = destIfFalse } sqlite3ExprCodeIN(tls, pParse, pExpr, destIfFalse, destIfNull) Xsqlite3VdbeGoto(tls, v, dest) Xsqlite3VdbeResolveLabel(tls, v, destIfFalse) goto __3 __20: default_expr: if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue)) { goto __28 } Xsqlite3VdbeGoto(tls, v, dest) goto __29 __28: if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) { goto __30 } // No-op goto __31 __30: r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) Xsqlite3VdbeAddOp3(tls, v, OP_If, r1, dest, libc.Bool32(jumpIfNull != 0)) __31: ; __29: ; goto __3 __3: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp /* regFree1 */))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */))) } // Generate code for a boolean expression such that a jump is made // to the label "dest" if the expression is false but execution // continues straight thru if the expression is true. // // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107709:21: */ bp := tls.Alloc(8) defer tls.Free(8) var v uintptr var op int32 // var regFree1 int32 at bp, 4 // var regFree2 int32 at bp+4, 4 var r1 int32 var r2 int32 var d2 int32 var pAlt uintptr var isNot int32 // IS NOT TRUE or IS NOT FALSE var isTrue int32 var destIfNull int32 v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe op = 0 *(*int32)(unsafe.Pointer(bp /* regFree1 */)) = 0 *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */)) = 0 if !(v == uintptr(0)) { goto __1 } return __1: ; // Existence of VDBE checked by caller if !(pExpr == uintptr(0)) { goto __2 } return __2: ; // The value of pExpr->op and op are related as follows: // // pExpr->op op // --------- ---------- // TK_ISNULL OP_NotNull // TK_NOTNULL OP_IsNull // TK_NE OP_Eq // TK_EQ OP_Ne // TK_GT OP_Le // TK_LE OP_Gt // TK_GE OP_Lt // TK_LT OP_Ge // // For other values of pExpr->op, op is undefined and unused. // The value of TK_ and OP_ constants are arranged such that we // can compute the mapping above using the following expression. // Assert()s verify that the computation is correct. op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) + TK_ISNULL&1 ^ 1 - TK_ISNULL&1 // Verify correct alignment of TK_ and OP_ constants switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { case TK_AND: goto __4 case TK_OR: goto __5 case TK_NOT: goto __6 case TK_TRUTH: goto __7 case TK_IS: goto __8 case TK_ISNOT: goto __9 case TK_LT: goto __10 case TK_LE: goto __11 case TK_GT: goto __12 case TK_GE: goto __13 case TK_NE: goto __14 case TK_EQ: goto __15 case TK_ISNULL: goto __16 case TK_NOTNULL: goto __17 case TK_BETWEEN: goto __18 case TK_IN: goto __19 default: goto __20 } goto __3 __4: __5: pAlt = Xsqlite3ExprSimplifiedAndOr(tls, pExpr) if !(pAlt != pExpr) { goto __21 } Xsqlite3ExprIfFalse(tls, pParse, pAlt, dest, jumpIfNull) goto __22 __21: if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND) { goto __23 } Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) goto __24 __23: d2 = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, d2, jumpIfNull^SQLITE_JUMPIFNULL) Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, dest, jumpIfNull) Xsqlite3VdbeResolveLabel(tls, v, d2) __24: ; __22: ; goto __3 __6: ; Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, jumpIfNull) goto __3 __7: // IS TRUE or IS NOT TRUE ; isNot = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_ISNOT) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) if !(isTrue^isNot != 0) { goto __25 } // IS TRUE and IS NOT FALSE Xsqlite3ExprIfFalse(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, func() int32 { if isNot != 0 { return 0 } return SQLITE_JUMPIFNULL }()) goto __26 __25: // IS FALSE and IS NOT TRUE Xsqlite3ExprIfTrue(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, dest, func() int32 { if isNot != 0 { return 0 } return SQLITE_JUMPIFNULL }()) __26: ; goto __3 __8: __9: ; if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IS { op = TK_NE } else { op = TK_EQ } jumpIfNull = SQLITE_NULLEQ __10: __11: __12: __13: __14: __15: if !(Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) != 0) { goto __27 } goto default_expr __27: ; r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) goto __3 __16: __17: r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 __18: ; exprCodeBetween(tls, pParse, pExpr, dest, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, int32) }{Xsqlite3ExprIfFalse})), jumpIfNull) goto __3 __19: if !(jumpIfNull != 0) { goto __28 } sqlite3ExprCodeIN(tls, pParse, pExpr, dest, dest) goto __29 __28: destIfNull = Xsqlite3VdbeMakeLabel(tls, pParse) sqlite3ExprCodeIN(tls, pParse, pExpr, dest, destIfNull) Xsqlite3VdbeResolveLabel(tls, v, destIfNull) __29: ; goto __3 __20: default_expr: if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) { goto __30 } Xsqlite3VdbeGoto(tls, v, dest) goto __31 __30: if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsTrue) == U32(EP_IsTrue)) { goto __32 } // no-op goto __33 __32: r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) Xsqlite3VdbeAddOp3(tls, v, OP_IfNot, r1, dest, libc.Bool32(jumpIfNull != 0)) __33: ; __31: ; goto __3 __3: ; Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp /* regFree1 */))) Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 4 /* regFree2 */))) } // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107881:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { Xsqlite3ExprIfFalse(tls, pParse, pCopy, dest, jumpIfNull) } Xsqlite3ExprDelete(tls, db, pCopy) } // Expression pVar is guaranteed to be an SQL variable. pExpr may be any // type of expression. // // If pExpr is a simple SQL value - an integer, real, string, blob // or NULL value - then the VDBE currently being prepared is configured // to re-prepare each time a new value is bound to variable pVar. // // Additionally, if pExpr is a simple SQL value and the value is the // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107903:12: */ bp := tls.Alloc(8) defer tls.Free(8) var res int32 = 0 var iVar int32 var pL uintptr *(*uintptr)(unsafe.Pointer(bp /* pR */)) = uintptr(0) Xsqlite3ValueFromExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { iVar = int32((*Expr)(unsafe.Pointer(pVar)).FiColumn) Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iVar) pL = Xsqlite3VdbeGetBoundValue(tls, (*Parse)(unsafe.Pointer(pParse)).FpReprepare, iVar, uint8(SQLITE_AFF_BLOB)) if pL != 0 { if Xsqlite3_value_type(tls, pL) == SQLITE_TEXT { Xsqlite3_value_text(tls, pL) // Make sure the encoding is UTF-8 } res = libc.Bool32(0 == Xsqlite3MemCompare(tls, pL, *(*uintptr)(unsafe.Pointer(bp)), uintptr(0))) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp /* pR */))) Xsqlite3ValueFree(tls, pL) } return res } // Do a deep comparison of two expression trees. Return 0 if the two // expressions are completely identical. Return 1 if they differ only // by a COLLATE operator at the top level. Return 2 if there are differences // other than the top-level COLLATE operator. // // If any subelement of pB has Expr.iTable==(-1) then it is allowed // to compare equal to an equivalent element in pA with Expr.iTable==iTab. // // The pA side might be using TK_REGISTER. If that is the case and pB is // not using TK_REGISTER but is otherwise equivalent, then still return 0. // // Sometimes this routine will return 2 even if the two expressions // really are equivalent. If we cannot prove that the expressions are // identical, we return 2 just to be safe. So if this routine // returns 2, then you do not really know for certain if the two // expressions are the same. But if you get a 0 or 1 return, then you // can be sure the expressions are the same. In the places where // this routine is used, it does not hurt to get an extra 2 - that // just might result in some slightly slower code. But returning // an incorrect 0 or 1 could lead to a malfunction. // // If pParse is not NULL then TK_VARIABLE terms in pA with bindings in // pParse->pReprepare can be matched against literals in pB. The // pParse->pVdbe->expmask bitmask is updated for each variable referenced. // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:107959:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { return 0 } return 2 } if pParse != 0 && int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_VARIABLE && exprCompareVariable(tls, pParse, pA, pB) != 0 { return 0 } combinedFlags = (*Expr)(unsafe.Pointer(pA)).Fflags | (*Expr)(unsafe.Pointer(pB)).Fflags if combinedFlags&U32(EP_IntValue) != 0 { if (*Expr)(unsafe.Pointer(pA)).Fflags&(*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_IntValue) != U32(0) && *(*int32)(unsafe.Pointer(pA + 8)) == *(*int32)(unsafe.Pointer(pB + 8)) { return 0 } return 2 } if int32((*Expr)(unsafe.Pointer(pA)).Fop) != int32((*Expr)(unsafe.Pointer(pB)).Fop) || int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_RAISE { if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_COLLATE && Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpLeft, pB, iTab) < 2 { return 1 } if int32((*Expr)(unsafe.Pointer(pB)).Fop) == TK_COLLATE && Xsqlite3ExprCompare(tls, pParse, pA, (*Expr)(unsafe.Pointer(pB)).FpLeft, iTab) < 2 { return 1 } return 2 } if *(*uintptr)(unsafe.Pointer(pA + 8)) != 0 { if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_FUNCTION || int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_AGG_FUNCTION { if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { return 2 } if libc.Bool32((*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_WinFunc) != U32(0)) != libc.Bool32((*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_WinFunc) != U32(0)) { return 2 } if (*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_WinFunc) != U32(0) { if Xsqlite3WindowCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(pA + 64)), *(*uintptr)(unsafe.Pointer(pB + 64)), 1) != 0 { return 2 } } } else if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_NULL { return 0 } else if int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_COLLATE { if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { return 2 } } else if *(*uintptr)(unsafe.Pointer(pB + 8)) != uintptr(0) && int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_AGG_COLUMN && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(pA + 8)), *(*uintptr)(unsafe.Pointer(pB + 8))) != 0 { return 2 } } if (*Expr)(unsafe.Pointer(pA)).Fflags&U32(EP_Distinct|EP_Commuted) != (*Expr)(unsafe.Pointer(pB)).Fflags&U32(EP_Distinct|EP_Commuted) { return 2 } if combinedFlags&U32(EP_TokenOnly) == U32(0) { if combinedFlags&U32(EP_xIsSelect) != 0 { return 2 } if combinedFlags&U32(EP_FixedCol) == U32(0) && Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpLeft, (*Expr)(unsafe.Pointer(pB)).FpLeft, iTab) != 0 { return 2 } if Xsqlite3ExprCompare(tls, pParse, (*Expr)(unsafe.Pointer(pA)).FpRight, (*Expr)(unsafe.Pointer(pB)).FpRight, iTab) != 0 { return 2 } if Xsqlite3ExprListCompare(tls, *(*uintptr)(unsafe.Pointer(pA + 32)), *(*uintptr)(unsafe.Pointer(pB + 32)), iTab) != 0 { return 2 } if int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_STRING && int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_TRUEFALSE && combinedFlags&U32(EP_Reduced) == U32(0) { if int32((*Expr)(unsafe.Pointer(pA)).FiColumn) != int32((*Expr)(unsafe.Pointer(pB)).FiColumn) { return 2 } if int32((*Expr)(unsafe.Pointer(pA)).Fop2) != int32((*Expr)(unsafe.Pointer(pB)).Fop2) && int32((*Expr)(unsafe.Pointer(pA)).Fop) == TK_TRUTH { return 2 } if int32((*Expr)(unsafe.Pointer(pA)).Fop) != TK_IN && (*Expr)(unsafe.Pointer(pA)).FiTable != (*Expr)(unsafe.Pointer(pB)).FiTable && (*Expr)(unsafe.Pointer(pA)).FiTable != iTab { return 2 } } } return 0 } // Compare two ExprList objects. Return 0 if they are identical, 1 // if they are certainly different, or 2 if it is not possible to // determine if they are identical or not. // // If any subelement of pB has Expr.iTable==(-1) then it is allowed // to compare equal to an equivalent element in pA with Expr.iTable==iTab. // // This routine might return non-zero for equivalent ExprLists. The // only consequence will be disabled optimizations. But this routine // must never return 0 if the two ExprList objects are different, or // a malfunction will result. // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108055:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 } if pA == uintptr(0) || pB == uintptr(0) { return 1 } if (*ExprList)(unsafe.Pointer(pA)).FnExpr != (*ExprList)(unsafe.Pointer(pB)).FnExpr { return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pA)).FnExpr; i++ { var res int32 var pExprA uintptr = (*ExprList_item)(unsafe.Pointer(pA + 8 + uintptr(i)*32)).FpExpr var pExprB uintptr = (*ExprList_item)(unsafe.Pointer(pB + 8 + uintptr(i)*32)).FpExpr if int32((*ExprList_item)(unsafe.Pointer(pA+8+uintptr(i)*32)).FsortFlags) != int32((*ExprList_item)(unsafe.Pointer(pB+8+uintptr(i)*32)).FsortFlags) { return 1 } if libc.AssignInt32(&res, Xsqlite3ExprCompare(tls, uintptr(0), pExprA, pExprB, iTab)) != 0 { return res } } return 0 } // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108074:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), iTab) } // Return non-zero if Expr p can only be true if pNN is not NULL. // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108087:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) } switch int32((*Expr)(unsafe.Pointer(p)).Fop) { case TK_IN: { if seenNot != 0 && (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { return 0 } return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) } case TK_BETWEEN: { var pList uintptr pList = *(*uintptr)(unsafe.Pointer(p + 32)) if seenNot != 0 { return 0 } if exprImpliesNotNull(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr, pNN, iTab, 1) != 0 || exprImpliesNotNull(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+1*32)).FpExpr, pNN, iTab, 1) != 0 { return 1 } return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) } case TK_EQ: fallthrough case TK_NE: fallthrough case TK_LT: fallthrough case TK_LE: fallthrough case TK_GT: fallthrough case TK_GE: fallthrough case TK_PLUS: fallthrough case TK_MINUS: fallthrough case TK_BITOR: fallthrough case TK_LSHIFT: fallthrough case TK_RSHIFT: fallthrough case TK_CONCAT: seenNot = 1 fallthrough case TK_STAR: fallthrough case TK_REM: fallthrough case TK_BITAND: fallthrough case TK_SLASH: { if exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, pNN, iTab, seenNot) != 0 { return 1 } } fallthrough case TK_SPAN: fallthrough case TK_COLLATE: fallthrough case TK_UPLUS: fallthrough case TK_UMINUS: { return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, seenNot) } case TK_TRUTH: { if seenNot != 0 { return 0 } if int32((*Expr)(unsafe.Pointer(p)).Fop2) != TK_IS { return 0 } return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) } case TK_BITNOT: fallthrough case TK_NOT: { return exprImpliesNotNull(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpLeft, pNN, iTab, 1) } } return 0 } // Return true if we can prove the pE2 will always be true if pE1 is // true. Return false if we cannot complete the proof or if pE2 might // be false. Examples: // // pE1: x==5 pE2: x==5 Result: true // pE1: x>0 pE2: x==5 Result: false // pE1: x=21 pE2: x=21 OR y=43 Result: true // pE1: x!=123 pE2: x IS NOT NULL Result: true // pE1: x!=?1 pE2: x IS NOT NULL Result: true // pE1: x IS NULL pE2: x IS NOT NULL Result: false // pE1: x IS ?2 pE2: x IS NOT NULL Reuslt: false // // When comparing TK_COLUMN nodes between pE1 and pE2, if pE2 has // Expr.iTable<0 then assume a table number given by iTab. // // If pParse is not NULL, then the values of bound variables in pE1 are // compared against literal values in pE2 and pParse->pVdbe->expmask is // modified to record which bound variables are referenced. If pParse // is NULL, then false will be returned if pE1 contains any bound variables. // // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108184:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } if int32((*Expr)(unsafe.Pointer(pE2)).Fop) == TK_OR && (Xsqlite3ExprImpliesExpr(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpLeft, iTab) != 0 || Xsqlite3ExprImpliesExpr(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpRight, iTab) != 0) { return 1 } if int32((*Expr)(unsafe.Pointer(pE2)).Fop) == TK_NOTNULL && exprImpliesNotNull(tls, pParse, pE1, (*Expr)(unsafe.Pointer(pE2)).FpLeft, iTab, 0) != 0 { return 1 } return 0 } // This is the Expr node callback for sqlite3ExprImpliesNonNullRow(). // If the expression node requires that the table at pWalker->iCur // have one or more non-NULL column, then set pWalker->eCode to 1 and abort. // // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108216:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune } switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { case TK_ISNOT: fallthrough case TK_ISNULL: fallthrough case TK_NOTNULL: fallthrough case TK_IS: fallthrough case TK_OR: fallthrough case TK_VECTOR: fallthrough case TK_CASE: fallthrough case TK_IN: fallthrough case TK_FUNCTION: fallthrough case TK_TRUTH: return WRC_Prune case TK_COLUMN: if *(*int32)(unsafe.Pointer(pWalker + 40)) == (*Expr)(unsafe.Pointer(pExpr)).FiTable { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) return WRC_Abort } return WRC_Prune case TK_AND: if int32((*Walker)(unsafe.Pointer(pWalker)).FeCode) == 0 { Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) if (*Walker)(unsafe.Pointer(pWalker)).FeCode != 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpRight) } } return WRC_Prune case TK_BETWEEN: if Xsqlite3WalkExpr(tls, pWalker, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) == WRC_Abort { return WRC_Abort } return WRC_Prune // Virtual tables are allowed to use constraints like x=NULL. So // a term of the form x=y does not prove that y is not null if x // is the column of a virtual table case TK_EQ: fallthrough case TK_NE: fallthrough case TK_LT: fallthrough case TK_LE: fallthrough case TK_GT: fallthrough case TK_GE: { var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var pRight uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpRight // The y.pTab=0 assignment in wherecode.c always happens after the // impliesNotNullRow() test if int32((*Expr)(unsafe.Pointer(pLeft)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pLeft + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pLeft + 64)))).FeTabType) == TABTYP_VTAB || int32((*Expr)(unsafe.Pointer(pRight)).Fop) == TK_COLUMN && *(*uintptr)(unsafe.Pointer(pRight + 64)) != uintptr(0) && int32((*Table)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pRight + 64)))).FeTabType) == TABTYP_VTAB { return WRC_Prune } } fallthrough default: return WRC_Continue } return int32(0) } // Return true (non-zero) if expression p can only be true if at least // one column of table iTab is non-null. In other words, return true // if expression p will always be NULL or false if every column of iTab // is NULL. // // False negatives are acceptable. In other words, it is ok to return // zero even if expression p will never be true of every column of iTab // is NULL. A false negative is merely a missed optimization opportunity. // // False positives are not allowed, however. A false positive may result // in an incorrect answer. // // Terms of p that are marked with EP_FromJoin (and hence that come from // the ON or USING clauses of LEFT JOINS) are excluded from the analysis. // // This routine is used to check if a LEFT JOIN can be converted into // an ordinary JOIN. The p argument is the WHERE clause. If the WHERE // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108325:20: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 p = Xsqlite3ExprSkipCollateAndLikely(tls, p) if p == uintptr(0) { return 0 } if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_NOTNULL { p = (*Expr)(unsafe.Pointer(p)).FpLeft } else { for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_AND { if Xsqlite3ExprImpliesNonNullRow(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTab) != 0 { return 1 } p = (*Expr)(unsafe.Pointer(p)).FpRight } } (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{impliesNotNullRow})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) *(*int32)(unsafe.Pointer(bp + 40)) = iTab Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108363:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(1) return WRC_Abort } return WRC_Continue } // Determine if an index pIdx on table with cursor iCur contains will // the expression pExpr. Return true if the index does cover the // expression and false if the pExpr expression references table columns // that are not found in the index pIdx. // // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108384:20: */ bp := tls.Alloc(64) defer tls.Free(64) // var w Walker at bp, 48 // var xcov IdxCover at bp+48, 16 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*IdxCover)(unsafe.Pointer(bp + 48 /* &xcov */)).FiCur = iCur (*IdxCover)(unsafe.Pointer(bp + 48 /* &xcov */)).FpIdx = pIdx (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprIdxCover})) *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &xcov */ Xsqlite3WalkExpr(tls, bp, pExpr) return libc.BoolInt32(!((*Walker)(unsafe.Pointer(bp)).FeCode != 0)) } // Walker SELECT callbacks for sqlite3ReferencesSrcList(). // // When entering a new subquery on the pExpr argument, add all FROM clause // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108419:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 var j I64 var piNew uintptr if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc == 0 { return WRC_Continue } j = (*RefSrcList)(unsafe.Pointer(p)).FnExclude *(*I64)(unsafe.Pointer(p + 16)) += I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) piNew = Xsqlite3DbRealloc(tls, (*RefSrcList)(unsafe.Pointer(p)).Fdb, (*RefSrcList)(unsafe.Pointer(p)).FaiExclude, uint64((*RefSrcList)(unsafe.Pointer(p)).FnExclude)*uint64(unsafe.Sizeof(int32(0)))) if piNew == uintptr(0) { (*RefSrcList)(unsafe.Pointer(p)).FnExclude = int64(0) return WRC_Abort } else { (*RefSrcList)(unsafe.Pointer(p)).FaiExclude = piNew } i = int64(0) __1: if !(i < I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc)) { goto __3 } { *(*int32)(unsafe.Pointer((*RefSrcList)(unsafe.Pointer(p)).FaiExclude + uintptr(j)*4)) = (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor } goto __2 __2: i++ j++ goto __1 goto __3 __3: ; return WRC_Continue } func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108439:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { *(*I64)(unsafe.Pointer(p + 16)) -= I64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) } } // This is the Walker EXPR callback for sqlite3ReferencesSrcList(). // // Set the 0x01 bit of pWalker->eCode if there is a reference to any // of the tables shown in RefSrcList.pRef. // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108456:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*RefSrcList)(unsafe.Pointer(p)).FpRef var nSrc int32 if pSrc != 0 { nSrc = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc } else { nSrc = 0 } for i = 0; i < nSrc; i++ { if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FiCursor { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(1) return WRC_Continue } } for i = 0; I64(i) < (*RefSrcList)(unsafe.Pointer(p)).FnExclude && *(*int32)(unsafe.Pointer((*RefSrcList)(unsafe.Pointer(p)).FaiExclude + uintptr(i)*4)) != (*Expr)(unsafe.Pointer(pExpr)).FiTable; i++ { } if I64(i) >= (*RefSrcList)(unsafe.Pointer(p)).FnExclude { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(2) } } return WRC_Continue } // Check to see if pExpr references any tables in pSrcList. // Possible return values: // // 1 pExpr does references a table in pSrcList. // // 0 pExpr references some table that is not defined in either // pSrcList or in subqueries of pExpr itself. // // -1 pExpr only references no tables at all, or it only // references tables defined in subqueries of pExpr itself. // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108493:20: */ bp := tls.Alloc(80) defer tls.Free(80) // var w Walker at bp, 48 // var x RefSrcList at bp+48, 32 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) libc.Xmemset(tls, bp+48, 0, uint64(unsafe.Sizeof(RefSrcList{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprRefToSrcList})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{selectRefEnter})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{selectRefLeave})) *(*uintptr)(unsafe.Pointer(bp + 40)) = bp + 48 /* &x */ (*RefSrcList)(unsafe.Pointer(bp + 48 /* &x */)).Fdb = (*Parse)(unsafe.Pointer(pParse)).Fdb (*RefSrcList)(unsafe.Pointer(bp + 48 /* &x */)).FpRef = pSrcList Xsqlite3WalkExprList(tls, bp, *(*uintptr)(unsafe.Pointer(pExpr + 32))) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64)))).FpFilter) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+48 /* &x */)).FaiExclude) if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { return 1 } else if (*Walker)(unsafe.Pointer(bp)).FeCode != 0 { return 0 } else { return -1 } return int32(0) } // This is a Walker expression node callback. // // For Expr nodes that contain pAggInfo pointers, make sure the AggInfo // object that is referenced does not refer directly to the Expr. If // it does, make a copy. This is done because the pExpr argument is // subject to change. // // The copy is stored on pParse->pConstExpr with a register number of 0. // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108535:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo var iAgg int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiAgg) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { if (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol+uintptr(iAgg)*32)).FpCExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { (*AggInfo_col)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(iAgg)*32)).FpCExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } } else { if (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc+uintptr(iAgg)*32)).FpFExpr == pExpr { pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if pExpr != 0 { (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(iAgg)*32)).FpFExpr = pExpr Xsqlite3ExprDeferredDelete(tls, pParse, pExpr) } } } } return WRC_Continue } // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108571:21: */ libc.Xmemset(tls, pWalker, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{agginfoPersistExprCb})) (*Walker)(unsafe.Pointer(pWalker)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkNoop})) } // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108582:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var i int32 at bp, 4 (*AggInfo)(unsafe.Pointer(pInfo)).FaCol = Xsqlite3ArrayAllocate(tls, db, (*AggInfo)(unsafe.Pointer(pInfo)).FaCol, int32(unsafe.Sizeof(AggInfo_col{})), pInfo+40, bp) return *(*int32)(unsafe.Pointer(bp /* i */)) } // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108598:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var i int32 at bp, 4 (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc = Xsqlite3ArrayAllocate(tls, db, (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc, int32(unsafe.Sizeof(AggInfo_func{})), pInfo+56, bp) return *(*int32)(unsafe.Pointer(bp /* i */)) } // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108615:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse var pSrcList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList var pAggInfo uintptr = *(*uintptr)(unsafe.Pointer(pNC + 16)) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { case TK_AGG_COLUMN: fallthrough case TK_COLUMN: { // Check to see if the column is in one of the tables in the FROM // clause of the aggregate query if pSrcList != uintptr(0) { var pItem uintptr = pSrcList + 8 /* &.a */ i = 0 __1: if !(i < (*SrcList)(unsafe.Pointer(pSrcList)).FnSrc) { goto __3 } { var pCol uintptr if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pItem)).FiCursor { // If we reach this point, it means that pExpr refers to a table // that is in the FROM clause of the aggregate query. // // Make an entry for the column in pAggInfo->aCol[] if there // is not an entry there already. var k int32 pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol k = 0 __4: if !(k < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn) { goto __6 } { if (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { goto __6 } } goto __5 __5: k++ pCol += 32 goto __4 goto __6 __6: ; if k >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn && libc.AssignInt32(&k, addAggInfoColumn(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo)) >= 0 { pCol = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaCol + uintptr(k)*32 (*AggInfo_col)(unsafe.Pointer(pCol)).FpTab = *(*uintptr)(unsafe.Pointer(pExpr + 64)) (*AggInfo_col)(unsafe.Pointer(pCol)).FiTable = (*Expr)(unsafe.Pointer(pExpr)).FiTable (*AggInfo_col)(unsafe.Pointer(pCol)).FiColumn = (*Expr)(unsafe.Pointer(pExpr)).FiColumn (*AggInfo_col)(unsafe.Pointer(pCol)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = int16(-1) (*AggInfo_col)(unsafe.Pointer(pCol)).FpCExpr = pExpr if (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy != 0 { var j int32 var n int32 var pGB uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy var pTerm uintptr = pGB + 8 /* &.a */ n = (*ExprList)(unsafe.Pointer(pGB)).FnExpr j = 0 __7: if !(j < n) { goto __9 } { var pE uintptr = (*ExprList_item)(unsafe.Pointer(pTerm)).FpExpr if int32((*Expr)(unsafe.Pointer(pE)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pE)).FiTable == (*Expr)(unsafe.Pointer(pExpr)).FiTable && int32((*Expr)(unsafe.Pointer(pE)).FiColumn) == int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) { (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(j) goto __9 } } goto __8 __8: j++ pTerm += 32 goto __7 goto __9 __9: } if int32((*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn) < 0 { (*AggInfo_col)(unsafe.Pointer(pCol)).FiSorterColumn = I16(libc.PostIncInt32(&(*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn, 1)) } } // There is now an entry for pExpr in pAggInfo->aCol[] (either // because it was there before or because we just created it). // Convert the pExpr to be a TK_AGG_COLUMN referring to that // pAggInfo->aCol[] entry. (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_AGG_COLUMN) (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(k) goto __3 } // endif pExpr->iTable==pItem->iCursor } goto __2 __2: i++ pItem += 112 goto __1 goto __3 __3: // end loop over pSrcList } return WRC_Prune } case TK_AGG_FUNCTION: { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_InAggFunc == 0 && (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth == int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) { // Check to see if pExpr is a duplicate of another aggregate // function that is already in the pAggInfo structure var pItem uintptr = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc i = 0 __10: if !(i < (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc) { goto __12 } { if (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr == pExpr { goto __12 } if Xsqlite3ExprCompare(tls, uintptr(0), (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr, pExpr, -1) == 0 { goto __12 } } goto __11 __11: i++ pItem += 32 goto __10 goto __12 __12: ; if i >= (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc { // pExpr is original. Make a new entry in pAggInfo->aFunc[] var enc U8 = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc i = addAggInfoFunc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pAggInfo) if i >= 0 { pItem = (*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32 (*AggInfo_func)(unsafe.Pointer(pItem)).FpFExpr = pExpr (*AggInfo_func)(unsafe.Pointer(pItem)).FiMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) (*AggInfo_func)(unsafe.Pointer(pItem)).FpFunc = Xsqlite3FindFunction(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(pExpr + 8)), func() int32 { if *(*uintptr)(unsafe.Pointer(pExpr + 32)) != 0 { return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr } return 0 }(), enc, uint8(0)) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Distinct) != 0 { (*AggInfo_func)(unsafe.Pointer(pItem)).FiDistinct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) } else { (*AggInfo_func)(unsafe.Pointer(pItem)).FiDistinct = -1 } } } // Make pExpr point to the appropriate pAggInfo->aFunc[] entry (*Expr)(unsafe.Pointer(pExpr)).FiAgg = I16(i) (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo = pAggInfo return WRC_Prune } else { return WRC_Continue } } } return WRC_Continue } // Analyze the pExpr expression looking for aggregate functions and // for variables that need to be added to AggInfo object that pNC->pAggInfo // points to. Additional entries are made on the AggInfo object as // necessary. // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108753:21: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{analyzeAggregate})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3WalkerDepthIncrease})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3WalkerDepthDecrease})) (*Walker)(unsafe.Pointer(bp /* &w */)).FwalkerDepth = 0 *(*uintptr)(unsafe.Pointer(bp + 40)) = pNC (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) Xsqlite3WalkExpr(tls, bp, pExpr) } // Call sqlite3ExprAnalyzeAggregates() for every expression in an // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108771:21: */ var pItem uintptr var i int32 if pList != 0 { pItem = pList + 8 /* &.a */ i = 0 __1: if !(i < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { goto __3 } { Xsqlite3ExprAnalyzeAggregates(tls, pNC, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: } } // Allocate a single new register for use to hold some intermediate result. func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108784:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } return *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other // purpose. func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108795:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint64(unsafe.Sizeof([8]int32{}))/uint64(unsafe.Sizeof(int32(0)))) { *(*int32)(unsafe.Pointer(pParse + 216 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } // Allocate or deallocate a block of nReg consecutive registers. func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108807:20: */ var i int32 var n int32 if nReg == 1 { return Xsqlite3GetTempReg(tls, pParse) } i = (*Parse)(unsafe.Pointer(pParse)).FiRangeReg n = (*Parse)(unsafe.Pointer(pParse)).FnRangeReg if nReg <= n { *(*int32)(unsafe.Pointer(pParse + 44)) += nReg *(*int32)(unsafe.Pointer(pParse + 40)) -= nReg } else { i = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nReg } return i } func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108821:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return } if nReg > (*Parse)(unsafe.Pointer(pParse)).FnRangeReg { (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = nReg (*Parse)(unsafe.Pointer(pParse)).FiRangeReg = iReg } } // Mark all temporary registers as being unavailable for reuse. // // Always invoke this procedure after coding a subroutine or co-routine // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108841:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } // Validate that no temporary register falls within the range of // iFirst..iLast, inclusive. This routine is only call from within assert() // statements. //************* End of expr.c *********************************************** //************* Begin file alter.c ****************************************** // 2005 February 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 file contains C code routines that used to generate VDBE code // that implements the ALTER TABLE command. // #include "sqliteInt.h" // The code in this file only exists if we are not omitting the // ALTER TABLE logic from the build. // Parameter zName is the name of a table that is about to be altered // (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN). // If the table is a system table, this function leaves an error message // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108901:12: */ bp := tls.Alloc(8) defer tls.Free(8) if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9371, 7) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != U32(0) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && Xsqlite3ReadOnlyShadowTables(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+9379, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 } // Generate code to verify that the schemas of database zDb and, if // bTemp is not true, database "temp", can still be parsed. This is // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108923:13: */ bp := tls.Alloc(64) defer tls.Free(64) (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, ts+9407, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, ts+9582, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } // Generate VM code to replace any double-quoted strings (but not double-quoted // identifiers) within the "sql" column of the sqlite_schema table in // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108960:13: */ bp := tls.Alloc(16) defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, ts+9756, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, ts+9903, 0) } } // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108981:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iDb, uintptr(0), p5) if iDb != 1 { Xsqlite3VdbeAddParseSchemaOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, 1, uintptr(0), p5) } } } // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:108994:21: */ bp := tls.Alloc(184) defer tls.Free(184) var iDb int32 // Database that contains the table var zDb uintptr // Name of database iDb var pTab uintptr // Table being renamed var zName uintptr // NULL-terminated version of pName var db uintptr // Database connection var nTabName int32 // Number of UTF-8 characters in zTabName var zTabName uintptr // Original name of the table var v uintptr var pVTab uintptr var i int32 zName = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb pVTab = uintptr(0) // Non-zero if this is a v-tab with an xRename() if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } goto exit_rename_table __1: ; pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) if !!(pTab != 0) { goto __2 } goto exit_rename_table __2: ; iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Get a NULL terminated version of the new table name. zName = Xsqlite3NameFromToken(tls, db, pName) if !!(zName != 0) { goto __3 } goto exit_rename_table __3: ; // Check that a table or index named 'zName' does not already exist // in database iDb. If so, this is an error. if !(Xsqlite3FindTable(tls, db, zName, zDb) != 0 || Xsqlite3FindIndex(tls, db, zName, zDb) != 0 || Xsqlite3IsShadowTableOf(tls, db, pTab, zName) != 0) { goto __4 } Xsqlite3ErrorMsg(tls, pParse, ts+10054, libc.VaList(bp, zName)) goto exit_rename_table __4: ; // Make sure it is not a system table being altered, or a reserved name // that the table is being renamed to. if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { goto __5 } goto exit_rename_table __5: ; if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+10113, zName)) { goto __6 } goto exit_rename_table __6: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } Xsqlite3ErrorMsg(tls, pParse, ts+10119, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; // Invoke the authorization callback. if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0) { goto __8 } goto exit_rename_table __8: ; if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { goto __9 } goto exit_rename_table __9: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __10 } pVTab = Xsqlite3GetVTable(tls, db, pTab) if !((*Sqlite3_module)(unsafe.Pointer((*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTab)).FpVtab)).FpModule)).FxRename == uintptr(0)) { goto __11 } pVTab = uintptr(0) __11: ; __10: ; // Begin a transaction for database iDb. Then modify the schema cookie // (since the ALTER TABLE modifies the schema). Call sqlite3MayAbort(), // as the scalar functions (e.g. sqlite_rename_table()) invoked by the // nested SQL may raise an exception. v = Xsqlite3GetVdbe(tls, pParse) if !(v == uintptr(0)) { goto __12 } goto exit_rename_table __12: ; Xsqlite3MayAbort(tls, pParse) // figure out how many UTF-8 characters are in zName zTabName = (*Table)(unsafe.Pointer(pTab)).FzName nTabName = Xsqlite3Utf8CharLen(tls, zTabName, -1) // Rewrite all CREATE TABLE, INDEX, TRIGGER or VIEW statements in // the schema to use the new table name. Xsqlite3NestedParse(tls, pParse, ts+10146, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) // Update the tbl_name and name columns of the sqlite_schema table // as required. Xsqlite3NestedParse(tls, pParse, ts+10330, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) // If the sqlite_sequence table exists in this database, then update // it with the new table name. if !(Xsqlite3FindTable(tls, db, ts+10635, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, ts+10651, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; // If the table being renamed is not itself part of the temp database, // edit view and trigger definitions within the temp database // as required. if !(iDb != 1) { goto __14 } Xsqlite3NestedParse(tls, pParse, ts+10709, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; // If this is a virtual table, invoke the xRename() function if // one is defined. The xRename() callback will modify the names // of any resources used by the v-table implementation (including other // SQLite tables) that are identified by the name of the virtual table. if !(pVTab != 0) { goto __15 } i = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeLoadString(tls, v, i, zName) Xsqlite3VdbeAddOp4(tls, v, OP_VRename, i, 0, 0, pVTab, -12) __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10974, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) Xsqlite3DbFree(tls, db, zName) } // Write code that will raise an error if the table described by // zDb and zTab is not empty. func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109163:13: */ bp := tls.Alloc(24) defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, ts+10987, libc.VaList(bp, zErr, zDb, zTab)) } // This function is called after an "ALTER TABLE ... ADD" statement // has been parsed. Argument pColDef contains the text of the new // column definition. // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109183:21: */ bp := tls.Alloc(64) defer tls.Free(64) var pNew uintptr // Copy of pParse->pNewTable var pTab uintptr // Table being altered var iDb int32 // Database number var zDb uintptr // Database name var zTab uintptr // Table name var zCol uintptr // Null-terminated column definition var pCol uintptr // The new column var pDflt uintptr // Default value for the new column var db uintptr // The database connection; var v uintptr // The prepared statement under construction var r1 int32 // Temporary registers db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } pNew = (*Parse)(unsafe.Pointer(pParse)).FpNewTable iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pNew)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = (*Table)(unsafe.Pointer(pNew)).FzName + 16 // Skip the "sqlite_altertab_" prefix on the name pCol = (*Table)(unsafe.Pointer(pNew)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)*24 pDflt = Xsqlite3ColumnExpr(tls, pNew, pCol) pTab = Xsqlite3FindTable(tls, db, zTab, zDb) // Invoke the authorization callback. if Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0 { return } // Check that the new column is not specified as PRIMARY KEY or UNIQUE. // If there is a NOT NULL constraint, then the default value for the // column must not be NULL. if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+11025, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+11057, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { // If the default value for the new column was specified with a // literal NULL, then set pDflt to 0. This simplifies checking // for an SQL NULL default below. if pDflt != 0 && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pDflt)).FpLeft)).Fop) == TK_NULL { pDflt = uintptr(0) } if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 64 + 8)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11084) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11143) } // Ensure the default expression is something that sqlite3ValueFromExpr() // can handle (i.e. not CURRENT_TIME etc.) if pDflt != 0 { *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */)) = uintptr(0) var rc int32 rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+56) if rc != SQLITE_OK { return } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11196) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+11242) } // Modify the CREATE TABLE statement. zCol = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pColDef)).Fz, uint64((*Token)(unsafe.Pointer(pColDef)).Fn)) if zCol != 0 { var zEnd uintptr = zCol + uintptr((*Token)(unsafe.Pointer(pColDef)).Fn-uint32(1)) for zEnd > zCol && (int32(*(*int8)(unsafe.Pointer(zEnd))) == ';' || int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zEnd)))])&0x01 != 0) { *(*int8)(unsafe.Pointer(libc.PostDecUintptr(&zEnd, 1))) = int8(0) } // substr() operations on characters, but addColOffset is in bytes. So we // have to use printf() to translate between these units: Xsqlite3NestedParse(tls, pParse, ts+11269, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 64)), zCol, *(*int32)(unsafe.Pointer(pNew + 64)), zTab)) Xsqlite3DbFree(tls, db, zCol) } v = Xsqlite3GetVdbe(tls, pParse) if v != 0 { // Make sure the schema version is at least 3. But do not upgrade // from less than 3 to 4, as that will corrupt any preexisting DESC // index. r1 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT) Xsqlite3VdbeUsesBtree(tls, v, iDb) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, r1, -2) Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, r1, Xsqlite3VdbeCurrentAddr(tls, v)+2) Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, 3) Xsqlite3ReleaseTempReg(tls, pParse, r1) // Reload the table definition renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterAdd)) // Verify that constraints are still satisfied if (*Table)(unsafe.Pointer(pNew)).FpCheck != uintptr(0) || uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, ts+11415, libc.VaList(bp+40, zTab, zDb)) } } } // This function is called by the parser after the table-name in // an "ALTER TABLE <table-name> ADD" statement is parsed. Argument // pSrc is the full-name of the table being altered. // // This routine makes a (partial) copy of the Table structure // for the table being altered and sets Parse.pNewTable to point // to it. Routines called by the parser as the column definition // is parsed (i.e. sqlite3AddColumn()) add the new Column data to // the copy. The copy of the Table structure is deleted by tokenize.c // after parsing is finished. // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109348:21: */ bp := tls.Alloc(8) defer tls.Free(8) var pNew uintptr var pTab uintptr var iDb int32 var i int32 var nAlloc int32 var db uintptr var pCol uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb // Look up the table being altered. if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } goto exit_begin_add_column __1: ; pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) if !!(pTab != 0) { goto __2 } goto exit_begin_add_column __2: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } Xsqlite3ErrorMsg(tls, pParse, ts+11645, 0) goto exit_begin_add_column __3: ; // Make sure this is not an attempt to ALTER a view. if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } Xsqlite3ErrorMsg(tls, pParse, ts+11679, 0) goto exit_begin_add_column __4: ; if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { goto __5 } goto exit_begin_add_column __5: ; Xsqlite3MayAbort(tls, pParse) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) // Put a copy of the Table struct in Parse.pNewTable for the // sqlite3AddColumn() function and friends to modify. But modify // the name by adding an "sqlite_altertab_" prefix. By adding this // prefix, we insure that the name will not collide with an existing // table because user table are not allowed to have the "sqlite_" // prefix on their name. pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) if !!(pNew != 0) { goto __6 } goto exit_begin_add_column __6: ; (*Parse)(unsafe.Pointer(pParse)).FpNewTable = pNew (*Table)(unsafe.Pointer(pNew)).FnTabRef = U32(1) (*Table)(unsafe.Pointer(pNew)).FnCol = (*Table)(unsafe.Pointer(pTab)).FnCol nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nAlloc)) (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+11709, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(!(int32((*Table)(unsafe.Pointer(pNew)).FaCol) != 0) || !(int32((*Table)(unsafe.Pointer(pNew)).FzName) != 0)) { goto __7 } goto exit_begin_add_column __7: ; libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pNew)).FaCol, (*Table)(unsafe.Pointer(pTab)).FaCol, uint64(unsafe.Sizeof(Column{}))*uint64((*Table)(unsafe.Pointer(pNew)).FnCol)) i = 0 __8: if !(i < int32((*Table)(unsafe.Pointer(pNew)).FnCol)) { goto __10 } pCol = (*Table)(unsafe.Pointer(pNew)).FaCol + uintptr(i)*24 (*Column)(unsafe.Pointer(pCol)).FzCnName = Xsqlite3DbStrDup(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName) (*Column)(unsafe.Pointer(pCol)).FhName = Xsqlite3StrIHash(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) goto __9 __9: i++ goto __8 goto __10 __10: ; *(*uintptr)(unsafe.Pointer(pNew + 64 + 16 /* &.pDfltList */)) = Xsqlite3ExprListDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)), 0) (*Table)(unsafe.Pointer(pNew)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema *(*int32)(unsafe.Pointer(pNew + 64)) = *(*int32)(unsafe.Pointer(pTab + 64)) (*Table)(unsafe.Pointer(pNew)).FnTabRef = U32(1) exit_begin_add_column: Xsqlite3SrcListDelete(tls, db, pSrc) return } // Parameter pTab is the subject of an ALTER TABLE ... RENAME COLUMN // command. This function checks if the table is a view or virtual // table (columns of views or virtual tables may not be renamed). If so, // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109431:12: */ bp := tls.Alloc(24) defer tls.Free(24) var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { zType = ts + 11728 /* "view" */ } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { zType = ts + 11733 /* "virtual table" */ } if zType != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+11747, libc.VaList(bp, func() uintptr { if bDrop != 0 { return ts + 11765 /* "drop column from" */ } return ts + 11782 /* "rename columns o..." */ }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 } // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109461:21: */ bp := tls.Alloc(112) defer tls.Free(112) var db uintptr // Database connection var pTab uintptr // Table being updated var iCol int32 // Index of column being renamed var zOld uintptr // Old column name var zNew uintptr // New column name var zDb uintptr // Name of schema containing the table var iSchema int32 // Index of the schema var bQuote int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb zOld = uintptr(0) zNew = uintptr(0) // True to quote the new name // Locate the table to be altered pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) if !!(pTab != 0) { goto __1 } goto exit_rename_column __1: ; // Cannot alter a system table if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { goto __2 } goto exit_rename_column __2: ; if !(SQLITE_OK != isRealTable(tls, pParse, pTab, 0)) { goto __3 } goto exit_rename_column __3: ; // Which schema holds the table to be altered iSchema = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iSchema)*32)).FzDbSName // Invoke the authorization callback. if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0)) != 0) { goto __4 } goto exit_rename_column __4: ; // Make sure the old name really is a column name in the table to be // altered. Set iCol to be the index of the column being renamed zOld = Xsqlite3NameFromToken(tls, db, pOld) if !!(zOld != 0) { goto __5 } goto exit_rename_column __5: ; iCol = 0 __6: if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __8 } if !(0 == Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName, zOld)) { goto __9 } goto __8 __9: ; goto __7 __7: iCol++ goto __6 goto __8 __8: ; if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } Xsqlite3ErrorMsg(tls, pParse, ts+11800, libc.VaList(bp, pOld)) goto exit_rename_column __10: ; // Ensure the schema contains no double-quoted strings renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1524, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) // Do the rename operation using a recursive UPDATE statement that // uses the sqlite_rename_column() SQL function to compute the new // CREATE statement text for the sqlite_schema table. Xsqlite3MayAbort(tls, pParse) zNew = Xsqlite3NameFromToken(tls, db, pNew) if !!(zNew != 0) { goto __11 } goto exit_rename_column __11: ; bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, ts+11821, libc.VaList(bp+8, zDb, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.Bool32(iSchema == 1), (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3NestedParse(tls, pParse, ts+12003, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+10974, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) Xsqlite3DbFree(tls, db, zOld) Xsqlite3DbFree(tls, db, zNew) return } // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. type RenameCtx = RenameCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109576:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. // // In other words, construct a new RenameToken object and add it // to the list of RenameToken objects currently being built up // in pParse->pRename. // // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109639:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { pNew = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(RenameToken{}))) if pNew != 0 { (*RenameToken)(unsafe.Pointer(pNew)).Fp = pPtr (*RenameToken)(unsafe.Pointer(pNew)).Ft = *(*Token)(unsafe.Pointer(pToken)) (*RenameToken)(unsafe.Pointer(pNew)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpRename (*Parse)(unsafe.Pointer(pParse)).FpRename = pNew } } return pPtr } // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109665:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { if (*RenameToken)(unsafe.Pointer(p)).Fp == pFrom { (*RenameToken)(unsafe.Pointer(p)).Fp = pTo break } } } // Walker callback used by sqlite3RenameExprUnmap(). func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109679:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr+64) } return WRC_Continue } // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109692:13: */ bp := tls.Alloc(56) defer tls.Free(56) var pWith uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWith if pWith != 0 { var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 var pCopy uintptr = uintptr(0) if (*Select)(unsafe.Pointer((*Cte)(unsafe.Pointer(pWith+16)).FpSelect)).FselFlags&U32(SF_Expanded) == U32(0) { // Push a copy of the With object onto the with-stack. We use a copy // here as the original will be expanded and resolved (flags SF_Expanded // and SF_Resolved) below. And the parser code that uses the with-stack // fails if the Select objects on it have already been expanded and // resolved. pCopy = Xsqlite3WithDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWith) pCopy = Xsqlite3WithPush(tls, pParse, pCopy, uint8(1)) } for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { var p uintptr = (*Cte)(unsafe.Pointer(pWith + 16 + uintptr(i)*48)).FpSelect // var sNC NameContext at bp, 56 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse if pCopy != 0 { Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp) } if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(bp)).FpParse)).Fdb)).FmallocFailed != 0 { return } Xsqlite3WalkSelect(tls, pWalker, p) Xsqlite3RenameExprlistUnmap(tls, pParse, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FpCols) } if pCopy != 0 && (*Parse)(unsafe.Pointer(pParse)).FpWith == pCopy { (*Parse)(unsafe.Pointer(pParse)).FpWith = (*With)(unsafe.Pointer(pCopy)).FpOuter } } } // Unmap all tokens in the IdList object passed as the second argument. func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109727:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pIdList)).Fa+uintptr(ii)*16)).FzName) } } } // Walker callback used by sqlite3RenameExprUnmap(). func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109742:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return WRC_Abort } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { var pList uintptr = (*Select)(unsafe.Pointer(p)).FpEList for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName != 0 && int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FzEName) } } } if (*Select)(unsafe.Pointer(p)).FpSrc != 0 { // Every Select as a SrcList, even if it is empty var pSrc uintptr = (*Select)(unsafe.Pointer(p)).FpSrc for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FzName) Xsqlite3WalkExpr(tls, pWalker, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpOn) unmapColumnIdlistNames(tls, pParse, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpUsing) } } renameWalkWith(tls, pWalker, p) return WRC_Continue } // Remove all nodes that are part of expression pExpr from the rename list. func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109775:21: */ bp := tls.Alloc(48) defer tls.Free(48) var eMode U8 = (*Parse)(unsafe.Pointer(pParse)).FeParseMode // var sWalker Walker at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameUnmapExprCb})) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameUnmapSelectCb})) (*Parse)(unsafe.Pointer(pParse)).FeParseMode = U8(PARSE_MODE_UNMAP) Xsqlite3WalkExpr(tls, bp, pExpr) (*Parse)(unsafe.Pointer(pParse)).FeParseMode = eMode } // Remove all nodes that are part of expression-list pEList from the // rename list. func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109791:21: */ bp := tls.Alloc(48) defer tls.Free(48) if pEList != 0 { var i int32 // var sWalker Walker at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameUnmapExprCb})) Xsqlite3WalkExprList(tls, bp, pEList) for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName) } } } } // Free the list of RenameToken objects given in the second argument func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109810:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { pNext = (*RenameToken)(unsafe.Pointer(p)).FpNext Xsqlite3DbFree(tls, db, p) } } // Search the Parse object passed as the first argument for a RenameToken // object associated with parse tree element pPtr. If found, return a pointer // to it. Otherwise, return NULL. // // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109828:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) } for pp = pParse + 400; *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { if (*RenameToken)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fp == pPtr { var pToken uintptr = *(*uintptr)(unsafe.Pointer(pp)) if pCtx != 0 { *(*uintptr)(unsafe.Pointer(pp)) = (*RenameToken)(unsafe.Pointer(pToken)).FpNext (*RenameToken)(unsafe.Pointer(pToken)).FpNext = (*RenameCtx1)(unsafe.Pointer(pCtx)).FpList (*RenameCtx1)(unsafe.Pointer(pCtx)).FpList = pToken (*RenameCtx1)(unsafe.Pointer(pCtx)).FnList++ } return pToken } } return uintptr(0) } // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109857:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune } renameWalkWith(tls, pWalker, p) return WRC_Continue } // This is a Walker expression callback. // // For every TK_COLUMN node in the expression tree, search to see // if the column being references is the column being renamed by an // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109876:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).FpTriggerTab == (*RenameCtx)(unsafe.Pointer(p)).FpTab { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr) } else if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && (*RenameCtx)(unsafe.Pointer(p)).FpTab == *(*uintptr)(unsafe.Pointer(pExpr + 64)) { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr) } return WRC_Continue } // The RenameCtx contains a list of tokens that reference a column that // is being renamed by an ALTER TABLE statement. Return the "last" // RenameToken in the RenameCtx and remove that RenameToken from the // RenameContext. "Last" means the last RenameToken encountered when // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109902:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr for pToken = (*RenameToken)(unsafe.Pointer(pBest)).FpNext; pToken != 0; pToken = (*RenameToken)(unsafe.Pointer(pToken)).FpNext { if (*RenameToken)(unsafe.Pointer(pToken)).Ft.Fz > (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz { pBest = pToken } } for pp = pCtx; *(*uintptr)(unsafe.Pointer(pp)) != pBest; pp = *(*uintptr)(unsafe.Pointer(pp)) + 24 { } *(*uintptr)(unsafe.Pointer(pp)) = (*RenameToken)(unsafe.Pointer(pBest)).FpNext return pBest } // An error occured while parsing or otherwise processing a database // object (either pParse->pNewTable, pNewIndex or pNewTrigger) as part of an // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109923:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zT uintptr = Xsqlite3_value_text(tls, pType) var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr zErr = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+12134, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { return ts + 12157 /* " " */ } return ts + 1524 /* "" */ }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zErr) } // For each name in the the expression-list pEList (i.e. each // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109948:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { var zName uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME && zName != uintptr(0) && 0 == Xsqlite3_stricmp(tls, zName, zOld) { renameTokenFind(tls, pParse, pCtx, zName) } } } } // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109973:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { var zName uintptr = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pIdList)).Fa + uintptr(i)*16)).FzName if 0 == Xsqlite3_stricmp(tls, zName, zOld) { renameTokenFind(tls, pParse, pCtx, zName) } } } } // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:109995:12: */ var rc int32 Xsqlite3ParseObjectInit(tls, p, db) if zSql == uintptr(0) { return SQLITE_NOMEM } if Xsqlite3_strnicmp(tls, zSql, ts+12159, 7) != 0 { return Xsqlite3CorruptError(tls, 110009) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = func() uint8 { if bTemp != 0 { return uint8(1) } return uint8(Xsqlite3FindDbName(tls, db, zDb)) }() (*Parse)(unsafe.Pointer(p)).FeParseMode = U8(PARSE_MODE_RENAME) (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) rc = Xsqlite3RunParser(tls, p, zSql) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } if rc == SQLITE_OK && ((*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0)) { rc = Xsqlite3CorruptError(tls, 110020) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) return rc } // This function edits SQL statement zSql, replacing each token identified // by the linked list pRename with the text of zNew. If argument bQuote is // true, then zNew is always quoted first. If no error occurs, the result // is loaded into context object pCtx as the result. // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110048:12: */ bp := tls.Alloc(24) defer tls.Free(24) var nNew I64 = I64(Xsqlite3Strlen30(tls, zNew)) var nSql I64 = I64(Xsqlite3Strlen30(tls, zSql)) var db uintptr = Xsqlite3_context_db_handle(tls, pCtx) var rc int32 = SQLITE_OK var zQuot uintptr = uintptr(0) var zOut uintptr var nQuot I64 = int64(0) var zBuf1 uintptr = uintptr(0) var zBuf2 uintptr = uintptr(0) if zNew != 0 { // Set zQuot to point to a buffer containing a quoted copy of the // identifier zNew. If the corresponding identifier in the original // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. zQuot = Xsqlite3MPrintf(tls, db, ts+12167, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { nQuot = I64(Xsqlite3Strlen30(tls, zQuot) - 1) } zOut = Xsqlite3DbMallocZero(tls, db, uint64(nSql+I64((*RenameCtx)(unsafe.Pointer(pRename)).FnList)*nQuot+int64(1))) } else { zOut = Xsqlite3DbMallocZero(tls, db, uint64((nSql*int64(2)+int64(1))*int64(3))) if zOut != 0 { zBuf1 = zOut + uintptr(nSql*int64(2)+int64(1)) zBuf2 = zOut + uintptr(nSql*int64(4)+int64(2)) } } // At this point pRename->pList contains a list of RenameToken objects // corresponding to all tokens in the input SQL that must be replaced // with the new column name, or with single-quoted versions of themselves. // All that remains is to construct and return the edited SQL string. if zOut != 0 { var nOut int32 = int32(nSql) libc.Xmemcpy(tls, zOut, zSql, uint64(nSql)) for (*RenameCtx)(unsafe.Pointer(pRename)).FpList != 0 { var iOff int32 // Offset of token to replace in zOut var nReplace U32 var zReplace uintptr var pBest uintptr = renameColumnTokenNext(tls, pRename) if zNew != 0 { if bQuote == 0 && Xsqlite3IsIdChar(tls, uint8(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz)))) != 0 { nReplace = U32(nNew) zReplace = zNew } else { nReplace = U32(nQuot) zReplace = zQuot if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '"' { nReplace++ } } } else { // Dequote the double-quoted token. Then requote it again, this time // using single quotes. If the character immediately following the // original token within the input SQL was a single quote ('), then // add another space after the new, single-quoted version of the // token. This is so that (SELECT "string"'alias') maps to // (SELECT 'string' 'alias'), and not (SELECT 'string''alias'). libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+12173, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 12157 /* " " */ } return ts + 1524 /* "" */ }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) } iOff = int32((int64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz) - int64(zSql)) / 1) if (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn != nReplace { libc.Xmemmove(tls, zOut+uintptr(U32(iOff)+nReplace), zOut+uintptr(uint32(iOff)+(*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn), uint64(uint32(nOut)-(uint32(iOff)+(*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) nOut = int32(U32(nOut) + (nReplace - (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zOut + uintptr(nOut))) = int8(0) } libc.Xmemcpy(tls, zOut+uintptr(iOff), zReplace, uint64(nReplace)) Xsqlite3DbFree(tls, db, pBest) } Xsqlite3_result_text(tls, pCtx, zOut, -1, libc.UintptrFromInt32(-1)) Xsqlite3DbFree(tls, db, zOut) } else { rc = SQLITE_NOMEM } Xsqlite3_free(tls, zQuot) return rc } // Resolve all symbols in the trigger at pParse->pNewTrigger, assuming // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110155:12: */ bp := tls.Alloc(56) defer tls.Free(56) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger var pStep uintptr // var sNC NameContext at bp, 56 var rc int32 = SQLITE_OK libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = Xsqlite3FindTable(tls, db, (*Trigger)(unsafe.Pointer(pNew)).Ftable, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(Xsqlite3SchemaToIndex(tls, db, (*Trigger)(unsafe.Pointer(pNew)).FpTabSchema))*32)).FzDbSName) (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pNew)).Fop // ALWAYS() because if the table of the trigger does not exist, the // error would have been hit before this point if (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab != 0 { rc = Xsqlite3ViewGetColumnNames(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) } // Resolve symbols in WHEN clause if rc == SQLITE_OK && (*Trigger)(unsafe.Pointer(pNew)).FpWhen != 0 { rc = Xsqlite3ResolveExprNames(tls, bp, (*Trigger)(unsafe.Pointer(pNew)).FpWhen) } for pStep = (*Trigger)(unsafe.Pointer(pNew)).Fstep_list; rc == SQLITE_OK && pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { if (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect != 0 { Xsqlite3SelectPrep(tls, pParse, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, bp) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(pParse)).Frc } } if rc == SQLITE_OK && (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 { var pSrc uintptr = Xsqlite3TriggerStepSrc(tls, pParse, pStep) if pSrc != 0 { var i int32 for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc && rc == SQLITE_OK; i++ { var p uintptr = pSrc + 8 + uintptr(i)*112 (*SrcItem)(unsafe.Pointer(p)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) if (*SrcItem)(unsafe.Pointer(p)).FpSelect != 0 { Xsqlite3SelectPrep(tls, pParse, (*SrcItem)(unsafe.Pointer(p)).FpSelect, uintptr(0)) Xsqlite3ExpandSubquery(tls, pParse, p) Xsqlite3SelectPrep(tls, pParse, (*SrcItem)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom+8+uintptr(i-1)*112)).FpSelect, uintptr(0)) } else { (*SrcItem)(unsafe.Pointer(p)).FpTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), p) if (*SrcItem)(unsafe.Pointer(p)).FpTab == uintptr(0) { rc = SQLITE_ERROR } else { (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(p)).FpTab)).FnTabRef++ rc = Xsqlite3ViewGetColumnNames(tls, pParse, (*SrcItem)(unsafe.Pointer(p)).FpTab) } } } if rc == SQLITE_OK && (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { rc = SQLITE_NOMEM } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = pSrc if rc == SQLITE_OK && (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere != 0 { rc = Xsqlite3ResolveExprNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) } if rc == SQLITE_OK { rc = Xsqlite3ResolveExprListNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) } if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 && rc == SQLITE_OK { var pUpsert uintptr = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc = pSrc *(*uintptr)(unsafe.Pointer(bp + 16)) = pUpsert (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_UUpsert rc = Xsqlite3ResolveExprListNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) if rc == SQLITE_OK { var pUpsertSet uintptr = (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet rc = Xsqlite3ResolveExprListNames(tls, bp, pUpsertSet) } if rc == SQLITE_OK { rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) } if rc == SQLITE_OK { rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = 0 } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = uintptr(0) Xsqlite3SrcListDelete(tls, db, pSrc) } else { rc = SQLITE_NOMEM } } } return rc } // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110251:13: */ var pStep uintptr // Find tokens to edit in WHEN clause Xsqlite3WalkExpr(tls, pWalker, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen) // Find tokens to edit in trigger steps for pStep = (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { Xsqlite3WalkSelect(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) Xsqlite3WalkExpr(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) Xsqlite3WalkExprList(tls, pWalker, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 { var pUpsert uintptr = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert Xsqlite3WalkExprList(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) Xsqlite3WalkExprList(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet) Xsqlite3WalkExpr(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) Xsqlite3WalkExpr(tls, pWalker, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) } if (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom != 0 { var i int32 for i = 0; i < (*SrcList)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom)).FnSrc; i++ { Xsqlite3WalkSelect(tls, pWalker, (*SrcItem)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpFrom+8+uintptr(i)*112)).FpSelect) } } } } // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110282:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe) } Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) for libc.AssignUintptr(&pIdx, (*Parse)(unsafe.Pointer(pParse)).FpNewIndex) != uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = (*Index)(unsafe.Pointer(pIdx)).FpNext Xsqlite3FreeIndex(tls, db, pIdx) } Xsqlite3DeleteTrigger(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) renameTokenFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpRename) Xsqlite3ParseObjectReset(tls, pParse) } // SQL function: // // sqlite_rename_column(SQL,TYPE,OBJ,DB,TABLE,COL,NEWNAME,QUOTE,TEMP) // // 0. zSql: SQL statement to rewrite // 1. type: Type of object ("table", "view" etc.) // 2. object: Name of object // 3. Database: Database name (e.g. "main") // 4. Table: Table name // 5. iCol: Index of column to rename // 6. zNew: New column name // 7. bQuote: Non-zero if the new column name should be quoted. // 8. bTemp: True if zSql comes from temp schema // // Do a column rename operation on the CREATE statement given in zSql. // The iCol-th column (left-most is 0) of table zTable is renamed from zCol // into zNew. The name should be quoted if bQuote is true. // // This function is used internally by the ALTER TABLE RENAME COLUMN command. // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare() unless the // SQLITE_TESTCTRL_INTERNAL_FUNCTIONS test setting is enabled. func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110323:13: */ bp := tls.Alloc(488) defer tls.Free(488) var db uintptr // var sCtx RenameCtx at bp, 32 var zSql uintptr var zDb uintptr var zTable uintptr var iCol int32 var zNew uintptr var bQuote int32 var bTemp int32 var zOld uintptr var rc int32 // var sParse Parse at bp+32, 408 // var sWalker Walker at bp+440, 48 var pIdx uintptr var i int32 var pTab uintptr var xAuth Sqlite3_xauth var pSelect uintptr var pExpr uintptr // A regular table var bFKOnly int32 var pFKey uintptr var pUpsertSet uintptr var pTarget uintptr // A trigger var pStep uintptr db = Xsqlite3_context_db_handle(tls, context) zSql = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zDb = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) zTable = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) zNew = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) bQuote = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 7*8))) bTemp = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 8*8))) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth _ = NotUsed if !(zSql == uintptr(0)) { goto __1 } return __1: ; if !(zTable == uintptr(0)) { goto __2 } return __2: ; if !(zNew == uintptr(0)) { goto __3 } return __3: ; if !(iCol < 0) { goto __4 } return __4: ; Xsqlite3BtreeEnterAll(tls, db) pTab = Xsqlite3FindTable(tls, db, zTable, zDb) if !(pTab == uintptr(0) || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __5 } Xsqlite3BtreeLeaveAll(tls, db) return __5: ; zOld = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RenameCtx{}))) (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FiCol = func() int32 { if iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { return -1 } return iCol }() (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = renameParseSql(tls, bp+32, zDb, db, zSql, bTemp) // Find tokens that need to be replaced. libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FpParse = bp + 32 /* &sParse */ (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnExprCb})) (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp /* &sCtx */ (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = pTab if !(rc != SQLITE_OK) { goto __6 } goto renameColumnFunc_done __6: ; if !((*Parse)(unsafe.Pointer(bp+32)).FpNewTable != 0) { goto __7 } if !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FeTabType) == TABTYP_VIEW) { goto __9 } pSelect = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable + 64)) *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Frc = SQLITE_OK Xsqlite3SelectPrep(tls, bp+32, pSelect, uintptr(0)) rc = func() int32 { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM } return (*Parse)(unsafe.Pointer(bp + 32)).Frc }() if !(rc == SQLITE_OK) { goto __11 } Xsqlite3WalkSelect(tls, bp+440, pSelect) __11: ; if !(rc != SQLITE_OK) { goto __12 } goto renameColumnFunc_done __12: ; goto __10 __9: if !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FeTabType) == TABTYP_NORM) { goto __13 } // A regular table bFKOnly = Xsqlite3_stricmp(tls, zTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FzName) (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable if !(bFKOnly == 0) { goto __14 } if !(iCol < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FnCol)) { goto __15 } renameTokenFind(tls, bp+32, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FaCol+uintptr(iCol)*24)).FzCnName) __15: ; if !((*RenameCtx)(unsafe.Pointer(bp)).FiCol < 0) { goto __16 } renameTokenFind(tls, bp+32, bp, (*Parse)(unsafe.Pointer(bp+32)).FpNewTable+52) __16: ; Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __17 goto __19 __19: ; pIdx = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewIndex __20: if !(pIdx != 0) { goto __22 } Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __20 goto __22 __22: ; i = 0 __23: if !(i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FnCol)) { goto __25 } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable)).FaCol+uintptr(i)*24) Xsqlite3WalkExpr(tls, bp+440, pExpr) goto __24 __24: i++ goto __23 goto __25 __25: ; __14: ; pFKey = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32)).FpNewTable + 64 + 8 /* &.pFKey */)) __26: if !(pFKey != 0) { goto __28 } i = 0 __29: if !(i < (*FKey)(unsafe.Pointer(pFKey)).FnCol) { goto __31 } if !(bFKOnly == 0 && (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FiFrom == iCol) { goto __32 } renameTokenFind(tls, bp+32, bp, pFKey+64+uintptr(i)*16) __32: ; if !(0 == Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zTable) && 0 == Xsqlite3_stricmp(tls, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FzCol, zOld)) { goto __33 } renameTokenFind(tls, bp+32, bp, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(i)*16)).FzCol) __33: ; goto __30 __30: i++ goto __29 goto __31 __31: ; goto __27 __27: pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom goto __26 goto __28 __28: ; __13: ; __10: ; goto __8 __7: if !((*Parse)(unsafe.Pointer(bp+32)).FpNewIndex != 0) { goto __34 } Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FaColExpr) Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: rc = renameResolveTrigger(tls, bp+32) if !(rc != SQLITE_OK) { goto __36 } goto renameColumnFunc_done __36: ; pStep = (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTrigger)).Fstep_list __37: if !(pStep != 0) { goto __39 } if !((*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0) { goto __40 } pTarget = Xsqlite3LocateTable(tls, bp+32, uint32(0), (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zDb) if !(pTarget == pTab) { goto __41 } if !((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0) { goto __42 } pUpsertSet = (*Upsert)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert)).FpUpsertSet renameColumnElistNames(tls, bp+32, bp, pUpsertSet, zOld) __42: ; renameColumnIdlistNames(tls, bp+32, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList, zOld) renameColumnElistNames(tls, bp+32, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, zOld) __41: ; __40: ; goto __38 __38: pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext goto __37 goto __39 __39: ; // Find tokens to edit in UPDATE OF clause if !((*Parse)(unsafe.Pointer(bp+32)).FpTriggerTab == pTab) { goto __43 } renameColumnIdlistNames(tls, bp+32, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger)).FpColumns, zOld) __43: ; // Find tokens to edit in various expressions and selects renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpNewTrigger) __35: ; __8: ; rc = renameEditSql(tls, context, bp, zSql, zNew, bQuote) renameColumnFunc_done: if !(rc != SQLITE_OK) { goto __44 } if !(rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0) { goto __45 } Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) goto __46 __45: if !((*Parse)(unsafe.Pointer(bp+32)).FzErrMsg != 0) { goto __47 } renameColumnParseError(tls, context, ts+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+32) goto __48 __47: Xsqlite3_result_error_code(tls, context, rc) __48: ; __46: ; __44: ; renameParseCleanup(tls, bp+32) renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth Xsqlite3BtreeLeaveAll(tls, db) } // Walker expression callback used by "RENAME TABLE". func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110490:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && (*RenameCtx)(unsafe.Pointer(p)).FpTab == *(*uintptr)(unsafe.Pointer(pExpr + 64)) { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, pExpr+64) } return WRC_Continue } // Walker select callback used by "RENAME TABLE". func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110504:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune } if pSrc == uintptr(0) { return WRC_Abort } for i = 0; i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc; i++ { var pItem uintptr = pSrc + 8 + uintptr(i)*112 if (*SrcItem)(unsafe.Pointer(pItem)).FpTab == (*RenameCtx)(unsafe.Pointer(p)).FpTab { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, p, (*SrcItem)(unsafe.Pointer(pItem)).FzName) } } renameWalkWith(tls, pWalker, pSelect) return WRC_Continue } // This C function implements an SQL user function that is used by SQL code // generated by the ALTER TABLE ... RENAME command to modify the definition // of any foreign key constraints that use the table being renamed as the // parent table. It is passed three arguments: // // 0: The database containing the table being renamed. // 1. type: Type of object ("table", "view" etc.) // 2. object: Name of object // 3: The complete text of the schema statement being modified, // 4: The old name of the table being renamed, and // 5: The new name of the table being renamed. // 6: True if the schema statement comes from the temp db. // // It returns the new schema statement. For example: // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110548:13: */ bp := tls.Alloc(544) defer tls.Free(544) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))) var zOld uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) var zNew uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) var bTemp int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) _ = NotUsed if zInput != 0 && zOld != 0 && zNew != 0 { // var sParse Parse at bp+80, 408 var rc int32 var bQuote int32 = 1 // var sCtx RenameCtx at bp, 32 // var sWalker Walker at bp+32, 48 var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(RenameCtx{}))) (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = Xsqlite3FindTable(tls, db, zOld, zDb) libc.Xmemset(tls, bp+32, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FpParse = bp + 80 /* &sParse */ (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameTableExprCb})) (*Walker)(unsafe.Pointer(bp + 32 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameTableSelectCb})) *(*uintptr)(unsafe.Pointer(bp + 32 + 40)) = bp /* &sCtx */ rc = renameParseSql(tls, bp+80, zDb, db, zInput, bTemp) if rc == SQLITE_OK { var isLegacy int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) if (*Parse)(unsafe.Pointer(bp+80)).FpNewTable != 0 { var pTab uintptr = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).FpNewTable if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if isLegacy == 0 { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 64)) // var sNC NameContext at bp+488, 56 libc.Xmemset(tls, bp+488, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 488 /* &sNC */)).FpParse = bp + 80 /* &sParse */ *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) Xsqlite3SelectPrep(tls, bp+80, *(*uintptr)(unsafe.Pointer(pTab + 64)), bp+488) if (*Parse)(unsafe.Pointer(bp+80)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).Frc } else { Xsqlite3WalkSelect(tls, bp+32, *(*uintptr)(unsafe.Pointer(pTab + 64))) } } } else { // Modify any FK definitions to point to the new table. if (isLegacy == 0 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pFKey uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { if Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zOld) == 0 { renameTokenFind(tls, bp+80, bp, (*FKey)(unsafe.Pointer(pFKey)).FzTo) } } } // If this is the table being altered, fix any table refs in CHECK // expressions. Also update the name that appears right after the // "CREATE [VIRTUAL] TABLE" bit. if Xsqlite3_stricmp(tls, zOld, (*Table)(unsafe.Pointer(pTab)).FzName) == 0 { (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = pTab if isLegacy == 0 { Xsqlite3WalkExprList(tls, bp+32, (*Table)(unsafe.Pointer(pTab)).FpCheck) } renameTokenFind(tls, bp+80, bp, (*Table)(unsafe.Pointer(pTab)).FzName) } } } else if (*Parse)(unsafe.Pointer(bp+80)).FpNewIndex != 0 { renameTokenFind(tls, bp+80, bp, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewIndex)).FzName) if isLegacy == 0 { Xsqlite3WalkExpr(tls, bp+32, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) } } else { var pTrigger uintptr = (*Parse)(unsafe.Pointer(bp + 80 /* &sParse */)).FpNewTrigger var pStep uintptr if 0 == Xsqlite3_stricmp(tls, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80)).FpNewTrigger)).Ftable, zOld) && (*Table)(unsafe.Pointer((*RenameCtx)(unsafe.Pointer(bp)).FpTab)).FpSchema == (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema { renameTokenFind(tls, bp+80, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+80 /* &sParse */)).FpNewTrigger)).Ftable) } if isLegacy == 0 { rc = renameResolveTrigger(tls, bp+80) if rc == SQLITE_OK { renameWalkTrigger(tls, bp+32, pTrigger) for pStep = (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { if (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 && 0 == Xsqlite3_stricmp(tls, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zOld) { renameTokenFind(tls, bp+80, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) } } } } } } if rc == SQLITE_OK { rc = renameEditSql(tls, context, bp, zInput, zNew, bQuote) } if rc != SQLITE_OK { if rc == SQLITE_ERROR && Xsqlite3WritableSchema(tls, db) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 3*8))) } else if (*Parse)(unsafe.Pointer(bp+80)).FzErrMsg != 0 { renameColumnParseError(tls, context, ts+1524, *(*uintptr)(unsafe.Pointer(argv + 1*8)), *(*uintptr)(unsafe.Pointer(argv + 2*8)), bp+80) } else { Xsqlite3_result_error_code(tls, context, rc) } } renameParseCleanup(tls, bp+80) renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) Xsqlite3BtreeLeaveAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth } return } func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110691:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 40)), pExpr) } return WRC_Continue } // SQL function: sqlite_rename_quotefix(DB,SQL) // // Rewrite the DDL statement "SQL" so that any string literals that use // double-quotes use single quotes instead. // // Two arguments must be passed: // // 0: Database name ("main", "temp" etc.). // 1: SQL statement to edit. // // The returned value is the modified SQL statement. For example, given // the database schema: // // CREATE TABLE t1(a, b, c); // // SELECT sqlite_rename_quotefix('main', // 'CREATE VIEW v1 AS SELECT "a", "string" FROM t1' // ); // // returns the string: // // CREATE VIEW v1 AS SELECT "a", 'string' FROM t1 // // If there is a error in the input SQL, then raise an error, except // if PRAGMA writable_schema=ON, then just return the input string // unmodified following an error. func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110725:13: */ bp := tls.Alloc(488) defer tls.Free(488) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) _ = NotUsed if zDb != 0 && zInput != 0 { var rc int32 // var sParse Parse at bp, 408 rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { // var sCtx RenameCtx at bp+408, 32 // var sWalker Walker at bp+440, 48 // Walker to find tokens that need to be replaced. libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(RenameCtx{}))) libc.Xmemset(tls, bp+440, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FpParse = bp /* &sParse */ (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameQuotefixExprCb})) (*Walker)(unsafe.Pointer(bp + 440 /* &sWalker */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameColumnSelectCb})) *(*uintptr)(unsafe.Pointer(bp + 440 + 40)) = bp + 408 /* &sCtx */ if (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 { if int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { var pSelect uintptr = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)) *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_OK Xsqlite3SelectPrep(tls, bp, pSelect, uintptr(0)) rc = func() int32 { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM } return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { Xsqlite3WalkSelect(tls, bp+440, pSelect) } } else { var i int32 Xsqlite3WalkExprList(tls, bp+440, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FnCol); i++ { Xsqlite3WalkExpr(tls, bp+440, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*24)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { Xsqlite3WalkExprList(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FaColExpr) Xsqlite3WalkExpr(tls, bp+440, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FpPartIdxWhere) } else { rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { renameWalkTrigger(tls, bp+440, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger) } } if rc == SQLITE_OK { rc = renameEditSql(tls, context, bp+408, zInput, uintptr(0), 0) } renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+408 /* &sCtx */)).FpList) } if rc != SQLITE_OK { if Xsqlite3WritableSchema(tls, db) != 0 && rc == SQLITE_ERROR { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } else { Xsqlite3_result_error_code(tls, context, rc) } } renameParseCleanup(tls, bp) } (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth Xsqlite3BtreeLeaveAll(tls, db) } // Function: sqlite_rename_test(DB,SQL,TYPE,NAME,ISTEMP,WHEN,DQS) // // An SQL user function that checks that there are no parse or symbol // resolution problems in a CREATE TRIGGER|TABLE|VIEW|INDEX statement. // After an ALTER TABLE .. RENAME operation is performed and the schema // reloaded, this function is called on each SQL statement in the schema // to ensure that it is still usable. // // 0: Database name ("main", "temp" etc.). // 1: SQL statement. // 2: Object type ("view", "table", "trigger" or "index"). // 3: Object name. // 4: True if object is from temp schema. // 5: "when" part of error message. // 6: True to disable the DQS quirk when parsing SQL. // // The return value is computed as follows: // // A. If an error is seen and not in PRAGMA writable_schema=ON mode, // then raise the error. // B. Else if a trigger is created and the the table that the trigger is // attached to is in database zDb, then return 1. // C. Otherwise return NULL. func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110838:13: */ bp := tls.Alloc(464) defer tls.Free(464) var db uintptr = Xsqlite3_context_db_handle(tls, context) var zDb uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zInput uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) var bTemp int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 4*8))) var isLegacy int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) var zWhen uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 5*8))) var bNoDQS int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 6*8))) var xAuth Sqlite3_xauth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) _ = NotUsed if zDb != 0 && zInput != 0 { var rc int32 // var sParse Parse at bp, 408 var flags int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags) if bNoDQS != 0 { *(*U64)(unsafe.Pointer(db + 48)) &= libc.Uint64FromInt32(libc.CplInt32(SQLITE_DqsDML | SQLITE_DqsDDL)) } rc = renameParseSql(tls, bp, zDb, db, zInput, bTemp) *(*U64)(unsafe.Pointer(db + 48)) |= U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)) if rc == SQLITE_OK { if isLegacy == 0 && (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 && int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { // var sNC NameContext at bp+408, 56 libc.Xmemset(tls, bp+408, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 408 /* &sNC */)).FpParse = bp /* &sParse */ Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 64)), bp+408) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc } } else if (*Parse)(unsafe.Pointer(bp)).FpNewTrigger != 0 { if isLegacy == 0 { rc = renameResolveTrigger(tls, bp) } if rc == SQLITE_OK { var i1 int32 = Xsqlite3SchemaToIndex(tls, db, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger)).FpTabSchema) var i2 int32 = Xsqlite3FindDbName(tls, db, zDb) if i1 == i2 { // Handle output case B Xsqlite3_result_int(tls, context, 1) } } } } if rc != SQLITE_OK && zWhen != 0 && !(Xsqlite3WritableSchema(tls, db) != 0) { // Output case A renameColumnParseError(tls, context, zWhen, *(*uintptr)(unsafe.Pointer(argv + 2*8)), *(*uintptr)(unsafe.Pointer(argv + 3*8)), bp) } renameParseCleanup(tls, bp) } (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth } // The implementation of internal UDF sqlite_drop_column(). // // Arguments: // // argv[0]: An integer - the index of the schema containing the table // argv[1]: CREATE TABLE statement to modify. // argv[2]: An integer - the index of the column to remove. // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110913:13: */ bp := tls.Alloc(432) defer tls.Free(432) var db uintptr var iSchema int32 var zSql uintptr var iCol int32 var zDb uintptr var rc int32 // var sParse Parse at bp+24, 408 var pCol uintptr var pTab uintptr var zEnd uintptr var zNew uintptr var xAuth Sqlite3_xauth var pEnd uintptr db = Xsqlite3_context_db_handle(tls, context) iSchema = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) zSql = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iSchema)*32)).FzDbSName zNew = uintptr(0) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) _ = NotUsed rc = renameParseSql(tls, bp+24, zDb, db, zSql, libc.Bool32(iSchema == 1)) if !(rc != SQLITE_OK) { goto __1 } goto drop_column_done __1: ; pTab = (*Parse)(unsafe.Pointer(bp + 24 /* &sParse */)).FpNewTable if !(pTab == uintptr(0) || int32((*Table)(unsafe.Pointer(pTab)).FnCol) == 1 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __2 } // This can happen if the sqlite_schema table is corrupt rc = Xsqlite3CorruptError(tls, 110941) goto drop_column_done __2: ; pCol = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1) { goto __3 } pEnd = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol+1)*24)).FzCnName) zEnd = (*RenameToken)(unsafe.Pointer(pEnd)).Ft.Fz goto __4 __3: ; zEnd = zSql + uintptr(*(*int32)(unsafe.Pointer(pTab + 64))) __5: if !(int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != 0 && int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz))) != ',') { goto __6 } (*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz-- goto __5 __6: ; __4: ; zNew = Xsqlite3MPrintf(tls, db, ts+12178, libc.VaList(bp, (int64((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int64(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) drop_column_done: renameParseCleanup(tls, bp+24) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc != SQLITE_OK) { goto __7 } Xsqlite3_result_error_code(tls, context, rc) __7: } // This function is called by the parser upon parsing an // // ALTER TABLE pSrc DROP COLUMN pName // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:110978:21: */ bp := tls.Alloc(64) defer tls.Free(64) var db uintptr // Database handle var pTab uintptr // Table to modify var iDb int32 // Index of db containing pTab in aDb[] var zDb uintptr // Database containing pTab ("main" etc.) var zCol uintptr // Name of column to drop var iCol int32 var iPos int32 var iColPos int32 var regOut int32 var i int32 var addr int32 var reg int32 var regRec int32 var pPk uintptr var nField int32 // Number of non-virtual columns after drop var iCur int32 var v uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb zCol = uintptr(0) // Index of column zCol in pTab->aCol[] // Look up the table being altered. if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } goto exit_drop_column __1: ; pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pSrc+8) if !!(pTab != 0) { goto __2 } goto exit_drop_column __2: ; // Make sure this is not an attempt to ALTER a view, virtual table or // system table. if !(SQLITE_OK != isAlterableTable(tls, pParse, pTab)) { goto __3 } goto exit_drop_column __3: ; if !(SQLITE_OK != isRealTable(tls, pParse, pTab, 1)) { goto __4 } goto exit_drop_column __4: ; // Find the index of the column being dropped. zCol = Xsqlite3NameFromToken(tls, db, pName) if !(zCol == uintptr(0)) { goto __5 } goto exit_drop_column __5: ; iCol = Xsqlite3ColumnIndex(tls, pTab, zCol) if !(iCol < 0) { goto __6 } Xsqlite3ErrorMsg(tls, pParse, ts+11800, libc.VaList(bp, pName)) goto exit_drop_column __6: ; // Do not allow the user to drop a PRIMARY KEY column or a column // constrained by a UNIQUE constraint. if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } Xsqlite3ErrorMsg(tls, pParse, ts+12185, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 { return ts + 12213 /* "PRIMARY KEY" */ } return ts + 7430 /* "UNIQUE" */ }(), zCol)) goto exit_drop_column __7: ; // Do not allow the number of columns to go to zero if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } Xsqlite3ErrorMsg(tls, pParse, ts+12225, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; // Edit the sqlite_schema table iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Invoke the authorization callback. if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_ALTER_TABLE, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, zCol) != 0) { goto __9 } goto exit_drop_column __9: ; renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1524, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, ts+12273, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+12394, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __10 } pPk = uintptr(0) nField = 0 v = Xsqlite3GetVdbe(tls, pParse) iCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3OpenTable(tls, pParse, iCur, iDb, pTab, OP_OpenWrite) addr = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) reg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __11 } Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iCur, reg) *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) goto __12 __11: pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pPk)).FnColumn) i = 0 __13: if !(i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { goto __15 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iCur, i, reg+i+1) goto __14 __14: i++ goto __13 goto __15 __15: ; nField = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) __12: ; regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) i = 0 __16: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __18 } if !(i != iCol && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0) { goto __19 } if !(pPk != 0) { goto __20 } iPos = int32(Xsqlite3TableColumnToIndex(tls, pPk, int16(i))) iColPos = int32(Xsqlite3TableColumnToIndex(tls, pPk, int16(iCol))) if !(iPos < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { goto __22 } goto __17 __22: ; regOut = reg + 1 + iPos - libc.Bool32(iPos > iColPos) goto __21 __20: regOut = reg + 1 + nField __21: ; if !(i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { goto __23 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regOut) goto __24 __23: Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iCur, i, regOut) __24: ; nField++ __19: ; goto __17 __17: i++ goto __16 goto __18 __18: ; if !(nField == 0) { goto __25 } // dbsqlfuzz 5f09e7bcc78b4954d06bf9f2400d7715f48d1fef (*Parse)(unsafe.Pointer(pParse)).FnMem++ Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, reg+1) nField = 1 __25: ; Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, reg+1, nField, regRec) if !(pPk != 0) { goto __26 } Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iCur, regRec, reg+1, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) goto __27 __26: Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iCur, regRec, reg) __27: ; Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_SAVEPOSITION)) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iCur, addr+1) Xsqlite3VdbeJumpHere(tls, v, addr) __10: ; exit_drop_column: Xsqlite3DbFree(tls, db, zCol) Xsqlite3SrcListDelete(tls, db, pSrc) } // Register built-in functions used to help implement ALTER TABLE func Xsqlite3AlterFunctions(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111120:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint64(unsafe.Sizeof(aAlterTableFuncs))/uint64(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12412}, {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12433}, {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12453}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12472}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 12491}} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111121:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** // 2005-07-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 code associated with the ANALYZE command. // // The ANALYZE command gather statistics about the content of tables // and indices. These statistics are made available to the query planner // to help it make better decisions about how to perform queries. // // The following system tables are or have been supported: // // CREATE TABLE sqlite_stat1(tbl, idx, stat); // CREATE TABLE sqlite_stat2(tbl, idx, sampleno, sample); // CREATE TABLE sqlite_stat3(tbl, idx, nEq, nLt, nDLt, sample); // CREATE TABLE sqlite_stat4(tbl, idx, nEq, nLt, nDLt, sample); // // Additional tables might be added in future releases of SQLite. // The sqlite_stat2 table is not created or used unless the SQLite version // is between 3.6.18 and 3.7.8, inclusive, and unless SQLite is compiled // with SQLITE_ENABLE_STAT2. The sqlite_stat2 table is deprecated. // The sqlite_stat2 table is superseded by sqlite_stat3, which is only // created and used by SQLite versions 3.7.9 through 3.29.0 when // SQLITE_ENABLE_STAT3 defined. The functionality of sqlite_stat3 // is a superset of sqlite_stat2 and is also now deprecated. The // sqlite_stat4 is an enhanced version of sqlite_stat3 and is only // available when compiled with SQLITE_ENABLE_STAT4 and in SQLite // versions 3.8.1 and later. STAT4 is the only variant that is still // supported. // // For most applications, sqlite_stat1 provides all the statistics required // for the query planner to make good choices. // // Format of sqlite_stat1: // // There is normally one row per index, with the index identified by the // name in the idx column. The tbl column is the name of the table to // which the index belongs. In each such row, the stat column will be // a string consisting of a list of integers. The first integer in this // list is the number of rows in the index. (This is the same as the // number of rows in the table, except for partial indices.) The second // integer is the average number of rows in the index that have the same // value in the first column of the index. The third integer is the average // number of rows in the index that have the same value for the first two // columns. The N-th integer (for N>1) is the average number of rows in // the index which have the same value for the first N-1 columns. For // a K-column index, there will be K+1 integers in the stat column. If // the index is unique, then the last integer will be 1. // // The list of integers in the stat column can optionally be followed // by the keyword "unordered". The "unordered" keyword, if it is present, // must be separated from the last integer by a single space. If the // "unordered" keyword is present, then the query planner assumes that // the index is unordered and will not use the index for a range query. // // If the sqlite_stat1.idx column is NULL, then the sqlite_stat1.stat // column contains a single integer which is the (estimated) number of // rows in the table identified by sqlite_stat1.tbl. // // Format of sqlite_stat2: // // The sqlite_stat2 is only created and is only used if SQLite is compiled // with SQLITE_ENABLE_STAT2 and if the SQLite version number is between // 3.6.18 and 3.7.8. The "stat2" table contains additional information // about the distribution of keys within an index. The index is identified by // the "idx" column and the "tbl" column is the name of the table to which // the index belongs. There are usually 10 rows in the sqlite_stat2 // table for each index. // // The sqlite_stat2 entries for an index that have sampleno between 0 and 9 // inclusive are samples of the left-most key value in the index taken at // evenly spaced points along the index. Let the number of samples be S // (10 in the standard build) and let C be the number of rows in the index. // Then the sampled rows are given by: // // rownumber = (i*C*2 + C)/(S*2) // // For i between 0 and S-1. Conceptually, the index space is divided into // S uniform buckets and the samples are the middle row from each bucket. // // The format for sqlite_stat2 is recorded here for legacy reference. This // version of SQLite does not support sqlite_stat2. It neither reads nor // writes the sqlite_stat2 table. This version of SQLite only supports // sqlite_stat3. // // Format for sqlite_stat3: // // The sqlite_stat3 format is a subset of sqlite_stat4. Hence, the // sqlite_stat4 format will be described first. Further information // about sqlite_stat3 follows the sqlite_stat4 description. // // Format for sqlite_stat4: // // As with sqlite_stat2, the sqlite_stat4 table contains histogram data // to aid the query planner in choosing good indices based on the values // that indexed columns are compared against in the WHERE clauses of // queries. // // The sqlite_stat4 table contains multiple entries for each index. // The idx column names the index and the tbl column is the table of the // index. If the idx and tbl columns are the same, then the sample is // of the INTEGER PRIMARY KEY. The sample column is a blob which is the // binary encoding of a key from the index. The nEq column is a // list of integers. The first integer is the approximate number // of entries in the index whose left-most column exactly matches // the left-most column of the sample. The second integer in nEq // is the approximate number of entries in the index where the // first two columns match the first two columns of the sample. // And so forth. nLt is another list of integers that show the approximate // number of entries that are strictly less than the sample. The first // integer in nLt contains the number of entries in the index where the // left-most column is less than the left-most column of the sample. // The K-th integer in the nLt entry is the number of index entries // where the first K columns are less than the first K columns of the // sample. The nDLt column is like nLt except that it contains the // number of distinct entries in the index that are less than the // sample. // // There can be an arbitrary number of sqlite_stat4 entries per index. // The ANALYZE command will typically generate sqlite_stat4 tables // that contain between 10 and 40 samples which are distributed across // the key space, though not uniformly, and which include samples with // large nEq values. // // Format for sqlite_stat3 redux: // // The sqlite_stat3 table is like sqlite_stat4 except that it only // looks at the left-most column of the index. The sqlite_stat3.sample // column contains the actual value of the left-most column instead // of a blob encoding of the complete index key as is found in // sqlite_stat4.sample. The nEq, nLt, and nDLt entries of sqlite_stat3 // all contain just a single integer which is the same as the first // integer in the equivalent columns in sqlite_stat4. // #include "sqliteInt.h" // This routine generates code that opens the sqlite_statN tables. // The sqlite_stat1 table is always relevant. sqlite_stat2 is now // obsolete. sqlite_stat3 and sqlite_stat4 are only opened when // appropriate compile-time options are provided. // // If the sqlite_statN tables do not previously exist, it is created. // // Argument zWhere may be a pointer to a buffer containing a table name, // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111299:13: */ bp := tls.Alloc(88) defer tls.Free(88) var i int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pDb uintptr var v uintptr = Xsqlite3GetVdbe(tls, pParse) // var aRoot [3]U32 at bp+76, 12 // var aCreateTbl [3]U8 at bp+72, 3 var nToOpen int32 if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { nToOpen = 2 } else { nToOpen = 1 } if v == uintptr(0) { return } pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 // Create new statistic tables if they do not exist, or clear them // if they do already exist. for i = 0; i < int32(uint64(unsafe.Sizeof(aTable))/uint64(unsafe.Sizeof(struct { FzName uintptr FzCols uintptr }{}))); i++ { var zTab uintptr = aTable[i].FzName var pStat uintptr *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(0) if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { // The sqlite_statN table does not exist. Create it. Note that a // side-effect of the CREATE TABLE statement is to leave the rootpage // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, ts+12514, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } } else { // The table already exists. If zWhere is not NULL, delete all entries // associated with the table zWhere. If zWhere is NULL, delete the // entire contents of the table. *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, ts+12537, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { Xsqlite3NestedParse(tls, pParse, ts+12567, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } } } // Open the sqlite_stat[134] tables for writing. for i = 0; i < nToOpen; i++ { Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, iStatCur+i, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb, 3) Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))))) } } var aTable = [3]struct { FzName uintptr FzCols uintptr }{ {FzName: ts + 12585 /* "sqlite_stat1" */, FzCols: ts + 12598 /* "tbl,idx,stat" */}, {FzName: ts + 12611 /* "sqlite_stat4" */, FzCols: ts + 12624 /* "tbl,idx,neq,nlt,..." */}, {FzName: ts + 12652 /* "sqlite_stat3" */}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111309:5 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. type StatAccum1 = struct { Fdb uintptr FnEst TRowcnt FnRow TRowcnt FnLimit int32 FnCol int32 FnKeyCol int32 FnSkipAhead U8 F__ccgo_pad1 [3]byte Fcurrent StatSample FnPSample TRowcnt FmxSample int32 FiPrn U32 F__ccgo_pad2 [4]byte FaBest uintptr FiMin int32 FnSample int32 FnMaxEqZero int32 FiGet int32 Fa uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111397:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. type StatAccum = StatAccum1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111397:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr FanLt uintptr Fu struct{ FiRowid I64 } FnRowid U32 FisPSample U8 F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111397:9 */ type StatSample = StatSample1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111398:27 */ // Reclaim memory used by a StatSample func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111439:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) } } // Initialize the BLOB value of a ROWID func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111451:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) } *(*uintptr)(unsafe.Pointer(p + 24)) = Xsqlite3DbMallocRawNN(tls, db, uint64(n)) if *(*uintptr)(unsafe.Pointer(p + 24)) != 0 { (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(n) libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(p + 24)), pData, uint64(n)) } else { (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) } } // Initialize the INTEGER value of a ROWID. func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111467:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 24))) } (*StatSample)(unsafe.Pointer(p)).FnRowid = U32(0) *(*I64)(unsafe.Pointer(p + 24)) = iRowid } // Copy the contents of object (*pFrom) into (*pTo). func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111480:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanEq, (*StatSample)(unsafe.Pointer(pFrom)).FanEq, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanLt, (*StatSample)(unsafe.Pointer(pFrom)).FanLt, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) libc.Xmemcpy(tls, (*StatSample)(unsafe.Pointer(pTo)).FanDLt, (*StatSample)(unsafe.Pointer(pFrom)).FanDLt, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64((*StatAccum)(unsafe.Pointer(p)).FnCol)) if (*StatSample)(unsafe.Pointer(pFrom)).FnRowid != 0 { sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pTo, int32((*StatSample)(unsafe.Pointer(pFrom)).FnRowid), *(*uintptr)(unsafe.Pointer(pFrom + 24))) } else { sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pTo, *(*I64)(unsafe.Pointer(pFrom + 24))) } } // Reclaim all memory of a StatAccum structure. func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111498:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) } for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FmxSample; i++ { sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48) } sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32) } Xsqlite3DbFree(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p) } // Implementation of the stat_init(N,K,C,L) SQL function. The four parameters // are: // N: The number of columns in the index including the rowid/pk (note 1) // K: The number of columns in the index excluding the rowid/pk. // C: Estimated number of rows in the index // L: A limit on the number of rows to scan, or 0 for no-limit // // Note 1: In the special case of the covering index that implements a // WITHOUT ROWID table, N is the number of PRIMARY KEY columns, not the // total number of columns in the table. // // For indexes on ordinary rowid tables, N==K+1. But for indexes on // WITHOUT ROWID tables, N=K+P where P is the number of columns in the // PRIMARY KEY of the table. The covering index that implements the // original WITHOUT ROWID table as N==K as a special case. // // This routine allocates the StatAccum object in heap memory. The return // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111533:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns var nColUp int32 // nCol rounded up for alignment var n int32 // Bytes of space to allocate var db uintptr = Xsqlite3_context_db_handle(tls, context) // Database connection // Maximum number of samples. 0 if STAT4 data is not collected var mxSample int32 if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { mxSample = SQLITE_STAT4_SAMPLES } else { mxSample = 0 } // Decode the three function arguments _ = argc nCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) if uint64(unsafe.Sizeof(TRowcnt(0))) < uint64(8) { nColUp = (nCol + 1) & libc.CplInt32(1) } else { nColUp = nCol } nKeyCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) // Allocate the space required for the StatAccum object n = int32(uint64(unsafe.Sizeof(StatAccum{})) + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp) + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp)) // StatAccum.anDLt if mxSample != 0 { n = int32(uint64(n) + (uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nColUp) + uint64(unsafe.Sizeof(StatSample{}))*uint64(nCol+mxSample) + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(3)*uint64(nColUp)*uint64(nCol+mxSample))) } p = Xsqlite3DbMallocZero(tls, db, uint64(n)) if p == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return } (*StatAccum)(unsafe.Pointer(p)).Fdb = db (*StatAccum)(unsafe.Pointer(p)).FnEst = TRowcnt(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) (*StatAccum)(unsafe.Pointer(p)).FnRow = TRowcnt(0) (*StatAccum)(unsafe.Pointer(p)).FnLimit = int32(Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)))) (*StatAccum)(unsafe.Pointer(p)).FnCol = nCol (*StatAccum)(unsafe.Pointer(p)).FnKeyCol = nKeyCol (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead = U8(0) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt = p + 1*128 (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(nColUp)*4 (*StatAccum)(unsafe.Pointer(p)).FmxSample = func() int32 { if (*StatAccum)(unsafe.Pointer(p)).FnLimit == 0 { return mxSample } return 0 }() if mxSample != 0 { var pSpace uintptr // Allocated space not yet assigned var i int32 // Used to iterate through p->aSample[] (*StatAccum)(unsafe.Pointer(p)).FiGet = -1 (*StatAccum)(unsafe.Pointer(p)).FnPSample = (*StatAccum)(unsafe.Pointer(p)).FnEst/TRowcnt(mxSample/3+1) + TRowcnt(1) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(nColUp)*4 (*StatAccum)(unsafe.Pointer(p)).FiPrn = U32(0x689e962d)*U32(nCol) ^ 0xd0944565*U32(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) // Set up the StatAccum.a[] and aBest[] arrays (*StatAccum)(unsafe.Pointer(p)).Fa = (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(nColUp)*4 (*StatAccum)(unsafe.Pointer(p)).FaBest = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample)*48 pSpace = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(mxSample+nCol)*48 for i = 0; i < mxSample+nCol; i++ { (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanEq = pSpace pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanLt = pSpace pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48)).FanDLt = pSpace pSpace += uintptr(uint64(unsafe.Sizeof(TRowcnt(0))) * uint64(nColUp)) } for i = 0; i < nCol; i++ { (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).FaBest + uintptr(i)*48)).FiCol = i } } // Return a pointer to the allocated object to the caller. Note that // only the pointer (the 2nd parameter) matters. The size of the object // (given by the 3rd parameter) is never used and can be any positive // value. Xsqlite3_result_blob(tls, context, p, int32(unsafe.Sizeof(StatAccum{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{statAccumDestructor}))) } var statInitFuncdef = FuncDef{ FnArg: int8(4), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse FzName: ts + 12665} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111619:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and // considering only any trailing columns and the sample hash value, this // function returns true if sample pNew is to be preferred over pOld. // In other words, if we assume that the cardinalities of the selected // column for pNew and pOld are equal, is pNew to be preferred over pOld. // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111643:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 for i = (*StatSample)(unsafe.Pointer(pNew)).FiCol + 1; i < nCol; i++ { if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) > *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { return 1 } if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr(i)*4)) < *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr(i)*4)) { return 0 } } if (*StatSample)(unsafe.Pointer(pNew)).FiHash > (*StatSample)(unsafe.Pointer(pOld)).FiHash { return 1 } return 0 } // Return true if pNew is to be preferred over pOld. // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111667:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) if nEqNew > nEqOld { return 1 } if nEqNew == nEqOld { if (*StatSample)(unsafe.Pointer(pNew)).FiCol < (*StatSample)(unsafe.Pointer(pOld)).FiCol { return 1 } return libc.Bool32((*StatSample)(unsafe.Pointer(pNew)).FiCol == (*StatSample)(unsafe.Pointer(pOld)).FiCol && sampleIsBetterPost(tls, pAccum, pNew, pOld) != 0) } return 0 } // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111690:13: */ var pSample uintptr var i int32 var pOld uintptr var pUpgrade uintptr var pMin uintptr var anEq uintptr var anLt uintptr var anDLt uintptr var iMin int32 pSample = uintptr(0) // StatAccum.nMaxEqZero is set to the maximum number of leading 0 // values in the anEq[] array of any sample in StatAccum.a[]. In // other words, if nMaxEqZero is n, then it is guaranteed that there // are no samples with StatSample.anEq[m]==0 for (m>=n). if !(nEqZero > (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero) { goto __1 } (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero = nEqZero __1: ; if !(int32((*StatSample)(unsafe.Pointer(pNew)).FisPSample) == 0) { goto __2 } pUpgrade = uintptr(0) // This sample is being added because the prefix that ends in column // iCol occurs many times in the table. However, if we have already // added a sample that shares this prefix, there is no need to add // this one. Instead, upgrade the priority of the highest priority // existing sample that shares this prefix. i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1 __3: if !(i >= 0) { goto __5 } pOld = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr(i)*48 if !(*(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) == TRowcnt(0)) { goto __6 } if !((*StatSample)(unsafe.Pointer(pOld)).FisPSample != 0) { goto __7 } return __7: ; if !(pUpgrade == uintptr(0) || sampleIsBetter(tls, p, pOld, pUpgrade) != 0) { goto __8 } pUpgrade = pOld __8: ; __6: ; goto __4 __4: i-- goto __3 goto __5 __5: ; if !(pUpgrade != 0) { goto __9 } (*StatSample)(unsafe.Pointer(pUpgrade)).FiCol = (*StatSample)(unsafe.Pointer(pNew)).FiCol *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pUpgrade)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pUpgrade)).FiCol)*4)) goto find_new_min __9: ; __2: ; // If necessary, remove sample iMin to make room for the new sample. if !((*StatAccum)(unsafe.Pointer(p)).FnSample >= (*StatAccum)(unsafe.Pointer(p)).FmxSample) { goto __10 } pMin = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiMin)*48 anEq = (*StatSample)(unsafe.Pointer(pMin)).FanEq anLt = (*StatSample)(unsafe.Pointer(pMin)).FanLt anDLt = (*StatSample)(unsafe.Pointer(pMin)).FanDLt sampleClear(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, pMin) libc.Xmemmove(tls, pMin, pMin+1*48, uint64(unsafe.Sizeof(StatSample{}))*uint64((*StatAccum)(unsafe.Pointer(p)).FnSample-(*StatAccum)(unsafe.Pointer(p)).FiMin-1)) pSample = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FnSample-1)*48 (*StatSample)(unsafe.Pointer(pSample)).FnRowid = U32(0) (*StatSample)(unsafe.Pointer(pSample)).FanEq = anEq (*StatSample)(unsafe.Pointer(pSample)).FanDLt = anDLt (*StatSample)(unsafe.Pointer(pSample)).FanLt = anLt (*StatAccum)(unsafe.Pointer(p)).FnSample = (*StatAccum)(unsafe.Pointer(p)).FmxSample - 1 __10: ; // The "rows less-than" for the rowid column must be greater than that // for the last sample in the p->a[] array. Otherwise, the samples would // be out of order. // Insert the new sample pSample = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FnSample)*48 sampleCopy(tls, p, pSample, pNew) (*StatAccum)(unsafe.Pointer(p)).FnSample++ // Zero the first nEqZero entries in the anEq[] array. libc.Xmemset(tls, (*StatSample)(unsafe.Pointer(pSample)).FanEq, 0, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nEqZero)) find_new_min: if !((*StatAccum)(unsafe.Pointer(p)).FnSample >= (*StatAccum)(unsafe.Pointer(p)).FmxSample) { goto __11 } iMin = -1 i = 0 __12: if !(i < (*StatAccum)(unsafe.Pointer(p)).FmxSample) { goto __14 } if !((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FisPSample != 0) { goto __15 } goto __13 __15: ; if !(iMin < 0 || sampleIsBetter(tls, p, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(iMin)*48, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48) != 0) { goto __16 } iMin = i __16: ; goto __13 __13: i++ goto __12 goto __14 __14: ; (*StatAccum)(unsafe.Pointer(p)).FiMin = iMin __11: } // Field iChng of the index being scanned has changed. So at this point // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111782:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed // into IndexSample.a[] at this point. for i = (*StatAccum)(unsafe.Pointer(p)).FnCol - 2; i >= iChng; i-- { var pBest uintptr = (*StatAccum)(unsafe.Pointer(p)).FaBest + uintptr(i)*48 *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pBest)).FanEq + uintptr(i)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) if (*StatAccum)(unsafe.Pointer(p)).FnSample < (*StatAccum)(unsafe.Pointer(p)).FmxSample || sampleIsBetter(tls, p, pBest, (*StatAccum)(unsafe.Pointer(p)).Fa+uintptr((*StatAccum)(unsafe.Pointer(p)).FiMin)*48) != 0 { sampleInsert(tls, p, pBest, i) } } // Check that no sample contains an anEq[] entry with an index of // p->nMaxEqZero or greater set to zero. for i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1; i >= 0; i-- { var j int32 for j = (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero; j < (*StatAccum)(unsafe.Pointer(p)).FnCol; j++ { } } // Update the anEq[] fields of any samples already collected. if iChng < (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero { for i = (*StatAccum)(unsafe.Pointer(p)).FnSample - 1; i >= 0; i-- { var j int32 for j = iChng; j < (*StatAccum)(unsafe.Pointer(p)).FnCol; j++ { if *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) == TRowcnt(0) { *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa+uintptr(i)*48)).FanEq + uintptr(j)*4)) = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(j)*4)) } } } (*StatAccum)(unsafe.Pointer(p)).FnMaxEqZero = iChng } } // Implementation of the stat_push SQL function: stat_push(P,C,R) // Arguments: // // P Pointer to the StatAccum object created by stat_init() // C Index of left-most column to differ from previous row // R Rowid for the current row. Might be a key record for // WITHOUT ROWID tables. // // The purpose of this routine is to collect statistical data and/or // samples from the index being analyzed into the StatAccum object. // The stat_get() SQL function will be used afterwards to // retrieve the information gathered. // // This SQL function usually returns NULL, but might return an integer // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111834:13: */ var i int32 // The three function arguments var p uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) var iChng int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) _ = argc _ = context if (*StatAccum)(unsafe.Pointer(p)).FnRow == TRowcnt(0) { // This is the first call to this function. Do initialization. for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) } } else { // Second and subsequent calls get processed here if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { samplePushPrevious(tls, p, iChng) } // Update anDLt[], anLt[] and anEq[] to reflect the values that apply // to the current row of the index. for i = 0; i < iChng; i++ { *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4))++ } for i = iChng; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4))++ if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr(i)*4)) += *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) } *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanEq + uintptr(i)*4)) = TRowcnt(1) } } (*StatAccum)(unsafe.Pointer(p)).FnRow++ if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var nLt TRowcnt if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == SQLITE_INTEGER { sampleSetRowidInt64(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) } else { sampleSetRowid(tls, (*StatAccum)(unsafe.Pointer(p)).Fdb, p+32, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))), Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) } (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiHash = libc.AssignPtrUint32(p+88, (*StatAccum)(unsafe.Pointer(p)).FiPrn*U32(1103515245)+U32(12345)) nLt = *(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanLt + uintptr((*StatAccum)(unsafe.Pointer(p)).FnCol-1)*4)) // Check if this is to be a periodic sample. If so, add it. if nLt/(*StatAccum)(unsafe.Pointer(p)).FnPSample != (nLt+TRowcnt(1))/(*StatAccum)(unsafe.Pointer(p)).FnPSample { (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(1) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = 0 sampleInsert(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FnCol-1) (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FisPSample = U8(0) } // Update the aBest[] array. for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol-1; i++ { (*StatAccum)(unsafe.Pointer(p)).Fcurrent.FiCol = i if i >= iChng || sampleIsBetterPost(tls, p, p+32, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48) != 0 { sampleCopy(tls, p, (*StatAccum)(unsafe.Pointer(p)).FaBest+uintptr(i)*48, p+32) } } } else if (*StatAccum)(unsafe.Pointer(p)).FnLimit != 0 && (*StatAccum)(unsafe.Pointer(p)).FnRow > TRowcnt((*StatAccum)(unsafe.Pointer(p)).FnLimit)*TRowcnt(int32((*StatAccum)(unsafe.Pointer(p)).FnSkipAhead)+1) { (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead++ Xsqlite3_result_int(tls, context, libc.Bool32(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt)) > TRowcnt(0))) } } var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse FzName: ts + 12675} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111909:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into // the StatAccum object by prior calls to stat_push(). The P parameter // has type BLOB but it is really just a pointer to the StatAccum object. // The content to returned is determined by the parameter J // which is one of the STAT_GET_xxxx values defined above. // // The stat_get(P,J) function is not available to generic SQL. It is // inserted as part of a manually constructed bytecode program. (See // the callStatGet() routine below.) It is guaranteed that the P // parameter will always be a pointer to a StatAccum object, never a // NULL. // // If STAT4 is not enabled, then J is always // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:111946:13: */ bp := tls.Alloc(88) defer tls.Free(88) var p uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) // STAT4 has a parameter on this routine. var eCall int32 = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if eCall == STAT_GET_STAT1 { // Return the value to store in the "stat" column of the sqlite_stat1 // table for this index. // // The value is a string composed of a list of integers describing // the index. The first integer in the list is the total number of // entries in the index. There is one additional integer in the list // for each indexed column. This additional integer is an estimate of // the number of rows matched by a equality query on the index using // a key with the corresponding number of fields. In other words, // if the index is on columns (a,b) and the sqlite_stat1 value is // "100 10 2", then SQLite estimates that: // // * the index contains 100 rows, // * "WHERE a=?" matches 10 rows, and // * "WHERE a=? AND b=?" matches 2 rows. // // If D is the count of distinct values and K is the total number of // rows, then each estimate is computed as: // // I = (K+D-1)/D // var sStat Sqlite3_str at bp+24, 32 // Text of the constructed "stat" line var i int32 // Loop counter Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) Xsqlite3_str_appendf(tls, bp+24, ts+12685, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) } return U64((*StatAccum)(unsafe.Pointer(p)).FnRow) }())) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct Xsqlite3_str_appendf(tls, bp+24, ts+12690, libc.VaList(bp+8, iVal)) } Xsqlite3ResultStrAccum(tls, context, bp+24) } else if eCall == STAT_GET_ROWID { if (*StatAccum)(unsafe.Pointer(p)).FiGet < 0 { samplePushPrevious(tls, p, 0) (*StatAccum)(unsafe.Pointer(p)).FiGet = 0 } if (*StatAccum)(unsafe.Pointer(p)).FiGet < (*StatAccum)(unsafe.Pointer(p)).FnSample { var pS uintptr = (*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48 if (*StatSample)(unsafe.Pointer(pS)).FnRowid == U32(0) { Xsqlite3_result_int64(tls, context, *(*I64)(unsafe.Pointer(pS + 24))) } else { Xsqlite3_result_blob(tls, context, *(*uintptr)(unsafe.Pointer(pS + 24)), int32((*StatSample)(unsafe.Pointer(pS)).FnRowid), libc.UintptrFromInt32(-1)) } } } else { var aCnt uintptr = uintptr(0) // var sStat Sqlite3_str at bp+56, 32 var i int32 switch eCall { case STAT_GET_NEQ: aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanEq break fallthrough case STAT_GET_NLT: aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanLt break fallthrough default: { aCnt = (*StatSample)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fa + uintptr((*StatAccum)(unsafe.Pointer(p)).FiGet)*48)).FanDLt (*StatAccum)(unsafe.Pointer(p)).FiGet++ break } } Xsqlite3StrAccumInit(tls, bp+56, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { Xsqlite3_str_appendf(tls, bp+56, ts+12696, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+56)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+56 /* &sStat */)).FnChar-- } Xsqlite3ResultStrAccum(tls, context, bp+56) } _ = argc } var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse FzName: ts + 12702} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112043:22 */ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112055:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, uintptr(unsafe.Pointer(&statGetFuncdef)), 0) } // Generate code to do an analysis of all indices associated with // a single table. func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112096:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed var iTabCur int32 // Table cursor var v uintptr // The virtual machine being built up var i int32 // Loop counter var jZeroRows int32 = -1 // Jump from here if number of rows is zero var iDb int32 // Index of database containing pTab var needTableCnt U8 = U8(1) // True to count the table var regNewRowid int32 = libc.PostIncInt32(&iMem, 1) // Rowid for the inserted record var regStat int32 = libc.PostIncInt32(&iMem, 1) // Register to hold StatAccum object var regChng int32 = libc.PostIncInt32(&iMem, 1) // Index of changed index field var regRowid int32 = libc.PostIncInt32(&iMem, 1) // Rowid argument passed to stat_push() var regTemp int32 = libc.PostIncInt32(&iMem, 1) // Temporary use register var regTemp2 int32 = libc.PostIncInt32(&iMem, 1) // Second temporary use register var regTabname int32 = libc.PostIncInt32(&iMem, 1) // Register containing table name var regIdxname int32 = libc.PostIncInt32(&iMem, 1) // Register containing index name var regStat1 int32 = libc.PostIncInt32(&iMem, 1) // Value for the stat column of sqlite_stat1 var regPrev int32 = iMem // MUST BE LAST (see below) var pStat1 uintptr = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FnMem > iMem { return (*Parse)(unsafe.Pointer(pParse)).FnMem } return iMem }() v = Xsqlite3GetVdbe(tls, pParse) if v == uintptr(0) || pTab == uintptr(0) { return } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { // Do not gather statistics on views or virtual tables return } if Xsqlite3_strlike(tls, ts+12711, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) if Xsqlite3AuthCheck(tls, pParse, SQLITE_ANALYZE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0 { return } if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { pStat1 = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))+uint64(13)) if pStat1 == uintptr(0) { return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*104 libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+12585, uint64(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) } // Establish a read-lock on the table at the shared-cache level. // Open a read-only cursor on the table. Also allocate a cursor number // to use for scanning indexes (iIdxCur). No index cursor is opened at // this time though. Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab)).FzName) iTabCur = libc.PostIncInt32(&iTab, 1) iIdxCur = libc.PostIncInt32(&iTab, 1) (*Parse)(unsafe.Pointer(pParse)).FnTab = func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FnTab > iTab { return (*Parse)(unsafe.Pointer(pParse)).FnTab } return iTab }() Xsqlite3OpenTable(tls, pParse, iTabCur, iDb, pTab, OP_OpenRead) Xsqlite3VdbeLoadString(tls, v, regTabname, (*Table)(unsafe.Pointer(pTab)).FzName) for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { var nCol int32 // Number of columns in pIdx. "N" var addrRewind int32 // Address of "OP_Rewind iIdxCur" var addrNextRow int32 // Address of "next_row:" var zIdxName uintptr // Name of the index var nColTest int32 // Number of columns to test for changes if pOnlyIdx != 0 && pOnlyIdx != pIdx { continue } if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { needTableCnt = U8(0) } if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) zIdxName = (*Table)(unsafe.Pointer(pTab)).FzName nColTest = nCol - 1 } else { nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) zIdxName = (*Index)(unsafe.Pointer(pIdx)).FzName if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { nColTest = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) - 1 } else { nColTest = nCol - 1 } } // Populate the register containing the index name. Xsqlite3VdbeLoadString(tls, v, regIdxname, zIdxName) // Pseudo-code for loop that calls stat_push(): // // Rewind csr // if eof(csr) goto end_of_scan; // regChng = 0 // goto chng_addr_0; // // next_row: // regChng = 0 // if( idx(0) != regPrev(0) ) goto chng_addr_0 // regChng = 1 // if( idx(1) != regPrev(1) ) goto chng_addr_1 // ... // regChng = N // goto chng_addr_N // // chng_addr_0: // regPrev(0) = idx(0) // chng_addr_1: // regPrev(1) = idx(1) // ... // // endDistinctTest: // regRowid = idx(rowid) // stat_push(P, regChng, regRowid) // Next csr // if !eof(csr) goto next_row; // // end_of_scan: // Make sure there are enough memory cells allocated to accommodate // the regPrev array and a trailing rowid (the rowid slot is required // when building a record to insert into the sample column of // the sqlite_stat4 table. (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FnMem > regPrev+nColTest { return (*Parse)(unsafe.Pointer(pParse)).FnMem } return regPrev + nColTest }() // Open a read-only cursor on the index being analyzed. Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iIdxCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) // Invoke the stat_init() function. The arguments are: // // (1) the number of columns in the index including the rowid // (or for a WITHOUT ROWID table, the number of PK columns), // (2) the number of columns in the key without the rowid/pk // (3) estimated number of rows in the index, Xsqlite3VdbeAddOp2(tls, v, OP_Integer, nCol, regStat+1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), regRowid) if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { Xsqlite3VdbeAddOp2(tls, v, OP_Count, iIdxCur, regTemp) addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iIdxCur) } else { addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iIdxCur) Xsqlite3VdbeAddOp3(tls, v, OP_Count, iIdxCur, regTemp, 1) } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit, regTemp2) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat+1, regStat, 4, uintptr(unsafe.Pointer(&statInitFuncdef)), 0) // Implementation of the following: // // Rewind csr // if eof(csr) goto end_of_scan; // regChng = 0 // goto next_push_0; // Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regChng) addrNextRow = Xsqlite3VdbeCurrentAddr(tls, v) if nColTest > 0 { var endDistinctTest int32 = Xsqlite3VdbeMakeLabel(tls, pParse) var aGotoChng uintptr // Array of jump instruction addresses aGotoChng = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(int32(0)))*uint64(nColTest)) if aGotoChng == uintptr(0) { continue } // next_row: // regChng = 0 // if( idx(0) != regPrev(0) ) goto chng_addr_0 // regChng = 1 // if( idx(1) != regPrev(1) ) goto chng_addr_1 // ... // regChng = N // goto endDistinctTest Xsqlite3VdbeAddOp0(tls, v, OP_Goto) addrNextRow = Xsqlite3VdbeCurrentAddr(tls, v) if nColTest == 1 && int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) == 1 && int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None { // For a single-column UNIQUE index, once we have found a non-NULL // row, we know that all the rest will be distinct, so skip // subsequent distinctness tests. Xsqlite3VdbeAddOp2(tls, v, OP_NotNull, regPrev, endDistinctTest) } for i = 0; i < nColTest; i++ { var pColl uintptr = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8))) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, i, regChng) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, i, regTemp) *(*int32)(unsafe.Pointer(aGotoChng + uintptr(i)*4)) = Xsqlite3VdbeAddOp4(tls, v, OP_Ne, regTemp, 0, regPrev+i, pColl, -2) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ)) } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, nColTest, regChng) Xsqlite3VdbeGoto(tls, v, endDistinctTest) // chng_addr_0: // regPrev(0) = idx(0) // chng_addr_1: // regPrev(1) = idx(1) // ... Xsqlite3VdbeJumpHere(tls, v, addrNextRow-1) for i = 0; i < nColTest; i++ { Xsqlite3VdbeJumpHere(tls, v, *(*int32)(unsafe.Pointer(aGotoChng + uintptr(i)*4))) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, i, regPrev+i) } Xsqlite3VdbeResolveLabel(tls, v, endDistinctTest) Xsqlite3DbFree(tls, db, aGotoChng) } // chng_addr_N: // regRowid = idx(rowid) // STAT4 only // stat_push(P, regChng, regRowid) // 3rd parameter STAT4 only // Next csr // if !eof(csr) goto next_row; if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) { if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { Xsqlite3VdbeAddOp2(tls, v, OP_IdxRowid, iIdxCur, regRowid) } else { var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable) var j int32 var k int32 var regKey int32 regKey = Xsqlite3GetTempRange(tls, pParse, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) for j = 0; j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); j++ { k = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)))) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iIdxCur, k, regKey+j) } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regKey, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol), regRowid) Xsqlite3ReleaseTempRange(tls, pParse, regKey, int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) } } { Xsqlite3VdbeAddFunctionCall(tls, pParse, 1, regStat, regTemp, 2+IsStat4, uintptr(unsafe.Pointer(&statPushFuncdef)), 0) if (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit != 0 { var j1 int32 var j2 int32 var j3 int32 j1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, regTemp) j2 = Xsqlite3VdbeAddOp1(tls, v, OP_If, regTemp) j3 = Xsqlite3VdbeAddOp4Int(tls, v, OP_SeekGT, iIdxCur, 0, regPrev, 1) Xsqlite3VdbeJumpHere(tls, v, j1) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iIdxCur, addrNextRow) Xsqlite3VdbeJumpHere(tls, v, j2) Xsqlite3VdbeJumpHere(tls, v, j3) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Next, iIdxCur, addrNextRow) } } // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12721, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) // Add the entries to the stat4 table. if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_Stat4) == U32(0) && (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit == 0 { var regEq int32 = regStat1 var regLt int32 = regStat1 + 1 var regDLt int32 = regStat1 + 2 var regSample int32 = regStat1 + 3 var regCol int32 = regStat1 + 4 var regSampleRowid int32 = regCol + nCol var addrNext int32 var addrIsNull int32 var seekOp U8 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { seekOp = uint8(OP_NotExists) } else { seekOp = uint8(OP_NotFound) } (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FnMem > regCol+nCol { return (*Parse)(unsafe.Pointer(pParse)).FnMem } return regCol + nCol }() addrNext = Xsqlite3VdbeCurrentAddr(tls, v) callStatGet(tls, pParse, regStat, STAT_GET_ROWID, regSampleRowid) addrIsNull = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, regSampleRowid) callStatGet(tls, pParse, regStat, STAT_GET_NEQ, regEq) callStatGet(tls, pParse, regStat, STAT_GET_NLT, regLt) callStatGet(tls, pParse, regStat, STAT_GET_NDLT, regDLt) Xsqlite3VdbeAddOp4Int(tls, v, int32(seekOp), iTabCur, addrNext, regSampleRowid, 0) for i = 0; i < nCol; i++ { Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pIdx, iTabCur, i, regCol+i) } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regCol, nCol, regSample) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regTabname, 6, regTemp) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur+1, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur+1, regTemp, regNewRowid) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 1, addrNext) // P1==1 for end-of-loop Xsqlite3VdbeJumpHere(tls, v, addrIsNull) } // End of analysis Xsqlite3VdbeJumpHere(tls, v, addrRewind) } // Create a single sqlite_stat1 entry containing NULL as the index // name and the row count as the content. if pOnlyIdx == uintptr(0) && needTableCnt != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Count, iTabCur, regStat1) jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+12721, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) Xsqlite3VdbeJumpHere(tls, v, jZeroRows) } } // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112458:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) } } // Generate code that will do an analysis of an entire database func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112468:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema // Schema of database iDb var k uintptr var iStatCur int32 var iMem int32 var iTab int32 Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 openStatTable(tls, pParse, iDb, iStatCur, uintptr(0), uintptr(0)) iMem = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 iTab = (*Parse)(unsafe.Pointer(pParse)).FnTab for k = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata analyzeOneTable(tls, pParse, pTab, uintptr(0), iStatCur, iMem, iTab) } loadAnalysis(tls, pParse, iDb) } // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112495:13: */ var iDb int32 var iStatCur int32 iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 52)) += 3 if pOnlyIdx != 0 { openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+12725) } else { openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12729) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) } // Generate code for the ANALYZE command. The parser calls this routine // when it recognizes an ANALYZE command. // // ANALYZE -- 1 // ANALYZE <database> -- 2 // ANALYZE ?<database>.?<tablename> -- 3 // // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112526:21: */ bp := tls.Alloc(8) defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var iDb int32 var i int32 var z uintptr var zDb uintptr var pTab uintptr var pIdx uintptr // var pTableName uintptr at bp, 8 var v uintptr // Read the database schema. If an error occurs, leave an error message // and code in pParse and return NULL. if SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { return } if pName1 == uintptr(0) { // Form 1: Analyze everything for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { if i == 1 { continue } // Do not analyze the TEMP database analyzeDatabase(tls, pParse, i) } } else if (*Token)(unsafe.Pointer(pName2)).Fn == uint32(0) && libc.AssignInt32(&iDb, Xsqlite3FindDb(tls, db, pName1)) >= 0 { // Analyze the schema named as the argument analyzeDatabase(tls, pParse, iDb) } else { // Form 3: Analyze the table or index named as an argument iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) if iDb >= 0 { if (*Token)(unsafe.Pointer(pName2)).Fn != 0 { zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } else { zDb = uintptr(0) } z = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pTableName */))) if z != 0 { if libc.AssignUintptr(&pIdx, Xsqlite3FindIndex(tls, db, z, zDb)) != uintptr(0) { analyzeTable(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpTable, pIdx) } else if libc.AssignUintptr(&pTab, Xsqlite3LocateTable(tls, pParse, uint32(0), z, zDb)) != uintptr(0) { analyzeTable(tls, pParse, pTab, uintptr(0)) } Xsqlite3DbFree(tls, db, z) } } } if int32((*Sqlite3)(unsafe.Pointer(db)).FnSqlExec) == 0 && libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3VdbeAddOp0(tls, v, OP_Expire) } } // Used to pass information from the analyzer reader through to the // callback routine. type analysisInfo = struct { Fdb uintptr FzDatabase uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112578:9 */ // Used to pass information from the analyzer reader through to the // callback routine. type AnalysisInfo = analysisInfo /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112578:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112589:13: */ var z uintptr = zIntArray var c int32 var i int32 var v TRowcnt if z == uintptr(0) { z = ts + 1524 /* "" */ } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) for libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(z)))) >= '0' && c <= '9' { v = v*TRowcnt(10) + TRowcnt(c) - TRowcnt('0') z++ } if aOut != 0 { *(*TRowcnt)(unsafe.Pointer(aOut + uintptr(i)*4)) = v } if aLog != 0 { *(*LogEst)(unsafe.Pointer(aLog + uintptr(i)*2)) = Xsqlite3LogEst(tls, uint64(v)) } if int32(*(*int8)(unsafe.Pointer(z))) == ' ' { z++ } } if pIndex != 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { if Xsqlite3_strglob(tls, ts+12733, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 2, 0x4) } else if Xsqlite3_strglob(tls, ts+12744, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) } else if Xsqlite3_strglob(tls, ts+12754, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { z++ } for int32(*(*int8)(unsafe.Pointer(z))) == ' ' { z++ } } } } // This callback is invoked once for each index when reading the // sqlite_stat1 table. // // argv[0] = name of the table // argv[1] = name of the index (might be NULL) // argv[2] = results of analysis - on integer for each column // // Entries for which argv[1]==NULL simply record the number of rows in // the table. func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112662:12: */ bp := tls.Alloc(152) defer tls.Free(152) var pInfo uintptr = pData var pIndex uintptr var pTable uintptr var z uintptr _ = NotUsed _ = argc if argv == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv + 2*8)) == uintptr(0) { return 0 } pTable = Xsqlite3FindTable(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb, *(*uintptr)(unsafe.Pointer(argv)), (*AnalysisInfo)(unsafe.Pointer(pInfo)).FzDatabase) if pTable == uintptr(0) { return 0 } if *(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0) { pIndex = uintptr(0) } else if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8))) == 0 { pIndex = Xsqlite3PrimaryKeyIndex(tls, pTable) } else { pIndex = Xsqlite3FindIndex(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*AnalysisInfo)(unsafe.Pointer(pInfo)).FzDatabase) } z = *(*uintptr)(unsafe.Pointer(argv + 2*8)) if pIndex != 0 { var aiRowEst uintptr = uintptr(0) var nCol int32 = int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol) + 1 // Index.aiRowEst may already be set here if there are duplicate // sqlite_stat1 entries for this index. In that case just clobber // the old data with the new instead of allocating a new array. if (*Index)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) { (*Index)(unsafe.Pointer(pIndex)).FaiRowEst = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nCol)) if (*Index)(unsafe.Pointer(pIndex)).FaiRowEst == uintptr(0) { Xsqlite3OomFault(tls, (*AnalysisInfo)(unsafe.Pointer(pInfo)).Fdb) } } aiRowEst = (*Index)(unsafe.Pointer(pIndex)).FaiRowEst libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 2, 0x4) decodeIntArray(tls, z, nCol, aiRowEst, (*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst, pIndex) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 7, 0x80) if (*Index)(unsafe.Pointer(pIndex)).FpPartIdxWhere == uintptr(0) { (*Table)(unsafe.Pointer(pTable)).FnRowLogEst = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiRowLogEst)) *(*U32)(unsafe.Pointer(pTable + 48)) |= U32(TF_HasStat1) } } else { // var fakeIdx Index at bp, 152 (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow = (*Table)(unsafe.Pointer(pTable)).FszTabRow decodeIntArray(tls, z, 1, uintptr(0), pTable+58, bp) (*Table)(unsafe.Pointer(pTable)).FszTabRow = (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow *(*U32)(unsafe.Pointer(pTable + 48)) |= U32(TF_HasStat1) } return 0 } // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112725:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { var p uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(j)*40 Xsqlite3DbFree(tls, db, (*IndexSample)(unsafe.Pointer(p)).Fp) } Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(pIdx)).FaSample) } if db != 0 && (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { (*Index)(unsafe.Pointer(pIdx)).FnSample = 0 (*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0) } } // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112750:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*40 var iCol int32 var nCol int32 = 1 if (*Index)(unsafe.Pointer(pIdx)).FnSampleCol > 1 { // If this is stat4 data, then calculate aAvgEq[] values for all // sample columns except the last. The last is always set to 1, as // once the trailing PK fields are considered all index keys are // unique. nCol = (*Index)(unsafe.Pointer(pIdx)).FnSampleCol - 1 *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(nCol)*4)) = TRowcnt(1) } for iCol = 0; iCol < nCol; iCol++ { var nSample int32 = (*Index)(unsafe.Pointer(pIdx)).FnSample var i int32 // Used to iterate through samples var sumEq TRowcnt = TRowcnt(0) // Sum of the nEq values var avgEq TRowcnt = TRowcnt(0) var nRow TRowcnt // Number of rows in index var nSum100 I64 = int64(0) // Number of terms contributing to sumEq var nDist100 I64 // Number of distinct values in index if !(int32((*Index)(unsafe.Pointer(pIdx)).FaiRowEst) != 0) || iCol >= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) || *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4)) == TRowcnt(0) { nRow = *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanLt + uintptr(iCol)*4)) nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(pFinal)).FanDLt + uintptr(iCol)*4))) nSample-- } else { nRow = *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst)) nDist100 = int64(100) * I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst))) / I64(*(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiRowEst + uintptr(iCol+1)*4))) } (*Index)(unsafe.Pointer(pIdx)).FnRowEst0 = nRow // Set nSum to the number of distinct (iCol+1) field prefixes that // occur in the stat4 table for this index. Set sumEq to the sum of // the nEq values for column iCol for the same set (adding the value // only once where there exist duplicate prefixes). for i = 0; i < nSample; i++ { if i == (*Index)(unsafe.Pointer(pIdx)).FnSample-1 || *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanDLt + uintptr(iCol)*4)) != *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i+1)*40)).FanDLt + uintptr(iCol)*4)) { sumEq = sumEq + *(*TRowcnt)(unsafe.Pointer((*IndexSample)(unsafe.Pointer(aSample+uintptr(i)*40)).FanEq + uintptr(iCol)*4)) nSum100 = nSum100 + int64(100) } } if nDist100 > nSum100 && sumEq < nRow { avgEq = TRowcnt(int64(100) * I64(nRow-sumEq) / (nDist100 - nSum100)) } if avgEq == TRowcnt(0) { avgEq = TRowcnt(1) } *(*TRowcnt)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaAvgEq + uintptr(iCol)*4)) = avgEq } } } // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112809:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) if pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { pIdx = Xsqlite3PrimaryKeyIndex(tls, pTab) } } return pIdx } // Load the content from either the sqlite_stat4 // into the relevant Index.aSample[] arrays. // // Arguments zSql1 and zSql2 must point to SQL statements that return // data equivalent to the following: // // zSql1: SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112834:12: */ bp := tls.Alloc(24) defer tls.Free(24) var rc int32 // Result codes from subroutines *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) // An SQL statement being run var zSql uintptr // Text of the SQL statement var pPrevIdx uintptr = uintptr(0) // Previous index in the loop var pSample uintptr // A slot in pIdx->aSample[] zSql = Xsqlite3MPrintf(tls, db, zSql1, libc.VaList(bp, zDb)) if !(zSql != 0) { return SQLITE_NOMEM } rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc } for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { var nIdxCol int32 = 1 // Number of columns in stat4 records var zIndex uintptr // Index name var pIdx uintptr // Pointer to the index object var nSample int32 // Number of samples var nByte int32 // Bytes of space required var i int32 // Bytes of space required var pSpace uintptr zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) if zIndex == uintptr(0) { continue } nSample = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) pIdx = findIndexOrPrimaryKey(tls, db, zIndex, zDb) if pIdx == uintptr(0) { continue } if !((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) } else { nIdxCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) } (*Index)(unsafe.Pointer(pIdx)).FnSampleCol = nIdxCol nByte = int32(uint64(unsafe.Sizeof(IndexSample{})) * uint64(nSample)) nByte = int32(uint64(nByte) + uint64(unsafe.Sizeof(TRowcnt(0)))*uint64(nIdxCol)*uint64(3)*uint64(nSample)) nByte = int32(uint64(nByte) + uint64(nIdxCol)*uint64(unsafe.Sizeof(TRowcnt(0)))) // Space for Index.aAvgEq[] (*Index)(unsafe.Pointer(pIdx)).FaSample = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if (*Index)(unsafe.Pointer(pIdx)).FaSample == uintptr(0) { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) return SQLITE_NOMEM } pSpace = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(nSample)*40 (*Index)(unsafe.Pointer(pIdx)).FaAvgEq = pSpace pSpace += 4 * uintptr(nIdxCol) *(*U32)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable + 48)) |= U32(TF_HasStat4) for i = 0; i < nSample; i++ { (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanEq = pSpace pSpace += 4 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanLt = pSpace pSpace += 4 * uintptr(nIdxCol) (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(i)*40)).FanDLt = pSpace pSpace += 4 * uintptr(nIdxCol) } } rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc != 0 { return rc } zSql = Xsqlite3MPrintf(tls, db, zSql2, libc.VaList(bp+8, zDb)) if !(zSql != 0) { return SQLITE_NOMEM } rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc } for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { var zIndex uintptr // Index name var pIdx uintptr // Pointer to the index object var nCol int32 = 1 // Number of columns in index zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) if zIndex == uintptr(0) { continue } pIdx = findIndexOrPrimaryKey(tls, db, zIndex, zDb) if pIdx == uintptr(0) { continue } // This next condition is true if data has already been loaded from // the sqlite_stat4 table. nCol = (*Index)(unsafe.Pointer(pIdx)).FnSampleCol if pIdx != pPrevIdx { initAvgEq(tls, pPrevIdx) pPrevIdx = pIdx } pSample = (*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample)*40 decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanEq, uintptr(0), uintptr(0)) decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 2), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanLt, uintptr(0), uintptr(0)) decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 3), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanDLt, uintptr(0), uintptr(0)) // Take a copy of the sample. Add two 0x00 bytes the end of the buffer. // This is in case the sample record is corrupted. In that case, the // sqlite3VdbeRecordCompare() may read up to two varints past the // end of the allocated buffer before it realizes it is dealing with // a corrupt record. Adding the two 0x00 bytes prevents this from causing // a buffer overread. (*IndexSample)(unsafe.Pointer(pSample)).Fn = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4) (*IndexSample)(unsafe.Pointer(pSample)).Fp = Xsqlite3DbMallocZero(tls, db, uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn+2)) if (*IndexSample)(unsafe.Pointer(pSample)).Fp == uintptr(0) { Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) return SQLITE_NOMEM } if (*IndexSample)(unsafe.Pointer(pSample)).Fn != 0 { libc.Xmemcpy(tls, (*IndexSample)(unsafe.Pointer(pSample)).Fp, Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4), uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn)) } (*Index)(unsafe.Pointer(pIdx)).FnSample++ } rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc == SQLITE_OK { initAvgEq(tls, pPrevIdx) } return rc } // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112955:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+12611, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, ts+12766, ts+12820, zDb) } return rc } // Load the content of the sqlite_stat1 and sqlite_stat4 tables. The // contents of sqlite_stat1 are used to populate the Index.aiRowEst[] // arrays. The contents of sqlite_stat4 are used to populate the // Index.aSample[] arrays. // // If the sqlite_stat1 table is not present in the database, SQLITE_ERROR // is returned. In this case, even if SQLITE_ENABLE_STAT4 was defined // during compilation and the sqlite_stat4 table is present, no data is // read from it. // // If SQLITE_ENABLE_STAT4 was defined during compilation and the // sqlite_stat4 table is not present in the database, SQLITE_ERROR is // returned. However, in this case, data is read from the sqlite_stat1 // table (if it is present) before returning. // // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:112993:20: */ bp := tls.Alloc(24) defer tls.Free(24) // var sInfo AnalysisInfo at bp+8, 16 var i uintptr var zSql uintptr var rc int32 = SQLITE_OK var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema var pStat1 uintptr // Clear any prior statistics for i = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_HasStat1)) } for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(0), 7, 0x80) Xsqlite3DeleteIndexSamples(tls, db, pIdx) (*Index)(unsafe.Pointer(pIdx)).FaSample = uintptr(0) } // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+12585, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, ts+12872, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{analysisLoader})), bp+8 /* &sInfo */, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) } } // Set appropriate defaults on all indexes not in the sqlite_stat1 table for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x80>>7) != 0) { Xsqlite3DefaultRowEst(tls, pIdx) } } // Load the statistics from the sqlite_stat4 table. if rc == SQLITE_OK { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) rc = loadStat4(tls, db, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { return uint16(0) } return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue }() } for i = (*Hash)(unsafe.Pointer(pSchema + 32)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pIdx uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata Xsqlite3_free(tls, (*Index)(unsafe.Pointer(pIdx)).FaiRowEst) (*Index)(unsafe.Pointer(pIdx)).FaiRowEst = uintptr(0) } if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } return rc } //************* End of analyze.c ******************************************** //************* Begin file attach.c ***************************************** // 2003 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 contains code used to implement the ATTACH and DETACH commands. // #include "sqliteInt.h" // Resolve an expression that was part of an ATTACH or DETACH statement. This // is slightly different from resolving a normal SQL expression, because simple // identifiers are treated as strings, not possible column names or aliases. // // i.e. if the parser sees: // // ATTACH DATABASE abc AS def // // it treats the two expressions as literal strings 'abc' and 'def' instead of // looking for columns of the same name. // // This only applies to the root node of pExpr, so the statement: // // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113101:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { rc = Xsqlite3ResolveExprNames(tls, pName, pExpr) } else { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) } } return rc } // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113118:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zName) == 0 || iDb == 0 && Xsqlite3StrICmp(tls, ts+7684, zName) == 0) } // An SQL user-function registered to do the work of an ATTACH statement. The // three arguments to the function come directly from an attach statement: // // ATTACH DATABASE x AS y KEY z // // SELECT sqlite_attach(x, y, z) // // If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the // third argument. // // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113140:13: */ bp := tls.Alloc(64) defer tls.Free(64) var i int32 var rc int32 var db uintptr var zName uintptr var zFile uintptr // var zPath uintptr at bp+40, 8 // var zErr uintptr at bp+48, 8 // var flags uint32 at bp+24, 4 var aNew uintptr // New array of Db pointers var pNew uintptr // Db object for the newly attached database // var zErrDyn uintptr at bp+56, 8 // var pVfs uintptr at bp+32, 8 var pPager uintptr var iDb int32 rc = 0 db = Xsqlite3_context_db_handle(tls, context) *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = uintptr(0) _ = NotUsed zFile = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if !(zFile == uintptr(0)) { goto __1 } zFile = ts + 1524 /* "" */ __1: ; if !(zName == uintptr(0)) { goto __2 } zName = ts + 1524 /* "" */ __2: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2)) != 0) { goto __3 } // This is not a real ATTACH. Instead, this routine is being called // from sqlite3_deserialize() to close database db->init.iDb and // reopen it as a MemDB *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+5138) if !(*(*uintptr)(unsafe.Pointer(bp + 32)) == uintptr(0)) { goto __5 } return __5: ; pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32 if !((*Db)(unsafe.Pointer(pNew)).FpBt != 0) { goto __6 } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+12913, db, pNew+8, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH // // Check for the following errors: // // * Too many attached databases, // * Transaction currently open // * Specified database name already being used. if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 136 + 7*4))+2) { goto __7 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12916, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 136 + 7*4)))) goto attach_error __7: ; i = 0 __8: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __10 } if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12953, libc.VaList(bp+8, zName)) goto attach_error __11: ; goto __9 __9: i++ goto __8 goto __10 __10: ; // Allocate the new entry in the db->aDb[] array and initialize the schema // hash tables. if !((*Sqlite3)(unsafe.Pointer(db)).FaDb == db+688) { goto __12 } aNew = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Db{}))*uint64(3)) if !(aNew == uintptr(0)) { goto __14 } return __14: ; libc.Xmemcpy(tls, aNew, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(unsafe.Sizeof(Db{}))*uint64(2)) goto __13 __12: aNew = Xsqlite3DbRealloc(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(unsafe.Sizeof(Db{}))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnDb+1)) if !(aNew == uintptr(0)) { goto __15 } return __15: ; __13: ; (*Sqlite3)(unsafe.Pointer(db)).FaDb = aNew pNew = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Sqlite3)(unsafe.Pointer(db)).FnDb)*32 libc.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(Db{}))) // Open the database file. If the btree is successfully opened, use // it to obtain the database schema. At this point the schema may // or may not be initialized. *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24, bp+32, bp+40, bp+48) if !(rc != SQLITE_OK) { goto __16 } if !(rc == SQLITE_NOMEM) { goto __17 } Xsqlite3OomFault(tls, db) __17: ; Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)), -1) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) return __16: ; *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) |= uint32(SQLITE_OPEN_MAIN_DB) rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)), db, pNew+8, 0, int32(*(*uint32)(unsafe.Pointer(bp + 24 /* flags */)))) (*Sqlite3)(unsafe.Pointer(db)).FnDb++ (*Db)(unsafe.Pointer(pNew)).FzDbSName = Xsqlite3DbStrDup(tls, db, zName) __4: ; (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(0) if !(rc == SQLITE_CONSTRAINT) { goto __18 } rc = SQLITE_ERROR *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+12983, 0) goto __19 __18: if !(rc == SQLITE_OK) { goto __20 } (*Db)(unsafe.Pointer(pNew)).FpSchema = Xsqlite3SchemaGet(tls, db, (*Db)(unsafe.Pointer(pNew)).FpBt) if !!(int32((*Db)(unsafe.Pointer(pNew)).FpSchema) != 0) { goto __21 } rc = SQLITE_NOMEM goto __22 __21: if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0 && int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { goto __23 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+13012, 0) rc = SQLITE_ERROR __23: ; __22: ; Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) Xsqlite3PagerLockingMode(tls, pPager, int32((*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode)) Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer(pNew)).FpBt, Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt, -1)) Xsqlite3BtreeSetPagerFlags(tls, (*Db)(unsafe.Pointer(pNew)).FpBt, uint32(uint64(PAGER_SYNCHRONOUS_FULL)|(*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK))) Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pNew)).FpBt) __20: ; __19: ; (*Db)(unsafe.Pointer(pNew)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) if !(rc == SQLITE_OK && (*Db)(unsafe.Pointer(pNew)).FzDbSName == uintptr(0)) { goto __24 } rc = SQLITE_NOMEM __24: ; Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */))) // If the file was opened successfully, read the schema for the new database. // If this fails, or if opening the file failed, then close the file and // remove the entry from the db->aDb[] array. i.e. put everything back the // way we found it. if !(rc == SQLITE_OK) { goto __25 } Xsqlite3BtreeEnterAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { goto __26 } rc = Xsqlite3Init(tls, db, bp+56) __26: ; Xsqlite3BtreeLeaveAll(tls, db) __25: ; if !(rc != 0) { goto __27 } if !!(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x4>>2) != 0) { goto __28 } iDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt != 0) { goto __29 } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt = uintptr(0) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema = uintptr(0) __29: ; Xsqlite3ResetAllSchemasOfConnection(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FnDb = iDb if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { goto __30 } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+1460, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __32 } *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+13080, libc.VaList(bp+16, zFile)) __32: ; __31: ; __28: ; goto attach_error __27: ; return attach_error: // Return an error if we get here if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { goto __33 } Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)), -1) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) __33: ; if !(rc != 0) { goto __34 } Xsqlite3_result_error_code(tls, context, rc) __34: } // An SQL user-function registered to do the work of an DETACH statement. The // three arguments to the function come directly from a detach statement: // // DETACH DATABASE x // // SELECT sqlite_detach(x) func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113333:13: */ bp := tls.Alloc(152) defer tls.Free(152) var zName uintptr var db uintptr var i int32 var pDb uintptr var pEntry uintptr // var zErr [128]int8 at bp+24, 128 var pTrig uintptr zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) db = Xsqlite3_context_db_handle(tls, context) pDb = uintptr(0) _ = NotUsed if !(zName == uintptr(0)) { goto __1 } zName = ts + 1524 /* "" */ __1: ; i = 0 __2: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __4 } pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 if !((*Db)(unsafe.Pointer(pDb)).FpBt == uintptr(0)) { goto __5 } goto __3 __5: ; if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __6 } goto __4 __6: ; goto __3 __3: i++ goto __2 goto __4 __4: ; if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13108, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13129, libc.VaList(bp+8, zName)) goto detach_error __8: ; if !(Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != SQLITE_TXN_NONE || Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+13155, libc.VaList(bp+16, zName)) goto detach_error __9: ; // If any TEMP triggers reference the schema being detached, move those // triggers to reference the TEMP schema itself. pEntry = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56)).Ffirst __10: if !(pEntry != 0) { goto __11 } pTrig = (*HashElem)(unsafe.Pointer(pEntry)).Fdata if !((*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema == (*Db)(unsafe.Pointer(pDb)).FpSchema) { goto __12 } (*Trigger)(unsafe.Pointer(pTrig)).FpTabSchema = (*Trigger)(unsafe.Pointer(pTrig)).FpSchema __12: ; pEntry = (*HashElem)(unsafe.Pointer(pEntry)).Fnext goto __10 __11: ; Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) (*Db)(unsafe.Pointer(pDb)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pDb)).FpSchema = uintptr(0) Xsqlite3CollapseDatabaseArray(tls, db) return detach_error: Xsqlite3_result_error(tls, context, bp+24, -1) } // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113395:13: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 // var sName NameContext at bp, 56 var v uintptr var db uintptr var regArgs int32 var zAuthArg uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __1 } goto attach_end __1: ; libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sName */)).FpParse = pParse if !(SQLITE_OK != resolveAttachExpr(tls, bp, pFilename) || SQLITE_OK != resolveAttachExpr(tls, bp, pDbname) || SQLITE_OK != resolveAttachExpr(tls, bp, pKey)) { goto __2 } goto attach_end __2: ; if !(pAuthArg != 0) { goto __3 } if !(int32((*Expr)(unsafe.Pointer(pAuthArg)).Fop) == TK_STRING) { goto __4 } zAuthArg = *(*uintptr)(unsafe.Pointer(pAuthArg + 8)) goto __5 __4: zAuthArg = uintptr(0) __5: ; rc = Xsqlite3AuthCheck(tls, pParse, type1, zAuthArg, uintptr(0), uintptr(0)) if !(rc != SQLITE_OK) { goto __6 } goto attach_end __6: ; __3: ; v = Xsqlite3GetVdbe(tls, pParse) regArgs = Xsqlite3GetTempRange(tls, pParse, 4) Xsqlite3ExprCode(tls, pParse, pFilename, regArgs) Xsqlite3ExprCode(tls, pParse, pDbname, regArgs+1) Xsqlite3ExprCode(tls, pParse, pKey, regArgs+2) if !(v != 0) { goto __7 } Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regArgs+3-int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), regArgs+3, int32((*FuncDef)(unsafe.Pointer(pFunc)).FnArg), pFunc, 0) // Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this // statement only). For DETACH, set it to false (expire all existing // statements). Xsqlite3VdbeAddOp1(tls, v, OP_Expire, libc.Bool32(type1 == SQLITE_ATTACH)) __7: ; attach_end: Xsqlite3ExprDelete(tls, db, pFilename) Xsqlite3ExprDelete(tls, db, pDbname) Xsqlite3ExprDelete(tls, db, pKey) } // Called by the parser to compile a DETACH statement. // // DETACH pDbname func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113467:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } var detach_func = FuncDef{ FnArg: int8(1), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse FzName: ts + 13177} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113468:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113487:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } var attach_func = FuncDef{ FnArg: int8(3), // nArg FfuncFlags: U32(SQLITE_UTF8), // pNext FxSFunc: 0, // xValue, xInverse FzName: ts + 13191} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113488:24 */ // Expression callback used by sqlite3FixAAAA() routines. func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113506:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) if !(int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) != 0) { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_FromDDL) } if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_VARIABLE { if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13205, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } return WRC_Continue } // Select callback used by sqlite3FixAAAA() routines. func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113523:12: */ bp := tls.Alloc(24) defer tls.Free(24) var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40)) var i int32 var pItem uintptr var db uintptr = (*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb var iDb int32 = Xsqlite3FindDbName(tls, db, (*DbFixer)(unsafe.Pointer(pFix)).FzDb) var pList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if pList == uintptr(0) { return WRC_Continue } i = 0 pItem = pList + 8 /* &.a */ __1: if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { goto __3 } { if int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) == 0 { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+13229, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0) libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 8, 0x100) } (*SrcItem)(unsafe.Pointer(pItem)).FpSchema = (*DbFixer)(unsafe.Pointer(pFix)).FpSchema libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 6, 0x40) } if Xsqlite3WalkExpr(tls, pFix+8, (*SrcItem)(unsafe.Pointer(pList+8+uintptr(i)*112)).FpOn) != 0 { return WRC_Abort } } goto __2 __2: i++ pItem += 112 goto __1 goto __3 __3: ; if (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { for i = 0; i < (*With)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpWith)).FnCte; i++ { if Xsqlite3WalkSelect(tls, p, (*Cte)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpWith+16+uintptr(i)*48)).FpSelect) != 0 { return WRC_Abort } } } return WRC_Continue } // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113566:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse (*DbFixer)(unsafe.Pointer(pFix)).FzDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName (*DbFixer)(unsafe.Pointer(pFix)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema (*DbFixer)(unsafe.Pointer(pFix)).FzType = zType (*DbFixer)(unsafe.Pointer(pFix)).FpName = pName (*DbFixer)(unsafe.Pointer(pFix)).FbTemp = U8(libc.Bool32(iDb == 1)) (*DbFixer)(unsafe.Pointer(pFix)).Fw.FpParse = pParse (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{fixExprCb})) (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{fixSelectCb})) (*DbFixer)(unsafe.Pointer(pFix)).Fw.FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3WalkWinDefnDummyCallback})) (*DbFixer)(unsafe.Pointer(pFix)).Fw.FwalkerDepth = 0 (*DbFixer)(unsafe.Pointer(pFix)).Fw.FeCode = U16(0) *(*uintptr)(unsafe.Pointer(pFix + 8 + 40)) = pFix } // The following set of routines walk through the parse tree and assign // a specific database to all table references where the database name // was left unspecified in the original SQL statement. The pFix structure // must have been initialized by a prior call to sqlite3FixInit(). // // These routines are used to make sure that an index, trigger, or // view in one database does not refer to objects in a different database. // (Exception: indices, triggers, and views in the TEMP database are // allowed to refer to anything.) If a reference is explicitly made // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113604:20: */ bp := tls.Alloc(128) defer tls.Free(128) var res int32 = 0 if pList != 0 { // var s Select at bp, 128 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Select{}))) (*Select)(unsafe.Pointer(bp /* &s */)).FpSrc = pList res = Xsqlite3WalkSelect(tls, pFix+8, bp) } return res } func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113618:20: */ return Xsqlite3WalkSelect(tls, pFix+8, pSelect) } func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113624:20: */ return Xsqlite3WalkExpr(tls, pFix+8, pExpr) } func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113633:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || Xsqlite3WalkExprList(tls, pFix+8, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) != 0 || Xsqlite3FixSrcList(tls, pFix, (*TriggerStep)(unsafe.Pointer(pStep)).FpFrom) != 0 { return 1 } { var pUp uintptr for pUp = (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert; pUp != 0; pUp = (*Upsert)(unsafe.Pointer(pUp)).FpNextUpsert { if Xsqlite3WalkExprList(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTarget) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertTargetWhere) != 0 || Xsqlite3WalkExprList(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertSet) != 0 || Xsqlite3WalkExpr(tls, pFix+8, (*Upsert)(unsafe.Pointer(pUp)).FpUpsertWhere) != 0 { return 1 } } } pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext } return 0 } //************* End of attach.c ********************************************* //************* Begin file auth.c ******************************************* // 2003 January 11 // // 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 code used to implement the sqlite3_set_authorizer() // API. This facility is an optional feature of the library. Embedded // systems that do not need this facility may omit it by recompiling // the library with -DSQLITE_OMIT_AUTHORIZATION=1 // #include "sqliteInt.h" // All of the code in this file may be omitted by defining a single // macro. // Set or clear the access authorization function. // // The access authorization function is be called during the compilation // phase to verify that the user has read and/or write access permission on // various fields of the database. The first argument to the auth function // is a copy of the 3rd argument to this routine. The second argument // to the auth function is one of these constants: // // SQLITE_CREATE_INDEX // SQLITE_CREATE_TABLE // SQLITE_CREATE_TEMP_INDEX // SQLITE_CREATE_TEMP_TABLE // SQLITE_CREATE_TEMP_TRIGGER // SQLITE_CREATE_TEMP_VIEW // SQLITE_CREATE_TRIGGER // SQLITE_CREATE_VIEW // SQLITE_DELETE // SQLITE_DROP_INDEX // SQLITE_DROP_TABLE // SQLITE_DROP_TEMP_INDEX // SQLITE_DROP_TEMP_TABLE // SQLITE_DROP_TEMP_TRIGGER // SQLITE_DROP_TEMP_VIEW // SQLITE_DROP_TRIGGER // SQLITE_DROP_VIEW // SQLITE_INSERT // SQLITE_PRAGMA // SQLITE_READ // SQLITE_SELECT // SQLITE_TRANSACTION // SQLITE_UPDATE // // The third and fourth arguments to the auth function are the name of // the table and the column that are being accessed. The auth function // should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE. If // SQLITE_OK is returned, it means that access is allowed. SQLITE_DENY // means that the SQL statement will never-run - the sqlite3_exec() call // will return with an error. SQLITE_IGNORE means that the SQL statement // should run but attempts to read the specified column will return NULL // and attempts to write the column will be ignored. // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113737:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg if (*Sqlite3)(unsafe.Pointer(db)).FxAuth != 0 { Xsqlite3ExpirePreparedStatements(tls, db, 1) } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_OK } // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113757:13: */ Xsqlite3ErrorMsg(tls, pParse, ts+13275, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } // Invoke the authorization callback for permission to read column zCol from // table zTab in database zDb. This function assumes that an authorization // callback has been registered (i.e. that sqlite3.xAuth is not NULL). // // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113771:20: */ bp := tls.Alloc(40) defer tls.Free(40) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Schema name of attached database var rc int32 // Auth callback return code if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return SQLITE_OK } rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { var z uintptr = Xsqlite3_mprintf(tls, ts+13298, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { z = Xsqlite3_mprintf(tls, ts+13304, libc.VaList(bp+16, zDb, z)) } Xsqlite3ErrorMsg(tls, pParse, ts+13310, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) } return rc } // The pExpr should be a TK_COLUMN expression. The table referred to // is in pTabList or else it is the NEW or OLD table of a trigger. // Check to see if it is OK to read this particular column. // // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113807:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read var iDb int32 // The index of the database the expression refers to var iCol int32 // Index of column in table iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pSchema) if iDb < 0 { // An attempt to read a column out of a subquery or other // temporary table. return } if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER { pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab } else { for iSrc = 0; iSrc < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc; iSrc++ { if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SrcItem)(unsafe.Pointer(pTabList+8+uintptr(iSrc)*112)).FiCursor { pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(iSrc)*112)).FpTab break } } } iCol = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) if pTab == uintptr(0) { return } if iCol >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName } else { zCol = ts + 8952 /* "ROWID" */ } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } } // Do an authorization check using the code and arguments given. Return // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113864:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 // Don't do any authorization checks if the database is initialising // or if the parser is being invoked from within sqlite3_declare_vtab. if (*Sqlite3)(unsafe.Pointer(db)).FxAuth == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { return SQLITE_OK } // EVIDENCE-OF: R-43249-19882 The third through sixth parameters to the // callback are either NULL pointers or zero-terminated strings that // contain additional details about the action to be authorized. // // The following testcase() macros show that any of the 3rd through 6th // parameters can be either NULL or a string. rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { Xsqlite3ErrorMsg(tls, pParse, ts+13337, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY sqliteAuthBadReturnCode(tls, pParse) } return rc } // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113913:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zContext } // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113928:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) } } // Record the fact that we want to lock a table at run-time. // // The table to be locked has root page iTab and is found in database iDb. // A read or a write lock can be taken depending on isWritelock. // // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:113987:29: */ var pToplevel uintptr var i int32 var nBytes int32 var p uintptr pToplevel = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() for i = 0; i < (*Parse)(unsafe.Pointer(pToplevel)).FnTableLock; i++ { p = (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(i)*24 if (*TableLock)(unsafe.Pointer(p)).FiDb == iDb && (*TableLock)(unsafe.Pointer(p)).FiTab == iTab { (*TableLock)(unsafe.Pointer(p)).FisWriteLock = U8(libc.Bool32((*TableLock)(unsafe.Pointer(p)).FisWriteLock != 0 || isWriteLock != 0)) return } } nBytes = int32(uint64(unsafe.Sizeof(TableLock{})) * uint64((*Parse)(unsafe.Pointer(pToplevel)).FnTableLock+1)) (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(pToplevel)).Fdb, (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock, uint64(nBytes)) if (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock != 0 { p = (*Parse)(unsafe.Pointer(pToplevel)).FaTableLock + uintptr(libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pToplevel)).FnTableLock, 1))*24 (*TableLock)(unsafe.Pointer(p)).FiDb = iDb (*TableLock)(unsafe.Pointer(p)).FiTab = iTab (*TableLock)(unsafe.Pointer(p)).FisWriteLock = isWriteLock (*TableLock)(unsafe.Pointer(p)).FzLockName = zName } else { (*Parse)(unsafe.Pointer(pToplevel)).FnTableLock = 0 Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pToplevel)).Fdb) } } func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114023:21: */ if iDb == 1 { return } if !(Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FpBt) != 0) { return } lockTable(tls, pParse, iDb, iTab, isWriteLock, zName) } // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114039:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe for i = 0; i < (*Parse)(unsafe.Pointer(pParse)).FnTableLock; i++ { var p uintptr = (*Parse)(unsafe.Pointer(pParse)).FaTableLock + uintptr(i)*24 var p1 int32 = (*TableLock)(unsafe.Pointer(p)).FiDb Xsqlite3VdbeAddOp4(tls, pVdbe, OP_TableLock, p1, int32((*TableLock)(unsafe.Pointer(p)).FiTab), int32((*TableLock)(unsafe.Pointer(p)).FisWriteLock), (*TableLock)(unsafe.Pointer(p)).FzLockName, -1) } } // Return TRUE if the given yDbMask object is empty - if it contains no // 1 bits. This routine is used by the DbMaskAllZero() and DbMaskNotZero() // macros when SQLITE_MAX_ATTACHED is greater than 30. // This routine is called after a single SQL statement has been // parsed and a VDBE program to execute that statement has been // prepared. This routine puts the finishing touches on the // VDBE program and resets the pParse structure for the next // parse. // // Note that if an error occurred, it might be the case that // no VDBE code was generated. func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114078:21: */ var db uintptr var v uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).Fnested != 0 { return } if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM } return } // Begin by generating some termination code at the end of the // vdbe program v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v == uintptr(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_DONE return } v = Xsqlite3GetVdbe(tls, pParse) if v == uintptr(0) { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } } if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) var addrRewind int32 var i int32 var reg int32 if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol == 0 { } else { Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) addrRewind = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur) reg = (*Returning)(unsafe.Pointer(pReturning)).FiRetReg for i = 0; i < (*Returning)(unsafe.Pointer(pReturning)).FnRetCol; i++ { Xsqlite3VdbeAddOp3(tls, v, OP_Column, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, i, reg+i) } Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, reg, i) Xsqlite3VdbeAddOp2(tls, v, OP_Next, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, addrRewind+1) Xsqlite3VdbeJumpHere(tls, v, addrRewind) } } Xsqlite3VdbeAddOp0(tls, v, OP_Halt) // The cookie mask contains one bit for each database file open. // (Bit 0 is for main, bit 1 is for temp, and so forth.) Bits are // set for each database that is used. Generate code to start a // transaction on each used database and to verify the schema cookie // on each used database. if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && ((*Parse)(unsafe.Pointer(pParse)).FcookieMask != YDbMask(0) || (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0) { var iDb int32 var i int32 Xsqlite3VdbeJumpHere(tls, v, 0) for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { var pSchema uintptr if libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FcookieMask&(YDbMask(YDbMask(1))<<iDb) != YDbMask(0)) == 0 { continue } Xsqlite3VdbeUsesBtree(tls, v, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema Xsqlite3VdbeAddOp4Int(tls, v, OP_Transaction, // Opcode iDb, // P1 libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FwriteMask&(YDbMask(YDbMask(1))<<iDb) != YDbMask(0)), (*Schema)(unsafe.Pointer(pSchema)).Fschema_cookie, // P3 (*Schema)(unsafe.Pointer(pSchema)).FiGeneration) if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) } } for i = 0; i < (*Parse)(unsafe.Pointer(pParse)).FnVtabLock; i++ { var vtab uintptr = Xsqlite3GetVTable(tls, db, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).FapVtabLock + uintptr(i)*8))) Xsqlite3VdbeAddOp4(tls, v, OP_VBegin, 0, 0, 0, vtab, -12) } (*Parse)(unsafe.Pointer(pParse)).FnVtabLock = 0 // Once all the cookies have been verified and transactions opened, // obtain the required table-locks. This is a no-op unless the // shared-cache feature is enabled. codeTableLocks(tls, pParse) // Initialize any AUTOINCREMENT data structures required. Xsqlite3AutoincrementBegin(tls, pParse) // Code constant expressions that where factored out of inner loops. // // The pConstExpr list might also contain expressions that we simply // want to keep around until the Parse object is deleted. Such // expressions have iConstExprReg==0. Do not generate code for // those expressions, of course. if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { var pEL uintptr = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) for i = 0; i < (*ExprList)(unsafe.Pointer(pEL)).FnExpr; i++ { var iReg int32 = *(*int32)(unsafe.Pointer(pEL + 8 + uintptr(i)*32 + 24)) if iReg > 0 { Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEL+8+uintptr(i)*32)).FpExpr, iReg) } } } if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 192)) if (*Returning)(unsafe.Pointer(pRet)).FnRetCol == 0 { } else { Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*Returning)(unsafe.Pointer(pRet)).FiRetCur, (*Returning)(unsafe.Pointer(pRet)).FnRetCol) } } // Finally, jump back to the beginning of the executable code. Xsqlite3VdbeGoto(tls, v, 1) } } // Get the VDBE program ready for execution if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { // A minimum of one cursor is required if autoincrement is used // See ticket [a696379c1f08866] Xsqlite3VdbeMakeReady(tls, v, pParse) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_DONE } else { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } } // Run the parser and code generator recursively in order to generate // code for the SQL statement given onto the end of the pParse context // currently under construction. Notes: // // * The final OP_Halt is not appended and other initialization // and finalization steps are omitted because those are handling by the // outermost parser. // // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114249:21: */ bp := tls.Alloc(136) defer tls.Free(136) var ap Va_list _ = ap var zSql uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedDbFlags U32 = (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags // var saveBuf [136]int8 at bp, 136 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } // Nesting should only be of limited depth ap = va zSql = Xsqlite3VMPrintf(tls, db, zFormat, ap) _ = ap if zSql == uintptr(0) { // This can result either from an OOM or because the formatted string // exceeds SQLITE_LIMIT_LENGTH. In the latter case, we need to set // an error if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_TOOBIG } (*Parse)(unsafe.Pointer(pParse)).FnErr++ return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ libc.Xmemcpy(tls, bp, pParse+uintptr(uint64(uintptr(0)+272)), uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_PreferBuiltin) Xsqlite3RunParser(tls, pParse, zSql) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg) (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags Xsqlite3DbFree(tls, db, zSql) libc.Xmemcpy(tls, pParse+uintptr(uint64(uintptr(0)+272)), bp, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } // Locate the in-memory structure that describes a particular database // table given the name of that table and (optionally) the name of the // database containing the table. Return NULL if not found. // // If zDatabase is 0, all databases are searched for the table and the // first matching table is returned. (No checking for duplicate table // names is done.) The search order is TEMP first, then MAIN, then any // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114304:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. if zDatabase != 0 { for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { if Xsqlite3StrICmp(tls, zDatabase, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FzDbSName) == 0 { break } } if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { // No match against the official names. But always match "main" // to schema 0 as a legacy fallback. if Xsqlite3StrICmp(tls, zDatabase, ts+7684) == 0 { i = 0 } else { return uintptr(0) } } p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { if i == 1 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13352+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 || Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7196+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, ts+13385) } } else { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, ts+7196) } } } } else { // Match against TEMP first p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, zName) if p != 0 { return p } // The main database is second p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, zName) if p != 0 { return p } // Attached databases are in order of attachment for i = 2; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema+8, zName) if p != 0 { break } } if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13371+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+7196) } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13352+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema+8, ts+13385) } } } return p } // Locate the in-memory structure that describes a particular database // table given the name of that table and (optionally) the name of the // database containing the table. Return NULL if not found. Also leave an // error message in pParse->zErrMsg. // // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114382:22: */ bp := tls.Alloc(40) defer tls.Free(40) var p uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Read the database schema. If an error occurs, leave an error message // and code in pParse and return NULL. if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaKnownOk) == U32(0) && SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { return uintptr(0) } p = Xsqlite3FindTable(tls, db, zName, zDbase) if p == uintptr(0) { // If zName is the not the name of a table in the schema created using // CREATE, then check to see if it is the name of an virtual table that // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+568, zName) if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+13404, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { return (*Module)(unsafe.Pointer(pMod)).FpEpoTab } } if flags&U32(LOCATE_NOERR) != 0 { return uintptr(0) } (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) } else if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_VTAB && (*Parse)(unsafe.Pointer(pParse)).FdisableVtab != 0 { p = uintptr(0) } if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { zMsg = ts + 13412 /* "no such view" */ } else { zMsg = ts + 13425 /* "no such table" */ } if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+7879, libc.VaList(bp, zMsg, zDbase, zName)) } else { Xsqlite3ErrorMsg(tls, pParse, ts+7889, libc.VaList(bp+24, zMsg, zName)) } } else { } return p } // Locate the table identified by *p. // // This is a wrapper around sqlite3LocateTable(). The difference between // sqlite3LocateTable() and this function is that this function restricts // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114445:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(p)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName } else { zDb = (*SrcItem)(unsafe.Pointer(p)).FzDatabase } return Xsqlite3LocateTable(tls, pParse, flags, (*SrcItem)(unsafe.Pointer(p)).FzName, zDb) } // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114465:27: */ if Xsqlite3_strnicmp(tls, zName, ts+9371, 7) == 0 { if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+7196+7) == 0 { return ts + 13371 /* "sqlite_schema" */ } if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+13385+7) == 0 { return ts + 13352 /* "sqlite_temp_sche..." */ } } return zName } // Locate the in-memory structure that describes // a particular index given the name of that index // and the name of the database that contains the index. // Return NULL if not found. // // If zDatabase is 0, all databases are searched for the // table and the first matching index is returned. (No checking // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114489:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. for i = OMIT_TEMPDB; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var j int32 if i < 2 { j = i ^ 1 } else { j = i } // Search TEMP before MAIN var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32)).FpSchema if zDb != 0 && Xsqlite3DbIsNamed(tls, db, j, zDb) == 0 { continue } p = Xsqlite3HashFind(tls, pSchema+32, zName) if p != 0 { break } } return p } // Reclaim the memory used by an index func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114509:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FzColAff) if uint32(int32(*(*uint16)(unsafe.Pointer(p + 100))&0x10>>4)) != 0 { Xsqlite3DbFree(tls, db, (*Index)(unsafe.Pointer(p)).FazColl) } Xsqlite3_free(tls, (*Index)(unsafe.Pointer(p)).FaiRowEst) Xsqlite3DbFree(tls, db, p) } // For the index called zIdxName which is found in the database iDb, // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114529:21: */ var pIndex uintptr var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 32 pIndex = Xsqlite3HashInsert(tls, pHash, zIdxName, uintptr(0)) if pIndex != 0 { if (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex == pIndex { (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext } else { var p uintptr // Justification of ALWAYS(); The index must be on the list of // indices. p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex for p != 0 && (*Index)(unsafe.Pointer(p)).FpNext != pIndex { p = (*Index)(unsafe.Pointer(p)).FpNext } if p != 0 && (*Index)(unsafe.Pointer(p)).FpNext == pIndex { (*Index)(unsafe.Pointer(p)).FpNext = (*Index)(unsafe.Pointer(pIndex)).FpNext } } Xsqlite3FreeIndex(tls, db, pIndex) } *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) } // Look through the list of open database files in db->aDb[] and if // any have been closed, remove them from the list. Reallocate the // db->aDb[] structure to a smaller size, if possible. // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114562:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 if (*Db1)(unsafe.Pointer(pDb)).FpBt == uintptr(0) { Xsqlite3DbFree(tls, db, (*Db1)(unsafe.Pointer(pDb)).FzDbSName) (*Db1)(unsafe.Pointer(pDb)).FzDbSName = uintptr(0) continue } if j < i { *(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(j)*32)) = *(*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)) } j++ } (*Sqlite3)(unsafe.Pointer(db)).FnDb = j if (*Sqlite3)(unsafe.Pointer(db)).FnDb <= 2 && (*Sqlite3)(unsafe.Pointer(db)).FaDb != db+688 { libc.Xmemcpy(tls, db+688, (*Sqlite3)(unsafe.Pointer(db)).FaDb, uint64(2)*uint64(unsafe.Sizeof(Db{}))) Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaDb) (*Sqlite3)(unsafe.Pointer(db)).FaDb = db + 688 /* &.aDbStatic */ } } // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114589:21: */ var i int32 if iDb >= 0 { *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 114)) |= U16(DB_ResetWanted) *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 114)) |= U16(DB_ResetWanted) *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaKnownOk)) } if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { if int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema)).FschemaFlags)&DB_ResetWanted == DB_ResetWanted { Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema) } } } } // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114613:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 if (*Db)(unsafe.Pointer(pDb)).FpSchema != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { Xsqlite3SchemaClear(tls, (*Db)(unsafe.Pointer(pDb)).FpSchema) } else { *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema + 114)) |= U16(DB_ResetWanted) } } } *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange | DBFLAG_SchemaKnownOk)) Xsqlite3VtabUnlockList(tls, db) Xsqlite3BtreeLeaveAll(tls, db) if (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock == U32(0) { Xsqlite3CollapseDatabaseArray(tls, db) } } // This routine is called when a commit occurs. func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114637:21: */ *(*U32)(unsafe.Pointer(db + 44)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114646:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 || pList == uintptr(0) || (*ExprList)(unsafe.Pointer(pList)).FnExpr < int32((*Column)(unsafe.Pointer(pCol)).FiDflt) { (*Column)(unsafe.Pointer(pCol)).FiDflt = func() uint16 { if pList == uintptr(0) { return uint16(1) } return uint16((*ExprList)(unsafe.Pointer(pList)).FnExpr + 1) }() *(*uintptr)(unsafe.Pointer(pTab + 64 + 16 /* &.pDfltList */)) = Xsqlite3ExprListAppend(tls, pParse, pList, pExpr) } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr) (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr = pExpr } } // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114672:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return uintptr(0) } if *(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) == uintptr(0) { return uintptr(0) } if (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)))).FnExpr < int32((*Column)(unsafe.Pointer(pCol)).FiDflt) { return uintptr(0) } return (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 16)) + 8 + uintptr(int32((*Column)(unsafe.Pointer(pCol)).FiDflt)-1)*32)).FpExpr } // Set the collating sequence name for a column. func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114683:21: */ var nColl I64 var n I64 var zNew uintptr n = I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) + 1) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { n = n + I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n))+1) } nColl = I64(Xsqlite3Strlen30(tls, zColl) + 1) zNew = Xsqlite3DbRealloc(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName, uint64(nColl+n)) if zNew != 0 { (*Column)(unsafe.Pointer(pCol)).FzCnName = zNew libc.Xmemcpy(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n), zColl, uint64(nColl)) *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASCOLL) } } // Return the collating squence name for a column func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114708:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) } z = (*Column)(unsafe.Pointer(pCol)).FzCnName for *(*int8)(unsafe.Pointer(z)) != 0 { z++ } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { for __ccgo := true; __ccgo; __ccgo = *(*int8)(unsafe.Pointer(z)) != 0 { z++ } } return z + uintptr(1) } // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114723:21: */ var i int32 var pCol uintptr if libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTable)).FaCol) != uintptr(0) { i = 0 __1: if !(i < int32((*Table)(unsafe.Pointer(pTable)).FnCol)) { goto __3 } { Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName) } goto __2 __2: i++ pCol += 24 goto __1 goto __3 __3: ; Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FaCol) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64 + 16 /* &.pDfltList */))) } if db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { (*Table)(unsafe.Pointer(pTable)).FaCol = uintptr(0) (*Table)(unsafe.Pointer(pTable)).FnCol = int16(0) if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { *(*uintptr)(unsafe.Pointer(pTable + 64 + 16 /* &.pDfltList */)) = uintptr(0) } } } } // Remove the memory data structures associated with the given // Table. No changes are made to disk by this routine. // // This routine just deletes the data structure. It does not unlink // the table data structure from the hash table. But it does destroy // memory structures of the indices and foreign keys associated with // the table. // // The db parameter is optional. It is needed if the Table object // contains lookaside memory. (Table objects in the schema do not use // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114761:29: */ var pIndex uintptr var pNext uintptr // Delete all indices associated with this table. for pIndex = (*Table)(unsafe.Pointer(pTable)).FpIndex; pIndex != 0; pIndex = pNext { pNext = (*Index)(unsafe.Pointer(pIndex)).FpNext if (db == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && !(int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB) { var zName uintptr = (*Index)(unsafe.Pointer(pIndex)).FzName Xsqlite3HashInsert(tls, (*Index)(unsafe.Pointer(pIndex)).FpSchema+32, zName, uintptr(0)) } Xsqlite3FreeIndex(tls, db, pIndex) } if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_NORM { Xsqlite3FkDelete(tls, db, pTable) } else if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB { Xsqlite3VtabClear(tls, db, pTable) } else { Xsqlite3SelectDelete(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64))) } // Delete the Table structure itself. Xsqlite3DeleteColumnNames(tls, db, pTable) Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FzName) Xsqlite3DbFree(tls, db, (*Table)(unsafe.Pointer(pTable)).FzColAff) Xsqlite3ExprListDelete(tls, db, (*Table)(unsafe.Pointer(pTable)).FpCheck) Xsqlite3DbFree(tls, db, pTable) // Verify that no lookaside memory was used by schema tables } func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114818:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return } if (!(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0)) && libc.PreDecUint32(&(*Table)(unsafe.Pointer(pTable)).FnTabRef, 1) > U32(0) { return } deleteTable(tls, db, pTable) } // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114830:21: */ var p uintptr var pDb uintptr // Zero-length table names are allowed pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 p = Xsqlite3HashInsert(tls, (*Db)(unsafe.Pointer(pDb)).FpSchema+8, zTabName, uintptr(0)) Xsqlite3DeleteTable(tls, db, p) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) } // Given a token, return a string that consists of the text of that // token. Space to hold the returned string // is obtained from sqliteMalloc() and must be freed by the calling // function. // // Any quotation marks (ex: "name", 'name', [name], or `name`) that // surround the body of the token are removed. // // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114858:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) Xsqlite3Dequote(tls, zName) } else { zName = uintptr(0) } return zName } // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114873:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+7196) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 } } // Parameter zName points to a nul-terminated buffer containing the name // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114888:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr i = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 __1: if !(i >= 0) { goto __3 } { if 0 == Xsqlite3_stricmp(tls, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zName) { goto __3 } // "main" is always an acceptable alias for the primary database // even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+7684, zName) { goto __3 } } goto __2 __2: i-- pDb -= 32 goto __1 goto __3 __3: } return i } // The token *pName contains the name of a database (either "main" or // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114908:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) i = Xsqlite3FindDbName(tls, db, zName) Xsqlite3DbFree(tls, db, zName) return i } // The table or view or trigger name is passed to this routine via tokens // pName1 and pName2. If the table name was fully qualified, for example: // // CREATE TABLE xxx.yyy (...); // // Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if // the table name is not fully qualified, i.e.: // // CREATE TABLE yyy(...); // // Then pName1 is set to "yyy" and pName2 is "". // // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114933:20: */ bp := tls.Alloc(8) defer tls.Free(8) var iDb int32 // Database holding the object var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13439, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13456, libc.VaList(bp, pName1)) return -1 } } else { iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) *(*uintptr)(unsafe.Pointer(pUnqual)) = pName1 } return iDb } // True if PRAGMA writable_schema is ON func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114966:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } // This routine is used to check if the UTF-8 string zName is a legal // unqualified name for a new schema object (table, index, view or // trigger). All names are legal except those that begin with the string // "sqlite_" (in upper, lower or mixed case). This portion of the namespace // is reserved for internal use. // // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:114988:20: */ bp := tls.Alloc(8) defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if Xsqlite3WritableSchema(tls, db) != 0 || uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x2>>1)) != 0 || !(int32(Xsqlite3Config.FbExtraSchemaChecks) != 0) { // Skip these error checks for writable_schema=ON return SQLITE_OK } if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { if Xsqlite3_stricmp(tls, zType, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0 || Xsqlite3_stricmp(tls, zName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 1*8))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*8))) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+1524, 0) // corruptSchema() will supply the error return SQLITE_ERROR } } else { if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+9371, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13476, libc.VaList(bp, zName)) return SQLITE_ERROR } } return SQLITE_OK } // Return the PRIMARY KEY index of a table func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115026:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 100 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } return p } // Convert an table column number into a index column number. That is, // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115038:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { return I16(i) } } return int16(-1) } // Convert a storage column number into a table column number. // // The storage column number (0,1,2,....) is the index of the value // as it appears in the record on disk. The true column number // is the index (0,1,2,...) of the column in the CREATE TABLE statement. // // The storage column number is less than the table column number if // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115058:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { iCol++ } } } return iCol } // Convert a table column number into a storage column number. // // The storage column number (0,1,2,....) is the index of the value // as it appears in the record on disk. Or, if the input column is // the N-th virtual column (zero-based) then the storage number is // the number of non-virtual columns in the table plus N. // // The true column number is the index (0,1,2,...) of the column in // the CREATE TABLE statement. // // If the input column is a VIRTUAL column, then it should not appear // in storage. But the value sometimes is cached in registers that // follow the range of registers used to construct storage. This // avoids computing the same VIRTUAL column multiple times, and provides // values for use by OP_Param opcodes in triggers. Hence, if the // input column is a VIRTUAL table, put it after all the other columns. // // In the following, N means "normal column", S means STORED, and // V means VIRTUAL. Suppose the CREATE TABLE has columns like this: // // CREATE TABLE ex(N,S,V,N,S,V,N,S,V); // -- 0 1 2 3 4 5 6 7 8 // // Then the mapping from this function is as follows: // // INPUTS: 0 1 2 3 4 5 6 7 8 // OUTPUTS: 0 1 6 2 3 7 4 5 8 // // So, in other words, this routine shifts all the virtual columns to // the end. // // If SQLITE_OMIT_GENERATED_COLUMNS then there are no virtual columns and // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115106:20: */ var i int32 var n I16 if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) == U32(0) || int32(iCol) < 0 { return iCol } i = 0 n = int16(0) for ; i < int32(iCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { n++ } } if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { // iCol is a virtual column itself return I16(int32((*Table)(unsafe.Pointer(pTab)).FnNVCol) + i - int32(n)) } else { // iCol is a normal or stored column return n } return I16(0) } // Insert a single OP_JournalMode query opcode in order to force the // prepared statement to return false for sqlite3_stmt_readonly(). This // is used by CREATE TABLE IF NOT EXISTS and similar if the table already // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115132:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp3(tls, v, OP_JournalMode, 0, iReg, -1) Xsqlite3VdbeUsesBtree(tls, v, 0) } } // Begin constructing a new table representation in memory. This is // the first of several action routines that get called in response // to a CREATE TABLE statement. In particular, this routine is called // after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp // flag is true if the table should be stored in the auxiliary database // file instead of in the main database file. This is normally the case // when the "TEMP" or "TEMPORARY" keyword occurs in between // CREATE and TABLE. // // The new table record is initialized and put in pParse->pNewTable. // As more of the CREATE TABLE statement is parsed, additional action // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115157:21: */ bp := tls.Alloc(32) defer tls.Free(32) var pTable uintptr var zName uintptr // The name of the new table var db uintptr var v uintptr var iDb int32 // Database number to create the table in // var pName uintptr at bp+24, 8 var zDb uintptr var zDb1 uintptr var addr1 int32 var fileFormat int32 var reg1 int32 var reg2 int32 var reg3 int32 zName = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb // Unqualified name of the table to create if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum == Pgno(1)) { goto __1 } // Special case: Parsing the sqlite_schema or sqlite_temp_schema schema iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { return ts + 13385 /* "sqlite_temp_mast..." */ } return ts + 7196 /* "sqlite_master" */ }()) *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)) = pName1 goto __2 __1: // The common case iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+24) if !(iDb < 0) { goto __3 } return __3: ; if !(!(0 != 0) && isTemp != 0 && (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) && iDb != 1) { goto __4 } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. Xsqlite3ErrorMsg(tls, pParse, ts+13518, 0) return __4: ; if !(!(0 != 0) && isTemp != 0) { goto __5 } iDb = 1 __5: ; zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */))) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __6 } Xsqlite3RenameTokenMap(tls, pParse, zName, *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */))) __6: ; __2: ; (*Parse)(unsafe.Pointer(pParse)).FsNameToken = *(*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)))) if !(zName == uintptr(0)) { goto __7 } return __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { return ts + 11728 } return ts + 10113 }(), zName) != 0) { goto __8 } goto begin_table_error __8: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) == 1) { goto __9 } isTemp = 1 __9: ; zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { return ts + 13385 } return ts + 7196 }(), uintptr(0), zDb) != 0) { goto __10 } goto begin_table_error __10: ; if !(!(isVirtual != 0) && Xsqlite3AuthCheck(tls, pParse, int32(aCode[isTemp+2*isView]), zName, uintptr(0), zDb) != 0) { goto __11 } goto begin_table_error __11: ; // Make sure the new table name does not collide with an existing // index or table name in the same database. Issue an error message if // it does. The exception is if the statement being parsed was passed // to an sqlite3_declare_vtab() call. In that case only the column names // and types will be used, so there is no need to test for namespace // collisions. if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { goto __12 } zDb1 = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { goto __13 } goto begin_table_error __13: ; pTable = Xsqlite3FindTable(tls, db, zName, zDb1) if !(pTable != 0) { goto __14 } if !!(noErr != 0) { goto __15 } Xsqlite3ErrorMsg(tls, pParse, ts+13559, libc.VaList(bp, func() uintptr { if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VIEW { return ts + 11728 /* "view" */ } return ts + 10113 /* "table" */ }(), *(*uintptr)(unsafe.Pointer(bp + 24 /* pName */)))) goto __16 __15: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) sqlite3ForceNotReadOnly(tls, pParse) __16: ; goto begin_table_error __14: ; if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } Xsqlite3ErrorMsg(tls, pParse, ts+13580, libc.VaList(bp+16, zName)) goto begin_table_error __17: ; __12: ; pTable = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) if !(pTable == uintptr(0)) { goto __18 } (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(pParse)).FnErr++ goto begin_table_error __18: ; (*Table)(unsafe.Pointer(pTable)).FzName = zName (*Table)(unsafe.Pointer(pTable)).FiPKey = int16(-1) (*Table)(unsafe.Pointer(pTable)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema (*Table)(unsafe.Pointer(pTable)).FnTabRef = U32(1) (*Table)(unsafe.Pointer(pTable)).FnRowLogEst = int16(200) (*Parse)(unsafe.Pointer(pParse)).FpNewTable = pTable // Begin generating the code that will insert the table record into // the schema table. Note in particular that we must go ahead // and allocate the record number for the table entry now. Before any // PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause // indices to be created and the table record must come before the // indices. Hence, the record number for the table must be allocated // now. if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0)) { goto __19 } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) if !(isVirtual != 0) { goto __20 } Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) __20: ; // If the file format and encoding in the database have not been set, // set them now. reg1 = libc.AssignPtrInt32(pParse+120, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) reg2 = libc.AssignPtrInt32(pParse+124, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) reg3 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp3(tls, v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT) Xsqlite3VdbeUsesBtree(tls, v, iDb) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_If, reg3) if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LegacyFileFmt) != uint64(0) { fileFormat = 1 } else { fileFormat = SQLITE_MAX_FILE_FORMAT } Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, fileFormat) Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) Xsqlite3VdbeJumpHere(tls, v, addr1) // This just creates a place-holder record in the sqlite_schema table. // The record created does not contain anything yet. It will be replaced // by the real entry in code generated at sqlite3EndTable(). // // The rowid for the new entry is left in register pParse->regRowid. // The root page number of the new table is left in reg pParse->regRoot. // The rowid and root page number values are needed by the code that // sqlite3EndTable will generate. if !(isView != 0 || isVirtual != 0) { goto __21 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, reg2) goto __22 __21: ; *(*int32)(unsafe.Pointer(pParse + 192)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 0, reg1) Xsqlite3VdbeAddOp4(tls, v, OP_Blob, 6, reg3, 0, uintptr(unsafe.Pointer(&nullRow)), -1) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 0, reg3, reg1) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) Xsqlite3VdbeAddOp0(tls, v, OP_Close) __19: ; // Normal (non-error) return. return // If an error occurs, we jump here begin_table_error: (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) Xsqlite3DbFree(tls, db, zName) return } var aCode = [4]U8{ U8(SQLITE_CREATE_TABLE), U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115204:21 */ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115283:23 */ // Set properties of a table column based on the (magical) // name of the column. // Name of the special TEMP trigger used to implement RETURNING. The // name begins with "sqlite_" so that it is guaranteed not to collide // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115368:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 Xsqlite3HashInsert(tls, pHash, ts+13615, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } // Add the RETURNING clause to the parse currently underway. // // This routine creates a special TEMP trigger that will fire for each row // of the DML statement. That TEMP trigger contains a single SELECT // statement with a result set that is the argument of the RETURNING clause. // The trigger has the Trigger.bReturning flag and an opcode of // TK_RETURNING instead of TK_SELECT, so that the trigger code generator // knows to handle it specially. The TEMP trigger is automatically // removed at the end of the parse. // // When this routine is called, we do not yet know if the RETURNING clause // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115392:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13632, 0) } else { } (*Parse)(unsafe.Pointer(pParse)).FbReturning = U8(1) pRet = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Returning{}))) if pRet == uintptr(0) { Xsqlite3ExprListDelete(tls, db, pList) return } *(*uintptr)(unsafe.Pointer(pParse + 192)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{sqlite3DeleteReturning})), pRet) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 13615 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema (*Returning)(unsafe.Pointer(pRet)).FretTrig.FpTabSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpSchema (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fstep_list = pRet + 88 (*Returning)(unsafe.Pointer(pRet)).FretTStep.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpTrig = pRet + 16 (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 56 if Xsqlite3HashInsert(tls, pHash, ts+13615, pRet+16) == pRet+16 { Xsqlite3OomFault(tls, db) } } // Add a new column to the table currently being constructed. // // The parser calls this routine once for each column declaration // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115440:21: */ bp := tls.Alloc(48) defer tls.Free(48) *(*Token)(unsafe.Pointer(bp + 16)) = sName *(*Token)(unsafe.Pointer(bp + 32)) = sType var p uintptr var i int32 var z uintptr var zType uintptr var pCol uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var hName U8 var aNew uintptr var eType U8 = U8(COLTYPE_CUSTOM) var szEst U8 = U8(1) var affinity int8 = int8(SQLITE_AFF_BLOB) if libc.AssignUintptr(&p, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 136 + 2*4)) { Xsqlite3ErrorMsg(tls, pParse, ts+13666, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3DequoteToken(tls, bp+16) } // Because keywords GENERATE ALWAYS can be converted into indentifiers // by the parser, we can sometimes end up with a typename that ends // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(16) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(6)), ts+13689, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(9) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz+uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(9)), ts+13696, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 32 + 8)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+32)).Fz + uintptr((*Token)(unsafe.Pointer(bp+32)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn-- } } } // Check for standard typenames. For standard typenames we will // set the Column.eType field rather than storing the typename after // the column name, in order to save space. if (*Token)(unsafe.Pointer(bp+32)).Fn >= uint32(3) { Xsqlite3DequoteToken(tls, bp+32) for i = 0; i < SQLITE_N_STDTYPE; i++ { if (*Token)(unsafe.Pointer(bp+32)).Fn == uint32(Xsqlite3StdTypeLen[i]) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+32)).Fz, Xsqlite3StdType[i], int32((*Token)(unsafe.Pointer(bp+32)).Fn)) == 0 { (*Token)(unsafe.Pointer(bp + 32 /* &sType */)).Fn = uint32(0) eType = U8(i + 1) affinity = Xsqlite3StdTypeAffinity[i] if int32(affinity) <= SQLITE_AFF_TEXT { szEst = U8(5) } break } } } z = Xsqlite3DbMallocRaw(tls, db, uint64(I64((*Token)(unsafe.Pointer(bp+16)).Fn)+int64(1)+I64((*Token)(unsafe.Pointer(bp+32)).Fn)+I64(libc.Bool32((*Token)(unsafe.Pointer(bp+32)).Fn > uint32(0))))) if z == uintptr(0) { return } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameTokenMap(tls, pParse, z, bp+16) } libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fz, uint64((*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn)) *(*int8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn))) = int8(0) Xsqlite3Dequote(tls, z) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24)).FzCnName) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13706, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } } aNew = Xsqlite3DbRealloc(tls, db, (*Table)(unsafe.Pointer(p)).FaCol, uint64(I64((*Table)(unsafe.Pointer(p)).FnCol)+int64(1))*uint64(unsafe.Sizeof(Column{}))) if aNew == uintptr(0) { Xsqlite3DbFree(tls, db, z) return } (*Table)(unsafe.Pointer(p)).FaCol = aNew pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr((*Table)(unsafe.Pointer(p)).FnCol)*24 libc.Xmemset(tls, pCol, 0, uint64(unsafe.Sizeof(Column{}))) (*Column)(unsafe.Pointer(pCol)).FzCnName = z (*Column)(unsafe.Pointer(pCol)).FhName = hName if (*Token)(unsafe.Pointer(bp+32)).Fn == uint32(0) { // If there is no type specified, columns have the default affinity // 'BLOB' with a default size of 4 bytes. (*Column)(unsafe.Pointer(pCol)).Faffinity = affinity libc.SetBitFieldPtr8Uint32(pCol+8, uint32(eType), 4, 0xf0) (*Column)(unsafe.Pointer(pCol)).FszEst = szEst } else { zType = z + uintptr(Xsqlite3Strlen30(tls, z)) + uintptr(1) libc.Xmemcpy(tls, zType, (*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fz, uint64((*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn)) *(*int8)(unsafe.Pointer(zType + uintptr((*Token)(unsafe.Pointer(bp+32 /* &sType */)).Fn))) = int8(0) Xsqlite3Dequote(tls, zType) (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3AffinityType(tls, zType, pCol) *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASTYPE) } (*Table)(unsafe.Pointer(p)).FnCol++ (*Table)(unsafe.Pointer(p)).FnNVCol++ (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn = uint32(0) } // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115553:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if p == uintptr(0) || int32((*Table)(unsafe.Pointer(p)).FnCol) < 1 { return } pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 libc.SetBitFieldPtr8Uint32(pCol+8, uint32(U8(onError)), 0, 0xf) *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_HasNotNull) // Set the uniqNotNull flag on any UNIQUE or PK indexes already created // on this column. if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_UNIQUE != 0 { var pIdx uintptr for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn))) == int32((*Table)(unsafe.Pointer(p)).FnCol)-1 { libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 3, 0x8) } } } } // Scan the column type name zType (length nType) and return the // associated affinity type. // // This routine does a case-independent search of zType for the // substrings in the following table. If one of the substrings is // found, the corresponding affinity is returned. If zType contains // more than one of the substrings, entries toward the top of // the table take priority. For example, if zType is 'BLOBINT', // SQLITE_AFF_INTEGER is returned. // // Substring | Affinity // -------------------------------- // 'INT' | SQLITE_AFF_INTEGER // 'CHAR' | SQLITE_AFF_TEXT // 'CLOB' | SQLITE_AFF_TEXT // 'TEXT' | SQLITE_AFF_TEXT // 'BLOB' | SQLITE_AFF_BLOB // 'REAL' | SQLITE_AFF_REAL // 'FLOA' | SQLITE_AFF_REAL // 'DOUB' | SQLITE_AFF_REAL // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115600:21: */ bp := tls.Alloc(4) defer tls.Free(4) var h U32 = U32(0) var aff int8 = int8(SQLITE_AFF_NUMERIC) var zChar uintptr = uintptr(0) for *(*int8)(unsafe.Pointer(zIn)) != 0 { h = h<<8 + U32(Xsqlite3UpperToLower[int32(*(*int8)(unsafe.Pointer(zIn)))&0xff]) zIn++ if h == U32(int32('c')<<24+int32('h')<<16+int32('a')<<8+'r') { // CHAR aff = int8(SQLITE_AFF_TEXT) zChar = zIn } else if h == U32(int32('c')<<24+int32('l')<<16+int32('o')<<8+'b') { // CLOB aff = int8(SQLITE_AFF_TEXT) } else if h == U32(int32('t')<<24+int32('e')<<16+int32('x')<<8+'t') { // TEXT aff = int8(SQLITE_AFF_TEXT) } else if h == U32(int32('b')<<24+int32('l')<<16+int32('o')<<8+'b') && (int32(aff) == SQLITE_AFF_NUMERIC || int32(aff) == SQLITE_AFF_REAL) { aff = int8(SQLITE_AFF_BLOB) if int32(*(*int8)(unsafe.Pointer(zIn))) == '(' { zChar = zIn } } else if h == U32(int32('r')<<24+int32('e')<<16+int32('a')<<8+'l') && int32(aff) == SQLITE_AFF_NUMERIC { aff = int8(SQLITE_AFF_REAL) } else if h == U32(int32('f')<<24+int32('l')<<16+int32('o')<<8+'a') && int32(aff) == SQLITE_AFF_NUMERIC { aff = int8(SQLITE_AFF_REAL) } else if h == U32(int32('d')<<24+int32('o')<<16+int32('u')<<8+'b') && int32(aff) == SQLITE_AFF_NUMERIC { aff = int8(SQLITE_AFF_REAL) } else if h&U32(0x00FFFFFF) == U32(int32('i')<<16+int32('n')<<8+'t') { // INT aff = int8(SQLITE_AFF_INTEGER) break } } // If pCol is not NULL, store an estimate of the field size. The // estimate is scaled so that the size of an integer is 1. if pCol != 0 { *(*int32)(unsafe.Pointer(bp /* v */)) = 0 // default size is approx 4 bytes if int32(aff) < SQLITE_AFF_NUMERIC { if zChar != 0 { for *(*int8)(unsafe.Pointer(zChar)) != 0 { if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zChar)))])&0x04 != 0 { // BLOB(k), VARCHAR(k), CHAR(k) -> r=(k/4+1) Xsqlite3GetInt32(tls, zChar, bp) break } zChar++ } } else { *(*int32)(unsafe.Pointer(bp /* v */)) = 16 // BLOB, TEXT, CLOB -> r=5 (approx 20 bytes) } } *(*int32)(unsafe.Pointer(bp /* v */)) = *(*int32)(unsafe.Pointer(bp))/4 + 1 if *(*int32)(unsafe.Pointer(bp)) > 255 { *(*int32)(unsafe.Pointer(bp /* v */)) = 255 } (*Column)(unsafe.Pointer(pCol)).FszEst = U8(*(*int32)(unsafe.Pointer(bp /* v */))) } return aff } // The expression is the default value for the most recently added column // of the table currently under construction. // // Default value expressions must be constant. Raise an exception if this // is not the case. // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115677:21: */ bp := tls.Alloc(80) defer tls.Free(80) var p uintptr var pCol uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if p != uintptr(0) { var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*24 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+13732, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13777, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. // var x Expr at bp+8, 72 var pDfltExpr uintptr libc.Xmemset(tls, bp+8, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fop = U8(TK_SPAN) *(*uintptr)(unsafe.Pointer(bp + 8 + 8)) = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).FpLeft = pExpr (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fflags = U32(EP_Skip) pDfltExpr = Xsqlite3ExprDup(tls, db, bp+8, EXPRDUP_REDUCE) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 + 8))) Xsqlite3ColumnSetExpr(tls, pParse, p, pCol, pDfltExpr) } } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) } Xsqlite3ExprDelete(tls, db, pExpr) } // Backwards Compatibility Hack: // // Historical versions of SQLite accepted strings as column names in // indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example: // // CREATE TABLE xyz(a,b,c,d,e,PRIMARY KEY('a'),UNIQUE('b','c' COLLATE trim) // CREATE INDEX abc ON xyz('c','d' DESC,'e' COLLATE nocase DESC); // // This is goofy. But to preserve backwards compatibility we continue to // accept it. This routine does the necessary conversion. It converts // the expression given in its argument from a TK_STRING into a TK_ID // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115736:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop = U8(TK_ID) } } // Tag the given column as being part of the PRIMARY KEY func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115747:13: */ *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+13818, 0) } } // Designate the PRIMARY KEY for the table. pList is a list of names // of columns that form the primary key. If pList is NULL, then the // most recently added column of the table is the primary key. // // A table can have at most one primary key. If the table already has // a primary key (and this is the second primary key) then create an // error. // // If the PRIMARY KEY is on a single column whose datatype is INTEGER, // then we will try to use that column as the rowid. Set the Table.iPKey // field of the table under construction to be the index of the // INTEGER PRIMARY KEY column. Table.iPKey is set to -1 if there is // no INTEGER PRIMARY KEY. // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115777:21: */ bp := tls.Alloc(8) defer tls.Free(8) var pTab uintptr var pCol uintptr var iCol int32 var i int32 var nTerm int32 var zCName uintptr var pCExpr uintptr var pCExpr1 uintptr pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable pCol = uintptr(0) iCol = -1 if !(pTab == uintptr(0)) { goto __1 } goto primary_key_exit __1: ; if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasPrimaryKey) != 0) { goto __2 } Xsqlite3ErrorMsg(tls, pParse, ts+13870, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasPrimaryKey) if !(pList == uintptr(0)) { goto __3 } iCol = int32((*Table)(unsafe.Pointer(pTab)).FnCol) - 1 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 makeColumnPartOfPrimaryKey(tls, pParse, pCol) nTerm = 1 goto __4 __3: nTerm = (*ExprList)(unsafe.Pointer(pList)).FnExpr i = 0 __5: if !(i < nTerm) { goto __7 } pCExpr = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) sqlite3StringToId(tls, pCExpr) if !(int32((*Expr)(unsafe.Pointer(pCExpr)).Fop) == TK_ID) { goto __8 } zCName = *(*uintptr)(unsafe.Pointer(pCExpr + 8)) iCol = 0 __9: if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __11 } if !(Xsqlite3StrICmp(tls, zCName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) == 0) { goto __12 } pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 makeColumnPartOfPrimaryKey(tls, pParse, pCol) goto __11 __12: ; goto __10 __10: iCol++ goto __9 goto __11 __11: ; __8: ; goto __6 __6: i++ goto __5 goto __7 __7: ; __4: ; if !(nTerm == 1 && pCol != 0 && int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_INTEGER && sortOrder != SQLITE_SO_DESC) { goto __13 } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && pList != 0) { goto __15 } pCExpr1 = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr) Xsqlite3RenameTokenRemap(tls, pParse, pTab+52, pCExpr1) __15: ; (*Table)(unsafe.Pointer(pTab)).FiPKey = I16(iCol) (*Table)(unsafe.Pointer(pTab)).FkeyConf = U8(onError) *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(autoInc * TF_Autoincrement) if !(pList != 0) { goto __16 } (*Parse)(unsafe.Pointer(pParse)).FiPkSortOrder = (*ExprList_item)(unsafe.Pointer(pList + 8)).FsortFlags __16: ; Xsqlite3HasExplicitNulls(tls, pParse, pList) goto __14 __13: if !(autoInc != 0) { goto __17 } Xsqlite3ErrorMsg(tls, pParse, ts+13911, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), uintptr(0), sortOrder, 0, uint8(SQLITE_IDXTYPE_PRIMARYKEY)) pList = uintptr(0) __18: ; __14: ; primary_key_exit: Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) return } // Add a new CHECK constraint to the table currently under construction. func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115854:21: */ bp := tls.Alloc(16) defer tls.Free(16) var pTab uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTable var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pTab != 0 && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) && !(Xsqlite3BtreeIsReadonly(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb)*32)).FpBt) != 0) { (*Table)(unsafe.Pointer(pTab)).FpCheck = Xsqlite3ExprListAppend(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pCheckExpr) if (*Parse)(unsafe.Pointer(pParse)).FconstraintName.Fn != 0 { Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, pParse+96, 1) } else { // var t Token at bp, 16 for zStart++; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0; zStart++ { } for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zEnd + libc.UintptrFromInt32(-1))))])&0x01 != 0 { zEnd-- } (*Token)(unsafe.Pointer(bp /* &t */)).Fz = zStart (*Token)(unsafe.Pointer(bp /* &t */)).Fn = uint32(int32((int64(zEnd) - int64((*Token)(unsafe.Pointer(bp)).Fz)) / 1)) Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, bp, 1) } } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCheckExpr) } } // Set the collation function of the most recently parsed table column // to the CollSeq given. func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115888:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence var db uintptr if libc.AssignUintptr(&p, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { return } i = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 db = (*Parse)(unsafe.Pointer(pParse)).Fdb zColl = Xsqlite3NameFromToken(tls, db, pToken) if !(zColl != 0) { return } if Xsqlite3LocateCollSeq(tls, pParse, zColl) != 0 { var pIdx uintptr Xsqlite3ColumnSetColl(tls, db, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24, zColl) // If the column is declared as "<name> PRIMARY KEY COLLATE <type>", // then an index may have been created on this column before the // collation type was added. Correct this if it is the case. for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn))) == i { *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl)) = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*24) } } } Xsqlite3DbFree(tls, db, zColl) } // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115921:21: */ bp := tls.Alloc(8) defer tls.Free(8) var eType U8 var pTab uintptr var pCol uintptr eType = U8(COLFLAG_VIRTUAL) pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if !(pTab == uintptr(0)) { goto __1 } // generated column in an CREATE TABLE IF NOT EXISTS that already exists goto generated_done __1: ; pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1)*24 if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } Xsqlite3ErrorMsg(tls, pParse, ts+13967, 0) goto generated_done __2: ; if !(int32((*Column)(unsafe.Pointer(pCol)).FiDflt) > 0) { goto __3 } goto generated_error __3: ; if !(pType != 0) { goto __4 } if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+14010, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+14018, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) goto __8 __7: goto generated_error __8: ; __6: ; __4: ; if !(int32(eType) == COLFLAG_VIRTUAL) { goto __9 } (*Table)(unsafe.Pointer(pTab)).FnNVCol-- __9: ; *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(int32(eType)) *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(eType) if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0) { goto __10 } makeColumnPartOfPrimaryKey(tls, pParse, pCol) // For the error message __10: ; Xsqlite3ColumnSetExpr(tls, pParse, pTab, pCol, pExpr) pExpr = uintptr(0) goto generated_done generated_error: Xsqlite3ErrorMsg(tls, pParse, ts+14025, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) } // Generate code that will increment the schema cookie. // // The schema cookie is used to determine when the schema for the // database changes. After each schema change, the cookie value // changes. When a process first reads the schema it records the // cookie. Thereafter, whenever it goes to access the database, // it checks the cookie to make sure the schema has not changed // since it was last read. // // This plan is not completely bullet-proof. It is possible for // the schema to change multiple times and for the cookie to be // set back to prior value. But schema changes are infrequent // and the probability of hitting the same cookie value is only // 1 chance in 2^32. So we're safe enough. // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:115989:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, int32(uint32(1)+uint32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fschema_cookie))) } // Measure the number of characters needed to output the given // identifier. The number returned includes any quotes used // but does not include the null terminator. // // The estimate is conservative. It might be larger that what is // really needed. func identLength(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116005:12: */ var n int32 n = 0 __1: if !(*(*int8)(unsafe.Pointer(z)) != 0) { goto __3 } { if int32(*(*int8)(unsafe.Pointer(z))) == '"' { n++ } } goto __2 __2: n++ z++ goto __1 goto __3 __3: ; return n + 2 } // The first parameter is a pointer to an output buffer. The second // parameter is a pointer to an integer that contains the offset at // which to write into the output buffer. This function copies the // nul-terminated string pointed to by the third parameter, zSignedIdent, // to the specified offset in the buffer and updates *pIdx to refer // to the first byte after the last byte written before returning. // // If the string zSignedIdent consists entirely of alpha-numeric // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116026:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 var needQuote int32 i = *(*int32)(unsafe.Pointer(pIdx)) for j = 0; *(*uint8)(unsafe.Pointer(zIdent + uintptr(j))) != 0; j++ { if !(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))])&0x06 != 0) && int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) != '_' { break } } needQuote = libc.Bool32(int32(Xsqlite3CtypeMap[*(*uint8)(unsafe.Pointer(zIdent))])&0x04 != 0 || Xsqlite3KeywordCode(tls, zIdent, j) != TK_ID || int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) != 0 || j == 0) if needQuote != 0 { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"') } for j = 0; *(*uint8)(unsafe.Pointer(zIdent + uintptr(j))) != 0; j++ { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) if int32(*(*uint8)(unsafe.Pointer(zIdent + uintptr(j)))) == '"' { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"') } } if needQuote != 0 { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncInt32(&i, 1)))) = int8('"') } *(*int8)(unsafe.Pointer(z + uintptr(i))) = int8(0) *(*int32)(unsafe.Pointer(pIdx)) = i } // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116054:13: */ bp := tls.Alloc(12) defer tls.Free(12) var i int32 // var k int32 at bp+8, 4 var n int32 var zStmt uintptr var zSep uintptr var zSep2 uintptr var zEnd uintptr var pCol uintptr n = 0 pCol = (*Table)(unsafe.Pointer(p)).FaCol i = 0 __1: if !(i < int32((*Table)(unsafe.Pointer(p)).FnCol)) { goto __3 } { n = n + (identLength(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName) + 5) } goto __2 __2: i++ pCol += 24 goto __1 goto __3 __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { zSep = ts + 1524 /* "" */ zSep2 = ts + 14056 /* "," */ zEnd = ts + 6260 /* ")" */ } else { zSep = ts + 14058 /* "\n " */ zSep2 = ts + 14062 /* ",\n " */ zEnd = ts + 14067 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) if zStmt == uintptr(0) { Xsqlite3OomFault(tls, db) return uintptr(0) } Xsqlite3_snprintf(tls, n, zStmt, ts+14070, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') pCol = (*Table)(unsafe.Pointer(p)).FaCol i = 0 __4: if !(i < int32((*Table)(unsafe.Pointer(p)).FnCol)) { goto __6 } { var len int32 var zType uintptr Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), zSep, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += Xsqlite3Strlen30(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))) zSep = zSep2 identPut(tls, zStmt, bp+8, (*Column)(unsafe.Pointer(pCol)).FzCnName) zType = azType1[int32((*Column)(unsafe.Pointer(pCol)).Faffinity)-SQLITE_AFF_BLOB] len = Xsqlite3Strlen30(tls, zType) libc.Xmemcpy(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), zType, uint64(len)) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += len } goto __5 __5: i++ pCol += 24 goto __4 goto __6 __6: ; Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+4444, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ ts + 1524, ts + 14084, ts + 14090, ts + 14095, ts + 14100, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116084:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116122:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { return SQLITE_OK } nByte = int32((uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(LogEst(0))) + uint64(unsafe.Sizeof(I16(0))) + uint64(1)) * uint64(N)) zExtra = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if zExtra == uintptr(0) { return SQLITE_NOMEM } libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FazColl, uint64(unsafe.Sizeof(uintptr(0)))*uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) (*Index)(unsafe.Pointer(pIdx)).FazColl = zExtra zExtra += uintptr(uint64(unsafe.Sizeof(uintptr(0))) * uint64(N)) libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst, uint64(unsafe.Sizeof(LogEst(0)))*uint64(int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)+1)) (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst = zExtra zExtra += uintptr(uint64(unsafe.Sizeof(LogEst(0))) * uint64(N)) libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaiColumn, uint64(unsafe.Sizeof(I16(0)))*uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) (*Index)(unsafe.Pointer(pIdx)).FaiColumn = zExtra zExtra += uintptr(uint64(unsafe.Sizeof(I16(0))) * uint64(N)) libc.Xmemcpy(tls, zExtra, (*Index)(unsafe.Pointer(pIdx)).FaSortOrder, uint64((*Index)(unsafe.Pointer(pIdx)).FnColumn)) (*Index)(unsafe.Pointer(pIdx)).FaSortOrder = zExtra (*Index)(unsafe.Pointer(pIdx)).FnColumn = U16(N) libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 4, 0x10) return SQLITE_OK } // Estimate the total row width for a table. func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116149:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 i = int32((*Table)(unsafe.Pointer(pTab)).FnCol) pTabCol = (*Table)(unsafe.Pointer(pTab)).FaCol __1: if !(i > 0) { goto __3 } { wTable = wTable + uint32((*Column)(unsafe.Pointer(pTabCol)).FszEst) } goto __2 __2: i-- pTabCol += 24 goto __1 goto __3 __3: ; if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) < 0 { wTable++ } (*Table)(unsafe.Pointer(pTab)).FszTabRow = Xsqlite3LogEst(tls, uint64(wTable*uint32(4))) } // Estimate the average size of a row for an index. func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116163:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { var x I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) wIndex = wIndex + func() uint32 { if int32(x) < 0 { return uint32(1) } return uint32((*Column)(unsafe.Pointer(aCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))*24)).FszEst) }() } (*Index)(unsafe.Pointer(pIdx)).FszIdxRow = Xsqlite3LogEst(tls, uint64(wIndex*uint32(4))) } // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116179:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 } } return 0 } // Return true if any of the first nKey entries of index pIdx exactly // match the iCol-th entry of pPk. pPk is always a WITHOUT ROWID // PRIMARY KEY index. pIdx is an index on the same table. pIdx may // or may not be the same index as pPk. // // The first nKey entries of pIdx are guaranteed to be ordinary columns, // not a rowid or expression. // // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116201:12: */ var i int32 var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(iCol)*2))) for i = 0; i < nKey; i++ { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) == j && Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(iCol)*8))) == 0 { return 1 } } return 0 } // Recompute the colNotIdxed field of the Index. // // colNotIdxed is a bitmask that has a 0 bit representing each indexed // columns that are within the first 63 columns of the table. The // high-order bit of colNotIdxed is always 1. All unindexed columns // of the table have a 1. // // 2019-10-24: For the purpose of this computation, virtual columns are // not considered to be covered by the index, even if they are in the // index, because we do not trust the logic in whereIndexExprTrans() to be // able to find all instances of a reference to the indexed table column // and convert them into references to the index. Hence we always want // the actual table at hand in order to recompute the virtual column, if // necessary. // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116240:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable for j = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) - 1; j >= 0; j-- { var x int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) if x >= 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(x)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { if x < int32(uint64(unsafe.Sizeof(Bitmask(0)))*uint64(8))-1 { m = m | Bitmask(uint64(1))<<x } } } (*Index)(unsafe.Pointer(pIdx)).FcolNotIdxed = ^m } // This routine runs at the end of parsing a CREATE TABLE statement that // has a WITHOUT ROWID clause. The job of this routine is to convert both // internal schema data structures and the generated VDBE code so that they // are appropriate for a WITHOUT ROWID table instead of a rowid table. // Changes include: // // (1) Set all columns of the PRIMARY KEY schema object to be NOT NULL. // (2) Convert P3 parameter of the OP_CreateBtree from BTREE_INTKEY // into BTREE_BLOBKEY. // (3) Bypass the creation of the sqlite_schema table entry // for the PRIMARY KEY as the primary key index is now // identified by the sqlite_schema table entry of the table itself. // (4) Set the Index.tnum of the PRIMARY KEY Index object in the // schema to the rootpage from the main table. // (5) Add all table columns to the PRIMARY KEY Index object // so that the PRIMARY KEY is a covering index. The surplus // columns are part of KeyInfo.nAllField and are not used for // sorting or lookup or uniqueness checks. // (6) Replace the rowid tail on all automatically generated UNIQUE // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116280:13: */ bp := tls.Alloc(16) defer tls.Free(16) var pIdx uintptr var pPk uintptr var nPk int32 var nExtra int32 var i int32 var j int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Mark every PRIMARY KEY column as NOT NULL (except for imposter tables) if !(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x2>>1) != 0) { for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_PRIMKEY != 0 && int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + 8))&0xf>>0) == OE_None { libc.SetBitFieldPtr8Uint32((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24+8, uint32(OE_Abort), 0, 0xf) } } *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(TF_HasNotNull) } // Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY // into BTREE_BLOBKEY. if *(*int32)(unsafe.Pointer(pParse + 192)) != 0 { Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 192)), BTREE_BLOBKEY) } // Locate the PRIMARY KEY index. Or, if this table was originally // an INTEGER PRIMARY KEY table, create a new PRIMARY KEY index. if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { var pList uintptr // var ipkToken Token at bp, 16 Xsqlite3TokenInit(tls, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName) pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp, 0)) if pList == uintptr(0) { *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)) return } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameTokenRemap(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8)).FpExpr, pTab+52) } (*ExprList_item)(unsafe.Pointer(pList + 8)).FsortFlags = (*Parse)(unsafe.Pointer(pParse)).FiPkSortOrder (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, int32((*Table)(unsafe.Pointer(pTab)).FkeyConf), uintptr(0), uintptr(0), 0, 0, uint8(SQLITE_IDXTYPE_PRIMARYKEY)) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { *(*U32)(unsafe.Pointer(pTab + 48)) &= libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)) return } pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) } else { pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) // Remove all redundant columns from the PRIMARY KEY. For example, change // "PRIMARY KEY(a,b,a,b,c,b,c,d)" into just "PRIMARY KEY(a,b,c,d)". Later // code assumes the PRIMARY KEY contains no repeated columns. for i = libc.AssignInt32(&j, 1); i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { if isDupColumn(tls, pPk, j, pPk, i) != 0 { (*Index)(unsafe.Pointer(pPk)).FnColumn-- } else { *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8)) *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(j))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(libc.PostIncInt32(&j, 1))*2)) = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)) } } (*Index)(unsafe.Pointer(pPk)).FnKeyCol = U16(j) } libc.SetBitFieldPtr16Uint32(pPk+100, uint32(1), 5, 0x20) if !(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x2>>1) != 0) { libc.SetBitFieldPtr16Uint32(pPk+100, uint32(1), 3, 0x8) } nPk = int32(libc.AssignPtrUint16(pPk+96, (*Index)(unsafe.Pointer(pPk)).FnKeyCol)) // Bypass the creation of the PRIMARY KEY btree and the sqlite_schema // table entry. This is only required if currently generating VDBE // code for a CREATE TABLE (not when parsing one as part of reading // a database schema). if v != 0 && (*Index)(unsafe.Pointer(pPk)).Ftnum > Pgno(0) { Xsqlite3VdbeChangeOpcode(tls, v, int32((*Index)(unsafe.Pointer(pPk)).Ftnum), uint8(OP_Goto)) } // The root page of the PRIMARY KEY is the table root page (*Index)(unsafe.Pointer(pPk)).Ftnum = (*Table)(unsafe.Pointer(pTab)).Ftnum // Update the in-memory representation of all UNIQUE indices by converting // the final rowid column into one or more columns of the PRIMARY KEY. for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { var n int32 if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { continue } for i = libc.AssignInt32(&n, 0); i < nPk; i++ { if !(isDupColumn(tls, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), pPk, i) != 0) { n++ } } if n == 0 { // This index is a superset of the primary key (*Index)(unsafe.Pointer(pIdx)).FnColumn = (*Index)(unsafe.Pointer(pIdx)).FnKeyCol continue } if resizeIndexObject(tls, db, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)+n) != 0 { return } i = 0 j = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) for ; i < nPk; i++ { if !(isDupColumn(tls, pIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol), pPk, i) != 0) { *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)) = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)) *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(j)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8)) if *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(i))) != 0 { // See ticket https://www.sqlite.org/src/info/bba7b69f9849b5bf libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 9, 0x200) } j++ } } } // Add all table columns to the PRIMARY KEY index nExtra = 0 for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { if !(hasColumn(tls, (*Index)(unsafe.Pointer(pPk)).FaiColumn, nPk, i) != 0) && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { nExtra++ } } if resizeIndexObject(tls, db, pPk, nPk+nExtra) != 0 { return } i = 0 j = nPk for ; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { if !(hasColumn(tls, (*Index)(unsafe.Pointer(pPk)).FaiColumn, j, i) != 0) && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2)) = I16(i) *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) j++ } } recomputeColumnsNotIndexed(tls, pPk) } // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116440:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { return 0 } nName = Xsqlite3Strlen30(tls, (*Table)(unsafe.Pointer(pTab)).FzName) if Xsqlite3_strnicmp(tls, zName, (*Table)(unsafe.Pointer(pTab)).FzName, nName) != 0 { return 0 } if int32(*(*int8)(unsafe.Pointer(zName + uintptr(nName)))) != '_' { return 0 } pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */))))) if pMod == uintptr(0) { return 0 } if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FiVersion < 3 { return 0 } if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName == uintptr(0) { return 0 } return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName})).f(tls, zName+uintptr(nName)+uintptr(1)) } // Table pTab is a virtual table. If it the virtual table implementation // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116463:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table pMod = Xsqlite3HashFind(tls, db+568, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.azArg */))))) if pMod == uintptr(0) { return } if (*Module)(unsafe.Pointer(pMod)).FpModule == uintptr(0) { return } if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FiVersion < 3 { return } if (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName == uintptr(0) { return } nName = Xsqlite3Strlen30(tls, (*Table)(unsafe.Pointer(pTab)).FzName) for k = (*Hash)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { var pOther uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata if !(int32((*Table)(unsafe.Pointer(pOther)).FeTabType) == TABTYP_NORM) { continue } if (*Table)(unsafe.Pointer(pOther)).FtabFlags&U32(TF_Shadow) != 0 { continue } if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pOther)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, nName) == 0 && int32(*(*int8)(unsafe.Pointer((*Table)(unsafe.Pointer(pOther)).FzName + uintptr(nName)))) == '_' && (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxShadowName})).f(tls, (*Table)(unsafe.Pointer(pOther)).FzName+uintptr(nName)+uintptr(1)) != 0 { *(*U32)(unsafe.Pointer(pOther + 48)) |= U32(TF_Shadow) } } } // Return true if zName is a shadow table name in the current database // connection. // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116499:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') if zTail == uintptr(0) { return 0 } *(*int8)(unsafe.Pointer(zTail)) = int8(0) pTab = Xsqlite3FindTable(tls, db, zName, uintptr(0)) *(*int8)(unsafe.Pointer(zTail)) = int8('_') if pTab == uintptr(0) { return 0 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { return 0 } return Xsqlite3IsShadowTableOf(tls, db, pTab, zName) } // This routine is called to report the final ")" that terminates // a CREATE TABLE statement. // // The table structure that other action routines have been building // is added to the internal hash tables, assuming no errors have // occurred. // // An entry for the table is made in the schema table on disk, unless // this is a temporary table or db->init.busy==1. When db->init.busy==1 // it means we are reading the sqlite_schema table because we just // connected to the database or because the sqlite_schema table has // recently changed, so the entry for this table already exists in // the sqlite_schema table. We do not want to create it again. // // If the pSelect argument is not NULL, it means that this routine // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116560:21: */ bp := tls.Alloc(184) defer tls.Free(184) var p uintptr // The new table var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var iDb int32 // Database in which the table lives var pIdx uintptr // An implied index of the table if pEnd == uintptr(0) && pSelect == uintptr(0) { return } p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if p == uintptr(0) { return } if pSelect == uintptr(0) && Xsqlite3ShadowTableName(tls, db, (*Table)(unsafe.Pointer(p)).FzName) != 0 { *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Shadow) } // If the db->init.busy is 1 it means we are reading the SQL off the // "sqlite_schema" or "sqlite_temp_schema" table on the disk. // So do not write to the disk again. Extract the root page number // for the table from the db->init.newTnum field. (The page number // should have been put there by the sqliteOpenCb routine.) // // If the root page number is 1, that means this is the sqlite_schema // table itself. So mark it read-only. if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { if pSelect != 0 || !(int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM) && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+1524, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum if (*Table)(unsafe.Pointer(p)).Ftnum == Pgno(1) { *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Readonly) } } // Special processing for tables that include the STRICT keyword: // // * Do not allow custom column datatypes. Every column must have // a datatype that is one of INT, INTEGER, REAL, TEXT, or BLOB. // // * If a PRIMARY KEY is defined, other than the INTEGER PRIMARY KEY, // then all columns of the PRIMARY KEY must have a NOT NULL // constraint. if tabOpts&U32(TF_Strict) != 0 { var ii int32 *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_Strict) for ii = 0; ii < int32((*Table)(unsafe.Pointer(p)).FnCol); ii++ { var pCol uintptr = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(ii)*24 if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+14106, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1524))) } else { Xsqlite3ErrorMsg(tls, pParse, ts+14139, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return } else if int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf0>>4) == COLTYPE_ANY { (*Column)(unsafe.Pointer(pCol)).Faffinity = int8(SQLITE_AFF_BLOB) } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 && int32((*Table)(unsafe.Pointer(p)).FiPKey) != ii && int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0) == OE_None { libc.SetBitFieldPtr8Uint32(pCol+8, uint32(OE_Abort), 0, 0xf) *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_HasNotNull) } } } // Special processing for WITHOUT ROWID Tables if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+14166, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { Xsqlite3ErrorMsg(tls, pParse, ts+14216, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) convertToWithoutRowidTable(tls, pParse, p) } iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) // Resolve names in all CHECK constraint expressions. if (*Table)(unsafe.Pointer(p)).FpCheck != 0 { Xsqlite3ResolveSelfReference(tls, pParse, p, NC_IsCheck, uintptr(0), (*Table)(unsafe.Pointer(p)).FpCheck) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { // If errors are seen, delete the CHECK constraints now, else they might // actually be used if PRAGMA writable_schema=ON is set. Xsqlite3ExprListDelete(tls, db, (*Table)(unsafe.Pointer(p)).FpCheck) (*Table)(unsafe.Pointer(p)).FpCheck = uintptr(0) } else { } } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasGenerated) != 0 { var ii int32 var nNG int32 = 0 for ii = 0; ii < int32((*Table)(unsafe.Pointer(p)).FnCol); ii++ { var colFlags U32 = U32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol + uintptr(ii)*24)).FcolFlags) if colFlags&U32(COLFLAG_GENERATED) != U32(0) { var pX uintptr = Xsqlite3ColumnExpr(tls, p, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(ii)*24) if Xsqlite3ResolveSelfReference(tls, pParse, p, NC_GenCol, pX, uintptr(0)) != 0 { // If there are errors in resolving the expression, change the // expression to a NULL. This prevents code generators that operate // on the expression from inserting extra parts into the expression // tree that have been allocated from lookaside memory, which is // illegal in a schema and will lead to errors or heap corruption // when the database connection closes. Xsqlite3ColumnSetExpr(tls, pParse, p, (*Table)(unsafe.Pointer(p)).FaCol+uintptr(ii)*24, Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0)) } } else { nNG++ } } if nNG == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+14248, 0) return } } // Estimate the average row size for the table and for all implied indices estimateTableWidth(tls, p) for pIdx = (*Table)(unsafe.Pointer(p)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { estimateIndexWidth(tls, pIdx) } // If not initializing, then create a record for the new table // in the schema table of the database. // // If this is a TEMPORARY table, write the entry into the auxiliary // file instead of into the main database file. if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { var n int32 var v uintptr var zType uintptr // "view" or "table" var zType2 uintptr // "VIEW" or "TABLE" var zStmt uintptr // Text of the CREATE TABLE or CREATE VIEW statement v = Xsqlite3GetVdbe(tls, pParse) if v == uintptr(0) { return } Xsqlite3VdbeAddOp1(tls, v, OP_Close, 0) // Initialize zType for the new view or table. if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table zType = ts + 10113 /* "table" */ zType2 = ts + 14292 /* "TABLE" */ } else { // A view zType = ts + 11728 /* "view" */ zType2 = ts + 14298 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT // statement to populate the new table. The root-page number for the // new table is in register pParse->regRoot. // // Once the SELECT has been coded by sqlite3Select(), it is in a // suitable state to query for the column names and types to be used // by the new table. // // A shared-cache write-lock is not required to write to the new table, // as a schema-lock must have already been obtained to create it. Since // a schema-lock excludes all other database users, the write-lock would // be redundant. if pSelect != 0 { // var dest SelectDest at bp+144, 40 // Where the SELECT should store results var regYield int32 // Register holding co-routine entry-point var addrTop int32 // Top of the co-routine var regRec int32 // A record to be insert into the new table var regRowid int32 // Rowid of the next row to insert var addrInsLoop int32 // Top of the loop for inserting rows var pSelTab uintptr // A table that describes the SELECT results if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR (*Parse)(unsafe.Pointer(pParse)).FnErr++ return } regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRec = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRowid = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_OpenWrite, 1, (*Parse)(unsafe.Pointer(pParse)).FregRoot, iDb) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_P2ISREG)) (*Parse)(unsafe.Pointer(pParse)).FnTab = 2 addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSelect, int8(SQLITE_AFF_BLOB)) if pSelTab == uintptr(0) { return } (*Table)(unsafe.Pointer(p)).FnCol = libc.AssignPtrInt16(p+56, (*Table)(unsafe.Pointer(pSelTab)).FnCol) (*Table)(unsafe.Pointer(p)).FaCol = (*Table)(unsafe.Pointer(pSelTab)).FaCol (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) Xsqlite3DeleteTable(tls, db, pSelTab) Xsqlite3SelectDestInit(tls, bp+144, SRT_Coroutine, regYield) Xsqlite3Select(tls, pParse, pSelect, bp+144) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } Xsqlite3VdbeEndCoroutine(tls, v, regYield) Xsqlite3VdbeJumpHere(tls, v, addrTop-1) addrInsLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSDParm) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FnSdst, regRec) Xsqlite3TableAffinity(tls, v, p, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 1, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 1, regRec, regRowid) Xsqlite3VdbeGoto(tls, v, addrInsLoop) Xsqlite3VdbeJumpHere(tls, v, addrInsLoop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, 1) } // Compute the complete text of the CREATE statement if pSelect != 0 { zStmt = createTableStmt(tls, db, p) } else { var pEnd2 uintptr if tabOpts != 0 { pEnd2 = pParse + 272 } else { pEnd2 = pEnd } n = int32((int64((*Token)(unsafe.Pointer(pEnd2)).Fz) - int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) / 1) if int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pEnd2)).Fz))) != ';' { n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, ts+14303, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all // the information we've collected. Xsqlite3NestedParse(tls, pParse, ts+14318, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, (*Table)(unsafe.Pointer(p)).FzName, (*Parse)(unsafe.Pointer(pParse)).FregRoot, zStmt, (*Parse)(unsafe.Pointer(pParse)).FregRowid)) Xsqlite3DbFree(tls, db, zStmt) Xsqlite3ChangeCookie(tls, pParse, iDb) // Check to see if we need to create an sqlite_sequence table for // keeping track of autoincrement keys. if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != U32(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, ts+14416, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, Xsqlite3MPrintf(tls, db, ts+14458, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { var pOld uintptr var pSchema uintptr = (*Table)(unsafe.Pointer(p)).FpSchema pOld = Xsqlite3HashInsert(tls, pSchema+8, (*Table)(unsafe.Pointer(p)).FzName, p) if pOld != 0 { // Malloc must have failed inside HashInsert() Xsqlite3OomFault(tls, db) return } (*Parse)(unsafe.Pointer(pParse)).FpNewTable = uintptr(0) *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) // If this is the magic sqlite_sequence table used by autoincrement, // then record a pointer to this table in the main database structure // so that INSERT can find the table easily. if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+10635) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } } if !(pSelect != 0) && int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { if (*Token)(unsafe.Pointer(pCons)).Fz == uintptr(0) { pCons = pEnd } *(*int32)(unsafe.Pointer(p + 64)) = 13 + int32((int64((*Token)(unsafe.Pointer(pCons)).Fz)-int64((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) } } // The parser calls this routine in order to create a new VIEW func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116902:21: */ bp := tls.Alloc(120) defer tls.Free(120) var p uintptr var n int32 var z uintptr // var sEnd Token at bp+104, 16 // var sFix DbFixer at bp+8, 96 // var pName uintptr at bp, 8 var iDb int32 var db uintptr *(*uintptr)(unsafe.Pointer(bp /* pName */)) = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } Xsqlite3ErrorMsg(tls, pParse, ts+14492, 0) goto create_view_fail __1: ; Xsqlite3StartTable(tls, pParse, pName1, pName2, isTemp, 1, 0, noErr) p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if !(p == uintptr(0) || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __2 } goto create_view_fail __2: ; // Legacy versions of SQLite allowed the use of the magic "rowid" column // on a view, even though views do not have rowids. The following flag // setting fixes this problem. But the fix can be disabled by compiling // with -DSQLITE_ALLOW_ROWID_IN_VIEW in case there are legacy apps that // depend upon the old buggy behavior. *(*U32)(unsafe.Pointer(p + 48)) |= U32(TF_NoVisibleRowid) Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) Xsqlite3FixInit(tls, bp+8, pParse, iDb, ts+11728, *(*uintptr)(unsafe.Pointer(bp /* pName */))) if !(Xsqlite3FixSelect(tls, bp+8, pSelect) != 0) { goto __3 } goto create_view_fail __3: ; // Make a copy of the entire SELECT statement that defines the view. // This will force all the Expr.token.z values to be dynamically // allocated rather than point to the input string - which means that // they will persist after the current sqlite3_exec() call returns. *(*U32)(unsafe.Pointer(pSelect + 4)) |= U32(SF_View) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __4 } *(*uintptr)(unsafe.Pointer(p + 64)) = pSelect pSelect = uintptr(0) goto __5 __4: *(*uintptr)(unsafe.Pointer(p + 64)) = Xsqlite3SelectDup(tls, db, pSelect, EXPRDUP_REDUCE) __5: ; (*Table)(unsafe.Pointer(p)).FpCheck = Xsqlite3ExprListDup(tls, db, pCNames, EXPRDUP_REDUCE) (*Table)(unsafe.Pointer(p)).FeTabType = U8(TABTYP_VIEW) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __6 } goto create_view_fail __6: ; // Locate the end of the CREATE VIEW statement. Make sEnd point to // the end. *(*Token)(unsafe.Pointer(bp + 104 /* sEnd */)) = (*Parse)(unsafe.Pointer(pParse)).FsLastToken if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 104)).Fz))) != ';') { goto __7 } *(*uintptr)(unsafe.Pointer(bp + 104)) += uintptr((*Token)(unsafe.Pointer(bp + 104)).Fn) __7: ; (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fn = uint32(0) n = int32((int64((*Token)(unsafe.Pointer(bp+104)).Fz) - int64((*Token)(unsafe.Pointer(pBegin)).Fz)) / 1) z = (*Token)(unsafe.Pointer(pBegin)).Fz __8: if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(n-1))))])&0x01 != 0) { goto __9 } n-- goto __8 __9: ; (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fz = z + uintptr(n-1) (*Token)(unsafe.Pointer(bp + 104 /* &sEnd */)).Fn = uint32(1) // Use sqlite3EndTable() to add the view to the schema table Xsqlite3EndTable(tls, pParse, uintptr(0), bp+104, uint32(0), uintptr(0)) create_view_fail: Xsqlite3SelectDelete(tls, db, pSelect) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __10 } Xsqlite3RenameExprlistUnmap(tls, pParse, pCNames) __10: ; Xsqlite3ExprListDelete(tls, db, pCNames) return } // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:116994:20: */ bp := tls.Alloc(8) defer tls.Free(8) var pSelTab uintptr // A fake table from which we get the result set var pSel uintptr // Copy of the SELECT that implements the view var nErr int32 = 0 // Number of errors encountered var n int32 // Temporarily holds the number of cursors assigned var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection for malloc errors var rc int32 var xAuth Sqlite3_xauth // Saved xAuth pointer if int32((*Table)(unsafe.Pointer(pTable)).FeTabType) == TABTYP_VTAB { (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock++ rc = Xsqlite3VtabCallConnect(tls, pParse, pTable) (*Sqlite3)(unsafe.Pointer(db)).FnSchemaLock-- return rc } // A positive nCol means the columns names for this view are // already known. if int32((*Table)(unsafe.Pointer(pTable)).FnCol) > 0 { return 0 } // A negative nCol is a special marker meaning that we are currently // trying to compute the column names. If we enter this routine with // a negative nCol, it means two or more views form a loop, like this: // // CREATE VIEW one AS SELECT * FROM two; // CREATE VIEW two AS SELECT * FROM one; // // Actually, the error above is now caught prior to reaching this point. // But the following test is still important as it does come up // in the following: // // CREATE TABLE main.ex1(a); // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { Xsqlite3ErrorMsg(tls, pParse, ts+14528, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } // If we get this far, it means we need to compute the table names. // Note that the call to sqlite3ResultSetOfSelect() will expand any // "*" elements in the results set of the view and will assign cursors // to the elements of the FROM clause. But we do not want these changes // to be permanent. So the computation is done on a copy of the SELECT // statement that defines the view. pSel = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 64)), 0) if pSel != 0 { var eParseMode U8 = (*Parse)(unsafe.Pointer(pParse)).FeParseMode (*Parse)(unsafe.Pointer(pParse)).FeParseMode = U8(PARSE_MODE_NORMAL) n = (*Parse)(unsafe.Pointer(pParse)).FnTab Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer(pSel)).FpSrc) (*Table)(unsafe.Pointer(pTable)).FnCol = int16(-1) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) pSelTab = Xsqlite3ResultSetOfSelect(tls, pParse, pSel, int8(SQLITE_AFF_NONE)) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Parse)(unsafe.Pointer(pParse)).FnTab = n if pSelTab == uintptr(0) { (*Table)(unsafe.Pointer(pTable)).FnCol = int16(0) nErr++ } else if (*Table)(unsafe.Pointer(pTable)).FpCheck != 0 { // CREATE VIEW name(arglist) AS ... // The names of the columns in the table are taken from // arglist which is stored in pTable->pCheck. The pCheck field // normally holds CHECK constraints on an ordinary table, but for // a VIEW it holds the list of column names. Xsqlite3ColumnsFromExprList(tls, pParse, (*Table)(unsafe.Pointer(pTable)).FpCheck, pTable+54, pTable+8) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Table)(unsafe.Pointer(pTable)).FnCol) == (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr { Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTable, pSel, int8(SQLITE_AFF_NONE)) } } else { // CREATE VIEW name AS... without an argument list. Construct // the column names from the SELECT statement that defines the view. (*Table)(unsafe.Pointer(pTable)).FnCol = (*Table)(unsafe.Pointer(pSelTab)).FnCol (*Table)(unsafe.Pointer(pTable)).FaCol = (*Table)(unsafe.Pointer(pSelTab)).FaCol *(*U32)(unsafe.Pointer(pTable + 48)) |= (*Table)(unsafe.Pointer(pSelTab)).FtabFlags & U32(COLFLAG_NOINSERT) (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) } (*Table)(unsafe.Pointer(pTable)).FnNVCol = (*Table)(unsafe.Pointer(pTable)).FnCol Xsqlite3DeleteTable(tls, db, pSelTab) Xsqlite3SelectDelete(tls, db, pSel) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { return uint16(0) } return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue }() (*Parse)(unsafe.Pointer(pParse)).FeParseMode = eParseMode } else { nErr++ } *(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FpSchema + 114)) |= U16(DB_UnresetViews) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3DeleteColumnNames(tls, db, pTable) } return nErr } // Clear the column names from every VIEW in database idx. func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117122:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { return } for i = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema + 8)).Ffirst; i != 0; i = (*HashElem)(unsafe.Pointer(i)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(i)).Fdata if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { Xsqlite3DeleteColumnNames(tls, db, pTab) } } *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*32)).FpSchema + 114)) &= libc.Uint16FromInt32(libc.CplInt32(DB_UnresetViews)) } // This function is called by the VDBE to adjust the internal schema // used by SQLite when the btree layer moves a table root page. The // root-page of a table or index in database iDb has changed from iFrom // to iTo. // // Ticket #1728: The symbol table might still contain information // on tables and/or indices that are the process of being deleted. // If you are unlucky, one of those deleted indices or tables might // have the same rootpage number as the real table or index that is // being moved. So we cannot stop searching after the first match // because the first match might be for one of the deleted indices // or tables and not the table/index that is actually being moved. // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117156:21: */ var pElem uintptr var pHash uintptr var pDb uintptr pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 pHash = (*Db)(unsafe.Pointer(pDb)).FpSchema + 8 for pElem = (*Hash)(unsafe.Pointer(pHash)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata if (*Table)(unsafe.Pointer(pTab)).Ftnum == iFrom { (*Table)(unsafe.Pointer(pTab)).Ftnum = iTo } } pHash = (*Db)(unsafe.Pointer(pDb)).FpSchema + 32 for pElem = (*Hash)(unsafe.Pointer(pHash)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pIdx uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata if (*Index)(unsafe.Pointer(pIdx)).Ftnum == iFrom { (*Index)(unsafe.Pointer(pIdx)).Ftnum = iTo } } } // Write code to erase the table with root-page iTable from database iDb. // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117186:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { Xsqlite3ErrorMsg(tls, pParse, ts+14558, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) // OP_Destroy stores an in integer r1. If this integer // is non-zero, then it is the root page number of a table moved to // location iTable. The following code modifies the sqlite_schema table to // reflect this. // // The "#NNN" in the SQL is a special constant that means whatever value // is in register NNN. See grammar rules associated with the TK_REGISTER // token for additional information. Xsqlite3NestedParse(tls, pParse, ts+14573, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*32)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } // Write VDBE code to erase table pTab and all associated indices on disk. // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117216:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically // largest root-page number. This guarantees that none of the root-pages // to be destroyed is relocated by an earlier OP_Destroy. i.e. if the // following were coded: // // OP_Destroy 4 0 // ... // OP_Destroy 5 0 // // and root page 5 happened to be the largest root-page number in the // database, then root page 5 would be moved to page 4 by the // "OP_Destroy 4 0" opcode. The subsequent "OP_Destroy 5 0" would hit // a free-list page. var iTab Pgno = (*Table)(unsafe.Pointer(pTab)).Ftnum var iDestroyed Pgno = Pgno(0) for 1 != 0 { var pIdx uintptr var iLargest Pgno = Pgno(0) if iDestroyed == Pgno(0) || iTab < iDestroyed { iLargest = iTab } for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { var iIdx Pgno = (*Index)(unsafe.Pointer(pIdx)).Ftnum if (iDestroyed == Pgno(0) || iIdx < iDestroyed) && iIdx > iLargest { iLargest = iIdx } } if iLargest == Pgno(0) { return } else { var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) destroyRootPage(tls, pParse, int32(iLargest), iDb) iDestroyed = iLargest } } } // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117265:13: */ bp := tls.Alloc(64) defer tls.Free(64) var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+14640, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, ts+12537, libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117288:21: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTrigger uintptr var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 v = Xsqlite3GetVdbe(tls, pParse) Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { Xsqlite3VdbeAddOp0(tls, v, OP_VBegin) } // Drop all triggers associated with the table being dropped. Code // is generated to remove entries from sqlite_schema and/or // sqlite_temp_schema if required. pTrigger = Xsqlite3TriggerList(tls, pParse, pTab) for pTrigger != 0 { Xsqlite3DropTriggerPtr(tls, pParse, pTrigger) pTrigger = (*Trigger)(unsafe.Pointer(pTrigger)).FpNext } // Remove any entries of the sqlite_sequence table associated with // the table being dropped. This is done before the table is dropped // at the btree level, in case the sqlite_sequence table needs to // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, ts+14654, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } // Drop all entries in the schema table that refer to the // table. The program name loops through the schema table and deletes // every row that refers to a table of the same name as the one being // dropped. Triggers are handled separately because a trigger can be // created in the temp database that refers to a table in another // database. Xsqlite3NestedParse(tls, pParse, ts+14699, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) } // Remove the table entry from SQLite's internal schema and modify // the schema cookie. if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { Xsqlite3VdbeAddOp4(tls, v, OP_VDestroy, iDb, 0, 0, (*Table)(unsafe.Pointer(pTab)).FzName, 0) Xsqlite3MayAbort(tls, pParse) } Xsqlite3VdbeAddOp4(tls, v, OP_DropTable, iDb, 0, 0, (*Table)(unsafe.Pointer(pTab)).FzName, 0) Xsqlite3ChangeCookie(tls, pParse, iDb) sqliteViewResetAll(tls, db, iDb) } // Return TRUE if shadow tables should be read-only in the current // context. func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117361:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && !((*Sqlite3)(unsafe.Pointer(db)).FnVTrans > 0 && (*Sqlite3)(unsafe.Pointer(db)).FaVTrans == uintptr(0)) { return 1 } return 0 } // Return true if it is not allowed to drop the given table func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117377:12: */ if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9371, 7) == 0 { if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+14766, 4) == 0 { return 0 } if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+8367, 10) == 0 { return 0 } return 1 } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && Xsqlite3ReadOnlyShadowTables(tls, db) != 0 { return 1 } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != 0 { return 1 } return 0 } // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117396:21: */ bp := tls.Alloc(24) defer tls.Free(24) var pTab uintptr var v uintptr var db uintptr var iDb int32 var code int32 var zTab uintptr var zDb uintptr var zArg2 uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } goto exit_drop_table __1: ; if !(Xsqlite3ReadSchema(tls, pParse) != 0) { goto __2 } goto exit_drop_table __2: ; if !(noErr != 0) { goto __3 } (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr++ __3: ; pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(isView), pName+8) if !(noErr != 0) { goto __4 } (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr-- __4: ; if !(pTab == uintptr(0)) { goto __5 } if !(noErr != 0) { goto __6 } Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) sqlite3ForceNotReadOnly(tls, pParse) __6: ; goto exit_drop_table __5: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) // If pTab is a virtual table, call ViewGetColumnNames() to ensure // it is initialized. if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB && Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { goto __7 } goto exit_drop_table __7: ; zTab = func() uintptr { if !(0 != 0) && iDb == 1 { return ts + 13385 } return ts + 7196 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zArg2 = uintptr(0) if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __8 } goto exit_drop_table __8: ; if !(isView != 0) { goto __9 } if !(!(0 != 0) && iDb == 1) { goto __11 } code = SQLITE_DROP_TEMP_VIEW goto __12 __11: code = SQLITE_DROP_VIEW __12: ; goto __10 __9: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __13 } code = SQLITE_DROP_VTABLE zArg2 = (*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, db, pTab))).FpMod)).FzName goto __14 __13: if !(!(0 != 0) && iDb == 1) { goto __15 } code = SQLITE_DROP_TEMP_TABLE goto __16 __15: code = SQLITE_DROP_TABLE __16: ; __14: ; __10: ; if !(Xsqlite3AuthCheck(tls, pParse, code, (*Table)(unsafe.Pointer(pTab)).FzName, zArg2, zDb) != 0) { goto __17 } goto exit_drop_table __17: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), zDb) != 0) { goto __18 } goto exit_drop_table __18: ; if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } Xsqlite3ErrorMsg(tls, pParse, ts+14771, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; // Ensure DROP TABLE is not used on a view, and DROP VIEW is not used // on a table. if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } Xsqlite3ErrorMsg(tls, pParse, ts+14799, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } Xsqlite3ErrorMsg(tls, pParse, ts+14833, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; // Generate code to remove the table from the schema table // on disk. v = Xsqlite3GetVdbe(tls, pParse) if !(v != 0) { goto __22 } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) if !!(isView != 0) { goto __23 } sqlite3ClearStatTables(tls, pParse, iDb, ts+12729, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; Xsqlite3CodeDropTable(tls, pParse, pTab, iDb, isView) __22: ; exit_drop_table: Xsqlite3SrcListDelete(tls, db, pName) } // This routine is called to create a new foreign key on the table // currently under construction. pFromCol determines which columns // in the current table point to the foreign key. If pFromCol==0 then // connect the key to the last column inserted. pTo is the name of // the table referred to (a.k.a the "parent" table). pToCol is a list // of tables in the parent pTo table. flags contains all // information about the conflict resolution algorithms specified // in the ON DELETE, ON UPDATE and ON INSERT clauses. // // An FKey structure is created and added to the table currently // under construction in the pParse->pNewTable field. // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117516:21: */ bp := tls.Alloc(24) defer tls.Free(24) var db uintptr var pFKey uintptr var pNextTo uintptr var p uintptr var nByte I64 var i int32 var nCol int32 var z uintptr var iCol int32 var j int32 var n int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb pFKey = uintptr(0) p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if !(p == uintptr(0) || int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __1 } goto fk_end __1: ; if !(pFromCol == uintptr(0)) { goto __2 } iCol = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 if !(iCol < 0) { goto __4 } goto fk_end __4: ; if !(pToCol != 0 && (*ExprList)(unsafe.Pointer(pToCol)).FnExpr != 1) { goto __5 } Xsqlite3ErrorMsg(tls, pParse, ts+14865, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*24)).FzCnName, pTo)) goto fk_end __5: ; nCol = 1 goto __3 __2: if !(pToCol != 0 && (*ExprList)(unsafe.Pointer(pToCol)).FnExpr != (*ExprList)(unsafe.Pointer(pFromCol)).FnExpr) { goto __6 } Xsqlite3ErrorMsg(tls, pParse, ts+14928, 0) goto fk_end goto __7 __6: nCol = (*ExprList)(unsafe.Pointer(pFromCol)).FnExpr __7: ; __3: ; nByte = I64(uint64(unsafe.Sizeof(FKey{})) + uint64(nCol-1)*uint64(unsafe.Sizeof(sColMap{})) + uint64((*Token)(unsafe.Pointer(pTo)).Fn) + uint64(1)) if !(pToCol != 0) { goto __8 } i = 0 __9: if !(i < (*ExprList)(unsafe.Pointer(pToCol)).FnExpr) { goto __11 } nByte = nByte + I64(Xsqlite3Strlen30(tls, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName)+1) goto __10 __10: i++ goto __9 goto __11 __11: ; __8: ; pFKey = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if !(pFKey == uintptr(0)) { goto __12 } goto fk_end __12: ; (*FKey)(unsafe.Pointer(pFKey)).FpFrom = p (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom = *(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.pFKey */)) z = pFKey + 64 + uintptr(nCol)*16 (*FKey)(unsafe.Pointer(pFKey)).FzTo = z if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __13 } Xsqlite3RenameTokenMap(tls, pParse, z, pTo) __13: ; libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(pTo)).Fz, uint64((*Token)(unsafe.Pointer(pTo)).Fn)) *(*int8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(pTo)).Fn))) = int8(0) Xsqlite3Dequote(tls, z) z += uintptr((*Token)(unsafe.Pointer(pTo)).Fn + uint32(1)) (*FKey)(unsafe.Pointer(pFKey)).FnCol = nCol if !(pFromCol == uintptr(0)) { goto __14 } (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom = int32((*Table)(unsafe.Pointer(p)).FnCol) - 1 goto __15 __14: i = 0 __16: if !(i < nCol) { goto __18 } j = 0 __19: if !(j < int32((*Table)(unsafe.Pointer(p)).FnCol)) { goto __21 } if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(j)*24)).FzCnName, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName) == 0) { goto __22 } (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom = j goto __21 __22: ; goto __20 __20: j++ goto __19 goto __21 __21: ; if !(j >= int32((*Table)(unsafe.Pointer(p)).FnCol)) { goto __23 } Xsqlite3ErrorMsg(tls, pParse, ts+15022, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName)) goto fk_end __23: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __24 } Xsqlite3RenameTokenRemap(tls, pParse, pFKey+64+uintptr(i)*16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*32)).FzEName) __24: ; goto __17 __17: i++ goto __16 goto __18 __18: ; __15: ; if !(pToCol != 0) { goto __25 } i = 0 __26: if !(i < nCol) { goto __28 } n = Xsqlite3Strlen30(tls, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName) (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FzCol = z if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __29 } Xsqlite3RenameTokenRemap(tls, pParse, z, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName) __29: ; libc.Xmemcpy(tls, z, (*ExprList_item)(unsafe.Pointer(pToCol+8+uintptr(i)*32)).FzEName, uint64(n)) *(*int8)(unsafe.Pointer(z + uintptr(n))) = int8(0) z += uintptr(n + 1) goto __27 __27: i++ goto __26 goto __28 __28: ; __25: ; (*FKey)(unsafe.Pointer(pFKey)).FisDeferred = U8(0) *(*U8)(unsafe.Pointer(pFKey + 45)) = U8(flags & 0xff) // ON DELETE action *(*U8)(unsafe.Pointer(pFKey + 45 + 1)) = U8(flags >> 8 & 0xff) // ON UPDATE action pNextTo = Xsqlite3HashInsert(tls, (*Table)(unsafe.Pointer(p)).FpSchema+80, (*FKey)(unsafe.Pointer(pFKey)).FzTo, pFKey) if !(pNextTo == pFKey) { goto __30 } Xsqlite3OomFault(tls, db) goto fk_end __30: ; if !(pNextTo != 0) { goto __31 } (*FKey)(unsafe.Pointer(pFKey)).FpNextTo = pNextTo (*FKey)(unsafe.Pointer(pNextTo)).FpPrevTo = pFKey __31: ; // Link the foreign key to the table as the last step. *(*uintptr)(unsafe.Pointer(p + 64 + 8 /* &.pFKey */)) = pFKey pFKey = uintptr(0) fk_end: Xsqlite3DbFree(tls, db, pFKey) Xsqlite3ExprListDelete(tls, db, pFromCol) Xsqlite3ExprListDelete(tls, db, pToCol) } // This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED // clause is seen as part of a foreign key definition. The isDeferred // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117648:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { return } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } if libc.AssignUintptr(&pFKey, *(*uintptr)(unsafe.Pointer(pTab + 64 + 8))) == uintptr(0) { return } // EV: R-30323-21917 (*FKey)(unsafe.Pointer(pFKey)).FisDeferred = U8(isDeferred) } // Generate code that will erase and refill index *pIdx. This is // used to initialize a newly created index or to recompute the // content of an index in response to a REINDEX command. // // if memRootPage is not negative, it means that the index is newly // created. The register specified by memRootPage contains the // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117671:13: */ bp := tls.Alloc(4) defer tls.Free(4) var pTab uintptr = (*Index)(unsafe.Pointer(pIndex)).FpTable // The table that is indexed var iTab int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Btree cursor used for pTab var iIdx int32 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) // Btree cursor used for pIndex var iSorter int32 // Cursor opened by OpenSorter (if in use) var addr1 int32 // Address of top of loop var addr2 int32 // Address to jump to for next iteration var tnum Pgno // Root page of index // var iPartIdxLabel int32 at bp, 4 // Jump to this label to skip a row var v uintptr // Generate code into this virtual machine var pKey uintptr // KeyInfo for index var regRecord int32 // Register holding assembled index record var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIndex)).FpSchema) if Xsqlite3AuthCheck(tls, pParse, SQLITE_REINDEX, (*Index)(unsafe.Pointer(pIndex)).FzName, uintptr(0), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0 { return } // Require a write-lock on the table to perform this operation Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pTab)).FzName) v = Xsqlite3GetVdbe(tls, pParse) if v == uintptr(0) { return } if memRootPage >= 0 { tnum = Pgno(memRootPage) } else { tnum = (*Index)(unsafe.Pointer(pIndex)).Ftnum } pKey = Xsqlite3KeyInfoOfIndex(tls, pParse, pIndex) // Open the sorter cursor if we are to use one. iSorter = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) Xsqlite3VdbeAddOp4(tls, v, OP_SorterOpen, iSorter, 0, int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol), Xsqlite3KeyInfoRef(tls, pKey), -9) // Open the table. Loop through all rows of the table, inserting index // records into the sorter. Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iTab, 0) regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3MultiWrite(tls, pParse) Xsqlite3GenerateIndexKey(tls, pParse, pIndex, iTab, regRecord, 0, bp, uintptr(0), 0) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, iSorter, regRecord) Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp /* iPartIdxLabel */))) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr1+1) Xsqlite3VdbeJumpHere(tls, v, addr1) if memRootPage < 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(tnum), iDb) } Xsqlite3VdbeAddOp4(tls, v, OP_OpenWrite, iIdx, int32(tnum), iDb, pKey, -9) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_BULKCSR|func() int32 { if memRootPage >= 0 { return OPFLAG_P2ISREG } return 0 }())) addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, iSorter, 0) if int32((*Index)(unsafe.Pointer(pIndex)).FonError) != OE_None { var j2 int32 = Xsqlite3VdbeGoto(tls, v, 1) addr2 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp4Int(tls, v, OP_SorterCompare, iSorter, j2, regRecord, int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) Xsqlite3UniqueConstraint(tls, pParse, OE_Abort, pIndex) Xsqlite3VdbeJumpHere(tls, v, j2) } else { // Most CREATE INDEX and REINDEX statements that are not UNIQUE can not // abort. The exception is if one of the indexed expressions contains a // user function that throws an exception when it is evaluated. But the // overhead of adding a statement journal to a CREATE INDEX statement is // very small (since most of the pages written do not contain content that // needs to be restored if the statement aborts), so we call // sqlite3MayAbort() for all CREATE INDEX statements. Xsqlite3MayAbort(tls, pParse) addr2 = Xsqlite3VdbeCurrentAddr(tls, v) } Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, iSorter, regRecord, iIdx) if !(int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x200>>9) != 0) { // This OP_SeekEnd opcode makes index insert for a REINDEX go much // faster by avoiding unnecessary seeks. But the optimization does // not work for UNIQUE constraint indexes on WITHOUT ROWID tables // with DESC primary keys, since those indexes have there keys in // a different order from the main table. // See ticket: https://www.sqlite.org/src/info/bba7b69f9849b5bf Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iIdx) } Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iIdx, regRecord) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3ReleaseTempReg(tls, pParse, regRecord) Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, iSorter, addr2) Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTab) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iIdx) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iSorter) } // Allocate heap space to hold an Index object with nCol columns. // // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117777:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays nByte = int32((uint64(unsafe.Sizeof(Index{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + (uint64(unsafe.Sizeof(uintptr(0)))*uint64(nCol)+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7)) + (uint64(unsafe.Sizeof(LogEst(0)))*uint64(int32(nCol)+1)+uint64(unsafe.Sizeof(I16(0)))*uint64(nCol)+uint64(unsafe.Sizeof(U8(0)))*uint64(nCol)+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) // Index.aSortOrder p = Xsqlite3DbMallocZero(tls, db, uint64(nByte+nExtra)) if p != 0 { var pExtra uintptr = p + uintptr((uint64(unsafe.Sizeof(Index{}))+uint64(7))&libc.Uint64FromInt32(libc.CplInt32(7))) (*Index)(unsafe.Pointer(p)).FazColl = pExtra pExtra += uintptr((uint64(unsafe.Sizeof(uintptr(0)))*uint64(nCol) + uint64(7)) & libc.Uint64FromInt32(libc.CplInt32(7))) (*Index)(unsafe.Pointer(p)).FaiRowLogEst = pExtra pExtra += uintptr(uint64(unsafe.Sizeof(LogEst(0))) * uint64(int32(nCol)+1)) (*Index)(unsafe.Pointer(p)).FaiColumn = pExtra pExtra += uintptr(uint64(unsafe.Sizeof(I16(0))) * uint64(nCol)) (*Index)(unsafe.Pointer(p)).FaSortOrder = pExtra (*Index)(unsafe.Pointer(p)).FnColumn = U16(nCol) (*Index)(unsafe.Pointer(p)).FnKeyCol = U16(int32(nCol) - 1) *(*uintptr)(unsafe.Pointer(ppExtra)) = p + uintptr(nByte) } return p } // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117810:20: */ bp := tls.Alloc(8) defer tls.Free(8) if pList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*32 + 20))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FsortFlags Xsqlite3ErrorMsg(tls, pParse, ts+15068, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { return ts + 15096 /* "FIRST" */ } return ts + 15102 /* "LAST" */ }())) return 1 } } } return 0 } // Create a new index for an SQL table. pName1.pName2 is the name of the index // and pTblList is the name of the table that is to be indexed. Both will // be NULL for a primary key or an index that is created to satisfy a // UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable // as the table to be indexed. pParse->pNewTable is a table that is // currently being constructed by a CREATE TABLE statement. // // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:117838:21: */ bp := tls.Alloc(256) defer tls.Free(256) var pTab uintptr // Table to be indexed var pIndex uintptr // The index to be created var zName uintptr // Name of the index var nName int32 // Number of characters in zName var i int32 var j int32 // var sFix DbFixer at bp+136, 96 // For assigning database names to pTable var sortOrderMask int32 // 1 to honor DESC in index. 0 to ignore. var db uintptr var pDb uintptr // The specific table containing the indexed database var iDb int32 // Index of the database that is being written // var pName uintptr at bp+128, 8 // Unqualified name of the index to create var pListItem uintptr // For looping over pList var nExtra int32 // Space allocated for zExtra[] var nExtraCol int32 // Number of extra columns needed // var zExtra uintptr at bp+248, 8 // Extra space after the Index object var pPk uintptr var n int32 var pLoop uintptr var zDb uintptr // var prevCol Token at bp+232, 16 var pCol uintptr var pExpr uintptr var nColl int32 var pCExpr uintptr // The i-th index expression var requestedSortOrder int32 // ASC or DESC on the i-th expression var zColl uintptr var x int32 var z1 uintptr var z2 uintptr var k int32 // This routine has been called to create an automatic index as a // result of a PRIMARY KEY or UNIQUE clause on a column definition, or // a PRIMARY KEY or UNIQUE clause following the column definitions. // i.e. one of: // // CREATE TABLE t(x PRIMARY KEY, y); // CREATE TABLE t(x, y, UNIQUE(x, y)); // // Either way, check to see if the table already has such an index. If // so, don't bother creating this one. This only applies to // automatically created indices. Users can do as they wish with // explicit indices. // // Two UNIQUE or PRIMARY KEY constraints are considered equivalent // (and thus suppressing the second one) even if they have different // sort orders. // // If there are different collating sequences or if the columns of // the constraint occur in different orders, then the constraints are // considered distinct and both result in separate indices. var pIdx uintptr var p uintptr var n1 int32 var v uintptr var zStmt uintptr var iMem int32 var pNext uintptr // Ensure all REPLACE indexes on pTab are at the end of the pIndex list. // The list was already ordered when this routine was entered, so at this // point at most a single index (the newly added index) will be out of // order. So we have to reorder at most one index. var ppFrom uintptr var pThis uintptr pTab = uintptr(0) pIndex = uintptr(0) zName = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)) = uintptr(0) nExtra = 0 *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) = uintptr(0) pPk = uintptr(0) // PRIMARY KEY index for WITHOUT ROWID tables if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __1 } goto exit_create_index __1: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB && int32(idxType) != SQLITE_IDXTYPE_PRIMARYKEY) { goto __2 } goto exit_create_index __2: ; if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { goto __3 } goto exit_create_index __3: ; if !(Xsqlite3HasExplicitNulls(tls, pParse, pList) != 0) { goto __4 } goto exit_create_index __4: ; // Find the table that is to be indexed. Return early if not found. if !(pTblName != uintptr(0)) { goto __5 } // Use the two-part index name to determine the database // to search for the table. 'Fix' the table name to this db // before looking up the table. iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+128) if !(iDb < 0) { goto __7 } goto exit_create_index __7: ; // If the index name was unqualified, check if the table // is a temp table. If so, set the database to 1. Do not do this // if initialising a database schema. if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __8 } pTab = Xsqlite3SrcListLookup(tls, pParse, pTblName) if !((*Token)(unsafe.Pointer(pName2)).Fn == uint32(0) && pTab != 0 && (*Table)(unsafe.Pointer(pTab)).FpSchema == (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) { goto __9 } iDb = 1 __9: ; __8: ; Xsqlite3FixInit(tls, bp+136, pParse, iDb, ts+15107, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+136, pTblName) != 0) { goto __10 } // Because the parser constructs pTblName from a single identifier, // sqlite3FixSrcList can never fail. __10: ; pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pTblName+8) if !(pTab == uintptr(0)) { goto __11 } goto exit_create_index __11: ; if !(iDb == 1 && (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema != (*Table)(unsafe.Pointer(pTab)).FpSchema) { goto __12 } Xsqlite3ErrorMsg(tls, pParse, ts+15113, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: ; if !!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __13 } pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) __13: ; goto __6 __5: ; pTab = (*Parse)(unsafe.Pointer(pParse)).FpNewTable if !!(pTab != 0) { goto __14 } goto exit_create_index __14: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+9371, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } Xsqlite3ErrorMsg(tls, pParse, ts+15163, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } Xsqlite3ErrorMsg(tls, pParse, ts+15191, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } Xsqlite3ErrorMsg(tls, pParse, ts+15216, 0) goto exit_create_index __17: ; // Find the name of the index. Make sure there is not already another // index or table with the same name. // // Exception: If we are reading the names of permanent indices from the // sqlite_schema table (because some other process changed the schema) and // one of the index names collides with the name of a temporary table or // index, then we will continue to process this index. // // If pName==0 it means that we are // dealing with a primary key or UNIQUE constraint. We have to invent our // own name. if !(*(*uintptr)(unsafe.Pointer(bp + 128)) != 0) { goto __18 } zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(zName == uintptr(0)) { goto __20 } goto exit_create_index __20: ; if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+15107, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index __21: ; if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __22 } if !!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { goto __23 } if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } Xsqlite3ErrorMsg(tls, pParse, ts+15250, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; __23: ; if !(Xsqlite3FindIndex(tls, db, zName, (*Db)(unsafe.Pointer(pDb)).FzDbSName) != uintptr(0)) { goto __25 } if !!(ifNotExist != 0) { goto __26 } Xsqlite3ErrorMsg(tls, pParse, ts+15284, libc.VaList(bp+24, zName)) goto __27 __26: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) sqlite3ForceNotReadOnly(tls, pParse) __27: ; goto exit_create_index __25: ; __22: ; goto __19 __18: pLoop = (*Table)(unsafe.Pointer(pTab)).FpIndex n = 1 __28: if !(pLoop != 0) { goto __30 } goto __29 __29: pLoop = (*Index)(unsafe.Pointer(pLoop)).FpNext n++ goto __28 goto __30 __30: ; zName = Xsqlite3MPrintf(tls, db, ts+15308, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } goto exit_create_index __31: ; // Automatic index names generated from within sqlite3_declare_vtab() // must have names that are distinct from normal automatic index names. // The following statement converts "sqlite3_autoindex..." into // "sqlite3_butoindex..." in order to make the names distinct. // The "vtab_err.test" test demonstrates the need of this statement. if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_NORMAL) { goto __32 } *(*int8)(unsafe.Pointer(zName + 7))++ __32: ; __19: ; // Check for authorization to create an index. if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __33 } zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { return ts + 13385 } return ts + 7196 }(), uintptr(0), zDb) != 0) { goto __34 } goto exit_create_index __34: ; i = SQLITE_CREATE_INDEX if !(!(0 != 0) && iDb == 1) { goto __35 } i = SQLITE_CREATE_TEMP_INDEX __35: ; if !(Xsqlite3AuthCheck(tls, pParse, i, zName, (*Table)(unsafe.Pointer(pTab)).FzName, zDb) != 0) { goto __36 } goto exit_create_index __36: ; __33: ; // If pList==0, it means this routine was called to make a primary // key out of the last column added to the table under construction. // So create a fake list to simulate this. if !(pList == uintptr(0)) { goto __37 } pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1)*24 *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_UNIQUE) Xsqlite3TokenInit(tls, bp+232, (*Column)(unsafe.Pointer(pCol)).FzCnName) pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+232, 0)) if !(pList == uintptr(0)) { goto __39 } goto exit_create_index __39: ; Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+15107) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } goto exit_create_index __40: ; __38: ; // Figure out how many bytes of space are required to store explicitly // specified collation sequence names. i = 0 __41: if !(i < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { goto __43 } pExpr = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLLATE) { goto __44 } nExtra = nExtra + (1 + Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) __44: ; goto __42 __42: i++ goto __41 goto __43 __43: ; // Allocate the index structure. nName = Xsqlite3Strlen30(tls, zName) if pPk != 0 { nExtraCol = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) } else { nExtraCol = 1 } pIndex = Xsqlite3AllocateIndexObject(tls, db, int16((*ExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol), nName+nExtra+1, bp+248) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __45 } goto exit_create_index __45: ; (*Index)(unsafe.Pointer(pIndex)).FzName = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += uintptr(nName + 1) libc.Xmemcpy(tls, (*Index)(unsafe.Pointer(pIndex)).FzName, zName, uint64(nName+1)) (*Index)(unsafe.Pointer(pIndex)).FpTable = pTab (*Index)(unsafe.Pointer(pIndex)).FonError = U8(onError) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(libc.Bool32(onError != OE_None)), 3, 0x8) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(idxType), 0, 0x3) (*Index)(unsafe.Pointer(pIndex)).FpSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema (*Index)(unsafe.Pointer(pIndex)).FnKeyCol = U16((*ExprList)(unsafe.Pointer(pList)).FnExpr) if !(pPIWhere != 0) { goto __46 } Xsqlite3ResolveSelfReference(tls, pParse, pTab, NC_PartIdx, pPIWhere, uintptr(0)) (*Index)(unsafe.Pointer(pIndex)).FpPartIdxWhere = pPIWhere pPIWhere = uintptr(0) __46: ; // Check to see if we should honor DESC requests on index columns if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) >= 4) { goto __47 } sortOrderMask = -1 // Honor DESC goto __48 __47: sortOrderMask = 0 // Ignore DESC __48: ; // Analyze the list of expressions that form the terms of the index and // report any errors. In the common case where the expression is exactly // a table column, store that column in aiColumn[]. For general expressions, // populate pIndex->aColExpr and store XN_EXPR (-2) in aiColumn[]. // // TODO: Issue a warning if two or more columns of the index are identical. // TODO: Issue a warning if the table primary key is used as part of the // index key. pListItem = pList + 8 /* &.a */ if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __49 } (*Index)(unsafe.Pointer(pIndex)).FaColExpr = pList pList = uintptr(0) __49: ; i = 0 __50: if !(i < int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) { goto __52 } // Collation sequence name sqlite3StringToId(tls, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr) Xsqlite3ResolveSelfReference(tls, pParse, pTab, NC_IdxExpr, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr, uintptr(0)) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __53 } goto exit_create_index __53: ; pCExpr = Xsqlite3ExprSkipCollate(tls, (*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr) if !(int32((*Expr)(unsafe.Pointer(pCExpr)).Fop) != TK_COLUMN) { goto __54 } if !(pTab == (*Parse)(unsafe.Pointer(pParse)).FpNewTable) { goto __56 } Xsqlite3ErrorMsg(tls, pParse, ts+15331, 0) goto exit_create_index __56: ; if !((*Index)(unsafe.Pointer(pIndex)).FaColExpr == uintptr(0)) { goto __57 } (*Index)(unsafe.Pointer(pIndex)).FaColExpr = pList pList = uintptr(0) __57: ; j = -2 *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-2) libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) goto __55 __54: j = int32((*Expr)(unsafe.Pointer(pCExpr)).FiColumn) if !(j < 0) { goto __58 } j = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) goto __59 __58: if !(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*24 + 8))&0xf>>0) == 0) { goto __60 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 3, 0x8) __60: ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0) { goto __61 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 10, 0x400) __61: ; __59: ; *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = I16(j) __55: ; zColl = uintptr(0) if !(int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr)).Fop) == TK_COLLATE) { goto __62 } zColl = *(*uintptr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr + 8)) nColl = Xsqlite3Strlen30(tls, zColl) + 1 libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)), zColl, uint64(nColl)) zColl = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += uintptr(nColl) nExtra = nExtra - nColl goto __63 __62: if !(j >= 0) { goto __64 } zColl = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24) __64: ; __63: ; if !!(zColl != 0) { goto __65 } zColl = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) __65: ; if !(!(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) && !(Xsqlite3LocateCollSeq(tls, pParse, zColl) != 0)) { goto __66 } goto exit_create_index __66: ; *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = zColl requestedSortOrder = int32((*ExprList_item)(unsafe.Pointer(pListItem)).FsortFlags) & sortOrderMask *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaSortOrder + uintptr(i))) = U8(requestedSortOrder) goto __51 __51: i++ pListItem += 32 goto __50 goto __52 __52: ; // Append the table key to the end of the index. For WITHOUT ROWID // tables (when pPk!=0) this will be the declared PRIMARY KEY. For // normal tables (when pPk==0) this will be the rowid. if !(pPk != 0) { goto __67 } j = 0 __69: if !(j < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)) { goto __71 } x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(j)*2))) if !(isDupColumn(tls, pIndex, int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol), pPk, j) != 0) { goto __72 } (*Index)(unsafe.Pointer(pIndex)).FnColumn-- goto __73 __72: ; *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = I16(x) *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(j)*8)) *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaSortOrder + uintptr(i))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaSortOrder + uintptr(j))) i++ __73: ; goto __70 __70: j++ goto __69 goto __71 __71: ; goto __68 __67: *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2)) = int16(-1) *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) __68: ; Xsqlite3DefaultRowEst(tls, pIndex) if !((*Parse)(unsafe.Pointer(pParse)).FpNewTable == uintptr(0)) { goto __74 } estimateIndexWidth(tls, pIndex) __74: ; // If this index contains every column of its table, then mark // it as a covering index recomputeColumnsNotIndexed(tls, pIndex) if !(pTblName != uintptr(0) && int32((*Index)(unsafe.Pointer(pIndex)).FnColumn) >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __75 } libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(1), 5, 0x20) j = 0 __76: if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __78 } if !(j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { goto __79 } goto __77 __79: ; if !(int32(Xsqlite3TableColumnToIndex(tls, pIndex, int16(j))) >= 0) { goto __80 } goto __77 __80: ; libc.SetBitFieldPtr16Uint32(pIndex+100, uint32(0), 5, 0x20) goto __78 goto __77 __77: j++ goto __76 goto __78 __78: ; __75: ; if !(pTab == (*Parse)(unsafe.Pointer(pParse)).FpNewTable) { goto __81 } pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __82: if !(pIdx != 0) { goto __84 } if !(int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pIndex)).FnKeyCol)) { goto __85 } goto __83 __85: ; k = 0 __86: if !(k < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { goto __88 } if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(k)*2))) != int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(k)*2)))) { goto __89 } goto __88 __89: ; z1 = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(k)*8)) z2 = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(k)*8)) if !(Xsqlite3StrICmp(tls, z1, z2) != 0) { goto __90 } goto __88 __90: ; goto __87 __87: k++ goto __86 goto __88 __88: ; if !(k == int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) { goto __91 } if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) != int32((*Index)(unsafe.Pointer(pIndex)).FonError)) { goto __92 } // This constraint creates the same index as a previous // constraint specified somewhere in the CREATE TABLE statement. // However the ON CONFLICT clauses are different. If both this // constraint and the previous equivalent constraint have explicit // ON CONFLICT clauses this is an error. Otherwise, use the // explicitly specified behavior for the index. if !!(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default || int32((*Index)(unsafe.Pointer(pIndex)).FonError) == OE_Default) { goto __93 } Xsqlite3ErrorMsg(tls, pParse, ts+15392, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { goto __94 } (*Index)(unsafe.Pointer(pIdx)).FonError = (*Index)(unsafe.Pointer(pIndex)).FonError __94: ; __92: ; if !(int32(idxType) == SQLITE_IDXTYPE_PRIMARYKEY) { goto __95 } libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(idxType), 0, 0x3) __95: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __96 } (*Index)(unsafe.Pointer(pIndex)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpNewIndex (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = pIndex pIndex = uintptr(0) __96: ; goto exit_create_index __91: ; goto __83 __83: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __82 goto __84 __84: ; __81: ; if !!(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __97 } // Link the new Index structure to its table and to the other // in-memory database structures. if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0) { goto __98 } if !(pTblName != uintptr(0)) { goto __100 } (*Index)(unsafe.Pointer(pIndex)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } Xsqlite3ErrorMsg(tls, pParse, ts+15434, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 118294) goto exit_create_index __101: ; __100: ; p = Xsqlite3HashInsert(tls, (*Index)(unsafe.Pointer(pIndex)).FpSchema+32, (*Index)(unsafe.Pointer(pIndex)).FzName, pIndex) if !(p != 0) { goto __102 } // Malloc must have failed Xsqlite3OomFault(tls, db) goto exit_create_index __102: ; *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaChange) goto __99 __98: if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || pTblName != uintptr(0)) { goto __103 } iMem = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) v = Xsqlite3GetVdbe(tls, pParse) if !(v == uintptr(0)) { goto __104 } goto exit_create_index __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) // Create the rootpage for the index using CreateIndex. But before // doing so, code a Noop instruction and store its address in // Index.tnum. This is required in case this index is actually a // PRIMARY KEY and the table is actually a WITHOUT ROWID table. In // that case the convertToWithoutRowidTable() routine will replace // the Noop with a Goto to jump over the VDBE code generated below. (*Index)(unsafe.Pointer(pIndex)).Ftnum = Pgno(Xsqlite3VdbeAddOp0(tls, v, OP_Noop)) Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, iMem, BTREE_BLOBKEY) // Gather the complete text of the CREATE INDEX statement into // the zStmt variable if !(pStart != 0) { goto __105 } n1 = int32(uint32(int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz)-int64((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz))/1)) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn) if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128)))).Fz + uintptr(n1-1)))) == ';') { goto __107 } n1-- __107: ; // A named index with an explicit CREATE INDEX statement zStmt = Xsqlite3MPrintf(tls, db, ts+15451, libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 1524 /* "" */ } return ts + 15471 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: // An automatic index created by a PRIMARY KEY or UNIQUE constraint // zStmt = sqlite3MPrintf(""); zStmt = uintptr(0) __106: ; // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, ts+15479, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, iMem, zStmt)) Xsqlite3DbFree(tls, db, zStmt) // Fill the index with data and reparse the schema. Code an OP_Expire // to invalidate all pre-compiled statements. if !(pTblName != 0) { goto __108 } sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, Xsqlite3MPrintf(tls, db, ts+15538, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; Xsqlite3VdbeJumpHere(tls, v, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum)) __103: ; __99: ; __97: ; if !((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 || pTblName == uintptr(0)) { goto __109 } (*Index)(unsafe.Pointer(pIndex)).FpNext = (*Table)(unsafe.Pointer(pTab)).FpIndex (*Table)(unsafe.Pointer(pTab)).FpIndex = pIndex pIndex = uintptr(0) goto __110 __109: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __111 } (*Parse)(unsafe.Pointer(pParse)).FpNewIndex = pIndex pIndex = uintptr(0) __111: ; __110: ; // Clean up before exiting exit_create_index: if !(pIndex != 0) { goto __112 } Xsqlite3FreeIndex(tls, db, pIndex) __112: ; if !(pTab != 0) { goto __113 } ppFrom = pTab + 16 __114: if !(libc.AssignUintptr(&pThis, *(*uintptr)(unsafe.Pointer(ppFrom))) != uintptr(0)) { goto __116 } if !(int32((*Index)(unsafe.Pointer(pThis)).FonError) != OE_Replace) { goto __117 } goto __115 __117: ; __118: if !(libc.AssignUintptr(&pNext, (*Index)(unsafe.Pointer(pThis)).FpNext) != uintptr(0) && int32((*Index)(unsafe.Pointer(pNext)).FonError) != OE_Replace) { goto __119 } *(*uintptr)(unsafe.Pointer(ppFrom)) = pNext (*Index)(unsafe.Pointer(pThis)).FpNext = (*Index)(unsafe.Pointer(pNext)).FpNext (*Index)(unsafe.Pointer(pNext)).FpNext = pThis ppFrom = pNext + 40 goto __118 __119: ; goto __116 goto __115 __115: ppFrom = pThis + 40 goto __114 goto __116 __116: ; __113: ; Xsqlite3ExprDelete(tls, db, pPIWhere) Xsqlite3ExprListDelete(tls, db, pList) Xsqlite3SrcListDelete(tls, db, pTblName) Xsqlite3DbFree(tls, db, zName) } // Fill the Index.aiRowEst[] array with default information - information // to be used when we have not run the ANALYZE command. // // aiRowEst[0] is supposed to contain the number of elements in the index. // Since we do not know, guess 1 million. aiRowEst[1] is an estimate of the // number of rows in the table that match any particular value of the // first column of the index. aiRowEst[2] is an estimate of the number // of rows that match any particular combination of the first 2 columns // of the index. And so forth. It must always be the case that // // aiRowEst[N]<=aiRowEst[N-1] // aiRowEst[N]>=1 // // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118449:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { if int32(uint64(unsafe.Sizeof(aVal))/uint64(unsafe.Sizeof(LogEst(0)))) < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) { return int32(uint64(unsafe.Sizeof(aVal)) / uint64(unsafe.Sizeof(LogEst(0)))) } return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) }() var i int32 // Indexes with default row estimates should not have stat1 data // Set the first entry (number of rows in the index) to the estimated // number of rows in the table, or half the number of rows in the table // for a partial index. // // 2020-05-27: If some of the stat data is coming from the sqlite_stat1 // table but other parts we are having to guess at, then do not let the // estimated number of rows in the table be less than 1000 (LogEst 99). // Failure to do this can cause the indexes for which we do not have // stat1 data to be ignored by the query planner. x = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FnRowLogEst if int32(x) < 99 { (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FnRowLogEst = libc.AssignInt16(&x, int16(99)) } if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != uintptr(0) { x = int16(int32(x) - 10) } *(*LogEst)(unsafe.Pointer(a)) = x // Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is // 6 and each subsequent value (if any) is 5. libc.Xmemcpy(tls, a+1*2, uintptr(unsafe.Pointer(&aVal)), uint64(nCopy)*uint64(unsafe.Sizeof(LogEst(0)))) for i = nCopy + 1; i <= int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { *(*LogEst)(unsafe.Pointer(a + uintptr(i)*2)) = int16(23) } if int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None { *(*LogEst)(unsafe.Pointer(a + uintptr((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)*2)) = int16(0) } } var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118451:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118493:21: */ bp := tls.Alloc(32) defer tls.Free(32) var pIndex uintptr var v uintptr var db uintptr var iDb int32 var code int32 var pTab uintptr var zDb uintptr var zTab uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } goto exit_drop_index __1: ; // Never called with prior non-OOM errors if !(SQLITE_OK != Xsqlite3ReadSchema(tls, pParse)) { goto __2 } goto exit_drop_index __2: ; pIndex = Xsqlite3FindIndex(tls, db, (*SrcItem)(unsafe.Pointer(pName+8)).FzName, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) if !(pIndex == uintptr(0)) { goto __3 } if !!(ifExists != 0) { goto __4 } Xsqlite3ErrorMsg(tls, pParse, ts+15565, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) sqlite3ForceNotReadOnly(tls, pParse) __5: ; (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto exit_drop_index __3: ; if !(int32(*(*uint16)(unsafe.Pointer(pIndex + 100))&0x3>>0) != SQLITE_IDXTYPE_APPDEF) { goto __6 } Xsqlite3ErrorMsg(tls, pParse, ts+15583, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIndex)).FpSchema) code = SQLITE_DROP_INDEX pTab = (*Index)(unsafe.Pointer(pIndex)).FpTable zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { return ts + 13385 } return ts + 7196 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 } goto exit_drop_index __7: ; if !(!(0 != 0) && iDb == 1) { goto __8 } code = SQLITE_DROP_TEMP_INDEX __8: ; if !(Xsqlite3AuthCheck(tls, pParse, code, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, zDb) != 0) { goto __9 } goto exit_drop_index __9: ; // Generate code to remove the index and from the schema table v = Xsqlite3GetVdbe(tls, pParse) if !(v != 0) { goto __10 } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, ts+15656, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) sqlite3ClearStatTables(tls, pParse, iDb, ts+12725, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) __10: ; exit_drop_index: Xsqlite3SrcListDelete(tls, db, pName) } // pArray is a pointer to an array of objects. Each object in the // array is szEntry bytes in size. This routine uses sqlite3DbRealloc() // to extend the array so that there is space for a new object at the end. // // When this function is called, *pnEntry contains the current size of // the array (in entries - so the allocation is ((*pnEntry) * szEntry) bytes // in total). // // If the realloc() is successful (i.e. if no OOM condition occurs), the // space allocated for the new object is zeroed, *pnEntry updated to // reflect the new size of the array and a pointer to the new allocation // returned. *pIdx is set to the index of the new array entry in this case. // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118575:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { var sz Sqlite3_int64 if n == int64(0) { sz = int64(1) } else { sz = int64(2) * n } var pNew uintptr = Xsqlite3DbRealloc(tls, db, pArray, uint64(sz*Sqlite3_int64(szEntry))) if pNew == uintptr(0) { *(*int32)(unsafe.Pointer(pIdx)) = -1 return pArray } pArray = pNew } z = pArray libc.Xmemset(tls, z+uintptr(n*Sqlite3_int64(szEntry)), 0, uint64(szEntry)) *(*int32)(unsafe.Pointer(pnEntry))++ return pArray } // Append a new element to the given IdList. Create a new IdList if // need be. // // A new IdList is returned, or NULL if malloc() fails. func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118605:23: */ bp := tls.Alloc(4) defer tls.Free(4) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // var i int32 at bp, 4 if pList == uintptr(0) { pList = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(IdList{}))) if pList == uintptr(0) { return uintptr(0) } } (*IdList)(unsafe.Pointer(pList)).Fa = Xsqlite3ArrayAllocate(tls, db, (*IdList)(unsafe.Pointer(pList)).Fa, int32(unsafe.Sizeof(IdList_item{})), pList+8, bp) if *(*int32)(unsafe.Pointer(bp)) < 0 { Xsqlite3IdListDelete(tls, db, pList) return uintptr(0) } (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa + uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*16)).FzName = Xsqlite3NameFromToken(tls, db, pToken) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(*(*int32)(unsafe.Pointer(bp)))*16)).FzName != 0 { Xsqlite3RenameTokenMap(tls, pParse, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(*(*int32)(unsafe.Pointer(bp /* i */)))*16)).FzName, pToken) } return pList } // Delete an IdList. func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118633:21: */ var i int32 if pList == uintptr(0) { return } for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { Xsqlite3DbFree(tls, db, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(i)*16)).FzName) } Xsqlite3DbFree(tls, db, (*IdList)(unsafe.Pointer(pList)).Fa) Xsqlite3DbFreeNN(tls, db, pList) } // Return the index in pList of the identifier named zId. Return -1 // if not found. func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118647:20: */ var i int32 if pList == uintptr(0) { return -1 } for i = 0; i < (*IdList)(unsafe.Pointer(pList)).FnId; i++ { if Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa+uintptr(i)*16)).FzName, zName) == 0 { return i } } return -1 } // Maximum size of a SrcList object. // The SrcList object is used to represent the FROM clause of a // SELECT statement, and the query planner cannot deal with more // than 64 tables in a join. So any value larger than 64 here // is sufficient for most uses. Smaller values, like say 10, are // appropriate for small and memory-limited applications. // Expand the space allocated for the given SrcList object by // creating nExtra new slots beginning at iStart. iStart is zero based. // New slots are zeroed. // // For example, suppose a SrcList initially contains two entries: A,B. // To append 3 new entries onto the end, do this: // // sqlite3SrcListEnlarge(db, pSrclist, 3, 2); // // After the call above it would contain: A, B, nil, nil, nil. // If the iStart argument had been 1 instead of 2, then the result // would have been: A, nil, nil, nil, B. To prepend the new slots, // the iStart value would be 0. The result then would // be: nil, nil, nil, A, B. // // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118688:24: */ bp := tls.Alloc(8) defer tls.Free(8) var i int32 // Sanity checking on calling parameters // Allocate additional space if needed if U32((*SrcList)(unsafe.Pointer(pSrc)).FnSrc)+U32(nExtra) > (*SrcList)(unsafe.Pointer(pSrc)).FnAlloc { var pNew uintptr var nAlloc Sqlite3_int64 = int64(2)*Sqlite3_int64((*SrcList)(unsafe.Pointer(pSrc)).FnSrc) + Sqlite3_int64(nExtra) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { Xsqlite3ErrorMsg(tls, pParse, ts+15716, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } if nAlloc > int64(SQLITE_MAX_SRCLIST) { nAlloc = int64(SQLITE_MAX_SRCLIST) } pNew = Xsqlite3DbRealloc(tls, db, pSrc, uint64(unsafe.Sizeof(SrcList{}))+uint64(nAlloc-int64(1))*uint64(unsafe.Sizeof(SrcItem{}))) if pNew == uintptr(0) { return uintptr(0) } pSrc = pNew (*SrcList)(unsafe.Pointer(pSrc)).FnAlloc = U32(nAlloc) } // Move existing slots that come after the newly inserted slots // out of the way for i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc - 1; i >= iStart; i-- { *(*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i+nExtra)*112)) = *(*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)) } *(*int32)(unsafe.Pointer(pSrc)) += nExtra // Zero the newly allocated slots libc.Xmemset(tls, pSrc+8+uintptr(iStart)*112, 0, uint64(unsafe.Sizeof(SrcItem{}))*uint64(nExtra)) for i = iStart; i < iStart+nExtra; i++ { (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor = -1 } // Return a pointer to the enlarged SrcList return pSrc } // Append a new table name to the given SrcList. Create a new SrcList if // need be. A new entry is created in the SrcList even if pTable is NULL. // // A SrcList is returned, or NULL if there is an OOM error or if the // SrcList grows to large. The returned // SrcList might be the same as the SrcList that was input or it might be // a new one. If an OOM error does occurs, then the prior value of pList // that is input to this routine is automatically freed. // // If pDatabase is not null, it means that the table has an optional // database name prefix. Like this: "database.table". The pDatabase // points to the table name and the pTable points to the database name. // The SrcList.a[].zName field is filled with the table name which might // come from pTable (if pDatabase is NULL) or from pDatabase. // SrcList.a[].zDatabase is filled with the database name from pTable, // or with NULL if no database is specified. // // In other words, if call like this: // // sqlite3SrcListAppend(D,A,B,0); // // Then B is a table name and the database name is unspecified. If called // like this: // // sqlite3SrcListAppend(D,A,B,C); // // Then C is the table name and B is the database name. If C is defined // then so is B. In other words, we never have a case where: // // sqlite3SrcListAppend(D,A,0,C); // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118777:24: */ var pItem uintptr var db uintptr // Cannot have C without B db = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList == uintptr(0) { pList = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(SrcList{}))) if pList == uintptr(0) { return uintptr(0) } (*SrcList)(unsafe.Pointer(pList)).FnAlloc = U32(1) (*SrcList)(unsafe.Pointer(pList)).FnSrc = 1 libc.Xmemset(tls, pList+8, 0, uint64(unsafe.Sizeof(SrcItem{}))) (*SrcItem)(unsafe.Pointer(pList + 8)).FiCursor = -1 } else { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, pList, 1, (*SrcList)(unsafe.Pointer(pList)).FnSrc) if pNew == uintptr(0) { Xsqlite3SrcListDelete(tls, db, pList) return uintptr(0) } else { pList = pNew } } pItem = pList + 8 + uintptr((*SrcList)(unsafe.Pointer(pList)).FnSrc-1)*112 if pDatabase != 0 && (*Token)(unsafe.Pointer(pDatabase)).Fz == uintptr(0) { pDatabase = uintptr(0) } if pDatabase != 0 { (*SrcItem)(unsafe.Pointer(pItem)).FzName = Xsqlite3NameFromToken(tls, db, pDatabase) (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = Xsqlite3NameFromToken(tls, db, pTable) } else { (*SrcItem)(unsafe.Pointer(pItem)).FzName = Xsqlite3NameFromToken(tls, db, pTable) (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase = uintptr(0) } return pList } // Assign VdbeCursor index numbers to all tables in a SrcList func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118822:21: */ var i int32 var pItem uintptr if pList != 0 { i = 0 pItem = pList + 8 /* &.a */ __1: if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { goto __3 } { if (*SrcItem)(unsafe.Pointer(pItem)).FiCursor >= 0 { goto __2 } (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 { Xsqlite3SrcListAssignCursors(tls, pParse, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FpSrc) } } goto __2 __2: i++ pItem += 112 goto __1 goto __3 __3: } } // Delete an entire SrcList including all its substructure. func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118840:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { return } pItem = pList + 8 /* &.a */ i = 0 __1: if !(i < (*SrcList)(unsafe.Pointer(pList)).FnSrc) { goto __3 } { if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) } Xsqlite3DbFree(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzName) if (*SrcItem)(unsafe.Pointer(pItem)).FzAlias != 0 { Xsqlite3DbFreeNN(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzAlias) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2>>1)) != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96))) } if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 { Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(pItem + 96))) } Xsqlite3DeleteTable(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) if (*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0 { Xsqlite3SelectDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect) } if (*SrcItem)(unsafe.Pointer(pItem)).FpOn != 0 { Xsqlite3ExprDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpOn) } if (*SrcItem)(unsafe.Pointer(pItem)).FpUsing != 0 { Xsqlite3IdListDelete(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FpUsing) } } goto __2 __2: i++ pItem += 112 goto __1 goto __3 __3: ; Xsqlite3DbFreeNN(tls, db, pList) } // This routine is called by the parser to add a new term to the // end of a growing FROM clause. The "p" parameter is the part of // the FROM clause that has already been constructed. "p" is NULL // if this is the first term of the FROM clause. pTable and pDatabase // are the name of the table and database named in the FROM clause term. // pDatabase is NULL if the database name qualifier is missing - the // usual case. If the term has an alias, then pAlias points to the // alias token. If the term is a subquery, then pSubquery is the // SELECT statement that the subquery encodes. The pTable and // pDatabase parameters are NULL for subqueries. The pOn and pUsing // parameters are the content of the ON and USING clauses. // // Return a new SrcList which encodes is the FROM with the new // term added. func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118874:24: */ bp := tls.Alloc(8) defer tls.Free(8) var pItem uintptr var db uintptr var pToken uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } Xsqlite3ErrorMsg(tls, pParse, ts+15752, libc.VaList(bp, func() uintptr { if pOn != 0 { return ts + 15788 /* "ON" */ } return ts + 15791 /* "USING" */ }())) goto append_from_error __1: ; p = Xsqlite3SrcListAppend(tls, pParse, p, pTable, pDatabase) if !(p == uintptr(0)) { goto __2 } goto append_from_error __2: ; pItem = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && (*SrcItem)(unsafe.Pointer(pItem)).FzName != 0) { goto __3 } if pDatabase != 0 && (*Token)(unsafe.Pointer(pDatabase)).Fz != 0 { pToken = pDatabase } else { pToken = pTable } Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(pItem)).FzName, pToken) __3: ; if !((*Token)(unsafe.Pointer(pAlias)).Fn != 0) { goto __4 } (*SrcItem)(unsafe.Pointer(pItem)).FzAlias = Xsqlite3NameFromToken(tls, db, pAlias) __4: ; (*SrcItem)(unsafe.Pointer(pItem)).FpSelect = pSubquery (*SrcItem)(unsafe.Pointer(pItem)).FpOn = pOn (*SrcItem)(unsafe.Pointer(pItem)).FpUsing = pUsing return p append_from_error: ; Xsqlite3ExprDelete(tls, db, pOn) Xsqlite3IdListDelete(tls, db, pUsing) Xsqlite3SelectDelete(tls, db, pSubquery) return uintptr(0) } // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118925:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr pItem = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 if (*Token)(unsafe.Pointer(pIndexedBy)).Fn == uint32(1) && !(int32((*Token)(unsafe.Pointer(pIndexedBy)).Fz) != 0) { // A "NOT INDEXED" clause was supplied. See parse.y // construct "indexed_opt" for details. libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 0, 0x1) } else { *(*uintptr)(unsafe.Pointer(pItem + 96)) = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIndexedBy) libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 1, 0x2) // No collision on union u2 } } } // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118951:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) if pNew == uintptr(0) { Xsqlite3SrcListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p2) } else { p1 = pNew libc.Xmemcpy(tls, p1+8+1*112, p2+8, uint64((*SrcList)(unsafe.Pointer(p2)).FnSrc)*uint64(unsafe.Sizeof(SrcItem{}))) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, p2) } } return p1 } // Add the list of function arguments to the SrcList entry for a // table-valued-function. func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118970:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*112 *(*uintptr)(unsafe.Pointer(pItem + 96)) = pList libc.SetBitFieldPtr16Uint32(pItem+60+4, uint32(1), 2, 0x4) } else { Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pList) } } // When building up a FROM clause in the parser, the join operator // is initially attached to the left operand. But the code generator // expects the join operator to be on the right operand. This routine // Shifts all join operators from left to right for an entire FROM // clause. // // Example: Suppose the join is like this: // // A natural cross join B // // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:118998:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { (*SrcItem)(unsafe.Pointer(p + 8 + uintptr(i)*112)).Ffg.Fjointype = (*SrcItem)(unsafe.Pointer(p + 8 + uintptr(i-1)*112)).Ffg.Fjointype } (*SrcItem)(unsafe.Pointer(p + 8)).Ffg.Fjointype = U8(0) } } // Generate VDBE code for a BEGIN statement. func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119011:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+15797, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) if !(v != 0) { return } if type1 != TK_DEFERRED { for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var eTxnType int32 var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if pBt != 0 && Xsqlite3BtreeIsReadonly(tls, pBt) != 0 { eTxnType = 0 // Read txn } else if type1 == TK_EXCLUSIVE { eTxnType = 2 // Exclusive txn } else { eTxnType = 1 // Write txn } Xsqlite3VdbeAddOp2(tls, v, OP_Transaction, i, eTxnType) Xsqlite3VdbeUsesBtree(tls, v, i) } } Xsqlite3VdbeAddOp0(tls, v, OP_AutoCommit) } // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119047:21: */ var v uintptr var isRollback int32 isRollback = libc.Bool32(eType == TK_ROLLBACK) if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { return ts + 15803 } return ts + 15812 }(), uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_AutoCommit, 1, isRollback) } } // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119069:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) if !(v != 0) || Xsqlite3AuthCheck(tls, pParse, SQLITE_SAVEPOINT, az[op], zName, uintptr(0)) != 0 { Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, zName) return } Xsqlite3VdbeAddOp4(tls, v, OP_Savepoint, op, 0, 0, zName, -7) } } var az = [3]uintptr{ts + 15797, ts + 15819, ts + 15803} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119074:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119089:20: */ bp := tls.Alloc(8) defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt == uintptr(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) != 0) { var rc int32 // var pBt uintptr at bp, 8 rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, ts+15827, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpBt = *(*uintptr)(unsafe.Pointer(bp /* pBt */)) if SQLITE_NOMEM == Xsqlite3BtreeSetPageSize(tls, *(*uintptr)(unsafe.Pointer(bp)), (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize, 0, 0) { Xsqlite3OomFault(tls, db) return 1 } } return 0 } var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119094:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119124:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<<iDb) != YDbMask(0)) == 0 { *(*YDbMask)(unsafe.Pointer(pToplevel + 116)) |= YDbMask(YDbMask(1)) << iDb if !(0 != 0) && iDb == 1 { Xsqlite3OpenTempDatabase(tls, pToplevel) } } } func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119136:21: */ sqlite3CodeVerifySchemaAtToplevel(tls, func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }(), iDb) } // If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each // attached database. Otherwise, invoke it for the database named zDb only. func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119145:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32 if (*Db)(unsafe.Pointer(pDb)).FpBt != 0 && (!(zDb != 0) || 0 == Xsqlite3StrICmp(tls, zDb, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) { Xsqlite3CodeVerifySchema(tls, pParse, i) } } } // Generate VDBE code that prepares for doing an operation that // might change the database. // // This routine starts a new transaction if we are not already within // a transaction. If we are already within a transaction, then a checkpoint // is set if the setStatement parameter is true. A checkpoint should // be set for operations that might fail (due to a constraint) part of // the way through and which will need to undo some writes without having to // rollback the whole transaction. For operations where all constraints // can be checked before any changes are made to the database, it is never // necessary to undo a write and the checkpoint should not be set. func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int32, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119169:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() sqlite3CodeVerifySchemaAtToplevel(tls, pToplevel, iDb) *(*YDbMask)(unsafe.Pointer(pToplevel + 112)) |= YDbMask(YDbMask(1)) << iDb *(*U8)(unsafe.Pointer(pToplevel + 32)) |= U8(setStatement) } // Indicate that the statement currently under construction might write // more than one entry (example: deleting one row then inserting another, // inserting multiple rows in a table, or inserting a row and index entries.) // If an abort occurs after some of these writes have completed, then it will // be necessary to undo the completed writes. func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119183:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() (*Parse)(unsafe.Pointer(pToplevel)).FisMultiWrite = U8(1) } // The code generator calls this routine if is discovers that it is // possible to abort a statement prior to completion. In order to // perform this abort without corrupting the database, we need to make // sure that the statement is protected by a statement transaction. // // Technically, we only need to set the mayAbort flag if the // isMultiWrite flag was previously set. There is a time dependency // such that the abort must occur after the multiwrite. This makes // some statements involving the REPLACE conflict resolution algorithm // go a little faster. But taking advantage of this time dependency // makes it more difficult to prove that the code is correct (in // particular, it prevents us from writing an effective // implementation of sqlite3AssertMayAbort()) and so we have chosen // to take the safe route and skip the optimization. func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119204:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() (*Parse)(unsafe.Pointer(pToplevel)).FmayAbort = U8(1) } // Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT // error. The onError parameter determines which (if any) of the statement // and/or current transaction is rolled back. func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onError int32, p4 uintptr, p4type I8, p5Errmsg U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119214:21: */ var v uintptr v = Xsqlite3GetVdbe(tls, pParse) if onError == OE_Abort { Xsqlite3MayAbort(tls, pParse) } Xsqlite3VdbeAddOp4(tls, v, OP_Halt, errCode, onError, 0, p4, int32(p4type)) Xsqlite3VdbeChangeP5(tls, v, uint16(p5Errmsg)) } // Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation. func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119236:21: */ bp := tls.Alloc(40) defer tls.Free(40) var zErr uintptr var j int32 // var errMsg StrAccum at bp+8, 32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable Xsqlite3StrAccumInit(tls, bp+8, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 136))) if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { Xsqlite3_str_appendf(tls, bp+8, ts+15897, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) } else { for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { var zCol uintptr zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*24)).FzCnName if j != 0 { Xsqlite3_str_append(tls, bp+8, ts+15908, 2) } Xsqlite3_str_appendall(tls, bp+8, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3_str_append(tls, bp+8, ts+1537, 1) Xsqlite3_str_appendall(tls, bp+8, zCol) } } zErr = Xsqlite3StrAccumFinish(tls, bp+8) Xsqlite3HaltConstraint(tls, pParse, func() int32 { if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { return SQLITE_CONSTRAINT | int32(6)<<8 } return SQLITE_CONSTRAINT | int32(8)<<8 }(), onError, zErr, int8(-7), uint8(P5_ConstraintUnique)) } // Code an OP_Halt due to non-unique rowid. func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119272:21: */ bp := tls.Alloc(24) defer tls.Free(24) var zMsg uintptr var rc int32 if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*24)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+15911, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), uint8(P5_ConstraintUnique)) } // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119296:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FazColl + uintptr(i)*8)) if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FaiColumn + uintptr(i)*2))) >= 0 && 0 == Xsqlite3StrICmp(tls, z, zColl) { return 1 } } return 0 } // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119315:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab for pIndex = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIndex != 0; pIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext { if zColl == uintptr(0) || collationMatch(tls, zColl, pIndex) != 0 { var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) sqlite3RefillIndex(tls, pParse, pIndex, -1) } } } } // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119336:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var k uintptr // For looping over tables in pDb var pTab uintptr // A table in the database // Needed for schema access iDb = 0 pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb __1: if !(iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __3 } { for k = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema + 8)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { pTab = (*HashElem)(unsafe.Pointer(k)).Fdata reindexTable(tls, pParse, pTab, zColl) } } goto __2 __2: iDb++ pDb += 32 goto __1 goto __3 __3: } // Generate code for the REINDEX command. // // REINDEX -- 1 // REINDEX <collation> -- 2 // REINDEX ?<database>.?<tablename> -- 3 // REINDEX ?<database>.?<indexname> -- 4 // // Form 1 causes all indices in all attached databases to be rebuilt. // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119368:21: */ bp := tls.Alloc(8) defer tls.Free(8) var pColl uintptr // Collating sequence to be reindexed, or NULL var z uintptr // Name of a table or index var zDb uintptr // Name of the database var pTab uintptr // A table in the database var pIndex uintptr // An index associated with pTab var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection // var pObjName uintptr at bp, 8 // Name of the table or index to be reindexed // Read the database schema. If an error occurs, leave an error message // and code in pParse and return NULL. if SQLITE_OK != Xsqlite3ReadSchema(tls, pParse) { return } if pName1 == uintptr(0) { reindexDatabases(tls, pParse, uintptr(0)) return } else if pName2 == uintptr(0) || (*Token)(unsafe.Pointer(pName2)).Fz == uintptr(0) { var zColl uintptr zColl = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName1) if !(zColl != 0) { return } pColl = Xsqlite3FindCollSeq(tls, db, (*Sqlite3)(unsafe.Pointer(db)).Fenc, zColl, 0) if pColl != 0 { reindexDatabases(tls, pParse, zColl) Xsqlite3DbFree(tls, db, zColl) return } Xsqlite3DbFree(tls, db, zColl) } iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) if iDb < 0 { return } z = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pObjName */))) if z == uintptr(0) { return } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName pTab = Xsqlite3FindTable(tls, db, z, zDb) if pTab != 0 { reindexTable(tls, pParse, pTab, uintptr(0)) Xsqlite3DbFree(tls, db, z) return } pIndex = Xsqlite3FindIndex(tls, db, z, zDb) Xsqlite3DbFree(tls, db, z) if pIndex != 0 { Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) sqlite3RefillIndex(tls, pParse, pIndex, -1) return } Xsqlite3ErrorMsg(tls, pParse, ts+15920, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119428:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) var pKey uintptr if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return uintptr(0) } if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nKey, nCol-nKey) } else { pKey = Xsqlite3KeyInfoAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, nCol, 0) } if pKey != 0 { for i = 0; i < nCol; i++ { var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)) *(*uintptr)(unsafe.Pointer(pKey + 32 + uintptr(i)*8)) = func() uintptr { if zColl == uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) { return uintptr(0) } return Xsqlite3LocateCollSeq(tls, pParse, zColl) }() *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKey)).FaSortFlags + uintptr(i))) = *(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i))) } if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x100>>8) == 0 { // Deactivate the index because it contains an unknown collating // sequence. The only way to reactive the index is to reload the // schema. Adding the missing collating sequence later does not // reactive the index. The application had the chance to register // the missing index using the collation-needed callback. For // simplicity, SQLite will not give the application a second chance. libc.SetBitFieldPtr16Uint32(pIdx+100, uint32(1), 8, 0x100) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(2)<<8 } Xsqlite3KeyInfoUnref(tls, pKey) pKey = uintptr(0) } } return pKey } // Create a new CTE object func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119472:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Cte{}))) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprListDelete(tls, db, pArglist) Xsqlite3SelectDelete(tls, db, pQuery) } else { (*Cte)(unsafe.Pointer(pNew)).FpSelect = pQuery (*Cte)(unsafe.Pointer(pNew)).FpCols = pArglist (*Cte)(unsafe.Pointer(pNew)).FzName = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) (*Cte)(unsafe.Pointer(pNew)).FeM10d = eM10d } return pNew } // Clear information from a Cte object, but do not deallocate storage // for the object itself. func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119501:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) Xsqlite3DbFree(tls, db, (*Cte)(unsafe.Pointer(pCte)).FzName) } // Free the contents of the CTE object passed as the second argument. func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119511:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) } // This routine is invoked once per CTE by the parser while parsing a // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119523:21: */ bp := tls.Alloc(8) defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr var zName uintptr if pCte == uintptr(0) { return pWith } // Check that the CTE name is unique within this WITH clause. If // not, store an error in the Parse structure. zName = (*Cte)(unsafe.Pointer(pCte)).FzName if zName != 0 && pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+16+uintptr(i)*48)).FzName) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+15966, libc.VaList(bp, zName)) } } } if pWith != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint64(unsafe.Sizeof(With{})) + uint64(unsafe.Sizeof(Cte{}))*uint64((*With)(unsafe.Pointer(pWith)).FnCte)) pNew = Xsqlite3DbRealloc(tls, db, pWith, uint64(nByte)) } else { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(With{}))) } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3CteDelete(tls, db, pCte) pNew = pWith } else { *(*Cte)(unsafe.Pointer(pNew + 16 + uintptr(libc.PostIncInt32(&(*With)(unsafe.Pointer(pNew)).FnCte, 1))*48)) = *(*Cte)(unsafe.Pointer(pCte)) Xsqlite3DbFree(tls, db, pCte) } return pNew } // Free the contents of the With object passed as the second argument. func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119570:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { cteClear(tls, db, pWith+16+uintptr(i)*48) } Xsqlite3DbFree(tls, db, pWith) } } //************* End of build.c ********************************************** //************* Begin file callback.c *************************************** // 2005 May 23 // // 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 functions used to access the internal hash tables // of user defined functions and collation sequences. // #include "sqliteInt.h" // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119605:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) if !(zExternal != 0) { return } (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, enc, zExternal) Xsqlite3DbFree(tls, db, zExternal) } if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 != 0 { var zExternal uintptr var pTmp uintptr = Xsqlite3ValueNew(tls, db) Xsqlite3ValueSetStr(tls, pTmp, -1, zName, uint8(SQLITE_UTF8), uintptr(0)) zExternal = Xsqlite3ValueText(tls, pTmp, uint8(SQLITE_UTF16LE)) if zExternal != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpCollNeededArg, db, int32((*Sqlite3)(unsafe.Pointer(db)).Fenc), zExternal) } Xsqlite3ValueFree(tls, pTmp) } } // This routine is called if the collation factory fails to deliver a // collation function in the best encoding but there may be other versions // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119634:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 for i = 0; i < 3; i++ { pColl2 = Xsqlite3FindCollSeq(tls, db, aEnc[i], z, 0) if (*CollSeq)(unsafe.Pointer(pColl2)).FxCmp != uintptr(0) { libc.Xmemcpy(tls, pColl, pColl2, uint64(unsafe.Sizeof(CollSeq{}))) (*CollSeq)(unsafe.Pointer(pColl)).FxDel = uintptr(0) // Do not copy the destructor return SQLITE_OK } } return SQLITE_ERROR } var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119638:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when // a database is loaded that contains references to collation sequences // that have not been defined by sqlite3_create_collation() etc. // // If required, this routine calls the 'collation needed' callback to // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119661:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr = Xsqlite3GetCollSeq(tls, pParse, (*Sqlite3)(unsafe.Pointer(db)).Fenc, pColl, zName) if !(p != 0) { return SQLITE_ERROR } } return SQLITE_OK } // Locate and return an entry from the db.aCollSeq hash table. If the entry // specified by zName and nName is not found and parameter 'create' is // true, then create a new entry. Otherwise return NULL. // // Each pointer stored in the sqlite3.aCollSeq hash table contains an // array of three CollSeq structures. The first is the collation sequence // preferred for UTF-8, the second UTF-16le, and the third UTF-16be. // // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119689:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+640, zName) if uintptr(0) == pColl && create != 0 { var nName int32 = Xsqlite3Strlen30(tls, zName) + 1 pColl = Xsqlite3DbMallocZero(tls, db, uint64(3)*uint64(unsafe.Sizeof(CollSeq{}))+uint64(nName)) if pColl != 0 { var pDel uintptr = uintptr(0) (*CollSeq)(unsafe.Pointer(pColl)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl)).Fenc = U8(SQLITE_UTF8) (*CollSeq)(unsafe.Pointer(pColl + 1*40)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl + 1*40)).Fenc = U8(SQLITE_UTF16LE) (*CollSeq)(unsafe.Pointer(pColl + 2*40)).FzName = pColl + 3*40 (*CollSeq)(unsafe.Pointer(pColl + 2*40)).Fenc = U8(SQLITE_UTF16BE) libc.Xmemcpy(tls, (*CollSeq)(unsafe.Pointer(pColl)).FzName, zName, uint64(nName)) pDel = Xsqlite3HashInsert(tls, db+640, (*CollSeq)(unsafe.Pointer(pColl)).FzName, pColl) // If a malloc() failure occurred in sqlite3HashInsert(), it will // return the pColl pointer to be deleted (because it wasn't added // to the hash table). if pDel != uintptr(0) { Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, pDel) pColl = uintptr(0) } } } return pColl } // Parameter zName points to a UTF-8 encoded string nName bytes long. // Return the CollSeq* pointer for the collation sequence named zName // for the encoding 'enc' from the database 'db'. // // If the entry specified is not found and 'create' is true, then create a // new entry. Otherwise return NULL. // // A separate function sqlite3LocateCollSeq() is a wrapper around // this routine. sqlite3LocateCollSeq() invokes the collation factory // if necessary and generates an error message if the collating sequence // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119741:24: */ var pColl uintptr if zName != 0 { pColl = findCollSeqEntry(tls, db, zName, create) if pColl != 0 { pColl += 40 * uintptr(int32(enc)-1) } } else { pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl } return pColl } // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119763:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all // strings is BINARY. (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl = Xsqlite3FindCollSeq(tls, db, enc, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), 0) } // This function is responsible for invoking the collation factory callback // or substituting a collation sequence of a different encoding when the // requested collation sequence is not available in the desired encoding. // // If it is not NULL, then pColl must point to the database native encoding // collation sequence with name zName, length nName. // // The return value is either the collation sequence to be used in database // db for collation type name zName, length nName, or NULL, if no collation // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119786:24: */ bp := tls.Alloc(8) defer tls.Free(8) var p uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb p = pColl if !(p != 0) { p = Xsqlite3FindCollSeq(tls, db, enc, zName, 0) } if !(p != 0) || !(int32((*CollSeq)(unsafe.Pointer(p)).FxCmp) != 0) { // No collation sequence of this type for this encoding is registered. // Call the collation factory to see if it can supply us with one. callCollNeeded(tls, db, int32(enc), zName) p = Xsqlite3FindCollSeq(tls, db, enc, zName, 0) } if p != 0 && !(int32((*CollSeq)(unsafe.Pointer(p)).FxCmp) != 0) && synthCollSeq(tls, db, p) != 0 { p = uintptr(0) } if p == uintptr(0) { Xsqlite3ErrorMsg(tls, pParse, ts+15996, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p } // This function returns the collation sequence for database native text // encoding identified by the string zName. // // If the requested collation sequence is not available, or not available // in the database native encoding, the collation factory is invoked to // request it. If the collation factory does not supply such a sequence, // and the sequence is available in another text encoding, then that is // returned instead. // // If no versions of the requested collations sequence are available, or // another error occurs, NULL is returned and an error message written into // pParse. // // This routine is a wrapper around sqlite3FindCollSeq(). This routine // invokes the collation factory if the named collation cannot be found // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119837:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy var pColl uintptr pColl = Xsqlite3FindCollSeq(tls, db, enc, zName, int32(initbusy)) if !(initbusy != 0) && (!(pColl != 0) || !(int32((*CollSeq)(unsafe.Pointer(pColl)).FxCmp) != 0)) { pColl = Xsqlite3GetCollSeq(tls, pParse, enc, pColl, zName) } return pColl } // During the search for the best function definition, this procedure // is called to test how well the function passed as the first argument // matches the request for a function with nArg arguments in a system // that uses encoding enc. The value returned indicates how well the // request is matched. A higher value indicates a better match. // // If nArg is -1 that means to only return a match (non-zero) if p->nArg // is also -1. In other words, we are searching for a function that // takes a variable number of arguments. // // If nArg is -2 that means that we are searching for any function // regardless of the number of arguments it uses, so return a positive // match score for any // // The returned value is always between 0 and 6, as follows: // // 0: Not a match. // 1: UTF8/16 conversion required and function takes any number of arguments. // 2: UTF16 byte order change required and function takes any number of args. // 3: encoding matches and function takes any number of arguments // 4: UTF8/16 conversion required - argument count matches exactly // 5: UTF16 byte order conversion required - argument count matches exactly // 6: Perfect match: encoding and argument count match exactly. // // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119880:12: */ var match int32 // Wrong number of arguments means "no match" if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) != nArg { if nArg == -2 { if (*FuncDef)(unsafe.Pointer(p)).FxSFunc == uintptr(0) { return 0 } return FUNC_PERFECT_MATCH } if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) >= 0 { return 0 } } // Give a better score to a function with a specific number of arguments // than to function that accepts any number of arguments. if int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { match = 4 } else { match = 1 } // Bonus points if the text encoding matches if U32(enc) == (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) { match = match + 2 // Exact encoding match } else if U32(enc)&(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(2) != U32(0) { match = match + 1 // Both are UTF16, but with different byte orders } return match } // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119916:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 64)) { if Xsqlite3StrICmp(tls, (*FuncDef)(unsafe.Pointer(p)).FzName, zFunc) == 0 { return p } } return uintptr(0) } // Insert a new FuncDef into a FuncDefHash hash table. func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119933:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr var zName uintptr = (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FzName var nName int32 = Xsqlite3Strlen30(tls, zName) var h int32 = (int32(*(*int8)(unsafe.Pointer(zName))) + nName) % SQLITE_FUNC_HASH_SZ pOther = Xsqlite3FunctionSearch(tls, h, zName) if pOther != 0 { (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FpNext = (*FuncDef)(unsafe.Pointer(pOther)).FpNext (*FuncDef)(unsafe.Pointer(pOther)).FpNext = aDef + uintptr(i)*72 } else { (*FuncDef)(unsafe.Pointer(aDef + uintptr(i)*72)).FpNext = uintptr(0) *(*uintptr)(unsafe.Pointer(aDef + uintptr(i)*72 + 64)) = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)) *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*8)) = aDef + uintptr(i)*72 } } } // Locate a user function given a name, a number of arguments and a flag // indicating whether the function prefers UTF-16 over UTF-8. Return a // pointer to the FuncDef structure that defines that function, or return // NULL if the function does not exist. // // If the createFlag argument is true, then a new (blank) FuncDef // structure is created and liked into the "db" structure if a // no matching function previously existed. // // If nArg is -2, then the first valid function found is returned. A // function is valid if xSFunc is non-zero. The nArg==(-2) // case is used to see if zName is a valid function name for some number // of arguments. If nArg is -2, then createFlag must be 0. // // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:119978:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match var h int32 // Hash value var nName int32 // Length of the name nName = Xsqlite3Strlen30(tls, zName) // First search for a match amongst the application-defined functions. p = Xsqlite3HashFind(tls, db+616, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { pBest = p bestScore = score } p = (*FuncDef)(unsafe.Pointer(p)).FpNext } // If no match is found, search the built-in functions. // // If the DBFLAG_PreferBuiltin flag is set, then search the built-in // functions even if a prior app-defined function was found. And give // priority to built-in functions. // // Except, if createFlag is true, that means that we are trying to // install a new function. Whatever FuncDef structure is returned it will // have fields overwritten with new information appropriate for the // new function. But the FuncDefs for built-in functions are read-only. // So we must not search for built-ins when creating a new function. if !(createFlag != 0) && (pBest == uintptr(0) || (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_PreferBuiltin) != U32(0)) { bestScore = 0 h = (int32(Xsqlite3UpperToLower[U8(*(*int8)(unsafe.Pointer(zName)))]) + nName) % SQLITE_FUNC_HASH_SZ p = Xsqlite3FunctionSearch(tls, h, zName) for p != 0 { var score int32 = matchQuality(tls, p, nArg, enc) if score > bestScore { pBest = p bestScore = score } p = (*FuncDef)(unsafe.Pointer(p)).FpNext } } // If the createFlag parameter is true and the search did not reveal an // exact match for the name, number of arguments and encoding, then add a // new entry to the hash table and return it. if createFlag != 0 && bestScore < FUNC_PERFECT_MATCH && libc.AssignUintptr(&pBest, Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(FuncDef{}))+uint64(nName)+uint64(1))) != uintptr(0) { var pOther uintptr var z uintptr (*FuncDef)(unsafe.Pointer(pBest)).FzName = pBest + 1*72 (*FuncDef)(unsafe.Pointer(pBest)).FnArg = I8(U16(nArg)) (*FuncDef)(unsafe.Pointer(pBest)).FfuncFlags = U32(enc) libc.Xmemcpy(tls, pBest+1*72, zName, uint64(nName+1)) for z = (*FuncDef)(unsafe.Pointer(pBest)).FzName; *(*U8)(unsafe.Pointer(z)) != 0; z++ { *(*U8)(unsafe.Pointer(z)) = Xsqlite3UpperToLower[*(*U8)(unsafe.Pointer(z))] } pOther = Xsqlite3HashInsert(tls, db+616, (*FuncDef)(unsafe.Pointer(pBest)).FzName, pBest) if pOther == pBest { Xsqlite3DbFree(tls, db, pBest) Xsqlite3OomFault(tls, db) return uintptr(0) } else { (*FuncDef)(unsafe.Pointer(pBest)).FpNext = pOther } } if pBest != 0 && ((*FuncDef)(unsafe.Pointer(pBest)).FxSFunc != 0 || createFlag != 0) { return pBest } return uintptr(0) } // Free all resources held by the schema structure. The void* argument points // at a Schema struct. This function does not call sqlite3DbFree(db, ) on the // pointer itself, it just cleans up subsidiary resources (i.e. the contents // of the schema hash tables). // // The Schema.cache_size variable is not cleared. func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120070:21: */ bp := tls.Alloc(48) defer tls.Free(48) // var temp1 Hash at bp+24, 24 // var temp2 Hash at bp, 24 var pElem uintptr var pSchema uintptr = p *(*Hash)(unsafe.Pointer(bp + 24 /* temp1 */)) = (*Schema)(unsafe.Pointer(pSchema)).FtblHash *(*Hash)(unsafe.Pointer(bp /* temp2 */)) = (*Schema)(unsafe.Pointer(pSchema)).FtrigHash Xsqlite3HashInit(tls, pSchema+56) Xsqlite3HashClear(tls, pSchema+32) for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) } Xsqlite3HashClear(tls, bp) Xsqlite3HashInit(tls, pSchema+8) for pElem = (*Hash)(unsafe.Pointer(bp + 24)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata Xsqlite3DeleteTable(tls, uintptr(0), pTab) } Xsqlite3HashClear(tls, bp+24) Xsqlite3HashClear(tls, pSchema+80) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { (*Schema)(unsafe.Pointer(pSchema)).FiGeneration++ } *(*U16)(unsafe.Pointer(pSchema + 114)) &= libc.Uint16FromInt32(libc.CplInt32(DB_SchemaLoaded | DB_ResetWanted)) } // Find and return the schema associated with a BTree. Create // a new one if necessary. func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120102:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) } else { p = Xsqlite3DbMallocZero(tls, uintptr(0), uint64(unsafe.Sizeof(Schema{}))) } if !(p != 0) { Xsqlite3OomFault(tls, db) } else if 0 == int32((*Schema)(unsafe.Pointer(p)).Ffile_format) { Xsqlite3HashInit(tls, p+8) Xsqlite3HashInit(tls, p+32) Xsqlite3HashInit(tls, p+56) Xsqlite3HashInit(tls, p+80) (*Schema)(unsafe.Pointer(p)).Fenc = U8(SQLITE_UTF8) } return p } //************* End of callback.c ******************************************* //************* Begin file delete.c ***************************************** // 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 file contains C code routines that are called by the parser // in order to generate code for DELETE FROM statements. // #include "sqliteInt.h" // While a SrcList can in general represent multiple tables and subqueries // (as in the FROM clause of a SELECT statement) in this case it contains // the name of a single table, as one might find in an INSERT, DELETE, // or UPDATE statement. Look up that table in the symbol table and // return a pointer. Set an error message and return NULL if the table // name is not found or if any other error occurs. // // The following fields are initialized appropriate in pSrc: // // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120153:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr pTab = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pItem) Xsqlite3DeleteTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pItem)).FpTab) (*SrcItem)(unsafe.Pointer(pItem)).FpTab = pTab if pTab != 0 { (*Table)(unsafe.Pointer(pTab)).FnTabRef++ if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x2>>1)) != 0 && Xsqlite3IndexedByLookup(tls, pParse, pItem) != 0 { pTab = uintptr(0) } } return pTab } // Generate byte-code that will report the number of rows modified // by a DELETE, INSERT, or UPDATE statement. func Xsqlite3CodeChangeCount(tls *libc.TLS, v uintptr, regCounter int32, zColName uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120172:21: */ Xsqlite3VdbeAddOp0(tls, v, OP_FkCheck) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regCounter, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, zColName, uintptr(0)) } // Return true if table pTab is read-only. // // A table is read-only if any of the following are true: // // 1) It is a virtual table and no implementation of the xUpdate method // has been provided // // 2) It is a system table (i.e. sqlite_schema), this call is not // part of a nested parse and writable_schema pragma has not // been specified // // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120194:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly|TF_Shadow) == U32(0) { return 0 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Readonly) != U32(0) { return libc.Bool32(Xsqlite3WritableSchema(tls, db) == 0 && int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) } return Xsqlite3ReadOnlyShadowTables(tls, db) } // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120213:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+16027, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { Xsqlite3ErrorMsg(tls, pParse, ts+16056, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 } // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120234:21: */ bp := tls.Alloc(40) defer tls.Free(40) // var dest SelectDest at bp, 40 var pSel uintptr var pFrom uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var iDb int32 = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pView)).FpSchema) pWhere = Xsqlite3ExprDup(tls, db, pWhere, 0) pFrom = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) if pFrom != 0 { (*SrcItem)(unsafe.Pointer(pFrom + 8)).FzName = Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pView)).FzName) (*SrcItem)(unsafe.Pointer(pFrom + 8)).FzDatabase = Xsqlite3DbStrDup(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) } pSel = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, pWhere, uintptr(0), uintptr(0), pOrderBy, uint32(SF_IncludeHidden), pLimit) Xsqlite3SelectDestInit(tls, bp, SRT_EphemTab, iCur) Xsqlite3Select(tls, pParse, pSel, bp) Xsqlite3SelectDelete(tls, db, pSel) } // && !defined(SQLITE_OMIT_SUBQUERY) // Generate code for a DELETE FROM statement. // // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120373:21: */ bp := tls.Alloc(88) defer tls.Free(88) var v uintptr // The virtual database engine var pTab uintptr // The table from which records will be deleted var i int32 // Loop counter var pWInfo uintptr // Information about the WHERE clause var pIdx uintptr // For looping over indices of the table var iTabCur int32 // Cursor number for the table // var iDataCur int32 at bp+80, 4 // VDBE cursor for the canonical data source // var iIdxCur int32 at bp+84, 4 // Cursor number of the first index var nIdx int32 // Number of indices var db uintptr // Main database structure // var sContext AuthContext at bp, 16 // Authorization context // var sNC NameContext at bp+16, 56 // Name context to resolve expressions in var iDb int32 // Database number var memCnt int32 // Memory cell used for change counting var rcauth int32 // Value returned by authorization callback var eOnePass int32 // ONEPASS_OFF or _SINGLE or _MULTI // var aiCurOnePass [2]int32 at bp+72, 8 // The write cursors opened by WHERE_ONEPASS var aToOpen uintptr // Open cursor iTabCur+j if aToOpen[j] is true var pPk uintptr // The PRIMARY KEY index on the table var iPk int32 // First of nPk registers holding PRIMARY KEY value var nPk I16 // Number of columns in the PRIMARY KEY var iKey int32 // Memory cell holding key of row to be deleted var nKey I16 // Number of memory cells in the row key var iEphCur int32 // Ephemeral table holding all primary key values var iRowSet int32 // Register for rowset of rows to delete var addrBypass int32 // Address of jump over the delete logic var addrLoop int32 // Top of the delete loop var addrEphOpen int32 // Instruction to open the Ephemeral table var bComplex int32 // True if there are triggers or FKs or // subqueries in the WHERE clause var isView int32 // True if attempting to delete from a view var pTrigger uintptr var iAddrOnce int32 var pVTab uintptr var count int32 var wcf U16 *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)) = 0 *(*int32)(unsafe.Pointer(bp + 84 /* iIdxCur */)) = 0 memCnt = 0 aToOpen = uintptr(0) iPk = 0 nPk = int16(1) iEphCur = 0 iRowSet = 0 addrBypass = 0 addrLoop = 0 addrEphOpen = 0 // List of table triggers, if required libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(AuthContext{}))) db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __1 } goto delete_from_cleanup __1: ; // Locate the table which we want to delete. This table has to be // put in an SrcList structure because some of the subroutines we // will be calling are designed to work with multiple tables and expect // an SrcList* parameter instead of just a Table* parameter. pTab = Xsqlite3SrcListLookup(tls, pParse, pTabList) if !(pTab == uintptr(0)) { goto __2 } goto delete_from_cleanup __2: ; // Figure out if we have any triggers and if the table being // deleted from is a view pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_DELETE, uintptr(0), uintptr(0)) isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) bComplex = libc.Bool32(pTrigger != 0 || Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0) // If pTab is really a view, make sure it has been initialized. if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { goto __3 } goto delete_from_cleanup __3: ; if !(Xsqlite3IsReadOnly(tls, pParse, pTab, func() int32 { if pTrigger != 0 { return 1 } return 0 }()) != 0) { goto __4 } goto delete_from_cleanup __4: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) rcauth = Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if !(rcauth == SQLITE_DENY) { goto __5 } goto delete_from_cleanup __5: ; // Assign cursor numbers to the table and all its indices. iTabCur = libc.AssignPtrInt32(pTabList+8+68, libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1)) nIdx = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __6: if !(pIdx != 0) { goto __8 } (*Parse)(unsafe.Pointer(pParse)).FnTab++ goto __7 __7: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext nIdx++ goto __6 goto __8 __8: ; // Start the view context if !(isView != 0) { goto __9 } Xsqlite3AuthContextPush(tls, pParse, bp, (*Table)(unsafe.Pointer(pTab)).FzName) __9: ; // Begin generating code. v = Xsqlite3GetVdbe(tls, pParse) if !(v == uintptr(0)) { goto __10 } goto delete_from_cleanup __10: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) { goto __11 } Xsqlite3VdbeCountChanges(tls, v) __11: ; Xsqlite3BeginWriteOperation(tls, pParse, bComplex, iDb) // If we are trying to delete from a view, realize that view into // an ephemeral table. if !(isView != 0) { goto __12 } Xsqlite3MaterializeView(tls, pParse, pTab, pWhere, pOrderBy, pLimit, iTabCur) *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)) = libc.AssignPtrInt32(bp+84 /* iIdxCur */, iTabCur) pOrderBy = uintptr(0) pLimit = uintptr(0) __12: ; // Resolve the column names in the WHERE clause. libc.Xmemset(tls, bp+16, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpSrcList = pTabList if !(Xsqlite3ResolveExprNames(tls, bp+16, pWhere) != 0) { goto __13 } goto delete_from_cleanup __13: ; // Initialize the counter of the number of rows deleted, if // we are counting rows. if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FbReturning) != 0)) { goto __14 } memCnt = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, memCnt) __14: ; // Special case: A DELETE without a WHERE clause deletes everything. // It is easier just to erase the whole table. Prior to version 3.6.5, // this optimization caused the row change count (the value returned by // API function sqlite3_count_changes) to be set incorrectly. // // The "rcauth==SQLITE_OK" terms is the // IMPLEMENTATION-OF: R-17228-37124 If the action code is SQLITE_DELETE and // the callback returns SQLITE_IGNORE then the DELETE operation proceeds but // the truncate optimization is disabled and all rows are deleted // individually. if !(rcauth == SQLITE_OK && pWhere == uintptr(0) && !(bComplex != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback == uintptr(0)) { goto __15 } Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pTab)).FzName) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __17 } Xsqlite3VdbeAddOp4(tls, v, OP_Clear, int32((*Table)(unsafe.Pointer(pTab)).Ftnum), iDb, func() int32 { if memCnt != 0 { return memCnt } return -1 }(), (*Table)(unsafe.Pointer(pTab)).FzName, -1) __17: ; pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __18: if !(pIdx != 0) { goto __20 } Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) if !(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __21 } Xsqlite3VdbeChangeP3(tls, v, -1, func() int32 { if memCnt != 0 { return memCnt } return -1 }()) __21: ; goto __19 __19: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __18 goto __20 __20: ; goto __16 __15: wcf = U16(WHERE_ONEPASS_DESIRED | WHERE_DUPLICATES_OK) if !((*NameContext)(unsafe.Pointer(bp+16)).FncFlags&NC_VarSelect != 0) { goto __22 } bComplex = 1 __22: ; wcf = U16(int32(wcf) | func() int32 { if bComplex != 0 { return 0 } return WHERE_ONEPASS_MULTIROW }()) if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __23 } // For a rowid table, initialize the RowSet to an empty set pPk = uintptr(0) nPk = int16(1) iRowSet = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, iRowSet) goto __24 __23: // For a WITHOUT ROWID table, create an ephemeral table used to // hold all primary keys for rows to be deleted. pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPk = I16((*Index)(unsafe.Pointer(pPk)).FnKeyCol) iPk = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += int32(nPk) iEphCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addrEphOpen = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iEphCur, int32(nPk)) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) __24: ; // Construct a query to find the rowid or primary key for every row // to be deleted, based on the WHERE clause. Set variable eOnePass // to indicate the strategy used to implement this delete: // // ONEPASS_OFF: Two-pass approach - use a FIFO for rowids/PK values. // ONEPASS_SINGLE: One-pass approach - at most one row deleted. // ONEPASS_MULTI: One-pass approach - any number of rows may be deleted. pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, uintptr(0), uintptr(0), uintptr(0), wcf, iTabCur+1) if !(pWInfo == uintptr(0)) { goto __25 } goto delete_from_cleanup __25: ; eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+72) if !(eOnePass != ONEPASS_SINGLE) { goto __26 } Xsqlite3MultiWrite(tls, pParse) __26: ; if !(Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) != 0) { goto __27 } Xsqlite3VdbeAddOp1(tls, v, OP_FinishSeek, iTabCur) __27: ; // Keep track of the number of rows to be deleted if !(memCnt != 0) { goto __28 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, memCnt, 1) __28: ; // Extract the rowid or primary key for the current row if !(pPk != 0) { goto __29 } i = 0 __31: if !(i < int32(nPk)) { goto __33 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))), iPk+i) goto __32 __32: i++ goto __31 goto __33 __33: ; iKey = iPk goto __30 __29: iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iTabCur, -1, iKey) __30: ; if !(eOnePass != ONEPASS_OFF) { goto __34 } // For ONEPASS, no need to store the rowid/primary-key. There is only // one, so just keep it in its register(s) and fall through to the // delete code. nKey = nPk // OP_Found will use an unpacked key aToOpen = Xsqlite3DbMallocRawNN(tls, db, uint64(nIdx+2)) if !(aToOpen == uintptr(0)) { goto __36 } Xsqlite3WhereEnd(tls, pWInfo) goto delete_from_cleanup __36: ; libc.Xmemset(tls, aToOpen, 1, uint64(nIdx+1)) *(*U8)(unsafe.Pointer(aToOpen + uintptr(nIdx+1))) = U8(0) if !(*(*int32)(unsafe.Pointer(bp + 72)) >= 0) { goto __37 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72))-iTabCur))) = U8(0) __37: ; if !(*(*int32)(unsafe.Pointer(bp + 72 + 1*4)) >= 0) { goto __38 } *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 72 + 1*4))-iTabCur))) = U8(0) __38: ; if !(addrEphOpen != 0) { goto __39 } Xsqlite3VdbeChangeToNoop(tls, v, addrEphOpen) __39: ; addrBypass = Xsqlite3VdbeMakeLabel(tls, pParse) goto __35 __34: if !(pPk != 0) { goto __40 } // Add the PK key for this row to the temporary table iKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) nKey = int16(0) // Zero tells OP_Found to use a composite key Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, iPk, int32(nPk), iKey, Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPk), int32(nPk)) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iEphCur, iKey, iPk, int32(nPk)) goto __41 __40: // Add the rowid of the row to be deleted to the RowSet nKey = int16(1) // OP_DeferredSeek always uses a single rowid Xsqlite3VdbeAddOp2(tls, v, OP_RowSetAdd, iRowSet, iKey) __41: ; Xsqlite3WhereEnd(tls, pWInfo) __35: ; // Unless this is a view, open cursors for the table we are // deleting from and all its indices. If this is a view, then the // only effect this statement has is to fire the INSTEAD OF // triggers. if !!(isView != 0) { goto __42 } iAddrOnce = 0 if !(eOnePass == ONEPASS_MULTI) { goto __43 } iAddrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) __43: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), iTabCur, aToOpen, bp+80, bp+84) if !(eOnePass == ONEPASS_MULTI) { goto __44 } Xsqlite3VdbeJumpHereOrPopInst(tls, v, iAddrOnce) __44: ; __42: ; // Set up a loop over the rowids/primary-keys that were found in the // where-clause loop above. if !(eOnePass != ONEPASS_OFF) { goto __45 } // OP_Found will use an unpacked key if !(!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) && *(*U8)(unsafe.Pointer(aToOpen + uintptr(*(*int32)(unsafe.Pointer(bp + 80))-iTabCur))) != 0) { goto __47 } Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), addrBypass, iKey, int32(nKey)) __47: ; goto __46 __45: if !(pPk != 0) { goto __48 } addrLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iEphCur) if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __50 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iEphCur, 0, iKey) goto __51 __50: Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iEphCur, iKey) __51: ; // OP_Found will use a composite key goto __49 __48: addrLoop = Xsqlite3VdbeAddOp3(tls, v, OP_RowSetRead, iRowSet, 0, iKey) __49: ; __46: ; // Delete the row if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __52 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3MayAbort(tls, pParse) if !(eOnePass == ONEPASS_SINGLE) { goto __54 } Xsqlite3VdbeAddOp1(tls, v, OP_Close, iTabCur) if !((*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0)) { goto __55 } (*Parse)(unsafe.Pointer(pParse)).FisMultiWrite = U8(0) __55: ; __54: ; Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 0, 1, iKey, pVTab, -12) Xsqlite3VdbeChangeP5(tls, v, uint16(OE_Abort)) goto __53 __52: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) // True to count changes Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 80 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 84 /* iIdxCur */)), iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 72 + 1*4))) __53: ; // End of the loop over all rowids/primary-keys. if !(eOnePass != ONEPASS_OFF) { goto __56 } Xsqlite3VdbeResolveLabel(tls, v, addrBypass) Xsqlite3WhereEnd(tls, pWInfo) goto __57 __56: if !(pPk != 0) { goto __58 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, iEphCur, addrLoop+1) Xsqlite3VdbeJumpHere(tls, v, addrLoop) goto __59 __58: Xsqlite3VdbeGoto(tls, v, addrLoop) Xsqlite3VdbeJumpHere(tls, v, addrLoop) __59: ; __57: ; __16: ; // End non-truncate path // Update the sqlite_sequence table by storing the content of the // maximum rowid counter values recorded while inserting into // autoincrement tables. if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { goto __60 } Xsqlite3AutoincrementEnd(tls, pParse) __60: ; // Return the number of rows that were deleted. If this routine is // generating code because of a call to sqlite3NestedParse(), do not // invoke the callback function. if !(memCnt != 0) { goto __61 } Xsqlite3CodeChangeCount(tls, v, memCnt, ts+16094) __61: ; delete_from_cleanup: Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) Xsqlite3DbFree(tls, db, aToOpen) return } // Make sure "isView" and other macros defined above are undefined. Otherwise // they may interfere with compilation of other functions in this file // (or in another file, if this file becomes part of the amalgamation). // This routine generates VDBE code that causes a single row of a // single table to be deleted. Both the original table entry and // all indices are removed. // // Preconditions: // // 1. iDataCur is an open cursor on the btree that is the canonical data // store for the table. (This will be either the table itself, // in the case of a rowid table, or the PRIMARY KEY index in the case // of a WITHOUT ROWID table.) // // 2. Read/write cursors for all indices of pTab must be open as // cursor number iIdxCur+i for the i-th index. // // 3. The primary key for the row to be deleted must be stored in a // sequence of nPk memory cells starting at iPk. If nPk==0 that means // that a search record formed from OP_MakeRecord is contained in the // single memory location iPk. // // eMode: // Parameter eMode may be passed either ONEPASS_OFF (0), ONEPASS_SINGLE, or // ONEPASS_MULTI. If eMode is not ONEPASS_OFF, then the cursor // iDataCur already points to the row to delete. If eMode is ONEPASS_OFF // then this function must seek iDataCur to the entry identified by iPk // and nPk before reading from it. // // If eMode is ONEPASS_MULTI, then this call is being made as part // of a ONEPASS delete that affects multiple rows. In this case, if // iIdxNoSeek is a valid cursor number (>=0) and is not the same as // iDataCur, then its position should be preserved following the delete // operation. Or, if iIdxNoSeek is not a valid cursor number, the // position of iDataCur should be preserved instead. // // iIdxNoSeek: // If iIdxNoSeek is a valid cursor number (>=0) not equal to iDataCur, // then it identifies an index cursor (from within array of cursors // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120821:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code var opSeek U8 // Seek opcode // Vdbe is guaranteed to have been allocated by this stage. // Seek cursor iCur to the row to delete. If this row no longer exists // (this can happen if a trigger program has already deleted it), do // not attempt to delete it or fire any DELETE triggers. iLabel = Xsqlite3VdbeMakeLabel(tls, pParse) if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { opSeek = uint8(OP_NotExists) } else { opSeek = uint8(OP_NotFound) } if int32(eMode) == ONEPASS_OFF { Xsqlite3VdbeAddOp4Int(tls, v, int32(opSeek), iDataCur, iLabel, iPk, int32(nPk)) } // If there are any triggers to fire, allocate a range of registers to // use for the old.* references in the triggers. if Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0 || pTrigger != 0 { var mask U32 // Mask of OLD.* columns in use var iCol int32 // Iterator used while populating OLD.* var addrStart int32 // Start of BEFORE trigger programs // TODO: Could use temporary registers here. Also could attempt to // avoid copying the contents of the rowid register. mask = Xsqlite3TriggerColmask(tls, pParse, pTrigger, uintptr(0), 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, int32(onconf)) mask = mask | Xsqlite3FkOldmask(tls, pParse, pTab) iOld = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += 1 + int32((*Table)(unsafe.Pointer(pTab)).FnCol) // Populate the OLD.* pseudo-table register array. These values will be // used by any BEFORE and AFTER triggers that exist. Xsqlite3VdbeAddOp2(tls, v, OP_Copy, iPk, iOld) for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { if mask == 0xffffffff || iCol <= 31 && mask&(uint32(uint32(1))<<iCol) != U32(0) { var kk int32 = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iCol))) Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab, iDataCur, iCol, iOld+kk+1) } } // Invoke BEFORE DELETE trigger programs. addrStart = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_DELETE, uintptr(0), TRIGGER_BEFORE, pTab, iOld, int32(onconf), iLabel) // If any BEFORE triggers were coded, then seek the cursor to the // row to be deleted again. It may be that the BEFORE triggers moved // the cursor or already deleted the row that the cursor was // pointing to. // // Also disable the iIdxNoSeek optimization since the BEFORE trigger // may have moved that cursor. if addrStart < Xsqlite3VdbeCurrentAddr(tls, v) { Xsqlite3VdbeAddOp4Int(tls, v, int32(opSeek), iDataCur, iLabel, iPk, int32(nPk)) iIdxNoSeek = -1 } // Do FK processing. This call checks that any FK constraints that // refer to this table (i.e. constraints attached to other tables) // are not violated by deleting this row. Xsqlite3FkCheck(tls, pParse, pTab, iOld, 0, uintptr(0), 0) } // Delete the index and table entries. Skip this step if pTab is really // a view (in which case the only effect of the DELETE statement is to // fire the INSTEAD OF triggers). // // If variable 'count' is non-zero, then this OP_Delete instruction should // invoke the update-hook. The pre-update-hook, on the other hand should // be invoked unless table pTab is a system table. The difference is that // the update-hook is not invoked for rows removed by REPLACE, but the // pre-update-hook is. if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { var p5 U8 = U8(0) Xsqlite3GenerateRowIndexDelete(tls, pParse, pTab, iDataCur, iIdxCur, uintptr(0), iIdxNoSeek) Xsqlite3VdbeAddOp2(tls, v, OP_Delete, iDataCur, func() int32 { if count != 0 { return OPFLAG_NCHANGE } return 0 }()) if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+12585) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_AUXDELETE)) } if iIdxNoSeek >= 0 && iIdxNoSeek != iDataCur { Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iIdxNoSeek) } if int32(eMode) == ONEPASS_MULTI { p5 = U8(int32(p5) | OPFLAG_SAVEPOSITION) } Xsqlite3VdbeChangeP5(tls, v, uint16(p5)) } // Do any ON CASCADE, SET NULL or SET DEFAULT operations required to // handle rows (possibly in other tables) that refer via a foreign key // to the row just deleted. Xsqlite3FkActions(tls, pParse, pTab, uintptr(0), iOld, uintptr(0), 0) // Invoke AFTER DELETE trigger programs. Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_DELETE, uintptr(0), TRIGGER_AFTER, pTab, iOld, int32(onconf), iLabel) // Jump here if the row had already been deleted before any BEFORE // trigger programs were invoked. Or if a trigger program throws a // RAISE(IGNORE) exception. Xsqlite3VdbeResolveLabel(tls, v, iLabel) } // This routine generates VDBE code that causes the deletion of all // index entries associated with a single row of a single table, pTab // // Preconditions: // // 1. A read/write cursor "iDataCur" must be open on the canonical storage // btree for the table pTab. (This will be either the table itself // for rowid tables or to the primary key index for WITHOUT ROWID // tables.) // // 2. Read/write cursors for all indices of pTab must be open as // cursor number iIdxCur+i for the i-th index. (The pTab->pIndex // index is the 0-th index.) // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:120973:21: */ bp := tls.Alloc(4) defer tls.Free(4) var i int32 // Index loop counter var r1 int32 = -1 // Register holding an index key // var iPartIdxLabel int32 at bp, 4 // Jump destination for skipping partial index entries var pIdx uintptr // Current index var pPrior uintptr = uintptr(0) // Prior index var v uintptr // The prepared statement under construction var pPk uintptr // PRIMARY KEY index, or NULL for rowid tables v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { pPk = uintptr(0) } else { pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) } i = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __1: if !(pIdx != 0) { goto __3 } { if aRegIdx != uintptr(0) && *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) == 0 { goto __2 } if pIdx == pPk { goto __2 } if iIdxCur+i == iIdxNoSeek { goto __2 } r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx, iDataCur, 0, 1, bp, pPrior, r1) Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, iIdxCur+i, r1, func() int32 { if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) } return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) }()) Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Cause IdxDelete to error if no entry found Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp /* iPartIdxLabel */))) pPrior = pIdx } goto __2 __2: i++ pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext goto __1 goto __3 __3: } // Generate code that will assemble an index key and stores it in register // regOut. The key with be for index pIdx which is an index on pTab. // iCur is the index of a cursor open on the pTab table and pointing to // the entry that needs indexing. If pTab is a WITHOUT ROWID table, then // iCur must be the cursor of the PRIMARY KEY index. // // Return a register number which is the first in a block of // registers that holds the elements of the index key. The // block of registers has already been deallocated by the time // this routine returns. // // If *piPartIdxLabel is not NULL, fill it in with a label and jump // to that label if pIdx is a partial index that should be skipped. // The label should be resolved using sqlite3ResolvePartIdxLabel(). // A partial index should be skipped if its WHERE clause evaluates // to false or null. If pIdx is not a partial index, *piPartIdxLabel // will be set to zero which is an empty label that is ignored by // sqlite3ResolvePartIdxLabel(). // // The pPrior and regPrior parameters are used to implement a cache to // avoid unnecessary register loads. If pPrior is not NULL, then it is // a pointer to a different index for which an index key has just been // computed into register regPrior. If the current pIdx index is generating // its key into the same sequence of registers and if pPrior and pIdx share // a column in common, then the register corresponding to that column already // holds the correct value and the loading of that register is skipped. // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121038:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 var nCol int32 if piPartIdxLabel != 0 { if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { *(*int32)(unsafe.Pointer(piPartIdxLabel)) = Xsqlite3VdbeMakeLabel(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = iDataCur + 1 Xsqlite3ExprIfFalseDup(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, *(*int32)(unsafe.Pointer(piPartIdxLabel)), SQLITE_JUMPIFNULL) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 pPrior = uintptr(0) // Ticket a9efb42811fa41ee 2019-11-02; // pPartIdxWhere may have corrupted regPrior registers } else { *(*int32)(unsafe.Pointer(piPartIdxLabel)) = 0 } } if prefixOnly != 0 && uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) } else { nCol = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) } regBase = Xsqlite3GetTempRange(tls, pParse, nCol) if pPrior != 0 && (regBase != regPrior || (*Index)(unsafe.Pointer(pPrior)).FpPartIdxWhere != 0) { pPrior = uintptr(0) } for j = 0; j < nCol; j++ { if pPrior != 0 && int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPrior)).FaiColumn + uintptr(j)*2))) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) && int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPrior)).FaiColumn + uintptr(j)*2))) != -2 { // This column was already computed by the previous index continue } Xsqlite3ExprCodeLoadIndexColumn(tls, pParse, pIdx, iDataCur, j, regBase+j) if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2))) >= 0 { // If the column affinity is REAL but the number is an integer, then it // might be stored in the table as an integer (using a compact // representation) then converted to REAL by an OP_RealAffinity opcode. // But we are getting ready to store this value back into an index, where // it should be converted by to INTEGER again. So omit the // OP_RealAffinity opcode if it is present Xsqlite3VdbeDeletePriorOpcode(tls, v, uint8(OP_RealAffinity)) } } if regOut != 0 { Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase, nCol, regOut) } Xsqlite3ReleaseTempRange(tls, pParse, regBase, nCol) return regBase } // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121100:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } } //************* End of delete.c ********************************************* //************* Begin file func.c ******************************************* // 2002 February 23 // // 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 C-language implementations for many of the SQL // functions of SQLite. (Some function, and in particular the date and // time functions, are implemented separately.) // #include "sqliteInt.h" // #include <stdlib.h> // #include <assert.h> // #include <math.h> // #include "vdbeInt.h" // Return the collating function associated with a function. func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121134:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*24 return *(*uintptr)(unsafe.Pointer(pOp + 16)) } // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121147:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121156:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 var pColl uintptr if Xsqlite3_user_data(tls, context) == uintptr(0) { mask = 0 } else { mask = -1 } pColl = sqlite3GetFuncCollSeq(tls, context) iBest = 0 if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } for i = 1; i < argc; i++ { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) == SQLITE_NULL { return } if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(iBest)*8)), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), pColl)^mask >= 0 { iBest = i } } Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(iBest)*8))) } // Return the type of the argument. func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121186:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed // EVIDENCE-OF: R-01470-60482 The sqlite3_value_type(V) interface returns // the datatype code for the initial datatype of the sqlite3_value object // V. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT, // SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } var azType2 = [5]uintptr{ts + 7494, ts + 7489, ts + 9244, ts + 9239, ts + 7484} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121191:21 */ // subtype(X) // // Return the subtype of X func subtypeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121211:13: */ _ = argc Xsqlite3_result_int(tls, context, int32(Xsqlite3_value_subtype(tls, *(*uintptr)(unsafe.Pointer(argv))))) } // Implementation of the length() function func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121223:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_BLOB: fallthrough case SQLITE_INTEGER: fallthrough case SQLITE_FLOAT: { Xsqlite3_result_int(tls, context, Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) break } case SQLITE_TEXT: { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var z0 uintptr var c uint8 if z == uintptr(0) { return } z0 = z for int32(libc.AssignUint8(&c, *(*uint8)(unsafe.Pointer(z)))) != 0 { z++ if int32(c) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { z++ z0++ } } } Xsqlite3_result_int(tls, context, int32((int64(z)-int64(z0))/1)) break } default: { Xsqlite3_result_null(tls, context) break } } } // Implementation of the abs() function. // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121265:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: { var iVal I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if iVal < int64(0) { if iVal == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. Xsqlite3_result_error(tls, context, ts+16107, -1) return } iVal = -iVal } Xsqlite3_result_int64(tls, context, iVal) break } case SQLITE_NULL: { // IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. Xsqlite3_result_null(tls, context) break } default: { // Because sqlite3_value_double() returns 0.0 if the argument is not // something that can be converted into a number, we have: // IMP: R-01992-00519 Abs(X) returns 0.0 if X is a string or blob // that cannot be converted to a numeric value. var rVal float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) if rVal < float64(0) { rVal = -rVal } Xsqlite3_result_double(tls, context, rVal) break } } } // Implementation of the instr() function. // // instr(haystack,needle) finds the first occurrence of needle // in haystack and returns the number of previous characters plus 1, // or 0 if needle does not occur within haystack. // // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121314:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 var nNeedle int32 var typeHaystack int32 var typeNeedle int32 var N int32 var isText int32 var firstChar uint8 var pC1 uintptr var pC2 uintptr N = 1 pC1 = uintptr(0) pC2 = uintptr(0) _ = argc typeHaystack = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) typeNeedle = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if !(typeHaystack == SQLITE_NULL || typeNeedle == SQLITE_NULL) { goto __1 } return __1: ; nHaystack = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) nNeedle = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if !(nNeedle > 0) { goto __2 } if !(typeHaystack == SQLITE_BLOB && typeNeedle == SQLITE_BLOB) { goto __3 } zHaystack = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) zNeedle = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) isText = 0 goto __4 __3: if !(typeHaystack != SQLITE_BLOB && typeNeedle != SQLITE_BLOB) { goto __5 } zHaystack = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zNeedle = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) isText = 1 goto __6 __5: pC1 = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(argv))) zHaystack = Xsqlite3_value_text(tls, pC1) if !(zHaystack == uintptr(0)) { goto __7 } goto endInstrOOM __7: ; nHaystack = Xsqlite3_value_bytes(tls, pC1) pC2 = Xsqlite3_value_dup(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) zNeedle = Xsqlite3_value_text(tls, pC2) if !(zNeedle == uintptr(0)) { goto __8 } goto endInstrOOM __8: ; nNeedle = Xsqlite3_value_bytes(tls, pC2) isText = 1 __6: ; __4: ; if !(zNeedle == uintptr(0) || nHaystack != 0 && zHaystack == uintptr(0)) { goto __9 } goto endInstrOOM __9: ; firstChar = *(*uint8)(unsafe.Pointer(zNeedle)) __10: if !(nNeedle <= nHaystack && (int32(*(*uint8)(unsafe.Pointer(zHaystack))) != int32(firstChar) || libc.Xmemcmp(tls, zHaystack, zNeedle, uint64(nNeedle)) != 0)) { goto __11 } N++ __12: nHaystack-- zHaystack++ goto __13 __13: if isText != 0 && int32(*(*uint8)(unsafe.Pointer(zHaystack)))&0xc0 == 0x80 { goto __12 } goto __14 __14: ; goto __10 __11: ; if !(nNeedle > nHaystack) { goto __15 } N = 0 __15: ; __2: ; Xsqlite3_result_int(tls, context, N) endInstr: Xsqlite3_value_free(tls, pC1) Xsqlite3_value_free(tls, pC2) return endInstrOOM: Xsqlite3_result_error_nomem(tls, context) goto endInstr } // Implementation of the printf() (a.k.a. format()) SQL function. func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121382:13: */ bp := tls.Alloc(56) defer tls.Free(56) // var x PrintfArguments at bp+40, 16 // var str StrAccum at bp+8, 32 var zFormat uintptr var n int32 var db uintptr = Xsqlite3_context_db_handle(tls, context) if argc >= 1 && libc.AssignUintptr(&zFormat, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != uintptr(0) { (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnArg = argc - 1 (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnUsed = 0 (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FapArg = argv + uintptr(1)*8 Xsqlite3StrAccumInit(tls, bp+8, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) (*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_SQLFUNC) Xsqlite3_str_appendf(tls, bp+8, zFormat, libc.VaList(bp, bp+40)) n = int32((*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FnChar) Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+8), n, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) } } // Implementation of the substr() function. // // substr(x,p1,p2) returns p2 characters of x[] beginning with p1. // p1 is 1-indexed. So substr(x,1,1) returns the first character // of x. If x is text, then we actually count UTF-8 characters. // If x is a blob, then we count bytes. // // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121418:13: */ var z uintptr var z2 uintptr var len int32 var p0type int32 var p1 I64 var p2 I64 var negP2 int32 = 0 if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_NULL || argc == 3 && Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) == SQLITE_NULL { return } p0type = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) p1 = I64(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) if p0type == SQLITE_BLOB { len = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) z = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) if z == uintptr(0) { return } } else { z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if z == uintptr(0) { return } len = 0 if p1 < int64(0) { for z2 = z; *(*uint8)(unsafe.Pointer(z2)) != 0; len++ { { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z2, 1)))) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z2)))&0xc0 == 0x80 { z2++ } } } } } } if argc == 3 { p2 = I64(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8)))) if p2 < int64(0) { p2 = -p2 negP2 = 1 } } else { p2 = I64(*(*int32)(unsafe.Pointer(Xsqlite3_context_db_handle(tls, context) + 136))) } if p1 < int64(0) { p1 = p1 + I64(len) if p1 < int64(0) { p2 = p2 + p1 if p2 < int64(0) { p2 = int64(0) } p1 = int64(0) } } else if p1 > int64(0) { p1-- } else if p2 > int64(0) { p2-- } if negP2 != 0 { p1 = p1 - p2 if p1 < int64(0) { p2 = p2 + p1 p1 = int64(0) } } if p0type != SQLITE_BLOB { for *(*uint8)(unsafe.Pointer(z)) != 0 && p1 != 0 { { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { z++ } } } p1-- } for z2 = z; *(*uint8)(unsafe.Pointer(z2)) != 0 && p2 != 0; p2-- { { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z2, 1)))) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z2)))&0xc0 == 0x80 { z2++ } } } } Xsqlite3_result_text64(tls, context, z, uint64((int64(z2)-int64(z))/1), libc.UintptrFromInt32(-1), uint8(SQLITE_UTF8)) } else { if p1+p2 > I64(len) { p2 = I64(len) - p1 if p2 < int64(0) { p2 = int64(0) } } Xsqlite3_result_blob64(tls, context, z+uintptr(p1), U64(p2), libc.UintptrFromInt32(-1)) } } // Implementation of the round() function func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121513:13: */ bp := tls.Alloc(24) defer tls.Free(24) var n int32 = 0 // var r float64 at bp+16, 8 var zBuf uintptr if argc == 2 { if SQLITE_NULL == Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) { return } n = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if n > 30 { n = 30 } if n < 0 { n = 0 } } if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) // If Y==0 and X will fit in a 64-bit int, // handle the rounding directly, // otherwise use printf. if *(*float64)(unsafe.Pointer(bp + 16)) < -4503599627370496.0 || *(*float64)(unsafe.Pointer(bp + 16)) > +4503599627370496.0 { // The value has no fractional part so there is nothing to round } else if n == 0 { *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = float64(libc.Int64FromFloat64(*(*float64)(unsafe.Pointer(bp + 16)) + func() float64 { if *(*float64)(unsafe.Pointer(bp + 16)) < float64(0) { return -0.5 } return +0.5 }())) } else { zBuf = Xsqlite3_mprintf(tls, ts+16124, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return } Xsqlite3AtoF(tls, zBuf, bp+16, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) Xsqlite3_free(tls, zBuf) } Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) } // Allocate nByte bytes of space using sqlite3Malloc(). If the // allocation fails, call sqlite3_result_error_nomem() to notify // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121554:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) if nByte > I64(*(*int32)(unsafe.Pointer(db + 136))) { Xsqlite3_result_error_toobig(tls, context) z = uintptr(0) } else { z = Xsqlite3Malloc(tls, uint64(nByte)) if !(z != 0) { Xsqlite3_result_error_nomem(tls, context) } } return z } // Implementation of the upper() and lower() SQL functions. func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121575:13: */ var z1 uintptr var z2 uintptr var i int32 var n int32 _ = argc z2 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) // Verify that the call to _bytes() does not invalidate the _text() pointer if z2 != 0 { z1 = contextMalloc(tls, context, I64(n)+int64(1)) if z1 != 0 { for i = 0; i < n; i++ { *(*int8)(unsafe.Pointer(z1 + uintptr(i))) = int8(int32(*(*int8)(unsafe.Pointer(z2 + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z2 + uintptr(i))))]) & 0x20)) } Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } } } func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121594:13: */ var z1 uintptr var z2 uintptr var i int32 var n int32 _ = argc z2 = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) // Verify that the call to _bytes() does not invalidate the _text() pointer if z2 != 0 { z1 = contextMalloc(tls, context, I64(n)+int64(1)) if z1 != 0 { for i = 0; i < n; i++ { *(*int8)(unsafe.Pointer(z1 + uintptr(i))) = int8(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(z2 + uintptr(i))))]) } Xsqlite3_result_text(tls, context, z1, n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } } } // Some functions like COALESCE() and IFNULL() and UNLIKELY() are implemented // as VDBE code so that unused argument values do not have to be computed. // However, we still need some kind of function implementation for this // routines in the function table. The noopFunc macro provides this. // noopFunc will never be called so it doesn't matter what the implementation // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121627:13: */ bp := tls.Alloc(8) defer tls.Free(8) // var r Sqlite_int64 at bp, 8 _ = NotUsed _ = NotUsed2 Xsqlite3_randomness(tls, int32(unsafe.Sizeof(Sqlite_int64(0))), bp) if *(*Sqlite_int64)(unsafe.Pointer(bp)) < int64(0) { // We need to prevent a random number of 0x8000000000000000 // (or -9223372036854775808) since when you do abs() of that // number of you get the same value back again. To do this // in a way that is testable, mask the sign bit off of negative // values, resulting in a positive value. Then take the // 2s complement of that positive value. The end result can // therefore be no less than -9223372036854775807. *(*Sqlite_int64)(unsafe.Pointer(bp /* r */)) = -(*(*Sqlite_int64)(unsafe.Pointer(bp)) & (int64(0xffffffff) | I64(int64(0x7fffffff))<<32)) } Xsqlite3_result_int64(tls, context, *(*Sqlite_int64)(unsafe.Pointer(bp /* r */))) } // Implementation of randomblob(N). Return a random blob // that is N bytes long. func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121653:13: */ var n Sqlite3_int64 var p uintptr _ = argc n = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if n < int64(1) { n = int64(1) } p = contextMalloc(tls, context, n) if p != 0 { Xsqlite3_randomness(tls, int32(n), p) Xsqlite3_result_blob(tls, context, p, int32(n), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } } // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121677:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 // IMP: R-51513-12026 The last_insert_rowid() SQL function is a // wrapper around the sqlite3_last_insert_rowid() C/C++ interface // function. Xsqlite3_result_int64(tls, context, Xsqlite3_last_insert_rowid(tls, db)) } // Implementation of the changes() SQL function. // // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121697:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 Xsqlite3_result_int64(tls, context, Xsqlite3_changes64(tls, db)) } // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121711:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 // IMP: R-11217-42568 This function is a wrapper around the // sqlite3_total_changes64() C/C++ interface. Xsqlite3_result_int64(tls, context, Xsqlite3_total_changes64(tls, db)) } // A structure defining how to do GLOB-style comparisons. type compareInfo = struct { FmatchAll U8 FmatchOne U8 FmatchSet U8 FnoCase U8 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121726:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121746:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121749:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121752:33 */ // Possible error returns from patternMatch() // Compare two UTF-8 strings for equality where the first string is // a GLOB or LIKE expression. Return values: // // SQLITE_MATCH: Match // SQLITE_NOMATCH: No match // SQLITE_NOWILDCARDMATCH: No match in spite of having * or % wildcards. // // 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. // // With the [...] and [^...] matching, a ']' character can be included // in the list by making it the first character after '[' or '^'. A // range of characters can be specified using '-'. Example: // "[a-z]" matches any single lower-case letter. To match a '-', make // it the last character in the list. // // Like matching rules: // // '%' Matches any sequence of zero or more characters // // '_' Matches any one character // // Ec Where E is the "esc" character and c is any other // character, including '%', '_', and esc, match exactly c. // // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121799:12: */ bp := tls.Alloc(19) defer tls.Free(19) *(*uintptr)(unsafe.Pointer(bp)) = zPattern *(*uintptr)(unsafe.Pointer(bp + 8)) = zString var c U32 var c2 U32 // Next pattern and input string chars var matchOne U32 = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) // "?" or "_" var matchAll U32 = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) // "*" or "%" var noCase U8 = (*compareInfo)(unsafe.Pointer(pInfo)).FnoCase // True if uppercase==lowercase var zEscaped uintptr = uintptr(0) // One past the last escaped input char for libc.AssignUint32(&c, func() uint32 { if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) } return Xsqlite3Utf8Read(tls, bp) }()) != U32(0) { if c == matchAll { // Match "*" // Skip over multiple "*" characters in the pattern. If there // are also "?" characters, skip those as well, but consume a // single character of the input string for each "?" skipped for libc.AssignUint32(&c, func() uint32 { if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) < 0x80 { return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp)), 1)))) } return Xsqlite3Utf8Read(tls, bp) }()) == matchAll || c == matchOne && matchOne != U32(0) { if c == matchOne && Xsqlite3Utf8Read(tls, bp+8) == U32(0) { return SQLITE_NOWILDCARDMATCH } } if c == U32(0) { return SQLITE_MATCH // "*" at the end of the pattern matches } else if c == matchOther { if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { c = Xsqlite3Utf8Read(tls, bp) if c == U32(0) { return SQLITE_NOWILDCARDMATCH } } else { // "[...]" immediately follows the "*". We have to do a slow // recursive search in this case, but it is an unusual case. // '[' is a single-byte character for *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))) != 0 { var bMatch int32 = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp))+libc.UintptrFromInt32(-1), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) if bMatch != SQLITE_NOMATCH { return bMatch } { if int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) >= 0xc0 { for int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8)))))&0xc0 == 0x80 { *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */))++ } } } } return SQLITE_NOWILDCARDMATCH } } // At this point variable c contains the first character of the // pattern string past the "*". Search in the input string for the // first matching character and recursively continue the match from // that point. // // For a case-insensitive search, set variable cx to be the same as // c but in the other case and search the input string for either // c or cx. if c <= U32(0x80) { // var zStop [3]int8 at bp+16, 3 var bMatch int32 if noCase != 0 { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) *(*int8)(unsafe.Pointer(bp + 16 + 1)) = int8(Xsqlite3UpperToLower[uint8(c)]) *(*int8)(unsafe.Pointer(bp + 16 + 2)) = int8(0) } else { *(*int8)(unsafe.Pointer(bp + 16)) = int8(c) *(*int8)(unsafe.Pointer(bp + 16 + 1)) = int8(0) } for 1 != 0 { *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)) += uintptr(libc.Xstrcspn(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), bp+16)) if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 0 { break } *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */))++ bMatch = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* zPattern */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) if bMatch != SQLITE_NOMATCH { return bMatch } } } else { var bMatch int32 for libc.AssignUint32(&c2, func() uint32 { if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) < 0x80 { return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) } return Xsqlite3Utf8Read(tls, bp+8) }()) != U32(0) { if c2 != c { continue } bMatch = patternCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* zPattern */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* zString */)), pInfo, matchOther) if bMatch != SQLITE_NOMATCH { return bMatch } } } return SQLITE_NOWILDCARDMATCH } if c == matchOther { if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { c = Xsqlite3Utf8Read(tls, bp) if c == U32(0) { return SQLITE_NOMATCH } zEscaped = *(*uintptr)(unsafe.Pointer(bp /* zPattern */)) } else { var prior_c U32 = U32(0) var seen int32 = 0 var invert int32 = 0 c = Xsqlite3Utf8Read(tls, bp+8) if c == U32(0) { return SQLITE_NOMATCH } c2 = Xsqlite3Utf8Read(tls, bp) if c2 == U32('^') { invert = 1 c2 = Xsqlite3Utf8Read(tls, bp) } if c2 == U32(']') { if c == U32(']') { seen = 1 } c2 = Xsqlite3Utf8Read(tls, bp) } for c2 != 0 && c2 != U32(']') { if c2 == U32('-') && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != ']' && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0 && prior_c > U32(0) { c2 = Xsqlite3Utf8Read(tls, bp) if c >= prior_c && c <= c2 { seen = 1 } prior_c = U32(0) } else { if c == c2 { seen = 1 } prior_c = c2 } c2 = Xsqlite3Utf8Read(tls, bp) } if c2 == U32(0) || seen^invert == 0 { return SQLITE_NOMATCH } continue } } c2 = func() uint32 { if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) < 0x80 { return uint32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&*(*uintptr)(unsafe.Pointer(bp + 8)), 1)))) } return Xsqlite3Utf8Read(tls, bp+8) }() if c == c2 { continue } if noCase != 0 && int32(Xsqlite3UpperToLower[uint8(c)]) == int32(Xsqlite3UpperToLower[uint8(c2)]) && c < U32(0x80) && c2 < U32(0x80) { continue } if c == matchOne && *(*uintptr)(unsafe.Pointer(bp)) != zEscaped && c2 != U32(0) { continue } return SQLITE_NOMATCH } if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8))))) == 0 { return SQLITE_MATCH } return SQLITE_NOMATCH } // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121932:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121940:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } // Count the number of times that the LIKE operator (or GLOB which is // just a variation of LIKE) gets called. This is used for testing // only. // Implementation of the like() SQL function. This function implements // the build-in LIKE operator. The first argument to the function is the // pattern and the second argument is the string. So, the SQL statements: // // A LIKE B // // is implemented as like(B,A). // // This same function (with a different compareInfo structure) computes // the GLOB operator. func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:121966:13: */ bp := tls.Alloc(12) defer tls.Free(12) var zA uintptr var zB uintptr var escape U32 var nPat int32 var db uintptr = Xsqlite3_context_db_handle(tls, context) var pInfo uintptr = Xsqlite3_user_data(tls, context) // var backupInfo compareInfo at bp+8, 4 if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_BLOB || Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) == SQLITE_BLOB { Xsqlite3_result_int(tls, context, 0) return } // Limit the length of the LIKE or GLOB pattern to avoid problems // of deep recursion and N*N behavior in patternCompare(). nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 136 + 8*4)) { Xsqlite3_result_error(tls, context, ts+16129, -1) return } if argc == 3 { // The escape character string must consist of a single UTF-8 character. // Otherwise, return an error. *(*uintptr)(unsafe.Pointer(bp /* zEsc */)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { return } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, ts+16162, -1) return } escape = Xsqlite3Utf8Read(tls, bp) if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) || escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) { libc.Xmemcpy(tls, bp+8, pInfo, uint64(unsafe.Sizeof(compareInfo{}))) pInfo = bp + 8 /* &backupInfo */ if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) { (*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll = U8(0) } if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) { (*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne = U8(0) } } } else { escape = U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) } zB = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) zA = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if zA != 0 && zB != 0 { Xsqlite3_result_int(tls, context, libc.Bool32(patternCompare(tls, zB, zA, pInfo, escape) == SQLITE_MATCH)) } } // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122037:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*8)), pColl) != 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) } } // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122053:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the // sqlite3_libversion() C-interface. Xsqlite3_result_text(tls, context, Xsqlite3_libversion(tls), -1, uintptr(0)) } // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122069:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the // sqlite3_sourceid() C interface. Xsqlite3_result_text(tls, context, Xsqlite3_sourceid(tls), -1, uintptr(0)) } // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122085:13: */ bp := tls.Alloc(8) defer tls.Free(8) _ = argc _ = context Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+4444, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))))) } // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122101:13: */ var zOptName uintptr _ = argc // IMP: R-39564-36305 The sqlite_compileoption_used() SQL // function is a wrapper around the sqlite3_compileoption_used() C/C++ // function. if libc.AssignUintptr(&zOptName, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv)))) != uintptr(0) { Xsqlite3_result_int(tls, context, Xsqlite3_compileoption_used(tls, zOptName)) } } // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122125:13: */ var n int32 _ = argc // IMP: R-04922-24076 The sqlite_compileoption_get() SQL function // is a wrapper around the sqlite3_compileoption_get() C/C++ function. n = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))) Xsqlite3_result_text(tls, context, Xsqlite3_compileoption_get(tls, n), -1, uintptr(0)) } // Array for converting from half-bytes (nybbles) into ASCII hex // digits. var hexdigits = [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'), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122143:19 */ // Append to pStr text that is the SQL literal representation of the // value contained in pValue. func Xsqlite3QuoteValue(tls *libc.TLS, pStr uintptr, pValue uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122152:21: */ bp := tls.Alloc(40) defer tls.Free(40) // As currently implemented, the string must be initially empty. // we might relax this requirement in the future, but that will // require enhancements to the implementation. switch Xsqlite3_value_type(tls, pValue) { case SQLITE_FLOAT: { var r1 float64 // var r2 float64 at bp+32, 8 var zVal uintptr r1 = Xsqlite3_value_double(tls, pValue) Xsqlite3_str_appendf(tls, pStr, ts+6228, libc.VaList(bp, r1)) zVal = Xsqlite3_str_value(tls, pStr) if zVal != 0 { Xsqlite3AtoF(tls, zVal, bp+32, int32((*StrAccum)(unsafe.Pointer(pStr)).FnChar), uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 32)) { Xsqlite3_str_reset(tls, pStr) Xsqlite3_str_appendf(tls, pStr, ts+16207, libc.VaList(bp+8, r1)) } } break } case SQLITE_INTEGER: { Xsqlite3_str_appendf(tls, pStr, ts+1304, libc.VaList(bp+16, Xsqlite3_value_int64(tls, pValue))) break } case SQLITE_BLOB: { var zBlob uintptr = Xsqlite3_value_blob(tls, pValue) var nBlob int32 = Xsqlite3_value_bytes(tls, pValue) // No encoding change Xsqlite3StrAccumEnlarge(tls, pStr, nBlob*2+4) if int32((*StrAccum)(unsafe.Pointer(pStr)).FaccError) == 0 { var zText uintptr = (*StrAccum)(unsafe.Pointer(pStr)).FzText var i int32 for i = 0; i < nBlob; i++ { *(*int8)(unsafe.Pointer(zText + uintptr(i*2+2))) = hexdigits[int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i))))>>4&0x0F] *(*int8)(unsafe.Pointer(zText + uintptr(i*2+3))) = hexdigits[int32(*(*int8)(unsafe.Pointer(zBlob + uintptr(i))))&0x0F] } *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*2+2))) = int8('\'') *(*int8)(unsafe.Pointer(zText + uintptr(nBlob*2+3))) = int8(0) *(*int8)(unsafe.Pointer(zText)) = int8('X') *(*int8)(unsafe.Pointer(zText + 1)) = int8('\'') (*StrAccum)(unsafe.Pointer(pStr)).FnChar = U32(nBlob*2 + 3) } break } case SQLITE_TEXT: { var zArg uintptr = Xsqlite3_value_text(tls, pValue) Xsqlite3_str_appendf(tls, pStr, ts+16214, libc.VaList(bp+24, zArg)) break } default: { Xsqlite3_str_append(tls, pStr, ts+1525, 4) break } } } // Implementation of the QUOTE() function. // // The quote(X) function returns the text of an SQL literal which is the // value of its argument suitable for inclusion into an SQL statement. // Strings are surrounded by single-quotes with escapes on interior quotes // as needed. BLOBs are encoded as hexadecimal literals. Strings with // embedded NUL characters cannot be represented as string literals in SQL // and hence the returned string literal is truncated prior to the first NUL. func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122221:13: */ bp := tls.Alloc(32) defer tls.Free(32) // var str Sqlite3_str at bp, 32 var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = argc Xsqlite3StrAccumInit(tls, bp, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 136))) Xsqlite3QuoteValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv))) Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp), int32((*Sqlite3_str)(unsafe.Pointer(bp /* &str */)).FnChar), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) if int32((*Sqlite3_str)(unsafe.Pointer(bp)).FaccError) != SQLITE_OK { Xsqlite3_result_null(tls, context) Xsqlite3_result_error_code(tls, context, int32((*Sqlite3_str)(unsafe.Pointer(bp /* &str */)).FaccError)) } } // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122240:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* z */)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) _ = argc if *(*uintptr)(unsafe.Pointer(bp)) != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 { Xsqlite3_result_int(tls, context, int32(Xsqlite3Utf8Read(tls, bp))) } } // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122255:13: */ var z uintptr var zOut uintptr var i int32 zOut = libc.AssignUintptr(&z, Xsqlite3_malloc64(tls, uint64(argc*4+1))) if z == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return } for i = 0; i < argc; i++ { var x Sqlite3_int64 var c uint32 x = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if x < int64(0) || x > int64(0x10ffff) { x = int64(0xfffd) } c = uint32(x & int64(0x1fffff)) if c < uint32(0x00080) { *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = U8(c & uint32(0xFF)) } else if c < uint32(0x00800) { *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xC0 + int32(U8(c>>6&uint32(0x1F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) } else if c < uint32(0x10000) { *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xE0 + int32(U8(c>>12&uint32(0x0F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) } else { *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0xF0 + int32(U8(c>>18&uint32(0x07)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>12&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c>>6&uint32(0x3F)))) *(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&zOut, 1))) = uint8(0x80 + int32(U8(c&uint32(0x3F)))) } } Xsqlite3_result_text64(tls, context, z, uint64((int64(zOut)-int64(z))/1), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free})), uint8(SQLITE_UTF8)) } // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122296:13: */ var i int32 var n int32 var pBlob uintptr var zHex uintptr var z uintptr _ = argc pBlob = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) n = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) // No encoding change z = libc.AssignUintptr(&zHex, contextMalloc(tls, context, I64(n)*int64(2)+int64(1))) if zHex != 0 { i = 0 __1: if !(i < n) { goto __3 } { var c uint8 = *(*uint8)(unsafe.Pointer(pBlob)) *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[int32(c)>>4&0xf] *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1))) = hexdigits[int32(c)&0xf] } goto __2 __2: i++ pBlob++ goto __1 goto __3 __3: ; *(*int8)(unsafe.Pointer(z)) = int8(0) Xsqlite3_result_text(tls, context, zHex, n*2, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } } // The zeroblob(N) function returns a zero-filled blob of size N bytes. func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122324:13: */ var n I64 var rc int32 _ = argc n = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) if n < int64(0) { n = int64(0) } rc = Xsqlite3_result_zeroblob64(tls, context, uint64(n)) // IMP: R-00293-64994 if rc != 0 { Xsqlite3_result_error_code(tls, context, rc) } } // The replace() function. Three arguments are all strings: call // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122347:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C var zOut uintptr // The output var nStr int32 // Size of zStr var nPattern int32 // Size of zPattern var nRep int32 // Size of zRep var nOut I64 // Maximum size of zOut var loopLimit int32 // Last zStr[] that might match zPattern[] var i int32 var j int32 // Loop counters var cntExpand uint32 // Number zOut expansions var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = argc zStr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zStr == uintptr(0) { return } nStr = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) // No encoding change zPattern = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if zPattern == uintptr(0) { return } if int32(*(*uint8)(unsafe.Pointer(zPattern))) == 0 { Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv))) return } nPattern = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) // No encoding change zRep = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) if zRep == uintptr(0) { return } nRep = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 2*8))) nOut = I64(nStr + 1) zOut = contextMalloc(tls, context, nOut) if zOut == uintptr(0) { return } loopLimit = nStr - nPattern cntExpand = uint32(0) for i = libc.AssignInt32(&j, 0); i <= loopLimit; i++ { if int32(*(*uint8)(unsafe.Pointer(zStr + uintptr(i)))) != int32(*(*uint8)(unsafe.Pointer(zPattern))) || libc.Xmemcmp(tls, zStr+uintptr(i), zPattern, uint64(nPattern)) != 0 { *(*uint8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&j, 1)))) = *(*uint8)(unsafe.Pointer(zStr + uintptr(i))) } else { if nRep > nPattern { nOut = nOut + I64(nRep-nPattern) if nOut-int64(1) > I64(*(*int32)(unsafe.Pointer(db + 136))) { Xsqlite3_result_error_toobig(tls, context) Xsqlite3_free(tls, zOut) return } cntExpand++ if cntExpand&(cntExpand-uint32(1)) == uint32(0) { // Grow the size of the output buffer only on substitutions // whose index is a power of two: 1, 2, 4, 8, 16, 32, ... var zOld uintptr zOld = zOut zOut = Xsqlite3Realloc(tls, zOut, uint64(I64(int32(nOut))+(nOut-I64(nStr)-int64(1)))) if zOut == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) Xsqlite3_free(tls, zOld) return } } } libc.Xmemcpy(tls, zOut+uintptr(j), zRep, uint64(nRep)) j = j + nRep i = i + (nPattern - 1) } } libc.Xmemcpy(tls, zOut+uintptr(j), zStr+uintptr(i), uint64(nStr-i)) j = j + (nStr - i) *(*uint8)(unsafe.Pointer(zOut + uintptr(j))) = uint8(0) Xsqlite3_result_text(tls, context, zOut, j, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122440:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input var flags int32 // 1: trimleft 2: trimright 3: trim var i int32 // Loop counter var aLen uintptr = uintptr(0) // Length of each character in zCharSet var azChar uintptr = uintptr(0) // Individual characters in zCharSet var nChar int32 // Number of characters in zCharSet if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { return } nIn = uint32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv)))) if argc == 1 { nChar = 1 aLen = uintptr(uintptr(unsafe.Pointer(&lenOne))) azChar = uintptr(uintptr(unsafe.Pointer(&azOne))) zCharSet = uintptr(0) } else if libc.AssignUintptr(&zCharSet, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) == uintptr(0) { return } else { var z uintptr z = zCharSet nChar = 0 for ; *(*uint8)(unsafe.Pointer(z)) != 0; nChar++ { { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { z++ } } } } if nChar > 0 { azChar = contextMalloc(tls, context, int64(uint64(I64(nChar))*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(unsafe.Sizeof(uint32(0)))))) if azChar == uintptr(0) { return } aLen = azChar + uintptr(nChar)*8 z = zCharSet nChar = 0 for ; *(*uint8)(unsafe.Pointer(z)) != 0; nChar++ { *(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)) = z { if int32(*(*uint8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))) >= 0xc0 { for int32(*(*uint8)(unsafe.Pointer(z)))&0xc0 == 0x80 { z++ } } } *(*uint32)(unsafe.Pointer(aLen + uintptr(nChar)*4)) = uint32((int64(z) - int64(*(*uintptr)(unsafe.Pointer(azChar + uintptr(nChar)*8)))) / 1) } } } if nChar > 0 { flags = int32(Xsqlite3_user_data(tls, context)) if flags&1 != 0 { for nIn > uint32(0) { var len uint32 = uint32(0) for i = 0; i < nChar; i++ { len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4)) if len <= nIn && libc.Xmemcmp(tls, zIn, *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0 { break } } if i >= nChar { break } zIn += uintptr(len) nIn = nIn - len } } if flags&2 != 0 { for nIn > uint32(0) { var len uint32 = uint32(0) for i = 0; i < nChar; i++ { len = *(*uint32)(unsafe.Pointer(aLen + uintptr(i)*4)) if len <= nIn && libc.Xmemcmp(tls, zIn+uintptr(nIn-len), *(*uintptr)(unsafe.Pointer(azChar + uintptr(i)*8)), uint64(len)) == 0 { break } } if i >= nChar { break } nIn = nIn - len } } if zCharSet != 0 { Xsqlite3_free(tls, azChar) } } Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } var lenOne = [1]uint32{uint32(1)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122462:27 */ var azOne = [1]uintptr{uintptr(ts + 12157 /* " " */)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122463:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used // when SQLite is built. // Compute the soundex encoding of a word. // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122553:13: */ bp := tls.Alloc(8) defer tls.Free(8) // var zResult [8]int8 at bp, 8 var zIn uintptr var i int32 var j int32 zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { zIn = ts + 1524 /* "" */ } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } if *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 { var prevcode U8 = iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f] *(*int8)(unsafe.Pointer(bp)) = int8(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)) for j = 1; j < 4 && *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0; i++ { var code int32 = int32(iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f]) if code > 0 { if code != int32(prevcode) { prevcode = U8(code) *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = int8(code + '0') } } else { prevcode = U8(0) } } for j < 4 { *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = int8('0') } *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. Xsqlite3_result_text(tls, context, ts+16217, 4, uintptr(0)) } } var iCode = [128]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(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(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122561:30 */ // A function that loads a shared-library extension then returns NULL. func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122606:13: */ bp := tls.Alloc(8) defer tls.Free(8) var zFile uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var zProc uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */)) = uintptr(0) // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { Xsqlite3_result_error(tls, context, ts+13337, -1) return } if argc == 2 { zProc = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } else { zProc = uintptr(0) } if zFile != 0 && Xsqlite3_load_extension(tls, db, zFile, zProc, bp) != 0 { Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */)), -1) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* zErrMsg */))) } } // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. type SumCtx1 = struct { FrSum float64 FiSum I64 Fcnt I64 Foverflow U8 Fapprox U8 F__ccgo_pad1 [6]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122637:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. type SumCtx = SumCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122637:23 */ // Routines used to compute the sum, average, and total. // // The SUM() function follows the (broken) SQL standard which means // that it returns NULL if it sums over no inputs. TOTAL returns // 0.0 in that case. In addition, TOTAL always returns a float where // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122656:13: */ var p uintptr var type1 int32 _ = argc p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(SumCtx{}))) type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if p != 0 && type1 != SQLITE_NULL { (*SumCtx)(unsafe.Pointer(p)).Fcnt++ if type1 == SQLITE_INTEGER { var v I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) *(*float64)(unsafe.Pointer(p)) += float64(v) if int32((*SumCtx)(unsafe.Pointer(p)).Fapprox)|int32((*SumCtx)(unsafe.Pointer(p)).Foverflow) == 0 && Xsqlite3AddInt64(tls, p+8, v) != 0 { (*SumCtx)(unsafe.Pointer(p)).Fapprox = libc.AssignPtrUint8(p+24, U8(1)) } } else { *(*float64)(unsafe.Pointer(p)) += Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) (*SumCtx)(unsafe.Pointer(p)).Fapprox = U8(1) } } } func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122678:13: */ var p uintptr var type1 int32 _ = argc p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(SumCtx{}))) type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) // p is always non-NULL because sumStep() will have been called first // to initialize it if p != 0 && type1 != SQLITE_NULL { (*SumCtx)(unsafe.Pointer(p)).Fcnt-- if type1 == SQLITE_INTEGER && int32((*SumCtx)(unsafe.Pointer(p)).Fapprox) == 0 { var v I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) *(*float64)(unsafe.Pointer(p)) -= float64(v) *(*I64)(unsafe.Pointer(p + 8)) -= v } else { *(*float64)(unsafe.Pointer(p)) -= Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) } } } func sumFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122703:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { Xsqlite3_result_error(tls, context, ts+16107, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { Xsqlite3_result_int64(tls, context, (*SumCtx)(unsafe.Pointer(p)).FiSum) } } } func avgFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122716:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum/float64((*SumCtx)(unsafe.Pointer(p)).Fcnt)) } } func totalFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122723:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... Xsqlite3_result_double(tls, context, func() float64 { if p != 0 { return (*SumCtx)(unsafe.Pointer(p)).FrSum } return float64(0) }()) } // The following structure keeps track of state information for the // count() aggregate function. type CountCtx1 = struct{ Fn I64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122734:9 */ // The following structure keeps track of state information for the // count() aggregate function. type CountCtx = CountCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122734:25 */ // Routines to implement the count() aggregate function. func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122745:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { (*CountCtx)(unsafe.Pointer(p)).Fn++ } // The sqlite3_aggregate_count() function is deprecated. But just to make // sure it still operates correctly, verify that its count agrees with our // internal count when using count(*) and when the total count can be // expressed as a 32-bit integer. } func countFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122761:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { if p != 0 { return (*CountCtx)(unsafe.Pointer(p)).Fn } return int64(0) }()) } func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122767:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { (*CountCtx)(unsafe.Pointer(p)).Fn-- } } // Routines to implement min() and max() aggregate functions. func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122785:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed pBest = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(Mem{}))) if !(pBest != 0) { return } if Xsqlite3_value_type(tls, pArg) == SQLITE_NULL { if (*Mem)(unsafe.Pointer(pBest)).Fflags != 0 { sqlite3SkipAccumulatorLoad(tls, context) } } else if (*Mem)(unsafe.Pointer(pBest)).Fflags != 0 { var max int32 var cmp int32 var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) // This step function is used for both the min() and max() aggregates, // the only difference between the two being that the sense of the // comparison is inverted. For the max() aggregate, the // sqlite3_user_data() function returns (void *)-1. For min() it // returns (void *)db, where db is the sqlite3* database pointer. // Therefore the next statement sets variable 'max' to 1 for the max() // aggregate, or 0 for min(). max = libc.Bool32(Xsqlite3_user_data(tls, context) != uintptr(0)) cmp = Xsqlite3MemCompare(tls, pBest, pArg, pColl) if max != 0 && cmp < 0 || !(max != 0) && cmp > 0 { Xsqlite3VdbeMemCopy(tls, pBest, pArg) } else { sqlite3SkipAccumulatorLoad(tls, context) } } else { (*Mem)(unsafe.Pointer(pBest)).Fdb = Xsqlite3_context_db_handle(tls, context) Xsqlite3VdbeMemCopy(tls, pBest, pArg) } } func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122823:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { if (*Sqlite3_value)(unsafe.Pointer(pRes)).Fflags != 0 { Xsqlite3_result_value(tls, context, pRes) } if bValue == 0 { Xsqlite3VdbeMemRelease(tls, pRes) } } } func minMaxValue(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122834:13: */ minMaxValueFinalize(tls, context, 1) } func minMaxFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122840:13: */ minMaxValueFinalize(tls, context, 0) } // group_concat(EXPR, ?SEPARATOR?) // // The SEPARATOR goes before the EXPR string. This is tragic. The // groupConcatInverse() implementation would have been easier if the // SEPARATOR were appended after EXPR. And the order is undocumented, // so we could change it, in theory. But the old behavior has been // around for so long that we dare not, for fear of breaking something. type GroupConcatCtx = struct { Fstr StrAccum FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122865:3 */ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122867:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr var nVal int32 var nSep int32 if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } pGCC = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GroupConcatCtx{}))) if pGCC != 0 { var db uintptr = Xsqlite3_context_db_handle(tls, context) var firstTerm int32 = libc.Bool32((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc == U32(0)) (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc = U32(*(*int32)(unsafe.Pointer(db + 136))) if argc == 1 { if !(firstTerm != 0) { Xsqlite3_str_appendchar(tls, pGCC, 1, int8(',')) } else { (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength = 1 } } else if !(firstTerm != 0) { zSep = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) nSep = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if zSep != 0 { Xsqlite3_str_append(tls, pGCC, zSep, nSep) } else { nSep = 0 } if nSep != (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength || (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths != uintptr(0) { var pnsl uintptr = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths if pnsl == uintptr(0) { // First separator length variation seen, start tracking them. pnsl = Xsqlite3_malloc64(tls, uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum+1)*uint64(unsafe.Sizeof(int32(0)))) if pnsl != uintptr(0) { var i int32 = 0 var nA int32 = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum - 1 for i < nA { *(*int32)(unsafe.Pointer(pnsl + uintptr(libc.PostIncInt32(&i, 1))*4)) = (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength } } } else { pnsl = Xsqlite3_realloc64(tls, pnsl, uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum)*uint64(unsafe.Sizeof(int32(0)))) } if pnsl != uintptr(0) { if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum > 0 { *(*int32)(unsafe.Pointer(pnsl + uintptr((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum-1)*4)) = nSep } (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths = pnsl } else { Xsqlite3StrAccumSetError(tls, pGCC, uint8(SQLITE_NOMEM)) } } } else { (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) } *(*int32)(unsafe.Pointer(pGCC + 32)) += 1 zVal = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) nVal = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if zVal != 0 { Xsqlite3_str_append(tls, pGCC, zVal, nVal) } } } func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122938:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } pGCC = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GroupConcatCtx{}))) // pGCC is always non-NULL since groupConcatStep() will have always // run frist to initialize it if pGCC != 0 { var nVS int32 // Must call sqlite3_value_text() to convert the argument into text prior // to invoking sqlite3_value_bytes(), in case the text encoding is UTF16 Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) nVS = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) *(*int32)(unsafe.Pointer(pGCC + 32)) -= 1 if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths != uintptr(0) { if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum > 0 { nVS = nVS + *(*int32)(unsafe.Pointer((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths)) libc.Xmemmove(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths+uintptr(1)*4, uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnAccum-1)*uint64(unsafe.Sizeof(int32(0)))) } } else { // If removing single accumulated string, harmlessly over-do. nVS = nVS + (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FnFirstSepLength } if nVS >= int32((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar) { (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar = U32(0) } else { *(*U32)(unsafe.Pointer(pGCC + 24)) -= U32(nVS) libc.Xmemmove(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FzText, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FzText+uintptr(nVS), uint64((*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar)) } if (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FnChar == U32(0) { (*GroupConcatCtx)(unsafe.Pointer(pGCC)).Fstr.FmxAlloc = U32(0) Xsqlite3_free(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths) (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths = uintptr(0) } } } func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122984:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) Xsqlite3_free(tls, (*GroupConcatCtx)(unsafe.Pointer(pGCC)).FpnSepLengths) } } func groupConcatValue(tls *libc.TLS, context uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:122995:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC if int32((*StrAccum)(unsafe.Pointer(pAccum)).FaccError) == SQLITE_TOOBIG { Xsqlite3_result_error_toobig(tls, context) } else if int32((*StrAccum)(unsafe.Pointer(pAccum)).FaccError) == SQLITE_NOMEM { Xsqlite3_result_error_nomem(tls, context) } else { var zText uintptr = Xsqlite3_str_value(tls, pAccum) Xsqlite3_result_text(tls, context, zText, int32((*StrAccum)(unsafe.Pointer(pAccum)).FnChar), libc.UintptrFromInt32(-1)) } } } // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123019:21: */ var rc int32 = Xsqlite3_overload_function(tls, db, ts+16222, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } } // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123032:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { pInfo = uintptr(unsafe.Pointer(&likeInfoAlt)) flags = SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE } else { pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } Xsqlite3CreateFunc(tls, db, ts+16228, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) Xsqlite3CreateFunc(tls, db, ts+16228, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16228, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+16228, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If // it is appropriate to apply the LIKE optimization to that function // then set aWc[0] through aWc[2] to the wildcard characters and the // escape character and then return TRUE. If the function is not a // LIKE-style function then return FALSE. // // The expression "a LIKE b ESCAPE c" is only considered a valid LIKE // operator if c is a string literal that is exactly one byte in length. // That one byte is stored in aWc[3]. aWc[3] is set to zero if there is // no ESCAPE clause. // // *pIsNocase is set to true if uppercase and lowercase are equivalent for // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123065:20: */ var pDef uintptr var nExpr int32 if !(int32(*(*uintptr)(unsafe.Pointer(pExpr + 32))) != 0) { return 0 } nExpr = (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)))).FnExpr pDef = Xsqlite3FindFunction(tls, db, *(*uintptr)(unsafe.Pointer(pExpr + 8)), nExpr, uint8(SQLITE_UTF8), uint8(0)) if pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_LIKE) == U32(0) { return 0 } // The memcpy() statement assumes that the wildcard characters are // the first three statements in the compareInfo structure. The // asserts() that follow verify that assumption libc.Xmemcpy(tls, aWc, (*FuncDef)(unsafe.Pointer(pDef)).FpUserData, uint64(3)) if nExpr < 3 { *(*int8)(unsafe.Pointer(aWc + 3)) = int8(0) } else { var pEscape uintptr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 32)) + 8 + 2*32)).FpExpr var zEscape uintptr if int32((*Expr)(unsafe.Pointer(pEscape)).Fop) != TK_STRING { return 0 } zEscape = *(*uintptr)(unsafe.Pointer(pEscape + 8)) if int32(*(*int8)(unsafe.Pointer(zEscape))) == 0 || int32(*(*int8)(unsafe.Pointer(zEscape + 1))) != 0 { return 0 } if int32(*(*int8)(unsafe.Pointer(zEscape))) == int32(*(*int8)(unsafe.Pointer(aWc))) { return 0 } if int32(*(*int8)(unsafe.Pointer(zEscape))) == int32(*(*int8)(unsafe.Pointer(aWc + 1))) { return 0 } *(*int8)(unsafe.Pointer(aWc + 3)) = *(*int8)(unsafe.Pointer(zEscape)) } *(*int32)(unsafe.Pointer(pIsNocase)) = libc.Bool32((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_CASE) == U32(0)) return 1 } // Mathematical Constants // Extra math functions that require linking with -lm // Implementation SQL functions: // // ceil(X) // ceiling(X) // floor(X) // // The sqlite3_user_data() pointer is a pointer to the libm implementation // of the underlying C function. func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123136:13: */ switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: { Xsqlite3_result_int64(tls, context, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) break } case SQLITE_FLOAT: { var x uintptr = Xsqlite3_user_data(tls, context) Xsqlite3_result_double(tls, context, (*struct { f func(*libc.TLS, float64) float64 })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))))) break } default: { break } } } // On some systems, ceil() and floor() are intrinsic function. You are // unable to take a pointer to these functions. Hence, we here wrap them // in our own actual functions. func xCeil(tls *libc.TLS, x float64) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123163:15: */ return libc.Xceil(tls, x) } func xFloor(tls *libc.TLS, x float64) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123164:15: */ return libc.Xfloor(tls, x) } // Implementation of SQL functions: // // ln(X) - natural logarithm // log(X) - log X base 10 // log10(X) - log X base 10 // log(B,X) - log X base B func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123174:13: */ var x float64 var b float64 var ans float64 switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: fallthrough case SQLITE_FLOAT: x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) if x <= 0.0 { return } break default: return } if argc == 2 { switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_INTEGER: fallthrough case SQLITE_FLOAT: b = libc.Xlog(tls, x) if b <= 0.0 { return } x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if x <= 0.0 { return } break fallthrough default: return } ans = libc.Xlog(tls, x) / b } else { ans = libc.Xlog(tls, x) switch int32(Xsqlite3_user_data(tls, context)) { case 1: // Convert from natural logarithm to log base 10 ans = ans * (float64(1.0) / 2.30258509299404568402) break fallthrough case 2: // Convert from natural logarithm to log base 2 ans = ans * (float64(1.0) / 0.69314718055994530942) break fallthrough default: break } } Xsqlite3_result_double(tls, context, ans) } // Functions to converts degrees to radians and radians to degrees. func degToRad(tls *libc.TLS, x float64) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123224:15: */ return x * (float64(3.14159265358979323846) / 180.0) } func radToDeg(tls *libc.TLS, x float64) float64 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123225:15: */ return x * (float64(180.0) / 3.14159265358979323846) } // Implementation of 1-argument SQL math functions: // // exp(X) - Compute e to the X-th power func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123232:13: */ var type0 int32 var v0 float64 var ans float64 var x uintptr type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { return } v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) x = Xsqlite3_user_data(tls, context) ans = (*struct { f func(*libc.TLS, float64) float64 })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0) Xsqlite3_result_double(tls, context, ans) } // Implementation of 2-argument SQL math functions: // // power(X,Y) - Compute X to the Y-th power func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123254:13: */ var type0 int32 var type1 int32 var v0 float64 var v1 float64 var ans float64 var x uintptr type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { return } type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) if type1 != SQLITE_INTEGER && type1 != SQLITE_FLOAT { return } v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) v1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8))) x = Xsqlite3_user_data(tls, context) ans = (*struct { f func(*libc.TLS, float64, float64) float64 })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0, v1) Xsqlite3_result_double(tls, context, ans) } // Implementation of 0-argument pi() function. func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123277:13: */ Xsqlite3_result_double(tls, context, 3.14159265358979323846) } // Implementation of sign(X) function. func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123291:13: */ var type0 int32 var x float64 _ = argc type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { return } x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) Xsqlite3_result_int(tls, context, func() int32 { if x < 0.0 { return -1 } return func() int32 { if x > 0.0 { return +1 } return 0 }() }()) } // All of the FuncDef structures in the aBuiltinFunc[] array above // to the global function hash table. This occurs at start-time (as // a consequence of calling sqlite3_initialize()). // // After this routine runs func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123313:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) Xsqlite3RegisterJsonFunctions(tls) Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aBuiltinFunc)), int32(uint64(unsafe.Sizeof(aBuiltinFunc))/uint64(unsafe.Sizeof(FuncDef{})))) } var aBuiltinFunc = [101]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_implies_nonnull_row)), FxSFunc: 0, FzName: ts + 16233}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_compare)), FxSFunc: 0, FzName: ts + 16253}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_expr_implies_expr)), FxSFunc: 0, FzName: ts + 16266}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_affinity)), FxSFunc: 0, FzName: ts + 16284}, //**** Regular functions **** {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16293}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16301}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 16301}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16316}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16342}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16367}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16376}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(int64(INLINEFUNC_unlikely)), FxSFunc: 0, FzName: ts + 16387}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16394}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16408}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16408}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16414}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16414}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16420}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(3)), FxSFunc: 0, FzName: ts + 16420}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16425}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16425}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16425}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16429}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FzName: ts + 16429}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(int64(1)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 16429}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16433}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 16440}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 16448}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16455}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16461}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16468}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16475}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16483}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16488}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16492}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16492}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16498}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16504}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16510}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16514}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16521}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16528}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16539}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16546}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 16561}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16578}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16589}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16595}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16613}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16621}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16635}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16643}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16652}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16659}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16659}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16669}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16673}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16679}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16683}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16683}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16689}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 16689}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16702}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16228}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 16228}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16707}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 16707}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16716}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16721}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16729}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16735}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16741}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16744}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(1)), FxSFunc: 0, FzName: ts + 16748}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(int64(2)), FxSFunc: 0, FzName: ts + 16754}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16744}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16759}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16763}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16767}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16773}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16777}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16782}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16787}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16792}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16798}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16802}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16806}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16810}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16815}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16820}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16825}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16831}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16837}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16843}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16848}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 16856}, {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16864}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 16867}, {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 16707}, {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(int64(INLINEFUNC_iif)), FxSFunc: 0, FzName: ts + 16872}} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123324:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* // // 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 code used by the compiler to add foreign key // support to compiled SQL statements. // #include "sqliteInt.h" // Deferred and Immediate FKs // -------------------------- // // Foreign keys in SQLite come in two flavours: deferred and immediate. // If an immediate foreign key constraint is violated, // SQLITE_CONSTRAINT_FOREIGNKEY is returned and the current // statement transaction rolled back. If a // deferred foreign key constraint is violated, no action is taken // immediately. However if the application attempts to commit the // transaction before fixing the constraint violation, the attempt fails. // // Deferred constraints are implemented using a simple counter associated // with the database handle. The counter is set to zero each time a // database transaction is opened. Each time a statement is executed // that causes a foreign key violation, the counter is incremented. Each // time a statement is executed that removes an existing violation from // the database, the counter is decremented. When the transaction is // committed, the commit fails if the current value of the counter is // greater than zero. This scheme has two big drawbacks: // // * When a commit fails due to a deferred foreign key constraint, // there is no way to tell which foreign constraint is not satisfied, // or which row it is not satisfied for. // // * If the database contains foreign key violations when the // transaction is opened, this may cause the mechanism to malfunction. // // Despite these problems, this approach is adopted as it seems simpler // than the alternatives. // // INSERT operations: // // I.1) For each FK for which the table is the child table, search // the parent table for a match. If none is found increment the // constraint counter. // // I.2) For each FK for which the table is the parent table, // search the child table for rows that correspond to the new // row in the parent table. Decrement the counter for each row // found (as the constraint is now satisfied). // // DELETE operations: // // D.1) For each FK for which the table is the child table, // search the parent table for a row that corresponds to the // deleted row in the child table. If such a row is not found, // decrement the counter. // // D.2) For each FK for which the table is the parent table, search // the child table for rows that correspond to the deleted row // in the parent table. For each found increment the counter. // // UPDATE operations: // // An UPDATE command requires that all 4 steps above are taken, but only // for FK constraints for which the affected columns are actually // modified (values must be compared at runtime). // // Note that I.1 and D.1 are very similar operations, as are I.2 and D.2. // This simplifies the implementation a bit. // // For the purposes of immediate FK constraints, the OR REPLACE conflict // resolution is considered to delete rows before the new row is inserted. // If a delete caused by OR REPLACE violates an FK constraint, an exception // is thrown, even if the FK constraint would be satisfied after the new // row is inserted. // // Immediate constraints are usually handled similarly. The only difference // is that the counter used is stored as part of each individual statement // object (struct Vdbe). If, after the statement has run, its immediate // constraint counter is greater than zero, // it returns SQLITE_CONSTRAINT_FOREIGNKEY // and the statement transaction is rolled back. An exception is an INSERT // statement that inserts a single row only (no triggers). In this case, // instead of using a counter, an exception is thrown immediately if the // INSERT violates a foreign key constraint. This is necessary as such // an INSERT does not open a statement transaction. // // TODO: How should dropping a table be handled? How should renaming a // table be handled? // // // Query API Notes // --------------- // // Before coding an UPDATE or DELETE row operation, the code-generator // for those two operations needs to know whether or not the operation // requires any FK processing and, if so, which columns of the original // row are required by the FK processing VDBE code (i.e. if FKs were // implemented using triggers, which of the old.* columns would be // accessed). No information is required by the code-generator before // coding an INSERT operation. The functions used by the UPDATE/DELETE // generation code to query for this information are: // // sqlite3FkRequired() - Test to see if FK processing is required. // sqlite3FkOldmask() - Query for the set of required old.* columns. // // // Externally accessible module functions // -------------------------------------- // // sqlite3FkCheck() - Check for foreign key violations. // sqlite3FkActions() - Code triggers for ON UPDATE/ON DELETE actions. // sqlite3FkDelete() - Delete an FKey structure. // VDBE Calling Convention // ----------------------- // // Example: // // For the following INSERT statement: // // CREATE TABLE t1(a, b INTEGER PRIMARY KEY, c); // INSERT INTO t1 VALUES(1, 2, 3.1); // // Register (x): 2 (type integer) // Register (x+1): 1 (type integer) // Register (x+2): NULL (type NULL) // Register (x+3): 3.1 (type real) // A foreign key constraint requires that the key columns in the parent // table are collectively subject to a UNIQUE or PRIMARY KEY constraint. // Given that pParent is the parent table for foreign key constraint pFKey, // search the schema for a unique index on the parent key columns. // // If successful, zero is returned. If the parent key is an INTEGER PRIMARY // KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx // is set to point to the unique index. // // If the parent key consists of a single column (the foreign key constraint // is not a composite foreign key), output variable *paiCol is set to NULL. // Otherwise, it is set to point to an allocated array of size N, where // N is the number of columns in the parent key. The first element of the // array is the index of the child table column that is mapped by the FK // constraint to the parent table column stored in the left-most column // of index *ppIdx. The second element of the array is the index of the // child table column that corresponds to the second left-most column of // *ppIdx, and so on. // // If the required index cannot be found, either because: // // 1) The named parent key columns do not exist, or // // 2) The named parent key columns do exist, but are not subject to a // UNIQUE or PRIMARY KEY constraint, or // // 3) No parent key columns were provided explicitly as part of the // foreign key definition, and the parent table does not have a // PRIMARY KEY, or // // 4) No parent key columns were provided explicitly as part of the // foreign key definition, and the PRIMARY KEY of the parent table // consists of a different number of columns to the child key in // the child table. // // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123677:20: */ bp := tls.Alloc(16) defer tls.Free(16) var pIdx uintptr = uintptr(0) // Value to return via *ppIdx var aiCol uintptr = uintptr(0) // Value to return via *paiCol var nCol int32 = (*FKey)(unsafe.Pointer(pFKey)).FnCol // Number of columns in parent key var zKey uintptr = (*sColMap)(unsafe.Pointer(pFKey + 64)).FzCol // Name of left-most parent key column // The caller is responsible for zeroing output parameters. // If this is a non-composite (single column) foreign key, check if it // maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx // and *paiCol set to zero and return early. // // Otherwise, for a composite foreign key (more than one column), allocate // space for the aiCol array (returned via output parameter *paiCol). // Non-composite foreign keys do not require the aiCol array. if nCol == 1 { // The FK maps to the IPK if any of the following are true: // // 1) There is an INTEGER PRIMARY KEY column and the FK is implicitly // mapped to the primary key of table pParent, or // 2) The FK is explicitly mapped to a column declared as INTEGER // PRIMARY KEY. if int32((*Table)(unsafe.Pointer(pParent)).FiPKey) >= 0 { if !(zKey != 0) { return 0 } if !(Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pParent)).FaCol+uintptr((*Table)(unsafe.Pointer(pParent)).FiPKey)*24)).FzCnName, zKey) != 0) { return 0 } } } else if paiCol != 0 { aiCol = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(nCol)*uint64(unsafe.Sizeof(int32(0)))) if !(aiCol != 0) { return 1 } *(*uintptr)(unsafe.Pointer(paiCol)) = aiCol } for pIdx = (*Table)(unsafe.Pointer(pParent)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { if int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) == nCol && int32((*Index)(unsafe.Pointer(pIdx)).FonError) != OE_None && (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { // pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number // of columns. If each indexed column corresponds to a foreign key // column of pFKey, then this index is a winner. if zKey == uintptr(0) { // If zKey is NULL, then this foreign key is implicitly mapped to // the PRIMARY KEY of table pParent. The PRIMARY KEY index may be // identified by the test. if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if aiCol != 0 { var i int32 for i = 0; i < nCol; i++ { *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom } } break } } else { // If zKey is non-NULL, then this foreign key was declared to // map to an explicit list of columns in table pParent. Check if this // index matches those columns. Also, check that the index uses // the default collation sequences for each column. var i int32 var j int32 for i = 0; i < nCol; i++ { var iCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) // Index of column in parent tbl var zDfltColl uintptr // Def. collation for column var zIdxCol uintptr // Name of indexed column if int32(iCol) < 0 { break } // No foreign keys against expression indexes // If the index uses a collation sequence that is different from // the default collation sequence for the column, this index is // unusable. Bail out early in this case. zDfltColl = Xsqlite3ColumnColl(tls, (*Table)(unsafe.Pointer(pParent)).FaCol+uintptr(iCol)*24) if !(zDfltColl != 0) { zDfltColl = uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) } if Xsqlite3StrICmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i)*8)), zDfltColl) != 0 { break } zIdxCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pParent)).FaCol + uintptr(iCol)*24)).FzCnName for j = 0; j < nCol; j++ { if Xsqlite3StrICmp(tls, (*sColMap)(unsafe.Pointer(pFKey+64+uintptr(j)*16)).FzCol, zIdxCol) == 0 { if aiCol != 0 { *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(j)*16)).FiFrom } break } } if j == nCol { break } } if i == nCol { break } // pIdx is usable } } } if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+16876, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) return 1 } *(*uintptr)(unsafe.Pointer(ppIdx)) = pIdx return 0 } // This function is called when a row is inserted into or deleted from the // child table of foreign key constraint pFKey. If an SQL UPDATE is executed // on the child table of pFKey, this function is invoked twice for each row // affected - once to "delete" the old row, and then again to "insert" the // new row. // // Each time it is called, this function generates VDBE code to locate the // row in the parent table that corresponds to the row being inserted into // or deleted from the child table. If the parent row can be found, no // special action is taken. Otherwise, if the parent row can *not* be // found in the parent table: // // Operation | FK type | Action taken // -------------------------------------------------------------------------- // INSERT immediate Increment the "immediate constraint counter". // // DELETE immediate Decrement the "immediate constraint counter". // // INSERT deferred Increment the "deferred constraint counter". // // DELETE deferred Decrement the "deferred constraint counter". // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123814:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use var iOk int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // jump here if parent key found // If nIncr is less than zero, then check at runtime if there are any // outstanding constraints to resolve. If there are not, there is no need // to check if deleting this row resolves any outstanding violations. // // Check if any of the key columns in the child table row are NULL. If // any are, then the constraint is considered satisfied. No need to // search for a matching row in the parent table. if nIncr < 0 { Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), iOk) } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { var iReg int32 = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))))) + regData + 1 Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, iOk) } if isIgnore == 0 { if pIdx == uintptr(0) { // If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY // column of the parent table (table pTab). var iMustBeInt int32 // Address of MustBeInt instruction var regTemp int32 = Xsqlite3GetTempReg(tls, pParse) // Invoke MustBeInt to coerce the child key value to an integer (i.e. // apply the affinity of the parent key). If this fails, then there // is no matching parent key. Before using MustBeInt, make a copy of // the value. Otherwise, the value inserted into the child key column // will have INTEGER affinity applied to it, which may not be correct. Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol)))))+1+regData, regTemp) iMustBeInt = Xsqlite3VdbeAddOp2(tls, v, OP_MustBeInt, regTemp, 0) // If the parent table is the same as the child table, and we are about // to increment the constraint-counter (i.e. this is an INSERT operation), // then check if the row being inserted matches itself. If so, do not // increment the constraint-counter. if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr == 1 { Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regData, iOk, regTemp) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) } Xsqlite3OpenTable(tls, pParse, iCur, iDb, pTab, OP_OpenRead) Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iCur, 0, regTemp) Xsqlite3VdbeGoto(tls, v, iOk) Xsqlite3VdbeJumpHere(tls, v, Xsqlite3VdbeCurrentAddr(tls, v)-2) Xsqlite3VdbeJumpHere(tls, v, iMustBeInt) Xsqlite3ReleaseTempReg(tls, pParse, regTemp) } else { var nCol int32 = (*FKey)(unsafe.Pointer(pFKey)).FnCol var regTemp int32 = Xsqlite3GetTempRange(tls, pParse, nCol) var regRec int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) for i = 0; i < nCol; i++ { Xsqlite3VdbeAddOp2(tls, v, OP_Copy, int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)))))+1+regData, regTemp+i) } // If the parent table is the same as the child table, and we are about // to increment the constraint-counter (i.e. this is an INSERT operation), // then check if the row being inserted matches itself. If so, do not // increment the constraint-counter. // // If any of the parent-key values are NULL, then the row cannot match // itself. So set JUMPIFNULL to make sure we do the OP_Found if any // of the parent-key values are NULL (at this point it is known that // none of the child key values are). if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr == 1 { var iJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + nCol + 1 for i = 0; i < nCol; i++ { var iChild int32 = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))))) + 1 + regData var iParent int32 = 1 + regData iParent = iParent + int32(Xsqlite3TableColumnToStorage(tls, (*Index)(unsafe.Pointer(pIdx)).FpTable, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)))) if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { // The parent key is a composite key that includes the IPK column iParent = regData } Xsqlite3VdbeAddOp3(tls, v, OP_Ne, iChild, iJump, iParent) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_JUMPIFNULL)) } Xsqlite3VdbeGoto(tls, v, iOk) } Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTemp, nCol, regRec, Xsqlite3IndexAffinityStr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx), nCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iCur, iOk, regRec, 0) Xsqlite3ReleaseTempReg(tls, pParse, regRec) Xsqlite3ReleaseTempRange(tls, pParse, regTemp, nCol) } } if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && !((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_DeferFKs) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FpToplevel) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite) != 0) { // Special case: If this is an INSERT statement that will insert exactly // one row into the table, raise a constraint immediately instead of // incrementing a counter. This is necessary as the VM code is being // generated for will not open a statement transaction. Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(3)<<8, OE_Abort, uintptr(0), int8(-1), uint8(P5_ConstraintFK)) } else { if nIncr > 0 && int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) == 0 { Xsqlite3MayAbort(tls, pParse) } Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), nIncr) } Xsqlite3VdbeResolveLabel(tls, v, iOk) Xsqlite3VdbeAddOp1(tls, v, OP_Close, iCur) } // Return an Expr object that refers to a memory register corresponding // to column iCol of table pTab. // // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123967:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3Expr(tls, db, TK_REGISTER, uintptr(0)) if pExpr != 0 { if int32(iCol) >= 0 && int32(iCol) != int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24 (*Expr)(unsafe.Pointer(pExpr)).FiTable = regBase + int32(Xsqlite3TableColumnToStorage(tls, pTab, iCol)) + 1 (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = (*Column)(unsafe.Pointer(pCol)).Faffinity zColl = Xsqlite3ColumnColl(tls, pCol) if zColl == uintptr(0) { zColl = (*CollSeq)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpDfltColl)).FzName } pExpr = Xsqlite3ExprAddCollateString(tls, pParse, pExpr, zColl) } else { (*Expr)(unsafe.Pointer(pExpr)).FiTable = regBase (*Expr)(unsafe.Pointer(pExpr)).FaffExpr = int8(SQLITE_AFF_INTEGER) } } return pExpr } // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:123999:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 64)) = pTab (*Expr)(unsafe.Pointer(pExpr)).FiTable = iCursor (*Expr)(unsafe.Pointer(pExpr)).FiColumn = iCol } return pExpr } // This function is called to generate code executed when a row is deleted // from the parent table of foreign key constraint pFKey and, if pFKey is // deferred, when a row is inserted into the same table. When generating // code for an SQL UPDATE operation, this function may be called twice - // once to "delete" the old row and once to "insert" the new row. // // Parameter nIncr is passed -1 when inserting a row (as this may decrease // the number of FK violations in the db) or +1 when deleting one (as this // may increase the number of FK constraint problems). // // The code generated by this function scans through the rows in the child // table that correspond to the parent table row being deleted or inserted. // For each child row found, one of the following actions is taken: // // Operation | FK type | Action taken // -------------------------------------------------------------------------- // DELETE immediate Increment the "immediate constraint counter". // Or, if the ON (UPDATE|DELETE) action is RESTRICT, // throw a "FOREIGN KEY constraint failed" exception. // // INSERT immediate Decrement the "immediate constraint counter". // // DELETE deferred Increment the "deferred constraint counter". // Or, if the ON (UPDATE|DELETE) action is RESTRICT, // throw a "FOREIGN KEY constraint failed" exception. // // INSERT deferred Decrement the "deferred constraint counter". // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124047:13: */ bp := tls.Alloc(56) defer tls.Free(56) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var i int32 // Iterator variable var pWhere uintptr = uintptr(0) // WHERE clause to scan with // var sNameContext NameContext at bp, 56 // Context used to resolve WHERE clause var pWInfo uintptr // Context used by sqlite3WhereXXX() var iFkIfZero int32 = 0 // Address of OP_FkIfZero var v uintptr = Xsqlite3GetVdbe(tls, pParse) if nIncr < 0 { iFkIfZero = Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), 0) } // Create an Expr object representing an SQL expression like: // // <parent-key1> = <child-key1> AND <parent-key2> = <child-key2> ... // // The collation sequence used for the comparison should be that of // the parent key columns. The affinity of the parent key column should // be applied to each child key value before the comparison takes place. for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { var pLeft uintptr // Value from parent table row var pRight uintptr // Column ref to child table var pEq uintptr // Expression (pLeft = pRight) var iCol I16 // Index of column in child table var zCol uintptr // Name of column in child table if pIdx != 0 { iCol = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) } else { iCol = int16(-1) } pLeft = exprTableRegister(tls, pParse, pTab, regData, iCol) if aiCol != 0 { iCol = int16(*(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4))) } else { iCol = int16((*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom) } zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol + uintptr(iCol)*24)).FzCnName pRight = Xsqlite3Expr(tls, db, TK_ID, zCol) pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, pLeft, pRight) pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pEq) } // If the child table is the same as the parent table, then add terms // to the WHERE clause that prevent this entry from being scanned. // The added WHERE clause terms are like this: // // $current_rowid!=rowid // NOT( $current_a==a AND $current_b==b AND ... ) // // The first form is used for rowid tables. The second form is used // for WITHOUT ROWID tables. In the second form, the *parent* key is // (a,b,...). Either the parent or primary key could be used to // uniquely identify the current row, but the parent key is more convenient // as the required values have already been loaded into registers // by the caller. if pTab == (*FKey)(unsafe.Pointer(pFKey)).FpFrom && nIncr > 0 { var pNe uintptr // Expression (pLeft != pRight) var pLeft uintptr // Value from parent table row var pRight uintptr // Column ref to child table if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { pLeft = exprTableRegister(tls, pParse, pTab, regData, int16(-1)) pRight = exprTableColumn(tls, db, pTab, (*SrcItem)(unsafe.Pointer(pSrc+8)).FiCursor, int16(-1)) pNe = Xsqlite3PExpr(tls, pParse, TK_NE, pLeft, pRight) } else { var pEq uintptr var pAll uintptr = uintptr(0) for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); i++ { var iCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2)) pLeft = exprTableRegister(tls, pParse, pTab, regData, iCol) pRight = Xsqlite3Expr(tls, db, TK_ID, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24)).FzCnName) pEq = Xsqlite3PExpr(tls, pParse, TK_IS, pLeft, pRight) pAll = Xsqlite3ExprAnd(tls, pParse, pAll, pEq) } pNe = Xsqlite3PExpr(tls, pParse, TK_NOT, pAll, uintptr(0)) } pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pNe) } // Resolve the references in the WHERE clause. libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpSrcList = pSrc (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpParse = pParse Xsqlite3ResolveExprNames(tls, bp, pWhere) // Create VDBE to loop through the entries in pSrc that match the WHERE // clause. For each row found, increment either the deferred or immediate // foreign key constraint counter. if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { pWInfo = Xsqlite3WhereBegin(tls, pParse, pSrc, pWhere, uintptr(0), uintptr(0), uintptr(0), uint16(0), 0) Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), nIncr) if pWInfo != 0 { Xsqlite3WhereEnd(tls, pWInfo) } } // Clean up the WHERE clause constructed above. Xsqlite3ExprDelete(tls, db, pWhere) if iFkIfZero != 0 { Xsqlite3VdbeJumpHereOrPopInst(tls, v, iFkIfZero) } } // This function returns a linked list of FKey objects (connected by // FKey.pNextTo) holding all children of table pTab. For example, // given the following schema: // // CREATE TABLE t1(a PRIMARY KEY); // CREATE TABLE t2(b REFERENCES t1(a); // // Calling this function with table "t1" as an argument returns a pointer // to the FKey structure representing the foreign key constraint on table // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124176:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, (*Table)(unsafe.Pointer(pTab)).FzName) } // The second argument is a Trigger structure allocated by the // fkActionTrigger() routine. This function deletes the Trigger structure // and all of its sub-components. // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124188:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) Xsqlite3ExprListDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) Xsqlite3SelectDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) Xsqlite3ExprDelete(tls, dbMem, (*Trigger)(unsafe.Pointer(p)).FpWhen) Xsqlite3DbFree(tls, dbMem, p) } } // Clear the apTrigger[] cache of CASCADE triggers for all foreign keys // in a particular database. This needs to happen when the schema // changes. func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124204:21: */ var k uintptr var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8 for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata var pFKey uintptr if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { continue } for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48))) *(*uintptr)(unsafe.Pointer(pFKey + 48)) = uintptr(0) fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8))) *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8)) = uintptr(0) } } } // This function is called to generate code that runs when table pTab is // being dropped from the database. The SrcList passed as the second argument // to this function contains a single entry guaranteed to resolve to // table pTab. // // Normally, no code is required. However, if either // // (a) The table is the parent table of a FK constraint, or // (b) The table is the child table of a deferred FK constraint and it is // determined at runtime that there are outstanding deferred FK // constraint violations in the database, // // then the equivalent of "DELETE FROM <tbl>" is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124235:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 var v uintptr = Xsqlite3GetVdbe(tls, pParse) // VDBE has already been allocated if Xsqlite3FkReferences(tls, pTab) == uintptr(0) { // Search for a deferred foreign key constraint for which this table // is the child table. If one cannot be found, return without // generating any VDBE code. If one can be found, then jump over // the entire DELETE if there are no outstanding deferred constraints // when this statement is run. var p uintptr for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { if (*FKey)(unsafe.Pointer(p)).FisDeferred != 0 || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { break } } if !(p != 0) { return } iSkip = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, 1, iSkip) } (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers = U8(1) Xsqlite3DeleteFrom(tls, pParse, Xsqlite3SrcListDup(tls, db, pName, 0), uintptr(0), uintptr(0), uintptr(0)) (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers = U8(0) // If the DELETE has generated immediate foreign key constraint // violations, halt the VDBE and return an error at this point, before // any modifications to the schema are made. This is because statement // transactions are not able to rollback schema changes. // // If the SQLITE_DeferFKs flag is set, then this is not required, as // the statement transaction will not be rolled back even if FK // constraints are violated. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) == uint64(0) { Xsqlite3VdbeAddOp2(tls, v, OP_FkIfZero, 0, Xsqlite3VdbeCurrentAddr(tls, v)+2) Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(3)<<8, OE_Abort, uintptr(0), int8(-1), uint8(P5_ConstraintFK)) } if iSkip != 0 { Xsqlite3VdbeResolveLabel(tls, v, iSkip) } } } // The second argument points to an FKey object representing a foreign key // for which pTab is the child table. An UPDATE statement against pTab // is currently being processed. For each column of the table that is // actually updated, the corresponding element in the aChange[] array // is zero or greater (if a column is unmodified the corresponding element // is set to -1). If the rowid column is modified by the UPDATE statement // the bChngRowid argument is non-zero. // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124298:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FiFrom if *(*int32)(unsafe.Pointer(aChange + uintptr(iChildKey)*4)) >= 0 { return 1 } if iChildKey == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) && bChngRowid != 0 { return 1 } } return 0 } // The second argument points to an FKey object representing a foreign key // for which pTab is the parent table. An UPDATE statement against pTab // is currently being processed. For each column of the table that is // actually updated, the corresponding element in the aChange[] array // is zero or greater (if a column is unmodified the corresponding element // is set to -1). If the rowid column is modified by the UPDATE statement // the bChngRowid argument is non-zero. // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124325:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 64 + uintptr(i)*16)).FzCol var iKey int32 for iKey = 0; iKey < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iKey++ { if *(*int32)(unsafe.Pointer(aChange + uintptr(iKey)*4)) >= 0 || iKey == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) && bChngRowid != 0 { var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iKey)*24 if zKey != 0 { if 0 == Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zKey) { return 1 } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { return 1 } } } } return 0 } // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124354:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() if (*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg != 0 { var p uintptr = (*TriggerPrg)(unsafe.Pointer((*Parse)(unsafe.Pointer(pTop)).FpTriggerPrg)).FpTrigger if p == *(*uintptr)(unsafe.Pointer(pFKey + 48)) && int32(*(*U8)(unsafe.Pointer(pFKey + 45))) == OE_SetNull || p == *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8)) && int32(*(*U8)(unsafe.Pointer(pFKey + 45 + 1))) == OE_SetNull { return 1 } } return 0 } // This function is called when inserting, deleting or updating a row of // table pTab to generate VDBE code to perform foreign key constraint // processing for the operation. // // For a DELETE operation, parameter regOld is passed the index of the // first register in an array of (pTab->nCol+1) registers containing the // rowid of the row being deleted, followed by each of the column values // of the row being deleted, from left to right. Parameter regNew is passed // zero in this case. // // For an INSERT operation, regOld is passed zero and regNew is passed the // first register of an array of (pTab->nCol+1) registers containing the new // row data. // // For an UPDATE operation, this function is called twice. Once before // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124387:21: */ bp := tls.Alloc(40) defer tls.Free(40) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pFKey uintptr // Used to iterate through FKs var iDb int32 // Index of database containing pTab var zDb uintptr // Name of database containing pTab var isIgnoreErrors int32 = int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) // Exactly one of regOld and regNew should be non-zero. // If foreign-keys are disabled, this function is a no-op. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) == uint64(0) { return } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { return } iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Loop through all the foreign key constraints for which pTab is the // child table (the table that the foreign key definition is part of). for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { var pTo uintptr // Parent table of foreign key pFKey *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) // Index on key columns in pTo *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */)) = uintptr(0) var aiCol uintptr // var iCol int32 at bp+16, 4 var i int32 var bIgnore int32 = 0 if aChange != 0 && Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo) != 0 && fkChildIsModified(tls, pTab, pFKey, aChange, bChngRowid) == 0 { continue } // Find the parent table of this foreign key. Also find a unique index // on the parent key columns in the parent table. If either of these // schema items cannot be located, set an error in pParse and return // early. if (*Parse)(unsafe.Pointer(pParse)).FdisableTriggers != 0 { pTo = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zDb) } else { pTo = Xsqlite3LocateTable(tls, pParse, uint32(0), (*FKey)(unsafe.Pointer(pFKey)).FzTo, zDb) } if !(pTo != 0) || Xsqlite3FkLocateIndex(tls, pParse, pTo, pFKey, bp, bp+8) != 0 { if !(isIgnoreErrors != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } if pTo == uintptr(0) { // If isIgnoreErrors is true, then a table is being dropped. In this // case SQLite runs a "DELETE FROM xxx" on the table being dropped // before actually dropping it in order to check FK constraints. // If the parent table of an FK constraint on the current table is // missing, behave as if it is empty. i.e. decrement the relevant // FK counter for each row of the current table with non-NULL keys. var v uintptr = Xsqlite3GetVdbe(tls, pParse) var iJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + (*FKey)(unsafe.Pointer(pFKey)).FnCol + 1 for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { var iFromCol int32 var iReg int32 iFromCol = (*sColMap)(unsafe.Pointer(pFKey + 64 + uintptr(i)*16)).FiFrom iReg = int32(Xsqlite3TableColumnToStorage(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, int16(iFromCol))) + regOld + 1 Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, iJump) } Xsqlite3VdbeAddOp2(tls, v, OP_FkCounter, int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred), -1) } continue } if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { aiCol = *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */)) } else { *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) = (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom aiCol = bp + 16 /* &iCol */ } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { if *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { *(*int32)(unsafe.Pointer(aiCol + uintptr(i)*4)) = -1 } // Request permission to read the parent key columns. If the // authorization callback returns SQLITE_IGNORE, behave as if any // values read from the parent table are NULL. if (*Sqlite3)(unsafe.Pointer(db)).FxAuth != 0 { var rcauth int32 var zCol uintptr = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTo)).FaCol + uintptr(func() int32 { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FaiColumn + uintptr(i)*2))) } return int32((*Table)(unsafe.Pointer(pTo)).FiPKey) }())*24)).FzCnName rcauth = Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTo)).FzName, zCol, iDb) bIgnore = libc.Bool32(rcauth == SQLITE_IGNORE) } } // Take a shared-cache advisory read-lock on the parent table. Allocate // a cursor to use to search the unique index on the parent key columns // in the parent table. Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTo)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTo)).FzName) (*Parse)(unsafe.Pointer(pParse)).FnTab++ if regOld != 0 { // A row is being removed from the child table. Search for the parent. // If the parent does not exist, removing the child row resolves an // outstanding foreign key constraint violation. fkLookupParent(tls, pParse, iDb, pTo, *(*uintptr)(unsafe.Pointer(bp /* pIdx */)), pFKey, aiCol, regOld, -1, bIgnore) } if regNew != 0 && !(isSetNullAction(tls, pParse, pFKey) != 0) { // A row is being added to the child table. If a parent row cannot // be found, adding the child row has violated the FK constraint. // // If this operation is being performed as part of a trigger program // that is actually a "SET NULL" action belonging to this very // foreign key, then omit this scan altogether. As all child key // values are guaranteed to be NULL, it is not possible for adding // this row to cause an FK violation. fkLookupParent(tls, pParse, iDb, pTo, *(*uintptr)(unsafe.Pointer(bp /* pIdx */)), pFKey, aiCol, regNew, +1, bIgnore) } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* aiFree */))) } // Loop through all the foreign key constraints that refer to this table. // (the "child" constraints) for pFKey = Xsqlite3FkReferences(tls, pTab); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo { *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)) = uintptr(0) // Foreign key index for pFKey var pSrc uintptr *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)) = uintptr(0) if aChange != 0 && fkParentIsModified(tls, pTab, pFKey, aChange, bChngRowid) == 0 { continue } if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FpToplevel) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite) != 0) { // Inserting a single row into a parent table cannot cause (or fix) // an immediate foreign key violation. So do nothing in this case. continue } if Xsqlite3FkLocateIndex(tls, pParse, pTab, pFKey, bp+24, bp+32) != 0 { if !(isIgnoreErrors != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } continue } // Create a SrcList structure containing the child table. We need the // child table as a SrcList for sqlite3WhereBegin() pSrc = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), uintptr(0), uintptr(0)) if pSrc != 0 { var pItem uintptr = pSrc + 8 /* &.a */ (*SrcItem)(unsafe.Pointer(pItem)).FpTab = (*FKey)(unsafe.Pointer(pFKey)).FpFrom (*SrcItem)(unsafe.Pointer(pItem)).FzName = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FnTabRef++ (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) if regNew != 0 { fkScanChildren(tls, pParse, pSrc, pTab, *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)), pFKey, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)), regNew, -1) } if regOld != 0 { var eAction int32 = int32(*(*U8)(unsafe.Pointer(pFKey + 45 + uintptr(libc.Bool32(aChange != uintptr(0)))))) fkScanChildren(tls, pParse, pSrc, pTab, *(*uintptr)(unsafe.Pointer(bp + 24 /* pIdx */)), pFKey, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */)), regOld, 1) // If this is a deferred FK constraint, or a CASCADE or SET NULL // action applies, then any foreign key violations caused by // removing the parent key will be rectified by the action trigger. // So do not set the "may-abort" flag in this case. // // Note 1: If the FK is declared "ON UPDATE CASCADE", then the // may-abort flag will eventually be set on this statement anyway // (when this function is called as part of processing the UPDATE // within the action trigger). // // Note 2: At first glance it may seem like SQLite could simply omit // all OP_FkCounter related scans when either CASCADE or SET NULL // applies. The trouble starts if the CASCADE or SET NULL action // trigger causes other triggers or action rules attached to the // child table to fire. In these cases the fk constraint counters // might be set incorrectly if any OP_FkCounter related scans are // omitted. if !(int32((*FKey)(unsafe.Pointer(pFKey)).FisDeferred) != 0) && eAction != OE_Cascade && eAction != OE_SetNull { Xsqlite3MayAbort(tls, pParse) } } (*SrcItem)(unsafe.Pointer(pItem)).FzName = uintptr(0) Xsqlite3SrcListDelete(tls, db, pSrc) } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* aiCol */))) } } // This function is called before generating code to update or delete a // row contained in table pTab. func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124590:20: */ bp := tls.Alloc(8) defer tls.Free(8) var mask U32 = U32(0) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var p uintptr var i int32 for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { mask = mask | func() uint32 { if (*sColMap)(unsafe.Pointer(p+64+uintptr(i)*16)).FiFrom > 31 { return 0xffffffff } return U32(U32(1)) << (*sColMap)(unsafe.Pointer(p+64+uintptr(i)*16)).FiFrom }() } } for p = Xsqlite3FkReferences(tls, pTab); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextTo { *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) Xsqlite3FkLocateIndex(tls, pParse, pTab, p, bp, uintptr(0)) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { for i = 0; i < int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FnKeyCol); i++ { mask = mask | func() uint32 { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaiColumn + uintptr(i)*2))) > 31 { return 0xffffffff } return U32(U32(1)) << int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaiColumn + uintptr(i)*2))) }() } } } } return mask } // This function is called before generating code to update or delete a // row contained in table pTab. If the operation is a DELETE, then // parameter aChange is passed a NULL value. For an UPDATE, aChange points // to an array of size N, where N is the number of columns in table pTab. // If the i'th column is not modified by the UPDATE, then the corresponding // entry in the aChange[] array is set to -1. If the column is modified, // the value is 0 or greater. Parameter chngRowid is set to true if the // UPDATE statement modifies the rowid fields of the table. // // If any foreign key processing will be required, this function returns // non-zero. If there is no foreign key related processing, this function // returns zero. // // For an UPDATE, this function returns 2 if: // // * There are any FKs for which pTab is the child and the parent table // and any FK processing at all is required (even of a different FK), or // // * the UPDATE modifies one or more parent keys for which the action is // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124640:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { if !(aChange != 0) { // A DELETE operation. Foreign key processing is required if the // table in question is either the child or parent table for any // foreign key constraint. bHaveFK = libc.Bool32(Xsqlite3FkReferences(tls, pTab) != 0 || *(*uintptr)(unsafe.Pointer(pTab + 64 + 8)) != 0) } else { // This is an UPDATE. Foreign key processing is only required if the // operation modifies one or more child or parent key columns. var p uintptr // Check if any child key columns are being modified. for p = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextFrom { if fkChildIsModified(tls, pTab, p, aChange, chngRowid) != 0 { if 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, (*FKey)(unsafe.Pointer(p)).FzTo) { eRet = 2 } bHaveFK = 1 } } // Check if any parent key columns are being modified. for p = Xsqlite3FkReferences(tls, pTab); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextTo { if fkParentIsModified(tls, pTab, p, aChange, chngRowid) != 0 { if int32(*(*U8)(unsafe.Pointer(p + 45 + 1))) != OE_None { return 2 } bHaveFK = 1 } } } } if bHaveFK != 0 { return eRet } return 0 } // This function is called when an UPDATE or DELETE operation is being // compiled on table pTab, which is the parent table of foreign-key pFKey. // If the current operation is an UPDATE, then the pChanges parameter is // passed a pointer to the list of columns being modified. If it is a // DELETE, pChanges is passed a NULL pointer. // // It returns a pointer to a Trigger structure containing a trigger // equivalent to the ON UPDATE or ON DELETE action specified by pFKey. // If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is // returned (these actions require no special handling by the triggers // sub-system, code for them is created by fkScanChildren()). // // For example, if pFKey is the foreign key and pTab is table "p" in // the following schema: // // CREATE TABLE p(pk PRIMARY KEY); // CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE); // // then the returned trigger structure is equivalent to: // // CREATE TRIGGER ... DELETE ON p BEGIN // DELETE FROM c WHERE ck = old.pk; // END; // // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124708:16: */ bp := tls.Alloc(96) defer tls.Free(96) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var action int32 // One of OE_None, OE_Cascade etc. var pTrigger uintptr // Trigger definition to return var iAction int32 = libc.Bool32(pChanges != uintptr(0)) // 1 for UPDATE, 0 for DELETE action = int32(*(*U8)(unsafe.Pointer(pFKey + 45 + uintptr(iAction)))) if action == OE_Restrict && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_DeferFKs) != 0 { return uintptr(0) } pTrigger = *(*uintptr)(unsafe.Pointer(pFKey + 48 + uintptr(iAction)*8)) if action != OE_None && !(pTrigger != 0) { var zFrom uintptr // Name of child table var nFrom int32 // Length in bytes of zFrom *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) // Parent key index for this FK *(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */)) = uintptr(0) // child table cols -> parent key cols var pStep uintptr = uintptr(0) // First (only) step of trigger program var pWhere uintptr = uintptr(0) // WHERE clause of trigger step var pList uintptr = uintptr(0) // Changes list if ON UPDATE CASCADE var pSelect uintptr = uintptr(0) // If RESTRICT, "SELECT RAISE(...)" var i int32 // Iterator variable var pWhen uintptr = uintptr(0) // WHEN clause for the trigger if Xsqlite3FkLocateIndex(tls, pParse, pTab, pFKey, bp, bp+8) != 0 { return uintptr(0) } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { *(*Token)(unsafe.Pointer(bp + 48 /* tOld */)) = Token{Fz: ts + 7695, Fn: uint32(3)} // Literal "old" token *(*Token)(unsafe.Pointer(bp + 64 /* tNew */)) = Token{Fz: ts + 7691, Fn: uint32(3)} // Literal "new" token // var tFromCol Token at bp+32, 16 // Name of column in child table // var tToCol Token at bp+16, 16 // Name of column in parent table var iFromCol int32 // Idx of column in child table var pEq uintptr // tFromCol = OLD.tToCol if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { iFromCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */)) + uintptr(i)*4)) } else { iFromCol = (*sColMap)(unsafe.Pointer(pFKey + 64)).FiFrom } Xsqlite3TokenInit(tls, bp+16, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(func() int32 { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FaiColumn + uintptr(i)*2))) } return int32((*Table)(unsafe.Pointer(pTab)).FiPKey) }())*24)).FzCnName) Xsqlite3TokenInit(tls, bp+32, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol+uintptr(iFromCol)*24)).FzCnName) // Create the expression "OLD.zToCol = zFromCol". It is important // that the "OLD.zToCol" term is on the LHS of the = operator, so // that the affinity and collation sequence associated with the // parent table are used for the comparison. pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, Xsqlite3PExpr(tls, pParse, TK_DOT, Xsqlite3ExprAlloc(tls, db, TK_ID, bp+48, 0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32, 0)) pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pEq) // For ON UPDATE, construct the next term of the WHEN clause. // The final WHEN clause will be like this: // // WHEN NOT(old.col1 IS new.col1 AND ... AND old.colN IS new.colN) if pChanges != 0 { pEq = Xsqlite3PExpr(tls, pParse, TK_IS, Xsqlite3PExpr(tls, pParse, TK_DOT, Xsqlite3ExprAlloc(tls, db, TK_ID, bp+48, 0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)), Xsqlite3PExpr(tls, pParse, TK_DOT, Xsqlite3ExprAlloc(tls, db, TK_ID, bp+64, 0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0))) pWhen = Xsqlite3ExprAnd(tls, pParse, pWhen, pEq) } if action != OE_Restrict && (action != OE_Cascade || pChanges != 0) { var pNew uintptr if action == OE_Cascade { pNew = Xsqlite3PExpr(tls, pParse, TK_DOT, Xsqlite3ExprAlloc(tls, db, TK_ID, bp+64, 0), Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)) } else if action == OE_SetDflt { var pCol uintptr = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol + uintptr(iFromCol)*24 var pDflt uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { pDflt = uintptr(0) } else { pDflt = Xsqlite3ColumnExpr(tls, (*FKey)(unsafe.Pointer(pFKey)).FpFrom, pCol) } if pDflt != 0 { pNew = Xsqlite3ExprDup(tls, db, pDflt, 0) } else { pNew = Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0) } } else { pNew = Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0) } pList = Xsqlite3ExprListAppend(tls, pParse, pList, pNew) Xsqlite3ExprListSetName(tls, pParse, pList, bp+32, 0) } } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* aiCol */))) zFrom = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName nFrom = Xsqlite3Strlen30(tls, zFrom) if action == OE_Restrict { // var tFrom Token at bp+80, 16 var pRaise uintptr (*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fz = zFrom (*Token)(unsafe.Pointer(bp + 80 /* &tFrom */)).Fn = uint32(nFrom) pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+6439) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } pSelect = Xsqlite3SelectNew(tls, pParse, Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRaise), Xsqlite3SrcListAppend(tls, pParse, uintptr(0), bp+80, uintptr(0)), pWhere, uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) pWhere = uintptr(0) } // Disable lookaside memory allocation (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) pTrigger = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Trigger{}))+uint64(unsafe.Sizeof(TriggerStep{}))+uint64(nFrom)+uint64(1)) if pTrigger != 0 { pStep = libc.AssignPtrUintptr(pTrigger+56, pTrigger+1*72) (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget = pStep + 1*96 libc.Xmemcpy(tls, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zFrom, uint64(nFrom)) (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere = Xsqlite3ExprDup(tls, db, pWhere, EXPRDUP_REDUCE) (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList = Xsqlite3ExprListDup(tls, db, pList, EXPRDUP_REDUCE) (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect = Xsqlite3SelectDup(tls, db, pSelect, EXPRDUP_REDUCE) if pWhen != 0 { pWhen = Xsqlite3PExpr(tls, pParse, TK_NOT, pWhen, uintptr(0)) (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen = Xsqlite3ExprDup(tls, db, pWhen, EXPRDUP_REDUCE) } } // Re-enable the lookaside buffer, if it was disabled earlier. (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { return uint16(0) } return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue }() Xsqlite3ExprDelete(tls, db, pWhere) Xsqlite3ExprDelete(tls, db, pWhen) Xsqlite3ExprListDelete(tls, db, pList) Xsqlite3SelectDelete(tls, db, pSelect) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 1 { fkTriggerDelete(tls, db, pTrigger) return uintptr(0) } switch action { case OE_Restrict: (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_SELECT) break fallthrough case OE_Cascade: if !(pChanges != 0) { (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_DELETE) break } fallthrough default: (*TriggerStep)(unsafe.Pointer(pStep)).Fop = U8(TK_UPDATE) } (*TriggerStep)(unsafe.Pointer(pStep)).FpTrig = pTrigger (*Trigger)(unsafe.Pointer(pTrigger)).FpSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema = (*Table)(unsafe.Pointer(pTab)).FpSchema *(*uintptr)(unsafe.Pointer(pFKey + 48 + uintptr(iAction)*8)) = pTrigger (*Trigger)(unsafe.Pointer(pTrigger)).Fop = func() uint8 { if pChanges != 0 { return uint8(TK_UPDATE) } return uint8(TK_DELETE) }() } return pTrigger } // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124900:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated // trigger sub-program. if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 { var pFKey uintptr // Iterator variable for pFKey = Xsqlite3FkReferences(tls, pTab); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo { if aChange == uintptr(0) || fkParentIsModified(tls, pTab, pFKey, aChange, bChngRowid) != 0 { var pAct uintptr = fkActionTrigger(tls, pParse, pTab, pFKey, pChanges) if pAct != 0 { Xsqlite3CodeRowTriggerDirect(tls, pParse, pAct, pTab, regOld, OE_Abort, 0) } } } } } // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124932:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 64 + 8 /* &.pFKey */)); pFKey != 0; pFKey = pNext { // Remove the FK from the fkeyHash hash table. if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { if (*FKey)(unsafe.Pointer(pFKey)).FpPrevTo != 0 { (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpPrevTo)).FpNextTo = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo } else { var p uintptr = (*FKey)(unsafe.Pointer(pFKey)).FpNextTo var z uintptr = func() uintptr { if p != 0 { return (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpNextTo)).FzTo } return (*FKey)(unsafe.Pointer(pFKey)).FzTo }() Xsqlite3HashInsert(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+80, z, p) } if (*FKey)(unsafe.Pointer(pFKey)).FpNextTo != 0 { (*FKey)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpNextTo)).FpPrevTo = (*FKey)(unsafe.Pointer(pFKey)).FpPrevTo } } // EV: R-30323-21917 Each foreign key constraint in SQLite is // classified as either immediate or deferred. // Delete any triggers created to implement actions for this FK. fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48))) fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 48 + 1*8))) pNext = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom Xsqlite3DbFree(tls, db, pFKey) } } //************* End of fkey.c *********************************************** //************* Begin file insert.c ***************************************** // 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 file contains C code routines that are called by the parser // to handle INSERT statements in SQLite. // #include "sqliteInt.h" // Generate code that will // // (1) acquire a lock for table pTab then // (2) open pTab as cursor iCur. // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:124998:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, func() uint8 { if opcode == OP_OpenWrite { return uint8(1) } return uint8(0) }(), (*Table)(unsafe.Pointer(pTab)).FzName) if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { Xsqlite3VdbeAddOp4Int(tls, v, opcode, iCur, int32((*Table)(unsafe.Pointer(pTab)).Ftnum), iDb, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)) } else { var pPk uintptr = Xsqlite3PrimaryKeyIndex(tls, pTab) Xsqlite3VdbeAddOp3(tls, v, opcode, iCur, int32((*Index)(unsafe.Pointer(pPk)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pPk) } } // Return a pointer to the column affinity string associated with index // pIdx. A column affinity string has one character for each column in // the table, according to the affinity of the column: // // Character Column affinity // ------------------------------ // 'A' BLOB // 'B' TEXT // 'C' NUMERIC // 'D' INTEGER // 'F' REAL // // An extra 'D' is appended to the end of the string to cover the // rowid that appears as the last column in every index. // // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125045:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as // a member of the Index structure for subsequent use. // // The column affinity string will eventually be deleted by // sqliteDeleteIndex() when the Index structure itself is cleaned // up. var n int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable (*Index)(unsafe.Pointer(pIdx)).FzColAff = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(int32((*Index)(unsafe.Pointer(pIdx)).FnColumn)+1)) if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { Xsqlite3OomFault(tls, db) return uintptr(0) } for n = 0; n < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); n++ { var x I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(n)*2)) var aff int8 if int32(x) >= 0 { aff = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(x)*24)).Faffinity } else if int32(x) == -1 { aff = int8(SQLITE_AFF_INTEGER) } else { aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(n)*32)).FpExpr) } if int32(aff) < SQLITE_AFF_BLOB { aff = int8(SQLITE_AFF_BLOB) } if int32(aff) > SQLITE_AFF_NUMERIC { aff = int8(SQLITE_AFF_NUMERIC) } *(*int8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = aff } *(*int8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FzColAff + uintptr(n))) = int8(0) } return (*Index)(unsafe.Pointer(pIdx)).FzColAff } // Make changes to the evolving bytecode to do affinity transformations // of values that are about to be gathered into a row for table pTab. // // For ordinary (legacy, non-strict) tables: // ----------------------------------------- // // Compute the affinity string for table pTab, if it has not already been // computed. As an optimization, omit trailing SQLITE_AFF_BLOB affinities. // // If the affinity string is empty (because it was all SQLITE_AFF_BLOB entries // which were then optimized out) then this routine becomes a no-op. // // Otherwise if iReg>0 then code an OP_Affinity opcode that will set the // affinities for register iReg and following. Or if iReg==0, // then just set the P4 operand of the previous opcode (which should be // an OP_MakeRecord) to the affinity string. // // A column affinity string has one character per column: // // Character Column affinity // --------- --------------- // 'A' BLOB // 'B' TEXT // 'C' NUMERIC // 'D' INTEGER // 'E' REAL // // For STRICT tables: // ------------------ // // Generate an appropropriate OP_TypeCheck opcode that will verify the // datatypes against the column definitions in pTab. If iReg==0, that // means an OP_MakeRecord opcode has already been generated and should be // the last opcode generated. The new OP_TypeCheck needs to be inserted // before the OP_MakeRecord. The new OP_TypeCheck should use the same // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125124:21: */ var i int32 var j int32 var zColAff uintptr if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Strict) != 0 { if iReg == 0 { // Move the previous opcode (which should be OP_MakeRecord) forward // by one slot and insert a new OP_TypeCheck where the current // OP_MakeRecord is found var pPrev uintptr Xsqlite3VdbeAppendP4(tls, v, pTab, -6) pPrev = Xsqlite3VdbeGetOp(tls, v, -1) (*VdbeOp)(unsafe.Pointer(pPrev)).Fopcode = U8(OP_TypeCheck) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp1, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp2, (*VdbeOp)(unsafe.Pointer(pPrev)).Fp3) } else { // Insert an isolated OP_Typecheck Xsqlite3VdbeAddOp2(tls, v, OP_TypeCheck, iReg, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)) Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } return } zColAff = (*Table)(unsafe.Pointer(pTab)).FzColAff if zColAff == uintptr(0) { var db uintptr = Xsqlite3VdbeDb(tls, v) zColAff = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1)) if !(zColAff != 0) { Xsqlite3OomFault(tls, db) return } for i = libc.AssignInt32(&j, 0); i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_VIRTUAL == 0 { *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostIncInt32(&j, 1)))) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24)).Faffinity } } for __ccgo := true; __ccgo; __ccgo = j >= 0 && int32(*(*int8)(unsafe.Pointer(zColAff + uintptr(j)))) <= SQLITE_AFF_BLOB { *(*int8)(unsafe.Pointer(zColAff + uintptr(libc.PostDecInt32(&j, 1)))) = int8(0) } (*Table)(unsafe.Pointer(pTab)).FzColAff = zColAff } i = int32(libc.Xstrlen(tls, zColAff) & uint64(0x3fffffff)) if i != 0 { if iReg != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Affinity, iReg, i, 0, zColAff, i) } else { Xsqlite3VdbeChangeP4(tls, v, -1, zColAff, i) } } } // Return non-zero if the table pTab in database iDb or any of its indices // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can // run without using a temporary table for the results of the SELECT. func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125185:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) var pVTab uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { pVTab = Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(p)).Fdb, pTab) } else { pVTab = uintptr(0) } for i = 1; i < iEnd; i++ { var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, i) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_OpenRead && (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 == iDb { var pIndex uintptr var tnum Pgno = Pgno((*VdbeOp)(unsafe.Pointer(pOp)).Fp2) if tnum == (*Table)(unsafe.Pointer(pTab)).Ftnum { return 1 } for pIndex = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIndex != 0; pIndex = (*Index)(unsafe.Pointer(pIndex)).FpNext { if tnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum { return 1 } } } if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_VOpen && *(*uintptr)(unsafe.Pointer(pOp + 16)) == pVTab { return 1 } } return 0 } // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125222:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*24)).FcolFlags)) } return WRC_Continue } // All regular columns for table pTab have been puts into registers // starting with iRegStore. The registers that correspond to STORED // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125238:21: */ bp := tls.Alloc(56) defer tls.Free(56) var i int32 // var w Walker at bp+8, 48 var pRedo uintptr var eProgress int32 var pOp uintptr // Before computing generated columns, first go through and make sure // that appropriate affinity has been applied to the regular columns Xsqlite3TableAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iRegStore) if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasStored) != U32(0) { pOp = Xsqlite3VdbeGetOp(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, -1) if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_Affinity { // Change the OP_Affinity argument to '@' (NONE) for all stored // columns. '@' is the no-op affinity and those columns have not // yet been computed. var ii int32 var jj int32 var zP4 uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) for ii = libc.AssignInt32(&jj, 0); *(*int8)(unsafe.Pointer(zP4 + uintptr(jj))) != 0; ii++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*24)).FcolFlags)&COLFLAG_VIRTUAL != 0 { continue } if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(ii)*24)).FcolFlags)&COLFLAG_STORED != 0 { *(*int8)(unsafe.Pointer(zP4 + uintptr(jj))) = int8(SQLITE_AFF_NONE) } jj++ } } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fopcode) == OP_TypeCheck { // If an OP_TypeCheck was generated because the table is STRICT, // then set the P3 operand to indicate that generated columns should // not be checked (*VdbeOp)(unsafe.Pointer(pOp)).Fp3 = 1 } } // Because there can be multiple generated columns that refer to one another, // this is a two-pass algorithm. On the first pass, mark all generated // columns as "not available". for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_GENERATED != 0 { *(*U16)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 + 16)) |= U16(COLFLAG_NOTAVAIL) } } *(*uintptr)(unsafe.Pointer(bp + 8 + 40)) = pTab (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprColumnFlagUnion})) (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback = uintptr(0) (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback2 = uintptr(0) // On the second pass, compute the value of each NOT-AVAILABLE column. // Companion code in the TK_COLUMN case of sqlite3ExprCodeTarget() will // compute dependencies and mark remove the COLSPAN_NOTAVAIL mark, as // they are needed. (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -iRegStore for __ccgo := true; __ccgo; __ccgo = pRedo != 0 && eProgress != 0 { eProgress = 0 pRedo = uintptr(0) for i = 0; i < int32((*Table)(unsafe.Pointer(pTab)).FnCol); i++ { var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_NOTAVAIL != 0 { var x int32 *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_BUSY) (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FeCode = U16(0) Xsqlite3WalkExpr(tls, bp+8, Xsqlite3ColumnExpr(tls, pTab, pCol)) *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY)) if int32((*Walker)(unsafe.Pointer(bp+8)).FeCode)&COLFLAG_NOTAVAIL != 0 { pRedo = pCol continue } eProgress = 1 x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(i))) + iRegStore Xsqlite3ExprCodeGeneratedColumn(tls, pParse, pTab, pCol, x) *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_NOTAVAIL)) } } } if pRedo != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+9209, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } // Locate or create an AutoincInfo structure associated with table pTab // which is in database iDb. Return the register number for the register // that holds the maximum rowid. Return zero if pTab is not an AUTOINCREMENT // table. (Also return zero when doing a VACUUM since we do not want to // update the AUTOINCREMENT counters during a VACUUM.) // // There is at most one AutoincInfo structure per table even if the // same table is autoincremented multiple times due to inserts within // triggers. A new AutoincInfo structure is created if this is the // first use of table pTab. On 2nd and subsequent uses, the original // AutoincInfo structure is used. // // Four consecutive registers are allocated: // // (1) The name of the pTab table. // (2) The maximum ROWID of pTab. // (3) The rowid in sqlite_sequence of pTab // (4) The original value of the max ROWID in pTab, or NULL if none // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125362:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel } return pParse }() var pInfo uintptr var pSeqTab uintptr = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FpSchema)).FpSeqTab // Verify that the sqlite_sequence table exists and is an ordinary // rowid table with exactly two columns. // Ticket d8dc2b3a58cd5dc2918a1d4acb 2018-05-23 if pSeqTab == uintptr(0) || !((*Table)(unsafe.Pointer(pSeqTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) || int32((*Table)(unsafe.Pointer(pSeqTab)).FeTabType) == TABTYP_VTAB || int32((*Table)(unsafe.Pointer(pSeqTab)).FnCol) != 2 { (*Parse)(unsafe.Pointer(pParse)).FnErr++ (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_CORRUPT | int32(2)<<8 return 0 } pInfo = (*Parse)(unsafe.Pointer(pToplevel)).FpAinc for pInfo != 0 && (*AutoincInfo)(unsafe.Pointer(pInfo)).FpTab != pTab { pInfo = (*AutoincInfo)(unsafe.Pointer(pInfo)).FpNext } if pInfo == uintptr(0) { pInfo = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(AutoincInfo{}))) Xsqlite3ParserAddCleanup(tls, pToplevel, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3DbFree})), pInfo) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return 0 } (*AutoincInfo)(unsafe.Pointer(pInfo)).FpNext = (*Parse)(unsafe.Pointer(pToplevel)).FpAinc (*Parse)(unsafe.Pointer(pToplevel)).FpAinc = pInfo (*AutoincInfo)(unsafe.Pointer(pInfo)).FpTab = pTab (*AutoincInfo)(unsafe.Pointer(pInfo)).FiDb = iDb (*Parse)(unsafe.Pointer(pToplevel)).FnMem++ // Register to hold name of table (*AutoincInfo)(unsafe.Pointer(pInfo)).FregCtr = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pToplevel)).FnMem, 1) // Max rowid register *(*int32)(unsafe.Pointer(pToplevel + 56)) += 2 // Rowid in sqlite_sequence + orig max val } memId = (*AutoincInfo)(unsafe.Pointer(pInfo)).FregCtr } return memId } // This routine generates code that will initialize all of the // register used by the autoincrement tracker. func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125413:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table var memId int32 // Register holding max rowid var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // VDBE under construction // This routine is never called during trigger-generation. It is // only called from the top-level // We failed long ago if this is not so for p = (*Parse)(unsafe.Pointer(pParse)).FpAinc; p != 0; p = (*AutoincInfo)(unsafe.Pointer(p)).FpNext { var aOp uintptr pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*AutoincInfo)(unsafe.Pointer(p)).FiDb)*32 memId = (*AutoincInfo)(unsafe.Pointer(p)).FregCtr Xsqlite3OpenTable(tls, pParse, 0, (*AutoincInfo)(unsafe.Pointer(p)).FiDb, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab, OP_OpenRead) Xsqlite3VdbeLoadString(tls, v, memId-1, (*Table)(unsafe.Pointer((*AutoincInfo)(unsafe.Pointer(p)).FpTab)).FzName) aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(autoInc))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&autoInc)), iLn1) if aOp == uintptr(0) { break } (*VdbeOp)(unsafe.Pointer(aOp)).Fp2 = memId (*VdbeOp)(unsafe.Pointer(aOp)).Fp3 = memId + 2 (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp3 = memId (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp1 = memId - 1 (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp3 = memId (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp5 = U16(SQLITE_JUMPIFNULL) (*VdbeOp)(unsafe.Pointer(aOp + 4*24)).Fp2 = memId + 1 (*VdbeOp)(unsafe.Pointer(aOp + 5*24)).Fp3 = memId (*VdbeOp)(unsafe.Pointer(aOp + 6*24)).Fp1 = memId (*VdbeOp)(unsafe.Pointer(aOp + 7*24)).Fp2 = memId + 2 (*VdbeOp)(unsafe.Pointer(aOp + 7*24)).Fp1 = memId (*VdbeOp)(unsafe.Pointer(aOp + 10*24)).Fp2 = memId if (*Parse)(unsafe.Pointer(pParse)).FnTab == 0 { (*Parse)(unsafe.Pointer(pParse)).FnTab = 1 } } } var iLn1 int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125427:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, /* 2 */ {Fopcode: U8(OP_Column)}, /* 3 */ {Fopcode: U8(OP_Ne), Fp2: int8(9)}, /* 4 */ {Fopcode: U8(OP_Rowid)}, /* 5 */ {Fopcode: U8(OP_Column), Fp2: int8(1)}, /* 6 */ {Fopcode: U8(OP_AddImm)}, /* 7 */ {Fopcode: U8(OP_Copy)}, /* 8 */ {Fopcode: U8(OP_Goto), Fp2: int8(11)}, /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125428:29 */ // Update the maximum rowid for an autoincrement calculation. // // This routine should be called when the regRowid register holds a // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125474:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } } // This routine generates the code needed to write autoincrement // maximum rowid values back into the sqlite_sequence register. // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125487:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb for p = (*Parse)(unsafe.Pointer(pParse)).FpAinc; p != 0; p = (*AutoincInfo)(unsafe.Pointer(p)).FpNext { var aOp uintptr var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*AutoincInfo)(unsafe.Pointer(p)).FiDb)*32 var iRec int32 var memId int32 = (*AutoincInfo)(unsafe.Pointer(p)).FregCtr iRec = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_Le, memId+2, Xsqlite3VdbeCurrentAddr(tls, v)+7, memId) Xsqlite3OpenTable(tls, pParse, 0, (*AutoincInfo)(unsafe.Pointer(p)).FiDb, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab, OP_OpenWrite) aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(autoIncEnd))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&autoIncEnd)), iLn2) if aOp == uintptr(0) { break } (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = memId + 1 (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp2 = memId + 1 (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp1 = memId - 1 (*VdbeOp)(unsafe.Pointer(aOp + 2*24)).Fp3 = iRec (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp2 = iRec (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp3 = memId + 1 (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp5 = U16(OPFLAG_APPEND) Xsqlite3ReleaseTempReg(tls, pParse, iRec) } } var iLn2 int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125494:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125495:29 */ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125524:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } } // This routine is called to handle SQL of the following forms: // // insert into TABLE (IDLIST) values(EXPRLIST),(EXPRLIST),... // insert into TABLE (IDLIST) select // insert into TABLE (IDLIST) default values // // The IDLIST following the table name is always optional. If omitted, // then a list of all (non-hidden) columns for the table is substituted. // The IDLIST appears in the pColumn parameter. pColumn is NULL if IDLIST // is omitted. // // For the pSelect parameter holds the values to be inserted for the // first two forms shown above. A VALUES clause is really just short-hand // for a SELECT statement that omits the FROM clause and everything else // that follows. If the pSelect parameter is NULL, that means that the // DEFAULT VALUES form of the INSERT statement is intended. // // The code generated follows one of four templates. For a simple // insert with data coming from a single-row VALUES clause, the code executes // once straight down through. Pseudo-code follows (we call this // the "1st template"): // // open write cursor to <table> and its indices // put VALUES clause expressions into registers // write the resulting record into <table> // cleanup // // The three remaining templates assume the statement is of the form // // INSERT INTO <table> SELECT ... // // If the SELECT clause is of the restricted form "SELECT * FROM <table2>" - // in other words if the SELECT pulls all columns from a single table // and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and // if <table2> and <table1> are distinct tables but have identical // schemas, including all the same indices, then a special optimization // is invoked that copies raw records from <table2> over to <table1>. // See the xferOptimization() function for the implementation of this // template. This is the 2nd template. // // open a write cursor to <table> // open read cursor on <table2> // transfer all records in <table2> over to <table> // close cursors // foreach index on <table> // open a write cursor on the <table> index // open a read cursor on the corresponding <table2> index // transfer all records from the read to the write cursors // close cursors // end foreach // // The 3rd template is for when the second template does not apply // and the SELECT clause does not read from <table> at any time. // The generated code follows this template: // // X <- A // goto B // A: setup for the SELECT // loop over the rows in the SELECT // load values into registers R..R+n // yield X // end loop // cleanup after the SELECT // end-coroutine X // B: open write cursor to <table> and its indices // C: yield X, at EOF goto D // insert the select result into <table> from R..R+n // goto C // D: cleanup // // The 4th template is used if the insert statement takes its // values from a SELECT but the data is being inserted into a table // that is also read as part of the SELECT. In the third form, // we have to use an intermediate table to store the results of // the select. The template is like this: // // X <- A // goto B // A: setup for the SELECT // loop over the tables in the SELECT // load value into register R..R+n // yield X // end loop // cleanup after the SELECT // end co-routine R // B: open temp table // L: yield X, at EOF goto M // insert row from R..R+n into temp table // goto L // M: open write cursor to <table> and its indices // rewind temp table // C: loop over rows of intermediate table // transfer values form intermediate table into <table> // end loop // D: cleanup func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:125643:21: */ bp := tls.Alloc(188) defer tls.Free(188) var db uintptr // The main database structure var pTab uintptr // The table to insert into. aka TABLE var i int32 var j int32 // Loop counters var v uintptr // Generate code into this virtual machine var pIdx uintptr // For looping over indices of the table var nColumn int32 // Number of columns in the data var nHidden int32 // Number of hidden columns if TABLE is virtual // var iDataCur int32 at bp+176, 4 // VDBE cursor that is the main data repository // var iIdxCur int32 at bp+180, 4 // First index cursor var ipkColumn int32 // Column that is the INTEGER PRIMARY KEY var endOfLoop int32 // Label for the end of the insertion loop var srcTab int32 // Data comes from this temporary cursor if >=0 var addrInsTop int32 // Jump to label "D" var addrCont int32 // Top of insert loop. Label "C" in templates 3 and 4 // var dest SelectDest at bp+80, 40 // Destination for SELECT on rhs of INSERT var iDb int32 // Index of database holding TABLE var useTempTable U8 // Store SELECT results in intermediate table var appendFlag U8 // True if the insert is likely to be an append var withoutRowid U8 // 0 for normal table. 1 for WITHOUT ROWID table var bIdListInOrder U8 // True if IDLIST is in table order var pList uintptr // List of VALUES() to be inserted var iRegStore int32 // Register in which to store next column // Register allocations var regFromSelect int32 // Base register for data coming from SELECT var regAutoinc int32 // Register holding the AUTOINCREMENT counter var regRowCount int32 // Memory cell used for the row counter var regIns int32 // Block of regs holding rowid+data being inserted var regRowid int32 // registers holding insert rowid var regData int32 // register holding first column to insert var aRegIdx uintptr // One register allocated to each index var isView int32 // True if attempting to insert into a view var pTrigger uintptr // List of triggers on pTab, if required // var tmask int32 at bp+72, 4 // Invoke the coroutine to extract information from the SELECT // and add it to a transient table srcTab. The code generated // here is from the 4th template: // // B: open temp table // L: yield X, goto M at EOF // insert row from R..R+n into temp table // goto L // M: ... var regRec int32 // Register to hold packed record var regTempRowid int32 // Register to hold temp table ROWID var addrL int32 // Data is coming from a SELECT or from a multi-row VALUES clause. // Generate a co-routine to run the SELECT. var regYield int32 // Register holding co-routine entry-point var addrTop int32 // Top of the co-routine var rc int32 // This is the case if the data for the INSERT is coming from a // single-row VALUES clause // var sNC NameContext at bp+120, 56 var nIdx int32 var pNx uintptr var k int32 var colFlags U32 var addr1 int32 var regCols int32 var pIpk uintptr var addr11 int32 var pVTab uintptr // var isReplace int32 at bp+184, 4 // Set to true if constraints may cause a replace var bUseSeek int32 nHidden = 0 *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) = 0 *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) = 0 ipkColumn = -1 srcTab = 0 addrInsTop = 0 addrCont = 0 useTempTable = U8(0) appendFlag = U8(0) pList = uintptr(0) regFromSelect = 0 regAutoinc = 0 regRowCount = 0 aRegIdx = uintptr(0) // Mask of trigger times db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __1 } goto insert_cleanup __1: ; (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning // If the Select object is really just a simple VALUES() list with a // single row (the common case) then keep that one row of values // and discard the other (unused) parts of the pSelect object if !(pSelect != 0 && (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_Values) != U32(0) && (*Select)(unsafe.Pointer(pSelect)).FpPrior == uintptr(0)) { goto __2 } pList = (*Select)(unsafe.Pointer(pSelect)).FpEList (*Select)(unsafe.Pointer(pSelect)).FpEList = uintptr(0) Xsqlite3SelectDelete(tls, db, pSelect) pSelect = uintptr(0) __2: ; // Locate the table into which we will be inserting new information. pTab = Xsqlite3SrcListLookup(tls, pParse, pTabList) if !(pTab == uintptr(0)) { goto __3 } goto insert_cleanup __3: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, (*Table)(unsafe.Pointer(pTab)).FzName, uintptr(0), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) != 0) { goto __4 } goto insert_cleanup __4: ; withoutRowid = libc.BoolUint8(!((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) // Figure out if we have any triggers and if the table being // inserted into is a view pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72) isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) // If pTab is really a view, make sure it has been initialized. // ViewGetColumnNames() is a no-op if pTab is not a view. if !(Xsqlite3ViewGetColumnNames(tls, pParse, pTab) != 0) { goto __5 } goto insert_cleanup __5: ; // Cannot insert into a read-only table. if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 72))) != 0) { goto __6 } goto insert_cleanup __6: ; // Allocate a VDBE v = Xsqlite3GetVdbe(tls, pParse) if !(v == uintptr(0)) { goto __7 } goto insert_cleanup __7: ; if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) { goto __8 } Xsqlite3VdbeCountChanges(tls, v) __8: ; Xsqlite3BeginWriteOperation(tls, pParse, libc.Bool32(pSelect != 0 || pTrigger != 0), iDb) // If the statement is of the form // // INSERT INTO <table1> SELECT * FROM <table2>; // // Then special optimizations can be applied that make the transfer // very fast and which reduce fragmentation of indices. // // This is the 2nd template. if !(pColumn == uintptr(0) && pSelect != uintptr(0) && pTrigger == uintptr(0) && xferOptimization(tls, pParse, pTab, pSelect, onError, iDb) != 0) { goto __9 } goto insert_end __9: ; // If this is an AUTOINCREMENT table, look up the sequence number in the // sqlite_sequence table and store it in memory cell regAutoinc. regAutoinc = autoIncBegin(tls, pParse, iDb, pTab) // Allocate a block registers to hold the rowid and the values // for all columns of the new row. regRowid = libc.AssignInt32(®Ins, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1 if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __10 } regRowid++ (*Parse)(unsafe.Pointer(pParse)).FnMem++ __10: ; regData = regRowid + 1 // If the INSERT statement included an IDLIST term, then make sure // all elements of the IDLIST really are columns of the table and // remember the column indices. // // If the table has an INTEGER PRIMARY KEY column and that column // is named in the IDLIST, then record in the ipkColumn variable // the index into IDLIST of the primary key column. ipkColumn is // the index of the primary key as it appears in IDLIST, not as // is appears in the original table. (The index of the INTEGER // PRIMARY KEY in the original table is pTab->iPKey.) After this // loop, if ipkColumn==(-1), that means that integer primary key // is unspecified, and hence the table is either WITHOUT ROWID or // it will automatically generated an integer primary key. // // bIdListInOrder is true if the columns in IDLIST are in storage // order. This enables an optimization that avoids shuffling the // columns into storage order. False negatives are harmless, // but false positives will cause database corruption. bIdListInOrder = U8(libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_OOOHidden|TF_HasStored) == U32(0))) if !(pColumn != 0) { goto __11 } i = 0 __12: if !(i < (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __14 } (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa + uintptr(i)*16)).Fidx = -1 goto __13 __13: i++ goto __12 goto __14 __14: ; i = 0 __15: if !(i < (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __17 } j = 0 __18: if !(j < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __20 } if !(Xsqlite3StrICmp(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName) == 0) { goto __21 } (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa + uintptr(i)*16)).Fidx = j if !(i != j) { goto __22 } bIdListInOrder = U8(0) __22: ; if !(j == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { goto __23 } ipkColumn = i __23: ; if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FcolFlags)&(COLFLAG_STORED|COLFLAG_VIRTUAL) != 0) { goto __24 } Xsqlite3ErrorMsg(tls, pParse, ts+16921, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*24)).FzCnName)) goto insert_cleanup __24: ; goto __20 __21: ; goto __19 __19: j++ goto __18 goto __20 __20: ; if !(j >= int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __25 } if !(Xsqlite3IsRowid(tls, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName) != 0 && !(withoutRowid != 0)) { goto __26 } ipkColumn = i bIdListInOrder = U8(0) goto __27 __26: Xsqlite3ErrorMsg(tls, pParse, ts+16962, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup __27: ; __25: ; goto __16 __16: i++ goto __15 goto __17 __17: ; __11: ; // Figure out how many columns of data are supplied. If the data // is coming from a SELECT statement, then generate a co-routine that // produces a single row of the SELECT on each invocation. The // co-routine is the common header to the 3rd and 4th templates. if !(pSelect != 0) { goto __28 } // Result code regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) Xsqlite3SelectDestInit(tls, bp+80, SRT_Coroutine, regYield) (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst = func() int32 { if bIdListInOrder != 0 { return regData } return 0 }() (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol) rc = Xsqlite3Select(tls, pParse, pSelect, bp+80) regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst if !(rc != 0 || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __30 } goto insert_cleanup __30: ; Xsqlite3VdbeEndCoroutine(tls, v, regYield) Xsqlite3VdbeJumpHere(tls, v, addrTop-1) // label B: nColumn = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpEList)).FnExpr // Set useTempTable to TRUE if the result of the SELECT statement // should be written into a temporary table (template 4). Set to // FALSE if each output row of the SELECT can be written directly into // the destination table (template 3). // // A temp table must be used if the table being updated is also one // of the tables being read by the SELECT statement. Also use a // temp table in the case of row triggers. if !(pTrigger != 0 || readsTable(tls, pParse, iDb, pTab) != 0) { goto __31 } useTempTable = U8(1) __31: ; if !(useTempTable != 0) { goto __32 } // Label "L" srcTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) regRec = Xsqlite3GetTempReg(tls, pParse) regTempRowid = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, srcTab, nColumn) addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regFromSelect, nColumn, regRec) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, srcTab, regTempRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, srcTab, regRec, regTempRowid) Xsqlite3VdbeGoto(tls, v, addrL) Xsqlite3VdbeJumpHere(tls, v, addrL) Xsqlite3ReleaseTempReg(tls, pParse, regRec) Xsqlite3ReleaseTempReg(tls, pParse, regTempRowid) __32: ; goto __29 __28: libc.Xmemset(tls, bp+120, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 120 /* &sNC */)).FpParse = pParse srcTab = -1 if !(pList != 0) { goto __33 } nColumn = (*ExprList)(unsafe.Pointer(pList)).FnExpr if !(Xsqlite3ResolveExprListNames(tls, bp+120, pList) != 0) { goto __35 } goto insert_cleanup __35: ; goto __34 __33: nColumn = 0 __34: ; __29: ; // If there is no IDLIST term but the table has an integer primary // key, the set the ipkColumn variable to the integer primary key // column index in the original table definition. if !(pColumn == uintptr(0) && nColumn > 0) { goto __36 } ipkColumn = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) if !(ipkColumn >= 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0)) { goto __37 } i = ipkColumn - 1 __38: if !(i >= 0) { goto __40 } if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_GENERATED != 0) { goto __41 } ipkColumn-- __41: ; goto __39 __39: i-- goto __38 goto __40 __40: ; __37: ; // Make sure the number of columns in the source data matches the number // of columns to be inserted into the table. if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated|TF_HasHidden) != U32(0)) { goto __42 } i = 0 __43: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __45 } if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags)&COLFLAG_NOINSERT != 0) { goto __46 } nHidden++ __46: ; goto __44 __44: i++ goto __43 goto __45 __45: ; __42: ; if !(nColumn != int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden) { goto __47 } Xsqlite3ErrorMsg(tls, pParse, ts+16994, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: ; __36: ; if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } Xsqlite3ErrorMsg(tls, pParse, ts+17046, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; // Initialize the count of rows to be inserted if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FpTriggerTab) != 0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FbReturning) != 0)) { goto __49 } regRowCount = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regRowCount) __49: ; // If this is not a view, open the table and and all indices if !!(isView != 0) { goto __50 } nIdx = Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), -1, uintptr(0), bp+176, bp+180) aRegIdx = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(int32(0)))*uint64(nIdx+2)) if !(aRegIdx == uintptr(0)) { goto __51 } goto insert_cleanup __51: ; i = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __52: if !(i < nIdx) { goto __54 } *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) *(*int32)(unsafe.Pointer(pParse + 56)) += int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) goto __53 __53: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext i++ goto __52 goto __54 __54: ; *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Register to store the table record __50: ; if !(pUpsert != 0) { goto __55 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } Xsqlite3ErrorMsg(tls, pParse, ts+17071, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } Xsqlite3ErrorMsg(tls, pParse, ts+17117, 0) goto insert_cleanup __57: ; if !(Xsqlite3HasExplicitNulls(tls, pParse, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) != 0) { goto __58 } goto insert_cleanup __58: ; (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) pNx = pUpsert __59: (*Upsert)(unsafe.Pointer(pNx)).FpUpsertSrc = pTabList (*Upsert)(unsafe.Pointer(pNx)).FregData = regData (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) if !((*Upsert)(unsafe.Pointer(pNx)).FpUpsertTarget != 0) { goto __62 } if !(Xsqlite3UpsertAnalyzeTarget(tls, pParse, pTabList, pNx) != 0) { goto __63 } goto insert_cleanup __63: ; __62: ; pNx = (*Upsert)(unsafe.Pointer(pNx)).FpNextUpsert goto __60 __60: if pNx != uintptr(0) { goto __59 } goto __61 __61: ; __55: ; // This is the top of the main insertion loop if !(useTempTable != 0) { goto __64 } // This block codes the top of loop only. The complete loop is the // following pseudocode (template 4): // // rewind temp table, if empty goto D // C: loop over rows of intermediate table // transfer values form intermediate table into <table> // end loop // D: ... addrInsTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, srcTab) addrCont = Xsqlite3VdbeCurrentAddr(tls, v) goto __65 __64: if !(pSelect != 0) { goto __66 } // This block codes the top of loop only. The complete loop is the // following pseudocode (template 3): // // C: yield X, at EOF goto D // insert the select result into <table> from R..R+n // goto C // D: ... addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm)) if !(ipkColumn >= 0) { goto __67 } // tag-20191021-001: If the INTEGER PRIMARY KEY is being generated by the // SELECT, go ahead and copy the value into the rowid slot now, so that // the value does not get overwritten by a NULL at tag-20191021-002. Xsqlite3VdbeAddOp2(tls, v, OP_Copy, regFromSelect+ipkColumn, regRowid) __67: ; __66: ; __65: ; // Compute data for ordinary columns of the new entry. Values // are written in storage order into registers starting with regData. // Only ordinary columns are computed in this loop. The rowid // (if there is one) is computed later and generated columns are // computed after the rowid since they might depend on the value // of the rowid. nHidden = 0 iRegStore = regData i = 0 __68: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __70 } if !(i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey)) { goto __71 } // tag-20191021-002: References to the INTEGER PRIMARY KEY are filled // using the rowid. So put a NULL in the IPK slot of the record to avoid // using excess space. The file format definition requires this extra // NULL - we cannot optimize further by skipping the column completely Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore) goto __69 __71: ; if !(libc.AssignUint32(&colFlags, U32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FcolFlags))&U32(COLFLAG_NOINSERT) != U32(0)) { goto __72 } nHidden++ if !(colFlags&U32(COLFLAG_VIRTUAL) != U32(0)) { goto __73 } // Virtual columns do not participate in OP_MakeRecord. So back up // iRegStore by one slot to compensate for the iRegStore++ in the // outer for() loop iRegStore-- goto __69 goto __74 __73: if !(colFlags&U32(COLFLAG_STORED) != U32(0)) { goto __75 } // Stored columns are computed later. But if there are BEFORE // triggers, the slots used for stored columns will be OP_Copy-ed // to a second block of registers, so the register needs to be // initialized to NULL to avoid an uninitialized register read if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { goto __77 } Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore) __77: ; goto __69 goto __76 __75: if !(pColumn == uintptr(0)) { goto __78 } // Hidden columns that are not explicitly named in the INSERT // get there default value Xsqlite3ExprCodeFactorable(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), iRegStore) goto __69 __78: ; __76: ; __74: ; __72: ; if !(pColumn != 0) { goto __79 } j = 0 __81: if !(j < (*IdList)(unsafe.Pointer(pColumn)).FnId && (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(j)*16)).Fidx != i) { goto __83 } goto __82 __82: j++ goto __81 goto __83 __83: ; if !(j >= (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __84 } // A column not named in the insert column list gets its // default value Xsqlite3ExprCodeFactorable(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), iRegStore) goto __69 __84: ; k = j goto __80 __79: if !(nColumn == 0) { goto __85 } // This is INSERT INTO ... DEFAULT VALUES. Load the default value. Xsqlite3ExprCodeFactorable(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24), iRegStore) goto __69 goto __86 __85: k = i - nHidden __86: ; __80: ; if !(useTempTable != 0) { goto __87 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, k, iRegStore) goto __88 __87: if !(pSelect != 0) { goto __89 } if !(regFromSelect != regData) { goto __91 } Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regFromSelect+k, iRegStore) __91: ; goto __90 __89: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(k)*32)).FpExpr, iRegStore) __90: ; __88: ; goto __69 __69: i++ iRegStore++ goto __68 goto __70 __70: ; // Run the BEFORE and INSTEAD OF triggers, if there are any endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) if !(*(*int32)(unsafe.Pointer(bp + 72))&TRIGGER_BEFORE != 0) { goto __92 } regCols = Xsqlite3GetTempRange(tls, pParse, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) // build the NEW.* reference row. Note that if there is an INTEGER // PRIMARY KEY into which a NULL is being inserted, that NULL will be // translated into a unique ID for the row. But on a BEFORE trigger, // we do not know what the unique ID will be (because the insert has // not happened yet) so we substitute a rowid of -1 if !(ipkColumn < 0) { goto __93 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) goto __94 __93: ; if !(useTempTable != 0) { goto __95 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regCols) goto __96 __95: ; // Otherwise useTempTable is true Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regCols) __96: ; addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regCols) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, -1, regCols) Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regCols) __94: ; // Copy the new data already generated. Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regRowid+1, regCols+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol)-1) // Compute the new value for generated columns after all other // columns have already been computed. This must be done after // computing the ROWID in case one of the generated columns // refers to the ROWID. if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { goto __97 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regCols+1, pTab) __97: ; // If this is an INSERT on a view with an INSTEAD OF INSERT trigger, // do not attempt any conversions before assembling the record. // If this is a real table, attempt conversions as required by the // table column affinities. if !!(isView != 0) { goto __98 } Xsqlite3TableAffinity(tls, v, pTab, regCols+1) __98: ; // Fire BEFORE or INSTEAD OF triggers Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_BEFORE, pTab, regCols-int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1, onError, endOfLoop) Xsqlite3ReleaseTempRange(tls, pParse, regCols, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+1) __92: ; if !!(isView != 0) { goto __99 } if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __100 } // The row that the VUpdate opcode will delete: none Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIns) __100: ; if !(ipkColumn >= 0) { goto __101 } // Compute the new rowid if !(useTempTable != 0) { goto __103 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, ipkColumn, regRowid) goto __104 __103: if !(pSelect != 0) { goto __105 } // Rowid already initialized at tag-20191021-001 goto __106 __105: pIpk = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(ipkColumn)*32)).FpExpr if !(int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB)) { goto __107 } Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) appendFlag = U8(1) goto __108 __107: Xsqlite3ExprCode(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ipkColumn)*32)).FpExpr, regRowid) __108: ; __106: ; __104: ; // If the PRIMARY KEY expression is NULL, then use OP_NewRowid // to generate a unique primary key value. if !!(appendFlag != 0) { goto __109 } if !!(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __110 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) goto __111 __110: addr11 = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRowid, addr11+2) __111: ; Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, regRowid) __109: ; goto __102 __101: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB || withoutRowid != 0) { goto __112 } Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) goto __113 __112: Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) appendFlag = U8(1) __113: ; __102: ; autoIncStep(tls, pParse, regAutoinc, regRowid) // Compute the new value for generated columns after all other // columns have already been computed. This must be done after // computing the ROWID in case one of the generated columns // is derived from the INTEGER PRIMARY KEY. if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != 0) { goto __114 } Xsqlite3ComputeGeneratedColumns(tls, pParse, regRowid+1, pTab) __114: ; // Generate code to check constraints and generate index keys and // do the insertion. if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __115 } pVTab = Xsqlite3GetVTable(tls, db, pTab) Xsqlite3VtabMakeWritable(tls, pParse, pTab) Xsqlite3VdbeAddOp4(tls, v, OP_VUpdate, 1, int32((*Table)(unsafe.Pointer(pTab)).FnCol)+2, regIns, pVTab, -12) Xsqlite3VdbeChangeP5(tls, v, func() uint16 { if onError == OE_Default { return uint16(OE_Abort) } return uint16(onError) }()) Xsqlite3MayAbort(tls, pParse) goto __116 __115: *(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+184, uintptr(0), pUpsert) Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) // Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE // constraints or (b) there are no triggers and this table is not a // parent table in a foreign key constraint. It is safe to set the // flag in the second case as if any REPLACE constraint is hit, an // OP_Delete or OP_IdxDelete instruction will be executed on each // cursor that is disturbed. And these instructions both clear the // VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT // functionality. bUseSeek = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 184)) == 0 || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0)) Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) __116: ; __99: ; // Update the count of rows that are inserted if !(regRowCount != 0) { goto __117 } Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regRowCount, 1) __117: ; if !(pTrigger != 0) { goto __118 } // Code AFTER triggers Xsqlite3CodeRowTrigger(tls, pParse, pTrigger, TK_INSERT, uintptr(0), TRIGGER_AFTER, pTab, regData-2-int32((*Table)(unsafe.Pointer(pTab)).FnCol), onError, endOfLoop) __118: ; // The bottom of the main insertion loop, if the data source // is a SELECT statement. Xsqlite3VdbeResolveLabel(tls, v, endOfLoop) if !(useTempTable != 0) { goto __119 } Xsqlite3VdbeAddOp2(tls, v, OP_Next, srcTab, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) Xsqlite3VdbeAddOp1(tls, v, OP_Close, srcTab) goto __120 __119: if !(pSelect != 0) { goto __121 } Xsqlite3VdbeGoto(tls, v, addrCont) Xsqlite3VdbeJumpHere(tls, v, addrInsTop) __121: ; __120: ; insert_end: // Update the sqlite_sequence table by storing the content of the // maximum rowid counter values recorded while inserting into // autoincrement tables. if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab == uintptr(0)) { goto __122 } Xsqlite3AutoincrementEnd(tls, pParse) __122: ; // Return the number of rows inserted. If this routine is // generating code because of a call to sqlite3NestedParse(), do not // invoke the callback function. if !(regRowCount != 0) { goto __123 } Xsqlite3CodeChangeCount(tls, v, regRowCount, ts+17138) __123: ; insert_cleanup: Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprListDelete(tls, db, pList) Xsqlite3UpsertDelete(tls, db, pUpsert) Xsqlite3SelectDelete(tls, db, pSelect) Xsqlite3IdListDelete(tls, db, pColumn) Xsqlite3DbFree(tls, db, aRegIdx) } // Make sure "isView" and other macros defined above are undefined. Otherwise // they may interfere with compilation of other functions in this file // (or in another file, if this file becomes part of the amalgamation). // Meanings of bits in of pWalker->eCode for // sqlite3ExprReferencesUpdatedColumn() // This is the Walker callback from sqlite3ExprReferencesUpdatedColumn(). // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126402:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { if *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 40)) + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*4)) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(CKCNSTRNT_COLUMN) } } else { *(*U16)(unsafe.Pointer(pWalker + 36)) |= U16(CKCNSTRNT_ROWID) } } return WRC_Continue } // pExpr is a CHECK constraint on a row that is being UPDATE-ed. The // only columns that are modified by the UPDATE are those for which // aiChng[i]>=0, and also the ROWID is modified if chngRowid is true. // // Return true if CHECK constraint pExpr uses any of the // changing columns (or the rowid if it is changing). In other words, // return true if this CHECK constraint must be validated for // the new row in the UPDATE statement. // // 2018-09-15: pExpr might also be an expression for an index-on-expressions. // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126431:20: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{checkConstraintExprNode})) *(*uintptr)(unsafe.Pointer(bp + 40)) = aiChng Xsqlite3WalkExpr(tls, bp, pExpr) if !(chngRowid != 0) { *(*U16)(unsafe.Pointer(bp + 36)) &= libc.Uint16FromInt32(libc.CplInt32(CKCNSTRNT_ROWID)) } return libc.Bool32(int32((*Walker)(unsafe.Pointer(bp)).FeCode) != 0) } // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. // However, sometimes (rarely - when there is an upsert) it wants to visit // the indexes in a different order. The following data structures accomplish // this. // // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. type IndexListTerm1 = struct { Fp uintptr Fix int32 F__ccgo_pad1 [4]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126464:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. // However, sometimes (rarely - when there is an upsert) it wants to visit // the indexes in a different order. The following data structures accomplish // this. // // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. type IndexListTerm = IndexListTerm1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126464:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 Fu struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [8]byte } } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126465:9 */ type IndexIterator = IndexIterator1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126465:30 */ // Return the first index on the list func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126489:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fix return (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)))).Fp } else { *(*int32)(unsafe.Pointer(pIx)) = 0 return *(*uintptr)(unsafe.Pointer(pIter + 8)) } return uintptr(0) } // Return the next index from the list. Return NULL when out of indexes func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126501:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { *(*int32)(unsafe.Pointer(pIx)) = i return uintptr(0) } *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix return (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp } else { *(*int32)(unsafe.Pointer(pIx))++ *(*uintptr)(unsafe.Pointer(pIter + 8)) = (*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8)))).FpNext return *(*uintptr)(unsafe.Pointer(pIter + 8)) } return uintptr(0) } // Generate code to do constraint checks prior to an INSERT or an UPDATE // on table pTab. // // The regNewData parameter is the first register in a range that contains // the data to be inserted or the data after the update. There will be // pTab->nCol+1 registers in this range. The first register (the one // that regNewData points to) will contain the new rowid, or NULL in the // case of a WITHOUT ROWID table. The second register in the range will // contain the content of the first table column. The third register will // contain the content of the second table column. And so forth. // // The regOldData parameter is similar to regNewData except that it contains // the data prior to an UPDATE rather than afterwards. regOldData is zero // for an INSERT. This routine can distinguish between UPDATE and INSERT by // checking regOldData for zero. // // For an UPDATE, the pkChng boolean is true if the true primary key (the // rowid for a normal table or the PRIMARY KEY for a WITHOUT ROWID table) // might be modified by the UPDATE. If pkChng is false, then the key of // the iDataCur content table is guaranteed to be unchanged by the UPDATE. // // For an INSERT, the pkChng boolean indicates whether or not the rowid // was explicitly specified as part of the INSERT statement. If pkChng // is zero, it means that the either rowid is computed automatically or // that the table is a WITHOUT ROWID table and has no rowid. On an INSERT, // pkChng will only be true if the INSERT statement provides an integer // value for either the rowid column or its INTEGER PRIMARY KEY alias. // // The code generated by this routine will store new index entries into // registers identified by aRegIdx[]. No index entry is created for // indices where aRegIdx[i]==0. The order of indices in aRegIdx[] is // the same as the order of indices on the linked list of indices // at pTab->pIndex. // // (2019-05-07) The generated code also creates a new record for the // main table, if pTab is a rowid table, and stores that record in the // register identified by aRegIdx[nIdx] - in other words in the first // entry of aRegIdx[] past the last index. It is important that the // record be generated during constraint checks to avoid affinity changes // to the register content that occur after constraint checks but before // the new record is inserted. // // The caller must have already opened writeable cursors on the main // table and all applicable indices (that is to say, all indices for which // aRegIdx[] is not zero). iDataCur is the cursor for the main table when // inserting or updating a rowid table, or the cursor for the PRIMARY KEY // index when operating on a WITHOUT ROWID table. iIdxCur is the cursor // for the first index in the pTab->pIndex list. Cursors for other indices // are at iIdxCur+N for the N-th element of the pTab->pIndex list. // // This routine also generates code to check constraints. NOT NULL, // CHECK, and UNIQUE constraints are all checked. If a constraint fails, // then the appropriate action is performed. There are five possible // actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE. // // Constraint type Action What Happens // --------------- ---------- ---------------------------------------- // any ROLLBACK The current transaction is rolled back and // sqlite3_step() returns immediately with a // return code of SQLITE_CONSTRAINT. // // any ABORT Back out changes from the current command // only (do not do a complete rollback) then // cause sqlite3_step() to return immediately // with SQLITE_CONSTRAINT. // // any FAIL Sqlite3_step() returns immediately with a // return code of SQLITE_CONSTRAINT. The // transaction is not rolled back and any // changes to prior rows are retained. // // any IGNORE The attempt in insert or update the current // row is skipped, without throwing an error. // Processing continues with the next row. // (There is an immediate jump to ignoreDest.) // // NOT NULL REPLACE The NULL value is replace by the default // value for that column. If the default value // is NULL, the action is the same as ABORT. // // UNIQUE REPLACE The other row that conflicts with the row // being inserted is removed. // // CHECK REPLACE Illegal. The results in an exception. // // Which action to take is determined by the overrideError parameter. // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:126608:21: */ bp := tls.Alloc(72) defer tls.Free(72) var v uintptr // VDBE under constrution var pIdx uintptr // Pointer to one of the indices var pPk uintptr = uintptr(0) // The PRIMARY KEY index for WITHOUT ROWID tables var db uintptr // Database connection var i int32 // loop counter // var ix int32 at bp+40, 4 // Index loop counter var nCol int32 // Number of columns var onError int32 // Conflict resolution strategy var seenReplace int32 = 0 // True if REPLACE is used to resolve INT PK conflict var nPkField int32 // Number of fields in PRIMARY KEY. 1 for ROWID tables var pUpsertClause uintptr = uintptr(0) // The specific ON CONFLICT clause for pIdx var isUpdate U8 // True if this is an UPDATE operation var bAffinityDone U8 = U8(0) // True if the OP_Affinity operation has been run var upsertIpkReturn int32 = 0 // Address of Goto at end of IPK uniqueness check var upsertIpkDelay int32 = 0 // Address of Goto to bypass initial IPK check var ipkTop int32 = 0 // Top of the IPK uniqueness check var ipkBottom int32 = 0 // OP_Goto at the end of the IPK uniqueness check // Variables associated with retesting uniqueness constraints after // replace triggers fire have run var regTrigCnt int32 // Register used to count replace trigger invocations var addrRecheck int32 = 0 // Jump here to recheck all uniqueness constraints var lblRecheckOk int32 = 0 // Each recheck jumps to this label if it passes var pTrigger uintptr // List of DELETE triggers on the table pTab var nReplaceTrig int32 = 0 // Number of replace triggers coded // var sIdxIter IndexIterator at bp+16, 24 // Index iterator isUpdate = U8(libc.Bool32(regOldData != 0)) db = (*Parse)(unsafe.Pointer(pParse)).Fdb v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // This table is not a VIEW nCol = int32((*Table)(unsafe.Pointer(pTab)).FnCol) // pPk is the PRIMARY KEY index for WITHOUT ROWID tables and NULL for // normal rowid tables. nPkField is the number of key fields in the // pPk index or 1 for a rowid table. In other words, nPkField is the // number of fields in the true primary key of the table. if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { pPk = uintptr(0) nPkField = 1 } else { pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) nPkField = int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) } // Record that this module has started // Test all NOT NULL constraints. if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasNotNull) != 0 { var b2ndPass int32 = 0 // True if currently running 2nd pass var nSeenReplace int32 = 0 // Number of ON CONFLICT REPLACE operations var nGenerated int32 = 0 // Number of generated columns with NOT NULL for 1 != 0 { // Make 2 passes over columns. Exit loop via "break" for i = 0; i < nCol; i++ { var iReg int32 // Register holding column value var pCol uintptr = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*24 // The column to check for NOT NULL var isGenerated int32 // non-zero if column is generated onError = int32(*(*uint8)(unsafe.Pointer(pCol + 8)) & 0xf >> 0) if onError == OE_None { continue } // No NOT NULL on this column if i == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { continue // ROWID is never NULL } isGenerated = int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_GENERATED if isGenerated != 0 && !(b2ndPass != 0) { nGenerated++ continue // Generated columns processed on 2nd pass } if aiChng != 0 && *(*int32)(unsafe.Pointer(aiChng + uintptr(i)*4)) < 0 && !(isGenerated != 0) { // Do not check NOT NULL on columns that do not change continue } if int32(overrideError) != OE_Default { onError = int32(overrideError) } else if onError == OE_Default { onError = OE_Abort } if onError == OE_Replace { if b2ndPass != 0 || int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { onError = OE_Abort } else { } } else if b2ndPass != 0 && !(isGenerated != 0) { continue } iReg = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(i))) + regNewData + 1 switch onError { case OE_Replace: { var addr1 int32 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, iReg) nSeenReplace++ Xsqlite3ExprCodeCopy(tls, pParse, Xsqlite3ColumnExpr(tls, pTab, pCol), iReg) Xsqlite3VdbeJumpHere(tls, v, addr1) break } fallthrough case OE_Abort: Xsqlite3MayAbort(tls, pParse) fallthrough case OE_Rollback: fallthrough case OE_Fail: { var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) Xsqlite3VdbeAppendP4(tls, v, zMsg, -7) Xsqlite3VdbeChangeP5(tls, v, uint16(P5_ConstraintNotNull)) break } fallthrough default: { Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, iReg, ignoreDest) break } } // end switch(onError) } // end loop i over columns if nGenerated == 0 && nSeenReplace == 0 { // If there are no generated columns with NOT NULL constraints // and no NOT NULL ON CONFLICT REPLACE constraints, then a single // pass is sufficient break } if b2ndPass != 0 { break } // Never need more than 2 passes b2ndPass = 1 if nSeenReplace > 0 && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasGenerated) != U32(0) { // If any NOT NULL ON CONFLICT REPLACE constraints fired on the // first pass, recomputed values for all generated columns, as // those values might depend on columns affected by the REPLACE. Xsqlite3ComputeGeneratedColumns(tls, pParse, regNewData+1, pTab) } } // end of 2-pass loop } // end if( has-not-null-constraints ) // Test all CHECK constraints if (*Table)(unsafe.Pointer(pTab)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0) { var pCheck uintptr = (*Table)(unsafe.Pointer(pTab)).FpCheck (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) if int32(overrideError) != OE_Default { onError = int32(overrideError) } else { onError = OE_Abort } for i = 0; i < (*ExprList)(unsafe.Pointer(pCheck)).FnExpr; i++ { var allOk int32 var pCopy uintptr var pExpr uintptr = (*ExprList_item)(unsafe.Pointer(pCheck + 8 + uintptr(i)*32)).FpExpr if aiChng != 0 && !(Xsqlite3ExprReferencesUpdatedColumn(tls, pExpr, aiChng, int32(pkChng)) != 0) { // The check constraints do not reference any of the columns being // updated so there is no point it verifying the check constraint continue } if int32(bAffinityDone) == 0 { Xsqlite3TableAffinity(tls, v, pTab, regNewData+1) bAffinityDone = U8(1) } allOk = Xsqlite3VdbeMakeLabel(tls, pParse) pCopy = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { Xsqlite3ExprIfTrue(tls, pParse, pCopy, allOk, SQLITE_JUMPIFNULL) } Xsqlite3ExprDelete(tls, db, pCopy) if onError == OE_Ignore { Xsqlite3VdbeGoto(tls, v, ignoreDest) } else { var zName uintptr = (*ExprList_item)(unsafe.Pointer(pCheck + 8 + uintptr(i)*32)).FzEName if onError == OE_Replace { onError = OE_Abort } // IMP: R-26383-51744 Xsqlite3HaltConstraint(tls, pParse, SQLITE_CONSTRAINT|int32(1)<<8, onError, zName, int8(P4_TRANSIENT), uint8(P5_ConstraintCheck)) } Xsqlite3VdbeResolveLabel(tls, v, allOk) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } // UNIQUE and PRIMARY KEY constraints should be handled in the following // order: // // (1) OE_Update // (2) OE_Abort, OE_Fail, OE_Rollback, OE_Ignore // (3) OE_Replace // // OE_Fail and OE_Ignore must happen before any changes are made. // OE_Update guarantees that only a single row will change, so it // must happen before OE_Replace. Technically, OE_Abort and OE_Rollback // could happen in any order, but they are grouped up front for // convenience. // // 2018-08-14: Ticket https://www.sqlite.org/src/info/908f001483982c43 // The order of constraints used to have OE_Update as (2) and OE_Abort // and so forth as (1). But apparently PostgreSQL checks the OE_Update // constraint before any others, so it had to be moved. // // Constraint checking code is generated in this order: // (A) The rowid constraint // (B) Unique index constraints that do not have OE_Replace as their // default conflict resolution strategy // (C) Unique index that do use OE_Replace by default. // // The ordering of (2) and (3) is accomplished by making sure the linked // list of indexes attached to a table puts all OE_Replace indexes last // in the list. See sqlite3CreateIndex() for where that happens. (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 0 (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).Fi = 0 *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) = uintptr(0) // Silence harmless compiler warning *(*uintptr)(unsafe.Pointer(bp + 16 + 8)) = (*Table)(unsafe.Pointer(pTab)).FpIndex if pUpsert != 0 { if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget == uintptr(0) { // There is just on ON CONFLICT clause and it has no constraint-target if int32((*Upsert)(unsafe.Pointer(pUpsert)).FisDoUpdate) == 0 { // A single ON CONFLICT DO NOTHING clause, without a constraint-target. // Make all unique constraint resolution be OE_Ignore overrideError = U8(OE_Ignore) pUpsert = uintptr(0) } else { // A single ON CONFLICT DO UPDATE. Make all resolutions OE_Update overrideError = U8(OE_Update) } } else if (*Table)(unsafe.Pointer(pTab)).FpIndex != uintptr(0) { // Otherwise, we'll need to run the IndexListTerm array version of the // iterator to ensure that all of the ON CONFLICT conditions are // checked first and in order. var nIdx int32 var jj int32 var nByte U64 var pTerm uintptr var bUsed uintptr nIdx = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __1: if !(pIdx != 0) { goto __3 } { } goto __2 __2: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext nIdx++ goto __1 goto __3 __3: ; (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 1 *(*int32)(unsafe.Pointer(bp + 16 + 8)) = nIdx nByte = (uint64(unsafe.Sizeof(IndexListTerm{}))+uint64(1))*uint64(nIdx) + uint64(nIdx) *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) = Xsqlite3DbMallocZero(tls, db, nByte) if *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8)) == uintptr(0) { return } // OOM bUsed = *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8)) + uintptr(nIdx)*16 (*Upsert)(unsafe.Pointer(pUpsert)).FpToFree = *(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) i = 0 pTerm = pUpsert for ; pTerm != 0; pTerm = (*Upsert)(unsafe.Pointer(pTerm)).FpNextUpsert { if (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertTarget == uintptr(0) { break } if (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertIdx == uintptr(0) { continue } // Skip ON CONFLICT for the IPK jj = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex for pIdx != uintptr(0) && pIdx != (*Upsert)(unsafe.Pointer(pTerm)).FpUpsertIdx { pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext jj++ } if *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) != 0 { continue } // Duplicate ON CONFLICT clause ignored *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) = U8(1) (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj i++ } jj = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __4: if !(pIdx != 0) { goto __6 } { if *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) != 0 { goto __5 } (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 + 8 + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj i++ } goto __5 __5: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext jj++ goto __4 goto __6 __6: } } // Determine if it is possible that triggers (either explicitly coded // triggers or FK resolution actions) might run as a result of deletes // that happen when OE_Replace conflict resolution occurs. (Call these // "replace triggers".) If any replace triggers run, we will need to // recheck all of the uniqueness constraints after they have all run. // But on the recheck, the resolution is OE_Abort instead of OE_Replace. // // If replace triggers are a possibility, then // // (1) Allocate register regTrigCnt and initialize it to zero. // That register will count the number of replace triggers that // fire. Constraint recheck only occurs if the number is positive. // (2) Initialize pTrigger to the list of all DELETE triggers on pTab. // (3) Initialize addrRecheck and lblRecheckOk // // The uniqueness rechecking code will create a series of tests to run // in a second pass. The addrRecheck and lblRecheckOk variables are // used to link together these tests which are separated from each other // in the generate bytecode. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_RecTriggers|SQLITE_ForeignKeys) == uint64(0) { // There are not DELETE triggers nor FK constraints. No constraint // rechecks are needed. pTrigger = uintptr(0) regTrigCnt = 0 } else { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_RecTriggers) != 0 { pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_DELETE, uintptr(0), uintptr(0)) regTrigCnt = libc.Bool32(pTrigger != uintptr(0) || Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) != 0) } else { pTrigger = uintptr(0) regTrigCnt = Xsqlite3FkRequired(tls, pParse, pTab, uintptr(0), 0) } if regTrigCnt != 0 { // Replace triggers might exist. Allocate the counter and // initialize it to zero. regTrigCnt = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regTrigCnt) lblRecheckOk = Xsqlite3VdbeMakeLabel(tls, pParse) addrRecheck = lblRecheckOk } } // If rowid is changing, make sure the new rowid does not previously // exist in the table. if pkChng != 0 && pPk == uintptr(0) { var addrRowidOk int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Figure out what action to take in case of a rowid collision onError = int32((*Table)(unsafe.Pointer(pTab)).FkeyConf) if int32(overrideError) != OE_Default { onError = int32(overrideError) } else if onError == OE_Default { onError = OE_Abort } // figure out whether or not upsert applies in this case if pUpsert != 0 { pUpsertClause = Xsqlite3UpsertOfIndex(tls, pUpsert, uintptr(0)) if pUpsertClause != uintptr(0) { if int32((*Upsert)(unsafe.Pointer(pUpsertClause)).FisDoUpdate) == 0 { onError = OE_Ignore // DO NOTHING is the same as INSERT OR IGNORE } else { onError = OE_Update // DO UPDATE } } if pUpsertClause != pUpsert { // The first ON CONFLICT clause has a conflict target other than // the IPK. We have to jump ahead to that first ON CONFLICT clause // and then come back here and deal with the IPK afterwards upsertIpkDelay = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) } } // If the response to a rowid conflict is REPLACE but the response // to some other UNIQUE constraint is FAIL or IGNORE, then we need // to defer the running of the rowid conflict checking until after // the UNIQUE constraints have run. if onError == OE_Replace && onError != int32(overrideError) && (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 && !(upsertIpkDelay != 0) { ipkTop = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + 1 } if isUpdate != 0 { // pkChng!=0 does not mean that the rowid has changed, only that // it might have changed. Skip the conflict logic below if the rowid // is unchanged. Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regNewData, addrRowidOk, regOldData) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) } // Check to see if the new rowid already exists in the table. Skip // the following conflict logic if it does not. Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDataCur, addrRowidOk, regNewData) switch onError { default: { onError = OE_Abort } fallthrough case OE_Rollback: fallthrough case OE_Abort: fallthrough case OE_Fail: { Xsqlite3RowidConstraint(tls, pParse, onError, pTab) break } fallthrough case OE_Replace: { // If there are DELETE triggers on this table and the // recursive-triggers flag is set, call GenerateRowDelete() to // remove the conflicting row from the table. This will fire // the triggers and remove both the table and index b-tree entries. // // Otherwise, if there are no triggers or the recursive-triggers // flag is not set, but the table has one or more indexes, call // GenerateRowIndexDelete(). This removes the index b-tree entries // only. The table b-tree entry will be replaced by the new entry // when it is inserted. // // If either GenerateRowDelete() or GenerateRowIndexDelete() is called, // also invoke MultiWrite() to indicate that this VDBE may require // statement rollback (if the statement is aborted after the delete // takes place). Earlier versions called sqlite3MultiWrite() regardless, // but being more selective here allows statements like: // // REPLACE INTO t(rowid) VALUES($newrowid) // // to run without a statement journal if there are no indexes on the // table. if regTrigCnt != 0 { Xsqlite3MultiWrite(tls, pParse) Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, iDataCur, iIdxCur, regNewData, int16(1), uint8(0), uint8(OE_Replace), uint8(1), -1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regTrigCnt, 1) // incr trigger cnt nReplaceTrig++ } else { // This OP_Delete opcode fires the pre-update-hook only. It does // not modify the b-tree. It is more efficient to let the coming // OP_Insert replace the existing entry than it is to delete the // existing entry and then insert a new one. Xsqlite3VdbeAddOp2(tls, v, OP_Delete, iDataCur, OPFLAG_ISNOOP) Xsqlite3VdbeAppendP4(tls, v, pTab, -6) if (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 { Xsqlite3MultiWrite(tls, pParse) Xsqlite3GenerateRowIndexDelete(tls, pParse, pTab, iDataCur, iIdxCur, uintptr(0), -1) } } seenReplace = 1 break } fallthrough case OE_Update: { Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, uintptr(0), iDataCur) } fallthrough case OE_Ignore: { Xsqlite3VdbeGoto(tls, v, ignoreDest) break } } Xsqlite3VdbeResolveLabel(tls, v, addrRowidOk) if pUpsert != 0 && pUpsertClause != pUpsert { upsertIpkReturn = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) } else if ipkTop != 0 { ipkBottom = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) Xsqlite3VdbeJumpHere(tls, v, ipkTop-1) } } // Test all UNIQUE constraints by creating entries for each UNIQUE // index and making sure that duplicate entries do not already exist. // Compute the revised record entries for indices as we go. // // This loop also handles the case of the PRIMARY KEY index for a // WITHOUT ROWID table. for pIdx = indexIteratorFirst(tls, bp+16, bp+40); pIdx != 0; pIdx = indexIteratorNext(tls, bp+16, bp+40) { var regIdx int32 // Range of registers hold conent for pIdx var regR int32 // Range of registers holding conflicting PK var iThisCur int32 // Cursor for this UNIQUE index var addrUniqueOk int32 // Jump here if the UNIQUE constraint is satisfied var addrConflictCk int32 // First opcode in the conflict check logic if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40)))*4)) == 0 { continue } // Skip indices that do not change if pUpsert != 0 { pUpsertClause = Xsqlite3UpsertOfIndex(tls, pUpsert, pIdx) if upsertIpkDelay != 0 && pUpsertClause == pUpsert { Xsqlite3VdbeJumpHere(tls, v, upsertIpkDelay) } } addrUniqueOk = Xsqlite3VdbeMakeLabel(tls, pParse) if int32(bAffinityDone) == 0 { Xsqlite3TableAffinity(tls, v, pTab, regNewData+1) bAffinityDone = U8(1) } iThisCur = iIdxCur + *(*int32)(unsafe.Pointer(bp + 40)) // Skip partial indices for which the WHERE clause is not true if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) Xsqlite3ExprIfFalseDup(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, addrUniqueOk, SQLITE_JUMPIFNULL) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } // Create a record for this index entry as it should appear after // the insert or update. Store that record in the aRegIdx[ix] register regIdx = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40)))*4)) + 1 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { var iField int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) var x int32 if iField == -2 { (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) Xsqlite3ExprCodeCopy(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr+8+uintptr(i)*32)).FpExpr, regIdx+i) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } else if iField == -1 || iField == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { x = regNewData Xsqlite3VdbeAddOp2(tls, v, OP_IntCopy, x, regIdx+i) } else { x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(iField))) + regNewData + 1 Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, x, regIdx+i) } } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnColumn), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) // In an UPDATE operation, if this index is the PRIMARY KEY index // of a WITHOUT ROWID table and there has been no change the // primary key, then no collision is possible. The collision detection // logic below can all be skipped. if isUpdate != 0 && pPk == pIdx && int32(pkChng) == 0 { Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) continue } // Find out what action to take in case there is a uniqueness conflict onError = int32((*Index)(unsafe.Pointer(pIdx)).FonError) if onError == OE_None { Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) continue // pIdx is not a UNIQUE index } if int32(overrideError) != OE_Default { onError = int32(overrideError) } else if onError == OE_Default { onError = OE_Abort } // Figure out if the upsert clause applies to this index if pUpsertClause != 0 { if int32((*Upsert)(unsafe.Pointer(pUpsertClause)).FisDoUpdate) == 0 { onError = OE_Ignore // DO NOTHING is the same as INSERT OR IGNORE } else { onError = OE_Update // DO UPDATE } } // Collision detection may be omitted if all of the following are true: // (1) The conflict resolution algorithm is REPLACE // (2) The table is a WITHOUT ROWID table // (3) There are no secondary indexes on the table // (4) No delete triggers need to be fired if there is a conflict // (5) No FK constraint counters need to be updated if a conflict occurs. // // This is not possible for ENABLE_PREUPDATE_HOOK builds, as the row // must be explicitly deleted in order to ensure any pre-update hook // is invoked. // Check to see if the new index entry will be unique addrConflictCk = Xsqlite3VdbeAddOp4Int(tls, v, OP_NoConflict, iThisCur, addrUniqueOk, regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)) // Generate code to handle collisions if pIdx == pPk { regR = regIdx } else { regR = Xsqlite3GetTempRange(tls, pParse, nPkField) } if isUpdate != 0 || onError == OE_Replace { if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { Xsqlite3VdbeAddOp2(tls, v, OP_IdxRowid, iThisCur, regR) // Conflict only if the rowid of the existing index entry // is different from old-rowid if isUpdate != 0 { Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regR, addrUniqueOk, regOldData) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) } } else { var x int32 // Extract the PRIMARY KEY from the end of the index entry and // store it in registers regR..regR+nPk-1 if pIdx != pPk { for i = 0; i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { x = int32(Xsqlite3TableColumnToIndex(tls, pIdx, *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2)))) Xsqlite3VdbeAddOp3(tls, v, OP_Column, iThisCur, x, regR+i) } } if isUpdate != 0 { // If currently processing the PRIMARY KEY of a WITHOUT ROWID // table, only conflict if the new PRIMARY KEY values are actually // different from the old. // // For a UNIQUE index, only conflict if the PRIMARY KEY values // of the matched index row are different from the original PRIMARY // KEY values of this row before the update. var addrJump int32 = Xsqlite3VdbeCurrentAddr(tls, v) + int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) var op int32 = OP_Ne var regCmp int32 = func() int32 { if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { return regIdx } return regR }() for i = 0; i < int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol); i++ { var p4 uintptr = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FazColl + uintptr(i)*8))) x = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(i)*2))) if i == int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol)-1 { addrJump = addrUniqueOk op = OP_Eq } x = int32(Xsqlite3TableColumnToStorage(tls, pTab, int16(x))) Xsqlite3VdbeAddOp4(tls, v, op, regOldData+1+x, addrJump, regCmp+i, p4, -2) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) } } } } // Generate code that executes if the new index entry is not unique switch onError { case OE_Rollback: fallthrough case OE_Abort: fallthrough case OE_Fail: { Xsqlite3UniqueConstraint(tls, pParse, onError, pIdx) break } case OE_Update: { Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, pIdx, iIdxCur+*(*int32)(unsafe.Pointer(bp + 40))) } fallthrough case OE_Ignore: { Xsqlite3VdbeGoto(tls, v, ignoreDest) break } default: { var nConflictCk int32 // Number of opcodes in conflict check logic nConflictCk = Xsqlite3VdbeCurrentAddr(tls, v) - addrConflictCk if regTrigCnt != 0 { Xsqlite3MultiWrite(tls, pParse) nReplaceTrig++ } if pTrigger != 0 && isUpdate != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_CursorLock, iDataCur) } Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, iDataCur, iIdxCur, regR, int16(nPkField), uint8(0), uint8(OE_Replace), func() uint8 { if pIdx == pPk { return uint8(ONEPASS_SINGLE) } return uint8(ONEPASS_OFF) }(), iThisCur) if pTrigger != 0 && isUpdate != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_CursorUnlock, iDataCur) } if regTrigCnt != 0 { var addrBypass int32 // Jump destination to bypass recheck logic Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, regTrigCnt, 1) // incr trigger cnt addrBypass = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) // Bypass recheck // Here we insert code that will be invoked after all constraint // checks have run, if and only if one or more replace triggers // fired. Xsqlite3VdbeResolveLabel(tls, v, lblRecheckOk) lblRecheckOk = Xsqlite3VdbeMakeLabel(tls, pParse) if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { // Bypass the recheck if this partial index is not defined // for the current row Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regIdx-1, lblRecheckOk) } // Copy the constraint check code from above, except change // the constraint-ok jump destination to be the address of // the next retest block for nConflictCk > 0 { // var x VdbeOp at bp+48, 24 // Conflict check opcode to copy // The sqlite3VdbeAddOp4() call might reallocate the opcode array. // Hence, make a complete copy of the opcode, rather than using // a pointer to the opcode. *(*VdbeOp)(unsafe.Pointer(bp + 48 /* x */)) = *(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, addrConflictCk))) if int32((*VdbeOp)(unsafe.Pointer(bp+48)).Fopcode) != OP_IdxRowid { var p2 int32 // New P2 value for copied conflict check opcode var zP4 uintptr if int32(Xsqlite3OpcodeProperty[(*VdbeOp)(unsafe.Pointer(bp+48)).Fopcode])&OPFLG_JUMP != 0 { p2 = lblRecheckOk } else { p2 = (*VdbeOp)(unsafe.Pointer(bp + 48 /* &x */)).Fp2 } if int32((*VdbeOp)(unsafe.Pointer(bp+48)).Fp4type) == -3 { zP4 = uintptr(int64(*(*int32)(unsafe.Pointer(bp + 48 + 16)))) } else { zP4 = *(*uintptr)(unsafe.Pointer(bp + 48 + 16)) } Xsqlite3VdbeAddOp4(tls, v, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fopcode), (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp1, p2, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp3, zP4, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp4type)) Xsqlite3VdbeChangeP5(tls, v, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp5) } nConflictCk-- addrConflictCk++ } // If the retest fails, issue an abort Xsqlite3UniqueConstraint(tls, pParse, OE_Abort, pIdx) Xsqlite3VdbeJumpHere(tls, v, addrBypass) // Terminate the recheck bypass } seenReplace = 1 break } } Xsqlite3VdbeResolveLabel(tls, v, addrUniqueOk) if regR != regIdx { Xsqlite3ReleaseTempRange(tls, pParse, regR, nPkField) } if pUpsertClause != 0 && upsertIpkReturn != 0 && Xsqlite3UpsertNextIsIPK(tls, pUpsertClause) != 0 { Xsqlite3VdbeGoto(tls, v, upsertIpkDelay+1) Xsqlite3VdbeJumpHere(tls, v, upsertIpkReturn) upsertIpkReturn = 0 } } // If the IPK constraint is a REPLACE, run it last if ipkTop != 0 { Xsqlite3VdbeGoto(tls, v, ipkTop) Xsqlite3VdbeJumpHere(tls, v, ipkBottom) } // Recheck all uniqueness constraints after replace triggers have run if nReplaceTrig != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, regTrigCnt, lblRecheckOk) if !(pPk != 0) { if isUpdate != 0 { Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regNewData, addrRecheck, regOldData) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) } Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDataCur, addrRecheck, regNewData) Xsqlite3RowidConstraint(tls, pParse, OE_Abort, pTab) } else { Xsqlite3VdbeGoto(tls, v, addrRecheck) } Xsqlite3VdbeResolveLabel(tls, v, lblRecheckOk) } // Generate the table record if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { var regRec int32 = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4)) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regNewData+1, int32((*Table)(unsafe.Pointer(pTab)).FnNVCol), regRec) if !(bAffinityDone != 0) { Xsqlite3TableAffinity(tls, v, pTab, 0) } } *(*int32)(unsafe.Pointer(pbMayReplace)) = seenReplace } // Table pTab is a WITHOUT ROWID table that is being written to. The cursor // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:127466:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, r) Xsqlite3VdbeAddOp4(tls, v, OP_Insert, iCur, regData, r, pTab, -6) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_ISNOOP)) Xsqlite3ReleaseTempReg(tls, pParse, r) } // This routine generates code to finish the INSERT or UPDATE operation // that was started by a prior call to sqlite3GenerateConstraintChecks. // A consecutive range of registers starting at regNewData contains the // rowid and the content to be inserted. // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:127494:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert var i int32 // Loop counter v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // This table is not a VIEW i = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __1: if !(pIdx != 0) { goto __3 } { // All REPLACE indexes are at the end of the list if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)) == 0 { goto __2 } if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), Xsqlite3VdbeCurrentAddr(tls, v)+2) } pik_flags = func() uint8 { if useSeekResult != 0 { return uint8(OPFLAG_USESEEKRESULT) } return uint8(0) }() if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { pik_flags = U8(int32(pik_flags) | OPFLAG_NCHANGE) pik_flags = U8(int32(pik_flags) | update_flags&OPFLAG_SAVEPOSITION) if update_flags == 0 { codeWithoutRowidPreupdate(tls, pParse, pTab, iIdxCur+i, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4))) } } Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iIdxCur+i, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4))+1, func() int32 { if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x8>>3)) != 0 { return int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) } return int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) }()) Xsqlite3VdbeChangeP5(tls, v, uint16(pik_flags)) } goto __2 __2: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext i++ goto __1 goto __3 __3: ; if !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { return } if (*Parse)(unsafe.Pointer(pParse)).Fnested != 0 { pik_flags = U8(0) } else { pik_flags = U8(OPFLAG_NCHANGE) pik_flags = U8(int32(pik_flags) | func() int32 { if update_flags != 0 { return update_flags } return OPFLAG_LASTROWID }()) } if appendBias != 0 { pik_flags = U8(int32(pik_flags) | OPFLAG_APPEND) } if useSeekResult != 0 { pik_flags = U8(int32(pik_flags) | OPFLAG_USESEEKRESULT) } Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iDataCur, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(i)*4)), regNewData) if !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } Xsqlite3VdbeChangeP5(tls, v, uint16(pik_flags)) } // Allocate cursors for the pTab table and all its indices and generate // code to open and initialized those cursors. // // The cursor for the object that contains the complete data (normally // the table itself, but the PRIMARY KEY index in the case of a WITHOUT // ROWID table) is returned in *piDataCur. The first index cursor is // returned in *piIdxCur. The number of indices is returned. // // Use iBase as the first cursor (either the *piDataCur for rowid tables // or the first index for WITHOUT ROWID tables) if it is non-negative. // If iBase is negative, then allocate the next available cursor. // // For a rowid table, *piDataCur will be exactly one less than *piIdxCur. // For a WITHOUT ROWID table, *piDataCur will be somewhere in the range // of *piIdxCurs, depending on where the PRIMARY KEY index appears on the // pTab->pIndex list. // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:127582:20: */ var i int32 var iDb int32 var iDataCur int32 var pIdx uintptr var v uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { // This routine is a no-op for virtual tables. Leave the output // variables *piDataCur and *piIdxCur set to illegal cursor numbers // for improved error detection. *(*int32)(unsafe.Pointer(piDataCur)) = libc.AssignPtrInt32(piIdxCur, -999) return 0 } iDb = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if iBase < 0 { iBase = (*Parse)(unsafe.Pointer(pParse)).FnTab } iDataCur = libc.PostIncInt32(&iBase, 1) if piDataCur != 0 { *(*int32)(unsafe.Pointer(piDataCur)) = iDataCur } if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) && (aToOpen == uintptr(0) || *(*U8)(unsafe.Pointer(aToOpen)) != 0) { Xsqlite3OpenTable(tls, pParse, iDataCur, iDb, pTab, op) } else { Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab)).Ftnum, uint8(libc.Bool32(op == OP_OpenWrite)), (*Table)(unsafe.Pointer(pTab)).FzName) } if piIdxCur != 0 { *(*int32)(unsafe.Pointer(piIdxCur)) = iBase } i = 0 pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex __1: if !(pIdx != 0) { goto __3 } { var iIdxCur int32 = libc.PostIncInt32(&iBase, 1) if int32(*(*uint16)(unsafe.Pointer(pIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { if piDataCur != 0 { *(*int32)(unsafe.Pointer(piDataCur)) = iIdxCur } p5 = U8(0) } if aToOpen == uintptr(0) || *(*U8)(unsafe.Pointer(aToOpen + uintptr(i+1))) != 0 { Xsqlite3VdbeAddOp3(tls, v, op, iIdxCur, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) Xsqlite3VdbeChangeP5(tls, v, uint16(p5)) } } goto __2 __2: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext i++ goto __1 goto __3 __3: ; if iBase > (*Parse)(unsafe.Pointer(pParse)).FnTab { (*Parse)(unsafe.Pointer(pParse)).FnTab = iBase } return i } // Check to see if index pSrc is compatible as a source of data // for index pDest in an insert transfer optimization. The rules // for a compatible index: // // * The index is over the same set of columns // * The same DESC and ASC markings occurs on all columns // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:127661:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { return 0 // Different number of columns } if int32((*Index)(unsafe.Pointer(pDest)).FonError) != int32((*Index)(unsafe.Pointer(pSrc)).FonError) { return 0 // Different conflict resolution strategies } for i = 0; i < int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol); i++ { if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaiColumn + uintptr(i)*2))) != int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaiColumn + uintptr(i)*2))) { return 0 // Different columns indexed } if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaiColumn + uintptr(i)*2))) == -2 { if Xsqlite3ExprCompare(tls, uintptr(0), (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaColExpr+8+uintptr(i)*32)).FpExpr, (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaColExpr+8+uintptr(i)*32)).FpExpr, -1) != 0 { return 0 // Different expressions in the index } } if int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FaSortOrder + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FaSortOrder + uintptr(i)))) { return 0 // Different sort orders } if Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrc)).FazColl + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pDest)).FazColl + uintptr(i)*8))) != 0 { return 0 // Different collating sequences } } if Xsqlite3ExprCompare(tls, uintptr(0), (*Index)(unsafe.Pointer(pSrc)).FpPartIdxWhere, (*Index)(unsafe.Pointer(pDest)).FpPartIdxWhere, -1) != 0 { return 0 // Different WHERE clauses } // If no test above fails then the indices must be compatible return 1 } // Attempt the transfer optimization on INSERTs of the form // // INSERT INTO tab1 SELECT * FROM tab2; // // The xfer optimization transfers raw records from tab2 over to tab1. // Columns are not decoded and reassembled, which greatly improves // performance. Raw index records are transferred in the same way. // // The xfer optimization is only attempted if tab1 and tab2 are compatible. // There are lots of rules for determining compatibility - see comments // embedded in the code for details. // // This routine returns TRUE if the optimization is guaranteed to be used. // Sometimes the xfer optimization will only work if the destination table // is empty - a factor that can only be determined at run-time. In that // case, this routine generates code for the xfer optimization but also // does a test to see if the destination table is empty and jumps over the // xfer optimization code if the test fails. In that case, this routine // returns FALSE so that the caller will know to go ahead and generate // an unoptimized transfer. This routine also returns FALSE if there // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:127722:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT var pSrcIdx uintptr var pDestIdx uintptr // Source and destination indices var pItem uintptr // An element of pSelect->pSrc var i int32 // Loop counter var iDbSrc int32 // The database of pSrc var iSrc int32 var iDest int32 // Cursors from source and destination var addr1 int32 var addr2 int32 // Loop addresses var emptyDestTest int32 = 0 // Address of test for empty pDest var emptySrcTest int32 = 0 // Address of test for empty pSrc var v uintptr // The VDBE we are building var regAutoinc int32 // Memory register used by AUTOINC var destHasUniqueIdx int32 = 0 // True if pDest has a UNIQUE index var regData int32 var regRowid int32 // Registers holding data and rowid if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 || (*Select)(unsafe.Pointer(pSelect)).FpWith != 0 { // Do not attempt to process this query if there are an WITH clauses // attached to it. Proceeding may generate a false "no such table: xxx" // error if pSelect reads from a CTE named "xxx". return 0 } if int32((*Table)(unsafe.Pointer(pDest)).FeTabType) == TABTYP_VTAB { return 0 // tab1 must not be a virtual table } if onError == OE_Default { if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) >= 0 { onError = int32((*Table)(unsafe.Pointer(pDest)).FkeyConf) } if onError == OE_Default { onError = OE_Abort } } // allocated even if there is no FROM clause if (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc)).FnSrc != 1 { return 0 // FROM clause must have exactly one term } if (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc+8)).FpSelect != 0 { return 0 // FROM clause cannot contain a subquery } if (*Select)(unsafe.Pointer(pSelect)).FpWhere != 0 { return 0 // SELECT may not have a WHERE clause } if (*Select)(unsafe.Pointer(pSelect)).FpOrderBy != 0 { return 0 // SELECT may not have an ORDER BY clause } // Do not need to test for a HAVING clause. If HAVING is present but // there is no ORDER BY, we will get an error. if (*Select)(unsafe.Pointer(pSelect)).FpGroupBy != 0 { return 0 // SELECT may not have a GROUP BY clause } if (*Select)(unsafe.Pointer(pSelect)).FpLimit != 0 { return 0 // SELECT may not have a LIMIT clause } if (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { return 0 // SELECT may not be a compound query } if (*Select)(unsafe.Pointer(pSelect)).FselFlags&U32(SF_Distinct) != 0 { return 0 // SELECT may not be DISTINCT } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList if (*ExprList)(unsafe.Pointer(pEList)).FnExpr != 1 { return 0 // The result set must have exactly one column } if int32((*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr)).Fop) != TK_ASTERISK { return 0 // The result set must be the special operator "*" } // At this point we have established that the statement is of the // correct syntactic form to participate in this optimization. Now // we have to check the semantics. pItem = (*Select)(unsafe.Pointer(pSelect)).FpSrc + 8 /* &.a */ pSrc = Xsqlite3LocateTableItem(tls, pParse, uint32(0), pItem) if pSrc == uintptr(0) { return 0 // FROM clause does not contain a real table } if (*Table)(unsafe.Pointer(pSrc)).Ftnum == (*Table)(unsafe.Pointer(pDest)).Ftnum && (*Table)(unsafe.Pointer(pSrc)).FpSchema == (*Table)(unsafe.Pointer(pDest)).FpSchema { // Possible due to bad sqlite_schema.rootpage return 0 // tab1 and tab2 may not be the same table } if libc.Bool32((*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) != libc.Bool32((*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { return 0 // source and destination must both be WITHOUT ROWID or not } if !(int32((*Table)(unsafe.Pointer(pSrc)).FeTabType) == TABTYP_NORM) { return 0 // tab2 may not be a view or virtual table } if int32((*Table)(unsafe.Pointer(pDest)).FnCol) != int32((*Table)(unsafe.Pointer(pSrc)).FnCol) { return 0 // Number of columns must be the same in tab1 and tab2 } if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) != int32((*Table)(unsafe.Pointer(pSrc)).FiPKey) { return 0 // Both tables must have the same INTEGER PRIMARY KEY } if (*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_Strict) != U32(0) && (*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_Strict) == U32(0) { return 0 // Cannot feed from a non-strict into a strict table } for i = 0; i < int32((*Table)(unsafe.Pointer(pDest)).FnCol); i++ { var pDestCol uintptr = (*Table)(unsafe.Pointer(pDest)).FaCol + uintptr(i)*24 var pSrcCol uintptr = (*Table)(unsafe.Pointer(pSrc)).FaCol + uintptr(i)*24 // Even if tables t1 and t2 have identical schemas, if they contain // generated columns, then this statement is semantically incorrect: // // INSERT INTO t2 SELECT * FROM t1; // // The reason is that generated column values are returned by the // the SELECT statement on the right but the INSERT statement on the // left wants them to be omitted. // // Nevertheless, this is a useful notational shorthand to tell SQLite // to do a bulk transfer all of the content from t1 over to t2. // // We could, in theory, disable this (except for internal use by the // VACUUM command where it is actually needed). But why do that? It // seems harmless enough, and provides a useful service. if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED != int32((*Column)(unsafe.Pointer(pSrcCol)).FcolFlags)&COLFLAG_GENERATED { return 0 // Both columns have the same generated-column type } // But the transfer is only allowed if both the source and destination // tables have the exact same expressions for generated columns. // This requirement could be relaxed for VIRTUAL columns, I suppose. if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED != 0 { if Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ColumnExpr(tls, pSrc, pSrcCol), Xsqlite3ColumnExpr(tls, pDest, pDestCol), -1) != 0 { return 0 // Different generator expressions } } if int32((*Column)(unsafe.Pointer(pDestCol)).Faffinity) != int32((*Column)(unsafe.Pointer(pSrcCol)).Faffinity) { return 0 // Affinity must be the same on all columns } if Xsqlite3_stricmp(tls, Xsqlite3ColumnColl(tls, pDestCol), Xsqlite3ColumnColl(tls, pSrcCol)) != 0 { return 0 // Collating sequence must be the same on all columns } if uint32(int32(*(*uint8)(unsafe.Pointer(pDestCol + 8))&0xf>>0)) != 0 && !(int32(*(*uint8)(unsafe.Pointer(pSrcCol + 8))&0xf>>0) != 0) { return 0 // tab2 must be NOT NULL if tab1 is } // Default values for second and subsequent columns need to match. if int32((*Column)(unsafe.Pointer(pDestCol)).FcolFlags)&COLFLAG_GENERATED == 0 && i > 0 { var pDestExpr uintptr = Xsqlite3ColumnExpr(tls, pDest, pDestCol) var pSrcExpr uintptr = Xsqlite3ColumnExpr(tls, pSrc, pSrcCol) if libc.Bool32(pDestExpr == uintptr(0)) != libc.Bool32(pSrcExpr == uintptr(0)) || pDestExpr != uintptr(0) && libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(pDestExpr + 8)), *(*uintptr)(unsafe.Pointer(pSrcExpr + 8))) != 0 { return 0 // Default values must be the same for all columns } } } for pDestIdx = (*Table)(unsafe.Pointer(pDest)).FpIndex; pDestIdx != 0; pDestIdx = (*Index)(unsafe.Pointer(pDestIdx)).FpNext { if int32((*Index)(unsafe.Pointer(pDestIdx)).FonError) != OE_None { destHasUniqueIdx = 1 } for pSrcIdx = (*Table)(unsafe.Pointer(pSrc)).FpIndex; pSrcIdx != 0; pSrcIdx = (*Index)(unsafe.Pointer(pSrcIdx)).FpNext { if xferCompatibleIndex(tls, pDestIdx, pSrcIdx) != 0 { break } } if pSrcIdx == uintptr(0) { return 0 // pDestIdx has no corresponding index in pSrc } if (*Index)(unsafe.Pointer(pSrcIdx)).Ftnum == (*Index)(unsafe.Pointer(pDestIdx)).Ftnum && (*Table)(unsafe.Pointer(pSrc)).FpSchema == (*Table)(unsafe.Pointer(pDest)).FpSchema && Xsqlite3FaultSim(tls, 411) == SQLITE_OK { // The sqlite3FaultSim() call allows this corruption test to be // bypassed during testing, in order to exercise other corruption tests // further downstream. return 0 // Corrupt schema - two indexes on the same btree } } if (*Table)(unsafe.Pointer(pDest)).FpCheck != 0 && Xsqlite3ExprListCompare(tls, (*Table)(unsafe.Pointer(pSrc)).FpCheck, (*Table)(unsafe.Pointer(pDest)).FpCheck, -1) != 0 { return 0 // Tables have different CHECK constraints. Ticket #2252 } // Disallow the transfer optimization if the destination table constains // any foreign key constraints. This is more restrictive than necessary. // But the main beneficiary of the transfer optimization is the VACUUM // command, and the VACUUM command disables foreign key constraints. So // the extra complication to make this rule less restrictive is probably // not worth the effort. Ticket [6284df89debdfa61db8073e062908af0c9b6118e] if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != uint64(0) && *(*uintptr)(unsafe.Pointer(pDest + 64 + 8)) != uintptr(0) { return 0 } if (*Sqlite3)(unsafe.Pointer(db)).Fflags&(U64(uint64(0x00001))<<32) != uint64(0) { return 0 // xfer opt does not play well with PRAGMA count_changes } // If we get this far, it means that the xfer optimization is at // least a possibility, though it might only work if the destination // table (tab1) is initially empty. iDbSrc = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pSrc)).FpSchema) v = Xsqlite3GetVdbe(tls, pParse) Xsqlite3CodeVerifySchema(tls, pParse, iDbSrc) iSrc = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDest = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) regAutoinc = autoIncBegin(tls, pParse, iDbDest, pDest) regData = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regData) regRowid = Xsqlite3GetTempReg(tls, pParse) Xsqlite3OpenTable(tls, pParse, iDest, iDbDest, pDest, OP_OpenWrite) if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) && (int32((*Table)(unsafe.Pointer(pDest)).FiPKey) < 0 && (*Table)(unsafe.Pointer(pDest)).FpIndex != uintptr(0) || destHasUniqueIdx != 0 || onError != OE_Abort && onError != OE_Rollback) { // In some circumstances, we are able to run the xfer optimization // only if the destination table is initially empty. Unless the // DBFLAG_Vacuum flag is set, this block generates code to make // that determination. If DBFLAG_Vacuum is set, then the destination // table is always empty. // // Conditions under which the destination must be empty: // // (1) There is no INTEGER PRIMARY KEY but there are indices. // (If the destination is not initially empty, the rowid fields // of index entries might need to change.) // // (2) The destination has a unique index. (The xfer optimization // is unable to test uniqueness.) // // (3) onError is something other than OE_Abort and OE_Rollback. addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iDest, 0) emptyDestTest = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) Xsqlite3VdbeJumpHere(tls, v, addr1) } if (*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { var insFlags U8 Xsqlite3OpenTable(tls, pParse, iSrc, iDbSrc, pSrc, OP_OpenRead) emptySrcTest = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iSrc, 0) if int32((*Table)(unsafe.Pointer(pDest)).FiPKey) >= 0 { addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iSrc, regRowid) if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { addr2 = Xsqlite3VdbeAddOp3(tls, v, OP_NotExists, iDest, 0, regRowid) Xsqlite3RowidConstraint(tls, pParse, onError, pDest) Xsqlite3VdbeJumpHere(tls, v, addr2) } autoIncStep(tls, pParse, regAutoinc, regRowid) } else if (*Table)(unsafe.Pointer(pDest)).FpIndex == uintptr(0) && !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_VacuumInto) != 0) { addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iDest, regRowid) } else { addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, iSrc, regRowid) } if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iDest) insFlags = U8(OPFLAG_APPEND | OPFLAG_USESEEKRESULT | OPFLAG_PREFORMAT) } else { insFlags = U8(OPFLAG_NCHANGE | OPFLAG_LASTROWID | OPFLAG_APPEND | OPFLAG_PREFORMAT) } if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { Xsqlite3VdbeAddOp3(tls, v, OP_RowData, iSrc, regData, 1) insFlags = libc.Uint8FromInt32(int32(insFlags) & libc.CplInt32(OPFLAG_PREFORMAT)) } else { Xsqlite3VdbeAddOp3(tls, v, OP_RowCell, iDest, iSrc, regRowid) } Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iDest, regData, regRowid) if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) { Xsqlite3VdbeChangeP4(tls, v, -1, pDest, -6) } Xsqlite3VdbeChangeP5(tls, v, uint16(insFlags)) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iSrc, addr1) Xsqlite3VdbeAddOp2(tls, v, OP_Close, iSrc, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) } else { Xsqlite3TableLock(tls, pParse, iDbDest, (*Table)(unsafe.Pointer(pDest)).Ftnum, uint8(1), (*Table)(unsafe.Pointer(pDest)).FzName) Xsqlite3TableLock(tls, pParse, iDbSrc, (*Table)(unsafe.Pointer(pSrc)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pSrc)).FzName) } for pDestIdx = (*Table)(unsafe.Pointer(pDest)).FpIndex; pDestIdx != 0; pDestIdx = (*Index)(unsafe.Pointer(pDestIdx)).FpNext { var idxInsFlags U8 = U8(0) for pSrcIdx = (*Table)(unsafe.Pointer(pSrc)).FpIndex; pSrcIdx != 0; pSrcIdx = (*Index)(unsafe.Pointer(pSrcIdx)).FpNext { if xferCompatibleIndex(tls, pDestIdx, pSrcIdx) != 0 { break } } Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iSrc, int32((*Index)(unsafe.Pointer(pSrcIdx)).Ftnum), iDbSrc) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pSrcIdx) Xsqlite3VdbeAddOp3(tls, v, OP_OpenWrite, iDest, int32((*Index)(unsafe.Pointer(pDestIdx)).Ftnum), iDbDest) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pDestIdx) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_BULKCSR)) addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iSrc, 0) if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) != 0 { // This INSERT command is part of a VACUUM operation, which guarantees // that the destination table is empty. If all indexed columns use // collation sequence BINARY, then it can also be assumed that the // index will be populated by inserting keys in strictly sorted // order. In this case, instead of seeking within the b-tree as part // of every OP_IdxInsert opcode, an OP_SeekEnd is added before the // OP_IdxInsert to seek to the point within the b-tree where each key // should be inserted. This is faster. // // If any of the indexed columns use a collation sequence other than // BINARY, this optimization is disabled. This is because the user // might change the definition of a collation sequence and then run // a VACUUM command. In that case keys may not be written in strictly // sorted order. for i = 0; i < int32((*Index)(unsafe.Pointer(pSrcIdx)).FnColumn); i++ { var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pSrcIdx)).FazColl + uintptr(i)*8)) if Xsqlite3_stricmp(tls, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), zColl) != 0 { break } } if i == int32((*Index)(unsafe.Pointer(pSrcIdx)).FnColumn) { idxInsFlags = U8(OPFLAG_USESEEKRESULT | OPFLAG_PREFORMAT) Xsqlite3VdbeAddOp1(tls, v, OP_SeekEnd, iDest) Xsqlite3VdbeAddOp2(tls, v, OP_RowCell, iDest, iSrc) } } else if !((*Table)(unsafe.Pointer(pSrc)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { idxInsFlags = U8(int32(idxInsFlags) | OPFLAG_NCHANGE) } if int32(idxInsFlags) != OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT { Xsqlite3VdbeAddOp3(tls, v, OP_RowData, iSrc, regData, 1) if (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_Vacuum) == U32(0) && !((*Table)(unsafe.Pointer(pDest)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pDestIdx + 100))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { codeWithoutRowidPreupdate(tls, pParse, pDest, iDest, regData) } } Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iDest, regData) Xsqlite3VdbeChangeP5(tls, v, uint16(int32(idxInsFlags)|OPFLAG_APPEND)) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iSrc, addr1+1) Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp2(tls, v, OP_Close, iSrc, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) } if emptySrcTest != 0 { Xsqlite3VdbeJumpHere(tls, v, emptySrcTest) } Xsqlite3ReleaseTempReg(tls, pParse, regRowid) Xsqlite3ReleaseTempReg(tls, pParse, regData) if emptyDestTest != 0 { Xsqlite3AutoincrementEnd(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Halt, SQLITE_OK, 0) Xsqlite3VdbeJumpHere(tls, v, emptyDestTest) Xsqlite3VdbeAddOp2(tls, v, OP_Close, iDest, 0) return 0 } else { return 1 } return int32(0) } //************* End of insert.c ********************************************* //************* Begin file legacy.c ***************************************** // 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. // // // Main file for the SQLite library. The routines in this file // implement the programmer interface to the library. Routines in // other files are for internal use by SQLite and should not be // accessed by users of the library. // #include "sqliteInt.h" // Execute SQL code. Return one of the SQLITE_ success/failure // codes. Also write an error message into memory obtained from // malloc() and make *pzErrMsg point to that message. // // If the SQL is a query, then for each row in the query result // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:128133:16: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 // Return code // var zLeftover uintptr at bp+8, 8 // Tail of unprocessed SQL // var pStmt uintptr at bp, 8 // The current SQL statement var azCols uintptr // Names of result columns var callbackIsInit int32 var i int32 var nCol int32 var azVals uintptr rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) azCols = uintptr(0) // True if callback data is initialized if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } return Xsqlite3MisuseError(tls, 128146) __1: ; if !(zSql == uintptr(0)) { goto __2 } zSql = ts + 1524 /* "" */ __2: ; Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3Error(tls, db, SQLITE_OK) __3: if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSql)) != 0) { goto __4 } nCol = 0 azVals = uintptr(0) *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, bp+8) if !(rc != SQLITE_OK) { goto __5 } goto __3 __5: ; if !!(*(*uintptr)(unsafe.Pointer(bp)) != 0) { goto __6 } // this happens for a comment or white-space zSql = *(*uintptr)(unsafe.Pointer(bp + 8 /* zLeftover */)) goto __3 __6: ; callbackIsInit = 0 __7: if !(1 != 0) { goto __8 } rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) // Invoke the callback function if required if !(xCallback != 0 && (SQLITE_ROW == rc || SQLITE_DONE == rc && !(callbackIsInit != 0) && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NullCallback) != 0)) { goto __9 } if !!(callbackIsInit != 0) { goto __10 } nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) azCols = Xsqlite3DbMallocRaw(tls, db, uint64(2*nCol+1)*uint64(unsafe.Sizeof(uintptr(0)))) if !(azCols == uintptr(0)) { goto __11 } goto exec_out __11: ; i = 0 __12: if !(i < nCol) { goto __14 } *(*uintptr)(unsafe.Pointer(azCols + uintptr(i)*8)) = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) // sqlite3VdbeSetColName() installs column names as UTF8 // strings so there is no way for sqlite3_column_name() to fail. goto __13 __13: i++ goto __12 goto __14 __14: ; callbackIsInit = 1 __10: ; if !(rc == SQLITE_ROW) { goto __15 } azVals = azCols + uintptr(nCol)*8 i = 0 __16: if !(i < nCol) { goto __18 } *(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8)) = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i) if !(!(int32(*(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8))) != 0) && Xsqlite3_column_type(tls, *(*uintptr)(unsafe.Pointer(bp)), i) != SQLITE_NULL) { goto __19 } Xsqlite3OomFault(tls, db) goto exec_out __19: ; goto __17 __17: i++ goto __16 goto __18 __18: ; *(*uintptr)(unsafe.Pointer(azVals + uintptr(i)*8)) = uintptr(0) __15: ; if !((*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, pArg, nCol, azVals, azCols) != 0) { goto __20 } // EVIDENCE-OF: R-38229-40159 If the callback function to // sqlite3_exec() returns non-zero, then sqlite3_exec() will // return SQLITE_ABORT. rc = SQLITE_ABORT Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) Xsqlite3Error(tls, db, SQLITE_ABORT) goto exec_out __20: ; __9: ; if !(rc != SQLITE_ROW) { goto __21 } rc = Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) zSql = *(*uintptr)(unsafe.Pointer(bp + 8 /* zLeftover */)) __22: if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zSql)))])&0x01 != 0) { goto __23 } zSql++ goto __22 __23: ; goto __8 __21: ; goto __7 __8: ; Xsqlite3DbFree(tls, db, azCols) azCols = uintptr(0) goto __3 __4: ; exec_out: if !(*(*uintptr)(unsafe.Pointer(bp)) != 0) { goto __24 } Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) __24: ; Xsqlite3DbFree(tls, db, azCols) rc = Xsqlite3ApiExit(tls, db, rc) if !(rc != SQLITE_OK && pzErrMsg != 0) { goto __25 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3DbStrDup(tls, uintptr(0), Xsqlite3_errmsg(tls, db)) if !(*(*uintptr)(unsafe.Pointer(pzErrMsg)) == uintptr(0)) { goto __27 } rc = SQLITE_NOMEM Xsqlite3Error(tls, db, SQLITE_NOMEM) __27: ; goto __26 __25: if !(pzErrMsg != 0) { goto __28 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) __28: ; __26: ; Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // 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 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:128627:13 */ // 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 //************* End of sqlite3ext.h ***************************************** //************* Continuing where we left off in loadext.c ******************* // #include "sqliteInt.h" // Some API routines are omitted when various features are // excluded from a build of SQLite. Substitute a NULL pointer // for any missing APIs. // The following structure contains pointers to all SQLite API routines. // A pointer to this structure is passed into extensions when they are // loaded so that the extension can make calls back into the SQLite // library. // // When adding new APIs, add them to the bottom of this structure // in order to preserve backwards compatibility. // // Extensions that use newer APIs should first call the // sqlite3_libversion_number() to make sure that the API they // intend to use is supported by the library. Extensions should // also check to make sure that the pointer to the function is // not NULL before calling it. var sqlite3Apis = Sqlite3_api_routines{ Faggregate_context: 0, Faggregate_count: 0, Fbind_blob: 0, Fbind_double: 0, Fbind_int: 0, Fbind_int64: 0, Fbind_null: 0, Fbind_parameter_count: 0, Fbind_parameter_index: 0, Fbind_parameter_name: 0, Fbind_text: 0, Fbind_text16: 0, Fbind_value: 0, Fbusy_handler: 0, Fbusy_timeout: 0, Fchanges: 0, Fclose: 0, Fcollation_needed: 0, Fcollation_needed16: 0, Fcolumn_blob: 0, Fcolumn_bytes: 0, Fcolumn_bytes16: 0, Fcolumn_count: 0, Fcolumn_database_name: 0, Fcolumn_database_name16: 0, Fcolumn_decltype: 0, Fcolumn_decltype16: 0, Fcolumn_double: 0, Fcolumn_int: 0, Fcolumn_int64: 0, Fcolumn_name: 0, Fcolumn_name16: 0, Fcolumn_origin_name: 0, Fcolumn_origin_name16: 0, Fcolumn_table_name: 0, Fcolumn_table_name16: 0, Fcolumn_text: 0, Fcolumn_text16: 0, Fcolumn_type: 0, Fcolumn_value: 0, Fcommit_hook: 0, Fcomplete: 0, Fcomplete16: 0, Fcreate_collation: 0, Fcreate_collation16: 0, Fcreate_function: 0, Fcreate_function16: 0, Fcreate_module: 0, Fdata_count: 0, Fdb_handle: 0, Fdeclare_vtab: 0, Fenable_shared_cache: 0, Ferrcode: 0, Ferrmsg: 0, Ferrmsg16: 0, Fexec: 0, Fexpired: 0, Ffinalize: 0, Ffree: 0, Ffree_table: 0, Fget_autocommit: 0, Fget_auxdata: 0, Fget_table: 0, // Was sqlite3_global_recover(), but that function is deprecated Finterruptx: 0, Flast_insert_rowid: 0, Flibversion: 0, Flibversion_number: 0, Fmalloc: 0, Fmprintf: 0, Fopen: 0, Fopen16: 0, Fprepare: 0, Fprepare16: 0, Fprofile: 0, Fprogress_handler: 0, Frealloc: 0, Freset: 0, Fresult_blob: 0, Fresult_double: 0, Fresult_error: 0, Fresult_error16: 0, Fresult_int: 0, Fresult_int64: 0, Fresult_null: 0, Fresult_text: 0, Fresult_text16: 0, Fresult_text16be: 0, Fresult_text16le: 0, Fresult_value: 0, Frollback_hook: 0, Fset_authorizer: 0, Fset_auxdata: 0, Fxsnprintf: 0, Fstep: 0, Ftable_column_metadata: 0, Fthread_cleanup: 0, Ftotal_changes: 0, Ftrace: 0, Ftransfer_bindings: 0, Fupdate_hook: 0, Fuser_data: 0, Fvalue_blob: 0, Fvalue_bytes: 0, Fvalue_bytes16: 0, Fvalue_double: 0, Fvalue_int: 0, Fvalue_int64: 0, Fvalue_numeric_type: 0, Fvalue_text: 0, Fvalue_text16: 0, Fvalue_text16be: 0, Fvalue_text16le: 0, Fvalue_type: 0, Fvmprintf: 0, // The original API set ends here. All extensions can call any // of the APIs above provided that the pointer is not NULL. But // before calling APIs that follow, extension should check the // sqlite3_libversion_number() to make sure they are dealing with // a library that is new enough to support that API. // Foverload_function: 0, // Added after 3.3.13 Fprepare_v2: 0, Fprepare16_v2: 0, Fclear_bindings: 0, // Added for 3.4.1 Fcreate_module_v2: 0, // Added for 3.5.0 Fbind_zeroblob: 0, Fblob_bytes: 0, Fblob_close: 0, Fblob_open: 0, Fblob_read: 0, Fblob_write: 0, Fcreate_collation_v2: 0, Ffile_control: 0, Fmemory_highwater: 0, Fmemory_used: 0, Fmutex_alloc: 0, Fmutex_enter: 0, Fmutex_free: 0, Fmutex_leave: 0, Fmutex_try: 0, Fopen_v2: 0, Frelease_memory: 0, Fresult_error_nomem: 0, Fresult_error_toobig: 0, Fsleep: 0, Fsoft_heap_limit: 0, Fvfs_find: 0, Fvfs_register: 0, Fvfs_unregister: 0, // Added for 3.5.8 Fxthreadsafe: 0, Fresult_zeroblob: 0, Fresult_error_code: 0, Ftest_control: 0, Frandomness: 0, Fcontext_db_handle: 0, // Added for 3.6.0 Fextended_result_codes: 0, Flimit: 0, Fnext_stmt: 0, Fsql: 0, Fstatus: 0, // Added for 3.7.4 Fbackup_finish: 0, Fbackup_init: 0, Fbackup_pagecount: 0, Fbackup_remaining: 0, Fbackup_step: 0, Fcompileoption_get: 0, Fcompileoption_used: 0, Fcreate_function_v2: 0, Fdb_config: 0, Fdb_mutex: 0, Fdb_status: 0, Fextended_errcode: 0, Flog: 0, Fsoft_heap_limit64: 0, Fsourceid: 0, Fstmt_status: 0, Fstrnicmp: 0, Funlock_notify: 0, Fwal_autocheckpoint: 0, Fwal_checkpoint: 0, Fwal_hook: 0, Fblob_reopen: 0, Fvtab_config: 0, Fvtab_on_conflict: 0, Fclose_v2: 0, Fdb_filename: 0, Fdb_readonly: 0, Fdb_release_memory: 0, Ferrstr: 0, Fstmt_busy: 0, Fstmt_readonly: 0, Fstricmp: 0, Furi_boolean: 0, Furi_int64: 0, Furi_parameter: 0, Fxvsnprintf: 0, Fwal_checkpoint_v2: 0, // Version 3.8.7 and later Fauto_extension: 0, Fbind_blob64: 0, Fbind_text64: 0, Fcancel_auto_extension: 0, Fload_extension: 0, Fmalloc64: 0, Fmsize: 0, Frealloc64: 0, Freset_auto_extension: 0, Fresult_blob64: 0, Fresult_text64: 0, Fstrglob: 0, // Version 3.8.11 and later Fvalue_dup: 0, Fvalue_free: 0, Fresult_zeroblob64: 0, Fbind_zeroblob64: 0, // Version 3.9.0 and later Fvalue_subtype: 0, Fresult_subtype: 0, // Version 3.10.0 and later Fstatus64: 0, Fstrlike: 0, Fdb_cacheflush: 0, // Version 3.12.0 and later Fsystem_errno: 0, // Version 3.14.0 and later Ftrace_v2: 0, Fexpanded_sql: 0, // Version 3.18.0 and later Fset_last_insert_rowid: 0, // Version 3.20.0 and later Fprepare_v3: 0, Fprepare16_v3: 0, Fbind_pointer: 0, Fresult_pointer: 0, Fvalue_pointer: 0, // Version 3.22.0 and later Fvtab_nochange: 0, Fvalue_nochange: 0, Fvtab_collation: 0, // Version 3.24.0 and later Fkeyword_count: 0, Fkeyword_name: 0, Fkeyword_check: 0, Fstr_new: 0, Fstr_finish: 0, Fstr_appendf: 0, Fstr_vappendf: 0, Fstr_append: 0, Fstr_appendall: 0, Fstr_appendchar: 0, Fstr_reset: 0, Fstr_errcode: 0, Fstr_length: 0, Fstr_value: 0, // Version 3.25.0 and later Fcreate_window_function: 0, // Version 3.28.0 and later Fstmt_isexplain: 0, Fvalue_frombind: 0, // Version 3.30.0 and later Fdrop_modules: 0, // Version 3.31.0 and later Fhard_heap_limit64: 0, Furi_key: 0, Ffilename_database: 0, Ffilename_journal: 0, Ffilename_wal: 0, // Version 3.32.0 and later Fcreate_filename: 0, Ffree_filename: 0, Fdatabase_file_object: 0, // Version 3.34.0 and later Ftxn_state: 0, // Version 3.36.1 and later Fchanges64: 0, Ftotal_changes64: 0, // Version 3.37.0 and later Fautovacuum_pages: 0, // Version 3.38.0 and later Ferror_offset: 0, Fvtab_rhs_value: 0, Fvtab_distinct: 0, Fvtab_in: 0, Fvtab_in_first: 0, Fvtab_in_next: 0, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129073:35 */ // True if x is the directory separator character // Attempt to load an SQLite extension library contained in the file // zFile. The entry point is zProc. zProc may be 0 in which case a // default entry point name (sqlite3_extension_init) is used. Use // of the default name is recommended. // // Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong. // // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129457:12: */ bp := tls.Alloc(64) defer tls.Free(64) var pVfs uintptr var handle uintptr var xInit Sqlite3_loadext_entry // var zErrmsg uintptr at bp+56, 8 var zEntry uintptr var zAltEntry uintptr var aHandle uintptr var nMsg U64 var ii int32 var rc int32 var zAltFile uintptr var iFile int32 var iEntry int32 var c int32 var ncFile int32 pVfs = (*Sqlite3)(unsafe.Pointer(db)).FpVfs *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) = uintptr(0) zAltEntry = uintptr(0) nMsg = libc.Xstrlen(tls, zFile) if !(pzErrMsg != 0) { goto __1 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) __1: ; // Ticket #1863. To avoid a creating security problems for older // applications that relink against newer versions of SQLite, the // ability to run load_extension is turned off by default. One // must call either sqlite3_enable_load_extension(db) or // sqlite3_db_config(db, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, 0) // to turn on extension loading. if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtension) == uint64(0)) { goto __2 } if !(pzErrMsg != 0) { goto __3 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+13337, 0) __3: ; return SQLITE_ERROR __2: ; if zProc != 0 { zEntry = zProc } else { zEntry = ts + 17152 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given // an oversize filename. Most filesystems have a pathname limit of 4K, // so limit the extension filename length to about twice that. // https://sqlite.org/forum/forumpost/08a0d6d9bf if !(nMsg > uint64(FILENAME_MAX)) { goto __4 } goto extension_not_found __4: ; handle = Xsqlite3OsDlOpen(tls, pVfs, zFile) ii = 0 __5: if !(ii < int32(uint64(unsafe.Sizeof(azEndings))/uint64(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } zAltFile = Xsqlite3_mprintf(tls, ts+13298, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } return SQLITE_NOMEM __8: ; handle = Xsqlite3OsDlOpen(tls, pVfs, zAltFile) Xsqlite3_free(tls, zAltFile) goto __6 __6: ii++ goto __5 goto __7 __7: ; if !(handle == uintptr(0)) { goto __9 } goto extension_not_found __9: ; xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) // If no entry point was specified and the default legacy // entry point name "sqlite3_extension_init" was not found, then // construct an entry point name "sqlite3_X_init" where the X is // replaced by the lowercase value of every ASCII alphabetic // character in the filename after the last "/" upto the first ".", // and eliding the first three characters if they are "lib". // Examples: // // /usr/local/lib/libExample5.4.3.so ==> sqlite3_example_init // C:/lib/mathfuncs.dll ==> sqlite3_mathfuncs_init if !(xInit == uintptr(0) && zProc == uintptr(0)) { goto __10 } ncFile = Xsqlite3Strlen30(tls, zFile) zAltEntry = Xsqlite3_malloc64(tls, uint64(ncFile+30)) if !(zAltEntry == uintptr(0)) { goto __11 } Xsqlite3OsDlClose(tls, pVfs, handle) return SQLITE_NOMEM __11: ; libc.Xmemcpy(tls, zAltEntry, ts+17175, uint64(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/' || int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '\\')) { goto __14 } goto __13 __13: iFile-- goto __12 goto __14 __14: ; iFile++ if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+17184, 3) == 0) { goto __15 } iFile = iFile + 3 __15: ; iEntry = 8 __16: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile))))) != 0 && c != '.') { goto __18 } if !(int32(Xsqlite3CtypeMap[uint8(c)])&0x02 != 0) { goto __19 } *(*int8)(unsafe.Pointer(zAltEntry + uintptr(libc.PostIncInt32(&iEntry, 1)))) = int8(Xsqlite3UpperToLower[uint32(c)]) __19: ; goto __17 __17: iFile++ goto __16 goto __18 __18: ; libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+17188, uint64(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: ; if !(xInit == uintptr(0)) { goto __20 } if !(pzErrMsg != 0) { goto __21 } nMsg = nMsg + (libc.Xstrlen(tls, zEntry) + uint64(300)) *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { goto __22 } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), ts+17194, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; __21: ; Xsqlite3OsDlClose(tls, pVfs, handle) Xsqlite3_free(tls, zAltEntry) return SQLITE_ERROR __20: ; Xsqlite3_free(tls, zAltEntry) rc = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+56 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis))) if !(rc != 0) { goto __23 } if !(rc == SQLITE_OK|int32(1)<<8) { goto __24 } return SQLITE_OK __24: ; if !(pzErrMsg != 0) { goto __25 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+17237, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) Xsqlite3OsDlClose(tls, pVfs, handle) return SQLITE_ERROR __23: ; // Append the new shared library handle to the db->aExtension array. aHandle = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(handle))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension+1)) if !(aHandle == uintptr(0)) { goto __26 } return SQLITE_NOMEM __26: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnExtension > 0) { goto __27 } libc.Xmemcpy(tls, aHandle, (*Sqlite3)(unsafe.Pointer(db)).FaExtension, uint64(unsafe.Sizeof(handle))*uint64((*Sqlite3)(unsafe.Pointer(db)).FnExtension)) __27: ; Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaExtension) (*Sqlite3)(unsafe.Pointer(db)).FaExtension = aHandle *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaExtension + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnExtension, 1))*8)) = handle return SQLITE_OK extension_not_found: if !(pzErrMsg != 0) { goto __28 } nMsg = nMsg + uint64(300) *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { goto __29 } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), ts+17269, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; __28: ; return SQLITE_ERROR } var azEndings = [1]uintptr{ ts + 17306, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129475:21 */ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129608:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // Call this routine when the database connection is closing in order // to clean up loaded extensions func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129626:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { Xsqlite3OsDlClose(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaExtension + uintptr(i)*8))) } Xsqlite3DbFree(tls, db, (*Sqlite3)(unsafe.Pointer(db)).FaExtension) } // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129639:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) } else { *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc)) } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_OK } // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. type sqlite3AutoExtList = struct { FnExt U32 F__ccgo_pad1 [4]byte FaExt uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129659:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. type Sqlite3AutoExtList = sqlite3AutoExtList /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129659:35 */ var sqlite3Autoext = sqlite3AutoExtList{} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129663:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, // we have to locate the state vector at run-time. In the more common // case where writable static data is supported, wsdStat can refer directly // to the "sqlite3Autoext" state vector declared above. // Register a statically linked extension that is automatically // loaded by every new database connection. func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129685:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { return rc } else { var i U32 var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) for i = U32(0); i < sqlite3Autoext.FnExt; i++ { if *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) == xInit { break } } if i == sqlite3Autoext.FnExt { var nByte U64 = uint64(sqlite3Autoext.FnExt+U32(1)) * uint64(unsafe.Sizeof(uintptr(0))) var aNew uintptr aNew = Xsqlite3_realloc64(tls, sqlite3Autoext.FaExt, nByte) if aNew == uintptr(0) { rc = SQLITE_NOMEM } else { sqlite3Autoext.FaExt = aNew *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(sqlite3Autoext.FnExt)*8)) = xInit sqlite3Autoext.FnExt++ } } Xsqlite3_mutex_leave(tls, mutex) return rc } return int32(0) } // Cancel a prior call to sqlite3_auto_extension. Remove xInit from the // set of routines that is invoked for each new database connection, if it // is currently on the list. If xInit is not on the list, then this // routine is a no-op. // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129732:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 Xsqlite3_mutex_enter(tls, mutex) for i = int32(sqlite3Autoext.FnExt) - 1; i >= 0; i-- { if *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) == xInit { sqlite3Autoext.FnExt-- *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(sqlite3Autoext.FnExt)*8)) n++ break } } Xsqlite3_mutex_leave(tls, mutex) return n } // Reset the automatic extension loading mechanism. func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129757:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) Xsqlite3_mutex_enter(tls, mutex) Xsqlite3_free(tls, sqlite3Autoext.FaExt) sqlite3Autoext.FaExt = uintptr(0) sqlite3Autoext.FnExt = U32(0) Xsqlite3_mutex_leave(tls, mutex) } } // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129779:21: */ bp := tls.Alloc(16) defer tls.Free(16) var i U32 var go1 int32 = 1 var rc int32 var xInit Sqlite3_loadext_entry if sqlite3Autoext.FnExt == U32(0) { // Common case: early out without every having to acquire a mutex return } for i = U32(0); go1 != 0; i++ { // var zErrmsg uintptr at bp+8, 8 var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var pThunk uintptr = uintptr(unsafe.Pointer(&sqlite3Apis)) Xsqlite3_mutex_enter(tls, mutex) if i >= sqlite3Autoext.FnExt { xInit = uintptr(0) go1 = 0 } else { xInit = *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) } Xsqlite3_mutex_leave(tls, mutex) *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)) = uintptr(0) if xInit != 0 && libc.AssignInt32(&rc, (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, ts+17310, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) } } //************* End of loadext.c ******************************************** //************* Begin file pragma.c ***************************************** // 2003 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 contains code used to implement the PRAGMA command. // #include "sqliteInt.h" // ************************************************************************** // // The "pragma.h" include file is an automatically generated file that // that includes the PragType_XXXX macro definitions and the aPragmaName[] // object. This ensures that the aPragmaName[] table is arranged in // lexicographical order to facility a binary search of the pragma name. // Do not edit pragma.h directly. Edit and rerun the script in at // ../tool/mkpragmatab.tcl. //************* Include pragma.h in the middle of pragma.c ****************** //************* Begin file pragma.h ***************************************** // DO NOT EDIT! // This file is automatically generated by the script at // ../tool/mkpragmatab.tcl. To update the set of pragmas, edit // that script and rerun it. // The various pragma types // Property flags associated with various pragma. // Names of columns for pragmas that return multi-column result // or that return single-column results where the name of the // result column is different from the name of the pragma var pragCName = [57]uintptr{ ts + 6360, ts + 17349, ts + 10113, ts + 17353, ts + 17358, ts + 17361, ts + 17371, ts + 17381, ts + 17387, ts + 17391, ts + 17396, ts + 17401, ts + 17409, ts + 17420, ts + 17423, ts + 17430, ts + 17391, ts + 17396, ts + 17437, ts + 17442, ts + 17445, ts + 17452, ts + 17387, ts + 17391, ts + 17458, ts + 17463, ts + 17468, ts + 17391, ts + 17472, ts + 17396, ts + 17480, ts + 17484, ts + 17489, ts + 12729, ts + 12725, ts + 17495, ts + 17500, ts + 17505, ts + 17349, ts + 17391, ts + 17510, ts + 17517, ts + 17524, ts + 10113, ts + 17532, ts + 6363, ts + 17538, ts + 17349, ts + 17391, ts + 17543, ts + 17548, ts + 16744, ts + 17553, ts + 17566, ts + 17575, ts + 17582, ts + 17593, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129920:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { FzName uintptr FePragTyp U8 FmPragFlg U8 FiPragCName U8 FnPragCName U8 F__ccgo_pad1 [4]byte FiArg U64 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129985:9 */ // Definitions of all built-in pragmas type PragmaName = PragmaName1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129992:3 */ var aPragmaName = [67]PragmaName{ { /* zName: */ FzName: ts + 17601, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 17616, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, { /* zName: */ FzName: ts + 17631, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 17643, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, { /* zName: */ FzName: ts + 17659, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, { /* zName: */ FzName: ts + 17582, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 17672, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 17684, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, { /* zName: */ FzName: ts + 17704, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, { /* zName: */ FzName: ts + 17720, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, { /* zName: */ FzName: ts + 17741, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, { /* zName: */ FzName: ts + 17756, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 17772, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, { /* zName: */ FzName: ts + 17786, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATA_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 17807, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, { /* zName: */ FzName: ts + 17820, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, { /* zName: */ FzName: ts + 17834, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, { /* zName: */ FzName: ts + 17853, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, { /* zName: */ FzName: ts + 17872, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, { /* zName: */ FzName: ts + 17895, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 17904, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, { /* zName: */ FzName: ts + 17922, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, { /* zName: */ FzName: ts + 17939, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, { /* zName: */ FzName: ts + 17952, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, { /* zName: */ FzName: ts + 17967, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, { /* zName: */ FzName: ts + 17985, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, { /* zName: */ FzName: ts + 17995, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, { /* zName: */ FzName: ts + 18009, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 18025, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, { /* zName: */ FzName: ts + 18050, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, { /* zName: */ FzName: ts + 18069, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, { /* zName: */ FzName: ts + 18080, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, { /* zName: */ FzName: ts + 18091, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, { /* zName: */ FzName: ts + 18103, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, { /* zName: */ FzName: ts + 18119, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, { /* zName: */ FzName: ts + 18132, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, { /* zName: */ FzName: ts + 18151, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, { /* zName: */ FzName: ts + 18170, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, { /* zName: */ FzName: ts + 18183, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, { /* zName: */ FzName: ts + 18198, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, { /* zName: */ FzName: ts + 18208, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, { /* zName: */ FzName: ts + 18220, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, { /* zName: */ FzName: ts + 18229, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, { /* zName: */ FzName: ts + 18240, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 18250, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, { /* zName: */ FzName: ts + 18262, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, { /* zName: */ FzName: ts + 18273, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, { /* zName: */ FzName: ts + 18285, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, { /* zName: */ FzName: ts + 18302, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, { /* zName: */ FzName: ts + 18321, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, { /* zName: */ FzName: ts + 18347, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, { /* zName: */ FzName: ts + 18362, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 18376, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, { /* zName: */ FzName: ts + 18395, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, { /* zName: */ FzName: ts + 18409, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 18425, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 18437, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, { /* zName: */ FzName: ts + 18448, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, { /* zName: */ FzName: ts + 18459, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, { /* zName: */ FzName: ts + 18471, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 18482, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, { /* zName: */ FzName: ts + 18503, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, { /* zName: */ FzName: ts + 18511, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, { /* zName: */ FzName: ts + 18526, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, { /* zName: */ FzName: ts + 18539, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, { /* zName: */ FzName: ts + 18558, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, { /* zName: */ FzName: ts + 18573, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:129993:25 */ // Number of pragmas: 68 on by default, 78 total. //************* End of pragma.h ********************************************* //************* Continuing where we left off in pragma.c ******************** // Interpret the given string as a safety level. Return 0 for OFF, // 1 for ON or NORMAL, 2 for FULL, and 3 for EXTRA. Return 1 for an empty or // unrecognized string argument. The FULL and EXTRA option is disallowed // if the omitFull parameter it 1. // // Note that the values returned are one less that the values that // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130527:11: */ // on no off false yes true extra full var i int32 var n int32 if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z)))])&0x04 != 0 { return U8(Xsqlite3Atoi(tls, z)) } n = Xsqlite3Strlen30(tls, z) for i = 0; i < int32(uint64(unsafe.Sizeof(iLength))/uint64(unsafe.Sizeof(U8(0)))); i++ { if int32(iLength[i]) == n && Xsqlite3_strnicmp(tls, uintptr(unsafe.Pointer(&zText))+uintptr(iOffset[i]), z, n) == 0 && (!(omitFull != 0) || int32(iValue[i]) <= 1) { return iValue[i] } } return dflt } var zText = *(*[25]int8)(unsafe.Pointer(ts + 18589)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130529:21 */ var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130530:19 */ var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130531:19 */ var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130532:19 */ // Interpret the given string as a boolean value. func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130552:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } // The sqlite3GetBoolean() function is used by other modules but the // remainder of this file is specific to PRAGMA processing. So omit // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130565:12: */ if z != 0 { if 0 == Xsqlite3StrICmp(tls, z, ts+4968) { return PAGER_LOCKINGMODE_EXCLUSIVE } if 0 == Xsqlite3StrICmp(tls, z, ts+18614) { return PAGER_LOCKINGMODE_NORMAL } } return -1 } // Interpret the given string as an auto-vacuum mode value. // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130580:12: */ var i int32 if 0 == Xsqlite3StrICmp(tls, z, ts+9257) { return BTREE_AUTOVACUUM_NONE } if 0 == Xsqlite3StrICmp(tls, z, ts+18621) { return BTREE_AUTOVACUUM_FULL } if 0 == Xsqlite3StrICmp(tls, z, ts+18626) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) return int32(func() uint8 { if i >= 0 && i <= 2 { return uint8(i) } return uint8(0) }()) } // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. func getTempStore(tls *libc.TLS, z uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130596:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' } else if Xsqlite3StrICmp(tls, z, ts+17543) == 0 { return 1 } else if Xsqlite3StrICmp(tls, z, ts+18638) == 0 { return 2 } else { return 0 } return int32(0) } // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130614:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, ts+18645, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpBt) (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*32)).FpBt = uintptr(0) Xsqlite3ResetAllSchemasOfConnection(tls, db) } return SQLITE_OK } // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130638:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { return SQLITE_OK } if invalidateTempStorage(tls, pParse) != SQLITE_OK { return SQLITE_ERROR } (*Sqlite3)(unsafe.Pointer(db)).Ftemp_store = U8(ts) return SQLITE_OK } // Set result column names for a pragma. func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130653:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { return 1 } return int32(n) }()) if int32(n) == 0 { Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, (*PragmaName)(unsafe.Pointer(pPragma)).FzName, uintptr(0)) } else { var i int32 var j int32 i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: if !(i < int32(n)) { goto __3 } { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, pragCName[j], uintptr(0)) } goto __2 __2: i++ j++ goto __1 goto __3 __3: } } // Generate code to return a single integer value. func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130672:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, 1, 0, bp, -14) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) } // Generate code to return a single text value. func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130680:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) } } // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130696:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb for libc.PostDecInt32(&n, 1) > 0 { if (*Db)(unsafe.Pointer(pDb)).FpBt != 0 { Xsqlite3BtreeSetPagerFlags(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, uint32(U64((*Db)(unsafe.Pointer(pDb)).Fsafety_level)|(*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(PAGER_FLAGS_MASK))) } pDb += 32 } } } // Return a human-readable name for a constraint resolution action. func actionName(tls *libc.TLS, action U8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130724:19: */ var zName uintptr switch int32(action) { case OE_SetNull: zName = ts + 18707 /* "SET NULL" */ break case OE_SetDflt: zName = ts + 18716 /* "SET DEFAULT" */ break case OE_Cascade: zName = ts + 18728 /* "CASCADE" */ break case OE_Restrict: zName = ts + 18736 /* "RESTRICT" */ break default: zName = ts + 18745 /* "NO ACTION" */ break } return zName } // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130744:27: */ if eMode == int32(uint64(unsafe.Sizeof(azModeName))/uint64(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) } return azModeName[eMode] } var azModeName = [6]uintptr{ ts + 18755, ts + 18762, ts + 18770, ts + 18774, ts + 18638, ts + 18783, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130745:15 */ // Locate a pragma in the aPragmaName[] array. func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130766:25: */ var upr int32 var lwr int32 var mid int32 = 0 var rc int32 lwr = 0 upr = int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{}))) - 1 for lwr <= upr { mid = (lwr + upr) / 2 rc = Xsqlite3_stricmp(tls, zName, aPragmaName[mid].FzName) if rc == 0 { break } if rc < 0 { upr = mid - 1 } else { lwr = mid + 1 } } if lwr > upr { return uintptr(0) } return uintptr(unsafe.Pointer(&aPragmaName)) + uintptr(mid)*24 } // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130787:13: */ bp := tls.Alloc(48) defer tls.Free(48) for ; p != 0; p = (*FuncDef)(unsafe.Pointer(p)).FpNext { var zType uintptr if (*FuncDef)(unsafe.Pointer(p)).FxSFunc == uintptr(0) { continue } if (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_INTERNAL) != U32(0) && showInternFuncs == 0 { continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { zType = ts + 18787 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { zType = ts + 18789 /* "a" */ } else { zType = ts + 8767 /* "s" */ } Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18791, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&mask^U32(SQLITE_INNOCUOUS))) } } var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130795:22 */ var azEnc = [4]uintptr{uintptr(0), ts + 18798, ts + 18803, ts + 18811 /* "utf16be" */} /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130802:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130839:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) Xsqlite3VdbeAddOp0(tls, v, OP_Halt) return addr } // Process a pragma statement. // // Pragmas are of this form: // // PRAGMA [schema.]id [= value] // // The identifier might also be a string. The value is a string, and // identifier, or a number. If minusFlag is true, then the value is // a number that was preceded by a minus sign. // // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130863:21: */ bp := tls.Alloc(624) defer tls.Free(624) var zLeft uintptr // Nul-terminated UTF-8 string <id> var zRight uintptr // Nul-terminated UTF-8 string <value>, or NULL var zDb uintptr // The database name // var pId uintptr at bp+448, 8 // Pointer to <id> token // var aFcntl [4]uintptr at bp+456, 32 // Argument to SQLITE_FCNTL_PRAGMA var iDb int32 // Database index for <database> var rc int32 // return value form SQLITE_FCNTL_PRAGMA var db uintptr // The database connection var pDb uintptr // The specific database being pragmaed var v uintptr // Prepared statement var pPragma uintptr var size int32 var aOp uintptr var size1 int32 var pBt uintptr var ii int32 var pBt1 uintptr var b int32 var iReg int32 // var x I64 at bp+488, 8 // This indicates that no database name was specified as part // of the PRAGMA command. In this case the locking-mode must be // set on all attached databases, as well as the main db file. // // Also, the sqlite3.dfltLockMode variable is set so that // any subsequently attached databases also use the specified // locking mode. var ii1 int32 var pPager uintptr var zRet uintptr var eMode int32 var zMode uintptr var n int32 var eMode1 int32 // One of the PAGER_JOURNALMODE_XXX symbols var ii2 int32 var pPager1 uintptr // var iLimit I64 at bp+496, 8 var aOp1 uintptr var iAddr int32 var eAuto int32 var pBt2 uintptr // var iLimit1 int32 at bp+504, 4 var addr int32 var size2 int32 // var size3 int32 at bp+508, 4 var ii3 int32 // var sz Sqlite3_int64 at bp+512, 8 // var res int32 at bp+520, 4 // var res1 int32 at bp+524, 4 var iLevel int32 var mask U64 var isHidden int32 var pColExpr uintptr var i int32 var k int32 var nHidden int32 var pCol uintptr var pPk uintptr var pTab uintptr // var pDummy uintptr at bp+528, 8 var zSql uintptr var pTab1 uintptr var pTab2 uintptr var zType uintptr var k1 uintptr var pHash uintptr var initNCol int32 var ii4 int32 var cnum I16 var iIdxDb int32 var i1 int32 var mx int32 var pIdx uintptr var pTab3 uintptr // var azOrigin [3]uintptr at bp+536, 24 var iTabDb int32 var pIdx1 uintptr var pTab4 uintptr var i2 int32 var i3 int32 var pColl uintptr var i4 int32 var p uintptr var i5 int32 var j uintptr var p1 uintptr var showInternFunc int32 var pMod uintptr var j1 uintptr var i6 int32 var j2 int32 var iTabDb1 int32 var i7 int32 var pFK uintptr var pTab5 uintptr var iCol int32 var jmp int32 var pFK1 uintptr // A foreign key constraint var pTab6 uintptr // Child table contain "REFERENCES" keyword var pParent uintptr // Parent table that child points to // var pIdx2 uintptr at bp+560, 8 // Index in the parent table var i8 int32 // Loop counter: Foreign key number for pTab var j3 int32 // Loop counter: Field of the foreign key var k2 uintptr // Loop counter: Next table in schema var x1 int32 // result variable var regResult int32 // 3 registers to hold a result row var regKey int32 // Register to hold key for checking the FK var regRow int32 // Registers to hold a row from pTab var addrTop int32 // Top of a loop checking foreign keys var addrOk int32 // Jump here if the key is OK // var aiCols uintptr at bp+568, 8 var pTab7 uintptr // Current table var pIdx3 uintptr // An index on pTab var nIdx int32 var pTab8 uintptr var pIdx4 uintptr var zErr uintptr var pCol1 uintptr var doError int32 var jmp2 int32 var addrCkFault int32 var addrCkOk int32 var zErr1 uintptr var k3 int32 var pCheck uintptr var iCol1 int32 var uniqOk int32 var jmp6 int32 var kk int32 var jmp21 int32 // var jmp3 int32 at bp+588, 4 var jmp4 int32 var jmp5 int32 var ckUniq int32 var pTab9 uintptr var pIdx5 uintptr var pPk1 uintptr var pPrior uintptr var loopTop int32 // var iDataCur int32 at bp+580, 4 // var iIdxCur int32 at bp+584, 4 var r1 int32 var bStrict int32 var x2 uintptr // For looping over tables in the schema var pTbls uintptr // Set of all tables in the schema var aRoot uintptr // Array of root page numbers of all btrees var cnt int32 // Number of entries in aRoot[] var mxIdx int32 var aOp2 uintptr var i9 int32 var j4 int32 var addr1 int32 // var mxErr int32 at bp+576, 4 var pObjTab uintptr // Check only this one table, if not NULL var isQuick int32 var enc U8 var pEnc uintptr var aOp3 uintptr var aOp4 uintptr var iCookie int32 var i10 int32 var zOpt uintptr var iBt int32 var eMode2 int32 var r11 int32 var iDbLast int32 // Loop termination point for the schema loop var iTabCur int32 // Cursor for a table whose size needs checking var k4 uintptr // Loop over tables of a schema var pSchema uintptr // The current schema var pTab10 uintptr // A table in the schema var pIdx6 uintptr // An index of the table var szThreshold LogEst // Size threshold above which reanalysis is needd var zSubSql uintptr // SQL statement for the OP_SqlExec opcode var opMask U32 // var N Sqlite3_int64 at bp+592, 8 var iPrior Sqlite3_int64 // var N1 Sqlite3_int64 at bp+600, 8 // var N2 Sqlite3_int64 at bp+608, 8 // var N3 Sqlite3_int64 at bp+616, 8 zLeft = uintptr(0) zRight = uintptr(0) zDb = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb v = Xsqlite3GetVdbe(tls, pParse) // The pragma if !(v == uintptr(0)) { goto __1 } return __1: ; Xsqlite3VdbeRunOnlyOnce(tls, v) (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 // Interpret the [schema.] part of the pragma statement. iDb is the // index of the database this pragma is being applied to in db.aDb[]. iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+448) if !(iDb < 0) { goto __2 } return __2: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 // If the temp database has been explicitly named as part of the // pragma, make sure it is open. if !(iDb == 1 && Xsqlite3OpenTempDatabase(tls, pParse) != 0) { goto __3 } return __3: ; zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 448 /* pId */))) if !!(zLeft != 0) { goto __4 } return __4: ; if !(minusFlag != 0) { goto __5 } zRight = Xsqlite3MPrintf(tls, db, ts+18819, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) __6: ; if (*Token)(unsafe.Pointer(pId2)).Fn > uint32(0) { zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName } else { zDb = uintptr(0) } if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) != 0) { goto __7 } goto pragma_out __7: ; // Send an SQLITE_FCNTL_PRAGMA file-control to the underlying VFS // connection. If it returns SQLITE_OK, then assume that the VFS // handled the pragma and generate a no-op prepared statement. // // IMPLEMENTATION-OF: R-12238-55120 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. // // IMPLEMENTATION-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. *(*uintptr)(unsafe.Pointer(bp + 456)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 456 + 1*8)) = zLeft *(*uintptr)(unsafe.Pointer(bp + 456 + 2*8)) = zRight *(*uintptr)(unsafe.Pointer(bp + 456 + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+456) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 456)), libc.UintptrFromInt32(-1)) returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 456))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } if !(*(*uintptr)(unsafe.Pointer(bp + 456)) != 0) { goto __10 } Xsqlite3ErrorMsg(tls, pParse, ts+4444, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 456)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 456))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ (*Parse)(unsafe.Pointer(pParse)).Frc = rc goto pragma_out __9: ; // Locate the pragma in the lookup table pPragma = pragmaLocate(tls, zLeft) if !(pPragma == uintptr(0)) { goto __11 } // IMP: R-43042-22504 No error messages are generated if an // unknown pragma is issued. goto pragma_out __11: ; // Make sure the database schema is loaded if the pragma requires that if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NeedSchema != 0) { goto __12 } if !(Xsqlite3ReadSchema(tls, pParse) != 0) { goto __13 } goto pragma_out __13: ; __12: ; // Register the result column names for pragmas that return results if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns == 0 && (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 == 0 || zRight == uintptr(0))) { goto __14 } setPragmaResultColumnNames(tls, v, pPragma) __14: ; // Jump to the appropriate pragma handler switch int32((*PragmaName)(unsafe.Pointer(pPragma)).FePragTyp) { // PRAGMA [schema.]default_cache_size // PRAGMA [schema.]default_cache_size=N // // The first form reports the current persistent setting for the // page cache size. The value returned is the maximum number of // pages in the page cache. The second form sets both the current // page cache size value and the persistent page cache size value // stored in the database file. // // Older versions of SQLite would set the default cache size to a // negative number to indicate synchronous=OFF. These days, synchronous // is always on by default regardless of the sign of the default cache // size. But continue to take the absolute value of the default cache // size of historical compatibility. case PragTyp_DEFAULT_CACHE_SIZE: goto __16 // PRAGMA [schema.]page_size // PRAGMA [schema.]page_size=N // // The first form reports the current setting for the // database page size in bytes. The second form sets the // database page size value. The value can only be set if // the database has not yet been created. case PragTyp_PAGE_SIZE: goto __17 // PRAGMA [schema.]secure_delete // PRAGMA [schema.]secure_delete=ON/OFF/FAST // // The first form reports the current setting for the // secure_delete flag. The second form changes the secure_delete // flag setting and reports the new value. case PragTyp_SECURE_DELETE: goto __18 // PRAGMA [schema.]max_page_count // PRAGMA [schema.]max_page_count=N // // The first form reports the current setting for the // maximum number of pages in the database file. The // second form attempts to change this setting. Both // forms return the current setting. // // The absolute value of N is used. This is undocumented and might // change. The only purpose is to provide an easy way to test // the sqlite3AbsInt32() function. // // PRAGMA [schema.]page_count // // Return the number of pages in the specified database. case PragTyp_PAGE_COUNT: goto __19 // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) case PragTyp_LOCKING_MODE: goto __20 // PRAGMA [schema.]journal_mode // PRAGMA [schema.]journal_mode = // (delete|persist|off|truncate|memory|wal|off) case PragTyp_JOURNAL_MODE: goto __21 // PRAGMA [schema.]journal_size_limit // PRAGMA [schema.]journal_size_limit=N // // Get or set the size limit on rollback journal files. case PragTyp_JOURNAL_SIZE_LIMIT: goto __22 // PRAGMA [schema.]auto_vacuum // PRAGMA [schema.]auto_vacuum=N // // Get or set the value of the database 'auto-vacuum' parameter. // The value is one of: 0 NONE 1 FULL 2 INCREMENTAL case PragTyp_AUTO_VACUUM: goto __23 // PRAGMA [schema.]incremental_vacuum(N) // // Do N steps of incremental vacuuming on a database. case PragTyp_INCREMENTAL_VACUUM: goto __24 // PRAGMA [schema.]cache_size // PRAGMA [schema.]cache_size=N // // The first form reports the current local setting for the // page cache size. The second form sets the local // page cache size value. If N is positive then that is the // number of pages in the cache. If N is negative, then the // number of pages is adjusted so that the cache uses -N kibibytes // of memory. case PragTyp_CACHE_SIZE: goto __25 // PRAGMA [schema.]cache_spill // PRAGMA cache_spill=BOOLEAN // PRAGMA [schema.]cache_spill=N // // The first form reports the current local setting for the // page cache spill size. The second form turns cache spill on // or off. When turnning cache spill on, the size is set to the // current cache_size. The third form sets a spill size that // may be different form the cache size. // If N is positive then that is the // number of pages in the cache. If N is negative, then the // number of pages is adjusted so that the cache uses -N kibibytes // of memory. // // If the number of cache_spill pages is less then the number of // cache_size pages, no spilling occurs until the page count exceeds // the number of cache_size pages. // // The cache_spill=BOOLEAN setting applies to all attached schemas, // not just the schema specified. case PragTyp_CACHE_SPILL: goto __26 // PRAGMA [schema.]mmap_size(N) // // Used to set mapping size limit. The mapping size limit is // used to limit the aggregate size of all memory mapped regions of the // database file. If this parameter is set to zero, then memory mapping // is not used at all. If N is negative, then the default memory map // limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set. // The parameter N is measured in bytes. // // This value is advisory. The underlying VFS is free to memory map // as little or as much as it wants. Except, if N is set to 0 then the // upper layers will never invoke the xFetch interfaces to the VFS. case PragTyp_MMAP_SIZE: goto __27 // PRAGMA temp_store // PRAGMA temp_store = "default"|"memory"|"file" // // Return or set the local value of the temp_store flag. Changing // the local value does not make changes to the disk file and the default // value will be restored the next time the database is opened. // // Note that it is possible for the library compile-time options to // override this setting case PragTyp_TEMP_STORE: goto __28 // PRAGMA temp_store_directory // PRAGMA temp_store_directory = ""|"directory_name" // // Return or set the local value of the temp_store_directory flag. Changing // the value sets a specific directory to be used for temporary files. // Setting to a null string reverts to the default temporary directory search. // If temporary directory is changed, then invalidateTempStorage. // case PragTyp_TEMP_STORE_DIRECTORY: goto __29 // PRAGMA data_store_directory // PRAGMA data_store_directory = ""|"directory_name" // // Return or set the local value of the data_store_directory flag. Changing // the value sets a specific directory to be used for database files that // were specified with a relative pathname. Setting to a null string reverts // to the default database directory, which for database files specified with // a relative path will probably be based on the current directory for the // process. Database file specified with an absolute path are not impacted // by this setting, regardless of its value. // case PragTyp_DATA_STORE_DIRECTORY: goto __30 // PRAGMA [schema.]synchronous // PRAGMA [schema.]synchronous=OFF|ON|NORMAL|FULL|EXTRA // // Return or set the local value of the synchronous flag. Changing // the local value does not make changes to the disk file and the // default value will be restored the next time the database is // opened. case PragTyp_SYNCHRONOUS: goto __31 case PragTyp_FLAG: goto __32 // PRAGMA table_info(<table>) // // Return a single row for each column of the named table. The columns of // the returned data set are: // // cid: Column id (numbered from left to right, starting at 0) // name: Column name // type: Column declaration type. // notnull: True if 'NOT NULL' is part of column declaration // dflt_value: The default value for the column, if any. // pk: Non-zero for PK fields. case PragTyp_TABLE_INFO: goto __33 // PRAGMA table_list // // Return a single row for each table, virtual table, or view in the // entire schema. // // schema: Name of attached database hold this table // name: Name of the table itself // type: "table", "view", "virtual", "shadow" // ncol: Number of columns // wr: True for a WITHOUT ROWID table // strict: True for a STRICT table case PragTyp_TABLE_LIST: goto __34 case PragTyp_INDEX_INFO: goto __35 case PragTyp_INDEX_LIST: goto __36 case PragTyp_DATABASE_LIST: goto __37 case PragTyp_COLLATION_LIST: goto __38 case PragTyp_FUNCTION_LIST: goto __39 case PragTyp_MODULE_LIST: goto __40 case PragTyp_PRAGMA_LIST: goto __41 case PragTyp_FOREIGN_KEY_LIST: goto __42 case PragTyp_FOREIGN_KEY_CHECK: goto __43 // Reinstall the LIKE and GLOB functions. The variant of LIKE // used will be case sensitive or not depending on the RHS. case PragTyp_CASE_SENSITIVE_LIKE: goto __44 // PRAGMA integrity_check // PRAGMA integrity_check(N) // PRAGMA quick_check // PRAGMA quick_check(N) // // Verify the integrity of the database. // // The "quick_check" is reduced version of // integrity_check designed to detect most database corruption // without the overhead of cross-checking indexes. Quick_check // is linear time wherease integrity_check is O(NlogN). // // The maximum nubmer of errors is 100 by default. A different default // can be specified using a numeric parameter N. // // Or, the parameter N can be the name of a table. In that case, only // the one table named is verified. The freelist is only verified if // the named table is "sqlite_schema" (or one of its aliases). // // All schemas are checked by default. To check just a single // schema, use the form: // // PRAGMA schema.integrity_check; case PragTyp_INTEGRITY_CHECK: goto __45 // PRAGMA encoding // PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be" // // In its first form, this pragma returns the encoding of the main // database. If the database is not initialized, it is initialized now. // // The second form of this pragma is a no-op if the main database file // has not already been initialized. In this case it sets the default // encoding that will be used for the main database file if a new file // is created. If an existing main database file is opened, then the // default text encoding for the existing database is used. // // In all cases new databases created using the ATTACH command are // created to use the same default text encoding as the main database. If // the main database has not been initialized and/or created when ATTACH // is executed, this is done before the ATTACH operation. // // In the second form this pragma sets the text encoding to be used in // new database files created using this database handle. It is only // useful if invoked immediately after the main database i case PragTyp_ENCODING: goto __46 // PRAGMA [schema.]schema_version // PRAGMA [schema.]schema_version = <integer> // // PRAGMA [schema.]user_version // PRAGMA [schema.]user_version = <integer> // // PRAGMA [schema.]freelist_count // // PRAGMA [schema.]data_version // // PRAGMA [schema.]application_id // PRAGMA [schema.]application_id = <integer> // // The pragma's schema_version and user_version are used to set or get // the value of the schema-version and user-version, respectively. Both // the schema-version and the user-version are 32-bit signed integers // stored in the database header. // // The schema-cookie is usually only manipulated internally by SQLite. It // is incremented by SQLite whenever the database schema is modified (by // creating or dropping a table or index). The schema version is used by // SQLite each time a query is executed to ensure that the internal cache // of the schema used when compiling the SQL query matches the schema of // the database against which the compiled query is actually executed. // Subverting this mechanism by using "PRAGMA schema_version" to modify // the schema-version is potentially dangerous and may lead to program // crashes or database corruption. Use with caution! // // The user-version is not used internally by SQLite. It may be used by // applications for any purpose. case PragTyp_HEADER_VALUE: goto __47 // PRAGMA compile_options // // Return the names of all compile-time options used in this build, // one option per row. case PragTyp_COMPILE_OPTIONS: goto __48 // PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate // // Checkpoint the database. case PragTyp_WAL_CHECKPOINT: goto __49 // PRAGMA wal_autocheckpoint // PRAGMA wal_autocheckpoint = N // // Configure a database connection to automatically checkpoint a database // after accumulating N frames in the log. Or query for the current value // of N. case PragTyp_WAL_AUTOCHECKPOINT: goto __50 // PRAGMA shrink_memory // // IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database // connection on which it is invoked to free up as much memory as it // can, by calling sqlite3_db_release_memory(). case PragTyp_SHRINK_MEMORY: goto __51 // PRAGMA optimize // PRAGMA optimize(MASK) // PRAGMA schema.optimize // PRAGMA schema.optimize(MASK) // // Attempt to optimize the database. All schemas are optimized in the first // two forms, and only the specified schema is optimized in the latter two. // // The details of optimizations performed by this pragma are expected // to change and improve over time. Applications should anticipate that // this pragma will perform new optimizations in future releases. // // The optional argument is a bitmask of optimizations to perform: // // 0x0001 Debugging mode. Do not actually perform any optimizations // but instead return one line of text for each optimization // that would have been done. Off by default. // // 0x0002 Run ANALYZE on tables that might benefit. On by default. // See below for additional information. // // 0x0004 (Not yet implemented) Record usage and performance // information from the current session in the // database file so that it will be available to "optimize" // pragmas run by future database connections. // // 0x0008 (Not yet implemented) Create indexes that might have // been helpful to recent queries // // The default MASK is and always shall be 0xfffe. 0xfffe means perform all // of the optimizations listed above except Debug Mode, including new // optimizations that have not yet been invented. If new optimizations are // ever added that should be off by default, those off-by-default // optimizations will have bitmasks of 0x10000 or larger. // // DETERMINATION OF WHEN TO RUN ANALYZE // // In the current implementation, a table is analyzed if only if all of // the following are true: // // (1) MASK bit 0x02 is set. // // (2) The query planner used sqlite_stat1-style statistics for one or // more indexes of the table at some point during the lifetime of // the current connection. // // (3) One or more indexes of the table are currently unanalyzed OR // the number of rows in the table has increased by 25 times or more // since the last time ANALYZE was run. // // The rules for when tables are analyzed are likely to change in // future releases. case PragTyp_OPTIMIZE: goto __52 // PRAGMA busy_timeout // PRAGMA busy_timeout = N // // Call sqlite3_busy_timeout(db, N). Return the current timeout value // if one is set. If no busy handler or a different busy handler is set // then 0 is returned. Setting the busy_timeout to 0 or negative // disables the timeout. /*case PragTyp_BUSY_TIMEOUT*/ default: goto __53 // PRAGMA soft_heap_limit // PRAGMA soft_heap_limit = N // // IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the // sqlite3_soft_heap_limit64() interface with the argument N, if N is // specified and is a non-negative integer. // IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always // returns the same integer that would be returned by the // sqlite3_soft_heap_limit64(-1) C-language function. case PragTyp_SOFT_HEAP_LIMIT: goto __54 // PRAGMA hard_heap_limit // PRAGMA hard_heap_limit = N // // Invoke sqlite3_hard_heap_limit64() to query or set the hard heap // limit. The hard heap limit can be activated or lowered by this // pragma, but not raised or deactivated. Only the // sqlite3_hard_heap_limit64() C-language API can raise or deactivate // the hard heap limit. This allows an application to set a heap limit // constraint that cannot be relaxed by an untrusted SQL script. case PragTyp_HARD_HEAP_LIMIT: goto __55 // PRAGMA threads // PRAGMA threads = N // // Configure the maximum number of worker threads. Return the new // maximum, which might be less than requested. case PragTyp_THREADS: goto __56 // PRAGMA analysis_limit // PRAGMA analysis_limit = N // // Configure the maximum number of rows that ANALYZE will examine // in each index that it looks at. Return the new limit. case PragTyp_ANALYSIS_LIMIT: goto __57 } goto __15 // PRAGMA [schema.]default_cache_size // PRAGMA [schema.]default_cache_size=N // // The first form reports the current persistent setting for the // page cache size. The value returned is the maximum number of // pages in the page cache. The second form sets both the current // page cache size value and the persistent page cache size value // stored in the database file. // // Older versions of SQLite would set the default cache size to a // negative number to indicate synchronous=OFF. These days, synchronous // is always on by default regardless of the sign of the default cache // size. But continue to take the absolute value of the default cache // size of historical compatibility. __16: Xsqlite3VdbeUsesBtree(tls, v, iDb) if !!(zRight != 0) { goto __58 } *(*int32)(unsafe.Pointer(pParse + 56)) += 2 aOp = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(getCacheSize))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&getCacheSize)), iLn3) if !(0 != 0) { goto __60 } goto __15 __60: ; (*VdbeOp)(unsafe.Pointer(aOp)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp + 6*24)).Fp1 = -2000 goto __59 __58: size = Xsqlite3AbsInt32(tls, Xsqlite3Atoi(tls, zRight)) Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) Xsqlite3VdbeAddOp3(tls, v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, size) (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) __59: ; goto __15 // PRAGMA [schema.]page_size // PRAGMA [schema.]page_size=N // // The first form reports the current setting for the // database page size in bytes. The second form sets the // database page size value. The value can only be set if // the database has not yet been created. __17: pBt = (*Db)(unsafe.Pointer(pDb)).FpBt if !!(zRight != 0) { goto __61 } if pBt != 0 { size1 = Xsqlite3BtreeGetPageSize(tls, pBt) } else { size1 = 0 } returnSingleInt(tls, v, int64(size1)) goto __62 __61: // Malloc may fail when setting the page-size, as there is an internal // buffer that the pager module resizes using sqlite3_realloc(). (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize = Xsqlite3Atoi(tls, zRight) if !(SQLITE_NOMEM == Xsqlite3BtreeSetPageSize(tls, pBt, (*Sqlite3)(unsafe.Pointer(db)).FnextPagesize, 0, 0)) { goto __63 } Xsqlite3OomFault(tls, db) __63: ; __62: ; goto __15 // PRAGMA [schema.]secure_delete // PRAGMA [schema.]secure_delete=ON/OFF/FAST // // The first form reports the current setting for the // secure_delete flag. The second form changes the secure_delete // flag setting and reports the new value. __18: pBt1 = (*Db)(unsafe.Pointer(pDb)).FpBt b = -1 if !(zRight != 0) { goto __64 } if !(Xsqlite3_stricmp(tls, zRight, ts+18823) == 0) { goto __65 } b = 2 goto __66 __65: b = int32(Xsqlite3GetBoolean(tls, zRight, uint8(0))) __66: ; __64: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && b >= 0) { goto __67 } ii = 0 __68: if !(ii < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __70 } Xsqlite3BtreeSecureDelete(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii)*32)).FpBt, b) goto __69 __69: ii++ goto __68 goto __70 __70: ; __67: ; b = Xsqlite3BtreeSecureDelete(tls, pBt1, b) returnSingleInt(tls, v, int64(b)) goto __15 // PRAGMA [schema.]max_page_count // PRAGMA [schema.]max_page_count=N // // The first form reports the current setting for the // maximum number of pages in the database file. The // second form attempts to change this setting. Both // forms return the current setting. // // The absolute value of N is used. This is undocumented and might // change. The only purpose is to provide an easy way to test // the sqlite3AbsInt32() function. // // PRAGMA [schema.]page_count // // Return the number of pages in the specified database. __19: *(*I64)(unsafe.Pointer(bp + 488 /* x */)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'p') { goto __71 } Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __72 __71: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+488) == 0) { goto __73 } if !(*(*I64)(unsafe.Pointer(bp + 488)) < int64(0)) { goto __75 } *(*I64)(unsafe.Pointer(bp + 488 /* x */)) = int64(0) goto __76 __75: if !(*(*I64)(unsafe.Pointer(bp + 488)) > int64(0xfffffffe)) { goto __77 } *(*I64)(unsafe.Pointer(bp + 488 /* x */)) = int64(0xfffffffe) __77: ; __76: ; goto __74 __73: *(*I64)(unsafe.Pointer(bp + 488 /* x */)) = int64(0) __74: ; Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 488 /* x */)))) __72: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) goto __15 // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: zRet = ts + 18614 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { goto __78 } // Simple "PRAGMA locking_mode;" statement. This is a query for // the current default locking mode (which may be different to // the locking-mode of the main database). eMode = int32((*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode) goto __79 __78: if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __80 } ii1 = 2 __81: if !(ii1 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __83 } pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii1)*32)).FpBt) Xsqlite3PagerLockingMode(tls, pPager, eMode) goto __82 __82: ii1++ goto __81 goto __83 __83: ; (*Sqlite3)(unsafe.Pointer(db)).FdfltLockMode = U8(eMode) __80: ; pPager = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) eMode = Xsqlite3PagerLockingMode(tls, pPager, eMode) __79: ; if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __84 } zRet = ts + 4968 /* "exclusive" */ __84: ; returnSingleText(tls, v, zRet) goto __15 // PRAGMA [schema.]journal_mode // PRAGMA [schema.]journal_mode = // (delete|persist|off|truncate|memory|wal|off) __21: // Loop counter if !(zRight == uintptr(0)) { goto __85 } // If there is no "=MODE" part of the pragma, do a query for the // current mode eMode1 = -1 goto __86 __85: n = Xsqlite3Strlen30(tls, zRight) eMode1 = 0 __87: if !(libc.AssignUintptr(&zMode, Xsqlite3JournalModename(tls, eMode1)) != uintptr(0)) { goto __89 } if !(Xsqlite3_strnicmp(tls, zRight, zMode, n) == 0) { goto __90 } goto __89 __90: ; goto __88 __88: eMode1++ goto __87 goto __89 __89: ; if !!(zMode != 0) { goto __91 } // If the "=MODE" part does not match any known journal mode, // then do a query eMode1 = -1 __91: ; if !(eMode1 == PAGER_JOURNALMODE_OFF && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0)) { goto __92 } // Do not allow journal-mode "OFF" in defensive since the database // can become corrupted using ordinary SQL when the journal is off eMode1 = -1 __92: ; __86: ; if !(eMode1 == -1 && (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __93 } // Convert "PRAGMA journal_mode" into "PRAGMA main.journal_mode" iDb = 0 (*Token)(unsafe.Pointer(pId2)).Fn = uint32(1) __93: ; ii2 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 __94: if !(ii2 >= 0) { goto __96 } if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii2)*32)).FpBt != 0 && (ii2 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __97 } Xsqlite3VdbeUsesBtree(tls, v, ii2) Xsqlite3VdbeAddOp3(tls, v, OP_JournalMode, ii2, 1, eMode1) __97: ; goto __95 __95: ii2-- goto __94 goto __96 __96: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) goto __15 // PRAGMA [schema.]journal_size_limit // PRAGMA [schema.]journal_size_limit=N // // Get or set the size limit on rollback journal files. __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) *(*I64)(unsafe.Pointer(bp + 496 /* iLimit */)) = int64(-2) if !(zRight != 0) { goto __98 } Xsqlite3DecOrHexToI64(tls, zRight, bp+496) if !(*(*I64)(unsafe.Pointer(bp + 496)) < int64(-1)) { goto __99 } *(*I64)(unsafe.Pointer(bp + 496 /* iLimit */)) = int64(-1) __99: ; __98: ; *(*I64)(unsafe.Pointer(bp + 496 /* iLimit */)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 496 /* iLimit */))) returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 496 /* iLimit */))) goto __15 // PRAGMA [schema.]auto_vacuum // PRAGMA [schema.]auto_vacuum=N // // Get or set the value of the database 'auto-vacuum' parameter. // The value is one of: 0 NONE 1 FULL 2 INCREMENTAL __23: pBt2 = (*Db)(unsafe.Pointer(pDb)).FpBt if !!(zRight != 0) { goto __100 } returnSingleInt(tls, v, int64(Xsqlite3BtreeGetAutoVacuum(tls, pBt2))) goto __101 __100: eAuto = getAutoVacuum(tls, zRight) (*Sqlite3)(unsafe.Pointer(db)).FnextAutovac = int8(U8(eAuto)) // Call SetAutoVacuum() to set initialize the internal auto and // incr-vacuum flags. This is required in case this connection // creates the database file. It is important that it is created // as an auto-vacuum capable db. rc = Xsqlite3BtreeSetAutoVacuum(tls, pBt2, eAuto) if !(rc == SQLITE_OK && (eAuto == 1 || eAuto == 2)) { goto __102 } iAddr = Xsqlite3VdbeCurrentAddr(tls, v) aOp1 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setMeta6))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setMeta6)), iLn4) if !(0 != 0) { goto __103 } goto __15 __103: ; (*VdbeOp)(unsafe.Pointer(aOp1)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp1 + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp1 + 2*24)).Fp2 = iAddr + 4 (*VdbeOp)(unsafe.Pointer(aOp1 + 4*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp1 + 4*24)).Fp3 = eAuto - 1 Xsqlite3VdbeUsesBtree(tls, v, iDb) __102: ; __101: ; goto __15 // PRAGMA [schema.]incremental_vacuum(N) // // Do N steps of incremental vacuuming on a database. __24: if !(zRight == uintptr(0) || !(Xsqlite3GetInt32(tls, zRight, bp+504) != 0) || *(*int32)(unsafe.Pointer(bp + 504)) <= 0) { goto __104 } *(*int32)(unsafe.Pointer(bp + 504 /* iLimit1 */)) = 0x7fffffff __104: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 504 /* iLimit1 */)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) Xsqlite3VdbeAddOp2(tls, v, OP_IfPos, 1, addr) Xsqlite3VdbeJumpHere(tls, v, addr) goto __15 // PRAGMA [schema.]cache_size // PRAGMA [schema.]cache_size=N // // The first form reports the current local setting for the // page cache size. The second form sets the local // page cache size value. If N is positive then that is the // number of pages in the cache. If N is negative, then the // number of pages is adjusted so that the cache uses -N kibibytes // of memory. __25: ; if !!(zRight != 0) { goto __105 } returnSingleInt(tls, v, int64((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size)) goto __106 __105: size2 = Xsqlite3Atoi(tls, zRight) (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size2 Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) __106: ; goto __15 // PRAGMA [schema.]cache_spill // PRAGMA cache_spill=BOOLEAN // PRAGMA [schema.]cache_spill=N // // The first form reports the current local setting for the // page cache spill size. The second form turns cache spill on // or off. When turnning cache spill on, the size is set to the // current cache_size. The third form sets a spill size that // may be different form the cache size. // If N is positive then that is the // number of pages in the cache. If N is negative, then the // number of pages is adjusted so that the cache uses -N kibibytes // of memory. // // If the number of cache_spill pages is less then the number of // cache_size pages, no spilling occurs until the page count exceeds // the number of cache_size pages. // // The cache_spill=BOOLEAN setting applies to all attached schemas, // not just the schema specified. __26: ; if !!(zRight != 0) { goto __107 } returnSingleInt(tls, v, func() int64 { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_CacheSpill) == uint64(0) { return int64(0) } return int64(Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, 0)) }()) goto __108 __107: *(*int32)(unsafe.Pointer(bp + 508 /* size3 */)) = 1 if !(Xsqlite3GetInt32(tls, zRight, bp+508) != 0) { goto __109 } Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 508 /* size3 */))) __109: ; if !(Xsqlite3GetBoolean(tls, zRight, uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 508)) != 0))) != 0) { goto __110 } *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_CacheSpill) goto __111 __110: *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_CacheSpill)) __111: ; setAllPagerFlags(tls, db) __108: ; goto __15 // PRAGMA [schema.]mmap_size(N) // // Used to set mapping size limit. The mapping size limit is // used to limit the aggregate size of all memory mapped regions of the // database file. If this parameter is set to zero, then memory mapping // is not used at all. If N is negative, then the default memory map // limit determined by sqlite3_config(SQLITE_CONFIG_MMAP_SIZE) is set. // The parameter N is measured in bytes. // // This value is advisory. The underlying VFS is free to memory map // as little or as much as it wants. Except, if N is set to 0 then the // upper layers will never invoke the xFetch interfaces to the VFS. __27: ; if !(zRight != 0) { goto __112 } Xsqlite3DecOrHexToI64(tls, zRight, bp+512) if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 512)) < int64(0)) { goto __113 } *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* sz */)) = Xsqlite3Config.FszMmap __113: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __114 } (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* sz */)) __114: ; ii3 = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 __115: if !(ii3 >= 0) { goto __117 } if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0 && (ii3 == iDb || (*Token)(unsafe.Pointer(pId2)).Fn == uint32(0))) { goto __118 } Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* sz */))) __118: ; goto __116 __116: ii3-- goto __115 goto __117 __117: ; __112: ; *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* sz */)) = int64(-1) rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+512) if !(rc == SQLITE_OK) { goto __119 } returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* sz */))) goto __120 __119: if !(rc != SQLITE_NOTFOUND) { goto __121 } (*Parse)(unsafe.Pointer(pParse)).FnErr++ (*Parse)(unsafe.Pointer(pParse)).Frc = rc __121: ; __120: ; goto __15 // PRAGMA temp_store // PRAGMA temp_store = "default"|"memory"|"file" // // Return or set the local value of the temp_store flag. Changing // the local value does not make changes to the disk file and the default // value will be restored the next time the database is opened. // // Note that it is possible for the library compile-time options to // override this setting __28: if !!(zRight != 0) { goto __122 } returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store)) goto __123 __122: changeTempStorage(tls, pParse, zRight) __123: ; goto __15 // PRAGMA temp_store_directory // PRAGMA temp_store_directory = ""|"directory_name" // // Return or set the local value of the temp_store_directory flag. Changing // the value sets a specific directory to be used for temporary files. // Setting to a null string reverts to the default temporary directory search. // If temporary directory is changed, then invalidateTempStorage. // __29: if !!(zRight != 0) { goto __124 } returnSingleText(tls, v, Xsqlite3_temp_directory) goto __125 __124: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __126 } rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+520) if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 520)) == 0) { goto __127 } Xsqlite3ErrorMsg(tls, pParse, ts+18828, 0) goto pragma_out __127: ; __126: ; if !(SQLITE_TEMP_STORE == 0 || SQLITE_TEMP_STORE == 1 && int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) <= 1 || SQLITE_TEMP_STORE == 2 && int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 1) { goto __128 } invalidateTempStorage(tls, pParse) __128: ; Xsqlite3_free(tls, Xsqlite3_temp_directory) if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __129 } Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp+16, zRight)) goto __130 __129: Xsqlite3_temp_directory = uintptr(0) __130: ; __125: ; goto __15 // PRAGMA data_store_directory // PRAGMA data_store_directory = ""|"directory_name" // // Return or set the local value of the data_store_directory flag. Changing // the value sets a specific directory to be used for database files that // were specified with a relative pathname. Setting to a null string reverts // to the default database directory, which for database files specified with // a relative path will probably be based on the current directory for the // process. Database file specified with an absolute path are not impacted // by this setting, regardless of its value. // __30: if !!(zRight != 0) { goto __131 } returnSingleText(tls, v, Xsqlite3_data_directory) goto __132 __131: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __133 } rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+524) if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 524)) == 0) { goto __134 } Xsqlite3ErrorMsg(tls, pParse, ts+18828, 0) goto pragma_out __134: ; __133: ; Xsqlite3_free(tls, Xsqlite3_data_directory) if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __135 } Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp+24, zRight)) goto __136 __135: Xsqlite3_data_directory = uintptr(0) __136: ; __132: ; goto __15 // PRAGMA [schema.]synchronous // PRAGMA [schema.]synchronous=OFF|ON|NORMAL|FULL|EXTRA // // Return or set the local value of the synchronous flag. Changing // the local value does not make changes to the disk file and the // default value will be restored the next time the database is // opened. __31: if !!(zRight != 0) { goto __137 } returnSingleInt(tls, v, int64(int32((*Db)(unsafe.Pointer(pDb)).Fsafety_level)-1)) goto __138 __137: if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __139 } Xsqlite3ErrorMsg(tls, pParse, ts+18853, 0) goto __140 __139: if !(iDb != 1) { goto __141 } iLevel = (int32(getSafetyLevel(tls, zRight, 0, uint8(1))) + 1) & PAGER_SYNCHRONOUS_MASK if !(iLevel == 0) { goto __142 } iLevel = 1 __142: ; (*Db)(unsafe.Pointer(pDb)).Fsafety_level = U8(iLevel) (*Db)(unsafe.Pointer(pDb)).FbSyncSet = U8(1) setAllPagerFlags(tls, db) __141: ; __140: ; __138: ; goto __15 __32: if !(zRight == uintptr(0)) { goto __143 } setPragmaResultColumnNames(tls, v, pPragma) returnSingleInt(tls, v, int64(libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&(*PragmaName)(unsafe.Pointer(pPragma)).FiArg != uint64(0)))) goto __144 __143: mask = (*PragmaName)(unsafe.Pointer(pPragma)).FiArg // Mask of bits to set or clear. if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) == 0) { goto __145 } // Foreign key support may not be enabled or disabled while not // in auto-commit mode. mask = mask & libc.Uint64FromInt32(libc.CplInt32(SQLITE_ForeignKeys)) __145: ; if !(Xsqlite3GetBoolean(tls, zRight, uint8(0)) != 0) { goto __146 } *(*U64)(unsafe.Pointer(db + 48)) |= mask goto __147 __146: *(*U64)(unsafe.Pointer(db + 48)) &= ^mask if !(mask == uint64(SQLITE_DeferFKs)) { goto __148 } (*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons = int64(0) __148: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && Xsqlite3_stricmp(tls, zRight, ts+18906) == 0) { goto __149 } // IMP: R-60817-01178 If the argument is "RESET" then schema // writing is disabled (as with "PRAGMA writable_schema=OFF") and, // in addition, the schema is reloaded. Xsqlite3ResetAllSchemasOfConnection(tls, db) __149: ; __147: ; // Many of the flag-pragmas modify the code generated by the SQL // compiler (eg. count_changes). So add an opcode to expire all // compiled SQL statements after modifying a pragma value. Xsqlite3VdbeAddOp0(tls, v, OP_Expire) setAllPagerFlags(tls, db) __144: ; goto __15 // PRAGMA table_info(<table>) // // Return a single row for each column of the named table. The columns of // the returned data set are: // // cid: Column id (numbered from left to right, starting at 0) // name: Column name // type: Column declaration type. // notnull: True if 'NOT NULL' is part of column declaration // dflt_value: The default value for the column, if any. // pk: Non-zero for PK fields. __33: if !(zRight != 0) { goto __150 } Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) pTab = Xsqlite3LocateTable(tls, pParse, uint32(LOCATE_NOERR), zRight, zDb) if !(pTab != 0) { goto __151 } nHidden = 0 pPk = Xsqlite3PrimaryKeyIndex(tls, pTab) (*Parse)(unsafe.Pointer(pParse)).FnMem = 7 Xsqlite3ViewGetColumnNames(tls, pParse, pTab) i = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol __152: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __154 } isHidden = 0 if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_NOINSERT != 0) { goto __155 } if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg == uint64(0)) { goto __156 } nHidden++ goto __153 __156: ; if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_VIRTUAL != 0) { goto __157 } isHidden = 2 // GENERATED ALWAYS AS ... VIRTUAL goto __158 __157: if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0) { goto __159 } isHidden = 3 // GENERATED ALWAYS AS ... STORED goto __160 __159: ; isHidden = 1 // HIDDEN __160: ; __158: ; __155: ; if !(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY == 0) { goto __161 } k = 0 goto __162 __161: if !(pPk == uintptr(0)) { goto __163 } k = 1 goto __164 __163: k = 1 __165: if !(k <= int32((*Table)(unsafe.Pointer(pTab)).FnCol) && int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pPk)).FaiColumn + uintptr(k-1)*2))) != i) { goto __167 } goto __166 __166: k++ goto __165 goto __167 __167: ; __164: ; __162: ; pColExpr = Xsqlite3ColumnExpr(tls, pTab, pCol) Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { return ts + 18912 /* "issisii" */ } return ts + 18920 /* "issisi" */ }(), libc.VaList(bp+32, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1524), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 8))&0xf>>0)) != 0 { return 1 } return 0 }(), func() uintptr { if isHidden >= 2 || pColExpr == uintptr(0) { return uintptr(0) } return *(*uintptr)(unsafe.Pointer(pColExpr + 8)) }(), k, isHidden)) goto __153 __153: i++ pCol += 24 goto __152 goto __154 __154: ; __151: ; __150: ; goto __15 // PRAGMA table_list // // Return a single row for each table, virtual table, or view in the // entire schema. // // schema: Name of attached database hold this table // name: Name of the table itself // type: "table", "view", "virtual", "shadow" // ncol: Number of columns // wr: True for a WITHOUT ROWID table // strict: True for a STRICT table __34: (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) ii4 = 0 __168: if !(ii4 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __170 } if !(zDb != 0 && Xsqlite3_stricmp(tls, zDb, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName) != 0) { goto __171 } goto __169 __171: ; // Ensure that the Table.nCol field is initialized for all views // and virtual tables. Each time we initialize a Table.nCol value // for a table, that can potentially disrupt the hash table, so restart // the initialization scan. pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FpSchema + 8 initNCol = int32((*Hash)(unsafe.Pointer(pHash)).Fcount) __172: if !(libc.PostDecInt32(&initNCol, 1) != 0) { goto __173 } k1 = (*Hash)(unsafe.Pointer(pHash)).Ffirst __174: if !(1 != 0) { goto __176 } if !(k1 == uintptr(0)) { goto __177 } initNCol = 0 goto __176 __177: ; pTab1 = (*HashElem)(unsafe.Pointer(k1)).Fdata if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __178 } zSql = Xsqlite3MPrintf(tls, db, ts+18927, libc.VaList(bp+88, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __179 } *(*uintptr)(unsafe.Pointer(bp + 528 /* pDummy */)) = uintptr(0) Xsqlite3_prepare(tls, db, zSql, -1, bp+528, uintptr(0)) Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 528 /* pDummy */))) Xsqlite3DbFree(tls, db, zSql) __179: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __180 } Xsqlite3ErrorMsg(tls, (*Sqlite3)(unsafe.Pointer(db)).FpParse, ts+1460, 0) (*Parse)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpParse)).Frc = SQLITE_NOMEM __180: ; pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FpSchema + 8 goto __176 __178: ; goto __175 __175: k1 = (*HashElem)(unsafe.Pointer(k1)).Fnext goto __174 goto __176 __176: ; goto __172 __173: ; k1 = (*Hash)(unsafe.Pointer(pHash)).Ffirst __181: if !(k1 != 0) { goto __183 } pTab2 = (*HashElem)(unsafe.Pointer(k1)).Fdata if !(zRight != 0 && Xsqlite3_stricmp(tls, zRight, (*Table)(unsafe.Pointer(pTab2)).FzName) != 0) { goto __184 } goto __182 __184: ; if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __185 } zType = ts + 11728 /* "view" */ goto __186 __185: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __187 } zType = ts + 14010 /* "virtual" */ goto __188 __187: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __189 } zType = ts + 18943 /* "shadow" */ goto __190 __189: zType = ts + 10113 /* "table" */ __190: ; __188: ; __186: ; Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18950, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*32)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, int32((*Table)(unsafe.Pointer(pTab2)).FnCol), libc.Bool32((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_WithoutRowid) != U32(0)), libc.Bool32((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Strict) != U32(0)))) goto __182 __182: k1 = (*HashElem)(unsafe.Pointer(k1)).Fnext goto __181 goto __183 __183: ; goto __169 __169: ii4++ goto __168 goto __170 __170: ; goto __15 __35: if !(zRight != 0) { goto __191 } pIdx = Xsqlite3FindIndex(tls, db, zRight, zDb) if !(pIdx == uintptr(0)) { goto __192 } // If there is no index named zRight, check to see if there is a // WITHOUT ROWID table named zRight, and if there is, show the // structure of the PRIMARY KEY index for that table. pTab3 = Xsqlite3LocateTable(tls, pParse, uint32(LOCATE_NOERR), zRight, zDb) if !(pTab3 != 0 && !((*Table)(unsafe.Pointer(pTab3)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __193 } pIdx = Xsqlite3PrimaryKeyIndex(tls, pTab3) __193: ; __192: ; if !(pIdx != 0) { goto __194 } iIdxDb = Xsqlite3SchemaToIndex(tls, db, (*Index)(unsafe.Pointer(pIdx)).FpSchema) if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __195 } // PRAGMA index_xinfo (newer version with more rows and columns) mx = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 goto __196 __195: // PRAGMA index_info (legacy version) mx = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 __196: ; pTab3 = (*Index)(unsafe.Pointer(pIdx)).FpTable Xsqlite3CodeVerifySchema(tls, pParse, iIdxDb) i1 = 0 __197: if !(i1 < mx) { goto __199 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18957, libc.VaList(bp+144, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab3)).FaCol + uintptr(cnum)*24)).FzCnName }())) if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __200 } Xsqlite3VdbeMultiLoad(tls, v, 4, ts+18962, libc.VaList(bp+168, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) __200: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, (*Parse)(unsafe.Pointer(pParse)).FnMem) goto __198 __198: i1++ goto __197 goto __199 __199: ; __194: ; __191: ; goto __15 __36: if !(zRight != 0) { goto __201 } pTab4 = Xsqlite3FindTable(tls, db, zRight, zDb) if !(pTab4 != 0) { goto __202 } iTabDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab4)).FpSchema) (*Parse)(unsafe.Pointer(pParse)).FnMem = 5 Xsqlite3CodeVerifySchema(tls, pParse, iTabDb) pIdx1 = (*Table)(unsafe.Pointer(pTab4)).FpIndex i2 = 0 __203: if !(pIdx1 != 0) { goto __205 } *(*[3]uintptr)(unsafe.Pointer(bp + 536 /* azOrigin */)) = [3]uintptr{ts + 18967, ts + 18969, ts + 17420} Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18971, libc.VaList(bp+192, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), *(*uintptr)(unsafe.Pointer(bp + 536 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100))&0x3>>0)))*8)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __204 __204: pIdx1 = (*Index)(unsafe.Pointer(pIdx1)).FpNext i2++ goto __203 goto __205 __205: ; __202: ; __201: ; goto __15 __37: (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 i3 = 0 __206: if !(i3 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __208 } if !((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt == uintptr(0)) { goto __209 } goto __207 __209: ; Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18977, libc.VaList(bp+232, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) goto __207 __207: i3++ goto __206 goto __208 __208: ; goto __15 __38: i4 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 2 p = (*Hash)(unsafe.Pointer(db + 640)).Ffirst __210: if !(p != 0) { goto __212 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18981, libc.VaList(bp+256, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __211 __211: p = (*HashElem)(unsafe.Pointer(p)).Fnext goto __210 goto __212 __212: ; goto __15 __39: showInternFunc = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_InternalFunc) != U32(0)) (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 i5 = 0 __213: if !(i5 < SQLITE_FUNC_HASH_SZ) { goto __215 } p1 = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(i5)*8)) __216: if !(p1 != 0) { goto __218 } pragmaFunclistLine(tls, v, p1, 1, showInternFunc) goto __217 __217: p1 = *(*uintptr)(unsafe.Pointer(p1 + 64)) goto __216 goto __218 __218: ; goto __214 __214: i5++ goto __213 goto __215 __215: ; j = (*Hash)(unsafe.Pointer(db + 616)).Ffirst __219: if !(j != 0) { goto __221 } p1 = (*HashElem)(unsafe.Pointer(j)).Fdata pragmaFunclistLine(tls, v, p1, 0, showInternFunc) goto __220 __220: j = (*HashElem)(unsafe.Pointer(j)).Fnext goto __219 goto __221 __221: ; goto __15 __40: (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 j1 = (*Hash)(unsafe.Pointer(db + 568)).Ffirst __222: if !(j1 != 0) { goto __224 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8767, libc.VaList(bp+272, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __223 __223: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext goto __222 goto __224 __224: ; goto __15 __41: i6 = 0 __225: if !(i6 < int32(uint64(unsafe.Sizeof(aPragmaName))/uint64(unsafe.Sizeof(PragmaName{})))) { goto __227 } Xsqlite3VdbeMultiLoad(tls, v, 1, ts+8767, libc.VaList(bp+280, aPragmaName[i6].FzName)) goto __226 __226: i6++ goto __225 goto __227 __227: ; goto __15 __42: if !(zRight != 0) { goto __228 } pTab5 = Xsqlite3FindTable(tls, db, zRight, zDb) if !(pTab5 != 0 && int32((*Table)(unsafe.Pointer(pTab5)).FeTabType) == TABTYP_NORM) { goto __229 } pFK = *(*uintptr)(unsafe.Pointer(pTab5 + 64 + 8 /* &.pFKey */)) if !(pFK != 0) { goto __230 } iTabDb1 = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab5)).FpSchema) i7 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 8 Xsqlite3CodeVerifySchema(tls, pParse, iTabDb1) __231: if !(pFK != 0) { goto __232 } j2 = 0 __233: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __235 } Xsqlite3VdbeMultiLoad(tls, v, 1, ts+18984, libc.VaList(bp+288, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab5)).FaCol+uintptr((*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FiFrom)*24)).FzCnName, (*sColMap)(unsafe.Pointer(pFK+64+uintptr(j2)*16)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 45))), ts+18993)) goto __234 __234: j2++ goto __233 goto __235 __235: ; i7++ pFK = (*FKey)(unsafe.Pointer(pFK)).FpNextFrom goto __231 __232: ; __230: ; __229: ; __228: ; goto __15 __43: // child to parent column mapping regResult = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += 4 regKey = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regRow = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) k2 = (*Hash)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 8)).Ffirst __236: if !(k2 != 0) { goto __237 } if !(zRight != 0) { goto __238 } pTab6 = Xsqlite3LocateTable(tls, pParse, uint32(0), zRight, zDb) k2 = uintptr(0) goto __239 __238: pTab6 = (*HashElem)(unsafe.Pointer(k2)).Fdata k2 = (*HashElem)(unsafe.Pointer(k2)).Fnext __239: ; if !(pTab6 == uintptr(0) || !(int32((*Table)(unsafe.Pointer(pTab6)).FeTabType) == TABTYP_NORM) || *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8)) == uintptr(0)) { goto __240 } goto __236 __240: ; iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab6)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName Xsqlite3CodeVerifySchema(tls, pParse, iDb) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pTab6)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pTab6)).FzName) if !(int32((*Table)(unsafe.Pointer(pTab6)).FnCol)+regRow > (*Parse)(unsafe.Pointer(pParse)).FnMem) { goto __241 } (*Parse)(unsafe.Pointer(pParse)).FnMem = int32((*Table)(unsafe.Pointer(pTab6)).FnCol) + regRow __241: ; Xsqlite3OpenTable(tls, pParse, 0, iDb, pTab6, OP_OpenRead) Xsqlite3VdbeLoadString(tls, v, regResult, (*Table)(unsafe.Pointer(pTab6)).FzName) i8 = 1 pFK1 = *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8 /* &.pFKey */)) __242: if !(pFK1 != 0) { goto __244 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) if !(pParent == uintptr(0)) { goto __245 } goto __243 __245: ; *(*uintptr)(unsafe.Pointer(bp + 560 /* pIdx2 */)) = uintptr(0) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pParent)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pParent)).FzName) x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, uintptr(0)) if !(x1 == 0) { goto __246 } if !(*(*uintptr)(unsafe.Pointer(bp + 560)) == uintptr(0)) { goto __248 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __249 __248: Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 560 /* pIdx2 */)))).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 560 /* pIdx2 */))) __249: ; goto __247 __246: k2 = uintptr(0) goto __244 __247: ; goto __243 __243: i8++ pFK1 = (*FKey)(unsafe.Pointer(pFK1)).FpNextFrom goto __242 goto __244 __244: ; if !(pFK1 != 0) { goto __250 } goto __237 __250: ; if !((*Parse)(unsafe.Pointer(pParse)).FnTab < i8) { goto __251 } (*Parse)(unsafe.Pointer(pParse)).FnTab = i8 __251: ; addrTop = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, 0) i8 = 1 pFK1 = *(*uintptr)(unsafe.Pointer(pTab6 + 64 + 8 /* &.pFKey */)) __252: if !(pFK1 != 0) { goto __254 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) *(*uintptr)(unsafe.Pointer(bp + 560 /* pIdx2 */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */)) = uintptr(0) if !(pParent != 0) { goto __255 } x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+560, bp+568) __255: ; addrOk = Xsqlite3VdbeMakeLabel(tls, pParse) // Generate code to read the child key values into registers // regRow..regRow+n. If any of the child key values are NULL, this // row cannot cause an FK violation. Jump directly to addrOk in // this case. if !(regRow+(*FKey)(unsafe.Pointer(pFK1)).FnCol > (*Parse)(unsafe.Pointer(pParse)).FnMem) { goto __256 } (*Parse)(unsafe.Pointer(pParse)).FnMem = regRow + (*FKey)(unsafe.Pointer(pFK1)).FnCol __256: ; j3 = 0 __257: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __259 } if *(*uintptr)(unsafe.Pointer(bp + 568)) != 0 { iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer(pFK1 + 64 + uintptr(j3)*16)).FiFrom } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab6, 0, iCol, regRow+j3) Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regRow+j3, addrOk) goto __258 __258: j3++ goto __257 goto __259 __259: ; // Generate code to query the parent index for a matching parent // key. If a match is found, jump to addrOk. if !(*(*uintptr)(unsafe.Pointer(bp + 560)) != 0) { goto __260 } Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, regKey, Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 560 /* pIdx2 */))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regKey, 0) goto __261 __260: if !(pParent != 0) { goto __262 } jmp = Xsqlite3VdbeCurrentAddr(tls, v) + 2 Xsqlite3VdbeAddOp3(tls, v, OP_SeekRowid, i8, jmp, regRow) Xsqlite3VdbeGoto(tls, v, addrOk) __262: ; __261: ; // Generate code to report an FK violation to the caller. if !((*Table)(unsafe.Pointer(pTab6)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __263 } Xsqlite3VdbeAddOp2(tls, v, OP_Rowid, 0, regResult+1) goto __264 __263: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __264: ; Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+18998, libc.VaList(bp+352, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 568 /* aiCols */))) goto __253 __253: i8++ pFK1 = (*FKey)(unsafe.Pointer(pFK1)).FpNextFrom goto __252 goto __254 __254: ; Xsqlite3VdbeAddOp2(tls, v, OP_Next, 0, addrTop+1) Xsqlite3VdbeJumpHere(tls, v, addrTop) goto __236 __237: ; goto __15 // Reinstall the LIKE and GLOB functions. The variant of LIKE // used will be case sensitive or not depending on the RHS. __44: if !(zRight != 0) { goto __265 } Xsqlite3RegisterLikeFunctions(tls, db, int32(Xsqlite3GetBoolean(tls, zRight, uint8(0)))) __265: ; goto __15 // PRAGMA integrity_check // PRAGMA integrity_check(N) // PRAGMA quick_check // PRAGMA quick_check(N) // // Verify the integrity of the database. // // The "quick_check" is reduced version of // integrity_check designed to detect most database corruption // without the overhead of cross-checking indexes. Quick_check // is linear time wherease integrity_check is O(NlogN). // // The maximum nubmer of errors is 100 by default. A different default // can be specified using a numeric parameter N. // // Or, the parameter N can be the name of a table. In that case, only // the one table named is verified. The freelist is only verified if // the named table is "sqlite_schema" (or one of its aliases). // // All schemas are checked by default. To check just a single // schema, use the form: // // PRAGMA schema.integrity_check; __45: pObjTab = uintptr(0) // Check only this one table, if not NULL isQuick = libc.Bool32(int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))]) == 'q') // If the PRAGMA command was of the form "PRAGMA <db>.integrity_check", // then iDb is set to the index of the database identified by <db>. // In this case, the integrity of database iDb only is verified by // the VDBE created below. // // Otherwise, if the command was simply "PRAGMA integrity_check" (or // "PRAGMA quick_check"), then iDb is set to 0. In this case, set iDb // to -1 here, to indicate that the VDBE should verify the integrity // of all attached databases. if !((*Token)(unsafe.Pointer(pId2)).Fz == uintptr(0)) { goto __266 } iDb = -1 __266: ; // Initialize the VDBE program (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 // Set the maximum error count *(*int32)(unsafe.Pointer(bp + 576 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __267 } if !(Xsqlite3GetInt32(tls, zRight, bp+576) != 0) { goto __268 } if !(*(*int32)(unsafe.Pointer(bp + 576)) <= 0) { goto __270 } *(*int32)(unsafe.Pointer(bp + 576 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __270: ; goto __269 __268: pObjTab = Xsqlite3LocateTable(tls, pParse, uint32(0), zRight, func() uintptr { if iDb >= 0 { return (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName } return uintptr(0) }()) __269: ; __267: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576))-1, 1) // reg[1] holds errors left // Do an integrity check on each database file i9 = 0 __271: if !(i9 < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __273 } // Array of root page numbers of all btrees cnt = 0 // Number of entries in aRoot[] mxIdx = 0 // Maximum number of indexes for any table if !(0 != 0 && i9 == 1) { goto __274 } goto __272 __274: ; if !(iDb >= 0 && i9 != iDb) { goto __275 } goto __272 __275: ; Xsqlite3CodeVerifySchema(tls, pParse, i9) // Do an integrity check of the B-Tree // // Begin by finding the root pages numbers // for all tables and indices in the database. pTbls = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FpSchema + 8 cnt = 0 x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst __276: if !(x2 != 0) { goto __278 } pTab7 = (*HashElem)(unsafe.Pointer(x2)).Fdata // Number of indexes on pTab if !(pObjTab != 0 && pObjTab != pTab7) { goto __279 } goto __277 __279: ; if !((*Table)(unsafe.Pointer(pTab7)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __280 } cnt++ __280: ; nIdx = 0 pIdx3 = (*Table)(unsafe.Pointer(pTab7)).FpIndex __281: if !(pIdx3 != 0) { goto __283 } cnt++ goto __282 __282: pIdx3 = (*Index)(unsafe.Pointer(pIdx3)).FpNext nIdx++ goto __281 goto __283 __283: ; if !(nIdx > mxIdx) { goto __284 } mxIdx = nIdx __284: ; goto __277 __277: x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext goto __276 goto __278 __278: ; if !(cnt == 0) { goto __285 } goto __272 __285: ; if !(pObjTab != 0) { goto __286 } cnt++ __286: ; aRoot = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(int32(0)))*uint64(cnt+1)) if !(aRoot == uintptr(0)) { goto __287 } goto __273 __287: ; cnt = 0 if !(pObjTab != 0) { goto __288 } *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = 0 __288: ; x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst __289: if !(x2 != 0) { goto __291 } pTab8 = (*HashElem)(unsafe.Pointer(x2)).Fdata if !(pObjTab != 0 && pObjTab != pTab8) { goto __292 } goto __290 __292: ; if !((*Table)(unsafe.Pointer(pTab8)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { goto __293 } *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = int32((*Table)(unsafe.Pointer(pTab8)).Ftnum) __293: ; pIdx4 = (*Table)(unsafe.Pointer(pTab8)).FpIndex __294: if !(pIdx4 != 0) { goto __296 } *(*int32)(unsafe.Pointer(aRoot + uintptr(libc.PreIncInt32(&cnt, 1))*4)) = int32((*Index)(unsafe.Pointer(pIdx4)).Ftnum) goto __295 __295: pIdx4 = (*Index)(unsafe.Pointer(pIdx4)).FpNext goto __294 goto __296 __296: ; goto __290 __290: x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext goto __289 goto __291 __291: ; *(*int32)(unsafe.Pointer(aRoot)) = cnt // Make sure sufficient number of registers have been allocated (*Parse)(unsafe.Pointer(pParse)).FnMem = func() int32 { if (*Parse)(unsafe.Pointer(pParse)).FnMem > 8+mxIdx { return (*Parse)(unsafe.Pointer(pParse)).FnMem } return 8 + mxIdx }() Xsqlite3ClearTempRegCache(tls, pParse) // Do the b-tree integrity checks Xsqlite3VdbeAddOp4(tls, v, OP_IntegrityCk, 2, cnt, 1, aRoot, -15) Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, Xsqlite3MPrintf(tls, db, ts+19002, libc.VaList(bp+368, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, addr1) // Make sure all the indices are constructed correctly. x2 = (*Hash)(unsafe.Pointer(pTbls)).Ffirst __297: if !(x2 != 0) { goto __299 } pTab9 = (*HashElem)(unsafe.Pointer(x2)).Fdata pPrior = uintptr(0) r1 = -1 if !!(int32((*Table)(unsafe.Pointer(pTab9)).FeTabType) == TABTYP_NORM) { goto __300 } goto __298 __300: ; if !(pObjTab != 0 && pObjTab != pTab9) { goto __301 } goto __298 __301: ; if (*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_WithoutRowid) == U32(0) { pPk1 = uintptr(0) } else { pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) } Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), 1, uintptr(0), bp+580, bp+584) // reg[7] counts the number of entries in the table. // reg[8+i] counts the number of entries in the i-th index Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __302: if !(pIdx5 != 0) { goto __304 } Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 8+j4) // index entries counter goto __303 __303: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ goto __302 goto __304 __304: ; Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 580 /* iDataCur */)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) if !!(isQuick != 0) { goto __305 } // Sanity check on record header decoding Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 580 /* iDataCur */)), int32((*Table)(unsafe.Pointer(pTab9)).FnNVCol)-1, 3) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) __305: ; // Verify that all NOT NULL columns really are NOT NULL. At the // same time verify the type of the content of STRICT tables bStrict = libc.Bool32((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0)) j4 = 0 __306: if !(j4 < int32((*Table)(unsafe.Pointer(pTab9)).FnCol)) { goto __308 } pCol1 = (*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(j4)*24 if !(j4 == int32((*Table)(unsafe.Pointer(pTab9)).FiPKey)) { goto __309 } goto __307 __309: ; if !(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0) == 0 && !(bStrict != 0)) { goto __310 } goto __307 __310: ; if bStrict != 0 { doError = Xsqlite3VdbeMakeLabel(tls, pParse) } else { doError = 0 } Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab9, *(*int32)(unsafe.Pointer(bp + 580 /* iDataCur */)), j4, 3) if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { goto __311 } Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) __311: ; if !(uint32(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf>>0)) != 0) { goto __312 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) zErr = Xsqlite3MPrintf(tls, db, ts+19026, libc.VaList(bp+376, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { goto __313 } Xsqlite3VdbeGoto(tls, v, doError) goto __314 __313: integrityCheckResultRow(tls, v) __314: ; Xsqlite3VdbeJumpHere(tls, v, jmp2) __312: ; if !((*Table)(unsafe.Pointer(pTab9)).FtabFlags&U32(TF_Strict) != U32(0) && int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4) != COLTYPE_ANY) { goto __315 } jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28])) zErr = Xsqlite3MPrintf(tls, db, ts+19046, libc.VaList(bp+392, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 8))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*24)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) Xsqlite3VdbeResolveLabel(tls, v, doError) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, jmp2) __315: ; goto __307 __307: j4++ goto __306 goto __308 __308: ; // Verify CHECK constraints if !((*Table)(unsafe.Pointer(pTab9)).FpCheck != 0 && (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_IgnoreChecks) == uint64(0)) { goto __316 } pCheck = Xsqlite3ExprListDup(tls, db, (*Table)(unsafe.Pointer(pTab9)).FpCheck, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { goto __317 } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = *(*int32)(unsafe.Pointer(bp + 580)) + 1 k3 = (*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1 __318: if !(k3 > 0) { goto __320 } Xsqlite3ExprIfFalse(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8+uintptr(k3)*32)).FpExpr, addrCkFault, 0) goto __319 __319: k3-- goto __318 goto __320 __320: ; Xsqlite3ExprIfTrue(tls, pParse, (*ExprList_item)(unsafe.Pointer(pCheck+8)).FpExpr, addrCkOk, SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 zErr1 = Xsqlite3MPrintf(tls, db, ts+19068, libc.VaList(bp+416, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) __317: ; Xsqlite3ExprListDelete(tls, db, pCheck) __316: ; if !!(isQuick != 0) { goto __321 } // Omit the remaining tests for quick_check // Validate index entries for the current row j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __322: if !(pIdx5 != 0) { goto __324 } ckUniq = Xsqlite3VdbeMakeLabel(tls, pParse) if !(pPk1 == pIdx5) { goto __325 } goto __323 __325: ; r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 580 /* iDataCur */)), 0, 0, bp+588, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) // increment entry count // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 584))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) Xsqlite3VdbeLoadString(tls, v, 3, ts+19098) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) Xsqlite3VdbeLoadString(tls, v, 4, ts+19103) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp4 = integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, jmp21) // For UNIQUE indexes, verify that only one entry exists with the // current key. The entry is unique if (1) any column is NULL // or (2) the next entry has a different key if !(int32((*Index)(unsafe.Pointer(pIdx5)).FonError) != OE_None) { goto __326 } uniqOk = Xsqlite3VdbeMakeLabel(tls, pParse) kk = 0 __327: if !(kk < int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) { goto __329 } iCol1 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx5)).FaiColumn + uintptr(kk)*2))) if !(iCol1 >= 0 && uint32(int32(*(*uint8)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol + uintptr(iCol1)*24 + 8))&0xf>>0)) != 0) { goto __330 } goto __328 __330: ; Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, r1+kk, uniqOk) goto __328 __328: kk++ goto __327 goto __329 __329: ; jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 584))+j4) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 584))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) Xsqlite3VdbeLoadString(tls, v, 3, ts+19124) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __326: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 588 /* jmp3 */))) goto __323 __323: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ goto __322 goto __324 __324: ; __321: ; Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 580 /* iDataCur */)), loopTop) Xsqlite3VdbeJumpHere(tls, v, loopTop-1) if !!(isQuick != 0) { goto __331 } Xsqlite3VdbeLoadString(tls, v, 2, ts+19151) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __332: if !(pIdx5 != 0) { goto __334 } if !(pPk1 == pIdx5) { goto __335 } goto __333 __335: ; Xsqlite3VdbeAddOp2(tls, v, OP_Count, *(*int32)(unsafe.Pointer(bp + 584))+j4, 3) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, 8+j4, 0, 3) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 2, 3) integrityCheckResultRow(tls, v) Xsqlite3VdbeJumpHere(tls, v, addr1) goto __333 __333: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext j4++ goto __332 goto __334 __334: ; __331: ; goto __298 __298: x2 = (*HashElem)(unsafe.Pointer(x2)).Fnext goto __297 goto __299 __299: ; goto __272 __272: i9++ goto __271 goto __273 __273: ; aOp2 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(endCode))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&endCode)), iLn5) if !(aOp2 != 0) { goto __336 } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 576)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16)) = ts + 19180 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*24 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __336: ; Xsqlite3VdbeChangeP3(tls, v, 0, Xsqlite3VdbeCurrentAddr(tls, v)-2) goto __15 // PRAGMA encoding // PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be" // // In its first form, this pragma returns the encoding of the main // database. If the database is not initialized, it is initialized now. // // The second form of this pragma is a no-op if the main database file // has not already been initialized. In this case it sets the default // encoding that will be used for the main database file if a new file // is created. If an existing main database file is opened, then the // default text encoding for the existing database is used. // // In all cases new databases created using the ATTACH command are // created to use the same default text encoding as the main database. If // the main database has not been initialized and/or created when ATTACH // is executed, this is done before the ATTACH operation. // // In the second form this pragma sets the text encoding to be used in // new database files created using this database handle. It is only // useful if invoked immediately after the main database i __46: if !!(zRight != 0) { goto __337 } // "PRAGMA encoding" if !(Xsqlite3ReadSchema(tls, pParse) != 0) { goto __339 } goto pragma_out __339: ; returnSingleText(tls, v, encnames1[(*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fenc].FzName) goto __338 __337: // "PRAGMA encoding = XXX" // Only change the value of sqlite.enc if the database handle is not // initialized. If the main database exists, the new sqlite.enc value // will be overwritten when the schema is next loaded. If it does not // already exists, it will be created to use the new encoding value. if !((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { goto __340 } pEnc = uintptr(unsafe.Pointer(&encnames1)) __341: if !((*EncName)(unsafe.Pointer(pEnc)).FzName != 0) { goto __343 } if !(0 == Xsqlite3StrICmp(tls, zRight, (*EncName)(unsafe.Pointer(pEnc)).FzName)) { goto __344 } if (*EncName)(unsafe.Pointer(pEnc)).Fenc != 0 { enc = (*EncName)(unsafe.Pointer(pEnc)).Fenc } else { enc = uint8(SQLITE_UTF16LE) } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc = enc Xsqlite3SetTextEncoding(tls, db, enc) goto __343 __344: ; goto __342 __342: pEnc += 16 goto __341 goto __343 __343: ; if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __345 } Xsqlite3ErrorMsg(tls, pParse, ts+19183, libc.VaList(bp+424, zRight)) __345: ; __340: ; __338: ; goto __15 // PRAGMA [schema.]schema_version // PRAGMA [schema.]schema_version = <integer> // // PRAGMA [schema.]user_version // PRAGMA [schema.]user_version = <integer> // // PRAGMA [schema.]freelist_count // // PRAGMA [schema.]data_version // // PRAGMA [schema.]application_id // PRAGMA [schema.]application_id = <integer> // // The pragma's schema_version and user_version are used to set or get // the value of the schema-version and user-version, respectively. Both // the schema-version and the user-version are 32-bit signed integers // stored in the database header. // // The schema-cookie is usually only manipulated internally by SQLite. It // is incremented by SQLite whenever the database schema is modified (by // creating or dropping a table or index). The schema version is used by // SQLite each time a query is executed to ensure that the internal cache // of the schema used when compiling the SQL query matches the schema of // the database against which the compiled query is actually executed. // Subverting this mechanism by using "PRAGMA schema_version" to modify // the schema-version is potentially dangerous and may lead to program // crashes or database corruption. Use with caution! // // The user-version is not used internally by SQLite. It may be used by // applications for any purpose. __47: iCookie = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiArg) // Which cookie to read or write Xsqlite3VdbeUsesBtree(tls, v, iDb) if !(zRight != 0 && int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_ReadOnly == 0) { goto __346 } aOp3 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(setCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&setCookie)), 0) if !(0 != 0) { goto __348 } goto __15 __348: ; (*VdbeOp)(unsafe.Pointer(aOp3)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp2 = iCookie (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp3 = Xsqlite3Atoi(tls, zRight) (*VdbeOp)(unsafe.Pointer(aOp3 + 1*24)).Fp5 = U16(1) goto __347 __346: ; aOp4 = Xsqlite3VdbeAddOpList(tls, v, int32(uint64(unsafe.Sizeof(readCookie))/uint64(unsafe.Sizeof(VdbeOpList{}))), uintptr(unsafe.Pointer(&readCookie)), 0) if !(0 != 0) { goto __349 } goto __15 __349: ; (*VdbeOp)(unsafe.Pointer(aOp4)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp1 = iDb (*VdbeOp)(unsafe.Pointer(aOp4 + 1*24)).Fp3 = iCookie Xsqlite3VdbeReusable(tls, v) __347: ; goto __15 // PRAGMA compile_options // // Return the names of all compile-time options used in this build, // one option per row. __48: i10 = 0 (*Parse)(unsafe.Pointer(pParse)).FnMem = 1 __350: if !(libc.AssignUintptr(&zOpt, Xsqlite3_compileoption_get(tls, libc.PostIncInt32(&i10, 1))) != uintptr(0)) { goto __351 } Xsqlite3VdbeLoadString(tls, v, 1, zOpt) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) goto __350 __351: ; Xsqlite3VdbeReusable(tls, v) goto __15 // PRAGMA [schema.]wal_checkpoint = passive|full|restart|truncate // // Checkpoint the database. __49: iBt = func() int32 { if (*Token)(unsafe.Pointer(pId2)).Fz != 0 { return iDb } return SQLITE_MAX_ATTACHED + 2 }() eMode2 = SQLITE_CHECKPOINT_PASSIVE if !(zRight != 0) { goto __352 } if !(Xsqlite3StrICmp(tls, zRight, ts+18621) == 0) { goto __353 } eMode2 = SQLITE_CHECKPOINT_FULL goto __354 __353: if !(Xsqlite3StrICmp(tls, zRight, ts+19208) == 0) { goto __355 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __356 __355: if !(Xsqlite3StrICmp(tls, zRight, ts+18774) == 0) { goto __357 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE __357: ; __356: ; __354: ; __352: ; (*Parse)(unsafe.Pointer(pParse)).FnMem = 3 Xsqlite3VdbeAddOp3(tls, v, OP_Checkpoint, iBt, eMode2, 1) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 3) goto __15 // PRAGMA wal_autocheckpoint // PRAGMA wal_autocheckpoint = N // // Configure a database connection to automatically checkpoint a database // after accumulating N frames in the log. Or query for the current value // of N. __50: if !(zRight != 0) { goto __358 } Xsqlite3_wal_autocheckpoint(tls, db, Xsqlite3Atoi(tls, zRight)) __358: ; returnSingleInt(tls, v, func() int64 { if (*Sqlite3)(unsafe.Pointer(db)).FxWalCallback == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 }{Xsqlite3WalDefaultHook})) { return int64(int32((*Sqlite3)(unsafe.Pointer(db)).FpWalArg)) } return int64(0) }()) goto __15 // PRAGMA shrink_memory // // IMPLEMENTATION-OF: R-23445-46109 This pragma causes the database // connection on which it is invoked to free up as much memory as it // can, by calling sqlite3_db_release_memory(). __51: Xsqlite3_db_release_memory(tls, db) goto __15 // PRAGMA optimize // PRAGMA optimize(MASK) // PRAGMA schema.optimize // PRAGMA schema.optimize(MASK) // // Attempt to optimize the database. All schemas are optimized in the first // two forms, and only the specified schema is optimized in the latter two. // // The details of optimizations performed by this pragma are expected // to change and improve over time. Applications should anticipate that // this pragma will perform new optimizations in future releases. // // The optional argument is a bitmask of optimizations to perform: // // 0x0001 Debugging mode. Do not actually perform any optimizations // but instead return one line of text for each optimization // that would have been done. Off by default. // // 0x0002 Run ANALYZE on tables that might benefit. On by default. // See below for additional information. // // 0x0004 (Not yet implemented) Record usage and performance // information from the current session in the // database file so that it will be available to "optimize" // pragmas run by future database connections. // // 0x0008 (Not yet implemented) Create indexes that might have // been helpful to recent queries // // The default MASK is and always shall be 0xfffe. 0xfffe means perform all // of the optimizations listed above except Debug Mode, including new // optimizations that have not yet been invented. If new optimizations are // ever added that should be off by default, those off-by-default // optimizations will have bitmasks of 0x10000 or larger. // // DETERMINATION OF WHEN TO RUN ANALYZE // // In the current implementation, a table is analyzed if only if all of // the following are true: // // (1) MASK bit 0x02 is set. // // (2) The query planner used sqlite_stat1-style statistics for one or // more indexes of the table at some point during the lifetime of // the current connection. // // (3) One or more indexes of the table are currently unanalyzed OR // the number of rows in the table has increased by 25 times or more // since the last time ANALYZE was run. // // The rules for when tables are analyzed are likely to change in // future releases. __52: // Mask of operations to perform if !(zRight != 0) { goto __359 } opMask = U32(Xsqlite3Atoi(tls, zRight)) if !(opMask&U32(0x02) == U32(0)) { goto __361 } goto __15 __361: ; goto __360 __359: opMask = U32(0xfffe) __360: ; iTabCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) iDbLast = func() int32 { if zDb != 0 { return iDb } return (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1 }() __362: if !(iDb <= iDbLast) { goto __364 } if !(iDb == 1) { goto __365 } goto __363 __365: ; Xsqlite3CodeVerifySchema(tls, pParse, iDb) pSchema = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpSchema k4 = (*Hash)(unsafe.Pointer(pSchema + 8)).Ffirst __366: if !(k4 != 0) { goto __368 } pTab10 = (*HashElem)(unsafe.Pointer(k4)).Fdata // If table pTab has not been used in a way that would benefit from // having analysis statistics during the current session, then skip it. // This also has the effect of skipping virtual tables and views if !((*Table)(unsafe.Pointer(pTab10)).FtabFlags&U32(TF_StatsUsed) == U32(0)) { goto __369 } goto __367 __369: ; // Reanalyze if the table is 25 times larger than the last analysis szThreshold = LogEst(int32((*Table)(unsafe.Pointer(pTab10)).FnRowLogEst) + 46) pIdx6 = (*Table)(unsafe.Pointer(pTab10)).FpIndex __370: if !(pIdx6 != 0) { goto __372 } if !!(int32(*(*uint16)(unsafe.Pointer(pIdx6 + 100))&0x80>>7) != 0) { goto __373 } szThreshold = int16(0) // Always analyze if any index lacks statistics goto __372 __373: ; goto __371 __371: pIdx6 = (*Index)(unsafe.Pointer(pIdx6)).FpNext goto __370 goto __372 __372: ; if !(szThreshold != 0) { goto __374 } Xsqlite3OpenTable(tls, pParse, iTabCur, iDb, pTab10, OP_OpenRead) Xsqlite3VdbeAddOp3(tls, v, OP_IfSmaller, iTabCur, int32(U32(Xsqlite3VdbeCurrentAddr(tls, v)+2)+opMask&U32(1)), int32(szThreshold)) __374: ; zSubSql = Xsqlite3MPrintf(tls, db, ts+19216, libc.VaList(bp+432, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __375 } r11 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, r11, 0, zSubSql, -7) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, r11, 1) goto __376 __375: Xsqlite3VdbeAddOp4(tls, v, OP_SqlExec, 0, 0, 0, zSubSql, -7) __376: ; goto __367 __367: k4 = (*HashElem)(unsafe.Pointer(k4)).Fnext goto __366 goto __368 __368: ; goto __363 __363: iDb++ goto __362 goto __364 __364: ; Xsqlite3VdbeAddOp0(tls, v, OP_Expire) goto __15 // PRAGMA busy_timeout // PRAGMA busy_timeout = N // // Call sqlite3_busy_timeout(db, N). Return the current timeout value // if one is set. If no busy handler or a different busy handler is set // then 0 is returned. Setting the busy_timeout to 0 or negative // disables the timeout. /*case PragTyp_BUSY_TIMEOUT*/ __53: ; if !(zRight != 0) { goto __377 } Xsqlite3_busy_timeout(tls, db, Xsqlite3Atoi(tls, zRight)) __377: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout)) goto __15 // PRAGMA soft_heap_limit // PRAGMA soft_heap_limit = N // // IMPLEMENTATION-OF: R-26343-45930 This pragma invokes the // sqlite3_soft_heap_limit64() interface with the argument N, if N is // specified and is a non-negative integer. // IMPLEMENTATION-OF: R-64451-07163 The soft_heap_limit pragma always // returns the same integer that would be returned by the // sqlite3_soft_heap_limit64(-1) C-language function. __54: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+592) == SQLITE_OK) { goto __378 } Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 592 /* N */))) __378: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) goto __15 // PRAGMA hard_heap_limit // PRAGMA hard_heap_limit = N // // Invoke sqlite3_hard_heap_limit64() to query or set the hard heap // limit. The hard heap limit can be activated or lowered by this // pragma, but not raised or deactivated. Only the // sqlite3_hard_heap_limit64() C-language API can raise or deactivate // the hard heap limit. This allows an application to set a heap limit // constraint that cannot be relaxed by an untrusted SQL script. __55: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+600) == SQLITE_OK) { goto __379 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 600)) > int64(0) && (iPrior == int64(0) || iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 600)))) { goto __380 } Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 600 /* N1 */))) __380: ; __379: ; returnSingleInt(tls, v, Xsqlite3_hard_heap_limit64(tls, int64(-1))) goto __15 // PRAGMA threads // PRAGMA threads = N // // Configure the maximum number of worker threads. Return the new // maximum, which might be less than requested. __56: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+608) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 608)) >= int64(0)) { goto __381 } Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 608))&int64(0x7fffffff))) __381: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) goto __15 // PRAGMA analysis_limit // PRAGMA analysis_limit = N // // Configure the maximum number of rows that ANALYZE will examine // in each index that it looks at. Return the new limit. __57: if !(zRight != 0 && Xsqlite3DecOrHexToI64(tls, zRight, bp+616) == SQLITE_OK && *(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) >= int64(0)) { goto __382 } (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 616)) & int64(0x7fffffff)) __382: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) // IMP: R-57594-65522 goto __15 __15: ; // End of the PRAGMA switch // The following block is a no-op unless SQLITE_DEBUG is defined. Its only // purpose is to execute assert() statements to verify that if the // PragFlg_NoColumns1 flag is set and the caller specified an argument // to the PRAGMA, the implementation has not added any OP_ResultRow // instructions to the VM. if !(int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_NoColumns1 != 0 && zRight != 0) { goto __383 } __383: ; pragma_out: Xsqlite3DbFree(tls, db, zLeft) Xsqlite3DbFree(tls, db, zRight) } type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [7]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132438:18 */ var iLn3 int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130992:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 {Fopcode: U8(OP_IfPos), Fp1: int8(1), Fp2: int8(8)}, {Fopcode: U8(OP_Integer), Fp2: int8(2)}, {Fopcode: U8(OP_Subtract), Fp1: int8(1), Fp2: int8(2), Fp3: int8(1)}, {Fopcode: U8(OP_IfPos), Fp1: int8(1), Fp2: int8(8)}, {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:130993:29 */ var iLn4 int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:131261:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:131262:33 */ var iLn5 int32 = 0 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132388:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 2 {Fopcode: U8(OP_ResultRow), Fp1: int8(3), Fp2: int8(1)}, // 3 {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132389:31 */ var encnames1 = [9]EncName{ {FzName: ts + 19234, Fenc: U8(SQLITE_UTF8)}, {FzName: ts + 19239, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] {FzName: ts + 19245, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] {FzName: ts + 19254, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] {FzName: ts + 19263, Fenc: U8(SQLITE_UTF16LE)}, {FzName: ts + 19271, Fenc: U8(SQLITE_UTF16BE)}, {FzName: ts + 19279}, {FzName: ts + 19286}, {}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132441:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132521:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132536:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // type PragmaVtab1 = struct { Fbase Sqlite3_vtab Fdb uintptr FpName uintptr FnHidden U8 FiHidden U8 F__ccgo_pad1 [6]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132896:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // type PragmaVtab = PragmaVtab1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132896:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132897:9 */ type PragmaVtabCursor = PragmaVtabCursor1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132897:33 */ // Pragma virtual table module xConnect method. func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132915:12: */ bp := tls.Alloc(264) defer tls.Free(264) var pPragma uintptr = pAux var pTab uintptr = uintptr(0) var rc int32 var i int32 var j int32 var cSep int8 = int8('(') // var acc StrAccum at bp+32, 32 // var zBuf [200]int8 at bp+64, 200 _ = argc _ = argv Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+64, int32(unsafe.Sizeof([200]int8{})), 0) Xsqlite3_str_appendall(tls, bp+32, ts+19292) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: if !(i < int32((*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName)) { goto __3 } { Xsqlite3_str_appendf(tls, bp+32, ts+19307, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } goto __2 __2: i++ j++ goto __1 goto __3 __3: ; if i == 0 { Xsqlite3_str_appendf(tls, bp+32, ts+19314, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { Xsqlite3_str_appendall(tls, bp+32, ts+19320) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { Xsqlite3_str_appendall(tls, bp+32, ts+19332) j++ } Xsqlite3_str_append(tls, bp+32, ts+6260, 1) Xsqlite3StrAccumFinish(tls, bp+32) rc = Xsqlite3_declare_vtab(tls, db, bp+64) if rc == SQLITE_OK { pTab = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtab{}))) if pTab == uintptr(0) { rc = SQLITE_NOMEM } else { libc.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(PragmaVtab{}))) (*PragmaVtab)(unsafe.Pointer(pTab)).FpName = pPragma (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb = db (*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden = U8(i) (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab return rc } // Pragma virtual table module xDisconnect method. func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132977:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // Figure out the best index to use to search a pragma virtual table. // // There are not really any index choices. But we want to encourage the // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:132990:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pTab uintptr = tab var pConstraint uintptr var i int32 var j int32 // var seen [2]int32 at bp, 8 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(1) if int32((*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden) == 0 { return SQLITE_OK } pConstraint = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint *(*int32)(unsafe.Pointer(bp)) = 0 *(*int32)(unsafe.Pointer(bp + 1*4)) = 0 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 } if (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { goto __2 } j = (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) *(*int32)(unsafe.Pointer(bp + uintptr(j)*4)) = i + 1 } goto __2 __2: i++ pConstraint += 12 goto __1 goto __3 __3: ; if *(*int32)(unsafe.Pointer(bp)) == 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(2147483647) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(2147483647) return SQLITE_OK } j = *(*int32)(unsafe.Pointer(bp)) - 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = uint8(1) if *(*int32)(unsafe.Pointer(bp + 1*4)) == 0 { return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = float64(20) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(20) j = *(*int32)(unsafe.Pointer(bp + 1*4)) - 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = 2 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = uint8(1) return SQLITE_OK } // Create a new cursor for the pragma virtual table func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133027:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { return SQLITE_NOMEM } libc.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(PragmaVtabCursor{}))) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab = pVtab *(*uintptr)(unsafe.Pointer(ppCursor)) = pCsr return SQLITE_OK } // Clear all content from pragma virtual table cursor. func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133038:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) for i = 0; i < int32(uint64(unsafe.Sizeof([2]uintptr{}))/uint64(unsafe.Sizeof(uintptr(0)))); i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i)*8))) *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i)*8)) = uintptr(0) } } // Close a pragma virtual table cursor func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133049:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) return SQLITE_OK } // Advance the pragma virtual table cursor to the next row func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133057:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK // Increment the xRowid value (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid++ if SQLITE_ROW != Xsqlite3_step(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) { rc = Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) pragmaVtabCursorClear(tls, pCsr) } return rc } // Pragma virtual table module xFilter method. func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133075:12: */ bp := tls.Alloc(64) defer tls.Free(64) var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var rc int32 var i int32 var j int32 // var acc StrAccum at bp+32, 32 var zSql uintptr _ = idxNum _ = idxStr pragmaVtabCursorClear(tls, pCsr) if int32((*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FmPragFlg)&PragFlg_Result1 != 0 { j = 0 } else { j = 1 } i = 0 __1: if !(i < argc) { goto __3 } { var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if zText != 0 { *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(j)*8)) == uintptr(0) { return SQLITE_NOMEM } } } goto __2 __2: i++ j++ goto __1 goto __3 __3: ; Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 136 + 1*4))) Xsqlite3_str_appendall(tls, bp+32, ts+19347) if *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)) != 0 { Xsqlite3_str_appendf(tls, bp+32, ts+19355, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 24 + 1*8)))) } Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 24)) != 0 { Xsqlite3_str_appendf(tls, bp+32, ts+19359, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 24)))) } zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+8, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+4444, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) } // Pragma virtual table module xEof method. func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133125:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133133:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { Xsqlite3_result_value(tls, ctx, Xsqlite3_column_value(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma, i)) } else { Xsqlite3_result_text(tls, ctx, *(*uintptr)(unsafe.Pointer(pCsr + 24 + uintptr(i-int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden))*8)), -1, libc.UintptrFromInt32(-1)) } return SQLITE_OK } // Pragma virtual table module xRowid method. func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133151:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK } // The pragma virtual table object var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxConnect: 0, // xConnect - connect to an existing table FxBestIndex: 0, // xBestIndex - Determine search strategy FxDisconnect: 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, // xShadowName } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133158:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133190:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) if pName == uintptr(0) { return uintptr(0) } if int32((*PragmaName)(unsafe.Pointer(pName)).FmPragFlg)&(PragFlg_Result0|PragFlg_Result1) == 0 { return uintptr(0) } return Xsqlite3VtabCreateModule(tls, db, zName, uintptr(unsafe.Pointer(&pragmaVtabModule)), pName, uintptr(0)) } //************* End of pragma.c ********************************************* //************* Begin file prepare.c **************************************** // 2005 May 25 // // 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 implementation of the sqlite3_prepare() // interface, and routines that contribute to loading the database schema // from disk. // #include "sqliteInt.h" // Fill the InitData structure with an error message that indicates // that the database is corrupt. func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133227:13: */ bp := tls.Alloc(56) defer tls.Free(56) var db uintptr = (*InitData)(unsafe.Pointer(pData)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_NOMEM } else if *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) != uintptr(0) { // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, ts+19363, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*8)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133250) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*8)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*8)) } else { zObj = ts + 6311 /* "?" */ } z = Xsqlite3MPrintf(tls, db, ts+19391, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { z = Xsqlite3MPrintf(tls, db, ts+19422, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 133257) } } var azAlterType = [3]uintptr{ ts + 19430, ts + 19437, ts + 19449, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133238:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133266:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { return 1 } } return 0 } // This is the callback routine for the code that initializes the // database. See sqlite3Init() below for additional information. // This routine is also called from the OP_ParseSchema opcode of the VDBE. // // Each callback contains the following information: // // argv[0] = type of object: "table", "index", "trigger", or "view". // argv[1] = name of thing being created // argv[2] = associated table if an index or trigger // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133300:20: */ bp := tls.Alloc(8) defer tls.Free(8) var pData uintptr = pInit var db uintptr = (*InitData)(unsafe.Pointer(pData)).Fdb var iDb int32 = (*InitData)(unsafe.Pointer(pData)).FiDb _ = NotUsed _ = argc *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_EncodingFixed) if argv == uintptr(0) { return 0 } // Might happen if EMPTY_RESULT_CALLBACKS are on (*InitData)(unsafe.Pointer(pData)).FnInitRow++ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { corruptSchema(tls, pData, argv, uintptr(0)) return 1 } if *(*uintptr)(unsafe.Pointer(argv + 3*8)) == uintptr(0) { corruptSchema(tls, pData, argv, uintptr(0)) } else if *(*uintptr)(unsafe.Pointer(argv + 4*8)) != 0 && 'c' == int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)))))]) && 'r' == int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8)) + 1)))]) { // Call the parser to process a CREATE TABLE, INDEX or VIEW. // But because db->init.busy is set to 1, no VDBE code is generated // or executed. All the parser does is build the internal data // structures that describe the table, index, or view. // // No other valid SQL statement, other than the variable CREATE statements, // can begin with the letters "C" and "R". Thus, it is not possible run // any other kind of statement while parsing the schema, even a corrupt // schema. var rc int32 var saved_iDb U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb // var pStmt uintptr at bp, 8 // Return code from sqlite3_prepare() (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), db+192) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { corruptSchema(tls, pData, argv, ts+15434) } } libc.SetBitFieldPtr8Uint32(db+192+8, uint32(0), 0, 0x1) (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = argv *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) sqlite3Prepare(tls, db, *(*uintptr)(unsafe.Pointer(argv + 4*8)), -1, uint32(0), uintptr(0), bp, uintptr(0)) rc = (*Sqlite3)(unsafe.Pointer(db)).FerrCode (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = saved_iDb // assert( saved_iDb==0 || (db->mDbFlags & DBFLAG_Vacuum)!=0 ); if SQLITE_OK != rc { if uint32(int32(*(*uint8)(unsafe.Pointer(db + 192 + 8))&0x1>>0)) != 0 { } else { if rc > (*InitData)(unsafe.Pointer(pData)).Frc { (*InitData)(unsafe.Pointer(pData)).Frc = rc } if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } else if rc != SQLITE_INTERRUPT && rc&0xFF != SQLITE_LOCKED { corruptSchema(tls, pData, argv, Xsqlite3_errmsg(tls, db)) } } } (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = uintptr(unsafe.Pointer(&Xsqlite3StdType)) // Any array of string ptrs will do Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) } else if *(*uintptr)(unsafe.Pointer(argv + 1*8)) == uintptr(0) || *(*uintptr)(unsafe.Pointer(argv + 4*8)) != uintptr(0) && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + 4*8))))) != 0 { corruptSchema(tls, pData, argv, uintptr(0)) } else { // If the SQL column is blank it means this is an index that // was created to be the PRIMARY KEY or to fulfill a UNIQUE // constraint for a CREATE TABLE. The index should have already // been created when we processed the CREATE TABLE. All we have // to do here is record the root page number for that index. var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*8)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName) if pIndex == uintptr(0) { corruptSchema(tls, pData, argv, ts+19460) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8)), pIndex+88) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { corruptSchema(tls, pData, argv, ts+15434) } } } return 0 } // Attempt to read the database schema and initialize internal // data structures for a single database file. The index of the // database file is given by iDb. iDb==0 is used for the main // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133403:20: */ bp := tls.Alloc(124) defer tls.Free(124) var rc int32 var i int32 var size int32 var pDb uintptr // var azArg [6]uintptr at bp+16, 48 // var meta [5]int32 at bp+104, 20 // var initData InitData at bp+64, 40 var zSchemaTabName uintptr var openedTransaction int32 var mask int32 var encoding U8 var xAuth Sqlite3_xauth var zSql uintptr openedTransaction = 0 mask = int32((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) | libc.Uint32FromInt32(libc.CplInt32(DBFLAG_EncodingFixed))) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) // Construct the in-memory representation schema tables (sqlite_schema or // sqlite_temp_schema) by invoking the parser directly. The appropriate // table name will be inserted automatically by the parser so we can just // use the abbreviation "x" here. The parser will also automatically tag // the schema table as read-only. *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 10113 /* "table" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { return ts + 13385 } return ts + 7196 }()) *(*uintptr)(unsafe.Pointer(bp + 16 + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*8)) *(*uintptr)(unsafe.Pointer(bp + 16 + 3*8)) = ts + 9177 /* "1" */ *(*uintptr)(unsafe.Pointer(bp + 16 + 4*8)) = ts + 19473 /* "CREATE TABLE x(t..." */ *(*uintptr)(unsafe.Pointer(bp + 16 + 5*8)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc = SQLITE_OK (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FpzErrMsg = pzErrMsg (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmInitFlags = mFlags (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FnInitRow = U32(0) (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Pgno(0) Xsqlite3InitCallback(tls, bp+64, 5, bp+16, uintptr(0)) *(*U32)(unsafe.Pointer(db + 44)) &= U32(mask) if !((*InitData)(unsafe.Pointer(bp+64)).Frc != 0) { goto __1 } rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc goto error_out __1: ; // Create a cursor to hold the database open pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 if !((*Db)(unsafe.Pointer(pDb)).FpBt == uintptr(0)) { goto __2 } *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema + 114)) |= U16(DB_SchemaLoaded) rc = SQLITE_OK goto error_out __2: ; // If there is not already a read-only (or read-write) transaction opened // on the b-tree database, open one now. If a transaction is opened, it // will be closed before this function returns. Xsqlite3BtreeEnter(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) if !(Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) == SQLITE_TXN_NONE) { goto __3 } rc = Xsqlite3BtreeBeginTrans(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, 0, uintptr(0)) if !(rc != SQLITE_OK) { goto __4 } Xsqlite3SetString(tls, pzErrMsg, db, Xsqlite3ErrStr(tls, rc)) goto initone_error_out __4: ; openedTransaction = 1 __3: ; // Get the database meta information. // // Meta values are as follows: // meta[0] Schema cookie. Changes with each schema change. // meta[1] File format of schema layer. // meta[2] Size of the page cache. // meta[3] Largest rootpage (auto/incr_vacuum mode) // meta[4] Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE // meta[5] User version // meta[6] Incremental vacuum mode // meta[7] unused // meta[8] unused // meta[9] unused // // Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to // the possible values of meta[4]. i = 0 __5: if !(i < int32(uint64(unsafe.Sizeof([5]int32{}))/uint64(unsafe.Sizeof(int32(0))))) { goto __7 } Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, i+1, bp+104+uintptr(i)*4) goto __6 __6: i++ goto __5 goto __7 __7: ; if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ResetDatabase) != uint64(0)) { goto __8 } libc.Xmemset(tls, bp+104, 0, uint64(unsafe.Sizeof([5]int32{}))) __8: ; (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 104)) // If opening a non-empty database, check the text encoding. For the // main database, set sqlite3.enc to the encoding of the main database. // For an attached db, it is an error if the encoding is not the same // as sqlite3.enc. if !(*(*int32)(unsafe.Pointer(bp + 104 + 4*4)) != 0) { goto __9 } // text encoding if !(iDb == 0 && (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_EncodingFixed) == U32(0)) { goto __10 } // If opening the main database, set ENC(db). encoding = U8(int32(U8(*(*int32)(unsafe.Pointer(bp + 104 + 4*4)))) & 3) if !(int32(encoding) == 0) { goto __12 } encoding = U8(SQLITE_UTF8) __12: ; Xsqlite3SetTextEncoding(tls, db, encoding) goto __11 __10: // If opening an attached database, the encoding much match ENC(db) if !(*(*int32)(unsafe.Pointer(bp + 104 + 4*4))&3 != int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)) { goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, ts+13012) rc = SQLITE_ERROR goto initone_error_out __13: ; __11: ; __9: ; (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size == 0) { goto __14 } size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 104 + 2*4))) if !(size == 0) { goto __15 } size = -2000 __15: ; (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size = size Xsqlite3BtreeSetCacheSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size) __14: ; // file_format==1 Version 3.0.0. // file_format==2 Version 3.1.3. // ALTER TABLE ADD COLUMN // file_format==3 Version 3.1.4. // ditto but with non-NULL defaults // file_format==4 Version 3.3.0. // DESC indices. Boolean constants (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 104 + 1*4))) if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) == 0) { goto __16 } (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(1) __16: ; if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } Xsqlite3SetString(tls, pzErrMsg, db, ts+19545) rc = SQLITE_ERROR goto initone_error_out __17: ; // Ticket #2804: When we open a database in the newer file format, // clear the legacy_file_format pragma flag so that a VACUUM will // not downgrade the database and thus invalidate any descending // indices that the user might have created. if !(iDb == 0 && *(*int32)(unsafe.Pointer(bp + 104 + 1*4)) >= 4) { goto __18 } *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_LegacyFileFmt)) __18: ; // Read the schema information out of the schema tables (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, ts+19569, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 }{Xsqlite3InitCallback})), bp+64 /* &initData */, uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc == SQLITE_OK) { goto __19 } rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc __19: ; Xsqlite3DbFree(tls, db, zSql) if !(rc == SQLITE_OK) { goto __20 } Xsqlite3AnalysisLoad(tls, db, iDb) __20: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __21 } rc = SQLITE_NOMEM Xsqlite3ResetAllSchemasOfConnection(tls, db) pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32 goto __22 __21: if !(rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_NoSchemaError) != 0 && rc != SQLITE_NOMEM) { goto __23 } // Hack: If the SQLITE_NoSchemaError flag is set, then consider // the schema loaded, even if errors (other than OOM) occurred. In // this situation the current sqlite3_prepare() operation will fail, // but the following one will attempt to compile the supplied statement // against whatever subset of the schema was loaded before the error // occurred. // // The primary purpose of this is to allow access to the sqlite_schema // table even when its contents have been corrupted. *(*U16)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema + 114)) |= U16(DB_SchemaLoaded) rc = SQLITE_OK __23: ; __22: ; // Jump here for an error that occurs after successfully allocating // curMain and calling sqlite3BtreeEnter(). For an error that occurs // before that point, jump to error_out. initone_error_out: if !(openedTransaction != 0) { goto __24 } Xsqlite3BtreeCommit(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) __24: ; Xsqlite3BtreeLeave(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) error_out: if !(rc != 0) { goto __25 } if !(rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8) { goto __26 } Xsqlite3OomFault(tls, db) __26: ; Xsqlite3ResetOneSchema(tls, db, iDb) __25: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(0) return rc } // Initialize all database files - the main database file, the file // used to store temporary tables, and any additional database files // created using ATTACH statements. Return a success code. If an // error occurs, write an error message into *pzErrMsg. // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133642:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) (*Sqlite3)(unsafe.Pointer(db)).Fenc = (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).Fenc // Do the main schema first if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded) { rc = Xsqlite3InitOne(tls, db, 0, pzErrMsg, uint32(0)) if rc != 0 { return rc } } // All other schemas after the main schema. The "temp" schema must be last for i = (*Sqlite3)(unsafe.Pointer(db)).FnDb - 1; i > 0; i-- { if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema)).FschemaFlags)&DB_SchemaLoaded == DB_SchemaLoaded) { rc = Xsqlite3InitOne(tls, db, i, pzErrMsg, uint32(0)) if rc != 0 { return rc } } } if commit_internal != 0 { Xsqlite3CommitInternalChanges(tls, db) } return SQLITE_OK } // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133674:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) != 0) { rc = Xsqlite3Init(tls, db, pParse+8) if rc != SQLITE_OK { (*Parse)(unsafe.Pointer(pParse)).Frc = rc (*Parse)(unsafe.Pointer(pParse)).FnErr++ } else if (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache != 0 { *(*U32)(unsafe.Pointer(db + 44)) |= U32(DBFLAG_SchemaKnownOk) } } return rc } // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133696:13: */ bp := tls.Alloc(4) defer tls.Free(4) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var iDb int32 var rc int32 // var cookie int32 at bp, 4 for iDb = 0; iDb < (*Sqlite3)(unsafe.Pointer(db)).FnDb; iDb++ { var openedTransaction int32 = 0 // True if a transaction is opened var pBt uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt // Btree database to read cookie from if pBt == uintptr(0) { continue } // If there is not already a read-only (or read-write) transaction opened // on the b-tree database, open one now. If a transaction is opened, it // will be closed immediately after reading the meta-value. if Xsqlite3BtreeTxnState(tls, pBt) == SQLITE_TXN_NONE { rc = Xsqlite3BtreeBeginTrans(tls, pBt, 0, uintptr(0)) if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomFault(tls, db) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM } if rc != SQLITE_OK { return } openedTransaction = 1 } // Read the schema cookie from the database. If it does not match the // value stored as part of the in-memory schema representation, // set Parse.rc to SQLITE_SCHEMA. Xsqlite3BtreeGetMeta(tls, pBt, BTREE_SCHEMA_VERSION, bp) if *(*int32)(unsafe.Pointer(bp)) != (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpSchema)).Fschema_cookie { Xsqlite3ResetOneSchema(tls, db, iDb) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_SCHEMA } // Close the transaction, if one was opened. if openedTransaction != 0 { Xsqlite3BtreeCommit(tls, pBt) } } } // Convert a schema pointer into the iDb index that indicates // which database file in db->aDb[] the schema refers to. // // If the same database is attached more than once, the first // attached database is returned. func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133746:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in // expr.c is trying to resolve a reference to a transient table (i.e. one // created by a sub-select). In this case the return value of this // function should never be used. // // We return -32768 instead of the more usual -1 simply because using // -32768 as the incorrect index into db->aDb[] is much // more likely to cause a segfault than -1 (of course there are assert() // statements too, but it never hurts to play the odds) and // -32768 will still fit into a 16-bit signed integer. if pSchema != 0 { for i = 0; 1 != 0; i++ { if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*32)).FpSchema == pSchema { break } } } return i } // Free all memory allocations in the pParse object func Xsqlite3ParseObjectReset(tls *libc.TLS, pParse uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133776:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaTableLock) for (*Parse)(unsafe.Pointer(pParse)).FpCleanup != 0 { var pCleanup uintptr = (*Parse)(unsafe.Pointer(pParse)).FpCleanup (*Parse)(unsafe.Pointer(pParse)).FpCleanup = (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup})).f(tls, db, (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr) Xsqlite3DbFreeNN(tls, db, pCleanup) } Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(pParse)).FaLabel) if (*Parse)(unsafe.Pointer(pParse)).FpConstExpr != 0 { Xsqlite3ExprListDelete(tls, db, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr) } *(*U32)(unsafe.Pointer(db + 440)) -= U32((*Parse)(unsafe.Pointer(pParse)).FdisableLookaside) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { return uint16(0) } return (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue }() (*Sqlite3)(unsafe.Pointer(db)).FpParse = (*Parse)(unsafe.Pointer(pParse)).FpOuterParse (*Parse)(unsafe.Pointer(pParse)).Fdb = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside = U8(0) } // Add a new cleanup operation to a Parser. The cleanup should happen when // the parser object is destroyed. But, beware: the cleanup might happen // immediately. // // Use this mechanism for uncommon cleanups. There is a higher setup // cost for this mechansim (an extra malloc), so it should not be used // for common cleanups that happen on most calls. But for less // common cleanups, we save a single NULL-pointer comparison in // sqlite3ParseObjectReset(), which reduces the total CPU cycle count. // // If a memory allocation error occurs, then the cleanup happens immediately. // When either SQLITE_DEBUG or SQLITE_COVERAGE_TEST are defined, the // pParse->earlyCleanup flag is set in that case. Calling code show verify // that test cases exist for which this happens, to guard against possible // use-after-free errors following an OOM. The preferred way to do this is // to immediately follow the call to this routine with: // // testcase( pParse->earlyCleanup ); // // This routine returns a copy of its pPtr input (the third parameter) // except if an early cleanup occurs, in which case it returns NULL. So // another way to check for early cleanup is to check the return value. // Or, stop using the pPtr parameter with this call and use only its // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133831:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup (*Parse)(unsafe.Pointer(pParse)).FpCleanup = pCleanup (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpPtr = pPtr (*ParseCleanup)(unsafe.Pointer(pCleanup)).FxCleanup = xCleanup } else { (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xCleanup})).f(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pPtr) pPtr = uintptr(0) } return pPtr } // Turn bulk memory into a valid Parse object and link that Parse object // into database connection db. // // Call sqlite3ParseObjectReset() to undo this operation. // // Caution: Do not confuse this routine with sqlite3ParseObjectInit() which // is generated by Lemon. func Xsqlite3ParseObjectInit(tls *libc.TLS, pParse uintptr, db uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133861:21: */ libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, pParse+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) (*Parse)(unsafe.Pointer(pParse)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse (*Parse)(unsafe.Pointer(pParse)).Fdb = db if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+1460, 0) } } // Maximum number of times that we will try again to prepare a statement // that returns SQLITE_ERROR_RETRY. // Compile the UTF-8 encoded SQL statement zSql into a statement handle. func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:133882:12: */ bp := tls.Alloc(424) defer tls.Free(424) var rc int32 // Result code var i int32 // Loop counter // var sParse Parse at bp+16, 408 var zDb uintptr var pBt uintptr var zSqlCopy uintptr var mxLen int32 var pT uintptr rc = SQLITE_OK // Parsing context // sqlite3ParseObjectInit(&sParse, db); // inlined for performance libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+8)), 0, uint64(uintptr(0)+216)-uint64(uintptr(0)+8)) libc.Xmemset(tls, bp+16+uintptr(uint64(uintptr(0)+272)), 0, uint64(unsafe.Sizeof(Parse{}))-uint64(uintptr(0)+272)) (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpOuterParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = bp + 16 /* &sParse */ (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = db (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpReprepare = pReprepare if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 } Xsqlite3ErrorMsg(tls, bp+16, ts+1460, 0) __1: ; // For a long-term use prepared statement avoid the use of // lookaside memory. if !(prepFlags&U32(SQLITE_PREPARE_PERSISTENT) != 0) { goto __2 } (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __2: ; (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FdisableVtab = U8(libc.Bool32(prepFlags&U32(SQLITE_PREPARE_NO_VTAB) != U32(0))) // Check to verify that it is possible to get a read lock on all // database schemas. The inability to get a read lock indicates that // some other database connection is holding a write-lock, which in // turn means that the other connection has made uncommitted changes // to the schema. // // Were we to proceed and prepare the statement against the uncommitted // schema changes and if those schema changes are subsequently rolled // back and different changes are made in their place, then when this // prepared statement goes to run the schema cookie would fail to detect // the schema change. Disaster would follow. // // This thread is currently holding mutexes on all Btrees (because // of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it // is not possible for another thread to start a new schema change // while this routine is running. Hence, we do not need to hold // locks on the schema, we just need to make sure nobody else is // holding them. // // Note that setting READ_UNCOMMITTED overrides most lock detection, // but it does *not* override schema lock detection, so this all still // works even if READ_UNCOMMITTED is set. if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) != 0) { goto __3 } i = 0 __4: if !(i < (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __6 } pBt = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FpBt if !(pBt != 0) { goto __7 } rc = Xsqlite3BtreeSchemaLocked(tls, pBt) if !(rc != 0) { goto __8 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*32)).FzDbSName Xsqlite3ErrorWithMsg(tls, db, rc, ts+19603, libc.VaList(bp, zDb)) goto end_prepare __8: ; __7: ; goto __5 __5: i++ goto __4 goto __6 __6: ; __3: ; Xsqlite3VtabUnlockList(tls, db) if !(nBytes >= 0 && (nBytes == 0 || int32(*(*int8)(unsafe.Pointer(zSql + uintptr(nBytes-1)))) != 0)) { goto __9 } mxLen = *(*int32)(unsafe.Pointer(db + 136 + 1*4)) if !(nBytes > mxLen) { goto __11 } Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+19633, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __11: ; zSqlCopy = Xsqlite3DbStrNDup(tls, db, zSql, uint64(nBytes)) if !(zSqlCopy != 0) { goto __12 } Xsqlite3RunParser(tls, bp+16, zSqlCopy) (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = zSql + uintptr((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) goto __13 __12: (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = zSql + uintptr(nBytes) __13: ; goto __10 __9: Xsqlite3RunParser(tls, bp+16, zSql) __10: ; if !(pzTail != 0) { goto __14 } *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail __14: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __15 } Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe, zSql, int32((int64((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int64(zSql))/1), uint8(prepFlags)) __15: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __16 } (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc = SQLITE_NOMEM (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FcheckSchema = U8(0) __16: ; if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { goto __17 } if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __19 } schemaIsValid(tls, bp+16) __19: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { goto __20 } Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe) __20: ; rc = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc if !((*Parse)(unsafe.Pointer(bp+16)).FzErrMsg != 0) { goto __21 } Xsqlite3ErrorWithMsg(tls, db, rc, ts+4444, libc.VaList(bp+8, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) Xsqlite3DbFree(tls, db, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) goto __22 __21: Xsqlite3Error(tls, db, rc) __22: ; goto __18 __17: ; *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) __18: ; // Delete any TriggerPrg structures allocated while parsing this statement. __23: if !((*Parse)(unsafe.Pointer(bp+16)).FpTriggerPrg != 0) { goto __24 } pT = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) goto __23 __24: ; end_prepare: Xsqlite3ParseObjectReset(tls, bp+16) return rc } func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134025:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { return Xsqlite3MisuseError(tls, 134042) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) for __ccgo := true; __ccgo; __ccgo = rc == SQLITE_ERROR|int32(2)<<8 && libc.PostIncInt32(&cnt, 1) < SQLITE_MAX_PREPARE_RETRY || rc == SQLITE_SCHEMA && func() int32 { Xsqlite3ResetOneSchema(tls, db, -1); return libc.PostIncInt32(&cnt, 1) }() == 0 { // Make multiple attempts to compile the SQL, until it either succeeds // or encounters a permanent error. A schema problem after one schema // reset is considered a permanent error. rc = sqlite3Prepare(tls, db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail) if rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { break } } Xsqlite3BtreeLeaveAll(tls, db) rc = Xsqlite3ApiExit(tls, db, rc) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // Rerun the compilation of a statement after a schema change. // // If the statement is successfully recompiled, return SQLITE_OK. Otherwise, // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134072:20: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 // var pNew uintptr at bp, 8 var zSql uintptr var db uintptr var prepFlags U8 zSql = Xsqlite3_sql(tls, p) // Reprepare only called for prepare_v2() statements db = Xsqlite3VdbeDb(tls, p) prepFlags = Xsqlite3VdbePrepareFlags(tls, p) rc = sqlite3LockAndPrepare(tls, db, zSql, -1, uint32(prepFlags), p, bp, uintptr(0)) if rc != 0 { if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } return rc } else { } Xsqlite3VdbeSwap(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), p) Xsqlite3TransferBindings(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), p) Xsqlite3VdbeResetStepResult(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) Xsqlite3VdbeFinalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) return SQLITE_OK } // Two versions of the official API. Legacy and new use. In the legacy // version, the original SQL text is not saved in the prepared statement // and so if a schema change occurs, SQLITE_SCHEMA is returned by // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134111:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134123:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags // parameter. // // Proof in that the 5th parameter to sqlite3LockAndPrepare is 0 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), uintptr(0), ppStmt, pzTail) return rc } func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134141:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, // which is a bit array consisting of zero or more of the // SQLITE_PREPARE_* flags. // // Proof by comparison to the implementation of sqlite3_prepare_v2() // directly above. rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), uintptr(0), ppStmt, pzTail) return rc } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134169:12: */ bp := tls.Alloc(8) defer tls.Free(8) // This function currently works by first transforming the UTF-16 // encoded string to UTF-8, then invoking sqlite3_prepare(). The // tricky bit is figuring out the pointer to return in *pzTail. var zSql8 uintptr *(*uintptr)(unsafe.Pointer(bp /* zTail8 */)) = uintptr(0) var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { return Xsqlite3MisuseError(tls, 134190) } if nBytes >= 0 { var sz int32 var z uintptr = zSql for sz = 0; sz < nBytes && (int32(*(*int8)(unsafe.Pointer(z + uintptr(sz)))) != 0 || int32(*(*int8)(unsafe.Pointer(z + uintptr(sz+1)))) != 0); sz = sz + 2 { } nBytes = sz } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) zSql8 = Xsqlite3Utf16to8(tls, db, zSql, nBytes, uint8(SQLITE_UTF16LE)) if zSql8 != 0 { rc = sqlite3LockAndPrepare(tls, db, zSql8, -1, prepFlags, uintptr(0), ppStmt, bp) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 && pzTail != 0 { // If sqlite3_prepare returns a tail pointer, we calculate the // equivalent pointer into the UTF-16 string by counting the unicode // characters between zSql8 and zTail8, and then returning a pointer // the same number of characters into the UTF-16 string. var chars_parsed int32 = Xsqlite3Utf8CharLen(tls, zSql8, int32((int64(*(*uintptr)(unsafe.Pointer(bp)))-int64(zSql8))/1)) *(*uintptr)(unsafe.Pointer(pzTail)) = zSql + uintptr(Xsqlite3Utf16ByteLen(tls, zSql, chars_parsed)) } Xsqlite3DbFree(tls, db, zSql8) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } // Two versions of the official API. Legacy and new use. In the legacy // version, the original SQL text is not saved in the prepared statement // and so if a schema change occurs, SQLITE_SCHEMA is returned by // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134227:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134239:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), ppStmt, pzTail) // VERIFY: F13021 return rc } func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134251:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), ppStmt, pzTail) // VERIFY: F13021 return rc } //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** // 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 file contains C code routines that are called by the parser // to handle SELECT statements in SQLite. // #include "sqliteInt.h" // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. type DistinctCtx1 = struct { FisTnct U8 FeTnctType U8 F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134292:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** // 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 file contains C code routines that are called by the parser // to handle SELECT statements in SQLite. // #include "sqliteInt.h" // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. type DistinctCtx = DistinctCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134292:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. // // The aDefer[] array is used by the sorter-references optimization. For // example, assuming there is no index that can be used for the ORDER BY, // for the query: // // SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10; // // it may be more efficient to add just the "a" values to the sorter, and // retrieve the associated "bigblob" values directly from table t1 as the // 10 smallest "a" values are extracted from the sorter. // // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. type SortCtx1 = struct { FpOrderBy uintptr FnOBSat int32 FiECursor int32 FregReturn int32 FlabelBkOut int32 FaddrSortIndex int32 FlabelDone int32 FlabelOBLopt int32 FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134318:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. // // The aDefer[] array is used by the sorter-references optimization. For // example, assuming there is no index that can be used for the ORDER BY, // for the query: // // SELECT a, bigblob FROM t1 ORDER BY a LIMIT 10; // // it may be more efficient to add just the "a" values to the sorter, and // retrieve the associated "bigblob" values directly from table t1 as the // 10 smallest "a" values are extracted from the sorter. // // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. type SortCtx = SortCtx1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134318:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134318:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134348:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) Xsqlite3SrcListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpSrc) Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWhere) Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpGroupBy) Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpHaving) Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpOrderBy) Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) if (*Select)(unsafe.Pointer(p)).FpWith != 0 { Xsqlite3WithDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWith) } if (*Select)(unsafe.Pointer(p)).FpWinDefn != 0 { Xsqlite3WindowListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpWinDefn) } for (*Select)(unsafe.Pointer(p)).FpWin != 0 { Xsqlite3WindowUnlinkFromSelect(tls, (*Select)(unsafe.Pointer(p)).FpWin) } if bFree != 0 { Xsqlite3DbFreeNN(tls, db, p) } p = pPrior bFree = 1 } } // Initialize a SelectDest structure. func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134377:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst = uintptr(0) (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = 0 (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = 0 } // Allocate a new Select structure and return a pointer to that // structure. func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134391:23: */ bp := tls.Alloc(128) defer tls.Free(128) var pNew uintptr var pAllocated uintptr // var standin Select at bp, 128 pAllocated = libc.AssignUintptr(&pNew, Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Select{})))) if pNew == uintptr(0) { pNew = bp /* &standin */ } if pEList == uintptr(0) { pEList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_ASTERISK, uintptr(0))) } (*Select)(unsafe.Pointer(pNew)).FpEList = pEList (*Select)(unsafe.Pointer(pNew)).Fop = U8(TK_SELECT) (*Select)(unsafe.Pointer(pNew)).FselFlags = selFlags (*Select)(unsafe.Pointer(pNew)).FiLimit = 0 (*Select)(unsafe.Pointer(pNew)).FiOffset = 0 (*Select)(unsafe.Pointer(pNew)).FselId = U32(libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnSelect, 1)) *(*int32)(unsafe.Pointer(pNew + 20)) = -1 *(*int32)(unsafe.Pointer(pNew + 20 + 1*4)) = -1 (*Select)(unsafe.Pointer(pNew)).FnSelectRow = int16(0) if pSrc == uintptr(0) { pSrc = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(SrcList{}))) } (*Select)(unsafe.Pointer(pNew)).FpSrc = pSrc (*Select)(unsafe.Pointer(pNew)).FpWhere = pWhere (*Select)(unsafe.Pointer(pNew)).FpGroupBy = pGroupBy (*Select)(unsafe.Pointer(pNew)).FpHaving = pHaving (*Select)(unsafe.Pointer(pNew)).FpOrderBy = pOrderBy (*Select)(unsafe.Pointer(pNew)).FpPrior = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpNext = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpLimit = pLimit (*Select)(unsafe.Pointer(pNew)).FpWith = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpWin = uintptr(0) (*Select)(unsafe.Pointer(pNew)).FpWinDefn = uintptr(0) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { clearSelect(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew, libc.Bool32(pNew != bp)) pAllocated = uintptr(0) } else { } return pAllocated } // Delete the given Select structure and all of its substructures. func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134449:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134456:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } return p } // Given 1 to 3 identifiers preceding the JOIN keyword, determine the // type of join. Return an integer constant that expresses that type // in terms of the following bit values: // // JT_INNER // JT_CROSS // JT_OUTER // JT_NATURAL // JT_LEFT // JT_RIGHT // // A full outer join is the combination of JT_LEFT and JT_RIGHT. // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134478:20: */ bp := tls.Alloc(56) defer tls.Free(56) var jointype int32 = 0 // var apAll [3]uintptr at bp+32, 24 var p uintptr var i int32 var j int32 *(*uintptr)(unsafe.Pointer(bp + 32)) = pA *(*uintptr)(unsafe.Pointer(bp + 32 + 1*8)) = pB *(*uintptr)(unsafe.Pointer(bp + 32 + 2*8)) = pC for i = 0; i < 3 && *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*8)) != 0; i++ { p = *(*uintptr)(unsafe.Pointer(bp + 32 + uintptr(i)*8)) for j = 0; j < int32(uint64(unsafe.Sizeof(aKeyword))/uint64(unsafe.Sizeof(struct { Fi U8 FnChar U8 Fcode U8 }{}))); j++ { if (*Token)(unsafe.Pointer(p)).Fn == uint32(aKeyword[j].FnChar) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(p)).Fz, uintptr(unsafe.Pointer(&zKeyText))+uintptr(aKeyword[j].Fi), int32((*Token)(unsafe.Pointer(p)).Fn)) == 0 { jointype = jointype | int32(aKeyword[j].Fcode) break } } if j >= int32(uint64(unsafe.Sizeof(aKeyword))/uint64(unsafe.Sizeof(struct { Fi U8 FnChar U8 Fcode U8 }{}))) { jointype = jointype | JT_ERROR break } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 { var zSp uintptr = ts + 12157 /* " " */ if pC == uintptr(0) { zSp++ } Xsqlite3ErrorMsg(tls, pParse, ts+19652, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, ts+19696, 0) jointype = JT_INNER } return jointype } var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 19751)) /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134483:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 Fcode U8 }{ /* natural */ {FnChar: U8(7), Fcode: U8(JT_NATURAL)}, /* left */ {Fi: U8(6), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_OUTER)}, /* outer */ {Fi: U8(10), FnChar: U8(5), Fcode: U8(JT_OUTER)}, /* right */ {Fi: U8(14), FnChar: U8(5), Fcode: U8(JT_RIGHT | JT_OUTER)}, /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134488:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134539:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr pCol = (*Table)(unsafe.Pointer(pTab)).FaCol i = 0 __1: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __3 } { if int32((*Column)(unsafe.Pointer(pCol)).FhName) == int32(h) && Xsqlite3StrICmp(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName, zCol) == 0 { return i } } goto __2 __2: pCol += 24 i++ goto __1 goto __3 __3: ; return -1 } // Search the first N tables in pSrc, from left to right, looking for a // table that has a column named zCol. // // When found, set *piTab and *piCol to the table index and column index // of the matching column and return TRUE. // // If not found, return FALSE. func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134558:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol // Both or neither are NULL for i = 0; i < N; i++ { iCol = Xsqlite3ColumnIndex(tls, (*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpTab, zCol) if iCol >= 0 && (bIgnoreHidden == 0 || libc.Bool32(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc+8+uintptr(i)*112)).FpTab)).FaCol+uintptr(iCol)*24)).FcolFlags)&COLFLAG_HIDDEN != 0) == 0) { if piTab != 0 { *(*int32)(unsafe.Pointer(piTab)) = i *(*int32)(unsafe.Pointer(piCol)) = iCol } return 1 } } return 0 } // This function is used to add terms implied by JOIN syntax to the // WHERE clause expression of a SELECT statement. The new term, which // is ANDed with the existing WHERE clause, is of the form: // // (tab1.col1 = tab2.col2) // // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134596:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr var pEq uintptr pE1 = Xsqlite3CreateColumnExpr(tls, db, pSrc, iLeft, iColLeft) pE2 = Xsqlite3CreateColumnExpr(tls, db, pSrc, iRight, iColRight) pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, pE1, pE2) // Due to db->mallocFailed test // in sqlite3DbMallocRawNN() called from // sqlite3PExpr(). if pEq != 0 && isOuterJoin != 0 { *(*U32)(unsafe.Pointer(pEq + 4)) |= U32(EP_FromJoin) *(*int32)(unsafe.Pointer(pEq + 52)) = (*Expr)(unsafe.Pointer(pE2)).FiTable } *(*uintptr)(unsafe.Pointer(ppWhere)) = Xsqlite3ExprAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(ppWhere)), pEq) } // Set the EP_FromJoin property on all terms of the given expression. // And set the Expr.w.iRightJoinTable to iTable for every term in the // expression. // // The EP_FromJoin property is used on terms of an expression to tell // the LEFT OUTER JOIN processing logic that this term is part of the // join restriction specified in the ON or USING clause and not a part // of the more general WHERE clause. These terms are moved over to the // WHERE clause during join processing but we need to remember that they // originated in the ON or USING clause. // // The Expr.w.iRightJoinTable tells the WHERE clause processing that the // expression depends on table w.iRightJoinTable even if that table is not // explicitly mentioned in the expression. That information is needed // for cases like this: // // SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5 // // The where clause needs to defer the handling of the t1.x=5 // term until after the t2 loop of the join. In that way, a // NULL t2 row will be inserted whenever t1.x!=5. If we do not // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134658:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) *(*int32)(unsafe.Pointer(p + 52)) = iTable if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_FUNCTION { if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { Xsqlite3SetJoinExpr(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, iTable) } } } Xsqlite3SetJoinExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTable) p = (*Expr)(unsafe.Pointer(p)).FpRight } } // Undo the work of sqlite3SetJoinExpr(). In the expression p, convert every // term that is marked with EP_FromJoin and w.iRightJoinTable==iTable into // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134684:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || *(*int32)(unsafe.Pointer(p + 52)) == iTable) { *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_FromJoin)) } if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(p)).FiTable == iTable { *(*U32)(unsafe.Pointer(p + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_CanBeNull)) } if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_FUNCTION { if *(*uintptr)(unsafe.Pointer(p + 32)) != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32 /* &.x */)))).FnExpr; i++ { unsetJoinExpr(tls, (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 32))+8+uintptr(i)*32)).FpExpr, iTable) } } } unsetJoinExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, iTable) p = (*Expr)(unsafe.Pointer(p)).FpRight } } // This routine processes the join information for a SELECT statement. // ON and USING clauses are converted into extra terms of the WHERE clause. // NATURAL joins also create extra WHERE clause terms. // // The terms of a FROM clause are contained in the Select.pSrc structure. // The left most table is the first entry in Select.pSrc. The right-most // table is the last entry. The join operator is held in the entry to // the left. Thus entry 0 contains the join operator for the join between // entries 0 and 1. Any ON or USING clauses associated with the join are // also attached to the left entry. // // This routine returns the number of errors encountered. func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134721:12: */ bp := tls.Alloc(32) defer tls.Free(32) var pSrc uintptr // All tables in the FROM clause var i int32 var j int32 // Loop counters var pLeft uintptr // Left table being joined var pRight uintptr // Right table being joined pSrc = (*Select)(unsafe.Pointer(p)).FpSrc pLeft = pSrc + 8 pRight = pLeft + 1*112 i = 0 __1: if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc-1) { goto __3 } { var pRightTab uintptr = (*SrcItem)(unsafe.Pointer(pRight)).FpTab var isOuter int32 if (*SrcItem)(unsafe.Pointer(pLeft)).FpTab == uintptr(0) || pRightTab == uintptr(0) { goto __2 } isOuter = libc.Bool32(int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_OUTER != 0) // When the NATURAL keyword is present, add WHERE clause terms for // every column that the two tables have in common. if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+19785, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { var zName uintptr // Name of column in the right table // var iLeft int32 at bp+16, 4 // Matching left table // var iLeftCol int32 at bp+20, 4 // Matching column in the left table if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pRightTab)).FaCol+uintptr(j)*24)).FcolFlags)&COLFLAG_HIDDEN != 0 { continue } zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pRightTab)).FaCol + uintptr(j)*24)).FzCnName if tableAndColumnIndex(tls, pSrc, i+1, zName, bp+16, bp+20, 1) != 0 { addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 16 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 20 /* iLeftCol */)), i+1, j, isOuter, p+48) } } } // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+19835, 0) return 1 } // Add the ON clause to the end of the WHERE clause, connected by // an AND operator. if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 { if isOuter != 0 { Xsqlite3SetJoinExpr(tls, (*SrcItem)(unsafe.Pointer(pRight)).FpOn, (*SrcItem)(unsafe.Pointer(pRight)).FiCursor) } (*Select)(unsafe.Pointer(p)).FpWhere = Xsqlite3ExprAnd(tls, pParse, (*Select)(unsafe.Pointer(p)).FpWhere, (*SrcItem)(unsafe.Pointer(pRight)).FpOn) (*SrcItem)(unsafe.Pointer(pRight)).FpOn = uintptr(0) } // Create extra terms on the WHERE clause for each column named // in the USING clause. Example: If the two tables to be joined are // A and B and the USING clause names X, Y, and Z, then add this // to the WHERE clause: A.X=B.X AND A.Y=B.Y AND A.Z=B.Z // Report an error if any column mentioned in the USING clause is // not contained in both tables to be joined. if (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { var pList uintptr = (*SrcItem)(unsafe.Pointer(pRight)).FpUsing for j = 0; j < (*IdList)(unsafe.Pointer(pList)).FnId; j++ { var zName uintptr // Name of the term in the USING clause // var iLeft int32 at bp+24, 4 // Table on the left with matching column name // var iLeftCol int32 at bp+28, 4 // Column number of matching column on the left var iRightCol int32 // Column number of matching column on the right zName = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa + uintptr(j)*16)).FzName iRightCol = Xsqlite3ColumnIndex(tls, pRightTab, zName) if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+19890, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, isOuter, p+48) } } } goto __2 __2: i++ pRight += 112 pLeft += 112 goto __1 goto __3 __3: ; return 0 } // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. type RowLoadInfo = RowLoadInfo1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134813:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134827:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } // Code the OP_MakeRecord instruction that generates the entry to be // added into the sorter. // // Return the register in which the result is stored. func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134848:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad != 0 { innerLoopLoadRow(tls, pParse, pSelect, (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad) } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regBase+nOBSat, nBase-nOBSat, regOut) return regOut } // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:134869:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms var nBase int32 = nExpr + bSeq + nData // Fields in sorter record var regBase int32 // Regs for sorter record var regRecord int32 = 0 // Assembled sorter record var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat // ORDER BY terms to skip var op int32 // Opcode to add sorter record to sorter var iLimit int32 // LIMIT counter var iSkip int32 = 0 // End of the sorter insert loop // Three cases: // (1) The data to be sorted has already been packed into a Record // by a prior OP_MakeRecord. In this case nData==1 and regData // will be completely unrelated to regOrigData. // (2) All output columns are included in the sort record. In that // case regData==regOrigData. // (3) Some output columns are omitted from the sort record due to // the SQLITE_ENABLE_SORTER_REFERENCE optimization, or due to the // SQLITE_ECEL_OMITREF optimization, or due to the // SortCtx.pDeferredRowLoad optimiation. In any of these cases // regOrigData is 0 to prevent this routine from trying to copy // values that might not yet exist. if nPrefixReg != 0 { regBase = regData - nPrefixReg } else { regBase = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nBase } if (*Select)(unsafe.Pointer(pSelect)).FiOffset != 0 { iLimit = (*Select)(unsafe.Pointer(pSelect)).FiOffset + 1 } else { iLimit = (*Select)(unsafe.Pointer(pSelect)).FiLimit } (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone = Xsqlite3VdbeMakeLabel(tls, pParse) Xsqlite3ExprCodeExprList(tls, pParse, (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy, regBase, regOrigData, uint8(SQLITE_ECEL_DUP|func() int32 { if regOrigData != 0 { return SQLITE_ECEL_REF } return 0 }())) if bSeq != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Sequence, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor, regBase+nExpr) } if nPrefixReg == 0 && nData > 0 { Xsqlite3ExprCodeMove(tls, pParse, regData, regBase+nExpr+bSeq, nData) } if nOBSat > 0 { var regPrevKey int32 // The first nOBSat columns of the previous row var addrFirst int32 // Address of the OP_IfNot opcode var addrJmp int32 // Address of the OP_Jump opcode var pOp uintptr // Opcode that opens the sorter var nKey int32 // Number of sorting key columns, including OP_Sequence var pKI uintptr // Original KeyInfo on the sorter table regRecord = makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase) regPrevKey = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat nKey = nExpr - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat + bSeq if bSeq != 0 { addrFirst = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regBase+nExpr) } else { addrFirst = Xsqlite3VdbeAddOp1(tls, v, OP_SequenceTest, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor) } Xsqlite3VdbeAddOp3(tls, v, OP_Compare, regPrevKey, regBase, (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) pOp = Xsqlite3VdbeGetOp(tls, v, (*SortCtx)(unsafe.Pointer(pSort)).FaddrSortIndex) if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return } (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = nKey + nData pKI = *(*uintptr)(unsafe.Pointer(pOp + 16)) libc.Xmemset(tls, (*KeyInfo)(unsafe.Pointer(pKI)).FaSortFlags, 0, uint64((*KeyInfo)(unsafe.Pointer(pKI)).FnKeyField)) // Makes OP_Jump testable Xsqlite3VdbeChangeP4(tls, v, -1, pKI, -9) *(*uintptr)(unsafe.Pointer(pOp + 16)) = Xsqlite3KeyInfoFromExprList(tls, pParse, (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy, nOBSat, int32((*KeyInfo)(unsafe.Pointer(pKI)).FnAllField)-int32((*KeyInfo)(unsafe.Pointer(pKI)).FnKeyField)-1) pOp = uintptr(0) // Ensure pOp not used after sqltie3VdbeAddOp3() addrJmp = Xsqlite3VdbeCurrentAddr(tls, v) Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addrJmp+1, 0, addrJmp+1) (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut = Xsqlite3VdbeMakeLabel(tls, pParse) (*SortCtx)(unsafe.Pointer(pSort)).FregReturn = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor) if iLimit != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, iLimit, (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone) } Xsqlite3VdbeJumpHere(tls, v, addrFirst) Xsqlite3ExprCodeMove(tls, pParse, regBase, regPrevKey, (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) Xsqlite3VdbeJumpHere(tls, v, addrJmp) } if iLimit != 0 { // At this point the values for the new sorter entry are stored // in an array of registers. They need to be composed into a record // and inserted into the sorter if either (a) there are currently // less than LIMIT+OFFSET items or (b) the new record is smaller than // the largest record currently in the sorter. If (b) is true and there // are already LIMIT+OFFSET items in the sorter, delete the largest // entry before inserting the new one. This way there are never more // than LIMIT+OFFSET items in the sorter. // // If the new record does not need to be inserted into the sorter, // jump to the next iteration of the loop. If the pSort->labelOBLopt // value is not zero, then it is a label of where to jump. Otherwise, // just bypass the row insert logic. See the header comment on the // sqlite3WhereOrderByLimitOptLabel() function for additional info. var iCsr int32 = (*SortCtx)(unsafe.Pointer(pSort)).FiECursor Xsqlite3VdbeAddOp2(tls, v, OP_IfNotZero, iLimit, Xsqlite3VdbeCurrentAddr(tls, v)+4) Xsqlite3VdbeAddOp2(tls, v, OP_Last, iCsr, 0) iSkip = Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxLE, iCsr, 0, regBase+nOBSat, nExpr-nOBSat) Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iCsr) } if regRecord == 0 { regRecord = makeSorterRecord(tls, pParse, pSort, pSelect, regBase, nBase) } if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { op = OP_SorterInsert } else { op = OP_IdxInsert } Xsqlite3VdbeAddOp4Int(tls, v, op, (*SortCtx)(unsafe.Pointer(pSort)).FiECursor, regRecord, regBase+nOBSat, nBase-nOBSat) if iSkip != 0 { Xsqlite3VdbeChangeP2(tls, v, iSkip, func() int32 { if (*SortCtx)(unsafe.Pointer(pSort)).FlabelOBLopt != 0 { return (*SortCtx)(unsafe.Pointer(pSort)).FlabelOBLopt } return Xsqlite3VdbeCurrentAddr(tls, v) }()) } } // Add code to implement the OFFSET func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135011:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) } } // Add code that will check to make sure the array of registers starting at // iMem form a distinct entry. This is used by both "SELECT DISTINCT ..." and // distinct aggregates ("SELECT count(DISTINCT <expr>) ..."). Three strategies // are available. Which is used depends on the value of parameter eTnctType, // as follows: // // WHERE_DISTINCT_UNORDERED/WHERE_DISTINCT_NOOP: // Build an ephemeral table that contains all entries seen before and // skip entries which have been seen before. // // Parameter iTab is the cursor number of an ephemeral table that must // be opened before the VM code generated by this routine is executed. // The ephemeral cursor table is queried for a record identical to the // record formed by the current array of registers. If one is found, // jump to VM address addrRepeat. Otherwise, insert a new record into // the ephemeral cursor and proceed. // // The returned value in this case is a copy of parameter iTab. // // WHERE_DISTINCT_ORDERED: // In this case rows are being delivered sorted order. The ephermal // table is not required. Instead, the current set of values // is compared against previous row. If they match, the new row // is not distinct and control jumps to VM address addrRepeat. Otherwise, // the VM program proceeds with processing the new row. // // The returned value in this case is the register number of the first // in an array of registers used to store the previous result row so that // it can be compared to the next. The caller must ensure that this // register is initialized to NULL. (The fixDistinctOpenEph() routine // will take care of this initialization.) // // WHERE_DISTINCT_UNIQUE: // In this case it has already been determined that the rows are distinct. // No special action is required. The return value is zero. // // Parameter pEList is the list of expressions used to generated the // contents of each row. It is used by this routine to determine (a) // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135065:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe switch eTnctType { case WHERE_DISTINCT_ORDERED: { var i int32 var iJump int32 // Jump destination var regPrev int32 // Previous row content // Allocate space for the previous row iRet = libc.AssignInt32(®Prev, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol iJump = Xsqlite3VdbeCurrentAddr(tls, v) + nResultCol for i = 0; i < nResultCol; i++ { var pColl uintptr = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) if i < nResultCol-1 { Xsqlite3VdbeAddOp3(tls, v, OP_Ne, regElem+i, iJump, regPrev+i) } else { Xsqlite3VdbeAddOp3(tls, v, OP_Eq, regElem+i, addrRepeat, regPrev+i) } Xsqlite3VdbeChangeP4(tls, v, -1, pColl, -2) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NULLEQ)) } Xsqlite3VdbeAddOp3(tls, v, OP_Copy, regElem, regPrev, nResultCol-1) break } case WHERE_DISTINCT_UNIQUE: { // nothing to do break } default: { var r1 int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iTab, addrRepeat, regElem, nResultCol) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regElem, nResultCol, r1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r1, regElem, nResultCol) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) Xsqlite3ReleaseTempReg(tls, pParse, r1) iRet = iTab break } } return iRet } // This routine runs after codeDistinct(). It makes necessary // adjustments to the OP_OpenEphemeral opcode that the codeDistinct() // routine made use of. This processing must be done separately since // sometimes codeDistinct is called before the OP_OpenEphemeral is actually // laid down. // // WHERE_DISTINCT_NOOP: // WHERE_DISTINCT_UNORDERED: // // No adjustments necessary. This function is a no-op. // // WHERE_DISTINCT_UNIQUE: // // The ephemeral table is not needed. So change the // OP_OpenEphemeral opcode into an OP_Noop. // // WHERE_DISTINCT_ORDERED: // // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135149:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe Xsqlite3VdbeChangeToNoop(tls, v, iOpenEphAddr) if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, iOpenEphAddr+1))).Fopcode) == OP_Explain { Xsqlite3VdbeChangeToNoop(tls, v, iOpenEphAddr+1) } if eTnctType == WHERE_DISTINCT_ORDERED { // Change the OP_OpenEphemeral to an OP_Null that sets the MEM_Cleared // bit on the first register of the previous value. This will cause the // OP_Ne added in codeDistinct() to always fail on the first iteration of // the loop even if the first row is all NULLs. var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iOpenEphAddr) (*VdbeOp)(unsafe.Pointer(pOp)).Fopcode = U8(OP_Null) (*VdbeOp)(unsafe.Pointer(pOp)).Fp1 = 1 (*VdbeOp)(unsafe.Pointer(pOp)).Fp2 = iVal } } } // This routine generates the code for the inside of the inner loop // of a SELECT. // // If srcTab is negative, then the p->pEList expressions // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135271:13: */ bp := tls.Alloc(8) defer tls.Free(8) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var hasDistinct int32 // True if the DISTINCT keyword is present var eDest int32 = int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) // How to dispose of results var iParm int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm // First argument to disposal method var nResultCol int32 // Number of result columns var nPrefixReg int32 = 0 // Number of extra registers before regResult // var sRowLoadInfo RowLoadInfo at bp, 8 // Info for deferred row loading // Usually, regResult is the first cell in an array of memory cells // containing the current result row. In this case regOrig is set to the // same value. However, if the results are being sent to the sorter, the // values for any expressions that are also part of the sort-key are omitted // from this array. In this case regOrig is set to zero. var regResult int32 // Start of memory holding current results var regOrig int32 // Start of memory holding full result (or 0) if pDistinct != 0 { hasDistinct = int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType) } else { hasDistinct = WHERE_DISTINCT_NOOP } if pSort != 0 && (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy == uintptr(0) { pSort = uintptr(0) } if pSort == uintptr(0) && !(hasDistinct != 0) { codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) } // Pull the requested columns. nResultCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst == 0 { if pSort != 0 { nPrefixReg = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr if !(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0) { nPrefixReg++ } *(*int32)(unsafe.Pointer(pParse + 56)) += nPrefixReg } (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol } else if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst+nResultCol > (*Parse)(unsafe.Pointer(pParse)).FnMem { // This is an error condition that can result, for example, when a SELECT // on the right-hand side of an INSERT contains more result columns than // there are columns in the table on the left. The error will be caught // and reported later. But we need to make sure enough memory is allocated // to avoid other spurious errors in the meantime. *(*int32)(unsafe.Pointer(pParse + 56)) += nResultCol } (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = nResultCol regOrig = libc.AssignInt32(®Result, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst) if srcTab >= 0 { for i = 0; i < nResultCol; i++ { Xsqlite3VdbeAddOp3(tls, v, OP_Column, srcTab, i, regResult+i) } } else if eDest != SRT_Exists { // If the destination is an EXISTS(...) expression, the actual // values returned by the SELECT are not required. var ecelFlags U8 // "ecel" is an abbreviation of "ExprCodeExprList" var pEList uintptr if eDest == SRT_Mem || eDest == SRT_Output || eDest == SRT_Coroutine { ecelFlags = U8(SQLITE_ECEL_DUP) } else { ecelFlags = U8(0) } if pSort != 0 && hasDistinct == 0 && eDest != SRT_EphemTab && eDest != SRT_Table { // For each expression in p->pEList that is a copy of an expression in // the ORDER BY clause (pSort->pOrderBy), set the associated // iOrderByCol value to one more than the index of the ORDER BY // expression within the sort-key that pushOntoSorter() will generate. // This allows the p->pEList field to be omitted from the sorted record, // saving space and CPU cycles. ecelFlags = U8(int32(ecelFlags) | (SQLITE_ECEL_OMITREF | SQLITE_ECEL_REF)) for i = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat; i < (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr; i++ { var j int32 if libc.AssignInt32(&j, int32(*(*U16)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy + 8 + uintptr(i)*32 + 24)))) > 0 { *(*U16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList + 8 + uintptr(j-1)*32 + 24)) = U16(i + 1 - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat) } } // Adjust nResultCol to account for columns that are omitted // from the sorter by the optimizations in this branch pEList = (*Select)(unsafe.Pointer(p)).FpEList for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if int32(*(*U16)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 24))) > 0 { nResultCol-- regOrig = 0 } } } (*RowLoadInfo)(unsafe.Pointer(bp /* &sRowLoadInfo */)).FregResult = regResult (*RowLoadInfo)(unsafe.Pointer(bp /* &sRowLoadInfo */)).FecelFlags = ecelFlags if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && int32(ecelFlags)&SQLITE_ECEL_OMITREF != 0 && nPrefixReg > 0 { (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad = bp /* &sRowLoadInfo */ regOrig = 0 } else { innerLoopLoadRow(tls, pParse, p, bp) } } // If the DISTINCT keyword was present on the SELECT statement // and this row has been seen before, then do not make this row // part of the result. if hasDistinct != 0 { var eType int32 = int32((*DistinctCtx)(unsafe.Pointer(pDistinct)).FeTnctType) var iTab int32 = (*DistinctCtx)(unsafe.Pointer(pDistinct)).FtabTnct iTab = codeDistinct(tls, pParse, eType, iTab, iContinue, (*Select)(unsafe.Pointer(p)).FpEList, regResult) fixDistinctOpenEph(tls, pParse, eType, iTab, (*DistinctCtx)(unsafe.Pointer(pDistinct)).FaddrTnct) if pSort == uintptr(0) { codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) } } switch eDest { // In this mode, write each query result to the key of the temporary // table iParm. case SRT_Union: { var r1 int32 r1 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, nResultCol) Xsqlite3ReleaseTempReg(tls, pParse, r1) break } // Construct a record from the query result, but instead of // saving that record, use it as a key to delete elements from // the temporary table iParm. case SRT_Except: { Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, iParm, regResult, nResultCol) break } // Store the result as data using a unique key. case SRT_Fifo: fallthrough case SRT_DistFifo: fallthrough case SRT_Table: fallthrough case SRT_EphemTab: { var r1 int32 = Xsqlite3GetTempRange(tls, pParse, nPrefixReg+1) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r1+nPrefixReg) if eDest == SRT_DistFifo { // If the destination is DistFifo, then cursor (iParm+1) is open // on an ephemeral index. If the current row is already present // in the index, do not write it to the output. If not, add the // current row to the index and proceed with writing it to the // output table as well. var addr int32 = Xsqlite3VdbeCurrentAddr(tls, v) + 4 Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, addr, r1, 0) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm+1, r1, regResult, nResultCol) } if pSort != 0 { pushOntoSorter(tls, pParse, pSort, p, r1+nPrefixReg, regOrig, 1, nPrefixReg) } else { var r2 int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iParm, r2) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, r2) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) Xsqlite3ReleaseTempReg(tls, pParse, r2) } Xsqlite3ReleaseTempRange(tls, pParse, r1, nPrefixReg+1) break } case SRT_Upfrom: { if pSort != 0 { pushOntoSorter(tls, pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) } else { var i2 int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 var r1 int32 = Xsqlite3GetTempReg(tls, pParse) // If the UPDATE FROM join is an aggregate that matches no rows, it // might still be trying to return one row, because that is what // aggregates do. Don't record that empty row in the output table. Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, regResult, iBreak) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult+libc.Bool32(i2 < 0), nResultCol-libc.Bool32(i2 < 0), r1) if i2 < 0 { Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, regResult) } else { Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, i2) } } break } // If we are creating a set for an "expr IN (SELECT ...)" construct, // then there should be a single item on the stack. Write this // item into the set table with bogus data. case SRT_Set: { if pSort != 0 { // At first glance you would think we could optimize out the // ORDER BY in this case since the order of entries in the set // does not matter. But there might be a LIMIT clause, in which // case the order does matter pushOntoSorter(tls, pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) } else { var r1 int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regResult, nResultCol, r1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nResultCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regResult, nResultCol) Xsqlite3ReleaseTempReg(tls, pParse, r1) } break } // If any row exist in the result set, record that fact and abort. case SRT_Exists: { Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, iParm) // The LIMIT clause will terminate the loop for us break } // If this is a scalar select that is part of an expression, then // store the results in the appropriate memory cell or array of // memory cells and break out of the scan loop. case SRT_Mem: { if pSort != 0 { pushOntoSorter(tls, pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) } else { // The LIMIT clause will jump out of the loop for us } break } case SRT_Coroutine: fallthrough // Send data to a co-routine case SRT_Output: { // Return the results if pSort != 0 { pushOntoSorter(tls, pParse, pSort, p, regResult, regOrig, nResultCol, nPrefixReg) } else if eDest == SRT_Coroutine { Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) } else { Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, nResultCol) } break } // Write the results into a priority queue that is order according to // pDest->pOrderBy (in pSO). pDest->iSDParm (in iParm) is the cursor for an // index with pSO->nExpr+2 columns. Build a key using pSO for the first // pSO->nExpr columns, then make sure all keys are unique by adding a // final OP_Sequence column. The last column is the record as a blob. case SRT_DistQueue: fallthrough case SRT_Queue: { var nKey int32 var r1 int32 var r2 int32 var r3 int32 var addrTest int32 = 0 var pSO uintptr pSO = (*SelectDest)(unsafe.Pointer(pDest)).FpOrderBy nKey = (*ExprList)(unsafe.Pointer(pSO)).FnExpr r1 = Xsqlite3GetTempReg(tls, pParse) r2 = Xsqlite3GetTempRange(tls, pParse, nKey+2) r3 = r2 + nKey + 1 if eDest == SRT_DistQueue { // If the destination is DistQueue, then cursor (iParm+1) is open // on a second ephemeral index that holds all values every previously // added to the queue. addrTest = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iParm+1, 0, regResult, nResultCol) } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regResult, nResultCol, r3) if eDest == SRT_DistQueue { Xsqlite3VdbeAddOp2(tls, v, OP_IdxInsert, iParm+1, r3) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_USESEEKRESULT)) } for i = 0; i < nKey; i++ { Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regResult+int32(*(*U16)(unsafe.Pointer(pSO + 8 + uintptr(i)*32 + 24)))-1, r2+i) } Xsqlite3VdbeAddOp2(tls, v, OP_Sequence, iParm, r2+nKey) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, r2, nKey+2, r1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, r2, nKey+2) if addrTest != 0 { Xsqlite3VdbeJumpHere(tls, v, addrTest) } Xsqlite3ReleaseTempReg(tls, pParse, r1) Xsqlite3ReleaseTempRange(tls, pParse, r2, nKey+2) break } // Discard the results. This is used for SELECT statements inside // the body of a TRIGGER. The purpose of such selects is to call // user-defined functions that have side effects. We do not care // about the actual results of the select. default: { break } } // Jump to the end of the loop if the LIMIT is reached. Except, if // there is a sorter, in which case the sorter has already limited // the output for us. if pSort == uintptr(0) && (*Select)(unsafe.Pointer(p)).FiLimit != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, (*Select)(unsafe.Pointer(p)).FiLimit, iBreak) } } // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135665:24: */ var nExtra int32 = int32(uint64(N+X)*(uint64(unsafe.Sizeof(uintptr(0)))+uint64(1)) - uint64(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(KeyInfo{}))+uint64(nExtra)) if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FaSortFlags = p + 32 + uintptr(N+X)*8 (*KeyInfo)(unsafe.Pointer(p)).FnKeyField = U16(N) (*KeyInfo)(unsafe.Pointer(p)).FnAllField = U16(N + X) (*KeyInfo)(unsafe.Pointer(p)).Fenc = (*Sqlite3)(unsafe.Pointer(db)).Fenc (*KeyInfo)(unsafe.Pointer(p)).Fdb = db (*KeyInfo)(unsafe.Pointer(p)).FnRef = U32(1) libc.Xmemset(tls, p+1*40, 0, uint64(nExtra)) } else { return Xsqlite3OomFault(tls, db) } return p } // Deallocate a KeyInfo object func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135685:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- if (*KeyInfo)(unsafe.Pointer(p)).FnRef == U32(0) { Xsqlite3DbFreeNN(tls, (*KeyInfo)(unsafe.Pointer(p)).Fdb, p) } } } // Make a new pointer to a KeyInfo object func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135696:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ } return p } // Given an expression list, generate a KeyInfo structure that records // the collating sequence for each expression in that expression list. // // If the ExprList is an ORDER BY or GROUP BY clause then the resulting // KeyInfo structure is appropriate for initializing a virtual index to // implement that clause. If the ExprList is the result set of a SELECT // then the KeyInfo structure is appropriate for initializing a virtual // index to implement a DISTINCT test. // // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135728:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 nExpr = (*ExprList)(unsafe.Pointer(pList)).FnExpr pInfo = Xsqlite3KeyInfoAlloc(tls, db, nExpr-iStart, nExtra+1) if pInfo != 0 { i = iStart pItem = pList + 8 + uintptr(iStart)*32 __1: if !(i < nExpr) { goto __3 } { *(*uintptr)(unsafe.Pointer(pInfo + 32 + uintptr(i-iStart)*8)) = Xsqlite3ExprNNCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pInfo)).FaSortFlags + uintptr(i-iStart))) = (*ExprList_item)(unsafe.Pointer(pItem)).FsortFlags } goto __2 __2: i++ pItem += 32 goto __1 goto __3 __3: } return pInfo } // Name of the connection operator, used for error messages. func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135755:27: */ var z uintptr switch id { case TK_ALL: z = ts + 19954 /* "UNION ALL" */ break case TK_INTERSECT: z = ts + 19964 /* "INTERSECT" */ break case TK_EXCEPT: z = ts + 19974 /* "EXCEPT" */ break default: z = ts + 19981 /* "UNION" */ break } return z } // Unless an "EXPLAIN QUERY PLAN" command is being processed, this function // is a no-op. Otherwise, it adds a single row of output to the EQP result, // where the caption is of the form: // // "USE TEMP B-TREE FOR xxx" // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135777:13: */ bp := tls.Alloc(8) defer tls.Free(8) Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19987, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro // is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code // in sqlite3Select() to assign values to structure member variables that // only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the // code with #ifndef directives. // If the inner loop was generated using a non-null pOrderBy argument, // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:135803:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle var addr int32 // Top of output loop. Jump for Next. var addrOnce int32 = 0 var iTab int32 var pOrderBy uintptr = (*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy var eDest int32 = int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) var iParm int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm var regRow int32 var regRowid int32 var iCol int32 var nKey int32 // Number of key columns in sorter record var iSortTab int32 // Sorter cursor to read from var i int32 var bSeq int32 // True if sorter record includes seq. no. var nRefKey int32 = 0 var aOutEx uintptr = (*Select)(unsafe.Pointer(p)).FpEList + 8 /* &.a */ if (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) Xsqlite3VdbeGoto(tls, v, addrBreak) Xsqlite3VdbeResolveLabel(tls, v, (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut) } iTab = (*SortCtx)(unsafe.Pointer(pSort)).FiECursor if eDest == SRT_Output || eDest == SRT_Coroutine || eDest == SRT_Mem { if eDest == SRT_Mem && (*Select)(unsafe.Pointer(p)).FiOffset != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst) } regRowid = 0 regRow = (*SelectDest)(unsafe.Pointer(pDest)).FiSdst } else { regRowid = Xsqlite3GetTempReg(tls, pParse) if eDest == SRT_EphemTab || eDest == SRT_Table { regRow = Xsqlite3GetTempReg(tls, pParse) nColumn = 0 } else { regRow = Xsqlite3GetTempRange(tls, pParse, nColumn) } } nKey = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr - (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { var regSortOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) iSortTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) if (*SortCtx)(unsafe.Pointer(pSort)).FlabelBkOut != 0 { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) } Xsqlite3VdbeAddOp3(tls, v, OP_OpenPseudo, iSortTab, regSortOut, nKey+1+nColumn+nRefKey) if addrOnce != 0 { Xsqlite3VdbeJumpHere(tls, v, addrOnce) } addr = 1 + Xsqlite3VdbeAddOp2(tls, v, OP_SorterSort, iTab, addrBreak) codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, addrContinue) Xsqlite3VdbeAddOp3(tls, v, OP_SorterData, iTab, regSortOut, iSortTab) bSeq = 0 } else { addr = 1 + Xsqlite3VdbeAddOp2(tls, v, OP_Sort, iTab, addrBreak) codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, addrContinue) iSortTab = iTab bSeq = 1 } i = 0 iCol = nKey + bSeq - 1 for ; i < nColumn; i++ { if int32(*(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24))) == 0 { iCol++ } } for i = nColumn - 1; i >= 0; i-- { { var iRead int32 if *(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24)) != 0 { iRead = int32(*(*U16)(unsafe.Pointer(aOutEx + uintptr(i)*32 + 24))) - 1 } else { iRead = libc.PostDecInt32(&iCol, 1) } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iSortTab, iRead, regRow+i) } } switch eDest { case SRT_Table: fallthrough case SRT_EphemTab: { Xsqlite3VdbeAddOp3(tls, v, OP_Column, iSortTab, nKey+bSeq, regRow) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iParm, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, regRow, regRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) break } case SRT_Set: { Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regRow, nColumn, regRowid, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, nColumn) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, regRowid, regRow, nColumn) break } case SRT_Mem: { // The LIMIT clause will terminate the loop for us break } case SRT_Upfrom: { var i2 int32 = (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 var r1 int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regRow+libc.Bool32(i2 < 0), nColumn-libc.Bool32(i2 < 0), r1) if i2 < 0 { Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iParm, r1, regRow) } else { Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iParm, r1, regRow, i2) } break } default: { if eDest == SRT_Output { Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst, nColumn) } else { Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) } break } } if regRowid != 0 { if eDest == SRT_Set { Xsqlite3ReleaseTempRange(tls, pParse, regRow, nColumn) } else { Xsqlite3ReleaseTempReg(tls, pParse, regRow) } Xsqlite3ReleaseTempReg(tls, pParse, regRowid) } // The bottom of the loop Xsqlite3VdbeResolveLabel(tls, v, addrContinue) if int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_SorterNext, iTab, addr) } else { Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr) } if (*SortCtx)(unsafe.Pointer(pSort)).FregReturn != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_Return, (*SortCtx)(unsafe.Pointer(pSort)).FregReturn) } Xsqlite3VdbeResolveLabel(tls, v, addrBreak) } // Return a pointer to a string containing the 'declaration type' of the // expression pExpr. The string may be treated as static by the caller. // // Also try to estimate the size of the returned value and return that // result in *pEstWidth. // // The declaration type is the exact datatype definition extracted from the // original CREATE TABLE statement if the expression is a column. The // declaration type for a ROWID field is INTEGER. Exactly when an expression // is considered a column can be complex in the presence of subqueries. The // result-set expression in all of the following SELECT statements is // considered a column by this function. // // SELECT col FROM tbl; // SELECT (SELECT col FROM tbl; // SELECT (SELECT col FROM tbl); // SELECT abc FROM (SELECT col AS abc FROM tbl); // // The declaration type for any expression other than a column is NULL. // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136031:19: */ bp := tls.Alloc(136) defer tls.Free(136) var zType uintptr = uintptr(0) var j int32 *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = uintptr(0) switch int32((*Expr)(unsafe.Pointer(pExpr)).Fop) { case TK_COLUMN: { // The expression is a column. Locate the table the column is being // extracted from in NameContext.pSrcList. This table may be real // database table or a subquery. var pTab uintptr = uintptr(0) // Table structure column is extracted from var pS uintptr = uintptr(0) // Select the column is extracted from var iCol int32 = int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) // Index of column in pTab for pNC != 0 && !(pTab != 0) { var pTabList uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpSrcList for j = 0; j < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc && (*SrcItem)(unsafe.Pointer(pTabList+8 /* &.a */ +uintptr(j)*112)).FiCursor != (*Expr)(unsafe.Pointer(pExpr)).FiTable; j++ { } if j < (*SrcList)(unsafe.Pointer(pTabList)).FnSrc { pTab = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(j)*112)).FpTab pS = (*SrcItem)(unsafe.Pointer(pTabList + 8 + uintptr(j)*112)).FpSelect } else { pNC = (*NameContext)(unsafe.Pointer(pNC)).FpNext } } if pTab == uintptr(0) { // At one time, code such as "SELECT new.x" within a trigger would // cause this condition to run. Since then, we have restructured how // trigger code is generated and so this condition is no longer // possible. However, it can still be true for statements like // the following: // // CREATE TABLE t1(col INTEGER); // SELECT (SELECT t1.col) FROM FROM t1; // // when columnType() is called on the expression "t1.col" in the // sub-select. In this case, set the column type to NULL, even // though it should really be "INTEGER". // // This is not a problem, as the column type of "t1.col" is never // used. When columnType() is called on the expression // "(SELECT t1.col)", the correct type is returned (see the TK_SELECT // branch below. break } if pS != 0 { // The "table" is actually a sub-select or a view in the FROM clause // of the SELECT statement. Return the declaration type and origin // data for the result-set column of the sub-select. if iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList)).FnExpr && iCol >= 0 { // If iCol is less than zero, then the expression requests the // rowid of the sub-select or view. This expression is legal (see // test case misc2.2.2) - it always evaluates to NULL. // var sNC NameContext at bp, 56 var p uintptr = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList + 8 + uintptr(iCol)*32)).FpExpr (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = pNC (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse zType = columnTypeImpl(tls, bp, p, bp+56, bp+64, bp+72) } } else { // A real table or a CTE table if iCol < 0 { iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) } if iCol < 0 { zType = ts + 1089 /* "INTEGER" */ *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = ts + 17532 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*24, uintptr(0)) } *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = (*Table)(unsafe.Pointer(pTab)).FzName if (*NameContext)(unsafe.Pointer(pNC)).FpParse != 0 && (*Table)(unsafe.Pointer(pTab)).FpSchema != 0 { var iDb int32 = Xsqlite3SchemaToIndex(tls, (*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(pNC)).FpParse)).Fdb, (*Table)(unsafe.Pointer(pTab)).FpSchema) *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(pNC)).FpParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName } } break } case TK_SELECT: { // The expression is a sub-select. Return the declaration type and // origin info for the single column in the result set of the SELECT // statement. // var sNC NameContext at bp+80, 56 var pS uintptr var p uintptr pS = *(*uintptr)(unsafe.Pointer(pExpr + 32)) p = (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pS)).FpEList + 8)).FpExpr (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpNext = pNC (*NameContext)(unsafe.Pointer(bp + 80 /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse zType = columnTypeImpl(tls, bp+80, p, bp+56, bp+64, bp+72) break } } if pzOrigDb != 0 { *(*uintptr)(unsafe.Pointer(pzOrigDb)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) *(*uintptr)(unsafe.Pointer(pzOrigTab)) = *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) *(*uintptr)(unsafe.Pointer(pzOrigCol)) = *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) } return zType } // Generate code that will tell the VDBE the declaration types of columns // in the result set. func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136182:13: */ bp := tls.Alloc(80) defer tls.Free(80) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 // var sNC NameContext at bp, 56 (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = pTabList (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = uintptr(0) for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { var p uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr var zType uintptr *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)) = uintptr(0) zType = columnTypeImpl(tls, bp, p, bp+56, bp+64, bp+72) // The vdbe must make its own copy of the column-type and other // column specific strings, in case the schema is reset before this // virtual machine is deleted. Xsqlite3VdbeSetColName(tls, v, i, COLNAME_DATABASE, *(*uintptr)(unsafe.Pointer(bp + 56 /* zOrigDb */)), libc.UintptrFromInt32(-1)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_TABLE, *(*uintptr)(unsafe.Pointer(bp + 64 /* zOrigTab */)), libc.UintptrFromInt32(-1)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_COLUMN, *(*uintptr)(unsafe.Pointer(bp + 72 /* zOrigCol */)), libc.UintptrFromInt32(-1)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_DECLTYPE, zType, libc.UintptrFromInt32(-1)) } } // Compute the column names for a SELECT statement. // // The only guarantee that SQLite makes about column names is that if the // column has an AS clause assigning it a name, that will be the name used. // That is the only documented guarantee. However, countless applications // developed over the years have made baseless assumptions about column names // and will break if those assumptions changes. Hence, use extreme caution // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3ColumnsFromExprList() // // The PRAGMA short_column_names and PRAGMA full_column_names settings are // deprecated. The default setting is short=ON, full=OFF. 99.9% of all // applications should operate this way. Nevertheless, we need to support the // other modes for legacy: // // short=OFF, full=OFF: Column name is the text of the expression has it // originally appears in the SELECT statement. In // other words, the zSpan of the result expression. // // short=ON, full=OFF: (This is the default setting). If the result // refers directly to a table column, then the // result column name is just the table column // name: COLUMN. Otherwise use zSpan. // // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136249:21: */ bp := tls.Alloc(24) defer tls.Free(24) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pTab uintptr var pTabList uintptr var pEList uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var fullName int32 // TABLE.COLUMN if no AS clause and is a direct table ref var srcName int32 // COLUMN or TABLE.COLUMN if no AS clause and is direct // If this is an EXPLAIN, skip this step if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 { return } if (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet != 0 { return } // Column names are determined by the left-most term of a compound select for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior } pTabList = (*Select)(unsafe.Pointer(pSelect)).FpSrc pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) fullName = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_FullColNames) != uint64(0)) srcName = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ShortColNames) != uint64(0) || fullName != 0) Xsqlite3VdbeSetNumCols(tls, v, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { var p uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FpExpr // Agg processing has not run yet // Covering idx not yet coded if (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName != 0 && int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { // An AS clause always takes first priority var zName uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, libc.UintptrFromInt32(-1)) } else if srcName != 0 && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN { var zCol uintptr var iCol int32 = int32((*Expr)(unsafe.Pointer(p)).FiColumn) pTab = *(*uintptr)(unsafe.Pointer(p + 64)) if iCol < 0 { iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) } if iCol < 0 { zCol = ts + 17532 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) zName = Xsqlite3MPrintf(tls, db, ts+13298, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) } } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName if z == uintptr(0) { z = Xsqlite3MPrintf(tls, db, ts+20010, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, z, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr }{Xsqlite3OomFault}))) } } generateColumnTypes(tls, pParse, pTabList, pEList) } // Given an expression list (which is really the list of expressions // that form the result set of a SELECT statement) compute appropriate // column names for a table that would hold the expression list. // // All column names will be unique. // // Only the column names are computed. Column.zType, Column.zColl, // and other fields of Column are zeroed. // // Return SQLITE_OK on success. If a memory allocation error occurs, // store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM. // // The only guarantee that SQLite makes about column names is that if the // column has an AS clause assigning it a name, that will be the name used. // That is the only documented guarantee. However, countless applications // developed over the years have made baseless assumptions about column names // and will break if those assumptions changes. Hence, use extreme caution // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136342:20: */ bp := tls.Alloc(60) defer tls.Free(60) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection var i int32 var j int32 // Loop counters // var cnt U32 at bp+56, 4 // Index added to make the name unique var aCol uintptr var pCol uintptr // For looping over result columns var nCol int32 // Number of columns in the result set var zName uintptr // Column name var nName int32 // Size of name in zName[] // var ht Hash at bp+32, 24 // Hash table of column names var pTab uintptr Xsqlite3HashInit(tls, bp+32) if pEList != 0 { nCol = (*ExprList)(unsafe.Pointer(pEList)).FnExpr aCol = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Column{}))*uint64(nCol)) if nCol > 32767 { nCol = 32767 } } else { nCol = 0 aCol = uintptr(0) } *(*I16)(unsafe.Pointer(pnCol)) = I16(nCol) *(*uintptr)(unsafe.Pointer(paCol)) = aCol i = 0 pCol = aCol __1: if !(i < nCol && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0)) { goto __3 } { // Get an appropriate name for the column if libc.AssignUintptr(&zName, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FzEName) != uintptr(0) && int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*32 + 20))&0x3>>0) == ENAME_NAME { // If the column contains an "AS <name>" phrase, use <name> as the name } else { var pColExpr uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*32)).FpExpr) for pColExpr != uintptr(0) && int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_DOT { pColExpr = (*Expr)(unsafe.Pointer(pColExpr)).FpRight } if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pColExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && libc.AssignUintptr(&pTab, *(*uintptr)(unsafe.Pointer(pColExpr + 64))) != uintptr(0) { // For columns use the column name name var iCol int32 = int32((*Expr)(unsafe.Pointer(pColExpr)).FiColumn) if iCol < 0 { iCol = int32((*Table)(unsafe.Pointer(pTab)).FiPKey) } if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*24)).FzCnName } else { zName = ts + 17532 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { zName = *(*uintptr)(unsafe.Pointer(pColExpr + 8)) } else { // Use the original text of the column expression as its name zName = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*32)).FzEName } } if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { zName = Xsqlite3MPrintf(tls, db, ts+20010, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, // append an integer to the name so that it becomes unique. *(*U32)(unsafe.Pointer(bp + 56 /* cnt */)) = U32(0) for zName != 0 && Xsqlite3HashFind(tls, bp+32, zName) != uintptr(0) { nName = Xsqlite3Strlen30(tls, zName) if nName > 0 { for j = nName - 1; j > 0 && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zName + uintptr(j))))])&0x04 != 0; j-- { } if int32(*(*int8)(unsafe.Pointer(zName + uintptr(j)))) == ':' { nName = j } } zName = Xsqlite3MPrintf(tls, db, ts+20019, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 56)) > U32(3) { Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) } } (*Column)(unsafe.Pointer(pCol)).FzCnName = zName (*Column)(unsafe.Pointer(pCol)).FhName = Xsqlite3StrIHash(tls, zName) if zName != 0 && Xsqlite3HashInsert(tls, bp+32, zName, pCol) == pCol { Xsqlite3OomFault(tls, db) } } goto __2 __2: i++ pCol += 24 goto __1 goto __3 __3: ; Xsqlite3HashClear(tls, bp+32) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { for j = 0; j < i; j++ { Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(aCol+uintptr(j)*24)).FzCnName) } Xsqlite3DbFree(tls, db, aCol) *(*uintptr)(unsafe.Pointer(paCol)) = uintptr(0) *(*I16)(unsafe.Pointer(pnCol)) = int16(0) return SQLITE_NOMEM } return SQLITE_OK } // Add type and collation information to a column list based on // a SELECT statement. // // The column list presumably came from selectColumnNamesFromExprList(). // The column list has only names, not types or collations. This // routine goes through and adds the types and collations. // // This routine requires that all identifiers in the SELECT // statement be resolved. func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136449:21: */ bp := tls.Alloc(56) defer tls.Free(56) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // var sNC NameContext at bp, 56 var pCol uintptr var pColl uintptr var i int32 var p uintptr var a uintptr if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc a = (*Select)(unsafe.Pointer(pSelect)).FpEList + 8 /* &.a */ i = 0 pCol = (*Table)(unsafe.Pointer(pTab)).FaCol __1: if !(i < int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __3 } { var zType uintptr var n I64 var m I64 *(*U32)(unsafe.Pointer(pTab + 48)) |= U32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOINSERT) p = (*ExprList_item)(unsafe.Pointer(a + uintptr(i)*32)).FpExpr zType = columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) // pCol->szEst = ... // Column size est for SELECT tables never used (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3ExprAffinity(tls, p) if zType != 0 { m = I64(Xsqlite3Strlen30(tls, zType)) n = I64(Xsqlite3Strlen30(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) (*Column)(unsafe.Pointer(pCol)).FzCnName = Xsqlite3DbReallocOrFree(tls, db, (*Column)(unsafe.Pointer(pCol)).FzCnName, uint64(n+m+int64(2))) if (*Column)(unsafe.Pointer(pCol)).FzCnName != 0 { libc.Xmemcpy(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName+uintptr(n+int64(1)), zType, uint64(m+int64(1))) *(*U16)(unsafe.Pointer(pCol + 16)) |= U16(COLFLAG_HASTYPE) } else { *(*U16)(unsafe.Pointer(pCol + 16)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_HASTYPE | COLFLAG_HASCOLL)) } } if int32((*Column)(unsafe.Pointer(pCol)).Faffinity) <= SQLITE_AFF_NONE { (*Column)(unsafe.Pointer(pCol)).Faffinity = aff } pColl = Xsqlite3ExprCollSeq(tls, pParse, p) if pColl != 0 { Xsqlite3ColumnSetColl(tls, db, pCol, (*CollSeq)(unsafe.Pointer(pColl)).FzName) } } goto __2 __2: i++ pCol += 24 goto __1 goto __3 __3: ; (*Table)(unsafe.Pointer(pTab)).FszTabRow = int16(1) // Any non-zero value works } // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136504:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 savedFlags = (*Sqlite3)(unsafe.Pointer(db)).Fflags *(*U64)(unsafe.Pointer(db + 48)) &= libc.CplUint64(uint64(SQLITE_FullColNames)) *(*U64)(unsafe.Pointer(db + 48)) |= uint64(SQLITE_ShortColNames) Xsqlite3SelectPrep(tls, pParse, pSelect, uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).Fflags = savedFlags if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return uintptr(0) } for (*Select)(unsafe.Pointer(pSelect)).FpPrior != 0 { pSelect = (*Select)(unsafe.Pointer(pSelect)).FpPrior } pTab = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Table{}))) if pTab == uintptr(0) { return uintptr(0) } (*Table)(unsafe.Pointer(pTab)).FnTabRef = U32(1) (*Table)(unsafe.Pointer(pTab)).FzName = uintptr(0) (*Table)(unsafe.Pointer(pTab)).FnRowLogEst = int16(200) Xsqlite3ColumnsFromExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, pTab+54, pTab+8) Xsqlite3SelectAddColumnTypeAndCollation(tls, pParse, pTab, pSelect, aff) (*Table)(unsafe.Pointer(pTab)).FiPKey = int16(-1) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3DeleteTable(tls, db, pTab) return uintptr(0) } return pTab } // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136537:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } if (*Parse)(unsafe.Pointer(pParse)).FpToplevel == uintptr(0) && (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FdbOptFlags&U32(SQLITE_FactorOutConst) == U32(0) { (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(1) } return Xsqlite3VdbeCreate(tls, pParse) } // Compute the iLimit and iOffset fields of the SELECT based on the // pLimit expressions. pLimit->pLeft and pLimit->pRight hold the expressions // that appear in the original SQL statement after the LIMIT and OFFSET // keywords. Or NULL if those keywords are omitted. iLimit and iOffset // are the integer memory register numbers for counters used to compute // the limit and offset. If there is no limit and/or offset, then // iLimit and iOffset are negative. // // This routine changes the values of iLimit and iOffset only if // a limit or offset is defined by pLimit->pLeft and pLimit->pRight. iLimit // and iOffset should have been preset to appropriate default values (zero) // prior to calling this routine. // // The iOffset register (if it exists) is initialized to the value // of the OFFSET. The iLimit register is initialized to LIMIT. Register // iOffset+1 is initialized to LIMIT+OFFSET. // // Only if pLimit->pLeft!=0 do the limit registers get // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136573:13: */ bp := tls.Alloc(4) defer tls.Free(4) var v uintptr = uintptr(0) var iLimit int32 = 0 var iOffset int32 // var n int32 at bp, 4 var pLimit uintptr = (*Select)(unsafe.Pointer(p)).FpLimit if (*Select)(unsafe.Pointer(p)).FiLimit != 0 { return } // "LIMIT -1" always shows all rows. There is some // controversy about what the correct behavior should be. // The current implementation interprets "LIMIT 0" to mean // no rows. if pLimit != 0 { (*Select)(unsafe.Pointer(p)).FiLimit = libc.AssignInt32(&iLimit, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) v = Xsqlite3GetVdbe(tls, pParse) if Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer(pLimit)).FpLeft, bp) != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp /* n */)), iLimit) if *(*int32)(unsafe.Pointer(bp)) == 0 { Xsqlite3VdbeGoto(tls, v, iBreak) } else if *(*int32)(unsafe.Pointer(bp)) >= 0 && int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp))))) { (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp /* n */)))) *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_FixedLimit) } } else { Xsqlite3ExprCode(tls, pParse, (*Expr)(unsafe.Pointer(pLimit)).FpLeft, iLimit) Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, iLimit) Xsqlite3VdbeAddOp2(tls, v, OP_IfNot, iLimit, iBreak) } if (*Expr)(unsafe.Pointer(pLimit)).FpRight != 0 { (*Select)(unsafe.Pointer(p)).FiOffset = libc.AssignInt32(&iOffset, libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1)) (*Parse)(unsafe.Pointer(pParse)).FnMem++ // Allocate an extra register for limit+offset Xsqlite3ExprCode(tls, pParse, (*Expr)(unsafe.Pointer(pLimit)).FpRight, iOffset) Xsqlite3VdbeAddOp1(tls, v, OP_MustBeInt, iOffset) Xsqlite3VdbeAddOp3(tls, v, OP_OffsetLimit, iLimit, iOffset+1, iOffset) } } } // Return the appropriate collating sequence for the iCol-th column of // the result set for the compound-select statement "p". Return NULL if // the column has no default collating sequence. // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136630:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) } else { pRet = uintptr(0) } // iCol must be less than p->pEList->nExpr. Otherwise an error would // have been thrown during name resolution and we would not have gotten // this far if pRet == uintptr(0) && iCol < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr { pRet = Xsqlite3ExprCollSeq(tls, pParse, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList+8+uintptr(iCol)*32)).FpExpr) } return pRet } // The select statement passed as the second parameter is a compound SELECT // with an ORDER BY clause. This function allocates and returns a KeyInfo // structure suitable for implementing the ORDER BY. // // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136656:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { nOrderBy = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr } else { nOrderBy = 0 } var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pRet uintptr = Xsqlite3KeyInfoAlloc(tls, db, nOrderBy+nExtra, 1) if pRet != 0 { var i int32 for i = 0; i < nOrderBy; i++ { var pItem uintptr = pOrderBy + 8 + uintptr(i)*32 var pTerm uintptr = (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr var pColl uintptr if (*Expr)(unsafe.Pointer(pTerm)).Fflags&U32(EP_Collate) != 0 { pColl = Xsqlite3ExprCollSeq(tls, pParse, pTerm) } else { pColl = multiSelectCollSeq(tls, pParse, p, int32(*(*U16)(unsafe.Pointer(pItem + 24)))-1) if pColl == uintptr(0) { pColl = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl } (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FpExpr = Xsqlite3ExprAddCollateString(tls, pParse, pTerm, (*CollSeq)(unsafe.Pointer(pColl)).FzName) } *(*uintptr)(unsafe.Pointer(pRet + 32 + uintptr(i)*8)) = pColl *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pRet)).FaSortFlags + uintptr(i))) = (*ExprList_item)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*32)).FsortFlags } } return pRet } // This routine generates VDBE code to compute the content of a WITH RECURSIVE // query of the form: // // <recursive-table> AS (<setup-query> UNION [ALL] <recursive-query>) // \___________/ \_______________/ // p->pPrior p // // // There is exactly one reference to the recursive-table in the FROM clause // of recursive-query, marked with the SrcList->a[].fg.isRecursive flag. // // The setup-query runs once to generate an initial set of rows that go // into a Queue table. Rows are extracted from the Queue table one by // one. Each row extracted from Queue is output to pDest. Then the single // extracted row (now in the iCurrent table) becomes the content of the // recursive-table for a recursive-query run. The output of the recursive-query // is added back into the Queue table. Then another row is extracted from Queue // and the iteration continues until the Queue table is empty. // // If the compound query operator is UNION then no duplicate rows are ever // inserted into the Queue table. The iDistinct table keeps a copy of all rows // that have ever been inserted into Queue and causes duplicates to be // discarded. If the operator is UNION ALL, then duplicates are allowed. // // If the query has an ORDER BY, then entries in the Queue table are kept in // ORDER BY order and the first entry is extracted for each cycle. Without // an ORDER BY, the Queue table is just a FIFO. // // If a LIMIT clause is provided, then the iteration stops after LIMIT rows // have been output to pDest. A LIMIT of zero means to output no rows and a // negative LIMIT means to output all rows. If there is also an OFFSET clause // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136722:13: */ bp := tls.Alloc(40) defer tls.Free(40) var pSrc uintptr // The FROM clause of the recursive query var nCol int32 // Number of columns in the recursive table var v uintptr // The prepared statement under construction var pSetup uintptr // The setup query var pFirstRec uintptr // Left-most recursive term var addrTop int32 // Top of the loop var addrCont int32 var addrBreak int32 // CONTINUE and BREAK addresses var iCurrent int32 // The Current table var regCurrent int32 // Register holding Current table var iQueue int32 // The Queue table var iDistinct int32 // To ensure unique results if UNION var eDest int32 // How to write to Queue // var destQueue SelectDest at bp, 40 // SelectDest targetting the Queue table var i int32 // Loop counter var rc int32 // Result code var pOrderBy uintptr // The ORDER BY clause var pLimit uintptr // Saved LIMIT and OFFSET var regLimit int32 var regOffset int32 var pKeyInfo uintptr pSrc = (*Select)(unsafe.Pointer(p)).FpSrc nCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe iCurrent = 0 iDistinct = 0 eDest = SRT_Fifo // Registers used by LIMIT and OFFSET if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } Xsqlite3ErrorMsg(tls, pParse, ts+20027, 0) return __1: ; // Obtain authorization to do a recursive query if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_RECURSIVE, uintptr(0), uintptr(0), uintptr(0)) != 0) { goto __2 } return __2: ; // Process the LIMIT and OFFSET clauses, if they exist addrBreak = Xsqlite3VdbeMakeLabel(tls, pParse) (*Select)(unsafe.Pointer(p)).FnSelectRow = int16(320) // 4 billion rows computeLimitRegisters(tls, pParse, p, addrBreak) pLimit = (*Select)(unsafe.Pointer(p)).FpLimit regLimit = (*Select)(unsafe.Pointer(p)).FiLimit regOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*Select)(unsafe.Pointer(p)).FiLimit = libc.AssignPtrInt32(p+12, 0) pOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy // Locate the cursor number of the Current table i = 0 __3: if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc) { goto __5 } if !(uint32(int32(*(*uint16)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112 + 60 + 4))&0x20>>5)) != 0) { goto __6 } iCurrent = (*SrcItem)(unsafe.Pointer(pSrc + 8 + uintptr(i)*112)).FiCursor goto __5 __6: ; goto __4 __4: i++ goto __3 goto __5 __5: ; // Allocate cursors numbers for Queue and Distinct. The cursor number for // the Distinct table must be exactly one greater than Queue in order // for the SRT_DistFifo and SRT_DistQueue destinations to work. iQueue = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_UNION) { goto __7 } if pOrderBy != 0 { eDest = SRT_DistQueue } else { eDest = SRT_DistFifo } iDistinct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) goto __8 __7: if pOrderBy != 0 { eDest = SRT_Queue } else { eDest = SRT_Fifo } __8: ; Xsqlite3SelectDestInit(tls, bp, eDest, iQueue) // Allocate cursors for Current, Queue, and Distinct. regCurrent = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp3(tls, v, OP_OpenPseudo, iCurrent, regCurrent, nCol) if !(pOrderBy != 0) { goto __9 } pKeyInfo = multiSelectOrderByKeyInfo(tls, pParse, p, 1) Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, iQueue, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr+2, 0, pKeyInfo, -9) (*SelectDest)(unsafe.Pointer(bp /* &destQueue */)).FpOrderBy = pOrderBy goto __10 __9: Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iQueue, nCol) __10: ; if !(iDistinct != 0) { goto __11 } *(*int32)(unsafe.Pointer(p + 20)) = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, iDistinct, 0) *(*U32)(unsafe.Pointer(p + 4)) |= U32(SF_UsesEphemeral) __11: ; // Detach the ORDER BY clause from the compound SELECT (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) // Figure out how many elements of the compound SELECT are part of the // recursive query. Make sure no recursive elements use aggregate // functions. Mark the recursive elements as UNION ALL even if they // are really UNION because the distinctness will be enforced by the // iDistinct table. pFirstRec is left pointing to the left-most // recursive term of the CTE. pFirstRec = p __12: if !(pFirstRec != uintptr(0)) { goto __14 } if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } Xsqlite3ErrorMsg(tls, pParse, ts+20076, 0) goto end_of_recursive_query __15: ; (*Select)(unsafe.Pointer(pFirstRec)).Fop = U8(TK_ALL) if !((*Select)(unsafe.Pointer((*Select)(unsafe.Pointer(pFirstRec)).FpPrior)).FselFlags&U32(SF_Recursive) == U32(0)) { goto __16 } goto __14 __16: ; goto __13 __13: pFirstRec = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior goto __12 goto __14 __14: ; // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20118, 0) rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { goto __17 } goto end_of_recursive_query __17: ; // Find the next row in the Queue and output that row addrTop = Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, iQueue, addrBreak) // Transfer the next row in Queue over to Current Xsqlite3VdbeAddOp1(tls, v, OP_NullRow, iCurrent) // To reset column cache if !(pOrderBy != 0) { goto __18 } Xsqlite3VdbeAddOp3(tls, v, OP_Column, iQueue, (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr+1, regCurrent) goto __19 __18: Xsqlite3VdbeAddOp2(tls, v, OP_RowData, iQueue, regCurrent) __19: ; Xsqlite3VdbeAddOp1(tls, v, OP_Delete, iQueue) // Output the single row in Current addrCont = Xsqlite3VdbeMakeLabel(tls, pParse) codeOffset(tls, v, regOffset, addrCont) selectInnerLoop(tls, pParse, p, iCurrent, uintptr(0), uintptr(0), pDest, addrCont, addrBreak) if !(regLimit != 0) { goto __20 } Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, regLimit, addrBreak) __20: ; Xsqlite3VdbeResolveLabel(tls, v, addrCont) // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20124, 0) Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup // Keep running the loop until the Queue is empty Xsqlite3VdbeGoto(tls, v, addrTop) Xsqlite3VdbeResolveLabel(tls, v, addrBreak) end_of_recursive_query: Xsqlite3ExprListDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Select)(unsafe.Pointer(p)).FpOrderBy) (*Select)(unsafe.Pointer(p)).FpOrderBy = pOrderBy (*Select)(unsafe.Pointer(p)).FpLimit = pLimit return } // Handle the special case of a compound-select that originates from a // VALUES clause. By handling this as a special case, we avoid deep // recursion, and thus do not need to enforce the SQLITE_LIMIT_COMPOUND_SELECT // on a VALUES clause. // // Because the Select object originates from a VALUES clause: // (1) There is no LIMIT or OFFSET or else there is a LIMIT of exactly 1 // (2) All terms are UNION ALL // (3) There is no ORDER BY clause // // The "LIMIT of exactly 1" case of condition (1) comes about when a VALUES // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136898:12: */ bp := tls.Alloc(16) defer tls.Free(16) var nRow int32 = 1 var rc int32 = 0 var bShowAll int32 = libc.Bool32((*Select)(unsafe.Pointer(p)).FpLimit == uintptr(0)) for __ccgo := true; __ccgo; __ccgo = 1 != 0 { if (*Select)(unsafe.Pointer(p)).FpWin != 0 { return -1 } if (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { break } p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+20139, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { return ts + 1524 /* "" */ } return ts + 20162 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) if !(bShowAll != 0) { break } (*Select)(unsafe.Pointer(p)).FnSelectRow = LogEst(nRow) p = (*Select)(unsafe.Pointer(p)).FpNext } return rc } // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136935:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } return libc.Bool32(p != uintptr(0)) } // This routine is called to process a compound query form from // two or more separate queries using UNION, UNION ALL, EXCEPT, or // INTERSECT // // "p" points to the right-most of the two queries. the query on the // left is p->pPrior. The left query could also be a compound query // in which case this routine will be called recursively. // // The results of the total query are to be written into a destination // of type eDest with parameter iParm. // // Example 1: Consider a three-way compound SQL statement. // // SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3 // // This statement is parsed up as follows: // // SELECT c FROM t3 // | // `-----> SELECT b FROM t2 // | // `------> SELECT a FROM t1 // // The arrows in the diagram above represent the Select.pPrior pointer. // So if this routine is called with p equal to the t3 query, then // pPrior will be the t2 query. p->op will be TK_UNION in this case. // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:136971:12: */ bp := tls.Alloc(144) defer tls.Free(144) var rc int32 // Success code from a subroutine var pPrior uintptr // Another SELECT immediately to our left var v uintptr // Generate code to this VDBE // var dest SelectDest at bp+16, 40 // Alternative data destination var pDelete uintptr // Chain of simple selects to delete var db uintptr var addr int32 // var nLimit int32 at bp+56, 4 var iCont int32 var iBreak int32 var iStart int32 var unionTab int32 // Cursor number of the temp table holding result var op U8 // One of the SRT_ operations to apply to self var priorOp int32 // The SRT_ operation to apply to prior selects var pLimit uintptr // Saved values of p->nLimit var addr1 int32 // var uniondest SelectDest at bp+64, 40 var tab1 int32 var tab2 int32 var iCont1 int32 var iBreak1 int32 var iStart1 int32 var pLimit1 uintptr var addr2 int32 // var intersectdest SelectDest at bp+104, 40 var r1 int32 var addr3 int32 var i int32 // Loop counter var pKeyInfo uintptr // Collating sequence for the result set var pLoop uintptr // For looping through SELECT statements var apColl uintptr // For looping through pKeyInfo->aColl[] var nCol int32 rc = SQLITE_OK pDelete = uintptr(0) // Database connection // Make sure there is no ORDER BY or LIMIT clause on prior SELECTs. Only // the last (right-most) SELECT in the series may have an ORDER BY or LIMIT. // Calling function guarantees this much db = (*Parse)(unsafe.Pointer(pParse)).Fdb pPrior = (*Select)(unsafe.Pointer(p)).FpPrior *(*SelectDest)(unsafe.Pointer(bp + 16 /* dest */)) = *(*SelectDest)(unsafe.Pointer(pDest)) v = Xsqlite3GetVdbe(tls, pParse) // The VDBE already created by calling function // Create the destination temporary table if necessary if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) == SRT_EphemTab) { goto __1 } Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FiSDParm, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr) (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FeDest = U8(SRT_Table) __1: ; // Special handling for a compound-select that originates as a VALUES clause. if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) != 0) { goto __2 } rc = multiSelectValues(tls, pParse, p, bp+16) if !(rc >= 0) { goto __3 } goto multi_select_end __3: ; rc = SQLITE_OK __2: ; // Make sure all SELECTs in the statement have the same number of elements // in their result sets. if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) && hasAnchor(tls, p) != 0) { goto __4 } generateWithRecursiveQuery(tls, pParse, p, bp+16) goto __5 __4: // Compound SELECTs that have an ORDER BY clause are handled separately. if !((*Select)(unsafe.Pointer(p)).FpOrderBy != 0) { goto __6 } return multiSelectOrderBy(tls, pParse, p, pDest) goto __7 __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20164, 0) Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20179, 0) __8: ; // Generate code for the left and right SELECT statements. switch int32((*Select)(unsafe.Pointer(p)).Fop) { case TK_ALL: goto __10 case TK_EXCEPT: goto __11 case TK_UNION: goto __12 default: goto __13 } goto __9 __10: addr = 0 *(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)) = 0 // Initialize to suppress harmless compiler warning (*Select)(unsafe.Pointer(pPrior)).FiLimit = (*Select)(unsafe.Pointer(p)).FiLimit (*Select)(unsafe.Pointer(pPrior)).FiOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(pPrior)).FpLimit = (*Select)(unsafe.Pointer(p)).FpLimit rc = Xsqlite3Select(tls, pParse, pPrior, bp+16) (*Select)(unsafe.Pointer(pPrior)).FpLimit = uintptr(0) if !(rc != 0) { goto __14 } goto multi_select_end __14: ; (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) (*Select)(unsafe.Pointer(p)).FiLimit = (*Select)(unsafe.Pointer(pPrior)).FiLimit (*Select)(unsafe.Pointer(p)).FiOffset = (*Select)(unsafe.Pointer(pPrior)).FiOffset if !((*Select)(unsafe.Pointer(p)).FiLimit != 0) { goto __15 } addr = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, (*Select)(unsafe.Pointer(p)).FiLimit) if !((*Select)(unsafe.Pointer(p)).FiOffset != 0) { goto __16 } Xsqlite3VdbeAddOp3(tls, v, OP_OffsetLimit, (*Select)(unsafe.Pointer(p)).FiLimit, (*Select)(unsafe.Pointer(p)).FiOffset+1, (*Select)(unsafe.Pointer(p)).FiOffset) __16: ; __15: ; Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19954, 0) rc = Xsqlite3Select(tls, pParse, p, bp+16) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) if !((*Select)(unsafe.Pointer(p)).FpLimit != 0 && Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpLeft, bp+56) != 0 && *(*int32)(unsafe.Pointer(bp + 56)) > 0 && int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56)))))) { goto __17 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)))) __17: ; if !(addr != 0) { goto __18 } Xsqlite3VdbeJumpHere(tls, v, addr) __18: ; goto __9 __11: __12: // Cursor number of the temp table holding result op = U8(0) priorOp = SRT_Union if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) == priorOp) { goto __19 } // We can reuse a temporary table generated by a SELECT to our // right. // Not allowed on leftward elements unionTab = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSDParm goto __20 __19: // We will need to create our own temporary table to hold the // intermediate results. unionTab = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addr1 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, unionTab, 0) *(*int32)(unsafe.Pointer(p + 20)) = addr1 *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4)) |= U32(SF_UsesEphemeral) __20: ; // Code the SELECT statements to our left Xsqlite3SelectDestInit(tls, bp+64, priorOp, unionTab) rc = Xsqlite3Select(tls, pParse, pPrior, bp+64) if !(rc != 0) { goto __21 } goto multi_select_end __21: ; // Code the current SELECT statement if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_EXCEPT) { goto __22 } op = U8(SRT_Except) goto __23 __22: ; op = U8(SRT_Union) __23: ; (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20198, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+64) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior (*Select)(unsafe.Pointer(p)).FpOrderBy = uintptr(0) if !(int32((*Select)(unsafe.Pointer(p)).Fop) == TK_UNION) { goto __24 } (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) __24: ; Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) (*Select)(unsafe.Pointer(p)).FpLimit = pLimit (*Select)(unsafe.Pointer(p)).FiLimit = 0 (*Select)(unsafe.Pointer(p)).FiOffset = 0 // Convert the data in the temporary table into whatever form // it is that we currently need. if !(int32((*SelectDest)(unsafe.Pointer(bp+16)).FeDest) != priorOp && int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) { goto __25 } iBreak = Xsqlite3VdbeMakeLabel(tls, pParse) iCont = Xsqlite3VdbeMakeLabel(tls, pParse) computeLimitRegisters(tls, pParse, p, iBreak) Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, unionTab, iBreak) iStart = Xsqlite3VdbeCurrentAddr(tls, v) selectInnerLoop(tls, pParse, p, unionTab, uintptr(0), uintptr(0), bp+16, iCont, iBreak) Xsqlite3VdbeResolveLabel(tls, v, iCont) Xsqlite3VdbeAddOp2(tls, v, OP_Next, unionTab, iStart) Xsqlite3VdbeResolveLabel(tls, v, iBreak) Xsqlite3VdbeAddOp2(tls, v, OP_Close, unionTab, 0) __25: ; goto __9 __13: ; // INTERSECT is different from the others since it requires // two temporary tables. Hence it has its own case. Begin // by allocating the tables we will need. tab1 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) tab2 = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) addr2 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, tab1, 0) *(*int32)(unsafe.Pointer(p + 20)) = addr2 *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4)) |= U32(SF_UsesEphemeral) // Code the SELECTs to our left into temporary table "tab1". Xsqlite3SelectDestInit(tls, bp+104, SRT_Union, tab1) rc = Xsqlite3Select(tls, pParse, pPrior, bp+104) if !(rc != 0) { goto __26 } goto multi_select_end __26: ; // Code the current SELECT into temporary table "tab2" addr2 = Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, tab2, 0) *(*int32)(unsafe.Pointer(p + 20 + 1*4)) = addr2 (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20198, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) rc = Xsqlite3Select(tls, pParse, p, bp+104) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior if !(int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32((*Select)(unsafe.Pointer(pPrior)).FnSelectRow)) { goto __27 } (*Select)(unsafe.Pointer(p)).FnSelectRow = (*Select)(unsafe.Pointer(pPrior)).FnSelectRow __27: ; Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) (*Select)(unsafe.Pointer(p)).FpLimit = pLimit1 // Generate code to take the intersection of the two temporary // tables. if !(rc != 0) { goto __28 } goto __9 __28: ; iBreak1 = Xsqlite3VdbeMakeLabel(tls, pParse) iCont1 = Xsqlite3VdbeMakeLabel(tls, pParse) computeLimitRegisters(tls, pParse, p, iBreak1) Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, tab1, iBreak1) r1 = Xsqlite3GetTempReg(tls, pParse) iStart1 = Xsqlite3VdbeAddOp2(tls, v, OP_RowData, tab1, r1) Xsqlite3VdbeAddOp4Int(tls, v, OP_NotFound, tab2, iCont1, r1, 0) Xsqlite3ReleaseTempReg(tls, pParse, r1) selectInnerLoop(tls, pParse, p, tab1, uintptr(0), uintptr(0), bp+16, iCont1, iBreak1) Xsqlite3VdbeResolveLabel(tls, v, iCont1) Xsqlite3VdbeAddOp2(tls, v, OP_Next, tab1, iStart1) Xsqlite3VdbeResolveLabel(tls, v, iBreak1) Xsqlite3VdbeAddOp2(tls, v, OP_Close, tab2, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Close, tab1, 0) goto __9 __9: ; if !((*Select)(unsafe.Pointer(p)).FpNext == uintptr(0)) { goto __29 } Xsqlite3VdbeExplainPop(tls, pParse) __29: ; __7: ; __5: ; if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __30 } goto multi_select_end __30: ; // Compute collating sequences used by // temporary tables needed to implement the compound select. // Attach the KeyInfo structure to all temporary tables. // // This section is run by the right-most SELECT statement only. // SELECT statements to the left always skip this part. The right-most // SELECT might also skip this part if it has no ORDER BY clause and // no temp tables are required. if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_UsesEphemeral) != 0) { goto __31 } // Number of columns in result set nCol = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr pKeyInfo = Xsqlite3KeyInfoAlloc(tls, db, nCol, 1) if !!(pKeyInfo != 0) { goto __32 } rc = SQLITE_NOMEM goto multi_select_end __32: ; i = 0 apColl = pKeyInfo + 32 /* &.aColl */ __33: if !(i < nCol) { goto __35 } *(*uintptr)(unsafe.Pointer(apColl)) = multiSelectCollSeq(tls, pParse, p, i) if !(uintptr(0) == *(*uintptr)(unsafe.Pointer(apColl))) { goto __36 } *(*uintptr)(unsafe.Pointer(apColl)) = (*Sqlite3)(unsafe.Pointer(db)).FpDfltColl __36: ; goto __34 __34: i++ apColl += 8 goto __33 goto __35 __35: ; pLoop = p __37: if !(pLoop != 0) { goto __39 } i = 0 __40: if !(i < 2) { goto __42 } addr3 = *(*int32)(unsafe.Pointer(pLoop + 20 + uintptr(i)*4)) if !(addr3 < 0) { goto __43 } // If [0] is unused then [1] is also unused. So we can // always safely abort as soon as the first unused slot is found goto __42 __43: ; Xsqlite3VdbeChangeP2(tls, v, addr3, nCol) Xsqlite3VdbeChangeP4(tls, v, addr3, Xsqlite3KeyInfoRef(tls, pKeyInfo), -9) *(*int32)(unsafe.Pointer(pLoop + 20 + uintptr(i)*4)) = -1 goto __41 __41: i++ goto __40 goto __42 __42: ; goto __38 __38: pLoop = (*Select)(unsafe.Pointer(pLoop)).FpPrior goto __37 goto __39 __39: ; Xsqlite3KeyInfoUnref(tls, pKeyInfo) __31: ; multi_select_end: (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSdst (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FnSdst if !(pDelete != 0) { goto __44 } Xsqlite3ParserAddCleanup(tls, pParse, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3SelectDelete})), pDelete) __44: ; return rc } // Error message for when two or more terms of a compound select have different // size result sets. func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137327:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+20219, 0) } else { Xsqlite3ErrorMsg(tls, pParse, ts+20265, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } // Code an output subroutine for a coroutine implementation of a // SELECT statment. // // The data to be output is contained in pIn->iSdst. There are // pIn->nSdst columns to be output. pDest is where the output should // be sent. // // regReturn is the number of the register holding the subroutine // return address. // // If regPrev>0 then it is the first register in a vector that // records the previous output. mem[regPrev] is a flag that is false // if there has been no previous output. If regPrev>0 then code is // generated to suppress duplicates. pKeyInfo is used for comparing // keys. // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137357:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 addr = Xsqlite3VdbeCurrentAddr(tls, v) iContinue = Xsqlite3VdbeMakeLabel(tls, pParse) // Suppress duplicates for UNION, EXCEPT, and INTERSECT if regPrev != 0 { var addr1 int32 var addr2 int32 addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regPrev) addr2 = Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, regPrev+1, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, Xsqlite3KeyInfoRef(tls, pKeyInfo), -9) Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addr2+2, iContinue, addr2+2) Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp3(tls, v, OP_Copy, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, regPrev+1, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst-1) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, regPrev) } if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return 0 } // Suppress the first OFFSET entries if there is an OFFSET clause codeOffset(tls, v, (*Select)(unsafe.Pointer(p)).FiOffset, iContinue) switch int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest) { // Store the result as data using a unique key. case SRT_EphemTab: { var r1 int32 = Xsqlite3GetTempReg(tls, pParse) var r2 int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, r1) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r2) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r1, r2) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) Xsqlite3ReleaseTempReg(tls, pParse, r2) Xsqlite3ReleaseTempReg(tls, pParse, r1) break } // If we are creating a set for an "expr IN (SELECT ...)". case SRT_Set: { var r1 int32 r1 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst, r1, (*SelectDest)(unsafe.Pointer(pDest)).FzAffSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, r1, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) Xsqlite3ReleaseTempReg(tls, pParse, r1) break } // If this is a scalar select that is part of an expression, then // store the results in the appropriate memory cell and break out // of the scan loop. Note that the select might return multiple columns // if it is the RHS of a row-value IN operator. case SRT_Mem: { Xsqlite3ExprCodeMove(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) // The LIMIT clause will jump out of the loop for us break } // The results are stored in a sequence of registers // starting at pDest->iSdst. Then the co-routine yields. case SRT_Coroutine: { if (*SelectDest)(unsafe.Pointer(pDest)).FiSdst == 0 { (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = Xsqlite3GetTempRange(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(pIn)).FnSdst } Xsqlite3ExprCodeMove(tls, pParse, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pDest)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm) break } // If none of the above, then the result destination must be // SRT_Output. This routine is never called with any other // destination other than the ones handled above or SRT_Output. // // For SRT_Output, results are stored in a sequence of registers. // Then the OP_ResultRow opcode is used to cause sqlite3_step() to // return the next row of result. default: { Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, (*SelectDest)(unsafe.Pointer(pIn)).FiSdst, (*SelectDest)(unsafe.Pointer(pIn)).FnSdst) break } } // Jump to the end of the loop if the LIMIT is reached. if (*Select)(unsafe.Pointer(p)).FiLimit != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_DecrJumpZero, (*Select)(unsafe.Pointer(p)).FiLimit, iBreak) } // Generate the subroutine return Xsqlite3VdbeResolveLabel(tls, v, iContinue) Xsqlite3VdbeAddOp1(tls, v, OP_Return, regReturn) return addr } // Alternative compound select code generator for cases when there // is an ORDER BY clause. // // We assume a query of the following form: // // <selectA> <operator> <selectB> ORDER BY <orderbylist> // // <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT. The idea // is to code both <selectA> and <selectB> with the ORDER BY clause as // co-routines. Then run the co-routines in parallel and merge the results // into the output. In addition to the two coroutines (called selectA and // selectB) there are 7 subroutines: // // outA: Move the output of the selectA coroutine into the output // of the compound query. // // outB: Move the output of the selectB coroutine into the output // of the compound query. (Only generated for UNION and // UNION ALL. EXCEPT and INSERTSECT never output a row that // appears only in B.) // // AltB: Called when there is data from both coroutines and A<B. // // AeqB: Called when there is data from both coroutines and A==B. // // AgtB: Called when there is data from both coroutines and A>B. // // EofA: Called when data is exhausted from selectA. // // EofB: Called when data is exhausted from selectB. // // The implementation of the latter five subroutines depend on which // <operator> is used: // // // UNION ALL UNION EXCEPT INTERSECT // ------------- ----------------- -------------- ----------------- // AltB: outA, nextA outA, nextA outA, nextA nextA // // AeqB: outA, nextA nextA nextA outA, nextA // // AgtB: outB, nextB outB, nextB nextB nextB // // EofA: outB, nextB outB, nextB halt halt // // EofB: outA, nextA outA, nextA outA, nextA halt // // In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA // causes an immediate jump to EofA and an EOF on B following nextB causes // an immediate jump to EofB. Within EofA and EofB, and EOF on entry or // following nextX causes a jump to the end of the select processing. // // Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled // within the output subroutine. The regPrev register set holds the previously // output value. A comparison is made against this value and the output // is skipped if the next results would be the same as the previous. // // The implementation plan is to implement the two coroutines and seven // subroutines first, then put the control logic at the bottom. Like this: // // goto Init // coA: coroutine for left query (A) // coB: coroutine for right query (B) // outA: output one row of A // outB: output one row of B (UNION and UNION ALL only) // EofA: ... // EofB: ... // AltB: ... // AeqB: ... // AgtB: ... // Init: initialize coroutine registers // yield coA // if eof(A) goto EofA // yield coB // if eof(B) goto EofB // Cmpr: Compare A, B // Jump AltB, AeqB, AgtB // End: ... // // We call AltB, AeqB, AgtB, EofA, and EofB "subroutines" but they are not // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137565:12: */ bp := tls.Alloc(88) defer tls.Free(88) var i int32 var j int32 // Loop counters var pPrior uintptr // Another SELECT immediately to our left var pSplit uintptr // Left-most SELECT in the right-hand group var nSelect int32 // Number of SELECT statements in the compound var v uintptr // Generate code to this VDBE // var destA SelectDest at bp+8, 40 // Destination for coroutine A // var destB SelectDest at bp+48, 40 // Destination for coroutine B var regAddrA int32 // Address register for select-A coroutine var regAddrB int32 // Address register for select-B coroutine var addrSelectA int32 // Address of the select-A coroutine var addrSelectB int32 // Address of the select-B coroutine var regOutA int32 // Address register for the output-A subroutine var regOutB int32 // Address register for the output-B subroutine var addrOutA int32 // Address of the output-A subroutine var addrOutB int32 = 0 // Address of the output-B subroutine var addrEofA int32 // Address of the select-A-exhausted subroutine var addrEofA_noB int32 // Alternate addrEofA if B is uninitialized var addrEofB int32 // Address of the select-B-exhausted subroutine var addrAltB int32 // Address of the A<B subroutine var addrAeqB int32 // Address of the A==B subroutine var addrAgtB int32 // Address of the A>B subroutine var regLimitA int32 // Limit register for select-A var regLimitB int32 // Limit register for select-A var regPrev int32 // A range of registers to hold previous output var savedLimit int32 // Saved value of p->iLimit var savedOffset int32 // Saved value of p->iOffset var labelCmpr int32 // Label for the start of the merge algorithm var labelEnd int32 // Label for the end of the overall SELECT stmt var addr1 int32 // Jump instructions that get retargetted var op int32 // One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT var pKeyDup uintptr = uintptr(0) // Comparison information for duplicate removal var pKeyMerge uintptr // Comparison information for merging rows var db uintptr // Database connection var pOrderBy uintptr // The ORDER BY clause var nOrderBy int32 // Number of terms in the ORDER BY clause var aPermute uintptr // Mapping from ORDER BY terms to result set columns // "Managed" code needs this. Ticket #3382. db = (*Parse)(unsafe.Pointer(pParse)).Fdb v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Already thrown the error if VDBE alloc failed labelEnd = Xsqlite3VdbeMakeLabel(tls, pParse) labelCmpr = Xsqlite3VdbeMakeLabel(tls, pParse) // Patch up the ORDER BY clause op = int32((*Select)(unsafe.Pointer(p)).Fop) pOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy nOrderBy = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr // For operators other than UNION ALL we have to make sure that // the ORDER BY clause covers every term of the result set. Add // terms to the ORDER BY clause as necessary. if op != TK_ALL { for i = 1; int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && i <= (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr; i++ { var pItem uintptr j = 0 pItem = pOrderBy + 8 /* &.a */ __1: if !(j < nOrderBy) { goto __3 } { if int32(*(*U16)(unsafe.Pointer(pItem + 24))) == i { goto __3 } } goto __2 __2: j++ pItem += 32 goto __1 goto __3 __3: ; if j == nOrderBy { var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, uintptr(0)) if pNew == uintptr(0) { return SQLITE_NOMEM } *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_IntValue) *(*int32)(unsafe.Pointer(pNew + 8)) = i (*Select)(unsafe.Pointer(p)).FpOrderBy = libc.AssignUintptr(&pOrderBy, Xsqlite3ExprListAppend(tls, pParse, pOrderBy, pNew)) if pOrderBy != 0 { *(*U16)(unsafe.Pointer(pOrderBy + 8 + uintptr(libc.PostIncInt32(&nOrderBy, 1))*32 + 24)) = U16(i) } } } } // Compute the comparison permutation and keyinfo that is used with // the permutation used to determine if the next // row of results comes from selectA or selectB. Also add explicit // collations to the ORDER BY clause terms so that when the subqueries // to the right and the left are evaluated, they use the correct // collation. aPermute = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(U32(0)))*uint64(nOrderBy+1)) if aPermute != 0 { var pItem uintptr *(*U32)(unsafe.Pointer(aPermute)) = U32(nOrderBy) i = 1 pItem = pOrderBy + 8 /* &.a */ __4: if !(i <= nOrderBy) { goto __6 } { *(*U32)(unsafe.Pointer(aPermute + uintptr(i)*4)) = U32(int32(*(*U16)(unsafe.Pointer(pItem + 24))) - 1) } goto __5 __5: i++ pItem += 32 goto __4 goto __6 __6: ; pKeyMerge = multiSelectOrderByKeyInfo(tls, pParse, p, 1) } else { pKeyMerge = uintptr(0) } // Allocate a range of temporary registers and the KeyInfo needed // for the logic that removes duplicate result rows when the // operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL). if op == TK_ALL { regPrev = 0 } else { var nExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr regPrev = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 *(*int32)(unsafe.Pointer(pParse + 56)) += nExpr + 1 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regPrev) pKeyDup = Xsqlite3KeyInfoAlloc(tls, db, nExpr, 1) if pKeyDup != 0 { for i = 0; i < nExpr; i++ { *(*uintptr)(unsafe.Pointer(pKeyDup + 32 + uintptr(i)*8)) = multiSelectCollSeq(tls, pParse, p, i) *(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyDup)).FaSortFlags + uintptr(i))) = U8(0) } } } // Separate the left and the right query from one another nSelect = 1 if (op == TK_ALL || op == TK_UNION) && (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_BalancedMerge) == U32(0) { for pSplit = p; (*Select)(unsafe.Pointer(pSplit)).FpPrior != uintptr(0) && int32((*Select)(unsafe.Pointer(pSplit)).Fop) == op; pSplit = (*Select)(unsafe.Pointer(pSplit)).FpPrior { nSelect++ } } if nSelect <= 3 { pSplit = p } else { pSplit = p for i = 2; i < nSelect; i = i + 2 { pSplit = (*Select)(unsafe.Pointer(pSplit)).FpPrior } } pPrior = (*Select)(unsafe.Pointer(pSplit)).FpPrior (*Select)(unsafe.Pointer(pSplit)).FpPrior = uintptr(0) (*Select)(unsafe.Pointer(pPrior)).FpNext = uintptr(0) (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = Xsqlite3ExprListDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pOrderBy, 0) Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+8468) Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+8468) // Compute the limit registers computeLimitRegisters(tls, pParse, p, labelEnd) if (*Select)(unsafe.Pointer(p)).FiLimit != 0 && op == TK_ALL { regLimitA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regLimitB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Copy, func() int32 { if (*Select)(unsafe.Pointer(p)).FiOffset != 0 { return (*Select)(unsafe.Pointer(p)).FiOffset + 1 } return (*Select)(unsafe.Pointer(p)).FiLimit }(), regLimitA) Xsqlite3VdbeAddOp2(tls, v, OP_Copy, regLimitA, regLimitB) } else { regLimitA = libc.AssignInt32(®LimitB, 0) } Xsqlite3ExprDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpLimit) (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) regAddrA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regAddrB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) Xsqlite3SelectDestInit(tls, bp+48, SRT_Coroutine, regAddrB) Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20347, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. addrSelectA = Xsqlite3VdbeCurrentAddr(tls, v) + 1 addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20358, 0) Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) // Generate a coroutine to evaluate the SELECT statement on // the right - the "B" select addrSelectB = Xsqlite3VdbeCurrentAddr(tls, v) + 1 addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrB, 0, addrSelectB) savedLimit = (*Select)(unsafe.Pointer(p)).FiLimit savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+20363, 0) Xsqlite3Select(tls, pParse, p, bp+48) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset Xsqlite3VdbeEndCoroutine(tls, v, regAddrB) // Generate a subroutine that outputs the current row of the A // select as the next output row of the compound select. addrOutA = generateOutputSubroutine(tls, pParse, p, bp+8, pDest, regOutA, regPrev, pKeyDup, labelEnd) // Generate a subroutine that outputs the current row of the B // select as the next output row of the compound select. if op == TK_ALL || op == TK_UNION { addrOutB = generateOutputSubroutine(tls, pParse, p, bp+48, pDest, regOutB, regPrev, pKeyDup, labelEnd) } Xsqlite3KeyInfoUnref(tls, pKeyDup) // Generate a subroutine to run when the results from select A // are exhausted and only data in select B remains. if op == TK_EXCEPT || op == TK_INTERSECT { addrEofA_noB = libc.AssignInt32(&addrEofA, labelEnd) } else { addrEofA = Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutB, addrOutB) addrEofA_noB = Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, labelEnd) Xsqlite3VdbeGoto(tls, v, addrEofA) (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) } // Generate a subroutine to run when the results from select B // are exhausted and only data in select A remains. if op == TK_INTERSECT { addrEofB = addrEofA if int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32((*Select)(unsafe.Pointer(pPrior)).FnSelectRow) { (*Select)(unsafe.Pointer(p)).FnSelectRow = (*Select)(unsafe.Pointer(pPrior)).FnSelectRow } } else { addrEofB = Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutA, addrOutA) Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, labelEnd) Xsqlite3VdbeGoto(tls, v, addrEofB) } // Generate code to handle the case of A<B addrAltB = Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutA, addrOutA) Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, addrEofA) Xsqlite3VdbeGoto(tls, v, labelCmpr) // Generate code to handle the case of A==B if op == TK_ALL { addrAeqB = addrAltB } else if op == TK_INTERSECT { addrAeqB = addrAltB addrAltB++ } else { addrAeqB = Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, addrEofA) Xsqlite3VdbeGoto(tls, v, labelCmpr) } // Generate code to handle the case of A>B addrAgtB = Xsqlite3VdbeCurrentAddr(tls, v) if op == TK_ALL || op == TK_UNION { Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, regOutB, addrOutB) } Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, addrEofB) Xsqlite3VdbeGoto(tls, v, labelCmpr) // This code runs once to initialize everything. Xsqlite3VdbeJumpHere(tls, v, addr1) Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrA, addrEofA_noB) Xsqlite3VdbeAddOp2(tls, v, OP_Yield, regAddrB, addrEofB) // Implement the main merge loop Xsqlite3VdbeResolveLabel(tls, v, labelCmpr) Xsqlite3VdbeAddOp4(tls, v, OP_Permutation, 0, 0, 0, aPermute, -15) Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(bp+8 /* &destA */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+48 /* &destB */)).FiSdst, nOrderBy, pKeyMerge, -9) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_PERMUTE)) Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addrAltB, addrAeqB, addrAgtB) // Jump to the this point in order to terminate the query. Xsqlite3VdbeResolveLabel(tls, v, labelEnd) // Reassembly the compound query so that it will be freed correctly // by the calling function if (*Select)(unsafe.Pointer(pSplit)).FpPrior != 0 { Xsqlite3SelectDelete(tls, db, (*Select)(unsafe.Pointer(pSplit)).FpPrior) } (*Select)(unsafe.Pointer(pSplit)).FpPrior = pPrior (*Select)(unsafe.Pointer(pPrior)).FpNext = pSplit Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy) (*Select)(unsafe.Pointer(pPrior)).FpOrderBy = uintptr(0) // ** TBD: Insert subroutine calls to close cursors on incomplete // subqueries *** Xsqlite3VdbeExplainPop(tls, pParse) return libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) } // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. type SubstContext1 = struct { FpParse uintptr FiTable int32 FiNewTable int32 FisLeftJoin int32 F__ccgo_pad1 [4]byte FpEList uintptr } /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137890:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. type SubstContext = SubstContext1 /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137896:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th // entry in pEList. (But leave references to the ROWID column // unchanged.) // // This routine is part of the flattening procedure. A subquery // whose result set is defined by pEList appears as entry in the // FROM clause of a SELECT such that the VDBE cursor assigned to that // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:137915:13: */ bp := tls.Alloc(72) defer tls.Free(72) if pExpr == uintptr(0) { return uintptr(0) } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) && *(*int32)(unsafe.Pointer(pExpr + 52)) == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable { *(*int32)(unsafe.Pointer(pExpr + 52)) = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable } if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable && !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FixedCol) != U32(0)) { { var pNew uintptr var pCopy uintptr = (*ExprList_item)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpEList + 8 + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*32)).FpExpr // var ifNullRow Expr at bp, 72 if Xsqlite3ExprIsVector(tls, pCopy) != 0 { Xsqlite3VectorErrorMsg(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pCopy) } else { var db uintptr = (*Parse)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpParse)).Fdb if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 && int32((*Expr)(unsafe.Pointer(pCopy)).Fop) != TK_COLUMN { libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).Fflags = U32(EP_IfNullRow) pCopy = bp /* &ifNullRow */ } pNew = Xsqlite3ExprDup(tls, db, pCopy, 0) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { Xsqlite3ExprDelete(tls, db, pNew) return pExpr } if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 { *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_CanBeNull) } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { Xsqlite3SetJoinExpr(tls, pNew, *(*int32)(unsafe.Pointer(pExpr + 52))) } Xsqlite3ExprDelete(tls, db, pExpr) pExpr = pNew // Ensure that the expression now has an implicit collation sequence, // just as it did when it was a column of a view or sub-query. if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { var pColl uintptr = Xsqlite3ExprCollSeq(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr) pExpr = Xsqlite3ExprAddCollateString(tls, (*SubstContext)(unsafe.Pointer(pSubst)).FpParse, pExpr, func() uintptr { if pColl != 0 { return (*CollSeq)(unsafe.Pointer(pColl)).FzName } return ts + 1069 }()) } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) } } } else { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_IF_NULL_ROW && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*SubstContext)(unsafe.Pointer(pSubst)).FiTable { (*Expr)(unsafe.Pointer(pExpr)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable } (*Expr)(unsafe.Pointer(pExpr)).FpLeft = substExpr(tls, pSubst, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) (*Expr)(unsafe.Pointer(pExpr)).FpRight = substExpr(tls, pSubst, (*Expr)(unsafe.Pointer(pExpr)).FpRight) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { substSelect(tls, pSubst, *(*uintptr)(unsafe.Pointer(pExpr + 32)), 1) } else { substExprList(tls, pSubst, *(*uintptr)(unsafe.Pointer(pExpr + 32))) } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 64)) (*Window)(unsafe.Pointer(pWin)).FpFilter = substExpr(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpFilter) substExprList(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpPartition) substExprList(tls, pSubst, (*Window)(unsafe.Pointer(pWin)).FpOrderBy) } } return pExpr } func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138000:13: */ var i int32 if pList == uintptr(0) { return } for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*32)).FpExpr = substExpr(tls, pSubst, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*32)).FpExpr) } } func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138010:13: */ var pSrc uintptr var pItem uintptr var i int32 if !(p != 0) { return } for __ccgo := true; __ccgo; __ccgo = doPrior != 0 && libc.AssignUintptr(&p, (*Select)(unsafe.Pointer(p)).FpPrior) != uintptr(0) { substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpEList) substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpGroupBy) substExprList(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpOrderBy) (*Select)(unsafe.Pointer(p)).FpHaving = substExpr(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpHaving) (*Select)(unsafe.Pointer(p)).FpWhere = substExpr(tls, pSubst, (*Select)(unsafe.Pointer(p)).FpWhere) pSrc = (*Select)(unsafe.Pointer(p)).FpSrc i = (*SrcList)(unsafe.Pointer(pSrc)).FnSrc pItem = pSrc + 8 /* &.a */ __1: if !(i > 0) { goto __3 } { substSelect(tls, pSubst, (*SrcItem)(unsafe.Pointer(pItem)).FpSelect, 1) if uint32(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x4>>2)) != 0 { substExprList(tls, pSubst, *(*uintptr)(unsafe.Pointer(pItem + 96))) } } goto __2 __2: i-- pItem += 112 goto __1 goto __3 __3: } } // pSelect is a SELECT statement and pSrcItem is one item in the FROM // clause of that SELECT. // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138045:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue } pItem = *(*uintptr)(unsafe.Pointer(pWalker + 40)) if (*SrcItem)(unsafe.Pointer(pItem)).FiCursor != (*Expr)(unsafe.Pointer(pExpr)).FiTable { return WRC_Continue } if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) < 0 { return WRC_Continue } *(*Bitmask)(unsafe.Pointer(pItem + 88)) |= Xsqlite3ExprColUsed(tls, pExpr) return WRC_Continue } func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138054:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 if (*SrcItem)(unsafe.Pointer(pSrcItem)).FpTab == uintptr(0) { return } libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{recomputeColumnsUsedExpr})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkNoop})) *(*uintptr)(unsafe.Pointer(bp + 40)) = pSrcItem (*SrcItem)(unsafe.Pointer(pSrcItem)).FcolUsed = uint64(0) Xsqlite3WalkSelect(tls, bp, pSelect) } // Assign new cursor numbers to each of the items in pSrc. For each // new cursor number assigned, set an entry in the aCsrMap[] array // to map the old cursor number to the new: // // aCsrMap[iOld+1] = iNew; // // The array is guaranteed by the caller to be large enough for all // existing cursor numbers in pSrc. aCsrMap[0] is the array size. // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138083:13: */ var i int32 var pItem uintptr i = 0 pItem = pSrc + 8 /* &.a */ __1: if !(i < (*SrcList)(unsafe.Pointer(pSrc)).FnSrc) { goto __3 } { if i != iExcept { var p uintptr if !(int32(*(*uint16)(unsafe.Pointer(pItem + 60 + 4))&0x20>>5) != 0) || *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) == 0 { *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) } (*SrcItem)(unsafe.Pointer(pItem)).FiCursor = *(*int32)(unsafe.Pointer(aCsrMap + uintptr((*SrcItem)(unsafe.Pointer(pItem)).FiCursor+1)*4)) for p = (*SrcItem)(unsafe.Pointer(pItem)).FpSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, -1) } } } goto __2 __2: i++ pItem += 112 goto __1 goto __3 __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138109:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 40)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { *(*int32)(unsafe.Pointer(piCursor)) = *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) } } // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138121:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+44) } if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { renumberCursorDoMapping(tls, pWalker, pExpr+52) } return WRC_Continue } // Assign a new cursor number to each cursor in the FROM clause (Select.pSrc) // of the SELECT statement passed as the second argument, and to each // cursor in the FROM clause of any FROM clause sub-selects, recursively. // Except, do not assign a new cursor number to the iExcept'th element in // the FROM clause of (*p). Update all expressions and other references // to refer to the new cursor numbers. // // Argument aCsrMap is an array that may be used for temporary working // space. Two guarantees are made by the caller: // // * the array is larger than the largest cursor number used within the // select statement passed as an argument, and // // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138150:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var w Walker at bp, 48 srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, iExcept) libc.Xmemset(tls, bp, 0, uint64(unsafe.Sizeof(Walker{}))) *(*uintptr)(unsafe.Pointer(bp + 40)) = aCsrMap (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renumberCursorsCb})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkNoop})) Xsqlite3WalkSelect(tls, bp, p) } // This routine attempts to flatten subqueries as a performance optimization. // This routine returns 1 if it makes changes and 0 if no flattening occurs. // // To understand the concept of flattening, consider the following // query: // // SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5 // // The default way of implementing this query is to execute the // subquery first and store the results in a temporary table, then // run the outer query on that temporary table. This requires two // passes over the data. Furthermore, because the temporary table // has no indices, the WHERE clause on the outer query cannot be // optimized. // // This routine attempts to rewrite queries such as the above into // a single flat select, like this: // // SELECT x+y AS a FROM t1 WHERE z<100 AND a>5 // // The code generated for this simplification gives the same result // but only has to scan the data once. And because indices might // exist on the table t1, a complete scan of the data might be // avoided. // // Flattening is subject to the following constraints: // // (**) We no longer attempt to flatten aggregate subqueries. Was: // The subquery and the outer query cannot both be aggregates. // // (**) We no longer attempt to flatten aggregate subqueries. Was: // (2) If the subquery is an aggregate then // (2a) the outer query must not be a join and // (2b) the outer query must not use subqueries // other than the one FROM-clause subquery that is a candidate // for flattening. (This is due to ticket [2f7170d73bf9abf80] // from 2015-02-09.) // // (3) If the subquery is the right operand of a LEFT JOIN then // (3a) the subquery may not be a join and // (3b) the FROM clause of the subquery may not contain a virtual // table and // (3c) the outer query may not be an aggregate. // (3d) the outer query may not be DISTINCT. // // (4) The subquery can not be DISTINCT. // // (**) At one point restrictions (4) and (5) defined a subset of DISTINCT // sub-queries that were excluded from this optimization. Restriction // (4) has since been expanded to exclude all DISTINCT subqueries. // // (**) We no longer attempt to flatten aggregate subqueries. Was: // If the subquery is aggregate, the outer query may not be DISTINCT. // // (7) The subquery must have a FROM clause. TODO: For subqueries without // A FROM clause, consider adding a FROM clause with the special // table sqlite_once that consists of a single row containing a // single NULL. // // (8) If the subquery uses LIMIT then the outer query may not be a join. // // (9) If the subquery uses LIMIT then the outer query may not be aggregate. // // (**) Restriction (10) was removed from the code on 2005-02-05 but we // accidently carried the comment forward until 2014-09-15. Original // constraint: "If the subquery is aggregate then the outer query // may not use LIMIT." // // (11) The subquery and the outer query may not both have ORDER BY clauses. // // (**) Not implemented. Subsumed into restriction (3). Was previously // a separate restriction deriving from ticket #350. // // (13) The subquery and outer query may not both use LIMIT. // // (14) The subquery may not use OFFSET. // // (15) If the outer query is part of a compound select, then the // subquery may not use LIMIT. // (See ticket #2339 and ticket [02a8e81d44]). // // (16) If the outer query is aggregate, then the subquery may not // use ORDER BY. (Ticket #2942) This used to not matter // until we introduced the group_concat() function. // // (17) If the subquery is a compound select, then // (17a) all compound operators must be a UNION ALL, and // (17b) no terms within the subquery compound may be aggregate // or DISTINCT, and // (17c) every term within the subquery compound must have a FROM clause // (17d) the outer query may not be // (17d1) aggregate, or // (17d2) DISTINCT // (17e) the subquery may not contain window functions, and // (17f) the subquery must not be the RHS of a LEFT JOIN. // // The parent and sub-query may contain WHERE clauses. Subject to // rules (11), (13) and (14), they may also contain ORDER BY, // LIMIT and OFFSET clauses. The subquery cannot use any compound // operator other than UNION ALL because all the other compound // operators have an implied DISTINCT which is disallowed by // restriction (4). // // Also, each component of the sub-query must return the same number // of result columns. This is actually a requirement for any compound // SELECT statement, but all the code here does is make sure that no // such (illegal) sub-query is flattened. The caller will detect the // syntax error and return a detailed message. // // (18) If the sub-query is a compound select, then all terms of the // ORDER BY clause of the parent must be copies of a term returned // by the parent query. // // (19) If the subquery uses LIMIT then the outer query may not // have a WHERE clause. // // (20) If the sub-query is a compound select, then it must not use // an ORDER BY clause. Ticket #3773. We could relax this constraint // somewhat by saying that the terms of the ORDER BY clause must // appear as unmodified result columns in the outer query. But we // have other optimizations in mind to deal with that case. // // (21) If the subquery uses LIMIT then the outer query may not be // DISTINCT. (See ticket [752e1646fc]). // // (22) The subquery may not be a recursive CTE. // // (23) If the outer query is a recursive CTE, then the sub-query may not be // a compound query. This restriction is because transforming the // parent to a compound query confuses the code that handles // recursive queries in multiSelect(). // // (**) We no longer attempt to flatten aggregate subqueries. Was: // The subquery may not be an aggregate that uses the built-in min() or // or max() functions. (Without this restriction, a query like: // "SELECT x FROM (SELECT max(y), x FROM t1)" would not necessarily // return the value X for which Y was maximal.) // // (25) If either the subquery or the parent query contains a window // function in the select list or ORDER BY clause, flattening // is not attempted. // // // In this routine, the "p" parameter is a pointer to the outer query. // The subquery is p->pSrc->a[iFrom]. isAgg is true if the outer query // uses aggregates. // // If flattening is not attempted, this routine is a no-op and returns 0. // If flattening is attempted this routine returns 1. // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* testdata/sqlite-amalgamation-3380500/sqlite3.c:138321:12: */ bp := tls.Alloc(80) defer tls.Free(80) var zSavedAuthContext uintptr = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext var pParent uintptr // Current UNION ALL term of the other query var pSub uintptr // The inner query or "subquery" var pSub1 uintptr // Pointer to the rightmost select in sub-query var pSrc uintptr // The FROM clause of the outer query var pSubSrc uintptr // The FROM clause of the subquery var iParent int32 // VDBE cursor number of the pSub result set temp table var iNewParent int32 = -1 // Replacement table for iParent var isLeftJoin int32 = 0 // True if pSub is the right side of a LEFT JOIN var i int32 // Loop counter var pWhere uintptr // The WHERE clause var pSubitem uintptr // The subquery var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // var w Walker at bp+32, 48 // Walker to persist agginfo data var aCsrMap uintptr = uintptr(0) // Check to see if flattening is permitted. Return 0 if not. if (*Sqlite3)(unsafe.Pointer(db)).FdbOptFlags&U32(SQLITE_QueryFlattener) != U32(0) { return 0 } pSrc = (*Select)(unsafe.Pointer(p)).FpSrc pSubitem = pSrc + 8 + uintptr(iFrom)*112 iParent = (*SrcItem)(unsafe.Pointer(pSubitem)).FiCursor pSub = (*SrcItem)(unsafe.Pointer(pSubitem)).FpSelect if (*Select)(unsafe.Pointer(p)).FpWin != 0 || (*Select)(unsafe.Pointer(pSub)).FpWin != 0 { return 0 } // Restriction (25) pSubSrc = (*Select)(unsafe.Pointer(pSub)).FpSrc // Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants, // not arbitrary expressions, we allowed some combining of LIMIT and OFFSET // because they could be computed at compile-time. But when LIMIT and OFFSET // became arbitrary expressions, we were forced to add restrictions (13) // and (14). if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FpLimit != 0 { return 0 } // Restriction (13) if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpLimit)).FpRight != 0 { return 0 } // Restriction (14) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Compound) != U32(0) && (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 { return 0 // Restriction (15) } if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc == 0 { return 0 } // Restriction (7) if (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_Distinct) != 0 { return 0 } // Restriction (4) if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && ((*SrcList)(unsafe.Pointer(pSrc)).FnSrc > 1 || isAgg != 0) { return 0 // Restrictions (8)(9) } if (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 && (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 // Restriction (11) } if isAgg != 0 && (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 } // Restriction (16) if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FpWhere != 0 { return 0 } // Restriction (19) if (*Select)(unsafe.Pointer(pSub)).FpLimit != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) { return 0 // Restriction (21) } if (*Select)(unsafe.Pointer(pSub)).FselFlags&U32(SF_Recursive) != 0 { return 0 // Restrictions (22) } // If the subquery is the right operand of a LEFT JOIN, then the // subquery may not be a join itself (3a). Example of why this is not // allowed: // // t1 LEFT OUTER JOIN (t2 JOIN t3) // // If we flatten the above, we would get // // (t1 LEFT OUTER JOIN t2) JOIN t3 // // which is not at all the same thing. // // If the subquery is the right operand of a LEFT JOIN, then the outer // query cannot be an aggregate. (3c) This is an artifact of the way // aggregates are processed - there is no mechanism to determine if // the LEFT JOIN table should be all-NULL. // // See also tickets #306, #350, and #3300. if int32((*SrcItem)(unsafe.Pointer(pSubitem)).Ffg.Fjointype)&JT_OUTER != 0 { isLeftJoin = 1 if (*SrcList)(unsafe.Pointer(pSubSrc)).FnSrc > 1 || isAgg != 0 || int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSubSrc+8)).FpTab)).FeTabType) == TABTYP_VTAB || (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) { return 0 } } // Restriction (17): If the sub-query is a compound SELECT, then it must // use only the UNION ALL operator. And none of the simple select queries // that make up the compound SELECT are allowed to be aggregate or distinct // queries. if (*Select)(unsafe.Pointer(pSub)).FpPrior != 0 { if (*Select)(unsafe.Pointer(pSub)).FpOrderBy != 0 { return 0 // Restriction (20) } if isAgg != 0 || (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) != U32(0) || isLeftJoin > 0 { return 0 // (17d1), (17d2), or (17f) } for pSub1 = pSub; pSub1 != 0; pSub1 = (*Select)(unsafe.Pointer(pSub1)).FpPrior { if (*Select)(unsafe.Pointer(pSub1)).FselFlags&U32(SF_Distinct|SF_Aggregate) != U32(0) || (*Select)(unsafe.Pointer(pSub1)).FpPrior != 0 && int32((*Select)(unsafe.Pointer(pSub1)).Fop) != TK_ALL || (*SrcList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub1)).FpSrc)).FnSrc < 1 || (*Select)(unsafe.Pointer(pSub1)).FpWin != 0 { return 0 } } // Restriction (18). if (*Select)(unsafe.Pointer(p)).FpOrderBy != 0 { var ii int32 for ii = 0; ii < (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy)).FnExpr; ii++ { if int32(*(*U16)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpOrderBy + 8 + uintptr(ii)*32 + 24))) == 0 { return 0 } } } // Restriction (23) if (*Select)(unsafe.Pointer(p)).FselFlags&